re PR c++/21353 (rvalues should not be allowed to be default values for non const...
authorNathan Sidwell <nathan@codesourcery.com>
Mon, 17 Oct 2005 11:19:12 +0000 (11:19 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 17 Oct 2005 11:19:12 +0000 (11:19 +0000)
commitc3ee4651b244be21eaa251676afc4f052727a0b5
tree7d8824489867a310bab522176b3c8b9255de8127
parent5acaf46030143cbb7e08c5c1dde13adff84d8e10
re PR c++/21353 (rvalues should not be allowed to be default values for non const references in class functions.)

cp:
PR c++/21353
* g++.dg/template/defarg6.C: New.
testsuite:
PR c++/21353
* decl.c (check_default_argument): Don't check
processing_template_decl or uses_template_parms here.
(grokparms): Only call check_default_argument when not processing
a template decl.
* parser.c (cp_parser_late_parsing_default_arg): Call
check_default_argument when not processing a template decl.

From-SVN: r105492
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/defarg6.C [new file with mode: 0644]