A value-initialized object of type
P produces the null value of the type
. The null value shall be equivalent only to itself
. A default-initialized object
of type
P may have an indeterminate or erroneous value
. [
Note 1:
Operations involving indeterminate values can cause undefined behavior, and
operations involving erroneous values can cause erroneous behavior (
[basic.indet])
. —
end note]
The effect shall be as if
p != nullptr
had been evaluated in place of
p. No operation which is part of the
Cpp17NullablePointer requirements shall exit
via an exception
.In Table
36,
u denotes an identifier,
t
denotes a non-
const lvalue of type P, a and b
denote values of type (possibly const) P, and np denotes
a value of type (possibly const) std::nullptr_t.Table
36 —
Cpp17NullablePointer requirements
[tab:cpp17.nullablepointer] | | |
| | Postconditions: u == nullptr |
| | |
| | Postconditions: P(np) == nullptr |
| | Postconditions: t == nullptr |
| | |
| | |
| | |
| | |
| | |