DRAFT document on coding conventions in kde libraries
Kuba Ober
kuba at mareimbrium.org
Wed Mar 8 13:19:21 GMT 2006
On Monday 06 March 2006 10:40, you wrote:
> Kuba Ober wrote:
> >QAtomic does not implement a copy constructor and operator= that
> >would do the right thing?! Maybe then one should have KAtomic that
> >would be more sane to use . . . Is there a good reason for QAtomic
> >to be broken like that (if that's indeed the case)?
>
> You should take a look at qAtomicAssign first.
>
> It's not possible to do what you're describing with a copy constructor or
> operator=.
You're right, with the current implementation that's the necessary evil.
Couldn't there be a template pointer class that does the right thing on
assignment, though? After all, if the instance of such a pointer class was a
member of the implicitly shared class, its copy constructor and/or operator=
would be used correctly, or was there a special reason for not doing it that
way?
Cheers, Kuba
More information about the kde-core-devel
mailing list