This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Nested Class Member Access
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: "Steven L. Zook" <SLZook at Qualstar dot com>
- Cc: "GCC Mailing List \(E-mail\)" <gcc at gcc dot gnu dot org>
- Date: Thu, 02 Sep 2004 21:22:43 +0200
- Subject: Re: Nested Class Member Access
- References: <9E27B4AB55478346B9F7848926E49B7F4F7015@exchange1.qualstar.com>
* Steven L. Zook:
> According to ISO/IEC 14882-2003 (is this the correct standard for
> GCC?) 11.8.1 [class.access.nest], I believe this should be an
> error. The paragraph says that nested classes have no special access
> rights to enclosing class members. Since cOuter::Variable is
> private, cOuter::cInner::Function should not have access to it.
Your are correct that your example is not valid C++, but this may
change:
<http://ra.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html#45>