ptal / expected

What did you expect?
113 stars 18 forks source link

[Monads] Generalize the unwrap function #15

Open viboes opened 10 years ago

viboes commented 10 years ago

boost/expected/algorithms/unwrap.hpp contains a function that can be generalized to other monads, as it is the case of expected<T>, optional<T> and future<T>.

The first question is in which namespace this function must be defined. The second is if it is worth defining a default for monads that have only one argument or forward the call to a member function unwrap.