S SearchRSS
< BackHome
Newest questions tagged c++ - Stack Overflow

User-defined operator<=> and user-defined operator== [duplicate]

Consider the following program (demo): #include struct X { std::strong_ordering operator(const X&) const; bool operator==(const X& rightOp) const { return (*this rightOp) == 0; } }; X x1, x2; boo

View original source