Nested and member function local classes are actually implicitly friends of the containing class. Not all compilers were conforming in this area though.