gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C
raw| 1 | // { dg-do assemble } |
| 2 | |
| 3 | template <class T> |
| 4 | void f(T t) {} |
| 5 | |
| 6 | template void f<int>(int); |
| 7 | template void f<>(long); |
| 8 | |
| 9 | template <class T> |
| 10 | struct S |
| 11 | { |
| 12 | void bar(int) {} |
| 13 | |
| 14 | template <class U> |
| 15 | void baz(U u) {} |
| 16 | }; |
| 17 | |
| 18 | |
| 19 | template struct S<char>; |
| 20 | template void S<int>::bar(int); |
| 21 | template void S<double>::baz<short>(short); |
| 22 | template void S<long>::baz<>(char); |