+2015-11-25 Ryan Burn <contact@rnburn.com>
+
+ PR c++/68434
+ * pt.c (tsubst): Set PLACEHOLDER_TYPE_CONSTRAINTS before
+ calling canonical_type_parameter.
+
2015-11-25 Jason Merrill <jason@redhat.com>
* lambda.c (maybe_add_lambda_conv_op): Only set
TYPE_POINTER_TO (r) = NULL_TREE;
TYPE_REFERENCE_TO (r) = NULL_TREE;
+ /* Propagate constraints on placeholders. */
+ if (TREE_CODE (t) == TEMPLATE_TYPE_PARM)
+ if (tree constr = PLACEHOLDER_TYPE_CONSTRAINTS (t))
+ PLACEHOLDER_TYPE_CONSTRAINTS (r)
+ = tsubst_constraint (constr, args, complain, in_decl);
+
if (TREE_CODE (r) == TEMPLATE_TEMPLATE_PARM)
/* We have reduced the level of the template
template parameter, but not the levels of its
else
TYPE_CANONICAL (r) = canonical_type_parameter (r);
- /* Propagate constraints on placeholders. */
- if (TREE_CODE (t) == TEMPLATE_TYPE_PARM)
- if (tree constr = PLACEHOLDER_TYPE_CONSTRAINTS (t))
- PLACEHOLDER_TYPE_CONSTRAINTS (r)
- = tsubst_constraint (constr, args, complain, in_decl);
-
if (code == BOUND_TEMPLATE_TEMPLATE_PARM)
{
tree argvec = tsubst (TYPE_TI_ARGS (t), args,