[Development] QProperty and library coding guide
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Thu Jul 16 22:16:41 CEST 2020
Il 16/07/20 12:43, Volker Hilsheimer ha scritto:
> For pre-C++20 (where it’s possible to have zero-size structs), and for compilers that don’t respect the [[no_unqiue_address]] attribute, all these struct-instances are put into a union. In that case, a class using QProperty will be larger (by the same amount no matter the number of properties) than the same class in Qt 5. With C+++ 20 and compilers that do respect [[no_unique_address]], the size and layout of these classes will be the same.
I'm not fully understanding this last part -- does changing compiler
break ABI, because the implementation of properties change (from an
union to [[no_unique_address]] members)?
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/20200716/31b37fa8/attachment-0001.bin>
More information about the Development
mailing list