[vtk-developers] NULL versus nullptr
Andrew Maclean
andrew.amaclean at gmail.com
Thu Mar 16 17:00:25 EDT 2017
Hi Bill
My inclination would be to use nullptr. It is fully supported by all the
compilers we are now using. It has also been around for a long while as
seen in this extract from:
http://stackoverflow.com/questions/1282295/what-exactly-is-nullptr
>From *nullptr: A Type-safe and Clear-Cut Null Pointer*
<http://www.devx.com/cplus/10MinuteSolution/35167/1954>:
The new C++09 nullptr keyword designates an rvalue constant that serves as
a universal null pointer literal, replacing the buggy and weakly-typed
literal 0 and the infamous NULL macro. nullptr thus puts an end to more
than 30 years of embarrassment, ambiguity, and bugs. The following sections
present the nullptr facility and show how it can remedy the ailments of
NULL and 0.
---------- Forwarded message ----------
> From: Bill Lorensen <bill.lorensen at gmail.com>
> To: VTK Developers <vtk-developers at vtk.org>
> Cc:
> Bcc:
> Date: Thu, 16 Mar 2017 11:55:21 -0400
> Subject: [vtk-developers] NULL versus nullptr
> I just reviewed a gitlab MR. The developer replaced =0 with =NULL.
> Since we now require c++11, should we be using nullptr?
>
> Bill
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
> --
___________________________________________
Andrew J. P. Maclean
___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170317/f5d14fef/attachment.html>
More information about the vtk-developers
mailing list