Boost :: Asio Asynchronous Daytime Server Пример с использованием C ++ 23C++

Программы на C++. Форум разработчиков
Ответить Пред. темаСлед. тема
Anonymous
 Boost :: Asio Asynchronous Daytime Server Пример с использованием C ++ 23

Сообщение Anonymous »

Я попробовал пример сервера дневного времени для 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
  • для async_write ()

    Код: Выделить всё

    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
    
  • для async_accte ()

    Код: Выделить всё

    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
    


Подробнее здесь: https://stackoverflow.com/questions/793 ... -using-c23
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Почему этот пример из boost.asio не работает, как ожидалось
    Anonymous » » в форуме C++
    0 Ответы
    20 Просмотры
    Последнее сообщение Anonymous
  • Почему этот пример из boost.asio не работает, как ожидалось
    Anonymous » » в форуме C++
    0 Ответы
    10 Просмотры
    Последнее сообщение Anonymous
  • Почему этот пример из boost.asio не работает, как ожидалось
    Anonymous » » в форуме C++
    0 Ответы
    17 Просмотры
    Последнее сообщение Anonymous
  • Почему этот пример из boost.asio не работает, как ожидалось
    Anonymous » » в форуме C++
    0 Ответы
    15 Просмотры
    Последнее сообщение Anonymous
  • Boost :: Asio Multicast Пример
    Anonymous » » в форуме C++
    0 Ответы
    6 Просмотры
    Последнее сообщение Anonymous

Вернуться в «C++»