title: How to pick up a random value from an enum class?
body: <p>hello,</p>
  <p>Been recently into C++ (C++14 to be precise), and I'me trying to get my way with enums, still have a bit of trouble figuring things out<br />
  Currently, trying to get a random value from an enum class that was constructed as such:</p>
  <pre><code>enum class Niveau {
    #define NIVEAU_DEF(NOM,VALEUR) NOM = VALEUR,
    #include &quot;niveau.def&quot;
    #undef NIVEAU_DEF
  };
  </code></pre>
  <p>And here is the content of &quot;niveau.def&quot;</p>
  <pre><code>NIVEAU_DEF(I, 1)
  NIVEAU_DEF(II, 2)
  ...
  NIVEAU_DEF(IX, 9)
  NIVEAU_DEF(X, 10)
  </code></pre>
  <p>Is it possible to pick up a random one of those enumerations using a method ? Or does this way of constructing an enum doesn't allow it?</p>