4 ms·
Worth mentioning that C++23 adds something very similar to the standard library, called std::expected. https://en.cppreference.com/w/cpp/utility/expected https
by mgraczyk 4y ago
Worth mentioning that C++23 adds something very similar to the standard library, called std::expected.
https://en.cppreference.com/w/cpp/utility/expected https://en.cppreference.com/w/cpp/utility/expected
Unfortunately it does not come with nice syntax to return on error.
- loeg 4y agoNice. > Unfortunately it does not come with nice syntax to return on error. Yeah. We use a C preprocessor macro for this, but it's a little more verbose than question-mark operator.