Search⌘ K
AI Features

std::optional

Explore the use of std optional in C++17 to manage optional values safely and clearly. Understand how std optional helps avoid error-prone special values, manage in-place construction, and handle missing data with exceptions or default values. This lesson teaches you to write clearer and more robust code using std optional for scenarios like database queries or uncertain return values.

We'll cover the following...

std::optional is quite comfortable for calculations such as database queries that may have a result.

🔑 Don’t ...