re PR c++/60067 (bogus error default template arguments may not be used in function...
authorPaolo Carlini <paolo@gcc.gnu.org>
Tue, 24 Mar 2015 11:42:26 +0000 (11:42 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 24 Mar 2015 11:42:26 +0000 (11:42 +0000)
2015-03-24  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/60067
* g++.dg/template/defarg18.C: New.

From-SVN: r221626

gcc/testsuite/g++.dg/template/defarg18.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/template/defarg18.C b/gcc/testsuite/g++.dg/template/defarg18.C
new file mode 100644 (file)
index 0000000..ac08966
--- /dev/null
@@ -0,0 +1,15 @@
+// PR c++/60067
+
+template <class> struct A;
+template <class> struct B { enum { v = 1 };  };
+
+template <class T = void (A<int>)>
+struct C {
+  void f () {
+    void g (int [B<T>::v]);
+  }
+};
+
+void foo (void) {
+    C<int>().f ();
+}