[Development] Notes from the Containers session from QtCS
Nils Jeisecke
njeisecke at saltation.de
Mon Jun 25 16:26:34 CEST 2012
Hi,
>> I assume that classes using a QSharedDataPointer are movable, correct?
> Yes, but we have to mark them each as such.
I meant "are candidates for marking as movable" ;-)
> Yes, but I'm afraid of that recommendation in our docs. It may be read and
> used by people who don't know exactly what movable is and their types aren't
> movable.
I think that people who care about QSharedDataPointer for optimizing
stuff should be able to understand the implications.
What about something like this:
"If your data class uses a
QSharedDataPointer/QExplicitlySharedDataPointer as the only member you
should consider marking your data class as a movable type (link to
Q_DECLARE_TYPEINFO) in order to improve performance when using Qt's
container classes."
Nils
More information about the Development
mailing list