Boost logo

Boost :

Subject: Re: [boost] [next gen future-promise] What to call themonadicreturn type?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2015-05-30 15:37:58


Le 29/05/15 10:05, Peter Dimov a écrit :
> Niall Douglas wrote:
>
>
>> I think I saw you didn't like Vicente's catch_error(E)? Was there a
>> reason why? Is there anything wrong with a .next(R(E))?
>
> It's not that I don't like it, I don't see sufficient motivation for
> it. 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?
>
It should return a future with this value and the continuation is not
called of course.

Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk