[Monads] Generalize the catch_exception function
viboes opened this issue · 2 comments
viboes commented
boost/expected/algorithms/catch_unexpected.hpp
contains a function that can be generalized to all the monad_error that store an exception_ptr
, as it is the case of expected<exception_ptr,T>
and future<T>
.
An alternative is to define this function for the error themselves, but then the user must first get the error and then do the catch_exception
.