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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[gcc10] Invalid operator==  |Invalid operator==
                   |(returning non-bool type)   |(returning non-bool type)
                   |candidate                   |candidate

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Started to be rejected with r277865 which implements operator<=>, and I think
the compiler is correct to reject it.

For (*b == *d) the arguments do not match Base::operator==(const Base&)
exactly, so the compiler tries a synthesized operator with reversed arguments,
which is ill-formed because of the bad return type.

Reply via email to