1// { dg-do link } 2// GROUPS passed templates membertemplates 3extern "C" int printf(const char*, ...); 4 5struct S 6{ 7 template <class U> 8 S(U u, int i) {} 9 10 template <class T> 11 T foo(T t) 12 { 13 printf("Hello, world.\n"); 14 return t; 15 } 16}; 17 18 19int main() 20{ 21 S s(3, 4); 22 int i = s.foo(3); 23 s.foo("hello"); 24 s.foo(s); 25 26 S s2("hello", 5); 27} 28