Although quite a minor feature in C++17, std::optional is a neat addition to the STL library which simplifies a common case which couldn't be expressed in a clean straightforward syntax prior to std::optional. In a nutshell, it is a small wrapper for any type where the wrapped type can be both initialized and uninitialized.
To put it in C++ lingo, std::optional is a stack-allocated container with a max size of one.
Note that the Boost Libraries has had an equivalent of std::optional,named boost::optional for many years.