// { dg-do compile } // Origin: Wolfgang Bangerth // PR c++/15664: Template substitution of template template parameter template struct S { template class A> friend void foo(); }; template class A> void foo(); template struct X {}; int main () { S<1> s; foo(); }