title: Default enum visibility in C++
body: <p>I have a class that looks like this:</p>
  
  <pre><code>namespace R 
  {
  class R_Class 
  {
     enum R_Enum
     {
         R_val1,
         R_val2,
         R_val3
     }
  private:
     // some private stuff
  public: 
    // some public stuff
  }
  }
  </code></pre>
  
  <p>I'm performing unit testing using an automated test tool. The compiler claims that my test harness cannot access the type R::R_Class::R_Enum. </p>
  
  <p>I have no trouble accessing the values within a similar class that is defined as such:</p>
  
  <pre><code>namespace S
  {
  class S_Class
  {
  public:
     enum S_Enum
     {
         S_val1,
         S_val2,
         S_val3
     }
  }
  private:
     // some private stuff
  public: 
    // some public stuff
  }
  </code></pre>
  
  <p>Do enums in C++ need to be given explicit visibility directives? If not given any, do they default to private? protected?</p>