This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Enough already with the KDE bug!


Martin von Loewis writes:
 > > Paragraph one of [class.local] says
 > > 
 > > 	Declarations in a local class can use only type names,
 > > 	static variables, extern variables and functions, and
 > > 	enumerators from the enclosing scope.
 > > 
 > > The name 'i' is none of these.
 > 
 > No, but it isn't from the enclosing scope, either. This is a
 > restriction on the names from the enclosing scope, not on access to
 > names in general.

Yes it is in the enclosing scope. The enclosing scope consists of
all the names that are visible there. It is not only the new names
that are declared within that block. Look at the example in
[class.local] paragraph one, with respect to ::x.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]