Private inheritance hides base class with "inaccessible within this context" error
<p>I'm having a problem similar to that described in the following link where a privately inherited base class gives an "inaccessible within this context" error when I try to declare a member of the base class inside the derived class:
<a href="http://bytes.com/topic/c/answers/164246-private-inheritance-renders-class-inaccessible">http://bytes.com/topic/c/answers/164246-private-inheritance-renders-class-inaccessible</a></p>

<p>Explicitly referencing X with ::X works in the above case, but what if the code is in a function such as:</p>

<pre><code>void fooby()
{
    class X {};

    class Y : private X {};

    class Z : public Y
    {
    public:
        X x; // compiler "inaccessible within this context" error
    };
};
</code></pre>

<p>How do you reference X in this case?</p>

<p>If fooby were a struct/class, then ::fooby::X would work, but I'm not sure how to do it in the case above.</p>
