https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101485

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jan Schultke from comment #5)
> It would surely miss cases like an operator== with an always-defaulted third
> parameter,

That's not valid, operator== must have two parameters.

> or one where the return type is contextually convertible to bool,

Yes, int operator==(E, E) is valid.

> but not exactly bool, or:
> 
> template <std::same_as<E> T>
> bool operator==(T, T) { return false; }

That is valid to declare, but doesn't get called. I think the built-in
candidate is a better match.

Reply via email to