// { dg-do link } // GROUPS passed templates membertemplates extern "C" int printf (const char *, ...); template struct S { template void foo(U, V); }; template template void S::foo(U, V) { printf("Hello, world.\n"); } int main() { S s; s.foo(3, 3); s.foo("hello", s); S s2; s2.foo(3, 3); s2.foo("hello", s); }