From 29ec68cb98fbf1eedfaead7afc7673e9cd229b24 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 24 Mar 2015 11:42:26 +0000 Subject: [PATCH] re PR c++/60067 (bogus error default template arguments may not be used in function templates) 2015-03-24 Paolo Carlini PR c++/60067 * g++.dg/template/defarg18.C: New. From-SVN: r221626 --- gcc/testsuite/g++.dg/template/defarg18.C | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/defarg18.C diff --git a/gcc/testsuite/g++.dg/template/defarg18.C b/gcc/testsuite/g++.dg/template/defarg18.C new file mode 100644 index 00000000000..ac089660618 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/defarg18.C @@ -0,0 +1,15 @@ +// PR c++/60067 + +template struct A; +template struct B { enum { v = 1 }; }; + +template )> +struct C { + void f () { + void g (int [B::v]); + } +}; + +void foo (void) { + C().f (); +} -- 2.30.2