#064 – Handling optional values safely with std::optional
For most of C++’s history, the language had no first-class way to say “this function might not have a value to return.” Programmers improvised: a sentinel like string::npos or -1 for indices, a null pointer for objects, a bool return paired with an output…