Like a member function, a friend function (
[class.friend]) defined
within a nested class is in the lexical scope of that class; it obeys
the same rules for name binding as a static member function of that
class (
[class.static]), but it has no special access rights to
members of an enclosing class
.