// PR c++/14359 template struct A {}; template struct B { template friend void foo(const A& a, const B&) { a; } }; void bar() { A a; B b; foo(a,b); }