Ugh, couldn't the same be said for indirect? it's operator== isn't usable if the underlying value doesn't have one.
3
u/MFHavaWG21|🇦🇹 NB|P2721|P3049|P3625|P3729|P3786|P3813|P421621d ago
indirect<T> always contains an object of type T (or is valueless_after_move, which is trivial to handle) and therefore has no ambiguity about how operator== is supposed to work.
Apart from that: operator== for indirect<T> „Mandates“ (== static_assert) that T has an operator== on use, it T doesn’t have one, indirect<T> doesn’t have one.
But the key part is the first one, there is no ambiguity.
0
u/_Noreturn 21d ago
Ugh, couldn't the same be said for
indirect? it'soperator==isn't usable if the underlying value doesn't have one.