https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125223
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #0)
> A C++ developer presumably thinks of this as a std::unique_ptr "being
> nullptr",
Similarly, nullptr is a null pointer constant, i.e. a thing that can be used to
initialize a pointer. But it's not a pointer and it's not a thing you can
dereference.
const int* p = nullptr; // p is a null pointer value, and it compares equal to
nullptr,
// but it is wrong to say that p *is* nullptr.
*p; // dereferences a null pointer value, does not dereference nullptr.
For an analogy, I can initialize an int with a floating-point-literal:
int i = 1.5;
but it's not correct to say that i *is* 1.5, or that ++i adds 1 to 1.5, because
1.5 is just a constant used to initialize the int, not what the int *is*.