protected d-pointers

Lubos Lunak l.lunak at
Thu Feb 7 14:57:59 GMT 2008

On Thursday 07 of February 2008, Matthias Kretz wrote:
> On Thursday 07 February 2008, Thiago Macieira wrote:
> > Matthias Kretz wrote:
> > >I suggest we require kdelibs classes to only use protected d-pointers so
> > > that the shared-d-pointer pattern can be used when needed. Once we need
> > > to keep BC on Windows we cannot change private members to protected
> > > members anymore. So we can still do this now...
> >
> > Windows mangling of names only applies to symbol names. Member variables
> > are not affected.
> >
> > Changing a private: d to a protected: d_ptr is BC.
> Ah, Thierry told me otherwise. (Possibly a misunderstanding.) If you're
> right and changing member variables is BC on all platforms then you can
> ignore this thread...

 I don't know how it's in practice, but IIRC the standard says that the layout 
is defined only within one access rights group. Well, defined, whatever you 
call it, what I mean is that if you have 'protected: int a; private: int b;' 
in a class, then their order in the class structure in not given.

Lubos Lunak
KDE developer
SUSE LINUX, s.r.o.   e-mail: l.lunak at , l.lunak at
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//

More information about the kde-core-devel mailing list