title: Why a simple mention of base pointer/reference in subsequent privately derived classes is forbidden?
body: <pre><code>struct B {};
  struct D : private B {
    B* fun () { return new D; }  // ok
  }
  struct DD : public D {
    B* foo () { return 0; } // error: ‘struct B B::B’ is inaccessible !
  };
  </code></pre>
  
  <p>This error seems unreasonable to me. If we can use simple <code>B*</code> in global scope then why not in its privately derived classes? <a href="http://ideone.com/ZFJdQU" rel="nofollow noreferrer">g++ demo</a>.</p>
  
  <p>We are Not trying to convert <code>DD*</code> to <code>B*</code>, which is forbidden by the language rules (<a href="https://stackoverflow.com/questions/9661936/inheritance-a-is-an-inaccessible-base-of-b">this</a>, <a href="https://stackoverflow.com/questions/4847100/c-inheritance-inaccessible-base">this</a>, <a href="https://stackoverflow.com/questions/3674876/why-is-this-not-allowed-in-c">this</a> are related questions).<br>
  Note that, if I change <code>B* foo()</code> to <code>int foo()</code>, things go fine.</p>