OSDN Git Service

tests from mark
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / memtemp67.C
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 (file)
index 0000000..bcf5960
--- /dev/null
@@ -0,0 +1,19 @@
+template <class T>
+struct A
+{
+  template <class T2>
+  operator A<T2>() const { return A<T2>(); }
+};
+
+main()
+{
+  A<int> a1;
+  A<long> a2;    
+  A<double> a3;
+  A<char> a4;
+
+  a2 = a1.operator A<long>();
+  a3 = (A<double>) a1;                   
+  a4 = a1;
+}