[asio-users] Coroutine compile issue
Brought to you by:
chris_kohlhoff
From: Poul B. <pou...@gm...> - 2022-11-20 17:09:13
|
Hi The following fascinating code will compile fine (and likely work as expected) on boost 1.80 however it wont' compile on 1.81 B1? The use case is being able to return some value from a coroutine. Thanks #include<boost/asio.hpp> #include<boost/asio/experimental/coro.hpp> #include<boost/asio/experimental/use_coro.hpp> usingnamespaceboost::asio; experimental::coro<int> my_coroutine(ip::tcp::socketmy_socket) { chardata[100]; std::size_tn= co_awaitmy_socket.async_read_some(buffer(data), experimental::use_coro); co_yieldn; } |