Multiple ChoiceBeginner 45s
Structured bindings and reference semantics
When you write 'auto [a, b] = pairValue;' where pairValue is an lvalue std::pair, what do a and b bind to?
Options
- 1References to the original members of pairValue, so writes through a and b affect the pair
- 2Rvalue references to temporary copies of the members, extended for the scope of a and b
- 3Pointers to the members of pairValue, which must be dereferenced before they can be read
- 4Copies of the members (a new hidden object is created and members name into it)
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.