Solving the Static Initialization Order Fiasco
Get introduced to the static initialization order fiasco and learn how to solve it.
According to the FAQ at isocpp.org, the static initialization order fiasco is “a subtle way to crash your program”. The FAQ continues: “The static initialization order problem is a very subtle and commonly misunderstood aspect of C++.”
Before I continue, I want to make a short disclaimer. Dependencies on variables with static storage duration (short statics) in different
Static initialization order fiasco
Static variables in one translation unit are initialized according to their definition order.
In contrast, the initialization of static variables between ...