title: How to know underlying type of class enum?
body: <p>I have a variable declared as:</p>
  
  <pre><code>enum class FooEnum: uint64_t {}
  </code></pre>
  
  <p>and I would like to cast to its base-type, but I don't want to hardcode the base-type. For instance, something like this:</p>
  
  <pre><code>FooEnum myEnum;
  uint64_t * intPointer = (underlying_typeof(myEnum))&amp;myEnum;
  </code></pre>
  
  <p>Is this possible?</p>