Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / lookup / friend7.C
blobdd19c72f9a6567c3726b4e67372caafb1a8b6c64
1 // { dg-do compile }
2 // PR c++/7874: Don't inject friend functions into global name space.
4 namespace N { template<typename T> struct A { friend void f(A) { }; }; }
5 int main()
7    N::A<int> a;
8    N::f(a);             // { dg-error "not a member" }
11 struct S { friend void g(); friend void h(S); };
12 struct T { friend void g(); friend void h(T); };
13 void i() {
14   g();                  // { dg-error "not declared" }
15   S s;
16   h(s);
17   T t;
18   h(t);