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
In the Gadget example in this section, there's mention of using a std::pair.
Wouldn't it be more idiomatic to use std::optional, or std::expected here? It seems this section, dealing with not being able to use exceptions should be refreshed, based on language evolution.
The text was updated successfully, but these errors were encountered:
Editors call: Thanks! The guideline does generally say to 'use error codes' and that you can write your own struct, and std::expected is such a thing so falls under that guidance. The Guidelines don't do C++23 yet but when we do we can consider mentioning std::expected.
In the Gadget example in this section, there's mention of using a std::pair.
Wouldn't it be more idiomatic to use std::optional, or std::expected here? It seems this section, dealing with not being able to use exceptions should be refreshed, based on language evolution.
The text was updated successfully, but these errors were encountered: