OSDN Git Service

77aabd3bee30e5da0474238d4a680ebd5f5c23ce
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / friend3.C
1 // Build don't link:
2
3 template <class T>
4 void f(T);
5
6 class C
7 {
8   friend void f<>(double);
9
10   int i;
11 };
12
13
14 template <class T>
15 void f(T)
16 {
17   C c;
18   c.i = 3; // ERROR - f<double> is a friend, this is f<int>.
19 }
20
21
22 int main()
23 {
24   f(7);
25 }