|
Boost : |
From: Soronel Haetir (soronel.haetir_at_[hidden])
Date: 2022-05-27 18:34:24
MSVC in fact has such an ability, through #pragma warning. I've no
idea if gcc or clang have anything analogous.
On 5/27/22, Rainer Deyke via Boost <boost_at_[hidden]> wrote:
> On 27.05.22 13:00, Andrey Semashev via Boost wrote:
>> 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.
>
> This is not a case of the compiler, on its own initiative, warning you
> about the code. This is a case of the end user explicitly telling the
> compiler to warn about the code, and the compiler complying with the end
> user's wishes. As I understand it, this warning is not included under
> -Wall or -Wextra, so it needs to be enabled individually.
>
> I wish there were a good way to tell the compiler to limit warning to
> user code and to turn them all off in libraries. If the end user wants
> to enforce the use of nullptr in their code, let them, but don't let
> them force that choice onto library authors.
>
>
> --
> Rainer Deyke (rainerd_at_[hidden])
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
-- Soronel Haetir soronel.haetir_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk