]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.old-deja/g++.pt/friend3.C
cp-tree.h (flag_access_control): Declare.
[gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / friend3.C
CommitLineData
138928a6
JM
1// Build don't link:
2
3template <class T>
4void f(T);
5
6class C
7{
8 friend void f<>(double);
9
d6479fe7 10 int i; // ERROR - private
138928a6
JM
11};
12
13
14template <class T>
15void f(T)
16{
17 C c;
18 c.i = 3; // ERROR - f<double> is a friend, this is f<int>.
19}
20
21
22int main()
23{
24 f(7);
25}
This page took 0.283013 seconds and 5 git commands to generate.