template struct A { friend void bar(A a) {} }; void bar(A); int main() { A a; bar(a); }