OSDN Git Service

2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / ref2.C
1 // Copyright (C) 2005 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 7 Jan 2005 <nathan@codesourcery.com>
3
4 // PR 19298: Rejects legal
5 // Origin: Andrew Pinski <pinskia@gcc.gnu.org>
6
7 struct t
8 {
9   void f() const;
10 };
11
12 template <typename _Tp>
13 struct A
14 {
15  static t const&  c;
16 };
17
18 template <typename _Tp>
19 void g(void)
20 {
21   A<_Tp>::c.f();
22 }
23
24 void h(void)
25 {
26   g<int>();
27 }