All challenges
Multiple ChoiceIntermediate 45s

constinit Definition Meaning

What does declaring a variable with `constinit` ensure?
Options
  1. 1It is const and cannot be modified anywhere after its static initialization runs
  2. 2It is thread_local, giving each thread its own statically initialized instance
  3. 3It has static initialization (no dynamic init), but remains mutable unless also const
  4. 4It is evaluated at runtime on each call rather than during static initialization

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