All challenges
Multiple ChoiceBeginner 45s

Function-Local Static Initialization Guard

Since C++11, initialization of a function-local static variable is:
Options
  1. 1Unspecified, so concurrent first calls may race on the partial object
  2. 2Thread-safe; concurrent first calls synchronize on completion
  3. 3Made constexpr only, forcing the initializing expression to be constant
  4. 4Guarded only if the initialized type is trivial, no guard otherwise

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