title: switch case and enum in C++ error - expression must have a constant value
body: <p>I cannot figure out the issue with this code:</p>
  
  <pre><code>class Class_name{
  public:
      struct handler_struct
      {
          enum state_enum
          {
              Idle = 0,
              StartTX,
              Transmitting,
              TX_Error_SOF
          }state;
      }handler;
  };
  
  switch(Class_name::handler.state)
  {
      case Class_name::handler.Idle:
      {
          break;
      }
  }
  
  </code></pre>
  
  <p>The code works if I move the state enumeration of the struct the way it is defined outside. Can someone tell me what's wrong?</p>