// { dg-do compile }// Origin: Wolfgang Bangerth <wolfgang.bangerth@iwr.uni-heidelberg.de>// PR c++/7348// Access control for typename in function return typeclassOuter{template<intdim>structInner{typedefintT;Tfoo();};public:Outer();};template<intdim>typenameOuter::Inner<dim>::TOuter::Inner<dim>::foo(){return1;}templatestructOuter::Inner<2>;