title: Is modify const in constructor C++ standard?
body: <p>Is modify const in constructor C++ standard? I was modifying my <code>struct</code> removing fixed-values(default member initializer) to set it later, at constructor-time but I forget to remove <code>const</code> keyword and noticied it later. To my surprise I didn't get a compile-error, it just worked fine but for test case 2 it give a compiler. How are they different?</p>
  
  <p><strong>test case 1:</strong></p>
  
  <pre><code>struct A
  {
      const int x = 2;
  
      A()
          : x(3)
      {
      }
  };
  </code></pre>
  
  <p><strong>test case 2:</strong></p>
  
  <pre><code>struct A
  {
      const int x = 2;
  
      A()
      {
             x = 3; // compile error!  error: read-only variable is not assignable
      }
  };
  </code></pre>