Nested Class Member Access

Florian Weimer fw@deneb.enyo.de
Thu Sep 2 19:22:00 GMT 2004


* 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>



More information about the Gcc mailing list