title: C++11 enum class instantiation
body: <p>I've encountered the following form of enum class variable instantiation and it is compiling without any warning or error under VS2012:</p>
  
  <pre><code>UINT32 id;
  enum class X {apple, pear, orange};
  X myX = X(id);
  </code></pre>
  
  <p>Moreover, sending <code>X(id)</code> as an argument to a function expecting X type param compiled as well.
  I'm not sure if the result is always correct or it's just a strange compiler behavior.</p>
  
  <p>However, trying to do <code>X myX(id);</code> instead of the above resulted in compilation error:</p>
  
  <blockquote>
    <blockquote>
      <p>error C2440: 'initializing' : cannot convert from 'UINT32' to 'X'.
      Conversion to enumeration type requires an explicit cast (static_cast,C-style cast or function-style cast).</p>
    </blockquote>
  </blockquote>
  
  <p>Reading the C++11 standard didn't help me to understand.
  So I have 2 questions on this subject:</p>
  
  <ol>
  <li>Is it possible to construct an enum class object with integral type as a parameter?</li>
  <li>If 1 is true, why <code>X myX(id)</code> doesn't work?</li>
  </ol>