What is `constinit` in C++20?

What does constinit mean? Why was it introduced? In which cases should we use it? Initializing a variable with static storage duration might result in two outcomes¹: The variable is initialized at compile-time (constant-initialization); The variable is initialized the first time control passes through its declaration. Case (2) is problematic because it can lead to … Read more