title: Enumerate over an enum in C++
body: <p>In C++, Is it possible to enumerate over an enum (either runtime or compile time (preferred)) and call functions/generate code for each iteration?</p>
  
  <p>Sample use case:</p>
  
  <pre><code>enum abc
  {    
      start
      a,
      b,
      c,
      end
  }    
  for each (__enum__member__ in abc)
  {    
      function_call(__enum__member__);    
  }
  </code></pre>
  
  <hr>
  
  <p>Plausible duplicates:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/261963/c-iterate-through-an-enum">C++: Iterate through an enum</a></li>
  <li><a href="https://stackoverflow.com/questions/300592/enum-in-c-like-enum-in-ada">Enum in C++ like Enum in Ada?</a></li>
  </ul>