title: Weird SIGSEGV (Segmentation fault) using enums
body: <p>I'm currently getting a very wierd SIGSEGV (Segmentation fault), not using any pointers that is, just enums; this is my code:</p>
  
  <pre><code>typedef enum 
  {
      LIGHT,
      DARK,
      NONE
  } Color;
  
  class Board
  {
      public:
          Color toMove();
      private:
          Color side;
  };
  </code></pre>
  
  <p>and the implementation is:</p>
  
  <pre><code>Color Board::toMove()
  {
      return side;
  }
  </code></pre>
  
  <p>And I'm simply calling <code>toMove();</code> with results in the segmentation fault; here's gdb output:</p>
  
  <pre><code>Program received signal SIGSEGV, Segmentation fault.
  0x004025ee in Board::toMove (this=0x0)
      at ...\board.cpp:19
  19          return side;
  </code></pre>
  
  <p>Anyone got an idea?</p>