Functional Exception-less Error Handling with C++23’s Optional and Expected -- Sy Brand

This post is an updated version of an article from five years ago, now that everything Sy talked about is in the standard and implemented in Visual Studio.

Functional Exception-less Error Handling with C++23’s Optional and Expected

by Sy Brand

From the article:

In software things can go wrong. Sometimes we might expect them to go wrong. Sometimes it’s a surprise. In most cases we want to build in some way of handling these misfortunes. Let’s call them disappointments.

std::optional was added in C++17 to provide a new standard way of expressing disappointments and more, and it has been extended in C++23 with a new interface inspired by functional programming.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.