1// { dg-do compile } 2 3// Perform access checking to parameter and return type of 4// function template correctly when only specialization is friend. 5 6template <class T> 7typename T::Inner 8foo () { 9 return typename T::Inner(); 10} 11 12class Outer { 13 private: 14 struct Inner {}; 15 16 friend Outer::Inner foo<Outer> (); 17}; 18 19void f() { 20 foo<Outer>(); 21} 22