// { dg-do compile } // Origin: Wolfgang Bangerth // Perform access checking to parameter and return type of // function template correctly when the template is friend. template class O { struct I { I (int); }; template friend typename O::I f (); }; template typename O::I f () { return 1; } struct X { void g() { f(); } };