Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / g++.dg / parse / friend2.C
blob1a2ad8bfad9280cf187154c6f972ae39d8324e91
1 // { dg-do compile }
2 // Origin: <struppi@acm.org>
4 // PR c++/8591
5 // Template or class detection in friend declaration
7 namespace NS {
8   template <class T1, class T2, class T3 = int, class T4 = int>
9   struct C {};
12 template <class T> class X {
13   friend class NS::C;   // { dg-error "template|friend" }
16 X<int> c;