Daily bump.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / friend11.C
blob1aeba3a1018a9dfc72f7989038dac632b7f0bfca
1 template <class T>
2 class C;
4 template <class T>
5 struct S
7   template <class U>
8   void f(U u)
9     {
10       C<U> cu;
11       cu.i = 3; // ERROR - S<double>::f<U> is a friend, but this is
12                 //         S<int>::f<double>. 
13     }
17 template <class T>
18 class C
20   template <class U>
21   friend void S<T>::f(U);
23   int i; // ERROR - private
27 int main()
29   S<int> si;
30   si.f(3.0);