Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / template / friend31.C
blob2d62f878a21a0cd0f8df7242770e1583521a53df
1 // { dg-do compile }
3 // Origin: Ivan Godard <igodard@pacbell.net>
5 // PR c++/15410: Declaration of friend class template with wrong
6 // template parameter.
8 template <typename T, typename U> struct F; // { dg-error "previous declaration" }
10 class W
12   template<int i> friend class F;       // { dg-error "template parameter" }
13   int x;
16 template <typename T, typename U> struct F
18   void Look(W& w) { w.x = 3; }
21 int main()
23   W w;
24   F<char, bool> f;
25   f.Look(w);
26   return 0;