From: Paolo Carlini Date: Tue, 24 Mar 2015 11:42:26 +0000 (+0000) Subject: re PR c++/60067 (bogus error default template arguments may not be used in function... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=29ec68cb98fbf1eedfaead7afc7673e9cd229b24;p=gcc.git 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 --- 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 (); +}