1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
template <class T> struct A { friend void bar(A<T> a) {} }; void bar(A<int>); int main() { A<int> a; bar(a); }