|
Boost : |
Subject: Re: [boost] [next gen future-promise] What to call themonadicreturntype?
From: Peter Dimov (lists_at_[hidden])
Date: 2015-05-29 18:26:00
Niall Douglas wrote:
>> > It's not that I don't like it, I don't see sufficient motivation for
>> > it.
Actually I've changed my mind and now I don't like it. It's a catch(...)
without a rethrow, and while those are occasionally necessary, they are not
likable.
To be clear, I'm talking about the N4048's .catch_error that takes an
exception_ptr, not an error_code.
> > I'm also not quite sure how it's to be used. Vicente's wording in N4048
> > is a bit unclear.
> >
> > future<X> f1 = async( ... );
> > future<Y> f2 = f1.catch_error( []( exception_ptr e ) { return
> > Y(); } );
> >
> > What happens when f1 has a value?
>
> Surely for catch_error() one must always return the same type of future as
> the input? Otherwise it couldn't work when f1 has a value.
Vicente in N4048 says that it's not required to return the same type.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk