Commit 9e73c3f3 by Jason Merrill Committed by Jason Merrill

re PR c++/58504 (ICE with type trait as default template parameter)

	PR c++/58504
	* pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
	types.

From-SVN: r207168
parent b25c2a2f
2014-01-27 Jason Merrill <jason@redhat.com>
PR c++/58504
* pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
types.
PR c++/58606
* pt.c (template_parm_to_arg): Call convert_from_reference.
(tsubst_template_arg): Don't strip reference refs.
......
......@@ -14974,12 +14974,12 @@ tsubst_copy_and_build (tree t,
case TRAIT_EXPR:
{
tree type1 = tsubst_copy (TRAIT_EXPR_TYPE1 (t), args,
complain, in_decl);
tree type1 = tsubst (TRAIT_EXPR_TYPE1 (t), args,
complain, in_decl);
tree type2 = TRAIT_EXPR_TYPE2 (t);
if (type2)
type2 = tsubst_copy (type2, args, complain, in_decl);
type2 = tsubst (type2, args, complain, in_decl);
RETURN (finish_trait_expr (TRAIT_EXPR_KIND (t), type1, type2));
}
......
// PR c++/58504
template<bool = __has_nothrow_assign(void)> struct A {};
A<> a;
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