local class and scoping

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Thu Feb 24 14:07:00 GMT 2000

>  I' not sure if any of this is legal c++, but i think that either both
> or none of the above should work, since they are doing exactly the same
> thing.

Thanks for your bug report. The mainline compiler (2.96 20000223
(experimental)) accepts both variants. The wording in ISO 14882 says
it should reject both codes, however, Core Issue 142 says that nested
classes are friends of the enclosing class. g++ implements the
proposed resolution of Issue 142, at least in the development branch.


More information about the Gcc mailing list