I have an outer class A. It has a method A::fun. In this method, it has a local or inner class B. My question is: Is B a friend of A?
I think it is not. Is it right? If so, I think let class B a friend of A is very beneficial since B can access to A's private and protected members. And moreover, sinceB is local in a methods, it is not accessible by others and thus safe as a friend of A. How to work around to let B access to A's private and protected members?