// { dg-do compile } // Origin: Wolfgang Bangerth // PR c++/9453 // Access checking when template friend is defined in class. template class X { private: struct Inner; template friend typename X::Inner * foo () { return 0; } }; template class X; struct U { void bar () { foo (); } };