Affected subclause: [temp.constr]
Change: Some atomic constraints become fold expanded constraints
. Rationale: Permit the subsumption of fold expressions
. Effect on original feature: Valid C++ 2023 code may become ill-formed
. [
Example 1:
template <typename ...V> struct A;
struct S {
static constexpr int compare(const S&) { return 1; }
};
template <typename ...T, typename ...U>
void f(A<T ...> *, A<U ...> *)
requires (T::compare(U{}) && ...);
void g(A<S, S> *ap) {
f(ap, ap);
}
—
end example]