This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21901] Nested class has access to Nestee's private member functions
- From: "mhcox at bluezoosoftware dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jun 2005 17:20:49 -0000
- Subject: [Bug c++/21901] Nested class has access to Nestee's private member functions
- References: <20050603145948.21901.mhcox@bluezoosoftware.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From mhcox at bluezoosoftware dot com 2005-06-04 17:20 -------
>From my copy of the C++ standard (ISO/IEC 14882:1998(E)) [class.access.net]
11.8.1:
The members of a nested class have no special access to members of an
enclosing class, nor to classes or
functions that have granted friendship to an enclosing class; the
usual access rules (clause 11) shall be
Obeyed. The members of an enclosing class have no special access to
members of a nested class; the usual
Access rules (clause 11) shall be obeyed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21901