title: Is it possible to determine the number of elements of a c++ enum class?
body: <p>Is it possible to determine the cardinality of a c++ <code>enum class</code>:</p>
  
  <pre><code>enum class Example { A, B, C, D, E };
  </code></pre>
  
  <p>I tried to use <code>sizeof</code>, however, it returns the size of an enum element.</p>
  
  <pre><code>sizeof(Example); // Returns 4 (on my architecture)
  </code></pre>
  
  <p>Is there a standard way to get the cardinality (5 in my example) ?</p>