Type access control -- now too strict

Alexandre Oliva oliva@lsd.ic.unicamp.br
Sat Apr 1 00:00:00 GMT 2000


On Feb 23, 2000, Chip Salzenberg <chip@valinux.com> wrote:

> According to Alexandre Oliva:
>> On Feb 23, 2000, Chip Salzenberg <chip@valinux.com> wrote:
>> > Apparently it's now impossible to define static data of private type
>> > if that private type has a constructor.
>> >     class B { B(int) {} };
>> [snip]
>> > A::B A::b(1);
>> 
>> Particularly when the type's constructor is private :-)

> Ah, but that should work anyway, because A is an implicit friend of B.

I can't find any wording that supports this claim in the Standard.
Core Issue #45 suggests that the nested type should be a friend of the
enclosing class, but not the converse.

-- 
Alexandre Oliva     http://www.ic.unicamp.br/~oliva/     Enjoy Guaraná
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me



More information about the Libstdc++ mailing list