martinmoene / expected-lite

expected lite - Expected objects in C++11 and later in a single-file header-only library
Boost Software License 1.0
389 stars 35 forks source link

Add `and_then`, `or_else`, `transform`, and `transform_error`. #56

Closed BenFrantzDale closed 1 year ago

BenFrantzDale commented 1 year ago

https://en.cppreference.com/w/cpp/utility/expected in C++23 will have those four member functions. We should have them in this expected library too.

martinmoene commented 1 year ago

thanks for the heads-up.

martinmoene commented 1 year ago

See proposal p2505: Monadic Functions for std::expected by Jeff Garland.

martinmoene commented 1 year ago

Implemented by @szaszm in #60.