title: Understanding static initialization
body: <p>I wrote this code:</p>
  
  <pre><code>#include &lt;cstdlib&gt; 
  #include &lt;iostream&gt;
  #include &lt;stdio.h&gt;
  
  constexpr int foo(int a, int b)
  {
      return a*b;
  }
  
  int bar(int a, int b)
  {
      return a*b;
  }
  
  int a = bar(1,2); // Dynamic initialization. This brace-or-equal initializer 
                    // contains expression which is not a constant expression
  int main()
  { 
      a = foo(3,4); // Constexpr function invocation. Static initialization.
      std::cout &lt;&lt; a; // 12
  }
  </code></pre>
  
  <p>This program outputs <code>12</code>. I expected that <code>2</code> will be outputted. Because every Static Initialization is performed before Dynamic Initialization. I'm confused.</p>