[Development] 0 vs. NULL

Welbourne Edward edward.welbourne at theqtcompany.com
Thu Oct 8 13:12:35 CEST 2015


>>> Did I simply hit a "feature" Qt won't ever encounter because it
>>> doesn't use C (nor va_arg)?

is what I was referring back to when I said:

>> Well, it's nice to hear we don't use var-args. 

Perhaps I misunderstood !  I'm relatively new to Qt myself.
On grep-ing code, I see we do in fact use var-args in some places.
I do think it is prudent to keep var-args usage to a minimum, though.

>>[...] overloading-by-signature: passing 0 might not
>> get you the overload that has a pointer as that parameter, [...]

> I think I've already run into situations where the compiler
> protected me from that situation by detecting the ambiguity,

I'm not convinced I want to rely on that.
Some compilers might be better at it than others ...

    Eddy.



More information about the Development mailing list