|
Boost : |
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2022-05-27 15:08:03
On Fri, May 27, 2022 at 4:02 AM Andrey Semashev via Boost <
boost_at_[hidden]> wrote:
> On 5/27/22 05:14, Emil Dotchevski via Boost wrote:
> > On Sun, May 22, 2022 at 3:35 AM Andrey Semashev via Boost <
> > boost_at_[hidden]> wrote:
> >> I'd replace 0 with NULL. If the compiler keeps complaining report a
> >> compiler bug and suppress the warning with a pragma.
> >
> > I'm all for disabling useless warnings, but then you can leave 0 in the
> > code and not bother with NULL. What are you, a C programmer? :)
>
> It *is* a useless warning. The code with NULL is explicit enough and
> portable, so what is this warning about? That the code is not
> C++11-only? I know that, and it's not up to the compiler to tell me that.
>
I wasn't being sarcastic, the warning is useless, yet if the motivation is
to work around it (and it is), there's no alternative to BOOST_NULLPTR.
We will never get compilers to be more reasonable with useless warnings
because there is zero demand for fewer warnings, and a lot of pressure on
us library developers to "fix" all warnings.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk