Nested Class Member Access

Joe Buck Joe.Buck@synopsys.COM
Fri Sep 3 21:15:00 GMT 2004


On Fri, Sep 03, 2004 at 08:26:26PM +0200, Giovanni Bajo wrote:
> Steven L. Zook wrote:
> 
> > Is this behavior on GCC's part (that is, nested classes are members of the
> > enclosing class and thus have all access rights that other members have)
> > intentional?
> 
> Yes.
> 
> > If so, should it be documented in the "Extensions to the C++ Language"
> > section of the GCC online documents.
> 
> Not really, because it is actually part of C++0x, so it is not a real
> extension in the traditional term. Instead, I would like to define a new
> language dialect (-std=c++0x) to activate such behavours (that is,
> implementation of DRs which are in WP status). There have been some talk
> about it, but no patches yet.

Speaking of c++0x, I'd dearly like to see an implementation of the "auto"
proposal that Stroustrup has championed, so loops iterating over
containers can be written simply and uniformly as

    for (auto iter = container.begin(); iter != container.end(); ++iter) {
	...;
    }    



More information about the Gcc mailing list