* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / decltype41.C
blob65f75b1e4fa70fac4caae0b135d47d99e93fcb20
1 // Core 1273
2 // { dg-do compile { target c++11 } }
4 template <class T> struct C;
5 template <class T> struct D;
7 class A
9   int i;
10   static int j;
11   friend struct C<int>;
12   friend struct D<int>;
13 } a;
15 class B
17   int i;
18   static int j;
19   friend struct C<float>;
20   friend struct D<float>;
21 } b;
23 template <class T>
24 struct C
26   template <class U> decltype (a.i) f() { return 0; } // #1
27   template <class U> decltype (b.i) f() { return 1; } // #2
30 template <class T>
31 struct D
33   template <class U> decltype (A::j) f() { return 2; } // #1
34   template <class U> decltype (B::j) f() { return 3; } // #2
37 int main()
39   C<int>().f<int>();     // calls #1
40   C<float>().f<float>(); // calls #2
41   D<int>().f<int>();     // calls #1
42   D<float>().f<float>(); // calls #2