13 // Here we declare A::S
17 template<class T, class U> class XX;
19 template<class T, class U>
23 static T *do_something ();
24 friend class T; // { dg-error "" } `T' is a template parameter
25 friend class XX<T, U>;
30 // Here we declare N::S
35 // Should use N::S and A::S.
36 typedef X<S, A::S> X_S;
44 // X_S is template class X<N::S, A::S>
46 S *s = X_S::do_something ();