All challenges
Multiple ChoiceIntermediate 45s

Mandatory copy elision cases

In which case is copy elision guaranteed (not merely permitted) since C++17?
Options
  1. 1Passing a named local by value to a function
  2. 2Returning a named local variable by value
  3. 3Assigning a temporary to an existing object
  4. 4Initializing an object from a prvalue of the same type

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