title: Understanding the §11.2-4 from N3690 draft
body: <p>In C++ N3690 draft.</p>
  
  <blockquote>
    <p>A base class B of N is accessible at R, if</p>
    
    <ul>
    <li>an invented public member of B would be a public member of N, or</li>
    <li><strong>R occurs in a member or friend of class N</strong>, and an invented public member of B would be a private or protected member of N, or</li>
    <li>R occurs in a member or friend of a class P derived from N, and an invented public member of B would be a private or protected member of
    P, or</li>
    <li>there exists a class S such that B is a base class of S accessible at R and S is a base class of N accessible at R.</li>
    </ul>
  </blockquote>
  
  <p>Can someone provide me a code for the above statement ?</p>
  
  <p>I tried doing like this.</p>
  
  <pre><code>class B {
  public:
      int m;
  };
  
  class S: private B {
      N r;
  };
  
  class N: private S {
      void f() {
          B* p = this;
      }
  };
  
  int main()
  {
      return 0;
  }
  </code></pre>