All challenges
Multiple ChoiceBeginner 45s

Copy-and-swap idiom purpose

What does the copy-and-swap idiom primarily provide for an assignment operator?
Options
  1. 1Faster copies via a memcpy of the temporary storage
  2. 2Elimination of the destructor since swap owns resources
  3. 3Strong exception safety and self-assignment safety
  4. 4Automatic move assignment deduced for by-value parameters

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