Multiple ChoiceHard 45s
std::atomic_ref Requirements
What is a key requirement for using std::atomic_ref<T>?
Options
- 1The object must be heap-allocated so its address stays stable for the atomic_ref's lifetime
- 2The object must be declared volatile so accesses are not optimized away by the compiler
- 3T must be a pointer type, since only pointer references can be made atomic this way
- 4T must be trivially copyable and the referenced object must be suitably aligned
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.