A *Cpp17NullablePointer* type is a pointer-like type that supports null values.

A type P meets the *Cpp17NullablePointer* requirements if

- P meets the
*Cpp17EqualityComparable*,*Cpp17DefaultConstructible*,*Cpp17CopyConstructible*,*Cpp17CopyAssignable*,*Cpp17Swappable*, and*Cpp17Destructible*requirements, - the expressions shown in Table 36 are valid and have the indicated semantics, and
- P meets all the other requirements of this subclause.

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*: *end note*]

Operations involving indeterminate values can cause undefined behavior, and
operations involving erroneous values can cause erroneous behavior ([basic.indet]).

— Table 36: *Cpp17NullablePointer* requirements [tab:cpp17.nullablepointer]

Expression | Return type | Operational semantics | |

P u(np); | Postconditions: u == nullptr | ||

P u = np; | |||

P(np) | Postconditions: P(np) == nullptr | ||

t = np | P& | Postconditions: t == nullptr | |

a != b | decltype(a != b) models boolean-testable | !(a == b) | |

a == np | a == P() | ||

np == a | |||

a != np | !(a == np) | ||

np != a |