All challenges
Multiple ChoiceHard 45s

Defaulted spaceship operator semantics detail

For a class with 'auto operator<=>(const C&) const = default;', how does the compiler generate equality comparison?
Options
  1. 1It derives operator== from the ordering category returned by <=>
  2. 2It generates 'operator==' separately by comparing members in declaration order
  3. 3It does not generate operator== at all
  4. 4It generates operator== only if the class has a single member

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle