C++ 17 has introduced the std::optional<T>template class that is analogous to the Maybe/Optional monad implementation in many other languages. “Analogous” is doing a lot of work in this statement because the C++ type checker is not going to help you avoid dereferencing an empty optional like Rust, Haskell, Scala, Kotlin, TypeScript and many other languages will do. That does not make it useless. As with many things in C++, we will be careful™ when using it and write only programs that d...