diff options
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp14.C')
-rwxr-xr-x | gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp14.C | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp14.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp14.C new file mode 100755 index 0000000..e24a3a7 --- /dev/null +++ b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp14.C @@ -0,0 +1,30 @@ +// Build don't run: +// GROUPS passed templates membertemplates +extern "C" const char* printf(const char*, ...); + +template <class T> +struct S +{ + template <class U, class V> + void foo(U, V); +}; + + +template <class T> +template <class U, class V> +void S<T>::foo(U, V) +{ + printf("Hello, world.\n"); +} + + +int main() +{ + S<int> s; + s.foo(3, 3); + s.foo("hello", s); + + S<char*> s2; + s2.foo(3, 3); + s2.foo("hello", s); +} |