A nested class is a member and as such has the same access rights as any other member.
The members of an enclosing class have no special access to members of a nested
class; the usual access rules ([class.access]) shall be obeyed.
[Example 1:βclass E {int x;
class B {};
class I {
B b; // OK, Eβ::βI can access Eβ::βBint y;
void f(E* p, int i){
p->x = i; // OK, Eβ::βI can access Eβ::βx}};
int g(I* p){return p->y; // error: Iβ::βy is private}};
β end example]