[Development] Out of line move constructors
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Tue Sep 15 01:16:04 CEST 2020
Il 14/09/20 23:48, Thiago Macieira ha scritto:
> It's not inline, it's because you didn't define it.
>
> To use the extern in the header, you need to add the definition to the .cpp,
> after the Private class was defined. That effectively means repeating the body
> of the destructor we extern'ed. So we'd probably need a macro to ensure that.
As commented on the patch, this part of the story that eventually led to
the design of QIntrusiveSharedDataPointer -- the previous incantations
featured macros and the like, and the commit message talked about
trouble in the presence of exported symbols, but I'm not sure what it
was referring to. Does anyone remember? If it's no longer an issue, is
pinning the smart pointer dtor the way we want to go? How to make it
into a public API so that it's not just a Qt-specific trick? (After all,
the smart pointers in question have public APIs)
Thanks,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200915/4021d2b0/attachment-0001.bin>
More information about the Development
mailing list