The concept equality_comparable_with<T, U>
is intended to declare that objects of type T
and U
can be compared equal to each other, and if they are, then this has the expected meaning. That's fine.
However, this concept also requires common_reference_t<T&, U&>
to exist. The primary impetus for common_reference
and its attendant functionality seems to be to enable proxy iterators, to have a place to represent the relationship between reference
and value_type
for such iterators.
That's great, but... what does that have to do with testing if a T
and a U
can be compared equal to one another? Why does the standard require that T
and U
have a common reference relationship just to allow you to compare them equal?
This creates oddball situations where it's very difficult to have two types which don't reasonably have a common-reference relationship that are logically comparable. For example, vector<int>
and pmr::vector<int>
logically ought to be comparable. But they can't be because there's no reasonable common-reference between the two otherwise unrelated types.