summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/defarg8.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/defarg8.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C b/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C
new file mode 100644
index 000000000..a72e85c43
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/defarg8.C
@@ -0,0 +1,17 @@
+// { dg-do assemble }
+
+// Default arguments containing more than one non-nested explicit
+// template argument leads to parse error
+
+// This might be ill formed. See DR 325 (one proposed resolution is to make
+// it so)
+
+template <class T> class foo1;
+template <class T, class U> class foo2;
+
+struct bar {
+ template <class T, class U>
+ bar(int i = foo1<T>::baz, // { dg-bogus "" } -
+ int j = int(foo2<T, U>::baz), // ok
+ int k = foo2<T, U>::baz) {} // ok?
+};