// PR c++/29020 template struct A { void foo(); }; struct B { template friend void A::A::foo(); };