> On 31 Aug 2020, at 13:55, Giuseppe D'Angelo via Development 
> <[email protected]> wrote:
> 
> Quick question (before Hyrum's law kicks in): qsizetype is currently defined 
> as ptrdiff_t, but is it documented to be so?

It is defined as qint64, which is not always ptrdiff_t. I proposed to Thiago to 
change that, but he has some concerns. As far as I understood, the main issue 
is that ptrdiff_t is long on some platforms and long long on others.

One issue with that is that we traditionally didn’t provide overloads for long 
for methods like QString::number() etc.  
> 
> For instance, is one supposed to print it in printf using %td?

Right not, you need to cast to ptrdiff_t and then use %td.

Cheers,
Lars

_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to