Open Gitspike opened 3 months ago
添加头文件
[ 48%] Building CXX object examples/ace/ttcp/CMakeFiles/ttcp_asio_async.dir/ttcp_asio_async.cc.o
/home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc: In constructor ‘TtcpServerConnection::TtcpServerConnection(const boost::asio::executor&)’:
/home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:29:7: error: no matching function for call to ‘boost::asio::basic_stream_socket<boost::asio::ip::tcp>::basic_stream_socket(const boost::asio::executor&)’
29 | : socket_(executor), count_(0), payload_(NULL), ack_(0)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/asio/basic_socket_streambuf.hpp:25,
from /usr/include/boost/asio/basic_socket_iostream.hpp:24,
from /usr/include/boost/asio.hpp:33,
from /home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:4:
/usr/include/boost/asio/basic_stream_socket.hpp:292:3: note: candidate: ‘template<class Protocol1, class Executor1> boost::asio::basic_stream_socket<Protocol, Executor>::basic_stream_socket(boost::asio::basic_stream_socket<Protocol1, Executor1>&&, typename std::enable_if<(std::is_convertible<Protocol1, Protocol>::value && std::is_convertible<_Ep, _Dp>::value)>::type*) [with Protocol1 = Protocol1; Executor1 = Executor1; Protocol = boost::asio::ip::tcp; Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >]’
292 | basic_stream_socket(basic_stream_socket<Protocol1, Executor1>&& other,
| ^~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_stream_socket.hpp:292:3: note: template argument deduction/substitution failed:
/home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:29:7: note: types ‘boost::asio::basic_stream_socket<Protocol1, Executor1>’ and ‘const boost::asio::executor’ have incompatible cv-qualifiers
29 | : socket_(executor), count_(0), payload_(NULL), ack_(0)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/asio/basic_socket_streambuf.hpp:25,
from /usr/include/boost/asio/basic_socket_iostream.hpp:24,
from /usr/include/boost/asio.hpp:33,
from /home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:4:
/usr/include/boost/asio/basic_stream_socket.hpp:236:3: note: candidate: ‘template<class ExecutionContext> boost::asio::basic_stream_socket<Protocol, Executor>::basic_stream_socket(ExecutionContext&, const protocol_type&, const native_handle_type&, typename std::enable_if<std::is_convertible<ExecutionContext&, boost::asio::execution_context&>::value>::type*) [with ExecutionContext = ExecutionContext; Protocol = boost::asio::ip::tcp; Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >]’
236 | basic_stream_socket(ExecutionContext& context,
| ^~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_stream_socket.hpp:236:3: note: template argument deduction/substitution failed:
/home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:29:7: note: candidate expects 4 arguments, 1 provided
29 | : socket_(executor), count_(0), payload_(NULL), ack_(0)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/asio/basic_socket_streambuf.hpp:25,
from /usr/include/boost/asio/basic_socket_iostream.hpp:24,
from /usr/include/boost/asio.hpp:33,
from /home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:4:
/usr/include/boost/asio/basic_stream_socket.hpp:192:3: note: candidate: ‘template<class ExecutionContext> boost::asio::basic_stream_socket<Protocol, Executor>::basic_stream_socket(ExecutionContext&, const endpoint_type&, typename std::enable_if<std::is_convertible<ExecutionContext&, boost::asio::execution_context&>::value>::type*) [with ExecutionContext = ExecutionContext; Protocol = boost::asio::ip::tcp; Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >]’
192 | basic_stream_socket(ExecutionContext& context, const endpoint_type& endpoint,
| ^~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_stream_socket.hpp:192:3: note: template argument deduction/substitution failed:
/home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:29:7: note: candidate expects 3 arguments, 1 provided
29 | : socket_(executor), count_(0), payload_(NULL), ack_(0)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/asio/basic_socket_streambuf.hpp:25,
from /usr/include/boost/asio/basic_socket_iostream.hpp:24,
from /usr/include/boost/asio.hpp:33,
from /home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:4:
/usr/include/boost/asio/basic_stream_socket.hpp:147:3: note: candidate: ‘template<class ExecutionContext> boost::asio::basic_stream_socket<Protocol, Executor>::basic_stream_socket(ExecutionContext&, const protocol_type&, typename std::enable_if<std::is_convertible<ExecutionContext&, boost::asio::execution_context&>::value>::type*) [with ExecutionContext = ExecutionContext; Protocol = boost::asio::ip::tcp; Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >]’
147 | basic_stream_socket(ExecutionContext& context, const protocol_type& protocol,
| ^~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_stream_socket.hpp:147:3: note: template argument deduction/substitution failed:
/home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:29:7: note: candidate expects 3 arguments, 1 provided
29 | : socket_(executor), count_(0), payload_(NULL), ack_(0)
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/asio/basic_socket_streambuf.hpp:25,
from /usr/include/boost/asio/basic_socket_iostream.hpp:24,
from /usr/include/boost/asio.hpp:33,
from /home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:4:
/usr/include/boost/asio/basic_stream_socket.hpp:108:12: note: candidate: ‘template<class ExecutionContext> boost::asio::basic_stream_socket<Protocol, Executor>::basic_stream_socket(ExecutionContext&, typename std::enable_if<std::is_convertible<ExecutionContext&, boost::asio::execution_context&>::value>::type*) [with ExecutionContext = ExecutionContext; Protocol = boost::asio::ip::tcp; Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >]’
108 | explicit basic_stream_socket(ExecutionContext& context,
| ^~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_stream_socket.hpp:108:12: note: template argument deduction/substitution failed:
/usr/include/boost/asio/basic_stream_socket.hpp: In substitution of ‘template<class ExecutionContext> boost::asio::basic_stream_socket<boost::asio::ip::tcp>::basic_stream_socket(ExecutionContext&, typename std::enable_if<std::is_convertible<ExecutionContext&, boost::asio::execution_context&>::value>::type*) [with ExecutionContext = const boost::asio::executor]’:
/home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:29:7: required from here
/usr/include/boost/asio/basic_stream_socket.hpp:108:12: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
/usr/include/boost/asio/basic_stream_socket.hpp:257:3: note: candidate: ‘boost::asio::basic_stream_socket<Protocol, Executor>::basic_stream_socket(boost::asio::basic_stream_socket<Protocol, Executor>&&) [with Protocol = boost::asio::ip::tcp; Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >]’
257 | basic_stream_socket(basic_stream_socket&& other) BOOST_ASIO_NOEXCEPT
| ^~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_stream_socket.hpp:257:45: note: no known conversion for argument 1 from ‘const boost::asio::executor’ to ‘boost::asio::basic_stream_socket<boost::asio::ip::tcp>&&’
257 | basic_stream_socket(basic_stream_socket&& other) BOOST_ASIO_NOEXCEPT
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/boost/asio/basic_stream_socket.hpp:214:3: note: candidate: ‘boost::asio::basic_stream_socket<Protocol, Executor>::basic_stream_socket(const executor_type&, const protocol_type&, const native_handle_type&) [with Protocol = boost::asio::ip::tcp; Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; boost::asio::basic_stream_socket<Protocol, Executor>::executor_type = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; boost::asio::basic_stream_socket<Protocol, Executor>::protocol_type = boost::asio::ip::tcp; boost::asio::basic_stream_socket<Protocol, Executor>::native_handle_type = int]’
214 | basic_stream_socket(const executor_type& ex,
| ^~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_stream_socket.hpp:214:3: note: candidate expects 3 arguments, 1 provided
/usr/include/boost/asio/basic_stream_socket.hpp:170:3: note: candidate: ‘boost::asio::basic_stream_socket<Protocol, Executor>::basic_stream_socket(const executor_type&, const endpoint_type&) [with Protocol = boost::asio::ip::tcp; Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; boost::asio::basic_stream_socket<Protocol, Executor>::executor_type = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; boost::asio::basic_stream_socket<Protocol, Executor>::endpoint_type = boost::asio::ip::basic_endpoint<boost::asio::ip::tcp>]’
170 | basic_stream_socket(const executor_type& ex, const endpoint_type& endpoint)
| ^~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_stream_socket.hpp:170:3: note: candidate expects 2 arguments, 1 provided
/usr/include/boost/asio/basic_stream_socket.hpp:128:3: note: candidate: ‘boost::asio::basic_stream_socket<Protocol, Executor>::basic_stream_socket(const executor_type&, const protocol_type&) [with Protocol = boost::asio::ip::tcp; Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; boost::asio::basic_stream_socket<Protocol, Executor>::executor_type = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; boost::asio::basic_stream_socket<Protocol, Executor>::protocol_type = boost::asio::ip::tcp]’
128 | basic_stream_socket(const executor_type& ex, const protocol_type& protocol)
| ^~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_stream_socket.hpp:128:3: note: candidate expects 2 arguments, 1 provided
/usr/include/boost/asio/basic_stream_socket.hpp:92:12: note: candidate: ‘boost::asio::basic_stream_socket<Protocol, Executor>::basic_stream_socket(const executor_type&) [with Protocol = boost::asio::ip::tcp; Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; boost::asio::basic_stream_socket<Protocol, Executor>::executor_type = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >]’
92 | explicit basic_stream_socket(const executor_type& ex)
| ^~~~~~~~~~~~~~~~~~~
/usr/include/boost/asio/basic_stream_socket.hpp:92:53: note: no known conversion for argument 1 from ‘const boost::asio::executor’ to ‘const executor_type&’ {aka ‘const boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >&’}
92 | explicit basic_stream_socket(const executor_type& ex)
| ~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/boost/asio/executor.hpp:342,
from /usr/include/boost/asio.hpp:86,
from /home/spike/projects/self/muduo/examples/ace/ttcp/ttcp_asio_async.cc:4:
/usr/include/boost/asio/impl/executor.hpp: In instantiation of ‘void boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::on_work_started() [with Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; Allocator = std::allocator<void>]’:
/usr/include/boost/asio/impl/executor.hpp:77:8: required from here
/usr/include/boost/asio/impl/executor.hpp:79:15: error: ‘class boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >’ has no member named ‘on_work_started’
79 | executor_.on_work_started();
| ~~~~~~~~~~^~~~~~~~~~~~~~~
/usr/include/boost/asio/impl/executor.hpp: In instantiation of ‘void boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::on_work_finished() [with Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; Allocator = std::allocator<void>]’:
/usr/include/boost/asio/impl/executor.hpp:82:8: required from here
/usr/include/boost/asio/impl/executor.hpp:84:15: error: ‘class boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >’ has no member named ‘on_work_finished’
84 | executor_.on_work_finished();
| ~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/boost/asio/impl/executor.hpp: In instantiation of ‘void boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::dispatch(boost::asio::executor::function&&) [with Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; Allocator = std::allocator<void>; boost::asio::executor::function = boost::asio::detail::executor_function]’:
/usr/include/boost/asio/impl/executor.hpp:92:8: required from here
/usr/include/boost/asio/impl/executor.hpp:94:15: error: ‘class boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >’ has no member named ‘dispatch’
94 | executor_.dispatch(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
| ~~~~~~~~~~^~~~~~~~
/usr/include/boost/asio/impl/executor.hpp: In instantiation of ‘void boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::post(boost::asio::executor::function&&) [with Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; Allocator = std::allocator<void>; boost::asio::executor::function = boost::asio::detail::executor_function]’:
/usr/include/boost/asio/impl/executor.hpp:97:8: required from here
/usr/include/boost/asio/impl/executor.hpp:99:15: error: ‘class boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >’ has no member named ‘post’
99 | executor_.post(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
| ~~~~~~~~~~^~~~
/usr/include/boost/asio/impl/executor.hpp: In instantiation of ‘void boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::defer(boost::asio::executor::function&&) [with Executor = boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >; Allocator = std::allocator<void>; boost::asio::executor::function = boost::asio::detail::executor_function]’:
/usr/include/boost/asio/impl/executor.hpp:102:8: required from here
/usr/include/boost/asio/impl/executor.hpp:104:15: error: ‘class boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>, boost::asio::execution::detail::blocking::never_t<0>, boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0> >, boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0> > >’ has no member named ‘defer’; did you mean ‘prefer’?
104 | executor_.defer(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
| ~~~~~~~~~~^~~~~
| prefer
make[2]: *** [examples/ace/ttcp/CMakeFiles/ttcp_asio_async.dir/build.make:76: examples/ace/ttcp/CMakeFiles/ttcp_asio_async.dir/ttcp_asio_async.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2526: examples/ace/ttcp/CMakeFiles/ttcp_asio_async.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
猜测可能与boost版本有关?
环境: Ubuntu22.04
cmake 版本 3.28.1
gcc: gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
boost版本 libboost1.74-dev:amd64