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: http://bytes.com/topic/c/answers/164246-private-inheritance-renders-class-inaccessible
Explicitly referencing X with ::X works in the above case, but what if the code is in a function such as:
void fooby()
{
class X {};
class Y : private X {};
class Z : public Y
{
public:
X x; // compiler "inaccessible within this context" error
};
};
How do you reference X in this case?
If fooby were a struct/class, then ::fooby::X would work, but I'm not sure how to do it in the case above.