Does the new C++20 spaceship operator allow a concise way of expressing short-circuited multiple-criteria comparison? Something better than this:
const firstCriteriaComparisonResult = lhs.x <=> rhs.x;
return firstCriteriaComparisonResult != 0 ? firstCriteriaComparisonResult : lhs.y <=> rhs.y;
operator<=>()
member must be a template function (templated on RHS type) then it must be written by hand. Template opeators cannot be= default
ed. Re comment 2: there are no "normal comparison overloads" and there never were. Comparison overloading has always been a mess, and the three-way compare operator was added to the language precisely to address this issue. – Comb