C++ Language/Type/Variant/OptionalValue

A variable whose type is  is similar to a pointer to   in the sense that its value might be   (similar to a null pointer). In that case, we understand it to semantically mean that the variable "has no meaningful value". Otherwise, an  can be stored by assignment, and accessed by dereferencing.

Additional information about optional-value (includes interactive examples)