// { dg-do compile } // Origin: Wolfgang Bangerth // PR 9030. Perform access checking to parameter and return type of // function template correctly when the template is friend. template class Outer { private: struct Inner {}; template friend typename Outer::Inner foo (); }; template typename Outer::Inner foo () { return typename Outer::Inner(); } void f() { foo(); }