All challenges
Multiple ChoiceBeginner 45s

reference_wrapper vs raw reference

What does std::reference_wrapper<T> mainly provide over a plain T&?
Options
  1. 1It is copyable and assignable, usable in standard containers
  2. 2It extends the lifetime of the referred object
  3. 3It converts to T by implicit dereference automatically
  4. 4It prevents the reference from dangling

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