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

André Pönitz apoenitz at t-online.de
Tue Feb 10 23:10:01 CET 2015


On Tue, Feb 10, 2015 at 01:17:25PM -0800, Thiago Macieira wrote:
> On Tuesday 10 February 2015 20:13:12 André Pönitz wrote:
> > On Tue, Feb 10, 2015 at 07:53:23PM +0100, Marc Mutz wrote:
> > > On Tuesday 10 February 2015 17:28:09 Thiago Macieira wrote:
> > > > On Tuesday 10 February 2015 15:34:45 Knoll Lars wrote:
> > > > > +1. I’m ok with us making sure our headers are clean against warnings
> > > > > (if
> > > > > possible), but I don’t see a real need to enforce it’s usage in
> > > > > implementations.
> > > > 
> > > > Fair enough. But how about allowing people to change zeroes to
> > > > Q_NULLPTR?
> > > 
> > > Even more importantly: what about new code?
> > 
> > Can't you simply wait until 'nullptr' is available? Do you really *need*
> > to use macros instead of the core language?
> 
> We go back to the discussion of VS2008. That's the only major compiler we 
> still care about that doesn't support it.

You are inventing a problem that does not exist.

'0' has served well enough as a null pointer constant in the past. There is no
doubt it will do so for a few more years. VS2008 will be not an issue then.

Getting the headers "clean" for the folks that "need" to turn on each and
every possible compiler warning (and then can't stand the heat...) is one
thing. Fine. Let them have Q_NULLPTR in the headers.

But littering the implementation with it and keeping up the claim that
replacing a core C++ idiom by *A MACRO* would be a step to _modernize_ is
completely inapprehensible.

Anyway. I think I should give up here.

Long live the Q_PREPROCESSOR!

Andre'



More information about the Development mailing list