What is 3-way comparison?
Show answer and explanation
The three-way operator <=> returns an ordering category such as strong, weak, or partial ordering. A defaulted comparison can synthesize lexicographic member comparison and supports rewritten relational operators, while == generation follows its own standard rules.
The three-way operator <=> returns an ordering category such as strong, weak, or partial ordering. A defaulted comparison can synthesize lexicographic member comparison and supports rewritten relational operators, while == generation follows its own standard rules.
Connect the conclusion directly to the type, lifetime, ownership, overload-resolution rule, or library contract present in the question. State implementation dependence or a violated precondition explicitly instead of merely guessing output.