Skip to content

Instantly share code, notes, and snippets.

@cbodley
Created March 13, 2018 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbodley/299d93a6b6e08e1e20c184cbee726d8e to your computer and use it in GitHub Desktop.
Save cbodley/299d93a6b6e08e1e20c184cbee726d8e to your computer and use it in GitHub Desktop.
$ g++ main.cc -std=c++17 -lboost_system -lpthread -lboost_context -lboost_coroutine -lboost_thread -lboost_chrono
In file included from /home/cbodley/scratch/boost/libs/asio/include/boost/asio/spawn.hpp:336:0,
from main.cc:5:
/home/cbodley/scratch/boost/libs/asio/include/boost/asio/impl/spawn.hpp: In instantiation of ‘boost::asio::async_result<boost::asio::basic_yield_context<Handler>, ReturnType(boost::system::error_code, Arg2)>::async_result(typename boost::asio::detail::coro_async_result<Handler, typename std::decay<WriteHandler>::type>::completion_handler_type&) [with Handler = boost::asio::executor_binder<void (*)(), boost::asio::executor>; ReturnType = void; Arg2 = std::unique_ptr<int>&&; typename boost::asio::detail::coro_async_result<Handler, typename std::decay<WriteHandler>::type>::completion_handler_type = boost::asio::detail::coro_handler<boost::asio::executor_binder<void (*)(), boost::asio::executor>, std::unique_ptr<int> >]’:
/home/cbodley/scratch/boost/libs/asio/include/boost/asio/async_result.hpp:160:32: required from ‘boost::asio::async_completion<CompletionToken, Signature>::async_completion(CompletionToken&) [with CompletionToken = boost::asio::basic_yield_context<boost::asio::executor_binder<void (*)(), boost::asio::executor> >&; Signature = void(boost::system::error_code, std::unique_ptr<int>&&)]’
main.cc:31:61: required from ‘typename boost::asio::async_result<typename std::decay<_Arg>::type, Signature>::return_type async_get_result(ExecutionContext&, CompletionToken&&) [with ExecutionContext = boost::asio::io_context; CompletionToken = boost::asio::basic_yield_context<boost::asio::executor_binder<void (*)(), boost::asio::executor> >&; Signature = void(boost::system::error_code, std::unique_ptr<int>&&); typename boost::asio::async_result<typename std::decay<_Arg>::type, Signature>::return_type = std::unique_ptr<int>]’
main.cc:49:52: required from here
/home/cbodley/scratch/boost/libs/asio/include/boost/asio/impl/spawn.hpp:276:49: error: type ‘boost::asio::detail::coro_async_result<boost::asio::executor_binder<void (*)(), boost::asio::executor>, std::unique_ptr<int>&&>’ is not a direct base of ‘boost::asio::async_result<boost::asio::basic_yield_context<boost::asio::executor_binder<void (*)(), boost::asio::executor> >, void(boost::system::error_code, std::unique_ptr<int>&&)>’
: detail::coro_async_result<Handler, Arg2>(h)
^
/home/cbodley/scratch/boost/libs/asio/include/boost/asio/impl/spawn.hpp:276:49: error: no matching function for call to ‘boost::asio::detail::coro_async_result<boost::asio::executor_binder<void (*)(), boost::asio::executor>, std::unique_ptr<int> >::coro_async_result()’
/home/cbodley/scratch/boost/libs/asio/include/boost/asio/impl/spawn.hpp:157:14: note: candidate: boost::asio::detail::coro_async_result<Handler, T>::coro_async_result(boost::asio::detail::coro_async_result<Handler, T>::completion_handler_type&) [with Handler = boost::asio::executor_binder<void (*)(), boost::asio::executor>; T = std::unique_ptr<int>; boost::asio::detail::coro_async_result<Handler, T>::completion_handler_type = boost::asio::detail::coro_handler<boost::asio::executor_binder<void (*)(), boost::asio::executor>, std::unique_ptr<int> >]
explicit coro_async_result(completion_handler_type& h)
^~~~~~~~~~~~~~~~~
/home/cbodley/scratch/boost/libs/asio/include/boost/asio/impl/spawn.hpp:157:14: note: candidate expects 1 argument, 0 provided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment