diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/explicit13.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/explicit13.C | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit13.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit13.C new file mode 100644 index 000000000..a0dbfaa60 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit13.C @@ -0,0 +1,23 @@ +// { dg-do link } +// { dg-options "-ansi -pedantic-errors -w" } +// GROUPS passed templates + +template <class U> +struct S +{ + template <class T> + void foo(T t); + + template <class T> + void bar(T t) { this->template foo<U>(3.74); } +}; + +template <> +template <> +void S<int>::foo(int) { } + +int main() +{ + S<int> s; + s.bar(3); +} |