title: How can I ensure that global variables are initialized in the correct order?
body: <p>I have global variables whose constructors rely on other global variables in different translation units. My understanding is that the order of initialization of global variables is unspecified, so this isn't safe.</p>
  
  <p>How can I ensure that the globals I need will be initialized at the latest when they are first accessed? For instance, if I create a static variable in a function and call that function to get a reference, will it always be initialized the first time the function is executed?</p>