The enclosing function has no special access privileges to the private
members of the local class. Of course, the local class could make the enclosing function a friend. More typically, a local class defines its members as public
. The portion of a program that can access a local class is very limited. A local class is already encapsulated within the scope of the function. Further encapsulation through information hiding is often overkill.