C++23 Library Features and Reference Cards In this blog post, you’ll see all C++23 features! Each with a short description and additional code example. Prepare for a ride! For language features please see the previous article: C++23 Language Features and Reference Cards - C++ Stories This article is “in progress”, most topics are completed, but a few sections are “to-do”.| C++ Stories
std::expected from C++23 not only serves as an error-handling mechanism but also introduces functional programming paradigms into the language. In this blog post, we’ll have a look at functional/monadic extensions of std::expected, which allow us to chain operations elegantly, handling errors at the same time. The techniques are very similar to std::optional extensions - see How to Use Monadic Operations for `std::optional` in C++23 - C++ Stories.| C++ Stories
In this article, we’ll go through a new vocabulary type introduced in C++23. std::expected is a type specifically designed to return results from a function, along with the extra error information. Motivation Imagine you’re expecting a certain result from a function, but oops… things don’t always go as planned:| C++ Stories