You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std::optional, which is added in C++17, would allow to return "empty" values from functions in a concrete/explicit way and prevent us from using "sentinel" polymorphic variables, improving readability in the intent of code.
std::optional, which is added in C++17, would allow to return "empty" values from functions in a concrete/explicit way and prevent us from using "sentinel" polymorphic variables, improving readability in the intent of code.
For example:
Can be converted to something like
and use a function like
value_or
to concretely express the intent without having the ambiguity of using a "-1" for "invalid"Changes between C++14 and C++17
Compiler support for C++17
The text was updated successfully, but these errors were encountered: