https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123387
Bug ID: 123387
Summary: deleted spaceship not used as best overload over
builtin releational operators
Product: gcc
Version: 15.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Hi,
the following code should select the deleted spaceship operator and compilation
should fail, but it compiles without errors (tested with x86-64 gcc 15.2 /
std=c++20 on godbolt.org)
***************************************************************
#include <compare>
enum E{ a };
std::partial_ordering operator<=> (E l, E r) = delete;
bool test_1() {
return a <= a; // <- error expected
}