[Development] Is qsizetype *documented* to be ptrdiff_t?
thiago.macieira at intel.com
Thu Sep 3 16:27:45 CEST 2020
On Thursday, 3 September 2020 04:14:06 PDT Giuseppe D'Angelo via Development
> Interestingly enough, QDataStream is defined in terms of qintXX types
> (and it's missing long), QTextStream in terms of native datatypes (and
> has them all).
Intentionally! Because long changes size across platforms. So you must choose
whether to encode your value as 32-bit or as 64-bit, explicitly.
Note that this now applies to qsizetype and we don't have the same protection.
You must choose the size and the compiler won't tell you if you forgot.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel DPG Cloud Engineering
More information about the Development