[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 10:12:41 GMT 2022


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The reason why g++ selects the built-in https://eel.is/c++draft/over.built#15
operator over the user supplied spaceship candidate is the
https://eel.is/c++draft/over.match.best#general-2.8 rule, that candidate is
rewritten while the builtin one is not.
What rule do you think would make the rewritten candidate better than the
built-in?


More information about the Gcc-bugs mailing list