Я попробовал пример сервера дневного времени для Boost :: asio asynchronous Server с использованием C ++ 23, а требование концепции не удалось для Call to bind () для вызова async_write () и ошибки преобразования типа для async_accept () https://www.boost.org/doc/libs/1_87_0/d ... time3.html
main.cpp:47:9: No matching function for call to 'async_write'
write.hpp:: candidate template ignored: constraints not satisfied [with AsyncWriteStream = tcp::socket, ConstBufferSequence = mutable_buffers_1, WriteToken = typename _Bind_helper::type]
:564:5: note: because '::boost::asio::completion_token_for' evaluated to false
async_result.hpp:1214:5: because 'async_initiate(detail::initiation_archetype{}, t)' would be invalid: no matching function for call to 'async_initiate'
write.hpp:: candidate template ignored: substitution failure [with AsyncWriteStream = tcp::socket, DynamicBuffer_v1 = mutable_buffers_1, WriteToken = typename _Bind_helper::type]: no type named 'type' in 'boost::asio::constraint'
write.hpp:: candidate template ignored: could not match 'boost::asio::basic_streambuf' against 'mutable_buffers_1'
write.hpp:: candidate template ignored: substitution failure [with AsyncWriteStream = tcp::socket, DynamicBuffer_v2 = mutable_buffers_1, WriteToken = typename _Bind_helper::type]: no type named 'type' in 'boost::asio::constraint'
write.hpp:: candidate function template not viable: requires 4 arguments, but 3 were provided
write.hpp:: candidate function template not viable: requires at least 4 arguments, but 3 were provided
write.hpp:: candidate function template not viable: requires at least 4 arguments, but 3 were provided
write.hpp:: candidate function template not viable: requires at least 4 arguments, but 3 were provided
main.cpp:84:9: No matching member function for call to 'async_accept'
basic_socket_acceptor.hpp:1531:3: candidate function template not viable: no known conversion from 'typename _Bind_helper::type' (aka '_Bind') to 'endpoint_type &' (aka 'basic_endpoint &') for 2nd argument
basic_socket_acceptor.hpp:2500:3: candidate function template not viable: no known conversion from 'typename _Bind_helper::type' (aka '_Bind') to 'endpoint_type &' (aka 'basic_endpoint &') for 2nd argument
basic_socket_acceptor.hpp:2603:3: candidate function template not viable: no known conversion from 'typename _Bind_helper::type' (aka '_Bind') to 'endpoint_type &' (aka 'basic_endpoint &') for 2nd argument
basic_socket_acceptor.hpp:2211:3: candidate function template not viable: no known conversion from 'tcp::socket' (aka 'basic_stream_socket') to 'endpoint_type &' (aka 'basic_endpoint &') for 1st argument
basic_socket_acceptor.hpp:1398:3: candidate template ignored: constraints not satisfied [with Protocol1 = boost::asio::ip::tcp, Executor1 = boost::asio::any_io_executor, AcceptToken = typename _Bind_helper::type]
:1394:7: note: because '::boost::asio::completion_token_for' evaluated to false
async_result.hpp:1214:5: because 'async_initiate(detail::initiation_archetype{}, t)' would be invalid: no matching function for call to 'async_initiate'
basic_socket_acceptor.hpp:1936:3: candidate template ignored: substitution failure [with Executor1 = tcp::socket, MoveAcceptToken = typename _Bind_helper::type]: no type named 'type' in 'boost::asio::constraint'
basic_socket_acceptor.hpp:2035:3: candidate template ignored: substitution failure [with ExecutionContext = tcp::socket, MoveAcceptToken = typename _Bind_helper::type]: no type named 'type' in 'boost::asio::constraint'
basic_socket_acceptor.hpp:1679:3: candidate function template not viable: allows at most single argument 'token', but 2 arguments were provided
Я попробовал пример сервера дневного времени для Boost :: asio asynchronous Server с использованием C ++ 23, а требование концепции не удалось для Call to bind () для вызова async_write () и ошибки преобразования типа для async_accept () https://www.boost.org/doc/libs/1_87_0/doc/html/boost_asio/tutorial/tutdaytime3.html [list] [*] для async_write () [code]main.cpp:47:9: No matching function for call to 'async_write' write.hpp:: candidate template ignored: constraints not satisfied [with AsyncWriteStream = tcp::socket, ConstBufferSequence = mutable_buffers_1, WriteToken = typename _Bind_helper::type] :564:5: note: because '::boost::asio::completion_token_for' evaluated to false async_result.hpp:1214:5: because 'async_initiate(detail::initiation_archetype{}, t)' would be invalid: no matching function for call to 'async_initiate' write.hpp:: candidate template ignored: substitution failure [with AsyncWriteStream = tcp::socket, DynamicBuffer_v1 = mutable_buffers_1, WriteToken = typename _Bind_helper::type]: no type named 'type' in 'boost::asio::constraint' write.hpp:: candidate template ignored: could not match 'boost::asio::basic_streambuf' against 'mutable_buffers_1' write.hpp:: candidate template ignored: substitution failure [with AsyncWriteStream = tcp::socket, DynamicBuffer_v2 = mutable_buffers_1, WriteToken = typename _Bind_helper::type]: no type named 'type' in 'boost::asio::constraint' write.hpp:: candidate function template not viable: requires 4 arguments, but 3 were provided write.hpp:: candidate function template not viable: requires at least 4 arguments, but 3 were provided write.hpp:: candidate function template not viable: requires at least 4 arguments, but 3 were provided write.hpp:: candidate function template not viable: requires at least 4 arguments, but 3 were provided [/code]
[*] для async_accte () [code]main.cpp:84:9: No matching member function for call to 'async_accept' basic_socket_acceptor.hpp:1531:3: candidate function template not viable: no known conversion from 'typename _Bind_helper::type' (aka '_Bind') to 'endpoint_type &' (aka 'basic_endpoint &') for 2nd argument basic_socket_acceptor.hpp:2500:3: candidate function template not viable: no known conversion from 'typename _Bind_helper::type' (aka '_Bind') to 'endpoint_type &' (aka 'basic_endpoint &') for 2nd argument basic_socket_acceptor.hpp:2603:3: candidate function template not viable: no known conversion from 'typename _Bind_helper::type' (aka '_Bind') to 'endpoint_type &' (aka 'basic_endpoint &') for 2nd argument basic_socket_acceptor.hpp:2211:3: candidate function template not viable: no known conversion from 'tcp::socket' (aka 'basic_stream_socket') to 'endpoint_type &' (aka 'basic_endpoint &') for 1st argument basic_socket_acceptor.hpp:1398:3: candidate template ignored: constraints not satisfied [with Protocol1 = boost::asio::ip::tcp, Executor1 = boost::asio::any_io_executor, AcceptToken = typename _Bind_helper::type] :1394:7: note: because '::boost::asio::completion_token_for' evaluated to false async_result.hpp:1214:5: because 'async_initiate(detail::initiation_archetype{}, t)' would be invalid: no matching function for call to 'async_initiate' basic_socket_acceptor.hpp:1936:3: candidate template ignored: substitution failure [with Executor1 = tcp::socket, MoveAcceptToken = typename _Bind_helper::type]: no type named 'type' in 'boost::asio::constraint' basic_socket_acceptor.hpp:2035:3: candidate template ignored: substitution failure [with ExecutionContext = tcp::socket, MoveAcceptToken = typename _Bind_helper::type]: no type named 'type' in 'boost::asio::constraint' basic_socket_acceptor.hpp:1679:3: candidate function template not viable: allows at most single argument 'token', but 2 arguments were provided [/code]
Я читал примеры из документов boost.asio, чтобы понять, как использовать его, чтобы иметь возможность делать более сложные сетевые вещи в C ++, но когда я пытаюсь запустить этот дневной пример UDP, давая пример Имя хоста для запуска службы «дневное...
Я читал примеры из документов boost.asio, чтобы понять, как использовать его, чтобы иметь возможность делать более сложные сетевые вещи в C ++, но когда я пытаюсь запустить этот дневной пример UDP, давая пример Имя хоста для запуска службы «дневное...
Я читал примеры из документов boost.asio, чтобы понять, как использовать его, чтобы иметь возможность делать более сложные сетевые вещи в C ++, но когда я пытаюсь запустить этот дневной пример UDP, давая пример Имя хоста для запуска службы «дневное...
Я читал примеры из документов boost.asio, чтобы понять, как использовать его, чтобы иметь возможность делать более сложные сетевые вещи в C ++, но когда я пытаюсь запустить этот дневной пример UDP, давая пример Имя хоста для запуска службы «дневное...