Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2022-05-22 15:13:35


Andrey Semashev wrote:
> On May 22, 2022 3:59:33 AM Peter Dimov via Boost <boost_at_[hidden]>
> wrote:
>
> > Compilers apparently are warning on the use of 0 as a null pointer
> > constant, suggesting we use nullptr instead. But compilers don't know
> > that we support C++03 where nullptr isn't a thing.
> >
> > Case in point: https://github.com/boostorg/throw_exception/pull/22
> >
> > ifdef-ing every use of nullptr is unwieldy, so maybe we need
> > BOOST_NULLPTR added to Boost.Config? That would expand to nullptr
> when
> > it's supported, and 0 otherwise.
>
> I'd replace 0 with NULL. If the compiler keeps complaining report a compiler
> bug and suppress the warning with a pragma.

No thanks.

I did however not know that GCC doesn't warn on NULL. Interesting
compromise, even though I don't quite see the point of it.

Clang does warn on NULL, however.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk