April 2020
Intermediate to advanced
412 pages
9h 58m
English
As part of the C++17 standard, a template called std::optional was added to the standard library. It can represent an optional value that may be missing. It can be used as a return value from a function that may fail. However, it can't represent a reason for failure, only a Boolean value indicating whether the value is valid or not. For more information, please check the std::optional reference at https://en.cppreference.com/w/cpp/utility/optional.