Use nullptr
instead of zero (0) as the null pointer constant.
The road towards nullptr
(C++11) is split into two PRs:
NULL
→nullptr
is handled in PR #10483 (scripted)0
→nullptr
is handled in PR #10645 (manual, this PR)
By using the C++11 keyword nullptr
we are guaranteed a prvalue of type std::nullptr_t
.
For a more thorough discussion, see “A name for the null pointer: nullptr” (Sutter & Stroustrup), http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf