In C++ the std::optional class template represents an optional value, i.e. one that may or may not be present.
The C++ class template std::optional<T> represents an optional value of type T, so that either it contains a valid value of type T or it contains nothing.
 
     
     
     
     
     
     
     
     
     
     
     
     
     
    