+2015-12-07 Ryan Burn <contact@rnburn.com>
+
+ PR c++/68683
+ * constraint.cc (satisfy_argument_deduction_constraint): Set
+ TYPE_CANONICAL to NULL_TREE if PLACEHOLDER_TYPE_CONSTRAINTS are
+ changed.
+
2015-12-07 Jason Merrill <jason@redhat.com>
PR c++/68464
tree pattern = DEDUCT_CONSTR_PATTERN (t);
tree placeholder = DEDUCT_CONSTR_PLACEHOLDER (t);
tree constr = PLACEHOLDER_TYPE_CONSTRAINTS (placeholder);
+ tree type_canonical = TYPE_CANONICAL (placeholder);
PLACEHOLDER_TYPE_CONSTRAINTS (placeholder)
= tsubst_constraint (constr, args, complain|tf_partial, in_decl);
+ TYPE_CANONICAL (placeholder) = NULL_TREE;
tree type = do_auto_deduction (pattern, init, placeholder,
complain, adc_requirement);
PLACEHOLDER_TYPE_CONSTRAINTS (placeholder) = constr;
+ TYPE_CANONICAL (placeholder) = type_canonical;
if (type == error_mark_node)
return boolean_false_node;
--- /dev/null
+// { dg-options "-std=c++1z" }
+
+template <typename, typename>
+struct is_same {
+ static constexpr bool value = true;
+};
+
+template <typename T, typename U>
+concept bool Same = is_same<T, U>::value;
+
+template <typename T>
+concept bool Integral = requires {
+ { T () } -> Same<typename T::value_type>;
+};
+
+struct A {
+ using value_type = bool;
+};
+
+int main () {
+ Integral<A>;
+ Integral<A>;
+ return 0;
+}