1// { dg-do link } 2// GROUPS passed templates membertemplates 3extern "C" int printf(const char*, ...); 4 5template <class X> 6struct S 7{ 8 template <class U> 9 void f(U u); 10 11 template <class U> 12 void g(U u); 13 14 int c[16]; 15}; 16 17template <class X> 18template <class U> 19void S<X>::f(U u) 20 { printf ("In S::f(U)\n"); g(u); } 21 22template <class X> 23template <class U> 24void S<X>::g(U u) 25 { printf ("In S::g(U)\n"); } 26 27int main() 28{ 29 S<char*> s; 30 s.f(3); 31 s.f("adf"); 32} 33