2 // { dg-do compile { target c++11 } }
7 friend C; // OK: class C is a friend
12 friend Ct; // OK: class C is a friend
13 friend D; // { dg-error "" } no type-name D in scope
14 friend class D; // OK: elaborated-type-specifier declares new class
17 template <typename T> class R {
21 R<C> rc; // class C is a friend of R<C>
22 R<int> Ri; // OK: "friend int;" is ignored