optional


code
Syntax [crayon-5d134f55a59db559851790/] std::optional behaves as a variant of a type T and the value std::nullopt. We can set the value as we would do with any other type, but we can also assign it to std::nullopt – instead of returning nullptr, -1, 0, “”, or whatever we’d expect to receive […]

Library feature: std::optional