[Patch] fro kdelibs/kdecore
Nicolas Goutte
nicolasg at snafu.de
Thu Oct 20 07:52:25 BST 2005
On Thursday 20 October 2005 08:01, Thomas Braxton wrote:
> On Thursday 20 October 2005 12:51 am, Thiago Macieira wrote:
> > Thiago Macieira wrote:
> > >Christian Ehrlicher wrote:
> > >>Here a patch to compile kdecore/kdelibs with msvc.net
> > >>- change some 'class Private' to 'struct Private' because the private
> > >>vars are defined in a struct and not a class
> > >
> > >This doesn't make sense. Why should they be moved to a struct?
> >
> > Oops, never mind. I've just noticed that the .cpp in trunk changed:
> > class KAboutDataPrivate
> > to
> > struct KAboutData::Private
> >
> > The .cpp should be changed to class and a public: be added. Everything
> > else uses "class".
>
> If I remember correctly in C++ a struct is just a class that defaults to
> public access, instead of private access. At least this is how g++ treats
> them.
But in a struct you cannot have member functions, not even a constructor and a
destructor (as far as I know).
So personally I would prefer a "class" solution (which KDE always used until
it was changed in kdelibs, apparently for MSVC-support).
Have a nice day!
More information about the kde-core-devel
mailing list