Consider:
class C {
private:
class T {int a, b;};
};
C::T *p;
As expected, this produces a compilation error saying that C::T is private in the context of Line 6.
Now change this to pointer-to-member:
class C {
private:
class T {int a, b;};
};
int C::T::*p;
This time around, gcc version 3.2.3 still makes the same complaint, but gcc version 3.4.3 lets it pass. Which is the correct behavior according to the standard?