[Bug c++/105200] user-defined operator <=> for enumerated types is ignored
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Apr 8 11:31:56 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105200
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If one defines instead say bool operator<(const foo, const foo);
then the built-in candidate isn't considered because of
https://eel.is/c++draft/over.match.oper#3.3
But for the user operator<=> vs. built-in operator<, they don't have the same
operator name, so the built-in operator< is in the candidate set.
More information about the Gcc-bugs
mailing list