[Development] [API] homogenising pimpled value class copying and moving

Thiago Macieira thiago.macieira at intel.com
Tue May 8 16:12:14 CEST 2012

On terça-feira, 8 de maio de 2012 15.22.55, Marc Mutz wrote:
> I'm also giving each class a move constructor. There, the classes which
> hold  their pimpl in smart pointers create the problem[1] that the move
> ctor cannot be inline. I'm tempted to remove the use of these in favour of
> going back to naked pointers, which allow the move ctor to be inline. Does
> anyone feel very strongly about that?

Between a move constructor and QSharedDataPointer, I'd rather stay with the 
latter. It avoids the manual reference counting, which may include subtle 

An alternative is to use C++11 extern template declarations alongside an 
export macro. It's a solution I had tried and worked in 
QDBusUnixFileDescriptor, using GCC's equivalent C++98 extension.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120508/6a8a2944/attachment.sig>

More information about the Development mailing list