3 // Copyright (C) 2004 Free Software Foundation
4 // Contributed by Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6 // Nested class of class template as friend
8 template<class T> struct A
20 int i; // { dg-error "private" }
21 template<class T> friend struct A<T>::B1;
24 template<class T> void A<T>::B2::f()
27 c.i = 0; // { dg-error "context" }
33 b1.f(); // { dg-error "instantiated" }