Dugan Chen's Homepage

Various Things

Go-Style Error Handing in Modern C++

There’s a lot of discussion these days about how to handle errors in C++ without using exceptions, or more specifically, the best currently-usable alternative to std::expected. Do you use a boost::outcome? An abseil::StatusOr? An std::variant? These are all ways to return a single value containing both a result and its error information, which may be […]