[Development] Upgrading the sources to C++11 keywords (Q_NULLPTR, etc.)

Matthew Woehlke mw_triad at users.sourceforge.net
Tue Feb 10 23:40:14 CET 2015

On 2015-02-09 15:30, André Pönitz wrote:
> Will you propose to use 'auto' instead of 'int' whenever it compiles?
> Just because 'auto' *sometimes* makes sense?

Personally, I'm a fan of AAA :-). However that's not an option for Qt
because there is no reasonable way to use it while still supporting
C++98. Ergo, comparing 'auto' to Q_NULLPTR is apples and oranges.

That said, I'm also a fan of using nullptr everywhere... and Q_NULLPTR
*does* allow using it when possible while still being C++98 compatible.

(Yes, *everywhere*. IMHO, '0' as a null pointer constant is an
anachronism that can and should be avoided in modern code. I would
happily enforce a rule to that effect.)


More information about the Development mailing list