This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Type access control -- now too strict
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