Skip to content

Glossary: Algorithms Beyond the Basics in C++

std::optional

Also written: optional, std::nullopt, nullopt

A type that holds either a value or nothing; `std::nullopt` means 'no value'. `pair_for_card` uses it to say 'no pair found'.

Where the book teaches it