/* Return a hash value for the placeholder ATOMIC_CONSTR C. */
hashval_t
-hash_placeholder_constraint (tree c)
+iterative_hash_placeholder_constraint (tree c, hashval_t val)
{
tree t, a;
placeholder_extract_concept_and_args (c, t, a);
/* Like hash_tmpl_and_args, but skip the first argument. */
- hashval_t val = iterative_hash_object (DECL_UID (t), 0);
+ val = iterative_hash_object (DECL_UID (t), val);
for (int i = TREE_VEC_LENGTH (a)-1; i > 0; --i)
val = iterative_hash_template_arg (TREE_VEC_ELT (a, i), val);
extern tree build_constrained_parameter (tree, tree, tree = NULL_TREE);
extern void placeholder_extract_concept_and_args (tree, tree&, tree&);
extern bool equivalent_placeholder_constraints (tree, tree);
-extern hashval_t hash_placeholder_constraint (tree);
+extern hashval_t iterative_hash_placeholder_constraint (tree, hashval_t);
extern bool deduce_constrained_parameter (tree, tree&, tree&);
extern tree resolve_constraint_check (tree);
extern tree check_function_concept (tree);
val = iterative_hash_object (TEMPLATE_TYPE_LEVEL (t), val);
val = iterative_hash_object (TEMPLATE_TYPE_IDX (t), val);
if (TREE_CODE (t) == TEMPLATE_TYPE_PARM)
- val = iterative_hash_template_arg (CLASS_PLACEHOLDER_TEMPLATE (t), val);
+ {
+ val
+ = iterative_hash_template_arg (CLASS_PLACEHOLDER_TEMPLATE (t), val);
+ if (tree c = NON_ERROR (PLACEHOLDER_TYPE_CONSTRAINTS (t)))
+ val = iterative_hash_placeholder_constraint (c, val);
+ }
if (TREE_CODE (t) == BOUND_TEMPLATE_TEMPLATE_PARM)
val = iterative_hash_template_arg (TYPE_TI_ARGS (t), val);
--comparing_specializations;
if (tree c = NON_ERROR (PLACEHOLDER_TYPE_CONSTRAINTS (t)))
/* Matching constrained-type-specifiers denote the same template
parameter, so hash the constraint. */
- return hash_placeholder_constraint (c);
+ return iterative_hash_placeholder_constraint (c, 0);
else
/* But unconstrained autos are all separate, so just hash the pointer. */
return iterative_hash_object (t, 0);