title: Switch Statements with strongly typed enumerations
body: <p>When using strongly typed enums in a switch statement is there a way to avoid explicit casts to <code>int</code>?</p>
  
  <pre><code>/// @desc an enumeration of the states that the session can be in.
  enum class State
  {
      Created,    
      Connected,  
      Active,
      Closed
  };
  
  State sesState = session-&gt;GetState();
  
  switch (static_cast&lt;int&gt;(sesState))
  {
      case static_cast&lt;int&gt;(Session::State::Created):
      // do stuff.
      break;
  
      case static_cast&lt;int&gt;(Session::State::Connected):
      // do stuff.
      break;
  }
  </code></pre>
  
  <p>From the n3242 draft:</p>
  
  <p>6.4.2 The switch statement [stmt.switch]</p>
  
  <p>2 The condition shall be of integral type, <strong>enumeration type</strong>, or of a class type for which a single non-explicit conversion function to integral or enumeration type exists (12.3).</p>
  
  <p>Does <strong>enumeration type</strong> include strongly typed enums or are they incompatible with <code>switch</code> statements because they require an explicit conversion to <code>int</code>?</p>