summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memtemp67.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/memtemp67.C')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.pt/memtemp67.C19
1 files changed, 19 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 100755
index 0000000..7170c90
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp67.C
@@ -0,0 +1,19 @@
+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;
+}
+