Multiple ChoiceIntermediate 45s
inline variables C++17
What problem do C++17 `inline` variables solve?
Options
- 1They force the variable to be kept in a CPU register for the whole duration of the program.
- 2They let a variable (e.g. a static data member or header constant) be defined in a header without ODR/linker duplicate-symbol errors.
- 3They make every read and write of the variable atomic, removing the need for any synchronization.
- 4They eliminate the need for constexpr entirely, since inline implies compile-time evaluation.
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.