title: `const int <variable>` cannot appear in a constant-expression
body: <p>I have the following declarations:</p>
  
  <pre><code>class Rm
  {
  public:
      //defined message types
      static const int HELLO;
  }
  </code></pre>
  
  <p><em>in the cpp file I have:</em> </p>
  
  <p><code>const int Rm::HELLO = 1;</code></p>
  
  <p>But when I try to use this in a method from another class:</p>
  
  <pre><code>int
  Rn::ProcessMessages()
  {
      messagesIter iter = messages.begin();
      while(iter != messages.end())
      {
          switch(iter-&gt;first)
          {
              case Rm::HELLO:
                  myID = iter-&gt;second;
                  break;  
          }
      }
  }
  </code></pre>
  
  <p>I get this:
  <em>error: ‘Rm::HELLO’ cannot appear in a constant-expression case Rm::HELLO:</em></p>
  
  <p>What am I doing wrong?</p>