$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] future<>::then() Error returning future<void> (on trunk)
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2013-01-22 16:56:22
Fernando Pelliccioni wrote
> Hi Vicente, hi all,
> 
> I noticed that in the trunk  there is a implementation of
> future<>::then().
> Thank you very much for your efforts to implement it!
Hi Fernando,
I have started with a restricted implementation. While trying to cover with
the whole requirements I didn't reach to get correct implementation. This is
way this new feature is not delivered yet. For the time been I don't think
the current implementation is ready for production code.
> The following example, compiles OK
> 
>     boost::future
> <int>
>  f1 = boost::async([]() { return 123; });
>     f1.then([](boost::future
> <int>
>  const& f) {
>             return std::string("");
>     });
> 
> 
> But this one fails to compile:
>     boost::future
> <int>
>  f1 = boost::async([]() { return 123; });
>     f1.then([](boost::future
> <int>
>  const& f) {
>     });
> 
> Here future<>::then() have to returns future
> <void>
>  like ...
> 
>       boost::async([]() {  });
> 
> Am I right?
Yes, it should. I have no access to my development environment for this
week. Could you post the compiler error?
> On the other hand, have you taken into account the following paper?
>     http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3451.pdf
I read it and the mail exchanges related to this paper.
Currently I didn't reached to make it working at all when the future
destructor blocks, but I'm not  sure this is the hidden problem as I have
also other issues when the future destructor doesn't blocks. 
I'm really sorry that the current state is not really usable :(
Best,
Vicente
-- View this message in context: http://boost.2283326.n4.nabble.com/future-then-Error-returning-future-void-on-trunk-tp4641647p4641671.html Sent from the Boost - Dev mailing list archive at Nabble.com.