In ISO/IEC 14882:2017 (C++17), Section 5.13.7 "Pointer literals" is stated:
5.13.7 Pointer literals [lex.nullptr]
pointer-literal: nullptr
1 The pointer literal is the keyword nullptr. It is a prvalue of type std::nullptr_t. [Note: std::nullptr_t is a distinct type that is neither a pointer type nor a pointer to member type; rather, a prvalue of this type is a null pointer constant and can be converted to a null pointer value or null member pointer value. See 7.11 and 7.12. —end note]
Following, nullptr
is a prvalue of type std::nullptr_t
. A prvalue of type std::nullptr_t
is a null pointer constant; thus nullptr
is a null pointer constant. A null pointer constant (so is nullptr
) can be converted to a null pointer value or a null member pointer value.
Now I have in the cited Section 7.11, "Pointer conversions" of ISO/IEC 14882:2017:
A null pointer constant is an integer literal (5.13.2) with value zero or a prvalue of type std::nullptr_t. A null pointer constant can be converted to a pointer type; the result is the null pointer value of that type and is distinguishable from every other value of object pointer or function pointer type.
I understand that a null pointer constant is an integer literal with a value of zero or a prvalue of type std::nullptr_t
, but I do not understand the difference to the null pointer value nor the null member pointer value. I do not understand how the result of the conversion from a null pointer constant to a pointer type is a "null pointer value of that type" and what a null pointer value in that context is.
My Question is:
- What is the difference between a null pointer constant (which is
nullptr
), a null pointer value and a null member pointer value?