Blog67.9K views1,705 votes1 reply1 comment2,450 following
Stop Using Sentinel Values: Explicit Absence with std::optional
Stop relying on -1 or nullptr to signal missing data. Learn how std::optional provides a type-safe, explicit way to handle absence in C++17 and beyond.