title: How to std::map<enum class, std::string>?
body: <p>I am trying to std::map, with an enum class and a std::string but I am getting some error.
  I am using gcc 4.4.7 with -std=c++0x (this is fixed)</p>
  
  <p>At .h file:</p>
  
  <pre><code>enum class state_t{
      unknown,
      off,
      on,
      fault
  };
  
  typedef std::map&lt;state_t,std::string&gt; statemap_t;
  </code></pre>
  
  <p>At .cpp file:</p>
  
  <pre><code>statemap_t state={
     {state_t::unknown,"unknown"}
     {state_t::off,"off"}
     {state_t::on,"on"}
     {state_t::fault,"fault"}
  }
  </code></pre>
  
  <p>The method to allow a state transitionis like:</p>
  
  <pre><code>Foo::allowStateChange(const state_t localState, const state_t globalState, const state_t newState){
      //Some code to verify if the state transition is allowed.
      std::cout &lt;&lt; "Device Local State:" &lt;&lt; state.find(localState)-&gt;second &lt;&lt; "Device Global State:" &lt;&lt; state.find(globalState)-&gt;second &lt;&lt; "Device New State:" &lt;&lt; state.find(newState)-&gt;second &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>When compilling, I get next error:
  error: invalid operands of types 'state_t' and 'state_t' to binary 'operator&lt;' </p>
  
  <p>If I change the <code>enum class state_t</code> to <code>enum state_t</code> it works. 
  Is there any way to find in the map with an enum class?</p>
  
  <p>Thanks in advance.</p>