[Development] Is qsizetype *documented* to be ptrdiff_t?

Thiago Macieira thiago.macieira at intel.com
Thu Sep 3 16:25:14 CEST 2020


On Wednesday, 2 September 2020 23:54:35 PDT Lars Knoll wrote:
> I think we have long in most of the important places today. I agree that
> adding long to the overload set is somewhat annoying, but it could be an
> inline method mapping to QIntegerForSize<sizeof(long)>::type.
> 
> Has anybody ever looked how many places we would actually have problems with
> that? I doubt it’s that many.

That's adding support for long without changing QIntegerForSize, which in turn 
defines what qsizetype is. As I said, I oppose qint64 and qsizetype not being 
the same type on 64-bit platforms.

If we change this, then our overload set goes from typedefs to the basic ones: 
int, long and long long. Don't use int64_t or size_t or qint64 or qsizetype.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Development mailing list