diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C new file mode 100644 index 000000000..e44b06353 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate1.C @@ -0,0 +1,22 @@ +// { dg-do assemble } + +template <class T> +void f(T t) {} + +template void f<int>(int); +template void f<>(long); + +template <class T> +struct S +{ + void bar(int) {} + + template <class U> + void baz(U u) {} +}; + + +template struct S<char>; +template void S<int>::bar(int); +template void S<double>::baz<short>(short); +template void S<long>::baz<>(char); |