[Development] Move assignment without move constructors
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Mon May 23 18:25:14 CEST 2016
Il 23/05/2016 18:11, Konstantin Tokarev ha scritto:
> Hello,
>
> I've stumbled upon QPixmap having operator=(QPixmap&&) but missing QPixmap(QPixmap&&), however it seems like there are a lot of Qt classes in the same situation, for example:
>
[snip]
> Is there any good reason for these classes to not have move constructor, or is it just an unfortunate omission?
Because the implementation of a move constructor for those classes
requires the private class to be defined in the public header, but all
those classes are pimpl'd, so by definition you don't have that private
class available.
Cf. the "Move ctors for q_declare_shared types" thread we had some time
ago, and https://codereview.qt-project.org/#/c/115213/ .
Cheers,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4007 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160523/3b7a1920/attachment.bin>
More information about the Development
mailing list