template<class T, class U>
concept weakly-equality-comparable-with = // exposition only
requires(const remove_reference_t<T>& t,
const remove_reference_t<U>& u) {
{ t == u } -> boolean-testable;
{ t != u } -> boolean-testable;
{ u == t } -> boolean-testable;
{ u != t } -> boolean-testable;
};
template<class T, class U>
concept equality_comparable_with =
equality_comparable<T> && equality_comparable<U> &&
common_reference_with<const remove_reference_t<T>&, const remove_reference_t<U>&> &&
equality_comparable<
common_reference_t<
const remove_reference_t<T>&,
const remove_reference_t<U>&>> &&
weakly-equality-comparable-with<T, U>;
common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>T and U model equality_comparable_with<T, U> only if bool(t == u) == bool(C(t) == C(u)).