Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost::asio] Wait for multiple async_read()'s
From: Adam Zegelin (adam_at_[hidden])
Date: 2017-01-26 22:40:57


Next problem :)

asio's use_future returns a std::future. when_all() expects boost::futures.
I can't find an obvious way to convert between the two and/or get
asio's use_future to return a boost::future.

My understanding is that std::futures are pretty much a re-namespaced
boost::future (aka, boost's implementation was standardised).

My compiler (clang, Apple LLVM version 8.0.0 (clang-800.0.42.1),
bundled with Xcode 8.2.1) doesn't come with experimental/future (see
http://en.cppreference.com/w/cpp/experimental/when_all)

Besides re-implementing all the "magic" in asio/impl/use_future.hpp,
is there a way to mix these future types?

On Wed, Jan 25, 2017 at 1:16 PM, Gavin Lambert <gavinl_at_[hidden]> wrote:

> FWIW, the top Google hit for "boost future" links to the 1.55 docs (which do
> not have when_all), but there is indeed a big yellow box at the top of the
> page which links to the latest version.
>
> Perhaps it didn't look enough like a hyperlink so you mentally skipped it.
> :)

Now that you've told me that its there I can't miss it. Perhaps I just
mentally skipped it before as it doesn't look much like a link and is
inline with the header.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net