namespace N { template struct A { friend int f(A); }; } int a = f(N::A());