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