gcc/testsuite/g++.old-deja/g++.pt/memtemp17.C
raw| 1 | // { dg-do link } |
| 2 | // GROUPS passed templates membertemplates |
| 3 | extern "C" int printf(const char*, ...); |
| 4 | |
| 5 | template <class V> |
| 6 | struct S { |
| 7 | template <class T, class U> |
| 8 | S(T, U, T); |
| 9 | }; |
| 10 | |
| 11 | |
| 12 | template <class V> |
| 13 | template <class T, class U> |
| 14 | S<V>::S(T t1, U u1, T t2) |
| 15 | { |
| 16 | printf("Hello, world.\n"); |
| 17 | } |
| 18 | |
| 19 | |
| 20 | int main() |
| 21 | { |
| 22 | S<int> s1(3, "abc", 3); |
| 23 | S<int> s2('a', s1, 'a'); |
| 24 | |
| 25 | S<char> s3("abc", 3, "abc"); |
| 26 | } |