pointer constant For the purposes of this section and this section alone, every occurrence of “0” is meant as “a constant expression which evaluates to 0, which is of type int”. In reality, the constant expression can be of any integral type. Since the dawn of C in 1972, the constant 0 has had the double role of constant integer and null pointer constant. The ambiguity inherent in the double meaning of 0 was dealt with in C by using the preprocessor macro NULL, which commonly expands to either ((void*)0) or 0. C++ forbids implicit conversion from void * to other pointer types, thus removing the benefit of casting 0 to void *. As a consequence, only 0 is allowed as a null pointer constant. This interacts poorly with function overloading: void foo(char *); void foo(int); If NULL is defined as 0 (which is usually the case in C++), the statement foo(NULL); will call foo(int), which is almost certainly not what the programmer intended, and not what a superficial reading of the code suggests. C++11 corrects this by introducing a new keyword to serve as a distinguished null pointer constant: nullptr. It is of type nullptr_t, which is implicitly convertible and comparable to any pointer type or pointer-to-member type. It is not implicitly convertible or comparable to integral types, except for bool. While the original proposal specified that an rvalue of type nullptr_t should not be convertible to bool, the core language working group decided that such a conversion would be desirable, for consistency with regular pointer types. The proposed wording changes were unanimously voted into the Working Paper in June 2008. A similar proposal is also brought to the C standard working group. For backwards compatibility reasons, 0 remains a valid null pointer constant. char *pc = nullptr; // OK int *pi = nullptr; // OK bool b = nullptr; // OK. b is false. int i = nullptr; // error foo(nullptr); // calls foo(nullptr_t), not foo(int); /* Note that foo(nullptr_t) will actually call foo(char *) in the example above using an implicit conversion, only if no other functions are overloading with compatible pointer types in scope. If multiple overloadings exist, the resolution will fail as it is ambiguous, unless there is an explicit declaration of foo(nullptr_t). In standard types headers for C++11, the nullptr_t type should be declared as: typedef decltype(nullptr) nullptr_t; but not as: typedef int nullptr_t;