title: Using const int variable in switch statement
body: <p>I am using gcc with the -std=c++11 flag. In my class definition I have the following:</p>
  
  <pre><code>private:
     const int   January     = 1,
                 February    = 2,
                 March       = 3,
                 ...
  </code></pre>
  
  <p>In my implementation I have a switch statement.</p>
  
  <pre><code>switch (currentMonth)
  {
     case January:
        returnString = "January";
        break;
     case February:
        returnString = "February";
        break;
     case March:
        returnString = "March";
        break;
     ...
  </code></pre>
  
  <p>This seems like it should work since the months are constant; however, gcc gives me</p>
  
  <pre><code>calendar.cpp:116:12: error: ‘this’ is not a constant expression
  </code></pre>
  
  <p>on each case of the switch statement..Why is this wrong?</p>