OSDN Git Service

PR c++/53549
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / access21.C
1 // PR c++/48884
2
3 class X
4 {
5   static const int I = 42;
6   friend struct Y;
7 };
8
9 template <int I> struct A { };
10
11 struct Y
12 {
13   template <typename T>
14   static A<T::I> f(T t)
15   {
16     return A<T::I>();
17   }
18 };
19
20 int main()
21 {
22   Y::f(X());
23 }