// Copyright (C) 2003 Free Software Foundation // Contributed by Kriang Lerdsuwanakij // { dg-do compile } // Access checking during explicit instantiation. class A { typedef int X; // { dg-error "private" } }; class X { private: template struct Y; }; template <> struct X::Y { A::X x; // { dg-error "this context" } }; template struct X::Y { typename T::X x; // { dg-error "this context" } }; template struct X::Y; // { dg-message "required from here" }