// { dg-do compile } // Origin: Wolfgang Bangerth // PR c++/7348 // Access control for typename in function return type class Outer { template struct Inner { typedef int T; T foo (); }; public: Outer(); }; template typename Outer::Inner::T Outer::Inner::foo () { return 1; } template struct Outer::Inner<2>;