return subsumes (n1, n2) && !subsumes (n2, n1);
}
-/* Returns true when the constraints in CI subsume the
- associated constraints of TMPL. */
+/* Returns true when the template template parameter constraints in CI
+ subsume the associated constraints of the template template argument
+ TMPL. */
bool
-weakly_subsumes (tree ci, tree tmpl)
+ttp_subsumes (tree ci, tree tmpl)
{
- tree n1 = get_normalized_constraints_from_info (ci, NULL_TREE);
+ tree n1 = get_normalized_constraints_from_info (ci, tmpl);
tree n2 = get_normalized_constraints_from_decl (tmpl);
return subsumes (n1, n2);
extern bool equivalent_constraints (tree, tree);
extern bool equivalently_constrained (tree, tree);
extern bool strictly_subsumes (tree, tree);
-extern bool weakly_subsumes (tree, tree);
+extern bool ttp_subsumes (tree, tree);
extern int more_constrained (tree, tree);
extern bool at_least_as_constrained (tree, tree);
extern bool constraints_equivalent_p (tree, tree);
return false;
}
- return weakly_subsumes (parm_cons, arg);
+ return ttp_subsumes (parm_cons, arg);
}
// Convert a placeholder argument into a binding to the original
--- /dev/null
+// PR c++/115656
+// { dg-do compile { target c++20 } }
+
+template<class T, class U> concept same_as = __is_same(T, U);
+
+template<same_as<bool> T, template<same_as<bool>> class UU>
+struct A { };
+
+template<same_as<bool>> class B;
+
+A<bool, B> a1;
+A<long, B> a2; // { dg-error "constraint failure" }