Daily bit(e) of C++ | accessing std::optional
Daily bit(e) of C++ ♻️110, Accessing the value stored inside of C++17 std::optional.
The std::optional (C++17) is a container for representing a single optional value.
The class offers several interfaces for accessing and querying the presence of a contained value. The choice depends on your coding style and your desired exception semantics.