diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/memtemp67.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/memtemp67.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp67.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp67.C new file mode 100644 index 000000000..1f25dcd4d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp67.C @@ -0,0 +1,20 @@ +// { dg-do run } +template <class T> +struct A +{ + template <class T2> + operator A<T2>() const { return A<T2>(); } +}; + +int main() +{ + A<int> a1; + A<long> a2; + A<double> a3; + A<char> a4; + + a2 = a1.operator A<long>(); + a3 = (A<double>) a1; + a4 = a1; +} + |