title: Can an enum class be converted to the underlying type?
body: <p>Is there a way to convert an <code>enum class</code> field to the underlying type? I thought this would be automatic, but apparently not.</p>
  
  <pre><code>enum class my_fields : unsigned { field = 1 };
  
  unsigned a = my_fields::field;
  </code></pre>
  
  <p>That assignment is being rejected by GCC. <code>error: cannot convert 'my_fields' to 'unsigned int' in assignment</code>.</p>