3

The boost library defines a boost::future type, and defines a type boost::asio::use_future for returning futures from async methods, eg:

std::future<std::size_t> my_future
  = my_socket.async_read_some(my_buffer, boost::asio::use_future);

but it's returning a std::future.

How do I get it to return a boost::future instead?

Spongman
  • 9,665
  • 8
  • 39
  • 58
  • 1
    This is no longer a duplicate as `boost::asio` has changed sufficiently that the old answer is no longer applicable. It would be really good if someone could have another go at this. – Jonathan Hatchett Apr 27 '22 at 13:54

0 Answers0