Boost logo

Boost :

Subject: Re: [boost] [next gen future-promise] What to call the monadic return type?
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2015-05-25 21:48:51


 
> I've got everything working except the sequence:
>
> promise<int> p;
> p.set_value(5);
> return p.get_future().get();
>
> This should reduce to a mov $5, %eax, but currently does not for an
> unknown reason. I'm just about to go experiment and see why.

I asked this question many times before: what is this good for in practice
except for demonstrating some impressive compiler optimization capabilities?
If I need to return the number '5' I'd usually write

    return 5;

in the first place...

Regards Hartmut
---------------
http://boost-spirit.com
http://stellar.cct.lsu.edu


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