title: static global std::unique_ptr disappears
body: <p>I probably misunderstood how static objects work. Suppose following</p>
  
  <p>common.hpp</p>
  
  <pre><code>struct common {};
  static std::unique_ptr&lt;common&gt; global_ptr;
  </code></pre>
  
  <p>foo.cpp</p>
  
  <pre><code>#include "common.hpp"
  void bar();
  int main()
  {
      global_ptr = std::make_unique&lt;common&gt;();
      bar();
  }
  </code></pre>
  
  <p>bar.cpp</p>
  
  <pre><code>#include "common.hpp"
  void bar()
  {
      *global_ptr; // crashes, because global_ptr is empty
  }
  </code></pre>
  
  <p>I am able to debug such situation, and <code>&amp;global_ptr</code> is different in <code>main()</code> and <code>bar()</code>, why is that? <code>global_ptr</code> is definitely initialized in <code>main()</code>, I can use it without problem, but why <code>global_ptr</code> in <code>bar()</code> seems unitialized?</p>