[Nfd-dev] code style rule 3.20

Davide Pesavento davide.pesavento at lip6.fr
Thu Oct 30 15:30:30 PDT 2014


There is no such thing as std::nullptr.

In C++11 nullptr (without std) is a language keyword, it is *not* part of
the standard library. The type of nullptr, on the other hand, is
std::nullptr_t, and is part of the standard library.

That being said, I agree with the proposal.

Thanks,
Davide

On Thu, Oct 30, 2014, 10:49 PM Junxiao Shi <shijunxiao at email.arizona.edu>
wrote:

> Dear folks
>
> rule 3.20 states: 0 should be used instead of NULL.
>
> In C++ 11, a null pointer is typically written as std::nullptr.
> Usage of std::nullptr is already permitted, because it doesn't violate
> this rule.
>
> Should we amend this rule as follows?
> "std::nullptr" should be used to represent null pointer.
>
> Yours, Junxiao
> _______________________________________________
> Nfd-dev mailing list
> Nfd-dev at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20141030/1b7770e5/attachment.html>


More information about the Nfd-dev mailing list