Commit 5ac537d7 by Jason Merrill Committed by Jason Merrill

DR 1004

	DR 1004
	* pt.c (convert_template_argument): Don't complain about using
	injected-class-name as template template argument.

From-SVN: r174318
parent 7c999b57
2011-05-26 Jason Merrill <jason@redhat.com> 2011-05-26 Jason Merrill <jason@redhat.com>
DR 1004
* pt.c (convert_template_argument): Don't complain about using
injected-class-name as template template argument.
PR c++/47956 PR c++/47956
* decl.c (check_static_variable_definition): Now static. * decl.c (check_static_variable_definition): Now static.
(cp_finish_decl): Call it here. (cp_finish_decl): Call it here.
......
...@@ -5962,7 +5962,9 @@ convert_template_argument (tree parm, ...@@ -5962,7 +5962,9 @@ convert_template_argument (tree parm,
tree t = maybe_get_template_decl_from_type_decl (TYPE_NAME (arg)); tree t = maybe_get_template_decl_from_type_decl (TYPE_NAME (arg));
if (TREE_CODE (t) == TEMPLATE_DECL) if (TREE_CODE (t) == TEMPLATE_DECL)
{ {
if (complain & tf_warning_or_error) if (cxx_dialect >= cxx0x)
/* OK under DR 1004. */;
else if (complain & tf_warning_or_error)
pedwarn (input_location, OPT_pedantic, "injected-class-name %qD" pedwarn (input_location, OPT_pedantic, "injected-class-name %qD"
" used as template template argument", TYPE_NAME (arg)); " used as template template argument", TYPE_NAME (arg));
else if (flag_pedantic_errors) else if (flag_pedantic_errors)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment