summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordzhiblavi <[email protected]>2024-12-18 20:23:51 +0300
committerdzhiblavi <[email protected]>2024-12-18 21:23:21 +0300
commit9690d79e797ada85de4a648fbc1e386ea4621efe (patch)
treeea7690bda310bd85ec67061bbf3ce474f78032da
parentfd5680ce63d12eafbab41e4913cf73b1226ef826 (diff)
Revert commit 126cd013d1356f62ae56538781fb84105c0b06f3, Update contrib/restricted/boost/asio to 1.86.0
commit_hash:86d01043bf186129c5d0bb6d2151e42a3868b677
-rw-r--r--contrib/restricted/boost/asio/.yandex_meta/devtools.copyrights.report17
-rw-r--r--contrib/restricted/boost/asio/.yandex_meta/devtools.licenses.report17
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio.hpp6
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/as_tuple.hpp44
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/associated_immediate_executor.hpp5
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/associator.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/async_result.hpp142
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_datagram_socket.hpp22
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_deadline_timer.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_random_access_file.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_raw_socket.hpp20
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_readable_pipe.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_seq_packet_socket.hpp6
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_serial_port.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_signal_set.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_socket.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_socket_acceptor.hpp18
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_stream_file.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_stream_socket.hpp12
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_waitable_timer.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/basic_writable_pipe.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/bind_allocator.hpp110
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/bind_cancellation_slot.hpp113
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/bind_executor.hpp128
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/bind_immediate_executor.hpp113
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/buffer.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/buffer_registration.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/cancel_after.hpp303
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/cancel_at.hpp296
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/completion_condition.hpp49
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/compose.hpp211
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/composed.hpp415
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/connect.hpp262
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/coroutine.hpp7
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/default_completion_token.hpp91
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/deferred.hpp14
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detached.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/buffered_stream_storage.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp32
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/deadline_timer_service.hpp6
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/handler_alloc_helpers.hpp132
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/impl/descriptor_ops.ipp69
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/impl/dev_poll_reactor.ipp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/impl/reactive_descriptor_service.ipp12
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/impl/reactive_socket_service_base.ipp10
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/impl/socket_ops.ipp79
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/impl/socket_select_interrupter.ipp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/impl/win_iocp_file_service.ipp16
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/impl/win_iocp_handle_service.ipp10
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/initiation_base.hpp64
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/reactive_descriptor_service.hpp36
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_send_op.hpp1
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_service.hpp8
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_service_base.hpp41
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/recycling_allocator.hpp9
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/resolve_endpoint_op.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/resolve_query_op.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/thread_info_base.hpp12
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/timed_cancel_op.hpp363
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/win_iocp_socket_service_base.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/winrt_ssocket_service_base.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/detail/wrapped_handler.hpp80
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/execution/allocator.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/execution/blocking.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/execution/blocking_adaptation.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/execution/context.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/execution/mapping.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/execution/occupancy.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/execution/outstanding_work.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/execution/relationship.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/basic_channel.hpp3
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/basic_concurrent_channel.hpp3
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/co_composed.hpp116
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_handler.hpp (renamed from contrib/restricted/boost/asio/include/boost/asio/detail/completion_payload_handler.hpp)28
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_message.hpp (renamed from contrib/restricted/boost/asio/include/boost/asio/detail/completion_message.hpp)30
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_payload.hpp (renamed from contrib/restricted/boost/asio/include/boost/asio/detail/completion_payload.hpp)62
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_receive_op.hpp5
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_send_functions.hpp46
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_send_op.hpp1
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_service.hpp32
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/detail/coro_promise_allocator.hpp5
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/detail/impl/channel_service.hpp6
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/detail/partial_promise.hpp8
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/impl/as_single.hpp19
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/impl/co_composed.hpp (renamed from contrib/restricted/boost/asio/include/boost/asio/co_composed.hpp)269
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/impl/coro.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/parallel_group.hpp78
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/promise.hpp6
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/use_coro.hpp10
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/experimental/use_promise.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/immediate.hpp144
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/append.hpp21
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/as_tuple.hpp59
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/awaitable.hpp6
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/cancel_after.hpp270
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/cancel_at.hpp270
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/co_spawn.hpp8
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/connect.hpp226
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/consign.hpp21
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/detached.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/prepend.hpp21
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/read.hpp203
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/read_at.hpp98
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/read_until.hpp299
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/redirect_error.hpp73
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/spawn.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/write.hpp211
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/impl/write_at.hpp103
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/io_context_strand.hpp10
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/ip/basic_resolver.hpp12
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/ip/detail/socket_option.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/ip/impl/address_v6.ipp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/placeholders.hpp18
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/posix/basic_descriptor.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/posix/basic_stream_descriptor.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/read.hpp155
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/read_at.hpp90
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/read_until.hpp150
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/redirect_error.hpp46
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/registered_buffer.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/spawn.hpp1
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/ssl/detail/impl/openssl_init.ipp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/ssl/impl/context.ipp17
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/ssl/stream.hpp10
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/this_coro.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/use_awaitable.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/use_future.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/uses_executor.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/version.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/windows/basic_object_handle.hpp2
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/windows/basic_random_access_handle.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/windows/basic_stream_handle.hpp4
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/write.hpp182
-rw-r--r--contrib/restricted/boost/asio/include/boost/asio/write_at.hpp96
-rw-r--r--contrib/restricted/boost/asio/ya.make4
135 files changed, 2396 insertions, 4680 deletions
diff --git a/contrib/restricted/boost/asio/.yandex_meta/devtools.copyrights.report b/contrib/restricted/boost/asio/.yandex_meta/devtools.copyrights.report
index 4d3ba7fcfc7..5067c34fcc7 100644
--- a/contrib/restricted/boost/asio/.yandex_meta/devtools.copyrights.report
+++ b/contrib/restricted/boost/asio/.yandex_meta/devtools.copyrights.report
@@ -101,22 +101,17 @@ BELONGS ya.make
include/boost/asio/buffered_write_stream.hpp [5:5]
include/boost/asio/buffered_write_stream_fwd.hpp [5:5]
include/boost/asio/buffers_iterator.hpp [5:5]
- include/boost/asio/cancel_after.hpp [5:5]
- include/boost/asio/cancel_at.hpp [5:5]
include/boost/asio/cancellation_signal.hpp [5:5]
include/boost/asio/cancellation_state.hpp [5:5]
include/boost/asio/cancellation_type.hpp [5:5]
- include/boost/asio/co_composed.hpp [5:5]
include/boost/asio/co_spawn.hpp [5:5]
include/boost/asio/completion_condition.hpp [5:5]
include/boost/asio/compose.hpp [5:5]
- include/boost/asio/composed.hpp [5:5]
include/boost/asio/connect.hpp [5:5]
include/boost/asio/connect_pipe.hpp [5:5]
include/boost/asio/consign.hpp [5:5]
include/boost/asio/coroutine.hpp [5:5]
include/boost/asio/deadline_timer.hpp [5:5]
- include/boost/asio/default_completion_token.hpp [5:5]
include/boost/asio/defer.hpp [5:5]
include/boost/asio/deferred.hpp [5:5]
include/boost/asio/detached.hpp [5:5]
@@ -135,9 +130,6 @@ BELONGS ya.make
include/boost/asio/detail/chrono.hpp [5:5]
include/boost/asio/detail/chrono_time_traits.hpp [5:5]
include/boost/asio/detail/completion_handler.hpp [5:5]
- include/boost/asio/detail/completion_message.hpp [5:5]
- include/boost/asio/detail/completion_payload.hpp [5:5]
- include/boost/asio/detail/completion_payload_handler.hpp [5:5]
include/boost/asio/detail/composed_work.hpp [5:5]
include/boost/asio/detail/concurrency_hint.hpp [5:5]
include/boost/asio/detail/conditionally_enabled_event.hpp [5:5]
@@ -230,7 +222,6 @@ BELONGS ya.make
include/boost/asio/detail/initiate_defer.hpp [5:5]
include/boost/asio/detail/initiate_dispatch.hpp [5:5]
include/boost/asio/detail/initiate_post.hpp [5:5]
- include/boost/asio/detail/initiation_base.hpp [5:5]
include/boost/asio/detail/io_control.hpp [5:5]
include/boost/asio/detail/io_object_impl.hpp [5:5]
include/boost/asio/detail/io_uring_descriptor_read_at_op.hpp [5:5]
@@ -345,7 +336,6 @@ BELONGS ya.make
include/boost/asio/detail/thread_info_base.hpp [5:5]
include/boost/asio/detail/throw_error.hpp [5:5]
include/boost/asio/detail/throw_exception.hpp [5:5]
- include/boost/asio/detail/timed_cancel_op.hpp [5:5]
include/boost/asio/detail/timer_queue.hpp [5:5]
include/boost/asio/detail/timer_queue_base.hpp [5:5]
include/boost/asio/detail/timer_queue_ptime.hpp [5:5]
@@ -435,7 +425,10 @@ BELONGS ya.make
include/boost/asio/experimental/co_composed.hpp [5:5]
include/boost/asio/experimental/concurrent_channel.hpp [5:5]
include/boost/asio/experimental/deferred.hpp [5:5]
+ include/boost/asio/experimental/detail/channel_handler.hpp [5:5]
+ include/boost/asio/experimental/detail/channel_message.hpp [5:5]
include/boost/asio/experimental/detail/channel_operation.hpp [5:5]
+ include/boost/asio/experimental/detail/channel_payload.hpp [5:5]
include/boost/asio/experimental/detail/channel_receive_op.hpp [5:5]
include/boost/asio/experimental/detail/channel_send_functions.hpp [5:5]
include/boost/asio/experimental/detail/channel_send_op.hpp [5:5]
@@ -444,6 +437,7 @@ BELONGS ya.make
include/boost/asio/experimental/detail/impl/channel_service.hpp [5:5]
include/boost/asio/experimental/impl/as_single.hpp [5:5]
include/boost/asio/experimental/impl/channel_error.ipp [5:5]
+ include/boost/asio/experimental/impl/co_composed.hpp [5:5]
include/boost/asio/experimental/impl/parallel_group.hpp [5:5]
include/boost/asio/experimental/parallel_group.hpp [5:5]
include/boost/asio/experimental/prepend.hpp [5:5]
@@ -457,7 +451,6 @@ BELONGS ya.make
include/boost/asio/generic/stream_protocol.hpp [5:5]
include/boost/asio/handler_continuation_hook.hpp [5:5]
include/boost/asio/high_resolution_timer.hpp [5:5]
- include/boost/asio/immediate.hpp [5:5]
include/boost/asio/impl/any_completion_executor.ipp [5:5]
include/boost/asio/impl/any_io_executor.ipp [5:5]
include/boost/asio/impl/append.hpp [5:5]
@@ -465,8 +458,6 @@ BELONGS ya.make
include/boost/asio/impl/awaitable.hpp [5:5]
include/boost/asio/impl/buffered_read_stream.hpp [5:5]
include/boost/asio/impl/buffered_write_stream.hpp [5:5]
- include/boost/asio/impl/cancel_after.hpp [5:5]
- include/boost/asio/impl/cancel_at.hpp [5:5]
include/boost/asio/impl/cancellation_signal.ipp [5:5]
include/boost/asio/impl/co_spawn.hpp [5:5]
include/boost/asio/impl/connect.hpp [5:5]
diff --git a/contrib/restricted/boost/asio/.yandex_meta/devtools.licenses.report b/contrib/restricted/boost/asio/.yandex_meta/devtools.licenses.report
index a08b97b0e9c..84571c90fb6 100644
--- a/contrib/restricted/boost/asio/.yandex_meta/devtools.licenses.report
+++ b/contrib/restricted/boost/asio/.yandex_meta/devtools.licenses.report
@@ -90,22 +90,17 @@ BELONGS ya.make
include/boost/asio/buffered_write_stream.hpp [7:8]
include/boost/asio/buffered_write_stream_fwd.hpp [7:8]
include/boost/asio/buffers_iterator.hpp [7:8]
- include/boost/asio/cancel_after.hpp [7:8]
- include/boost/asio/cancel_at.hpp [7:8]
include/boost/asio/cancellation_signal.hpp [7:8]
include/boost/asio/cancellation_state.hpp [7:8]
include/boost/asio/cancellation_type.hpp [7:8]
- include/boost/asio/co_composed.hpp [7:8]
include/boost/asio/co_spawn.hpp [7:8]
include/boost/asio/completion_condition.hpp [7:8]
include/boost/asio/compose.hpp [7:8]
- include/boost/asio/composed.hpp [7:8]
include/boost/asio/connect.hpp [7:8]
include/boost/asio/connect_pipe.hpp [7:8]
include/boost/asio/consign.hpp [7:8]
include/boost/asio/coroutine.hpp [7:8]
include/boost/asio/deadline_timer.hpp [7:8]
- include/boost/asio/default_completion_token.hpp [7:8]
include/boost/asio/defer.hpp [7:8]
include/boost/asio/deferred.hpp [7:8]
include/boost/asio/detached.hpp [7:8]
@@ -124,9 +119,6 @@ BELONGS ya.make
include/boost/asio/detail/chrono.hpp [7:8]
include/boost/asio/detail/chrono_time_traits.hpp [7:8]
include/boost/asio/detail/completion_handler.hpp [7:8]
- include/boost/asio/detail/completion_message.hpp [7:8]
- include/boost/asio/detail/completion_payload.hpp [7:8]
- include/boost/asio/detail/completion_payload_handler.hpp [7:8]
include/boost/asio/detail/composed_work.hpp [7:8]
include/boost/asio/detail/concurrency_hint.hpp [7:8]
include/boost/asio/detail/conditionally_enabled_event.hpp [7:8]
@@ -219,7 +211,6 @@ BELONGS ya.make
include/boost/asio/detail/initiate_defer.hpp [7:8]
include/boost/asio/detail/initiate_dispatch.hpp [7:8]
include/boost/asio/detail/initiate_post.hpp [7:8]
- include/boost/asio/detail/initiation_base.hpp [7:8]
include/boost/asio/detail/io_control.hpp [7:8]
include/boost/asio/detail/io_object_impl.hpp [7:8]
include/boost/asio/detail/io_uring_descriptor_read_at_op.hpp [7:8]
@@ -335,7 +326,6 @@ BELONGS ya.make
include/boost/asio/detail/thread_info_base.hpp [7:8]
include/boost/asio/detail/throw_error.hpp [7:8]
include/boost/asio/detail/throw_exception.hpp [7:8]
- include/boost/asio/detail/timed_cancel_op.hpp [7:8]
include/boost/asio/detail/timer_queue.hpp [7:8]
include/boost/asio/detail/timer_queue_base.hpp [7:8]
include/boost/asio/detail/timer_queue_ptime.hpp [7:8]
@@ -428,7 +418,10 @@ BELONGS ya.make
include/boost/asio/experimental/coro.hpp [8:9]
include/boost/asio/experimental/coro_traits.hpp [8:9]
include/boost/asio/experimental/deferred.hpp [7:8]
+ include/boost/asio/experimental/detail/channel_handler.hpp [7:8]
+ include/boost/asio/experimental/detail/channel_message.hpp [7:8]
include/boost/asio/experimental/detail/channel_operation.hpp [7:8]
+ include/boost/asio/experimental/detail/channel_payload.hpp [7:8]
include/boost/asio/experimental/detail/channel_receive_op.hpp [7:8]
include/boost/asio/experimental/detail/channel_send_functions.hpp [7:8]
include/boost/asio/experimental/detail/channel_send_op.hpp [7:8]
@@ -440,6 +433,7 @@ BELONGS ya.make
include/boost/asio/experimental/detail/partial_promise.hpp [8:9]
include/boost/asio/experimental/impl/as_single.hpp [7:8]
include/boost/asio/experimental/impl/channel_error.ipp [7:8]
+ include/boost/asio/experimental/impl/co_composed.hpp [7:8]
include/boost/asio/experimental/impl/coro.hpp [8:9]
include/boost/asio/experimental/impl/parallel_group.hpp [7:8]
include/boost/asio/experimental/impl/promise.hpp [8:9]
@@ -460,7 +454,6 @@ BELONGS ya.make
include/boost/asio/generic/stream_protocol.hpp [7:8]
include/boost/asio/handler_continuation_hook.hpp [7:8]
include/boost/asio/high_resolution_timer.hpp [7:8]
- include/boost/asio/immediate.hpp [7:8]
include/boost/asio/impl/any_completion_executor.ipp [7:8]
include/boost/asio/impl/any_io_executor.ipp [7:8]
include/boost/asio/impl/append.hpp [7:8]
@@ -468,8 +461,6 @@ BELONGS ya.make
include/boost/asio/impl/awaitable.hpp [7:8]
include/boost/asio/impl/buffered_read_stream.hpp [7:8]
include/boost/asio/impl/buffered_write_stream.hpp [7:8]
- include/boost/asio/impl/cancel_after.hpp [7:8]
- include/boost/asio/impl/cancel_at.hpp [7:8]
include/boost/asio/impl/cancellation_signal.ipp [7:8]
include/boost/asio/impl/co_spawn.hpp [7:8]
include/boost/asio/impl/connect.hpp [7:8]
diff --git a/contrib/restricted/boost/asio/include/boost/asio.hpp b/contrib/restricted/boost/asio/include/boost/asio.hpp
index 09efee9d6ad..a55617e03a8 100644
--- a/contrib/restricted/boost/asio/include/boost/asio.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio.hpp
@@ -61,16 +61,12 @@
#include <boost/asio/buffered_write_stream_fwd.hpp>
#include <boost/asio/buffered_write_stream.hpp>
#include <boost/asio/buffers_iterator.hpp>
-#include <boost/asio/cancel_after.hpp>
-#include <boost/asio/cancel_at.hpp>
#include <boost/asio/cancellation_signal.hpp>
#include <boost/asio/cancellation_state.hpp>
#include <boost/asio/cancellation_type.hpp>
-#include <boost/asio/co_composed.hpp>
#include <boost/asio/co_spawn.hpp>
#include <boost/asio/completion_condition.hpp>
#include <boost/asio/compose.hpp>
-#include <boost/asio/composed.hpp>
#include <boost/asio/connect.hpp>
#include <boost/asio/connect_pipe.hpp>
#include <boost/asio/consign.hpp>
@@ -78,7 +74,6 @@
#include <boost/asio/deadline_timer.hpp>
#include <boost/asio/defer.hpp>
#include <boost/asio/deferred.hpp>
-#include <boost/asio/default_completion_token.hpp>
#include <boost/asio/detached.hpp>
#include <boost/asio/dispatch.hpp>
#include <boost/asio/error.hpp>
@@ -106,7 +101,6 @@
#include <boost/asio/generic/stream_protocol.hpp>
#include <boost/asio/handler_continuation_hook.hpp>
#include <boost/asio/high_resolution_timer.hpp>
-#include <boost/asio/immediate.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/io_context_strand.hpp>
#include <boost/asio/io_service.hpp>
diff --git a/contrib/restricted/boost/asio/include/boost/asio/as_tuple.hpp b/contrib/restricted/boost/asio/include/boost/asio/as_tuple.hpp
index be508b8681f..6e91d8edd52 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/as_tuple.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/as_tuple.hpp
@@ -107,42 +107,16 @@ public:
CompletionToken token_;
};
-/// A function object type that adapts a @ref completion_token to specify that
-/// the completion handler arguments should be combined into a single tuple
-/// argument.
-/**
- * May also be used directly as a completion token, in which case it adapts the
- * asynchronous operation's default completion token (or boost::asio::deferred
- * if no default is available).
- */
-struct partial_as_tuple
+/// Adapt a @ref completion_token to specify that the completion handler
+/// arguments should be combined into a single tuple argument.
+template <typename CompletionToken>
+BOOST_ASIO_NODISCARD inline
+constexpr as_tuple_t<decay_t<CompletionToken>>
+as_tuple(CompletionToken&& completion_token)
{
- /// Default constructor.
- constexpr partial_as_tuple()
- {
- }
-
- /// Adapt a @ref completion_token to specify that the completion handler
- /// arguments should be combined into a single tuple argument.
- template <typename CompletionToken>
- BOOST_ASIO_NODISCARD inline
- constexpr as_tuple_t<decay_t<CompletionToken>>
- operator()(CompletionToken&& completion_token) const
- {
- return as_tuple_t<decay_t<CompletionToken>>(
- static_cast<CompletionToken&&>(completion_token));
- }
-};
-
-/// A function object that adapts a @ref completion_token to specify that the
-/// completion handler arguments should be combined into a single tuple
-/// argument.
-/**
- * May also be used directly as a completion token, in which case it adapts the
- * asynchronous operation's default completion token (or boost::asio::deferred
- * if no default is available).
- */
-BOOST_ASIO_INLINE_VARIABLE constexpr partial_as_tuple as_tuple;
+ return as_tuple_t<decay_t<CompletionToken>>(
+ static_cast<CompletionToken&&>(completion_token));
+}
} // namespace asio
} // namespace boost
diff --git a/contrib/restricted/boost/asio/include/boost/asio/associated_immediate_executor.hpp b/contrib/restricted/boost/asio/include/boost/asio/associated_immediate_executor.hpp
index 64fa4d943dc..7e898f478f8 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/associated_immediate_executor.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/associated_immediate_executor.hpp
@@ -50,10 +50,9 @@ struct has_immediate_executor_type<T,
template <typename E, typename = void, typename = void>
struct default_immediate_executor
{
- typedef decay_t<require_result_t<E, execution::blocking_t::never_t>> type;
+ typedef require_result_t<E, execution::blocking_t::never_t> type;
- static auto get(const E& e) noexcept
- -> decltype(boost::asio::require(e, execution::blocking.never))
+ static type get(const E& e) noexcept
{
return boost::asio::require(e, execution::blocking.never);
}
diff --git a/contrib/restricted/boost/asio/include/boost/asio/associator.hpp b/contrib/restricted/boost/asio/include/boost/asio/associator.hpp
index d9f5e6e94e3..3096de3e2c1 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/associator.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/associator.hpp
@@ -24,7 +24,7 @@ namespace asio {
/// Used to generically specialise associators for a type.
template <template <typename, typename> class Associator,
- typename T, typename DefaultCandidate, typename _ = void>
+ typename T, typename DefaultCandidate>
struct associator
{
};
diff --git a/contrib/restricted/boost/asio/include/boost/asio/async_result.hpp b/contrib/restricted/boost/asio/include/boost/asio/async_result.hpp
index 894a94d231e..63d2169a568 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/async_result.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/async_result.hpp
@@ -22,6 +22,9 @@
namespace boost {
namespace asio {
+
+#if defined(BOOST_ASIO_HAS_CONCEPTS)
+
namespace detail {
template <typename T>
@@ -68,12 +71,6 @@ struct are_completion_signatures : false_type
{
};
-template <>
-struct are_completion_signatures<>
- : true_type
-{
-};
-
template <typename T0>
struct are_completion_signatures<T0>
: is_completion_signature<T0>
@@ -88,12 +85,6 @@ struct are_completion_signatures<T0, TN...>
{
};
-} // namespace detail
-
-#if defined(BOOST_ASIO_HAS_CONCEPTS)
-
-namespace detail {
-
template <typename T, typename... Args>
BOOST_ASIO_CONCEPT callable_with = requires(T&& t, Args&&... args)
{
@@ -616,36 +607,14 @@ template <typename CompletionToken,
typename Initiation, typename... Args>
inline auto async_initiate(Initiation&& initiation,
type_identity_t<CompletionToken>& token, Args&&... args)
- -> decltype(enable_if_t<
- enable_if_t<
- detail::are_completion_signatures<Signatures...>::value,
- detail::async_result_has_initiate_memfn<
- CompletionToken, Signatures...>>::value,
- async_result<decay_t<CompletionToken>, Signatures...>>::initiate(
- static_cast<Initiation&&>(initiation),
- static_cast<CompletionToken&&>(token),
- static_cast<Args&&>(args)...))
-{
- return async_result<decay_t<CompletionToken>, Signatures...>::initiate(
- static_cast<Initiation&&>(initiation),
- static_cast<CompletionToken&&>(token),
- static_cast<Args&&>(args)...);
-}
-
-template <
- BOOST_ASIO_COMPLETION_SIGNATURE... Signatures,
- typename CompletionToken, typename Initiation, typename... Args>
-inline auto async_initiate(Initiation&& initiation,
- CompletionToken&& token, Args&&... args)
- -> decltype(enable_if_t<
- enable_if_t<
- detail::are_completion_signatures<Signatures...>::value,
- detail::async_result_has_initiate_memfn<
- CompletionToken, Signatures...>>::value,
- async_result<decay_t<CompletionToken>, Signatures...>>::initiate(
- static_cast<Initiation&&>(initiation),
- static_cast<CompletionToken&&>(token),
- static_cast<Args&&>(args)...))
+ -> constraint_t<
+ detail::async_result_has_initiate_memfn<
+ CompletionToken, Signatures...>::value,
+ decltype(
+ async_result<decay_t<CompletionToken>, Signatures...>::initiate(
+ static_cast<Initiation&&>(initiation),
+ static_cast<CompletionToken&&>(token),
+ static_cast<Args&&>(args)...))>
{
return async_result<decay_t<CompletionToken>, Signatures...>::initiate(
static_cast<Initiation&&>(initiation),
@@ -656,13 +625,10 @@ inline auto async_initiate(Initiation&& initiation,
template <typename CompletionToken,
BOOST_ASIO_COMPLETION_SIGNATURE... Signatures,
typename Initiation, typename... Args>
-inline typename enable_if_t<
- !enable_if_t<
- detail::are_completion_signatures<Signatures...>::value,
- detail::async_result_has_initiate_memfn<
- CompletionToken, Signatures...>>::value,
- async_result<decay_t<CompletionToken>, Signatures...>
- >::return_type
+inline constraint_t<
+ !detail::async_result_has_initiate_memfn<
+ CompletionToken, Signatures...>::value,
+ typename async_result<decay_t<CompletionToken>, Signatures...>::return_type>
async_initiate(Initiation&& initiation,
type_identity_t<CompletionToken>& token, Args&&... args)
{
@@ -678,29 +644,6 @@ async_initiate(Initiation&& initiation,
return completion.result.get();
}
-template <BOOST_ASIO_COMPLETION_SIGNATURE... Signatures,
- typename CompletionToken, typename Initiation, typename... Args>
-inline typename enable_if_t<
- !enable_if_t<
- detail::are_completion_signatures<Signatures...>::value,
- detail::async_result_has_initiate_memfn<
- CompletionToken, Signatures...>>::value,
- async_result<decay_t<CompletionToken>, Signatures...>
- >::return_type
-async_initiate(Initiation&& initiation, CompletionToken&& token, Args&&... args)
-{
- async_completion<CompletionToken, Signatures...> completion(token);
-
- static_cast<Initiation&&>(initiation)(
- static_cast<
- typename async_result<decay_t<CompletionToken>,
- Signatures...>::completion_handler_type&&>(
- completion.completion_handler),
- static_cast<Args&&>(args)...);
-
- return completion.result.get();
-}
-
#endif // defined(GENERATING_DOCUMENTATION)
#if defined(BOOST_ASIO_HAS_CONCEPTS)
@@ -940,11 +883,62 @@ template <typename T, typename... Args>
using completion_signature_of_t =
typename completion_signature_of<T, Args...>::type;
+namespace detail {
+
+template <typename T, typename = void>
+struct default_completion_token_impl
+{
+ typedef void type;
+};
+
+template <typename T>
+struct default_completion_token_impl<T,
+ void_t<typename T::default_completion_token_type>
+ >
+{
+ typedef typename T::default_completion_token_type type;
+};
+
+} // namespace detail
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// Traits type used to determine the default completion token type associated
+/// with a type (such as an executor).
+/**
+ * A program may specialise this traits type if the @c T template parameter in
+ * the specialisation is a user-defined type.
+ *
+ * Specialisations of this trait may provide a nested typedef @c type, which is
+ * a default-constructible completion token type.
+ */
+template <typename T>
+struct default_completion_token
+{
+ /// If @c T has a nested type @c default_completion_token_type,
+ /// <tt>T::default_completion_token_type</tt>. Otherwise the typedef @c type
+ /// is not defined.
+ typedef see_below type;
+};
+#else
+template <typename T>
+struct default_completion_token
+ : detail::default_completion_token_impl<T>
+{
+};
+#endif
+
+template <typename T>
+using default_completion_token_t = typename default_completion_token<T>::type;
+
+#define BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(e) \
+ = typename ::boost::asio::default_completion_token<e>::type
+#define BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(e) \
+ = typename ::boost::asio::default_completion_token<e>::type()
+
} // namespace asio
} // namespace boost
#include <boost/asio/detail/pop_options.hpp>
-#include <boost/asio/default_completion_token.hpp>
-
#endif // BOOST_ASIO_ASYNC_RESULT_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_datagram_socket.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_datagram_socket.hpp
index 88738d939c2..ecf1abb8486 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_datagram_socket.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_datagram_socket.hpp
@@ -448,7 +448,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -518,7 +518,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -667,7 +667,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -740,7 +740,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -885,7 +885,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -956,7 +956,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1027,7 +1027,7 @@ public:
boost::asio::detail::throw_error(ec, "receive_from");
return s;
}
-
+
/// Receive a datagram with the endpoint of the sender.
/**
* This function is used to receive a datagram. The function call will block
@@ -1054,7 +1054,7 @@ public:
boost::asio::detail::throw_error(ec, "receive_from");
return s;
}
-
+
/// Receive a datagram with the endpoint of the sender.
/**
* This function is used to receive a datagram. The function call will block
@@ -1108,7 +1108,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1180,7 +1180,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1220,7 +1220,7 @@ private:
const basic_datagram_socket&) = delete;
class initiate_async_send
- {
+ {
public:
typedef Executor executor_type;
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_deadline_timer.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_deadline_timer.hpp
index 742d6cb8fa8..3d68f4528f6 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_deadline_timer.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_deadline_timer.hpp
@@ -64,7 +64,7 @@ namespace asio {
* timer.wait();
* @endcode
*
- * @par
+ * @par
* Performing an asynchronous wait:
* @code
* void handler(const boost::system::error_code& error)
@@ -631,7 +631,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_random_access_file.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_random_access_file.hpp
index 099514f689a..f9e109bb526 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_random_access_file.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_random_access_file.hpp
@@ -428,7 +428,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -563,7 +563,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_raw_socket.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_raw_socket.hpp
index 97dfd95f4bd..f9c64d5d469 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_raw_socket.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_raw_socket.hpp
@@ -440,7 +440,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -510,7 +510,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -659,7 +659,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -732,7 +732,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -877,7 +877,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -948,7 +948,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1020,7 +1020,7 @@ public:
boost::asio::detail::throw_error(ec, "receive_from");
return s;
}
-
+
/// Receive raw data with the endpoint of the sender.
/**
* This function is used to receive raw data. The function call will block
@@ -1047,7 +1047,7 @@ public:
boost::asio::detail::throw_error(ec, "receive_from");
return s;
}
-
+
/// Receive raw data with the endpoint of the sender.
/**
* This function is used to receive raw data. The function call will block
@@ -1101,7 +1101,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1174,7 +1174,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_readable_pipe.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_readable_pipe.hpp
index 2e88cad8e7f..9917823ec30 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_readable_pipe.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_readable_pipe.hpp
@@ -535,7 +535,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_seq_packet_socket.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_seq_packet_socket.hpp
index 7928d881ffa..cf822cfde1b 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_seq_packet_socket.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_seq_packet_socket.hpp
@@ -431,7 +431,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -621,7 +621,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -695,7 +695,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_serial_port.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_serial_port.hpp
index fdfc01bfe9a..c4cb0a3f059 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_serial_port.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_serial_port.hpp
@@ -725,7 +725,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -855,7 +855,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_signal_set.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_signal_set.hpp
index fb3b22d2e1c..e4cde56419b 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_signal_set.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_signal_set.hpp
@@ -574,7 +574,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, int) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_socket.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_socket.hpp
index aacce47a788..6eb4290c537 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_socket.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_socket.hpp
@@ -928,7 +928,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code) @endcode
@@ -1780,7 +1780,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_socket_acceptor.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_socket_acceptor.hpp
index a2254a43e96..cefc3623729 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_socket_acceptor.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_socket_acceptor.hpp
@@ -1214,7 +1214,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code) @endcode
@@ -1349,7 +1349,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code) @endcode
@@ -1497,7 +1497,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code) @endcode
@@ -1617,7 +1617,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code,
@@ -1867,7 +1867,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code,
@@ -1963,7 +1963,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code,
@@ -2133,7 +2133,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code,
@@ -2415,7 +2415,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code,
@@ -2515,7 +2515,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code,
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_stream_file.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_stream_file.hpp
index b99fa9b60b6..314506f71c7 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_stream_file.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_stream_file.hpp
@@ -491,7 +491,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -619,7 +619,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_stream_socket.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_stream_socket.hpp
index 77896a48aea..55a6ccafe2c 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_stream_socket.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_stream_socket.hpp
@@ -462,7 +462,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -532,7 +532,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -704,7 +704,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -776,7 +776,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -906,7 +906,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1037,7 +1037,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_waitable_timer.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_waitable_timer.hpp
index 484b3118623..eb8967e42da 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_waitable_timer.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_waitable_timer.hpp
@@ -76,7 +76,7 @@ class basic_waitable_timer;
* timer.wait();
* @endcode
*
- * @par
+ * @par
* Performing an asynchronous wait (C++11):
* @code
* void handler(const boost::system::error_code& error)
@@ -747,7 +747,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/basic_writable_pipe.hpp b/contrib/restricted/boost/asio/include/boost/asio/basic_writable_pipe.hpp
index 9aa58525f2e..2e7536cd040 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/basic_writable_pipe.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/basic_writable_pipe.hpp
@@ -533,7 +533,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/bind_allocator.hpp b/contrib/restricted/boost/asio/include/boost/asio/bind_allocator.hpp
index ac7faaf8c66..9a7134adce7 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/bind_allocator.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/bind_allocator.hpp
@@ -16,12 +16,10 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
+#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/associated_executor.hpp>
#include <boost/asio/associator.hpp>
#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
-#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -363,46 +361,6 @@ private:
T target_;
};
-/// A function object type that adapts a @ref completion_token to specify that
-/// the completion handler should have the supplied allocator as its associated
-/// allocator.
-/**
- * May also be used directly as a completion token, in which case it adapts the
- * asynchronous operation's default completion token (or boost::asio::deferred
- * if no default is available).
- */
-template <typename Allocator>
-struct partial_allocator_binder
-{
- /// Constructor that specifies associated allocator.
- explicit partial_allocator_binder(const Allocator& ex)
- : allocator_(ex)
- {
- }
-
- /// Adapt a @ref completion_token to specify that the completion handler
- /// should have the allocator as its associated allocator.
- template <typename CompletionToken>
- BOOST_ASIO_NODISCARD inline
- constexpr allocator_binder<decay_t<CompletionToken>, Allocator>
- operator()(CompletionToken&& completion_token) const
- {
- return allocator_binder<decay_t<CompletionToken>, Allocator>(
- allocator_, static_cast<CompletionToken&&>(completion_token));
- }
-
-//private:
- Allocator allocator_;
-};
-
-/// Create a partial completion token that associates an allocator.
-template <typename Allocator>
-BOOST_ASIO_NODISCARD inline partial_allocator_binder<Allocator>
-bind_allocator(const Allocator& ex)
-{
- return partial_allocator_binder<Allocator>(ex);
-}
-
/// Associate an object of type @c T with an allocator of type
/// @c Allocator.
template <typename Allocator, typename T>
@@ -480,48 +438,49 @@ public:
}
template <typename Initiation>
- struct init_wrapper : detail::initiation_base<Initiation>
+ struct init_wrapper
{
- using detail::initiation_base<Initiation>::initiation_base;
+ template <typename Init>
+ init_wrapper(const Allocator& allocator, Init&& init)
+ : allocator_(allocator),
+ initiation_(static_cast<Init&&>(init))
+ {
+ }
template <typename Handler, typename... Args>
- void operator()(Handler&& handler, const Allocator& a, Args&&... args) &&
+ void operator()(Handler&& handler, Args&&... args)
{
- static_cast<Initiation&&>(*this)(
+ static_cast<Initiation&&>(initiation_)(
allocator_binder<decay_t<Handler>, Allocator>(
- a, static_cast<Handler&&>(handler)),
+ allocator_, static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
- void operator()(Handler&& handler,
- const Allocator& a, Args&&... args) const &
+ void operator()(Handler&& handler, Args&&... args) const
{
- static_cast<const Initiation&>(*this)(
+ initiation_(
allocator_binder<decay_t<Handler>, Allocator>(
- a, static_cast<Handler&&>(handler)),
+ allocator_, static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
+
+ Allocator allocator_;
+ Initiation initiation_;
};
template <typename Initiation, typename RawCompletionToken, typename... Args>
static auto initiate(Initiation&& initiation,
RawCompletionToken&& token, Args&&... args)
-> decltype(
- async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value, const T, T>,
- Signature>(
+ async_initiate<T, Signature>(
declval<init_wrapper<decay_t<Initiation>>>(),
- token.get(), token.get_allocator(), static_cast<Args&&>(args)...))
+ token.get(), static_cast<Args&&>(args)...))
{
- return async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value, const T, T>,
- Signature>(
- init_wrapper<decay_t<Initiation>>(
+ return async_initiate<T, Signature>(
+ init_wrapper<decay_t<Initiation>>(token.get_allocator(),
static_cast<Initiation&&>(initiation)),
- token.get(), token.get_allocator(), static_cast<Args&&>(args)...);
+ token.get(), static_cast<Args&&>(args)...);
}
private:
@@ -531,31 +490,6 @@ private:
async_result<T, Signature> target_;
};
-template <typename Allocator, typename... Signatures>
-struct async_result<partial_allocator_binder<Allocator>, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- allocator_binder<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Allocator>(token.allocator_,
- default_completion_token_t<associated_executor_t<Initiation>>{}),
- static_cast<Args&&>(args)...))
- {
- return async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- allocator_binder<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Allocator>(token.allocator_,
- default_completion_token_t<associated_executor_t<Initiation>>{}),
- static_cast<Args&&>(args)...);
- }
-};
-
template <template <typename, typename> class Associator,
typename T, typename Allocator, typename DefaultCandidate>
struct associator<Associator, allocator_binder<T, Allocator>, DefaultCandidate>
diff --git a/contrib/restricted/boost/asio/include/boost/asio/bind_cancellation_slot.hpp b/contrib/restricted/boost/asio/include/boost/asio/bind_cancellation_slot.hpp
index 38e8571fbec..acf724b9eb0 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/bind_cancellation_slot.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/bind_cancellation_slot.hpp
@@ -16,12 +16,10 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
+#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/associated_cancellation_slot.hpp>
-#include <boost/asio/associated_executor.hpp>
#include <boost/asio/associator.hpp>
#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
-#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -369,46 +367,6 @@ private:
T target_;
};
-/// A function object type that adapts a @ref completion_token to specify that
-/// the completion handler should have the supplied cancellation slot as its
-/// associated cancellation slot.
-/**
- * May also be used directly as a completion token, in which case it adapts the
- * asynchronous operation's default completion token (or boost::asio::deferred
- * if no default is available).
- */
-template <typename CancellationSlot>
-struct partial_cancellation_slot_binder
-{
- /// Constructor that specifies associated cancellation slot.
- explicit partial_cancellation_slot_binder(const CancellationSlot& ex)
- : cancellation_slot_(ex)
- {
- }
-
- /// Adapt a @ref completion_token to specify that the completion handler
- /// should have the cancellation slot as its associated cancellation slot.
- template <typename CompletionToken>
- BOOST_ASIO_NODISCARD inline
- constexpr cancellation_slot_binder<decay_t<CompletionToken>, CancellationSlot>
- operator()(CompletionToken&& completion_token) const
- {
- return cancellation_slot_binder<decay_t<CompletionToken>, CancellationSlot>(
- static_cast<CompletionToken&&>(completion_token), cancellation_slot_);
- }
-
-//private:
- CancellationSlot cancellation_slot_;
-};
-
-/// Create a partial completion token that associates a cancellation slot.
-template <typename CancellationSlot>
-BOOST_ASIO_NODISCARD inline partial_cancellation_slot_binder<CancellationSlot>
-bind_cancellation_slot(const CancellationSlot& ex)
-{
- return partial_cancellation_slot_binder<CancellationSlot>(ex);
-}
-
/// Associate an object of type @c T with a cancellation slot of type
/// @c CancellationSlot.
template <typename CancellationSlot, typename T>
@@ -489,51 +447,50 @@ public:
}
template <typename Initiation>
- struct init_wrapper : detail::initiation_base<Initiation>
+ struct init_wrapper
{
- using detail::initiation_base<Initiation>::initiation_base;
+ template <typename Init>
+ init_wrapper(const CancellationSlot& slot, Init&& init)
+ : slot_(slot),
+ initiation_(static_cast<Init&&>(init))
+ {
+ }
template <typename Handler, typename... Args>
- void operator()(Handler&& handler,
- const CancellationSlot& slot, Args&&... args) &&
+ void operator()(Handler&& handler, Args&&... args)
{
- static_cast<Initiation&&>(*this)(
+ static_cast<Initiation&&>(initiation_)(
cancellation_slot_binder<decay_t<Handler>, CancellationSlot>(
- slot, static_cast<Handler&&>(handler)),
+ slot_, static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
- void operator()(Handler&& handler,
- const CancellationSlot& slot, Args&&... args) const &
+ void operator()(Handler&& handler, Args&&... args) const
{
- static_cast<const Initiation&>(*this)(
+ initiation_(
cancellation_slot_binder<decay_t<Handler>, CancellationSlot>(
- slot, static_cast<Handler&&>(handler)),
+ slot_, static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
+
+ CancellationSlot slot_;
+ Initiation initiation_;
};
template <typename Initiation, typename RawCompletionToken, typename... Args>
static auto initiate(Initiation&& initiation,
RawCompletionToken&& token, Args&&... args)
-> decltype(
- async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value, const T, T>,
- Signature>(
+ async_initiate<T, Signature>(
declval<init_wrapper<decay_t<Initiation>>>(),
- token.get(), token.get_cancellation_slot(),
- static_cast<Args&&>(args)...))
+ token.get(), static_cast<Args&&>(args)...))
{
- return async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value, const T, T>,
- Signature>(
+ return async_initiate<T, Signature>(
init_wrapper<decay_t<Initiation>>(
+ token.get_cancellation_slot(),
static_cast<Initiation&&>(initiation)),
- token.get(), token.get_cancellation_slot(),
- static_cast<Args&&>(args)...);
+ token.get(), static_cast<Args&&>(args)...);
}
private:
@@ -543,32 +500,6 @@ private:
async_result<T, Signature> target_;
};
-template <typename CancellationSlot, typename... Signatures>
-struct async_result<partial_cancellation_slot_binder<CancellationSlot>,
- Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- cancellation_slot_binder<
- default_completion_token_t<associated_executor_t<Initiation>>,
- CancellationSlot>(token.cancellation_slot_,
- default_completion_token_t<associated_executor_t<Initiation>>{}),
- static_cast<Args&&>(args)...))
- {
- return async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- cancellation_slot_binder<
- default_completion_token_t<associated_executor_t<Initiation>>,
- CancellationSlot>(token.cancellation_slot_,
- default_completion_token_t<associated_executor_t<Initiation>>{}),
- static_cast<Args&&>(args)...);
- }
-};
-
template <template <typename, typename> class Associator,
typename T, typename CancellationSlot, typename DefaultCandidate>
struct associator<Associator,
diff --git a/contrib/restricted/boost/asio/include/boost/asio/bind_executor.hpp b/contrib/restricted/boost/asio/include/boost/asio/bind_executor.hpp
index 818b32e4b07..b38d2c8933f 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/bind_executor.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/bind_executor.hpp
@@ -16,11 +16,10 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
+#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/associated_executor.hpp>
#include <boost/asio/associator.hpp>
#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
-#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/execution/executor.hpp>
#include <boost/asio/execution_context.hpp>
#include <boost/asio/is_executor.hpp>
@@ -396,49 +395,6 @@ private:
uses_executor<T, Executor>::value> base_type;
};
-/// A function object type that adapts a @ref completion_token to specify that
-/// the completion handler should have the supplied executor as its associated
-/// executor.
-/**
- * May also be used directly as a completion token, in which case it adapts the
- * asynchronous operation's default completion token (or boost::asio::deferred
- * if no default is available).
- */
-template <typename Executor>
-struct partial_executor_binder
-{
- /// Constructor that specifies associated executor.
- explicit partial_executor_binder(const Executor& ex)
- : executor_(ex)
- {
- }
-
- /// Adapt a @ref completion_token to specify that the completion handler
- /// should have the executor as its associated executor.
- template <typename CompletionToken>
- BOOST_ASIO_NODISCARD inline
- constexpr executor_binder<decay_t<CompletionToken>, Executor>
- operator()(CompletionToken&& completion_token) const
- {
- return executor_binder<decay_t<CompletionToken>, Executor>(executor_arg_t(),
- static_cast<CompletionToken&&>(completion_token), executor_);
- }
-
-//private:
- Executor executor_;
-};
-
-/// Create a partial completion token that associates an executor.
-template <typename Executor>
-BOOST_ASIO_NODISCARD inline partial_executor_binder<Executor>
-bind_executor(const Executor& ex,
- constraint_t<
- is_executor<Executor>::value || execution::is_executor<Executor>::value
- > = 0)
-{
- return partial_executor_binder<Executor>(ex);
-}
-
/// Associate an object of type @c T with an executor of type @c Executor.
template <typename Executor, typename T>
BOOST_ASIO_NODISCARD inline executor_binder<decay_t<T>, Executor>
@@ -451,20 +407,6 @@ bind_executor(const Executor& ex, T&& t,
executor_arg_t(), ex, static_cast<T&&>(t));
}
-/// Create a partial completion token that associates an execution context's
-/// executor.
-template <typename ExecutionContext>
-BOOST_ASIO_NODISCARD inline partial_executor_binder<
- typename ExecutionContext::executor_type>
-bind_executor(ExecutionContext& ctx,
- constraint_t<
- is_convertible<ExecutionContext&, execution_context&>::value
- > = 0)
-{
- return partial_executor_binder<typename ExecutionContext::executor_type>(
- ctx.get_executor());
-}
-
/// Associate an object of type @c T with an execution context's executor.
template <typename ExecutionContext, typename T>
BOOST_ASIO_NODISCARD inline executor_binder<decay_t<T>,
@@ -550,48 +492,49 @@ public:
}
template <typename Initiation>
- struct init_wrapper : detail::initiation_base<Initiation>
+ struct init_wrapper
{
- using detail::initiation_base<Initiation>::initiation_base;
+ template <typename Init>
+ init_wrapper(const Executor& ex, Init&& init)
+ : ex_(ex),
+ initiation_(static_cast<Init&&>(init))
+ {
+ }
template <typename Handler, typename... Args>
- void operator()(Handler&& handler, const Executor& e, Args&&... args) &&
+ void operator()(Handler&& handler, Args&&... args)
{
- static_cast<Initiation&&>(*this)(
+ static_cast<Initiation&&>(initiation_)(
executor_binder<decay_t<Handler>, Executor>(
- executor_arg_t(), e, static_cast<Handler&&>(handler)),
+ executor_arg_t(), ex_, static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
- void operator()(Handler&& handler,
- const Executor& e, Args&&... args) const &
+ void operator()(Handler&& handler, Args&&... args) const
{
- static_cast<const Initiation&>(*this)(
+ initiation_(
executor_binder<decay_t<Handler>, Executor>(
- executor_arg_t(), e, static_cast<Handler&&>(handler)),
+ executor_arg_t(), ex_, static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
+
+ Executor ex_;
+ Initiation initiation_;
};
template <typename Initiation, typename RawCompletionToken, typename... Args>
static auto initiate(Initiation&& initiation,
RawCompletionToken&& token, Args&&... args)
-> decltype(
- async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value, const T, T>,
- Signature>(
- declval<init_wrapper<decay_t<Initiation>>>(),
- token.get(), token.get_executor(), static_cast<Args&&>(args)...))
+ async_initiate<T, Signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.get(), static_cast<Args&&>(args)...))
{
- return async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value, const T, T>,
- Signature>(
+ return async_initiate<T, Signature>(
init_wrapper<decay_t<Initiation>>(
- static_cast<Initiation&&>(initiation)),
- token.get(), token.get_executor(), static_cast<Args&&>(args)...);
+ token.get_executor(), static_cast<Initiation&&>(initiation)),
+ token.get(), static_cast<Args&&>(args)...);
}
private:
@@ -599,31 +542,6 @@ private:
async_result& operator=(const async_result&) = delete;
};
-template <typename Executor, typename... Signatures>
-struct async_result<partial_executor_binder<Executor>, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- executor_binder<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Executor>(executor_arg_t(), token.executor_,
- default_completion_token_t<associated_executor_t<Initiation>>{}),
- static_cast<Args&&>(args)...))
- {
- return async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- executor_binder<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Executor>(executor_arg_t(), token.executor_,
- default_completion_token_t<associated_executor_t<Initiation>>{}),
- static_cast<Args&&>(args)...);
- }
-};
-
template <template <typename, typename> class Associator,
typename T, typename Executor, typename DefaultCandidate>
struct associator<Associator, executor_binder<T, Executor>, DefaultCandidate>
diff --git a/contrib/restricted/boost/asio/include/boost/asio/bind_immediate_executor.hpp b/contrib/restricted/boost/asio/include/boost/asio/bind_immediate_executor.hpp
index fbf8c47325f..b54288779be 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/bind_immediate_executor.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/bind_immediate_executor.hpp
@@ -16,12 +16,10 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
-#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/associated_immediate_executor.hpp>
#include <boost/asio/associator.hpp>
#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
-#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -368,46 +366,6 @@ private:
T target_;
};
-/// A function object type that adapts a @ref completion_token to specify that
-/// the completion handler should have the supplied executor as its associated
-/// immediate executor.
-/**
- * May also be used directly as a completion token, in which case it adapts the
- * asynchronous operation's default completion token (or boost::asio::deferred
- * if no default is available).
- */
-template <typename Executor>
-struct partial_immediate_executor_binder
-{
- /// Constructor that specifies associated executor.
- explicit partial_immediate_executor_binder(const Executor& ex)
- : executor_(ex)
- {
- }
-
- /// Adapt a @ref completion_token to specify that the completion handler
- /// should have the executor as its associated immediate executor.
- template <typename CompletionToken>
- BOOST_ASIO_NODISCARD inline
- constexpr immediate_executor_binder<decay_t<CompletionToken>, Executor>
- operator()(CompletionToken&& completion_token) const
- {
- return immediate_executor_binder<decay_t<CompletionToken>, Executor>(
- static_cast<CompletionToken&&>(completion_token), executor_);
- }
-
-//private:
- Executor executor_;
-};
-
-/// Create a partial completion token that associates an executor.
-template <typename Executor>
-BOOST_ASIO_NODISCARD inline partial_immediate_executor_binder<Executor>
-bind_immediate_executor(const Executor& ex)
-{
- return partial_immediate_executor_binder<Executor>(ex);
-}
-
/// Associate an object of type @c T with a immediate executor of type
/// @c Executor.
template <typename Executor, typename T>
@@ -492,52 +450,52 @@ public:
}
template <typename Initiation>
- struct init_wrapper : detail::initiation_base<Initiation>
+ struct init_wrapper
{
- using detail::initiation_base<Initiation>::initiation_base;
+ template <typename Init>
+ init_wrapper(const Executor& e, Init&& init)
+ : executor_(e),
+ initiation_(static_cast<Init&&>(init))
+ {
+ }
template <typename Handler, typename... Args>
- void operator()(Handler&& handler, const Executor& e, Args&&... args) &&
+ void operator()(Handler&& handler, Args&&... args)
{
- static_cast<Initiation&&>(*this)(
+ static_cast<Initiation&&>(initiation_)(
immediate_executor_binder<
decay_t<Handler>, Executor>(
- e, static_cast<Handler&&>(handler)),
+ executor_, static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
- void operator()(Handler&& handler,
- const Executor& e, Args&&... args) const &
+ void operator()(Handler&& handler, Args&&... args) const
{
- static_cast<const Initiation&>(*this)(
+ initiation_(
immediate_executor_binder<
decay_t<Handler>, Executor>(
- e, static_cast<Handler&&>(handler)),
+ executor_, static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
+
+ Executor executor_;
+ Initiation initiation_;
};
template <typename Initiation, typename RawCompletionToken, typename... Args>
static auto initiate(Initiation&& initiation,
RawCompletionToken&& token, Args&&... args)
-> decltype(
- async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value, const T, T>,
- Signature>(
- declval<init_wrapper<decay_t<Initiation>>>(),
- token.get(), token.get_immediate_executor(),
- static_cast<Args&&>(args)...))
+ async_initiate<T, Signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.get(), static_cast<Args&&>(args)...))
{
- return async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value, const T, T>,
- Signature>(
+ return async_initiate<T, Signature>(
init_wrapper<decay_t<Initiation>>(
+ token.get_immediate_executor(),
static_cast<Initiation&&>(initiation)),
- token.get(), token.get_immediate_executor(),
- static_cast<Args&&>(args)...);
+ token.get(), static_cast<Args&&>(args)...);
}
private:
@@ -547,31 +505,6 @@ private:
async_result<T, Signature> target_;
};
-template <typename Executor, typename... Signatures>
-struct async_result<partial_immediate_executor_binder<Executor>, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- immediate_executor_binder<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Executor>(token.executor_,
- default_completion_token_t<associated_executor_t<Initiation>>{}),
- static_cast<Args&&>(args)...))
- {
- return async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- immediate_executor_binder<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Executor>(token.executor_,
- default_completion_token_t<associated_executor_t<Initiation>>{}),
- static_cast<Args&&>(args)...);
- }
-};
-
template <template <typename, typename> class Associator,
typename T, typename Executor, typename DefaultCandidate>
struct associator<Associator,
diff --git a/contrib/restricted/boost/asio/include/boost/asio/buffer.hpp b/contrib/restricted/boost/asio/include/boost/asio/buffer.hpp
index c82507c67af..f149eb075ad 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/buffer.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/buffer.hpp
@@ -950,7 +950,7 @@ BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
{
return BOOST_ASIO_MUTABLE_BUFFER(data, N * sizeof(PodType));
}
-
+
/// Create a new modifiable buffer that represents the given POD array.
/**
* @returns A mutable_buffer value equivalent to:
@@ -967,7 +967,7 @@ BOOST_ASIO_NODISCARD inline BOOST_ASIO_MUTABLE_BUFFER buffer(
N * sizeof(PodType) < max_size_in_bytes
? N * sizeof(PodType) : max_size_in_bytes);
}
-
+
/// Create a new non-modifiable buffer that represents the given POD array.
/**
* @returns A const_buffer value equivalent to:
diff --git a/contrib/restricted/boost/asio/include/boost/asio/buffer_registration.hpp b/contrib/restricted/boost/asio/include/boost/asio/buffer_registration.hpp
index 6b412ca6054..fbab223688a 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/buffer_registration.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/buffer_registration.hpp
@@ -130,7 +130,7 @@ public:
service_->unregister_buffers();
#endif // defined(BOOST_ASIO_HAS_IO_URING)
}
-
+
/// Move assignment.
buffer_registration& operator=(buffer_registration&& other) noexcept
{
diff --git a/contrib/restricted/boost/asio/include/boost/asio/cancel_after.hpp b/contrib/restricted/boost/asio/include/boost/asio/cancel_after.hpp
deleted file mode 100644
index 220402b9dcf..00000000000
--- a/contrib/restricted/boost/asio/include/boost/asio/cancel_after.hpp
+++ /dev/null
@@ -1,303 +0,0 @@
-//
-// cancel_after.hpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_CANCEL_AFTER_HPP
-#define BOOST_ASIO_CANCEL_AFTER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/basic_waitable_timer.hpp>
-#include <boost/asio/cancellation_type.hpp>
-#include <boost/asio/detail/chrono.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/wait_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// A @ref completion_token adapter that cancels an operation after a timeout.
-/**
- * The cancel_after_t class is used to indicate that an asynchronous operation
- * should be cancelled if not complete before the specified duration has
- * elapsed.
- */
-template <typename CompletionToken, typename Clock,
- typename WaitTraits = boost::asio::wait_traits<Clock>>
-class cancel_after_t
-{
-public:
- /// Constructor.
- template <typename T>
- cancel_after_t(T&& completion_token, const typename Clock::duration& timeout,
- cancellation_type_t cancel_type = cancellation_type::terminal)
- : token_(static_cast<T&&>(completion_token)),
- timeout_(timeout),
- cancel_type_(cancel_type)
- {
- }
-
-//private:
- CompletionToken token_;
- typename Clock::duration timeout_;
- cancellation_type_t cancel_type_;
-};
-
-/// A @ref completion_token adapter that cancels an operation after a timeout.
-/**
- * The cancel_after_timer class is used to indicate that an asynchronous
- * operation should be cancelled if not complete before the specified duration
- * has elapsed.
- */
-template <typename CompletionToken, typename Clock,
- typename WaitTraits = boost::asio::wait_traits<Clock>,
- typename Executor = any_io_executor>
-class cancel_after_timer
-{
-public:
- /// Constructor.
- template <typename T>
- cancel_after_timer(T&& completion_token,
- basic_waitable_timer<Clock, WaitTraits, Executor>& timer,
- const typename Clock::duration& timeout,
- cancellation_type_t cancel_type = cancellation_type::terminal)
- : token_(static_cast<T&&>(completion_token)),
- timer_(timer),
- timeout_(timeout),
- cancel_type_(cancel_type)
- {
- }
-
-//private:
- CompletionToken token_;
- basic_waitable_timer<Clock, WaitTraits, Executor>& timer_;
- typename Clock::duration timeout_;
- cancellation_type_t cancel_type_;
-};
-
-/// A function object type that adapts a @ref completion_token to cancel an
-/// operation after a timeout.
-/**
- * May also be used directly as a completion token, in which case it adapts the
- * asynchronous operation's default completion token (or boost::asio::deferred
- * if no default is available).
- */
-template <typename Clock, typename WaitTraits = boost::asio::wait_traits<Clock>>
-class partial_cancel_after
-{
-public:
- /// Constructor that specifies the timeout duration and cancellation type.
- explicit partial_cancel_after(const typename Clock::duration& timeout,
- cancellation_type_t cancel_type = cancellation_type::terminal)
- : timeout_(timeout),
- cancel_type_(cancel_type)
- {
- }
-
- /// Adapt a @ref completion_token to specify that the completion handler
- /// arguments should be combined into a single tuple argument.
- template <typename CompletionToken>
- BOOST_ASIO_NODISCARD inline
- cancel_after_t<decay_t<CompletionToken>, Clock, WaitTraits>
- operator()(CompletionToken&& completion_token) const
- {
- return cancel_after_t<decay_t<CompletionToken>, Clock, WaitTraits>(
- static_cast<CompletionToken&&>(completion_token),
- timeout_, cancel_type_);
- }
-
-//private:
- typename Clock::duration timeout_;
- cancellation_type_t cancel_type_;
-};
-
-/// A function object type that adapts a @ref completion_token to cancel an
-/// operation after a timeout.
-/**
- * May also be used directly as a completion token, in which case it adapts the
- * asynchronous operation's default completion token (or boost::asio::deferred
- * if no default is available).
- */
-template <typename Clock, typename WaitTraits = boost::asio::wait_traits<Clock>,
- typename Executor = any_io_executor>
-class partial_cancel_after_timer
-{
-public:
- /// Constructor that specifies the timeout duration and cancellation type.
- explicit partial_cancel_after_timer(
- basic_waitable_timer<Clock, WaitTraits, Executor>& timer,
- const typename Clock::duration& timeout,
- cancellation_type_t cancel_type = cancellation_type::terminal)
- : timer_(timer),
- timeout_(timeout),
- cancel_type_(cancel_type)
- {
- }
-
- /// Adapt a @ref completion_token to specify that the completion handler
- /// arguments should be combined into a single tuple argument.
- template <typename CompletionToken>
- BOOST_ASIO_NODISCARD inline
- cancel_after_timer<decay_t<CompletionToken>, Clock, WaitTraits, Executor>
- operator()(CompletionToken&& completion_token) const
- {
- return cancel_after_timer<decay_t<CompletionToken>,
- Clock, WaitTraits, Executor>(
- static_cast<CompletionToken&&>(completion_token),
- timeout_, cancel_type_);
- }
-
-//private:
- basic_waitable_timer<Clock, WaitTraits, Executor>& timer_;
- typename Clock::duration timeout_;
- cancellation_type_t cancel_type_;
-};
-
-/// Create a partial completion token adapter that cancels an operation if not
-/// complete before the specified relative timeout has elapsed.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_after, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename Rep, typename Period>
-BOOST_ASIO_NODISCARD inline partial_cancel_after<chrono::steady_clock>
-cancel_after(const chrono::duration<Rep, Period>& timeout,
- cancellation_type_t cancel_type = cancellation_type::terminal)
-{
- return partial_cancel_after<chrono::steady_clock>(timeout, cancel_type);
-}
-
-/// Create a partial completion token adapter that cancels an operation if not
-/// complete before the specified relative timeout has elapsed.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_after, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename Clock, typename WaitTraits,
- typename Executor, typename Rep, typename Period>
-BOOST_ASIO_NODISCARD inline
-partial_cancel_after_timer<Clock, WaitTraits, Executor>
-cancel_after(basic_waitable_timer<Clock, WaitTraits, Executor>& timer,
- const chrono::duration<Rep, Period>& timeout,
- cancellation_type_t cancel_type = cancellation_type::terminal)
-{
- return partial_cancel_after_timer<Clock, WaitTraits, Executor>(
- timer, timeout, cancel_type);
-}
-
-/// Adapt a @ref completion_token to cancel an operation if not complete before
-/// the specified relative timeout has elapsed.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_after, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename Rep, typename Period, typename CompletionToken>
-BOOST_ASIO_NODISCARD inline
-cancel_after_t<decay_t<CompletionToken>, chrono::steady_clock>
-cancel_after(const chrono::duration<Rep, Period>& timeout,
- CompletionToken&& completion_token)
-{
- return cancel_after_t<decay_t<CompletionToken>, chrono::steady_clock>(
- static_cast<CompletionToken&&>(completion_token),
- timeout, cancellation_type::terminal);
-}
-
-/// Adapt a @ref completion_token to cancel an operation if not complete before
-/// the specified relative timeout has elapsed.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_after, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename Rep, typename Period, typename CompletionToken>
-BOOST_ASIO_NODISCARD inline
-cancel_after_t<decay_t<CompletionToken>, chrono::steady_clock>
-cancel_after(const chrono::duration<Rep, Period>& timeout,
- cancellation_type_t cancel_type, CompletionToken&& completion_token)
-{
- return cancel_after_t<decay_t<CompletionToken>, chrono::steady_clock>(
- static_cast<CompletionToken&&>(completion_token), timeout, cancel_type);
-}
-
-/// Adapt a @ref completion_token to cancel an operation if not complete before
-/// the specified relative timeout has elapsed.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_after, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename Clock, typename WaitTraits, typename Executor,
- typename Rep, typename Period, typename CompletionToken>
-BOOST_ASIO_NODISCARD inline
-cancel_after_timer<decay_t<CompletionToken>, Clock, WaitTraits, Executor>
-cancel_after(basic_waitable_timer<Clock, WaitTraits, Executor>& timer,
- const chrono::duration<Rep, Period>& timeout,
- CompletionToken&& completion_token)
-{
- return cancel_after_timer<decay_t<CompletionToken>,
- Clock, WaitTraits, Executor>(
- static_cast<CompletionToken&&>(completion_token),
- timer, timeout, cancellation_type::terminal);
-}
-
-/// Adapt a @ref completion_token to cancel an operation if not complete before
-/// the specified relative timeout has elapsed.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_after, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename Clock, typename WaitTraits, typename Executor,
- typename Rep, typename Period, typename CompletionToken>
-BOOST_ASIO_NODISCARD inline
-cancel_after_timer<decay_t<CompletionToken>, chrono::steady_clock>
-cancel_after(basic_waitable_timer<Clock, WaitTraits, Executor>& timer,
- const chrono::duration<Rep, Period>& timeout,
- cancellation_type_t cancel_type, CompletionToken&& completion_token)
-{
- return cancel_after_timer<decay_t<CompletionToken>,
- Clock, WaitTraits, Executor>(
- static_cast<CompletionToken&&>(completion_token),
- timer, timeout, cancel_type);
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/cancel_after.hpp>
-
-#endif // BOOST_ASIO_CANCEL_AFTER_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/cancel_at.hpp b/contrib/restricted/boost/asio/include/boost/asio/cancel_at.hpp
deleted file mode 100644
index c9d39b13e56..00000000000
--- a/contrib/restricted/boost/asio/include/boost/asio/cancel_at.hpp
+++ /dev/null
@@ -1,296 +0,0 @@
-//
-// cancel_at.hpp
-// ~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_CANCEL_AT_HPP
-#define BOOST_ASIO_CANCEL_AT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/basic_waitable_timer.hpp>
-#include <boost/asio/cancellation_type.hpp>
-#include <boost/asio/detail/chrono.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/wait_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// A @ref completion_token adapter that cancels an operation at a given time.
-/**
- * The cancel_at_t class is used to indicate that an asynchronous operation
- * should be cancelled if not complete at the specified absolute time.
- */
-template <typename CompletionToken, typename Clock,
- typename WaitTraits = boost::asio::wait_traits<Clock>>
-class cancel_at_t
-{
-public:
- /// Constructor.
- template <typename T>
- cancel_at_t(T&& completion_token, const typename Clock::time_point& expiry,
- cancellation_type_t cancel_type = cancellation_type::terminal)
- : token_(static_cast<T&&>(completion_token)),
- expiry_(expiry),
- cancel_type_(cancel_type)
- {
- }
-
-//private:
- CompletionToken token_;
- typename Clock::time_point expiry_;
- cancellation_type_t cancel_type_;
-};
-
-/// A @ref completion_token adapter that cancels an operation at a given time.
-/**
- * The cancel_at_timer class is used to indicate that an asynchronous operation
- * should be cancelled if not complete at the specified absolute time.
- */
-template <typename CompletionToken, typename Clock,
- typename WaitTraits = boost::asio::wait_traits<Clock>,
- typename Executor = any_io_executor>
-class cancel_at_timer
-{
-public:
- /// Constructor.
- template <typename T>
- cancel_at_timer(T&& completion_token,
- basic_waitable_timer<Clock, WaitTraits, Executor>& timer,
- const typename Clock::time_point& expiry,
- cancellation_type_t cancel_type = cancellation_type::terminal)
- : token_(static_cast<T&&>(completion_token)),
- timer_(timer),
- expiry_(expiry),
- cancel_type_(cancel_type)
- {
- }
-
-//private:
- CompletionToken token_;
- basic_waitable_timer<Clock, WaitTraits, Executor>& timer_;
- typename Clock::time_point expiry_;
- cancellation_type_t cancel_type_;
-};
-
-/// A function object type that adapts a @ref completion_token to cancel an
-/// operation at a given time.
-/**
- * May also be used directly as a completion token, in which case it adapts the
- * asynchronous operation's default completion token (or boost::asio::deferred
- * if no default is available).
- */
-template <typename Clock, typename WaitTraits = boost::asio::wait_traits<Clock>>
-class partial_cancel_at
-{
-public:
- /// Constructor that specifies the expiry and cancellation type.
- explicit partial_cancel_at(const typename Clock::time_point& expiry,
- cancellation_type_t cancel_type = cancellation_type::terminal)
- : expiry_(expiry),
- cancel_type_(cancel_type)
- {
- }
-
- /// Adapt a @ref completion_token to specify that the completion handler
- /// arguments should be combined into a single tuple argument.
- template <typename CompletionToken>
- BOOST_ASIO_NODISCARD inline
- constexpr cancel_at_t<decay_t<CompletionToken>, Clock, WaitTraits>
- operator()(CompletionToken&& completion_token) const
- {
- return cancel_at_t<decay_t<CompletionToken>, Clock, WaitTraits>(
- static_cast<CompletionToken&&>(completion_token),
- expiry_, cancel_type_);
- }
-
-//private:
- typename Clock::time_point expiry_;
- cancellation_type_t cancel_type_;
-};
-
-/// A function object type that adapts a @ref completion_token to cancel an
-/// operation at a given time.
-/**
- * May also be used directly as a completion token, in which case it adapts the
- * asynchronous operation's default completion token (or boost::asio::deferred
- * if no default is available).
- */
-template <typename Clock, typename WaitTraits = boost::asio::wait_traits<Clock>,
- typename Executor = any_io_executor>
-class partial_cancel_at_timer
-{
-public:
- /// Constructor that specifies the expiry and cancellation type.
- explicit partial_cancel_at_timer(
- basic_waitable_timer<Clock, WaitTraits, Executor>& timer,
- const typename Clock::time_point& expiry,
- cancellation_type_t cancel_type = cancellation_type::terminal)
- : timer_(timer),
- expiry_(expiry),
- cancel_type_(cancel_type)
- {
- }
-
- /// Adapt a @ref completion_token to specify that the completion handler
- /// arguments should be combined into a single tuple argument.
- template <typename CompletionToken>
- BOOST_ASIO_NODISCARD inline
- cancel_at_timer<decay_t<CompletionToken>, Clock, WaitTraits, Executor>
- operator()(CompletionToken&& completion_token) const
- {
- return cancel_at_timer<decay_t<CompletionToken>,
- Clock, WaitTraits, Executor>(
- static_cast<CompletionToken&&>(completion_token),
- timer_, expiry_, cancel_type_);
- }
-
-//private:
- basic_waitable_timer<Clock, WaitTraits, Executor>& timer_;
- typename Clock::time_point expiry_;
- cancellation_type_t cancel_type_;
-};
-
-/// Create a partial completion token adapter that cancels an operation if not
-/// complete by the specified absolute time.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_at, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename Clock, typename Duration>
-BOOST_ASIO_NODISCARD inline partial_cancel_at<Clock>
-cancel_at(const chrono::time_point<Clock, Duration>& expiry,
- cancellation_type_t cancel_type = cancellation_type::terminal)
-{
- return partial_cancel_at<Clock>(expiry, cancel_type);
-}
-
-/// Create a partial completion token adapter that cancels an operation if not
-/// complete by the specified absolute time.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_at, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename Clock, typename WaitTraits,
- typename Executor, typename Duration>
-BOOST_ASIO_NODISCARD inline partial_cancel_at_timer<Clock, WaitTraits, Executor>
-cancel_at(basic_waitable_timer<Clock, WaitTraits, Executor>& timer,
- const chrono::time_point<Clock, Duration>& expiry,
- cancellation_type_t cancel_type = cancellation_type::terminal)
-{
- return partial_cancel_at_timer<Clock, WaitTraits, Executor>(
- timer, expiry, cancel_type);
-}
-
-/// Adapt a @ref completion_token to cancel an operation if not complete by the
-/// specified absolute time.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_at, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename CompletionToken, typename Clock, typename Duration>
-BOOST_ASIO_NODISCARD inline cancel_at_t<decay_t<CompletionToken>, Clock>
-cancel_at(const chrono::time_point<Clock, Duration>& expiry,
- CompletionToken&& completion_token)
-{
- return cancel_at_t<decay_t<CompletionToken>, Clock>(
- static_cast<CompletionToken&&>(completion_token),
- expiry, cancellation_type::terminal);
-}
-
-/// Adapt a @ref completion_token to cancel an operation if not complete by the
-/// specified absolute time.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_at, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename CompletionToken, typename Clock, typename Duration>
-BOOST_ASIO_NODISCARD inline cancel_at_t<decay_t<CompletionToken>, Clock>
-cancel_at(const chrono::time_point<Clock, Duration>& expiry,
- cancellation_type_t cancel_type, CompletionToken&& completion_token)
-{
- return cancel_at_t<decay_t<CompletionToken>, Clock>(
- static_cast<CompletionToken&&>(completion_token), expiry, cancel_type);
-}
-
-/// Adapt a @ref completion_token to cancel an operation if not complete by the
-/// specified absolute time.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_at, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename CompletionToken, typename Clock,
- typename WaitTraits, typename Executor, typename Duration>
-BOOST_ASIO_NODISCARD inline
-cancel_at_timer<decay_t<CompletionToken>, Clock, WaitTraits, Executor>
-cancel_at(basic_waitable_timer<Clock, WaitTraits, Executor>& timer,
- const chrono::time_point<Clock, Duration>& expiry,
- CompletionToken&& completion_token)
-{
- return cancel_at_timer<decay_t<CompletionToken>, Clock, WaitTraits, Executor>(
- static_cast<CompletionToken&&>(completion_token),
- timer, expiry, cancellation_type::terminal);
-}
-
-/// Adapt a @ref completion_token to cancel an operation if not complete by the
-/// specified absolute time.
-/**
- * @par Thread Safety
- * When an asynchronous operation is used with cancel_at, a timer async_wait
- * operation is performed in parallel to the main operation. If this parallel
- * async_wait completes first, a cancellation request is emitted to cancel the
- * main operation. Consequently, the application must ensure that the
- * asynchronous operation is performed within an implicit or explicit strand.
- */
-template <typename CompletionToken, typename Clock,
- typename WaitTraits, typename Executor, typename Duration>
-BOOST_ASIO_NODISCARD inline
-cancel_at_timer<decay_t<CompletionToken>, Clock, WaitTraits, Executor>
-cancel_at(basic_waitable_timer<Clock, WaitTraits, Executor>& timer,
- const chrono::time_point<Clock, Duration>& expiry,
- cancellation_type_t cancel_type, CompletionToken&& completion_token)
-{
- return cancel_at_timer<decay_t<CompletionToken>, Clock, WaitTraits, Executor>(
- static_cast<CompletionToken&&>(completion_token),
- timer, expiry, cancel_type);
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/cancel_at.hpp>
-
-#endif // BOOST_ASIO_CANCEL_AT_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/completion_condition.hpp b/contrib/restricted/boost/asio/include/boost/asio/completion_condition.hpp
index 4cd94109240..8ad47d7c302 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/completion_condition.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/completion_condition.hpp
@@ -17,8 +17,6 @@
#include <boost/asio/detail/config.hpp>
#include <cstddef>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/system/error_code.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -100,55 +98,8 @@ private:
std::size_t size_;
};
-template <typename T, typename = void>
-struct is_completion_condition_helper : false_type
-{
-};
-
-template <typename T>
-struct is_completion_condition_helper<T,
- enable_if_t<
- is_same<
- result_of_t<T(boost::system::error_code, std::size_t)>,
- bool
- >::value
- >
- > : true_type
-{
-};
-
-template <typename T>
-struct is_completion_condition_helper<T,
- enable_if_t<
- is_same<
- result_of_t<T(boost::system::error_code, std::size_t)>,
- std::size_t
- >::value
- >
- > : true_type
-{
-};
-
} // namespace detail
-#if defined(GENERATING_DOCUMENTATION)
-
-/// Trait for determining whether a function object is a completion condition.
-template <typename T>
-struct is_completion_condition
-{
- static constexpr bool value = automatically_determined;
-};
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-template <typename T>
-struct is_completion_condition : detail::is_completion_condition_helper<T>
-{
-};
-
-#endif // defined(GENERATING_DOCUMENTATION)
-
/**
* @defgroup completion_condition Completion Condition Function Objects
*
diff --git a/contrib/restricted/boost/asio/include/boost/asio/compose.hpp b/contrib/restricted/boost/asio/include/boost/asio/compose.hpp
index f23bd79e614..b539850fb69 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/compose.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/compose.hpp
@@ -16,12 +16,197 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
-#include <boost/asio/composed.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/base_from_cancellation_state.hpp>
+#include <boost/asio/detail/composed_work.hpp>
+#include <boost/asio/detail/handler_cont_helpers.hpp>
+#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/detail/push_options.hpp>
namespace boost {
namespace asio {
+namespace detail {
+
+template <typename Impl, typename Work, typename Handler, typename Signature>
+class composed_op;
+
+template <typename Impl, typename Work, typename Handler,
+ typename R, typename... Args>
+class composed_op<Impl, Work, Handler, R(Args...)>
+ : public base_from_cancellation_state<Handler>
+{
+public:
+ template <typename I, typename W, typename H>
+ composed_op(I&& impl,
+ W&& work,
+ H&& handler)
+ : base_from_cancellation_state<Handler>(
+ handler, enable_terminal_cancellation()),
+ impl_(static_cast<I&&>(impl)),
+ work_(static_cast<W&&>(work)),
+ handler_(static_cast<H&&>(handler)),
+ invocations_(0)
+ {
+ }
+
+ composed_op(composed_op&& other)
+ : base_from_cancellation_state<Handler>(
+ static_cast<base_from_cancellation_state<Handler>&&>(other)),
+ impl_(static_cast<Impl&&>(other.impl_)),
+ work_(static_cast<Work&&>(other.work_)),
+ handler_(static_cast<Handler&&>(other.handler_)),
+ invocations_(other.invocations_)
+ {
+ }
+
+ typedef typename composed_work_guard<
+ typename Work::head_type>::executor_type io_executor_type;
+
+ io_executor_type get_io_executor() const noexcept
+ {
+ return work_.head_.get_executor();
+ }
+
+ typedef associated_executor_t<Handler, io_executor_type> executor_type;
+
+ executor_type get_executor() const noexcept
+ {
+ return (get_associated_executor)(handler_, work_.head_.get_executor());
+ }
+
+ typedef associated_allocator_t<Handler, std::allocator<void>> allocator_type;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return (get_associated_allocator)(handler_, std::allocator<void>());
+ }
+
+ template<typename... T>
+ void operator()(T&&... t)
+ {
+ if (invocations_ < ~0u)
+ ++invocations_;
+ this->get_cancellation_state().slot().clear();
+ impl_(*this, static_cast<T&&>(t)...);
+ }
+
+ void complete(Args... args)
+ {
+ this->work_.reset();
+ static_cast<Handler&&>(this->handler_)(static_cast<Args&&>(args)...);
+ }
+
+ void reset_cancellation_state()
+ {
+ base_from_cancellation_state<Handler>::reset_cancellation_state(handler_);
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(Filter&& filter)
+ {
+ base_from_cancellation_state<Handler>::reset_cancellation_state(handler_,
+ static_cast<Filter&&>(filter));
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter&& in_filter,
+ OutFilter&& out_filter)
+ {
+ base_from_cancellation_state<Handler>::reset_cancellation_state(handler_,
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
+ }
+
+ cancellation_type_t cancelled() const noexcept
+ {
+ return base_from_cancellation_state<Handler>::cancelled();
+ }
+
+//private:
+ Impl impl_;
+ Work work_;
+ Handler handler_;
+ unsigned invocations_;
+};
+
+template <typename Impl, typename Work, typename Handler, typename Signature>
+inline bool asio_handler_is_continuation(
+ composed_op<Impl, Work, Handler, Signature>* this_handler)
+{
+ return this_handler->invocations_ > 1 ? true
+ : boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Signature, typename Executors>
+class initiate_composed_op
+{
+public:
+ typedef typename composed_io_executors<Executors>::head_type executor_type;
+
+ template <typename T>
+ explicit initiate_composed_op(int, T&& executors)
+ : executors_(static_cast<T&&>(executors))
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executors_.head_;
+ }
+
+ template <typename Handler, typename Impl>
+ void operator()(Handler&& handler,
+ Impl&& impl) const
+ {
+ composed_op<decay_t<Impl>, composed_work<Executors>,
+ decay_t<Handler>, Signature>(
+ static_cast<Impl&&>(impl),
+ composed_work<Executors>(executors_),
+ static_cast<Handler&&>(handler))();
+ }
+
+private:
+ composed_io_executors<Executors> executors_;
+};
+
+template <typename Signature, typename Executors>
+inline initiate_composed_op<Signature, Executors> make_initiate_composed_op(
+ composed_io_executors<Executors>&& executors)
+{
+ return initiate_composed_op<Signature, Executors>(0,
+ static_cast<composed_io_executors<Executors>&&>(executors));
+}
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <template <typename, typename> class Associator,
+ typename Impl, typename Work, typename Handler,
+ typename Signature, typename DefaultCandidate>
+struct associator<Associator,
+ detail::composed_op<Impl, Work, Handler, Signature>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::composed_op<Impl, Work, Handler, Signature>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::composed_op<Impl, Work, Handler, Signature>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
/// Launch an asynchronous operation with a stateful implementation.
/**
@@ -91,8 +276,8 @@ namespace asio {
* template <typename CompletionToken>
* auto async_echo(tcp::socket& socket,
* boost::asio::mutable_buffer buffer,
- * CompletionToken&& token)
- * -> decltype(
+ * CompletionToken&& token) ->
+ * decltype(
* boost::asio::async_compose<CompletionToken,
* void(boost::system::error_code, std::size_t)>(
* std::declval<async_echo_implementation>(),
@@ -107,19 +292,25 @@ namespace asio {
*/
template <typename CompletionToken, typename Signature,
typename Implementation, typename... IoObjectsOrExecutors>
-inline auto async_compose(Implementation&& implementation,
+auto async_compose(Implementation&& implementation,
type_identity_t<CompletionToken>& token,
IoObjectsOrExecutors&&... io_objects_or_executors)
-> decltype(
async_initiate<CompletionToken, Signature>(
- composed<Signature>(static_cast<Implementation&&>(implementation),
- static_cast<IoObjectsOrExecutors&&>(io_objects_or_executors)...),
- token))
+ detail::make_initiate_composed_op<Signature>(
+ detail::make_composed_io_executors(
+ detail::get_composed_io_executor(
+ static_cast<IoObjectsOrExecutors&&>(
+ io_objects_or_executors))...)),
+ token, static_cast<Implementation&&>(implementation)))
{
return async_initiate<CompletionToken, Signature>(
- composed<Signature>(static_cast<Implementation&&>(implementation),
- static_cast<IoObjectsOrExecutors&&>(io_objects_or_executors)...),
- token);
+ detail::make_initiate_composed_op<Signature>(
+ detail::make_composed_io_executors(
+ detail::get_composed_io_executor(
+ static_cast<IoObjectsOrExecutors&&>(
+ io_objects_or_executors))...)),
+ token, static_cast<Implementation&&>(implementation));
}
} // namespace asio
diff --git a/contrib/restricted/boost/asio/include/boost/asio/composed.hpp b/contrib/restricted/boost/asio/include/boost/asio/composed.hpp
deleted file mode 100644
index bda14877593..00000000000
--- a/contrib/restricted/boost/asio/include/boost/asio/composed.hpp
+++ /dev/null
@@ -1,415 +0,0 @@
-//
-// composed.hpp
-// ~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_COMPOSED_HPP
-#define BOOST_ASIO_COMPOSED_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/base_from_cancellation_state.hpp>
-#include <boost/asio/detail/composed_work.hpp>
-#include <boost/asio/detail/handler_cont_helpers.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Impl, typename Work,
- typename Handler, typename... Signatures>
-class composed_op;
-
-template <typename Impl, typename Work, typename Handler>
-class composed_op<Impl, Work, Handler>
- : public base_from_cancellation_state<Handler>
-{
-public:
- template <typename I, typename W, typename H>
- composed_op(I&& impl,
- W&& work,
- H&& handler)
- : base_from_cancellation_state<Handler>(
- handler, enable_terminal_cancellation()),
- impl_(static_cast<I&&>(impl)),
- work_(static_cast<W&&>(work)),
- handler_(static_cast<H&&>(handler)),
- invocations_(0)
- {
- }
-
- composed_op(composed_op&& other)
- : base_from_cancellation_state<Handler>(
- static_cast<base_from_cancellation_state<Handler>&&>(other)),
- impl_(static_cast<Impl&&>(other.impl_)),
- work_(static_cast<Work&&>(other.work_)),
- handler_(static_cast<Handler&&>(other.handler_)),
- invocations_(other.invocations_)
- {
- }
-
- typedef typename composed_work_guard<
- typename Work::head_type>::executor_type io_executor_type;
-
- io_executor_type get_io_executor() const noexcept
- {
- return work_.head_.get_executor();
- }
-
- typedef associated_executor_t<Handler, io_executor_type> executor_type;
-
- executor_type get_executor() const noexcept
- {
- return (get_associated_executor)(handler_, work_.head_.get_executor());
- }
-
- typedef associated_allocator_t<Handler, std::allocator<void>> allocator_type;
-
- allocator_type get_allocator() const noexcept
- {
- return (get_associated_allocator)(handler_, std::allocator<void>());
- }
-
- template <typename... T>
- void operator()(T&&... t)
- {
- if (invocations_ < ~0u)
- ++invocations_;
- this->get_cancellation_state().slot().clear();
- impl_(*this, static_cast<T&&>(t)...);
- }
-
- template <typename... Args>
- auto complete(Args&&... args)
- -> decltype(declval<Handler>()(static_cast<Args&&>(args)...))
- {
- return static_cast<Handler&&>(this->handler_)(static_cast<Args&&>(args)...);
- }
-
- void reset_cancellation_state()
- {
- base_from_cancellation_state<Handler>::reset_cancellation_state(handler_);
- }
-
- template <typename Filter>
- void reset_cancellation_state(Filter&& filter)
- {
- base_from_cancellation_state<Handler>::reset_cancellation_state(handler_,
- static_cast<Filter&&>(filter));
- }
-
- template <typename InFilter, typename OutFilter>
- void reset_cancellation_state(InFilter&& in_filter,
- OutFilter&& out_filter)
- {
- base_from_cancellation_state<Handler>::reset_cancellation_state(handler_,
- static_cast<InFilter&&>(in_filter),
- static_cast<OutFilter&&>(out_filter));
- }
-
- cancellation_type_t cancelled() const noexcept
- {
- return base_from_cancellation_state<Handler>::cancelled();
- }
-
-//private:
- Impl impl_;
- Work work_;
- Handler handler_;
- unsigned invocations_;
-};
-
-template <typename Impl, typename Work, typename Handler,
- typename R, typename... Args>
-class composed_op<Impl, Work, Handler, R(Args...)>
- : public composed_op<Impl, Work, Handler>
-{
-public:
- using composed_op<Impl, Work, Handler>::composed_op;
-
- template <typename... T>
- void operator()(T&&... t)
- {
- if (this->invocations_ < ~0u)
- ++this->invocations_;
- this->get_cancellation_state().slot().clear();
- this->impl_(*this, static_cast<T&&>(t)...);
- }
-
- void complete(Args... args)
- {
- this->work_.reset();
- static_cast<Handler&&>(this->handler_)(static_cast<Args&&>(args)...);
- }
-};
-
-template <typename Impl, typename Work, typename Handler,
- typename R, typename... Args, typename... Signatures>
-class composed_op<Impl, Work, Handler, R(Args...), Signatures...>
- : public composed_op<Impl, Work, Handler, Signatures...>
-{
-public:
- using composed_op<Impl, Work, Handler, Signatures...>::composed_op;
-
- template <typename... T>
- void operator()(T&&... t)
- {
- if (this->invocations_ < ~0u)
- ++this->invocations_;
- this->get_cancellation_state().slot().clear();
- this->impl_(*this, static_cast<T&&>(t)...);
- }
-
- using composed_op<Impl, Work, Handler, Signatures...>::complete;
-
- void complete(Args... args)
- {
- this->work_.reset();
- static_cast<Handler&&>(this->handler_)(static_cast<Args&&>(args)...);
- }
-};
-
-template <typename Impl, typename Work, typename Handler, typename Signature>
-inline bool asio_handler_is_continuation(
- composed_op<Impl, Work, Handler, Signature>* this_handler)
-{
- return this_handler->invocations_ > 1 ? true
- : boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Implementation, typename Executors, typename... Signatures>
-class initiate_composed
-{
-public:
- typedef typename composed_io_executors<Executors>::head_type executor_type;
-
- template <typename I>
- initiate_composed(I&& impl, composed_io_executors<Executors>&& executors)
- : implementation_(std::forward<I>(impl)),
- executors_(std::move(executors))
- {
- }
-
- executor_type get_executor() const noexcept
- {
- return executors_.head_;
- }
-
- template <typename Handler, typename... Args>
- void operator()(Handler&& handler, Args&&... args) const &
- {
- composed_op<decay_t<Implementation>, composed_work<Executors>,
- decay_t<Handler>, Signatures...>(implementation_,
- composed_work<Executors>(executors_),
- static_cast<Handler&&>(handler))(static_cast<Args&&>(args)...);
- }
-
- template <typename Handler, typename... Args>
- void operator()(Handler&& handler, Args&&... args) &&
- {
- composed_op<decay_t<Implementation>, composed_work<Executors>,
- decay_t<Handler>, Signatures...>(
- static_cast<Implementation&&>(implementation_),
- composed_work<Executors>(executors_),
- static_cast<Handler&&>(handler))(static_cast<Args&&>(args)...);
- }
-
-private:
- Implementation implementation_;
- composed_io_executors<Executors> executors_;
-};
-
-template <typename Implementation, typename... Signatures>
-class initiate_composed<Implementation, void(), Signatures...>
-{
-public:
- template <typename I>
- initiate_composed(I&& impl, composed_io_executors<void()>&&)
- : implementation_(std::forward<I>(impl))
- {
- }
-
- template <typename Handler, typename... Args>
- void operator()(Handler&& handler, Args&&... args) const &
- {
- composed_op<decay_t<Implementation>, composed_work<void()>,
- decay_t<Handler>, Signatures...>(implementation_,
- composed_work<void()>(composed_io_executors<void()>()),
- static_cast<Handler&&>(handler))(static_cast<Args&&>(args)...);
- }
-
- template <typename Handler, typename... Args>
- void operator()(Handler&& handler, Args&&... args) &&
- {
- composed_op<decay_t<Implementation>, composed_work<void()>,
- decay_t<Handler>, Signatures...>(
- static_cast<Implementation&&>(implementation_),
- composed_work<void()>(composed_io_executors<void()>()),
- static_cast<Handler&&>(handler))(static_cast<Args&&>(args)...);
- }
-
-private:
- Implementation implementation_;
-};
-
-template <typename... Signatures, typename Implementation, typename Executors>
-inline initiate_composed<Implementation, Executors, Signatures...>
-make_initiate_composed(Implementation&& implementation,
- composed_io_executors<Executors>&& executors)
-{
- return initiate_composed<decay_t<Implementation>, Executors, Signatures...>(
- static_cast<Implementation&&>(implementation),
- static_cast<composed_io_executors<Executors>&&>(executors));
-}
-
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <template <typename, typename> class Associator,
- typename Impl, typename Work, typename Handler,
- typename Signature, typename DefaultCandidate>
-struct associator<Associator,
- detail::composed_op<Impl, Work, Handler, Signature>,
- DefaultCandidate>
- : Associator<Handler, DefaultCandidate>
-{
- static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::composed_op<Impl, Work, Handler, Signature>& h) noexcept
- {
- return Associator<Handler, DefaultCandidate>::get(h.handler_);
- }
-
- static auto get(const detail::composed_op<Impl, Work, Handler, Signature>& h,
- const DefaultCandidate& c) noexcept
- -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
- {
- return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-/// Creates an initiation function object that may be used to launch an
-/// asynchronous operation with a stateful implementation.
-/**
- * The @c composed function simplifies the implementation of composed
- * asynchronous operations automatically by wrapping a stateful function object
- * for use as an initiation function object.
- *
- * @param implementation A function object that contains the implementation of
- * the composed asynchronous operation. The first argument to the function
- * object is a non-const reference to the enclosing intermediate completion
- * handler. The remaining arguments are any arguments that originate from the
- * completion handlers of any asynchronous operations performed by the
- * implementation.
- *
- * @param io_objects_or_executors Zero or more I/O objects or I/O executors for
- * which outstanding work must be maintained.
- *
- * @par Per-Operation Cancellation
- * By default, terminal per-operation cancellation is enabled for composed
- * operations that are implemented using @c composed. To disable cancellation
- * for the composed operation, or to alter its supported cancellation types,
- * call the @c self object's @c reset_cancellation_state function.
- *
- * @par Example:
- *
- * @code struct async_echo_implementation
- * {
- * tcp::socket& socket_;
- * boost::asio::mutable_buffer buffer_;
- * enum { starting, reading, writing } state_;
- *
- * template <typename Self>
- * void operator()(Self& self,
- * boost::system::error_code error,
- * std::size_t n)
- * {
- * switch (state_)
- * {
- * case starting:
- * state_ = reading;
- * socket_.async_read_some(
- * buffer_, std::move(self));
- * break;
- * case reading:
- * if (error)
- * {
- * self.complete(error, 0);
- * }
- * else
- * {
- * state_ = writing;
- * boost::asio::async_write(socket_, buffer_,
- * boost::asio::transfer_exactly(n),
- * std::move(self));
- * }
- * break;
- * case writing:
- * self.complete(error, n);
- * break;
- * }
- * }
- * };
- *
- * template <typename CompletionToken>
- * auto async_echo(tcp::socket& socket,
- * boost::asio::mutable_buffer buffer,
- * CompletionToken&& token)
- * -> decltype(
- * boost::asio::async_initiate<CompletionToken,
- * void(boost::system::error_code, std::size_t)>(
- * boost::asio::composed(
- * async_echo_implementation{socket, buffer,
- * async_echo_implementation::starting}, socket),
- * token))
- * {
- * return boost::asio::async_initiate<CompletionToken,
- * void(boost::system::error_code, std::size_t)>(
- * boost::asio::composed(
- * async_echo_implementation{socket, buffer,
- * async_echo_implementation::starting}, socket),
- * token, boost::system::error_code{}, 0);
- * } @endcode
- */
-template <BOOST_ASIO_COMPLETION_SIGNATURE... Signatures,
- typename Implementation, typename... IoObjectsOrExecutors>
-inline auto composed(Implementation&& implementation,
- IoObjectsOrExecutors&&... io_objects_or_executors)
- -> decltype(
- detail::make_initiate_composed<Signatures...>(
- static_cast<Implementation&&>(implementation),
- detail::make_composed_io_executors(
- detail::get_composed_io_executor(
- static_cast<IoObjectsOrExecutors&&>(
- io_objects_or_executors))...)))
-{
- return detail::make_initiate_composed<Signatures...>(
- static_cast<Implementation&&>(implementation),
- detail::make_composed_io_executors(
- detail::get_composed_io_executor(
- static_cast<IoObjectsOrExecutors&&>(
- io_objects_or_executors))...));
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_COMPOSE_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/connect.hpp b/contrib/restricted/boost/asio/include/boost/asio/connect.hpp
index 3d135750a55..5e8f5efc170 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/connect.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/connect.hpp
@@ -32,97 +32,34 @@ namespace detail
template <typename, typename> class initiate_async_range_connect;
template <typename, typename> class initiate_async_iterator_connect;
- template <typename T, typename = void, typename = void>
- struct is_endpoint_sequence_helper : false_type
- {
- };
+ char (&has_iterator_helper(...))[2];
template <typename T>
- struct is_endpoint_sequence_helper<T,
- void_t<
- decltype(declval<T>().begin())
- >,
- void_t<
- decltype(declval<T>().end())
- >
- > : true_type
- {
- };
-
- template <typename T, typename Iterator, typename = void>
- struct is_connect_condition_helper : false_type
- {
- };
-
- template <typename T, typename Iterator>
- struct is_connect_condition_helper<T, Iterator,
- enable_if_t<
- is_same<
- result_of_t<T(boost::system::error_code, Iterator)>,
- Iterator
- >::value
- >
- > : true_type
- {
- };
+ char has_iterator_helper(T*, typename T::iterator* = 0);
- template <typename T, typename Iterator>
- struct is_connect_condition_helper<T, Iterator,
- enable_if_t<
- is_same<
- result_of_t<T(boost::system::error_code,
- decltype(*declval<Iterator>()))>,
- bool
- >::value
- >
- > : true_type
- {
- };
-
- struct default_connect_condition
+ template <typename T>
+ struct has_iterator_typedef
{
- template <typename Endpoint>
- bool operator()(const boost::system::error_code&, const Endpoint&)
- {
- return true;
- }
+ enum { value = (sizeof((has_iterator_helper)((T*)(0))) == 1) };
};
} // namespace detail
-#if defined(GENERATING_DOCUMENTATION)
-
/// Type trait used to determine whether a type is an endpoint sequence that can
/// be used with with @c connect and @c async_connect.
template <typename T>
struct is_endpoint_sequence
{
+#if defined(GENERATING_DOCUMENTATION)
/// The value member is true if the type may be used as an endpoint sequence.
- static const bool value = automatically_determined;
-};
-
-/// Trait for determining whether a function object is a connect condition that
-/// can be used with @c connect and @c async_connect.
-template <typename T, typename Iterator>
-struct is_connect_condition
-{
- /// The value member is true if the type may be used as a connect condition.
- static constexpr bool value = automatically_determined;
-};
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-template <typename T>
-struct is_endpoint_sequence : detail::is_endpoint_sequence_helper<T>
-{
-};
-
-template <typename T, typename Iterator>
-struct is_connect_condition : detail::is_connect_condition_helper<T, Iterator>
-{
+ static const bool value;
+#else
+ enum
+ {
+ value = detail::has_iterator_typedef<T>::value
+ };
+#endif
};
-#endif // defined(GENERATING_DOCUMENTATION)
-
/**
* @defgroup connect boost::asio::connect
*
@@ -158,9 +95,7 @@ struct is_connect_condition : detail::is_connect_condition_helper<T, Iterator>
template <typename Protocol, typename Executor, typename EndpointSequence>
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints,
- constraint_t<
- is_endpoint_sequence<EndpointSequence>::value
- > = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
/// Establishes a socket connection by trying each endpoint in a sequence.
/**
@@ -195,9 +130,7 @@ typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
template <typename Protocol, typename Executor, typename EndpointSequence>
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, boost::system::error_code& ec,
- constraint_t<
- is_endpoint_sequence<EndpointSequence>::value
- > = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
#if !defined(BOOST_ASIO_NO_DEPRECATED)
/// (Deprecated: Use range overload.) Establishes a socket connection by trying
@@ -226,9 +159,7 @@ typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
*/
template <typename Protocol, typename Executor, typename Iterator>
Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
- constraint_t<
- !is_endpoint_sequence<Iterator>::value
- > = 0);
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
/// (Deprecated: Use range overload.) Establishes a socket connection by trying
/// each endpoint in a sequence.
@@ -257,9 +188,7 @@ Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
template <typename Protocol, typename Executor, typename Iterator>
Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, boost::system::error_code& ec,
- constraint_t<
- !is_endpoint_sequence<Iterator>::value
- > = 0);
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
/// Establishes a socket connection by trying each endpoint in a sequence.
@@ -385,13 +314,7 @@ template <typename Protocol, typename Executor,
typename EndpointSequence, typename ConnectCondition>
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
- constraint_t<
- is_endpoint_sequence<EndpointSequence>::value
- > = 0,
- constraint_t<
- is_connect_condition<ConnectCondition,
- decltype(declval<const EndpointSequence&>().begin())>::value
- > = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
/// Establishes a socket connection by trying each endpoint in a sequence.
/**
@@ -458,13 +381,7 @@ template <typename Protocol, typename Executor,
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
boost::system::error_code& ec,
- constraint_t<
- is_endpoint_sequence<EndpointSequence>::value
- > = 0,
- constraint_t<
- is_connect_condition<ConnectCondition,
- decltype(declval<const EndpointSequence&>().begin())>::value
- > = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
#if !defined(BOOST_ASIO_NO_DEPRECATED)
/// (Deprecated: Use range overload.) Establishes a socket connection by trying
@@ -506,12 +423,7 @@ template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, ConnectCondition connect_condition,
- constraint_t<
- !is_endpoint_sequence<Iterator>::value
- > = 0,
- constraint_t<
- is_connect_condition<ConnectCondition, Iterator>::value
- > = 0);
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
/// (Deprecated: Use range overload.) Establishes a socket connection by trying
/// each endpoint in a sequence.
@@ -552,12 +464,7 @@ template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
ConnectCondition connect_condition, boost::system::error_code& ec,
- constraint_t<
- !is_endpoint_sequence<Iterator>::value
- > = 0,
- constraint_t<
- is_connect_condition<ConnectCondition, Iterator>::value
- > = 0);
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
/// Establishes a socket connection by trying each endpoint in a sequence.
@@ -617,10 +524,7 @@ Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
- Iterator end, ConnectCondition connect_condition,
- constraint_t<
- is_connect_condition<ConnectCondition, Iterator>::value
- > = 0);
+ Iterator end, ConnectCondition connect_condition);
/// Establishes a socket connection by trying each endpoint in a sequence.
/**
@@ -689,10 +593,7 @@ template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, Iterator end, ConnectCondition connect_condition,
- boost::system::error_code& ec,
- constraint_t<
- is_connect_condition<ConnectCondition, Iterator>::value
- > = 0);
+ boost::system::error_code& ec);
/*@}*/
@@ -736,7 +637,7 @@ Iterator connect(basic_socket<Protocol, Executor>& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, typename Protocol::endpoint) @endcode
@@ -785,27 +686,15 @@ template <typename Protocol, typename Executor, typename EndpointSequence,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
typename Protocol::endpoint)) RangeConnectToken
= default_completion_token_t<Executor>>
-inline auto async_connect(basic_socket<Protocol, Executor>& s,
+auto async_connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints,
RangeConnectToken&& token = default_completion_token_t<Executor>(),
- constraint_t<
- is_endpoint_sequence<EndpointSequence>::value
- > = 0,
- constraint_t<
- !is_connect_condition<RangeConnectToken,
- decltype(declval<const EndpointSequence&>().begin())>::value
- > = 0)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0)
-> decltype(
async_initiate<RangeConnectToken,
void (boost::system::error_code, typename Protocol::endpoint)>(
declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
- token, endpoints, declval<detail::default_connect_condition>()))
-{
- return async_initiate<RangeConnectToken,
- void (boost::system::error_code, typename Protocol::endpoint)>(
- detail::initiate_async_range_connect<Protocol, Executor>(s),
- token, endpoints, detail::default_connect_condition());
-}
+ token, endpoints, declval<detail::default_connect_condition>()));
#if !defined(BOOST_ASIO_NO_DEPRECATED)
/// (Deprecated: Use range overload.) Asynchronously establishes a socket
@@ -840,7 +729,7 @@ inline auto async_connect(basic_socket<Protocol, Executor>& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, Iterator) @endcode
@@ -862,29 +751,15 @@ inline auto async_connect(basic_socket<Protocol, Executor>& s,
template <typename Protocol, typename Executor, typename Iterator,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
-inline auto async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+auto async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
IteratorConnectToken&& token = default_completion_token_t<Executor>(),
- constraint_t<
- !is_endpoint_sequence<Iterator>::value
- > = 0,
- constraint_t<
- !is_same<Iterator, decay_t<IteratorConnectToken>>::value
- > = 0,
- constraint_t<
- !is_connect_condition<IteratorConnectToken, Iterator>::value
- > = 0)
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0)
-> decltype(
async_initiate<IteratorConnectToken,
void (boost::system::error_code, Iterator)>(
declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
token, begin, Iterator(),
- declval<detail::default_connect_condition>()))
-{
- return async_initiate<IteratorConnectToken,
- void (boost::system::error_code, Iterator)>(
- detail::initiate_async_iterator_connect<Protocol, Executor>(s),
- token, begin, Iterator(), detail::default_connect_condition());
-}
+ declval<detail::default_connect_condition>()));
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
/// Asynchronously establishes a socket connection by trying each endpoint in a
@@ -921,7 +796,7 @@ inline auto async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, Iterator) @endcode
@@ -955,23 +830,14 @@ inline auto async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
template <typename Protocol, typename Executor, typename Iterator,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
-inline auto async_connect(
+auto async_connect(
basic_socket<Protocol, Executor>& s, Iterator begin, Iterator end,
- IteratorConnectToken&& token = default_completion_token_t<Executor>(),
- constraint_t<
- !is_connect_condition<IteratorConnectToken, Iterator>::value
- > = 0)
+ IteratorConnectToken&& token = default_completion_token_t<Executor>())
-> decltype(
async_initiate<IteratorConnectToken,
void (boost::system::error_code, Iterator)>(
declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
- token, begin, end, declval<detail::default_connect_condition>()))
-{
- return async_initiate<IteratorConnectToken,
- void (boost::system::error_code, Iterator)>(
- detail::initiate_async_iterator_connect<Protocol, Executor>(s),
- token, begin, end, detail::default_connect_condition());
-}
+ token, begin, end, declval<detail::default_connect_condition>()));
/// Asynchronously establishes a socket connection by trying each endpoint in a
/// sequence.
@@ -1016,7 +882,7 @@ inline auto async_connect(
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, typename Protocol::endpoint) @endcode
@@ -1089,27 +955,15 @@ template <typename Protocol, typename Executor,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
typename Protocol::endpoint)) RangeConnectToken
= default_completion_token_t<Executor>>
-inline auto async_connect(basic_socket<Protocol, Executor>& s,
+auto async_connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
RangeConnectToken&& token = default_completion_token_t<Executor>(),
- constraint_t<
- is_endpoint_sequence<EndpointSequence>::value
- > = 0,
- constraint_t<
- is_connect_condition<ConnectCondition,
- decltype(declval<const EndpointSequence&>().begin())>::value
- > = 0)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0)
-> decltype(
async_initiate<RangeConnectToken,
void (boost::system::error_code, typename Protocol::endpoint)>(
declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
- token, endpoints, connect_condition))
-{
- return async_initiate<RangeConnectToken,
- void (boost::system::error_code, typename Protocol::endpoint)>(
- detail::initiate_async_range_connect<Protocol, Executor>(s),
- token, endpoints, connect_condition);
-}
+ token, endpoints, connect_condition));
#if !defined(BOOST_ASIO_NO_DEPRECATED)
/// (Deprecated: Use range overload.) Asynchronously establishes a socket
@@ -1155,7 +1009,7 @@ inline auto async_connect(basic_socket<Protocol, Executor>& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, Iterator) @endcode
@@ -1178,26 +1032,15 @@ template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
-inline auto async_connect(basic_socket<Protocol, Executor>& s,
+auto async_connect(basic_socket<Protocol, Executor>& s,
Iterator begin, ConnectCondition connect_condition,
IteratorConnectToken&& token = default_completion_token_t<Executor>(),
- constraint_t<
- !is_endpoint_sequence<Iterator>::value
- > = 0,
- constraint_t<
- is_connect_condition<ConnectCondition, Iterator>::value
- > = 0)
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0)
-> decltype(
async_initiate<IteratorConnectToken,
void (boost::system::error_code, Iterator)>(
declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
- token, begin, Iterator(), connect_condition))
-{
- return async_initiate<IteratorConnectToken,
- void (boost::system::error_code, Iterator)>(
- detail::initiate_async_iterator_connect<Protocol, Executor>(s),
- token, begin, Iterator(), connect_condition);
-}
+ token, begin, Iterator(), connect_condition));
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
/// Asynchronously establishes a socket connection by trying each endpoint in a
@@ -1245,7 +1088,7 @@ inline auto async_connect(basic_socket<Protocol, Executor>& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, Iterator) @endcode
@@ -1318,23 +1161,14 @@ template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
-inline auto async_connect(basic_socket<Protocol, Executor>& s,
+auto async_connect(basic_socket<Protocol, Executor>& s,
Iterator begin, Iterator end, ConnectCondition connect_condition,
- IteratorConnectToken&& token = default_completion_token_t<Executor>(),
- constraint_t<
- is_connect_condition<ConnectCondition, Iterator>::value
- > = 0)
+ IteratorConnectToken&& token = default_completion_token_t<Executor>())
-> decltype(
async_initiate<IteratorConnectToken,
void (boost::system::error_code, Iterator)>(
declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
- token, begin, end, connect_condition))
-{
- return async_initiate<IteratorConnectToken,
- void (boost::system::error_code, Iterator)>(
- detail::initiate_async_iterator_connect<Protocol, Executor>(s),
- token, begin, end, connect_condition);
-}
+ token, begin, end, connect_condition));
/*@}*/
@@ -1345,4 +1179,4 @@ inline auto async_connect(basic_socket<Protocol, Executor>& s,
#include <boost/asio/impl/connect.hpp>
-#endif // BOOST_ASIO_CONNECT_HPP
+#endif
diff --git a/contrib/restricted/boost/asio/include/boost/asio/coroutine.hpp b/contrib/restricted/boost/asio/include/boost/asio/coroutine.hpp
index 7f37866c20b..72ddd21e5ca 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/coroutine.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/coroutine.hpp
@@ -201,7 +201,7 @@ class coroutine_ref;
* The @c fork pseudo-keyword is used when "forking" a coroutine, i.e. splitting
* it into two (or more) copies. One use of @c fork is in a server, where a new
* coroutine is created to handle each client connection:
- *
+ *
* @code reenter (this)
* {
* do
@@ -212,9 +212,9 @@ class coroutine_ref;
* } while (is_parent());
* ... client-specific handling follows ...
* } @endcode
- *
+ *
* The logical steps involved in a @c fork are:
- *
+ *
* @li @c fork saves the current state of the coroutine.
* @li The statement creates a copy of the coroutine and either executes it
* immediately or schedules it for later execution.
@@ -259,6 +259,7 @@ private:
int value_;
};
+
namespace detail {
class coroutine_ref
diff --git a/contrib/restricted/boost/asio/include/boost/asio/default_completion_token.hpp b/contrib/restricted/boost/asio/include/boost/asio/default_completion_token.hpp
deleted file mode 100644
index f7a41ccff71..00000000000
--- a/contrib/restricted/boost/asio/include/boost/asio/default_completion_token.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// default_completion_token.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_HPP
-#define BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-class deferred_t;
-
-namespace detail {
-
-template <typename T, typename = void>
-struct default_completion_token_impl
-{
- typedef deferred_t type;
-};
-
-template <typename T>
-struct default_completion_token_impl<T,
- void_t<typename T::default_completion_token_type>
- >
-{
- typedef typename T::default_completion_token_type type;
-};
-
-} // namespace detail
-
-#if defined(GENERATING_DOCUMENTATION)
-
-/// Traits type used to determine the default completion token type associated
-/// with a type (such as an executor).
-/**
- * A program may specialise this traits type if the @c T template parameter in
- * the specialisation is a user-defined type.
- *
- * Specialisations of this trait may provide a nested typedef @c type, which is
- * a default-constructible completion token type.
- *
- * If not otherwise specialised, the default completion token type is
- * boost::asio::deferred_t.
- */
-template <typename T>
-struct default_completion_token
-{
- /// If @c T has a nested type @c default_completion_token_type,
- /// <tt>T::default_completion_token_type</tt>. Otherwise the typedef @c type
- /// is boost::asio::deferred_t.
- typedef see_below type;
-};
-#else
-template <typename T>
-struct default_completion_token
- : detail::default_completion_token_impl<T>
-{
-};
-#endif
-
-template <typename T>
-using default_completion_token_t = typename default_completion_token<T>::type;
-
-#define BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(e) \
- = typename ::boost::asio::default_completion_token<e>::type
-#define BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(e) \
- = typename ::boost::asio::default_completion_token<e>::type()
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/deferred.hpp>
-
-#endif // BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/deferred.hpp b/contrib/restricted/boost/asio/include/boost/asio/deferred.hpp
index dfb8e51febf..4e69a494fc5 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/deferred.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/deferred.hpp
@@ -185,7 +185,7 @@ template <typename Function>
class deferred_function
{
public:
- /// Constructor.
+ /// Constructor.
template <typename F>
constexpr explicit deferred_function(deferred_init_tag, F&& function)
: function_(static_cast<F&&>(function))
@@ -326,8 +326,7 @@ private:
detail::index_sequence<I...>) const &
-> decltype(
async_initiate<CompletionToken, Signature>(
- conditional_t<true, initiation_t, CompletionToken>(initiation_),
- token, std::get<I>(init_args_)...))
+ initiation_t(initiation_), token, std::get<I>(init_args_)...))
{
return async_initiate<CompletionToken, Signature>(
initiation_t(initiation_), token, std::get<I>(init_args_)...);
@@ -594,11 +593,8 @@ struct is_deferred<deferred_conditional<OnTrue, OnFalse>> : true_type
* The deferred_t class is used to indicate that an asynchronous operation
* should return a function object which is itself an initiation function. A
* deferred_t object may be passed as a completion token to an asynchronous
- * operation, typically as the default completion token:
- *
- * @code auto my_deferred_op = my_socket.async_read_some(my_buffer); @endcode
- *
- * or by explicitly passing the special value @c boost::asio::deferred:
+ * operation, typically using the special value @c boost::asio::deferred. For
+ * example:
*
* @code auto my_deferred_op
* = my_socket.async_read_some(my_buffer,
@@ -709,7 +705,7 @@ inline auto operator|(Head head, Tail&& tail)
/**
* See the documentation for boost::asio::deferred_t for a usage example.
*/
-BOOST_ASIO_INLINE_VARIABLE constexpr deferred_t deferred;
+constexpr deferred_t deferred;
} // namespace asio
} // namespace boost
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detached.hpp b/contrib/restricted/boost/asio/include/boost/asio/detached.hpp
index d0dfce729df..82062e942e0 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detached.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detached.hpp
@@ -39,7 +39,7 @@ namespace asio {
class detached_t
{
public:
- /// Constructor.
+ /// Constructor.
constexpr detached_t()
{
}
@@ -95,7 +95,7 @@ public:
/**
* See the documentation for boost::asio::detached_t for a usage example.
*/
-BOOST_ASIO_INLINE_VARIABLE constexpr detached_t detached;
+constexpr detached_t detached;
} // namespace asio
} // namespace boost
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/buffered_stream_storage.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/buffered_stream_storage.hpp
index 096efc82f8b..e828232deb0 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/buffered_stream_storage.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/buffered_stream_storage.hpp
@@ -114,7 +114,7 @@ private:
// The offset to the end of the unread data.
size_type end_offset_;
-
+
// The data in the buffer.
std::vector<byte_type> buffer_;
};
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp
index 1f02721999d..42cce009052 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp
@@ -341,19 +341,6 @@
# endif // !defined(BOOST_ASIO_DISABLE_VARIADIC_LAMBDA_CAPTURES)
#endif // !defined(BOOST_ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
-// Support for inline variables.
-#if !defined(BOOST_ASIO_HAS_INLINE_VARIABLES)
-# if !defined(BOOST_ASIO_DISABLE_INLINE_VARIABLES)
-# if (__cplusplus >= 201703) && (__cpp_inline_variables >= 201606)
-# define BOOST_ASIO_HAS_INLINE_VARIABLES 1
-# define BOOST_ASIO_INLINE_VARIABLE inline
-# endif // (__cplusplus >= 201703) && (__cpp_inline_variables >= 201606)
-# endif // !defined(BOOST_ASIO_DISABLE_INLINE_VARIABLES)
-#endif // !defined(BOOST_ASIO_HAS_INLINE_VARIABLES)
-#if !defined(BOOST_ASIO_INLINE_VARIABLE)
-# define BOOST_ASIO_INLINE_VARIABLE
-#endif // !defined(BOOST_ASIO_INLINE_VARIABLE)
-
// Default alignment.
#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
# define BOOST_ASIO_DEFAULT_ALIGN __STDCPP_DEFAULT_NEW_ALIGNMENT__
@@ -375,9 +362,7 @@
# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
# if (_LIBCPP_STD_VER > 14) && defined(_LIBCPP_HAS_ALIGNED_ALLOC) \
&& !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__)
-# if defined(__ANDROID__) && (__ANDROID_API__ >= 28)
-# define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
-# elif defined(__APPLE__)
+# if defined(__APPLE__)
# if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
# if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
# define BOOST_ASIO_HAS_STD_ALIGNED_ALLOC 1
@@ -547,9 +532,9 @@
# define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1
# endif // (_MSC_VER >= 1911 && _MSVC_LANG >= 201703)
# else // defined(BOOST_ASIO_MSVC)
-# if (__cplusplus >= 201703) && (__cpp_lib_is_invocable >= 201703)
+# if (__cplusplus >= 201703)
# define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1
-# endif // (__cplusplus >= 201703) && (__cpp_lib_is_invocable >= 201703)
+# endif // (__cplusplus >= 201703)
# endif // defined(BOOST_ASIO_MSVC)
# endif // !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT)
#endif // !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
@@ -1290,10 +1275,7 @@
// Support the co_await keyword on compilers known to allow it.
#if !defined(BOOST_ASIO_HAS_CO_AWAIT)
# if !defined(BOOST_ASIO_DISABLE_CO_AWAIT)
-# if (__cplusplus >= 202002) \
- && (__cpp_impl_coroutine >= 201902) && (__cpp_lib_coroutine >= 201902)
-# define BOOST_ASIO_HAS_CO_AWAIT 1
-# elif defined(BOOST_ASIO_MSVC)
+# if defined(BOOST_ASIO_MSVC)
# if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) && !defined(__clang__)
# define BOOST_ASIO_HAS_CO_AWAIT 1
# elif (_MSC_FULL_VER >= 190023506)
@@ -1405,8 +1387,10 @@
#if !defined(BOOST_ASIO_HAS_SNPRINTF)
# if !defined(BOOST_ASIO_DISABLE_SNPRINTF)
# if defined(__APPLE__)
-# define BOOST_ASIO_HAS_SNPRINTF 1
-# endif // defined(__APPLE__)
+# if (__clang_major__ >= 14)
+# define BOOST_ASIO_HAS_SNPRINTF 1
+# endif // (__clang_major__ >= 14)
+# endif // defined(__apple_build_version__)
# endif // !defined(BOOST_ASIO_DISABLE_SNPRINTF)
#endif // !defined(BOOST_ASIO_HAS_SNPRINTF)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/deadline_timer_service.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/deadline_timer_service.hpp
index 72059ce725c..ee7fa97a691 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/deadline_timer_service.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/deadline_timer_service.hpp
@@ -104,11 +104,7 @@ public:
void move_construct(implementation_type& impl,
implementation_type& other_impl)
{
- if (other_impl.might_have_pending_waits)
- {
- scheduler_.move_timer(timer_queue_,
- impl.timer_data, other_impl.timer_data);
- }
+ scheduler_.move_timer(timer_queue_, impl.timer_data, other_impl.timer_data);
impl.expiry = other_impl.expiry;
other_impl.expiry = time_type();
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/handler_alloc_helpers.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/handler_alloc_helpers.hpp
index 6c0a37ca35a..7b999085db9 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/handler_alloc_helpers.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/handler_alloc_helpers.hpp
@@ -17,12 +17,121 @@
#include <boost/asio/detail/config.hpp>
#include <boost/asio/detail/memory.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
#include <boost/asio/detail/recycling_allocator.hpp>
+#include <boost/asio/detail/thread_info_base.hpp>
#include <boost/asio/associated_allocator.hpp>
#include <boost/asio/detail/push_options.hpp>
-#define BOOST_ASIO_DEFINE_TAGGED_HANDLER_PTR(purpose, op) \
+namespace boost {
+namespace asio {
+namespace detail {
+
+inline void* default_allocate(std::size_t s,
+ std::size_t align = BOOST_ASIO_DEFAULT_ALIGN)
+{
+#if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ return boost::asio::detail::thread_info_base::allocate(
+ boost::asio::detail::thread_context::top_of_thread_call_stack(),
+ s, align);
+#else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ return boost::asio::aligned_new(align, s);
+#endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+}
+
+inline void default_deallocate(void* p, std::size_t s)
+{
+#if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ boost::asio::detail::thread_info_base::deallocate(
+ boost::asio::detail::thread_context::top_of_thread_call_stack(), p, s);
+#else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ (void)s;
+ boost::asio::aligned_delete(p);
+#endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+}
+
+template <typename T>
+class default_allocator
+{
+public:
+ typedef T value_type;
+
+ template <typename U>
+ struct rebind
+ {
+ typedef default_allocator<U> other;
+ };
+
+ default_allocator() noexcept
+ {
+ }
+
+ template <typename U>
+ default_allocator(const default_allocator<U>&) noexcept
+ {
+ }
+
+ T* allocate(std::size_t n)
+ {
+ return static_cast<T*>(default_allocate(sizeof(T) * n, alignof(T)));
+ }
+
+ void deallocate(T* p, std::size_t n)
+ {
+ default_deallocate(p, sizeof(T) * n);
+ }
+};
+
+template <>
+class default_allocator<void>
+{
+public:
+ typedef void value_type;
+
+ template <typename U>
+ struct rebind
+ {
+ typedef default_allocator<U> other;
+ };
+
+ default_allocator() noexcept
+ {
+ }
+
+ template <typename U>
+ default_allocator(const default_allocator<U>&) noexcept
+ {
+ }
+};
+
+template <typename Allocator>
+struct get_default_allocator
+{
+ typedef Allocator type;
+
+ static type get(const Allocator& a)
+ {
+ return a;
+ }
+};
+
+template <typename T>
+struct get_default_allocator<std::allocator<T>>
+{
+ typedef default_allocator<T> type;
+
+ static type get(const std::allocator<T>&)
+ {
+ return type();
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#define BOOST_ASIO_DEFINE_HANDLER_PTR(op) \
struct ptr \
{ \
Handler* h; \
@@ -36,11 +145,11 @@
{ \
typedef typename ::boost::asio::associated_allocator< \
Handler>::type associated_allocator_type; \
- typedef typename ::boost::asio::detail::get_recycling_allocator< \
- associated_allocator_type, purpose>::type default_allocator_type; \
+ typedef typename ::boost::asio::detail::get_default_allocator< \
+ associated_allocator_type>::type default_allocator_type; \
BOOST_ASIO_REBIND_ALLOC(default_allocator_type, op) a( \
- ::boost::asio::detail::get_recycling_allocator< \
- associated_allocator_type, purpose>::get( \
+ ::boost::asio::detail::get_default_allocator< \
+ associated_allocator_type>::get( \
::boost::asio::get_associated_allocator(handler))); \
return a.allocate(1); \
} \
@@ -55,11 +164,11 @@
{ \
typedef typename ::boost::asio::associated_allocator< \
Handler>::type associated_allocator_type; \
- typedef typename ::boost::asio::detail::get_recycling_allocator< \
- associated_allocator_type, purpose>::type default_allocator_type; \
+ typedef typename ::boost::asio::detail::get_default_allocator< \
+ associated_allocator_type>::type default_allocator_type; \
BOOST_ASIO_REBIND_ALLOC(default_allocator_type, op) a( \
- ::boost::asio::detail::get_recycling_allocator< \
- associated_allocator_type, purpose>::get( \
+ ::boost::asio::detail::get_default_allocator< \
+ associated_allocator_type>::get( \
::boost::asio::get_associated_allocator(*h))); \
a.deallocate(static_cast<op*>(v), 1); \
v = 0; \
@@ -68,11 +177,6 @@
} \
/**/
-#define BOOST_ASIO_DEFINE_HANDLER_PTR(op) \
- BOOST_ASIO_DEFINE_TAGGED_HANDLER_PTR( \
- ::boost::asio::detail::thread_info_base::default_tag, op ) \
- /**/
-
#define BOOST_ASIO_DEFINE_TAGGED_HANDLER_ALLOCATOR_PTR(purpose, op) \
struct ptr \
{ \
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/descriptor_ops.ipp b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/descriptor_ops.ipp
index b60835bc0cd..204fe60005b 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/descriptor_ops.ipp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/descriptor_ops.ipp
@@ -70,24 +70,25 @@ int close(int d, state_type& state, boost::system::error_code& ec)
::fcntl(d, F_SETFL, flags & ~O_NONBLOCK);
#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = 0;
- if ((state & possible_dup) == 0)
- {
- result = ::ioctl(d, FIONBIO, &arg);
- get_last_error(ec, result < 0);
- }
- if ((state & possible_dup) != 0
-# if defined(ENOTTY)
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ result = ::ioctl(d, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+ if (false
+# if defined(ENOTTY)
|| ec.value() == ENOTTY
-# endif // defined(ENOTTY)
-# if defined(ENOTCAPABLE)
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
|| ec.value() == ENOTCAPABLE
-# endif // defined(ENOTCAPABLE)
+# endif // defined(ENOTCAPABLE)
)
{
int flags = ::fcntl(d, F_GETFL, 0);
if (flags >= 0)
::fcntl(d, F_SETFL, flags & ~O_NONBLOCK);
}
+# else // defined(ENOTTY) || defined(ENOTCAPABLE)
+ ::ioctl(d, FIONBIO, &arg);
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
#endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
state &= ~non_blocking;
@@ -114,24 +115,21 @@ bool set_user_non_blocking(int d, state_type& state,
if (result >= 0)
{
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = (flag != result) ? ::fcntl(d, F_SETFL, flag) : 0;
+ result = ::fcntl(d, F_SETFL, flag);
get_last_error(ec, result < 0);
}
#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = (value ? 1 : 0);
- int result = 0;
- if ((state & possible_dup) == 0)
- {
- result = ::ioctl(d, FIONBIO, &arg);
- get_last_error(ec, result < 0);
- }
- if ((state & possible_dup) != 0
-# if defined(ENOTTY)
+ int result = ::ioctl(d, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ if (false
+# if defined(ENOTTY)
|| ec.value() == ENOTTY
-# endif // defined(ENOTTY)
-# if defined(ENOTCAPABLE)
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
|| ec.value() == ENOTCAPABLE
-# endif // defined(ENOTCAPABLE)
+# endif // defined(ENOTCAPABLE)
)
{
result = ::fcntl(d, F_GETFL, 0);
@@ -139,10 +137,11 @@ bool set_user_non_blocking(int d, state_type& state,
if (result >= 0)
{
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = (flag != result) ? ::fcntl(d, F_SETFL, flag) : 0;
+ result = ::fcntl(d, F_SETFL, flag);
get_last_error(ec, result < 0);
}
}
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
#endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
if (result >= 0)
@@ -186,24 +185,21 @@ bool set_internal_non_blocking(int d, state_type& state,
if (result >= 0)
{
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = (flag != result) ? ::fcntl(d, F_SETFL, flag) : 0;
+ result = ::fcntl(d, F_SETFL, flag);
get_last_error(ec, result < 0);
}
#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = (value ? 1 : 0);
- int result = 0;
- if ((state & possible_dup) == 0)
- {
- result = ::ioctl(d, FIONBIO, &arg);
- get_last_error(ec, result < 0);
- }
- if ((state & possible_dup) != 0
-# if defined(ENOTTY)
+ int result = ::ioctl(d, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ if (false
+# if defined(ENOTTY)
|| ec.value() == ENOTTY
-# endif // defined(ENOTTY)
-# if defined(ENOTCAPABLE)
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
|| ec.value() == ENOTCAPABLE
-# endif // defined(ENOTCAPABLE)
+# endif // defined(ENOTCAPABLE)
)
{
result = ::fcntl(d, F_GETFL, 0);
@@ -211,10 +207,11 @@ bool set_internal_non_blocking(int d, state_type& state,
if (result >= 0)
{
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = (flag != result) ? ::fcntl(d, F_SETFL, flag) : 0;
+ result = ::fcntl(d, F_SETFL, flag);
get_last_error(ec, result < 0);
}
}
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
#endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
if (result >= 0)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/dev_poll_reactor.ipp b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/dev_poll_reactor.ipp
index e50f696d486..30647d6d40c 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/dev_poll_reactor.ipp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/dev_poll_reactor.ipp
@@ -67,7 +67,7 @@ void dev_poll_reactor::shutdown()
timer_queues_.get_all_timers(ops);
scheduler_.abandon_operations(ops);
-}
+}
void dev_poll_reactor::notify_fork(
boost::asio::execution_context::fork_event fork_ev)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/reactive_descriptor_service.ipp b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/reactive_descriptor_service.ipp
index 858a135b382..292c60de7b9 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/reactive_descriptor_service.ipp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/reactive_descriptor_service.ipp
@@ -199,20 +199,18 @@ boost::system::error_code reactive_descriptor_service::cancel(
}
void reactive_descriptor_service::do_start_op(implementation_type& impl,
- int op_type, reactor_op* op, bool is_continuation,
- bool allow_speculative, bool noop, bool needs_non_blocking,
- void (*on_immediate)(operation* op, bool, const void*),
+ int op_type, reactor_op* op, bool is_continuation, bool is_non_blocking,
+ bool noop, void (*on_immediate)(operation* op, bool, const void*),
const void* immediate_arg)
{
if (!noop)
{
- if ((impl.state_ & descriptor_ops::non_blocking)
- || !needs_non_blocking
- || descriptor_ops::set_internal_non_blocking(
+ if ((impl.state_ & descriptor_ops::non_blocking) ||
+ descriptor_ops::set_internal_non_blocking(
impl.descriptor_, impl.state_, true, op->ec_))
{
reactor_.start_op(op_type, impl.descriptor_, impl.reactor_data_, op,
- is_continuation, allow_speculative, on_immediate, immediate_arg);
+ is_continuation, is_non_blocking, on_immediate, immediate_arg);
return;
}
}
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/reactive_socket_service_base.ipp b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/reactive_socket_service_base.ipp
index 22f6ba3a6d5..6cf1197eae8 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/reactive_socket_service_base.ipp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/reactive_socket_service_base.ipp
@@ -235,21 +235,19 @@ boost::system::error_code reactive_socket_service_base::do_assign(
}
void reactive_socket_service_base::do_start_op(
- reactive_socket_service_base::base_implementation_type& impl,
- int op_type, reactor_op* op, bool is_continuation,
- bool allow_speculative, bool noop, bool needs_non_blocking,
+ reactive_socket_service_base::base_implementation_type& impl, int op_type,
+ reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop,
void (*on_immediate)(operation* op, bool, const void*),
const void* immediate_arg)
{
if (!noop)
{
if ((impl.state_ & socket_ops::non_blocking)
- || !needs_non_blocking
|| socket_ops::set_internal_non_blocking(
impl.socket_, impl.state_, true, op->ec_))
{
reactor_.start_op(op_type, impl.socket_, impl.reactor_data_, op,
- is_continuation, allow_speculative, on_immediate, immediate_arg);
+ is_continuation, is_non_blocking, on_immediate, immediate_arg);
return;
}
}
@@ -266,7 +264,7 @@ void reactive_socket_service_base::do_start_accept_op(
if (!peer_is_open)
{
do_start_op(impl, reactor::read_op, op, is_continuation,
- true, false, true, on_immediate, immediate_arg);
+ true, false, on_immediate, immediate_arg);
}
else
{
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/socket_ops.ipp b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/socket_ops.ipp
index 2548c2987dc..74b4ecc770e 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/socket_ops.ipp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/socket_ops.ipp
@@ -41,10 +41,6 @@
#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
// || defined(__MACH__) && defined(__APPLE__)
-#if defined(_MSC_VER) && (_MSC_VER >= 1800)
-# include <malloc.h>
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1800)
-
#include <boost/asio/detail/push_options.hpp>
namespace boost {
@@ -344,24 +340,25 @@ int close(socket_type s, state_type& state,
::fcntl(s, F_SETFL, flags & ~O_NONBLOCK);
# else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = 0;
- if ((state & possible_dup) == 0)
- {
- result = ::ioctl(s, FIONBIO, &arg);
- get_last_error(ec, result < 0);
- }
- if ((state & possible_dup) != 0
-# if defined(ENOTTY)
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ result = ::ioctl(s, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+ if (false
+# if defined(ENOTTY)
|| ec.value() == ENOTTY
-# endif // defined(ENOTTY)
-# if defined(ENOTCAPABLE)
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
|| ec.value() == ENOTCAPABLE
-# endif // defined(ENOTCAPABLE)
+# endif // defined(ENOTCAPABLE)
)
{
int flags = ::fcntl(s, F_GETFL, 0);
if (flags >= 0)
::fcntl(s, F_SETFL, flags & ~O_NONBLOCK);
}
+# else // defined(ENOTTY) || defined(ENOTCAPABLE)
+ ::ioctl(s, FIONBIO, &arg);
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
# endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
state &= ~non_blocking;
@@ -397,24 +394,21 @@ bool set_user_non_blocking(socket_type s,
if (result >= 0)
{
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = (flag != result) ? ::fcntl(s, F_SETFL, flag) : 0;
+ result = ::fcntl(s, F_SETFL, flag);
get_last_error(ec, result < 0);
}
#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = (value ? 1 : 0);
- int result = 0;
- if ((state & possible_dup) == 0)
- {
- result = ::ioctl(s, FIONBIO, &arg);
- get_last_error(ec, result < 0);
- }
- if ((state & possible_dup) != 0
-# if defined(ENOTTY)
+ int result = ::ioctl(s, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ if (false
+# if defined(ENOTTY)
|| ec.value() == ENOTTY
-# endif // defined(ENOTTY)
-# if defined(ENOTCAPABLE)
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
|| ec.value() == ENOTCAPABLE
-# endif // defined(ENOTCAPABLE)
+# endif // defined(ENOTCAPABLE)
)
{
result = ::fcntl(s, F_GETFL, 0);
@@ -422,10 +416,11 @@ bool set_user_non_blocking(socket_type s,
if (result >= 0)
{
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = (flag != result) ? ::fcntl(s, F_SETFL, flag) : 0;
+ result = ::fcntl(s, F_SETFL, flag);
get_last_error(ec, result < 0);
}
}
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
#endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
if (result >= 0)
@@ -473,24 +468,21 @@ bool set_internal_non_blocking(socket_type s,
if (result >= 0)
{
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = (flag != result) ? ::fcntl(s, F_SETFL, flag) : 0;
+ result = ::fcntl(s, F_SETFL, flag);
get_last_error(ec, result < 0);
}
#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = (value ? 1 : 0);
- int result = 0;
- if ((state & possible_dup) == 0)
- {
- result = ::ioctl(s, FIONBIO, &arg);
- get_last_error(ec, result < 0);
- }
- if ((state & possible_dup) != 0
-# if defined(ENOTTY)
+ int result = ::ioctl(s, FIONBIO, &arg);
+ get_last_error(ec, result < 0);
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ if (false
+# if defined(ENOTTY)
|| ec.value() == ENOTTY
-# endif // defined(ENOTTY)
-# if defined(ENOTCAPABLE)
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
|| ec.value() == ENOTCAPABLE
-# endif // defined(ENOTCAPABLE)
+# endif // defined(ENOTCAPABLE)
)
{
result = ::fcntl(s, F_GETFL, 0);
@@ -498,10 +490,11 @@ bool set_internal_non_blocking(socket_type s,
if (result >= 0)
{
int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = (flag != result) ? ::fcntl(s, F_SETFL, flag) : 0;
+ result = ::fcntl(s, F_SETFL, flag);
get_last_error(ec, result < 0);
}
}
+# endif // defined(ENOTTY) || defined(ENOTCAPABLE)
#endif // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
if (result >= 0)
@@ -2587,11 +2580,9 @@ const char* inet_ntop(int af, const void* src, char* dest, size_t length,
|| if_indextoname(static_cast<unsigned>(scope_id), if_name + 1) == 0)
#if defined(BOOST_ASIO_HAS_SNPRINTF)
snprintf(if_name + 1, sizeof(if_name) - 1, "%lu", scope_id);
-#elif defined(BOOST_ASIO_HAS_SECURE_RTL)
- sprintf_s(if_name + 1, sizeof(if_name) -1, "%lu", scope_id);
-#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
+#else // defined(BOOST_ASIO_HAS_SNPRINTF)
sprintf(if_name + 1, "%lu", scope_id);
-#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
+#endif // defined(BOOST_ASIO_HAS_SNPRINTF)
strcat(dest, if_name);
}
return result;
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/socket_select_interrupter.ipp b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/socket_select_interrupter.ipp
index cb62e147176..58c7daad8f4 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/socket_select_interrupter.ipp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/socket_select_interrupter.ipp
@@ -91,7 +91,7 @@ void socket_select_interrupter::open_descriptors()
socket_holder server(socket_ops::accept(acceptor.get(), 0, 0, ec));
if (server.get() == invalid_socket)
boost::asio::detail::throw_error(ec, "socket_select_interrupter");
-
+
ioctl_arg_type non_blocking = 1;
socket_ops::state_type client_state = 0;
if (socket_ops::ioctl(client.get(), client_state,
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/win_iocp_file_service.ipp b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/win_iocp_file_service.ipp
index 9d34f1e2513..7f2289efb12 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/win_iocp_file_service.ipp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/win_iocp_file_service.ipp
@@ -95,7 +95,6 @@ boost::system::error_code win_iocp_file_service::open(
if ((open_flags & file_base::sync_all_on_write) != 0)
flags |= FILE_FLAG_WRITE_THROUGH;
- impl.offset_ = 0;
HANDLE handle = ::CreateFileA(path, access, share, 0, disposition, flags, 0);
if (handle != INVALID_HANDLE_VALUE)
{
@@ -112,18 +111,10 @@ boost::system::error_code win_iocp_file_service::open(
return ec;
}
}
- }
- if (disposition == OPEN_ALWAYS || disposition == OPEN_EXISTING)
- {
- if ((open_flags & file_base::append) != 0)
+ else if ((open_flags & file_base::append) != 0)
{
- LARGE_INTEGER distance, new_offset;
- distance.QuadPart = 0;
- if (::SetFilePointerEx(handle, distance, &new_offset, FILE_END))
- {
- impl.offset_ = static_cast<uint64_t>(new_offset.QuadPart);
- }
- else
+ if (::SetFilePointer(handle, 0, 0, FILE_END)
+ == INVALID_SET_FILE_POINTER)
{
DWORD last_error = ::GetLastError();
::CloseHandle(handle);
@@ -137,6 +128,7 @@ boost::system::error_code win_iocp_file_service::open(
handle_service_.assign(impl, handle, ec);
if (ec)
::CloseHandle(handle);
+ impl.offset_ = 0;
BOOST_ASIO_ERROR_LOCATION(ec);
return ec;
}
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/win_iocp_handle_service.ipp b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/win_iocp_handle_service.ipp
index 9354570fe69..6cbcd337133 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/impl/win_iocp_handle_service.ipp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/impl/win_iocp_handle_service.ipp
@@ -164,7 +164,7 @@ void win_iocp_handle_service::destroy(
win_iocp_handle_service::implementation_type& impl)
{
close_for_destruction(impl);
-
+
// Remove implementation from linked list of all implementations.
boost::asio::detail::mutex::scoped_lock lock(mutex_);
if (impl_list_ == &impl)
@@ -366,12 +366,12 @@ size_t win_iocp_handle_service::do_write(
return 0;
}
- // Write the data.
+ // Write the data.
overlapped.Offset = offset & 0xFFFFFFFF;
overlapped.OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
BOOL ok = ::WriteFile(impl.handle_, buffer.data(),
static_cast<DWORD>(buffer.size()), 0, &overlapped);
- if (!ok)
+ if (!ok)
{
DWORD last_error = ::GetLastError();
if (last_error != ERROR_IO_PENDING)
@@ -447,7 +447,7 @@ size_t win_iocp_handle_service::do_read(
BOOST_ASIO_ERROR_LOCATION(ec);
return 0;
}
-
+
// A request to read 0 bytes on a stream handle is a no-op.
if (buffer.size() == 0)
{
@@ -467,7 +467,7 @@ size_t win_iocp_handle_service::do_read(
overlapped.OffsetHigh = (offset >> 32) & 0xFFFFFFFF;
BOOL ok = ::ReadFile(impl.handle_, buffer.data(),
static_cast<DWORD>(buffer.size()), 0, &overlapped);
- if (!ok)
+ if (!ok)
{
DWORD last_error = ::GetLastError();
if (last_error != ERROR_IO_PENDING && last_error != ERROR_MORE_DATA)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/initiation_base.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/initiation_base.hpp
deleted file mode 100644
index 9c1597b24eb..00000000000
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/initiation_base.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// detail/initiation_base.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_DETAIL_INITIATION_BASE_HPP
-#define BOOST_ASIO_DETAIL_INITIATION_BASE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Initiation, typename = void>
-class initiation_base : public Initiation
-{
-public:
- template <typename I>
- explicit initiation_base(I&& initiation)
- : Initiation(static_cast<I&&>(initiation))
- {
- }
-};
-
-template <typename Initiation>
-class initiation_base<Initiation, enable_if_t<!is_class<Initiation>::value>>
-{
-public:
- template <typename I>
- explicit initiation_base(I&& initiation)
- : initiation_(static_cast<I&&>(initiation))
- {
- }
-
- template <typename... Args>
- void operator()(Args&&... args) const
- {
- initiation_(static_cast<Args&&>(args)...);
- }
-
-private:
- Initiation initiation_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_INITIATION_BASE_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_descriptor_service.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_descriptor_service.hpp
index 301c7c478bd..8af1a038bff 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_descriptor_service.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_descriptor_service.hpp
@@ -240,7 +240,7 @@ public:
default:
p.p->ec_ = boost::asio::error::invalid_argument;
start_op(impl, reactor::read_op, p.p,
- is_continuation, false, true, false, &io_ex, 0);
+ is_continuation, false, true, &io_ex, 0);
p.v = p.p = 0;
return;
}
@@ -253,8 +253,7 @@ public:
&reactor_, &impl.reactor_data_, impl.descriptor_, op_type);
}
- start_op(impl, op_type, p.p, is_continuation,
- false, false, false, &io_ex, 0);
+ start_op(impl, op_type, p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -328,7 +327,7 @@ public:
start_op(impl, reactor::write_op, p.p, is_continuation, true,
buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::all_empty(buffers), true, &io_ex, 0);
+ ConstBufferSequence>::all_empty(buffers), &io_ex, 0);
p.v = p.p = 0;
}
@@ -362,7 +361,7 @@ public:
&impl, impl.descriptor_, "async_write_some(null_buffers)"));
start_op(impl, reactor::write_op, p.p,
- is_continuation, false, false, false, &io_ex, 0);
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -437,7 +436,7 @@ public:
start_op(impl, reactor::read_op, p.p, is_continuation, true,
buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::all_empty(buffers), true, &io_ex, 0);
+ MutableBufferSequence>::all_empty(buffers), &io_ex, 0);
p.v = p.p = 0;
}
@@ -471,15 +470,14 @@ public:
&impl, impl.descriptor_, "async_read_some(null_buffers)"));
start_op(impl, reactor::read_op, p.p,
- is_continuation, false, false, false, &io_ex, 0);
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
private:
// Start the asynchronous operation.
- BOOST_ASIO_DECL void do_start_op(implementation_type& impl,
- int op_type, reactor_op* op, bool is_continuation,
- bool allow_speculative, bool noop, bool needs_non_blocking,
+ BOOST_ASIO_DECL void do_start_op(implementation_type& impl, int op_type,
+ reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop,
void (*on_immediate)(operation* op, bool, const void*),
const void* immediate_arg);
@@ -487,19 +485,18 @@ private:
// immediate completion.
template <typename Op>
void start_op(implementation_type& impl, int op_type, Op* op,
- bool is_continuation, bool allow_speculative, bool noop,
- bool needs_non_blocking, const void* io_ex, ...)
+ bool is_continuation, bool is_non_blocking, bool noop,
+ const void* io_ex, ...)
{
- return do_start_op(impl, op_type, op, is_continuation, allow_speculative,
- noop, needs_non_blocking, &Op::do_immediate, io_ex);
+ return do_start_op(impl, op_type, op, is_continuation,
+ is_non_blocking, noop, &Op::do_immediate, io_ex);
}
// Start the asynchronous operation for handlers that are not specialised for
// immediate completion.
template <typename Op>
- void start_op(implementation_type& impl, int op_type,
- Op* op, bool is_continuation, bool allow_speculative,
- bool noop, bool needs_non_blocking, const void*,
+ void start_op(implementation_type& impl, int op_type, Op* op,
+ bool is_continuation, bool is_non_blocking, bool noop, const void*,
enable_if_t<
is_same<
typename associated_immediate_executor<
@@ -510,9 +507,8 @@ private:
>::value
>*)
{
- return do_start_op(impl, op_type, op, is_continuation,
- allow_speculative, noop, needs_non_blocking,
- &reactor::call_post_immediate_completion, &reactor_);
+ return do_start_op(impl, op_type, op, is_continuation, is_non_blocking,
+ noop, &reactor::call_post_immediate_completion, &reactor_);
}
// Helper class used to implement per-operation cancellation
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_send_op.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_send_op.hpp
index 09740564aa7..778c811c1d2 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_send_op.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_send_op.hpp
@@ -188,6 +188,7 @@ public:
BOOST_ASIO_HANDLER_INVOCATION_END;
}
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_service.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_service.hpp
index 85e92e6b4f2..ff051f979ec 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_service.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_service.hpp
@@ -308,7 +308,7 @@ public:
&impl, impl.socket_, "async_send_to"));
start_op(impl, reactor::write_op, p.p,
- is_continuation, true, false, true, &io_ex, 0);
+ is_continuation, true, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -342,7 +342,7 @@ public:
&impl, impl.socket_, "async_send_to(null_buffers)"));
start_op(impl, reactor::write_op, p.p,
- is_continuation, false, false, false, &io_ex, 0);
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -433,7 +433,7 @@ public:
start_op(impl,
(flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
- p.p, is_continuation, true, false, true, &io_ex, 0);
+ p.p, is_continuation, true, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -472,7 +472,7 @@ public:
start_op(impl,
(flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
- p.p, is_continuation, false, false, false, &io_ex, 0);
+ p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_service_base.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_service_base.hpp
index 0de10a94de4..e2d92190fdf 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_service_base.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/reactive_socket_service_base.hpp
@@ -230,7 +230,7 @@ public:
default:
p.p->ec_ = boost::asio::error::invalid_argument;
start_op(impl, reactor::read_op, p.p,
- is_continuation, false, true, false, &io_ex, 0);
+ is_continuation, false, true, &io_ex, 0);
p.v = p.p = 0;
return;
}
@@ -243,8 +243,7 @@ public:
&reactor_, &impl.reactor_data_, impl.socket_, op_type);
}
- start_op(impl, op_type, p.p, is_continuation,
- false, false, false, &io_ex, 0);
+ start_op(impl, op_type, p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -316,7 +315,7 @@ public:
start_op(impl, reactor::write_op, p.p, is_continuation, true,
((impl.state_ & socket_ops::stream_oriented)
&& buffer_sequence_adapter<boost::asio::const_buffer,
- ConstBufferSequence>::all_empty(buffers)), true, &io_ex, 0);
+ ConstBufferSequence>::all_empty(buffers)), &io_ex, 0);
p.v = p.p = 0;
}
@@ -349,7 +348,7 @@ public:
&impl, impl.socket_, "async_send(null_buffers)"));
start_op(impl, reactor::write_op, p.p,
- is_continuation, false, false, false, &io_ex, 0);
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -426,7 +425,7 @@ public:
(flags & socket_base::message_out_of_band) == 0,
((impl.state_ & socket_ops::stream_oriented)
&& buffer_sequence_adapter<boost::asio::mutable_buffer,
- MutableBufferSequence>::all_empty(buffers)), true, &io_ex, 0);
+ MutableBufferSequence>::all_empty(buffers)), &io_ex, 0);
p.v = p.p = 0;
}
@@ -462,7 +461,7 @@ public:
start_op(impl,
(flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
- p.p, is_continuation, false, false, false, &io_ex, 0);
+ p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -534,8 +533,7 @@ public:
(in_flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
p.p, is_continuation,
- (in_flags & socket_base::message_out_of_band) == 0,
- false, true, &io_ex, 0);
+ (in_flags & socket_base::message_out_of_band) == 0, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -576,7 +574,7 @@ public:
start_op(impl,
(in_flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
- p.p, is_continuation, false, false, false, &io_ex, 0);
+ p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -592,9 +590,8 @@ protected:
const native_handle_type& native_socket, boost::system::error_code& ec);
// Start the asynchronous read or write operation.
- BOOST_ASIO_DECL void do_start_op(base_implementation_type& impl,
- int op_type, reactor_op* op, bool is_continuation,
- bool allow_speculative, bool noop, bool needs_non_blocking,
+ BOOST_ASIO_DECL void do_start_op(base_implementation_type& impl, int op_type,
+ reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop,
void (*on_immediate)(operation* op, bool, const void*),
const void* immediate_arg);
@@ -602,19 +599,18 @@ protected:
// immediate completion.
template <typename Op>
void start_op(base_implementation_type& impl, int op_type, Op* op,
- bool is_continuation, bool allow_speculative, bool noop,
- bool needs_non_blocking, const void* io_ex, ...)
+ bool is_continuation, bool is_non_blocking, bool noop,
+ const void* io_ex, ...)
{
- return do_start_op(impl, op_type, op, is_continuation, allow_speculative,
- noop, needs_non_blocking, &Op::do_immediate, io_ex);
+ return do_start_op(impl, op_type, op, is_continuation,
+ is_non_blocking, noop, &Op::do_immediate, io_ex);
}
// Start the asynchronous operation for handlers that are not specialised for
// immediate completion.
template <typename Op>
- void start_op(base_implementation_type& impl, int op_type,
- Op* op, bool is_continuation, bool allow_speculative,
- bool noop, bool needs_non_blocking, const void*,
+ void start_op(base_implementation_type& impl, int op_type, Op* op,
+ bool is_continuation, bool is_non_blocking, bool noop, const void*,
enable_if_t<
is_same<
typename associated_immediate_executor<
@@ -625,9 +621,8 @@ protected:
>::value
>*)
{
- return do_start_op(impl, op_type, op, is_continuation,
- allow_speculative, noop, needs_non_blocking,
- &reactor::call_post_immediate_completion, &reactor_);
+ return do_start_op(impl, op_type, op, is_continuation, is_non_blocking,
+ noop, &reactor::call_post_immediate_completion, &reactor_);
}
// Start the asynchronous accept operation.
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/recycling_allocator.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/recycling_allocator.hpp
index 6089db4abde..376df6f9865 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/recycling_allocator.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/recycling_allocator.hpp
@@ -49,25 +49,16 @@ public:
T* allocate(std::size_t n)
{
-#if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
void* p = thread_info_base::allocate(Purpose(),
thread_context::top_of_thread_call_stack(),
sizeof(T) * n, alignof(T));
-#else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- void* p = boost::asio::aligned_new(align, s);
-#endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
return static_cast<T*>(p);
}
void deallocate(T* p, std::size_t n)
{
-#if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
thread_info_base::deallocate(Purpose(),
thread_context::top_of_thread_call_stack(), p, sizeof(T) * n);
-#else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- (void)n;
- boost::asio::aligned_delete(p);
-#endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
}
};
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/resolve_endpoint_op.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/resolve_endpoint_op.hpp
index 74f19855d85..bf2af514d5e 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/resolve_endpoint_op.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/resolve_endpoint_op.hpp
@@ -78,7 +78,7 @@ public:
{
// The operation is being run on the worker io_context. Time to perform
// the resolver operation.
-
+
// Perform the blocking endpoint resolution operation.
char host_name[NI_MAXHOST] = "";
char service_name[NI_MAXSERV] = "";
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/resolve_query_op.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/resolve_query_op.hpp
index 369131da4e8..d5e229634e8 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/resolve_query_op.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/resolve_query_op.hpp
@@ -86,7 +86,7 @@ public:
{
// The operation is being run on the worker io_context. Time to perform
// the resolver operation.
-
+
// Perform the blocking host resolution operation.
socket_ops::background_getaddrinfo(o->cancel_token_,
o->query_.host_name().c_str(), o->query_.service_name().c_str(),
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/thread_info_base.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/thread_info_base.hpp
index 8676ccc50f2..6f33a815db2 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/thread_info_base.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/thread_info_base.hpp
@@ -90,17 +90,7 @@ public:
};
};
- struct timed_cancel_tag
- {
- enum
- {
- cache_size = BOOST_ASIO_RECYCLING_ALLOCATOR_CACHE_SIZE,
- begin_mem_index = parallel_group_tag::end_mem_index,
- end_mem_index = begin_mem_index + cache_size
- };
- };
-
- enum { max_mem_index = timed_cancel_tag::end_mem_index };
+ enum { max_mem_index = parallel_group_tag::end_mem_index };
thread_info_base()
#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/timed_cancel_op.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/timed_cancel_op.hpp
deleted file mode 100644
index 3464e48bc42..00000000000
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/timed_cancel_op.hpp
+++ /dev/null
@@ -1,363 +0,0 @@
-//
-// detail/timed_cancel_op.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_DETAIL_TIMED_CANCEL_OP_HPP
-#define BOOST_ASIO_DETAIL_TIMED_CANCEL_OP_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/associated_cancellation_slot.hpp>
-#include <boost/asio/associator.hpp>
-#include <boost/asio/basic_waitable_timer.hpp>
-#include <boost/asio/cancellation_signal.hpp>
-#include <boost/asio/detail/atomic_count.hpp>
-#include <boost/asio/detail/completion_payload.hpp>
-#include <boost/asio/detail/completion_payload_handler.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Op, typename... Signatures>
-class timed_cancel_op_handler;
-
-template <typename Op>
-class timed_cancel_timer_handler;
-
-template <typename Handler, typename Timer, typename... Signatures>
-class timed_cancel_op
-{
-public:
- using handler_type = Handler;
-
- BOOST_ASIO_DEFINE_TAGGED_HANDLER_PTR(
- thread_info_base::timed_cancel_tag, timed_cancel_op);
-
- timed_cancel_op(Handler& handler, Timer timer,
- cancellation_type_t cancel_type)
- : ref_count_(2),
- handler_(static_cast<Handler&&>(handler)),
- timer_(static_cast<Timer&&>(timer)),
- cancellation_type_(cancel_type),
- cancel_proxy_(nullptr),
- has_payload_(false),
- has_pending_timer_wait_(true)
- {
- }
-
- ~timed_cancel_op()
- {
- if (has_payload_)
- payload_storage_.payload_.~payload_type();
- }
-
- cancellation_slot get_cancellation_slot() noexcept
- {
- return cancellation_signal_.slot();
- }
-
- template <typename Initiation, typename... Args>
- void start(Initiation&& initiation, Args&&... args)
- {
- using op_handler_type =
- timed_cancel_op_handler<timed_cancel_op, Signatures...>;
- op_handler_type op_handler(this);
-
- using timer_handler_type =
- timed_cancel_timer_handler<timed_cancel_op>;
- timer_handler_type timer_handler(this);
-
- associated_cancellation_slot_t<Handler> slot
- = (get_associated_cancellation_slot)(handler_);
- if (slot.is_connected())
- cancel_proxy_ = &slot.template emplace<cancel_proxy>(this);
-
- timer_.async_wait(static_cast<timer_handler_type&&>(timer_handler));
- async_initiate<op_handler_type, Signatures...>(
- static_cast<Initiation&&>(initiation),
- static_cast<op_handler_type&>(op_handler),
- static_cast<Args&&>(args)...);
- }
-
- template <typename Message>
- void handle_op(Message&& message)
- {
- if (cancel_proxy_)
- cancel_proxy_->op_ = nullptr;
-
- new (&payload_storage_.payload_) payload_type(
- static_cast<Message&&>(message));
- has_payload_ = true;
-
- if (has_pending_timer_wait_)
- {
- timer_.cancel();
- release();
- }
- else
- {
- complete();
- }
- }
-
- void handle_timer()
- {
- has_pending_timer_wait_ = false;
-
- if (has_payload_)
- {
- complete();
- }
- else
- {
- cancellation_signal_.emit(cancellation_type_);
- release();
- }
- }
-
- void release()
- {
- if (--ref_count_ == 0)
- {
- ptr p = { boost::asio::detail::addressof(handler_), this, this };
- Handler handler(static_cast<Handler&&>(handler_));
- p.h = boost::asio::detail::addressof(handler);
- p.reset();
- }
- }
-
- void complete()
- {
- if (--ref_count_ == 0)
- {
- ptr p = { boost::asio::detail::addressof(handler_), this, this };
- completion_payload_handler<payload_type, Handler> handler(
- static_cast<payload_type&&>(payload_storage_.payload_), handler_);
- p.h = boost::asio::detail::addressof(handler.handler());
- p.reset();
- handler();
- }
- }
-
-//private:
- typedef completion_payload<Signatures...> payload_type;
-
- struct cancel_proxy
- {
- cancel_proxy(timed_cancel_op* op)
- : op_(op)
- {
- }
-
- void operator()(cancellation_type_t type)
- {
- if (op_)
- op_->cancellation_signal_.emit(type);
- }
-
- timed_cancel_op* op_;
- };
-
- // The number of handlers that share a reference to the state.
- atomic_count ref_count_;
-
- // The handler to be called when the operation completes.
- Handler handler_;
-
- // The timer used to determine when to cancel the pending operation.
- Timer timer_;
-
- // The cancellation signal and type used to cancel the pending operation.
- cancellation_signal cancellation_signal_;
- cancellation_type_t cancellation_type_;
-
- // A proxy cancel handler used to allow cancellation of the timed operation.
- cancel_proxy* cancel_proxy_;
-
- // Arguments to be passed to the completion handler.
- union payload_storage
- {
- payload_storage() {}
- ~payload_storage() {}
-
- char dummy_;
- payload_type payload_;
- } payload_storage_;
-
- // Whether the payload storage contains a valid payload.
- bool has_payload_;
-
- // Whether the asynchronous wait on the timer is still pending
- bool has_pending_timer_wait_;
-};
-
-template <typename Op, typename R, typename... Args>
-class timed_cancel_op_handler<Op, R(Args...)>
-{
-public:
- using cancellation_slot_type = cancellation_slot;
-
- explicit timed_cancel_op_handler(Op* op)
- : op_(op)
- {
- }
-
- timed_cancel_op_handler(timed_cancel_op_handler&& other) noexcept
- : op_(other.op_)
- {
- other.op_ = nullptr;
- }
-
- ~timed_cancel_op_handler()
- {
- if (op_)
- op_->release();
- }
-
- cancellation_slot_type get_cancellation_slot() const noexcept
- {
- return op_->get_cancellation_slot();
- }
-
- template <typename... Args2>
- enable_if_t<
- is_constructible<completion_message<R(Args...)>, int, Args2...>::value
- > operator()(Args2&&... args)
- {
- Op* op = op_;
- op_ = nullptr;
- typedef completion_message<R(Args...)> message_type;
- op->handle_op(message_type(0, static_cast<Args2&&>(args)...));
- }
-
-//protected:
- Op* op_;
-};
-
-template <typename Op, typename R, typename... Args, typename... Signatures>
-class timed_cancel_op_handler<Op, R(Args...), Signatures...> :
- public timed_cancel_op_handler<Op, Signatures...>
-{
-public:
- using timed_cancel_op_handler<Op, Signatures...>::timed_cancel_op_handler;
- using timed_cancel_op_handler<Op, Signatures...>::operator();
-
- template <typename... Args2>
- enable_if_t<
- is_constructible<completion_message<R(Args...)>, int, Args2...>::value
- > operator()(Args2&&... args)
- {
- Op* op = this->op_;
- this->op_ = nullptr;
- typedef completion_message<R(Args...)> message_type;
- op->handle_op(message_type(0, static_cast<Args2&&>(args)...));
- }
-};
-
-template <typename Op>
-class timed_cancel_timer_handler
-{
-public:
- using cancellation_slot_type = cancellation_slot;
-
- explicit timed_cancel_timer_handler(Op* op)
- : op_(op)
- {
- }
-
- timed_cancel_timer_handler(timed_cancel_timer_handler&& other) noexcept
- : op_(other.op_)
- {
- other.op_ = nullptr;
- }
-
- ~timed_cancel_timer_handler()
- {
- if (op_)
- op_->release();
- }
-
- cancellation_slot_type get_cancellation_slot() const noexcept
- {
- return cancellation_slot_type();
- }
-
- void operator()(const boost::system::error_code&)
- {
- Op* op = op_;
- op_ = nullptr;
- op->handle_timer();
- }
-
-//private:
- Op* op_;
-};
-
-} // namespace detail
-
-template <template <typename, typename> class Associator,
- typename Op, typename... Signatures, typename DefaultCandidate>
-struct associator<Associator,
- detail::timed_cancel_op_handler<Op, Signatures...>, DefaultCandidate>
- : Associator<typename Op::handler_type, DefaultCandidate>
-{
- static typename Associator<typename Op::handler_type, DefaultCandidate>::type
- get(const detail::timed_cancel_op_handler<Op, Signatures...>& h) noexcept
- {
- return Associator<typename Op::handler_type, DefaultCandidate>::get(
- h.op_->handler_);
- }
-
- static auto get(const detail::timed_cancel_op_handler<Op, Signatures...>& h,
- const DefaultCandidate& c) noexcept
- -> decltype(Associator<typename Op::handler_type, DefaultCandidate>::get(
- h.op_->handler_, c))
- {
- return Associator<typename Op::handler_type, DefaultCandidate>::get(
- h.op_->handler_, c);
- }
-};
-
-template <template <typename, typename> class Associator,
- typename Op, typename DefaultCandidate>
-struct associator<Associator,
- detail::timed_cancel_timer_handler<Op>, DefaultCandidate>
- : Associator<typename Op::handler_type, DefaultCandidate>
-{
- static typename Associator<typename Op::handler_type, DefaultCandidate>::type
- get(const detail::timed_cancel_timer_handler<Op>& h) noexcept
- {
- return Associator<typename Op::handler_type, DefaultCandidate>::get(
- h.op_->handler_);
- }
-
- static auto get(const detail::timed_cancel_timer_handler<Op>& h,
- const DefaultCandidate& c) noexcept
- -> decltype(Associator<typename Op::handler_type, DefaultCandidate>::get(
- h.op_->handler_, c))
- {
- return Associator<typename Op::handler_type, DefaultCandidate>::get(
- h.op_->handler_, c);
- }
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_TIMED_CANCEL_OP_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/win_iocp_socket_service_base.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/win_iocp_socket_service_base.hpp
index a518375dd03..08bbed93eaf 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/win_iocp_socket_service_base.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/win_iocp_socket_service_base.hpp
@@ -809,7 +809,7 @@ protected:
// Pointer to NtSetInformationFile implementation.
void* nt_set_info_;
- // Mutex to protect access to the linked list of implementations.
+ // Mutex to protect access to the linked list of implementations.
boost::asio::detail::mutex mutex_;
// The head of a linked list of all implementations.
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/winrt_ssocket_service_base.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/winrt_ssocket_service_base.hpp
index a94451075ae..a2733660af5 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/winrt_ssocket_service_base.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/winrt_ssocket_service_base.hpp
@@ -342,7 +342,7 @@ protected:
// The manager that keeps track of outstanding operations.
winrt_async_manager& async_manager_;
- // Mutex to protect access to the linked list of implementations.
+ // Mutex to protect access to the linked list of implementations.
boost::asio::detail::mutex mutex_;
// The head of a linked list of all implementations.
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/wrapped_handler.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/wrapped_handler.hpp
index 4643b71e2d9..02691c0ec31 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/wrapped_handler.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/wrapped_handler.hpp
@@ -42,36 +42,12 @@ struct is_continuation_if_running
}
};
-template <typename Dispatcher, typename = void>
-struct wrapped_executor
-{
- typedef Dispatcher executor_type;
-
- static const Dispatcher& get(const Dispatcher& dispatcher) noexcept
- {
- return dispatcher;
- }
-};
-
-template <typename Dispatcher>
-struct wrapped_executor<Dispatcher,
- void_type<typename Dispatcher::executor_type>>
-{
- typedef typename Dispatcher::executor_type executor_type;
-
- static executor_type get(const Dispatcher& dispatcher) noexcept
- {
- return dispatcher.get_executor();
- }
-};
-
template <typename Dispatcher, typename Handler,
typename IsContinuation = is_continuation_delegated>
class wrapped_handler
{
public:
typedef void result_type;
- typedef typename wrapped_executor<Dispatcher>::executor_type executor_type;
wrapped_handler(Dispatcher dispatcher, Handler& handler)
: dispatcher_(dispatcher),
@@ -91,11 +67,6 @@ public:
{
}
- executor_type get_executor() const noexcept
- {
- return wrapped_executor<Dispatcher>::get(dispatcher_);
- }
-
void operator()()
{
dispatcher_.dispatch(static_cast<Handler&&>(handler_));
@@ -181,6 +152,49 @@ public:
Handler handler_;
};
+template <typename Handler, typename Context>
+class rewrapped_handler
+{
+public:
+ explicit rewrapped_handler(Handler& handler, const Context& context)
+ : context_(context),
+ handler_(static_cast<Handler&&>(handler))
+ {
+ }
+
+ explicit rewrapped_handler(const Handler& handler, const Context& context)
+ : context_(context),
+ handler_(handler)
+ {
+ }
+
+ rewrapped_handler(const rewrapped_handler& other)
+ : context_(other.context_),
+ handler_(other.handler_)
+ {
+ }
+
+ rewrapped_handler(rewrapped_handler&& other)
+ : context_(static_cast<Context&&>(other.context_)),
+ handler_(static_cast<Handler&&>(other.handler_))
+ {
+ }
+
+ void operator()()
+ {
+ handler_();
+ }
+
+ void operator()() const
+ {
+ handler_();
+ }
+
+//private:
+ Context context_;
+ Handler handler_;
+};
+
template <typename Dispatcher, typename Handler, typename IsContinuation>
inline bool asio_handler_is_continuation(
wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
@@ -188,6 +202,14 @@ inline bool asio_handler_is_continuation(
return IsContinuation()(this_handler->dispatcher_, this_handler->handler_);
}
+template <typename Dispatcher, typename Context>
+inline bool asio_handler_is_continuation(
+ rewrapped_handler<Dispatcher, Context>* this_handler)
+{
+ return boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->context_);
+}
+
} // namespace detail
} // namespace asio
} // namespace boost
diff --git a/contrib/restricted/boost/asio/include/boost/asio/execution/allocator.hpp b/contrib/restricted/boost/asio/include/boost/asio/execution/allocator.hpp
index 9fc9c35bb1f..d48f055b87e 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/execution/allocator.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/execution/allocator.hpp
@@ -226,7 +226,7 @@ const T allocator_t<void>::static_query_v;
#endif // defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-BOOST_ASIO_INLINE_VARIABLE constexpr allocator_t<void> allocator;
+constexpr allocator_t<void> allocator;
} // namespace execution
diff --git a/contrib/restricted/boost/asio/include/boost/asio/execution/blocking.hpp b/contrib/restricted/boost/asio/include/boost/asio/execution/blocking.hpp
index 7501aecbc3e..44d32b24a0e 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/execution/blocking.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/execution/blocking.hpp
@@ -893,7 +893,7 @@ const T never_t<I>::static_query_v;
typedef detail::blocking_t<> blocking_t;
-BOOST_ASIO_INLINE_VARIABLE constexpr blocking_t blocking;
+constexpr blocking_t blocking;
} // namespace execution
diff --git a/contrib/restricted/boost/asio/include/boost/asio/execution/blocking_adaptation.hpp b/contrib/restricted/boost/asio/include/boost/asio/execution/blocking_adaptation.hpp
index 3c641219f43..8973a2eb5dc 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/execution/blocking_adaptation.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/execution/blocking_adaptation.hpp
@@ -719,7 +719,7 @@ void blocking_execute(
typedef detail::blocking_adaptation_t<> blocking_adaptation_t;
-BOOST_ASIO_INLINE_VARIABLE constexpr blocking_adaptation_t blocking_adaptation;
+constexpr blocking_adaptation_t blocking_adaptation;
} // namespace execution
diff --git a/contrib/restricted/boost/asio/include/boost/asio/execution/context.hpp b/contrib/restricted/boost/asio/include/boost/asio/execution/context.hpp
index 6c9fd9a13d2..5d8a81b70b5 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/execution/context.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/execution/context.hpp
@@ -139,7 +139,7 @@ const T context_t<I>::static_query_v;
typedef detail::context_t<> context_t;
-BOOST_ASIO_INLINE_VARIABLE constexpr context_t context;
+constexpr context_t context;
} // namespace execution
diff --git a/contrib/restricted/boost/asio/include/boost/asio/execution/mapping.hpp b/contrib/restricted/boost/asio/include/boost/asio/execution/mapping.hpp
index 769ad8c2830..5c668dbb971 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/execution/mapping.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/execution/mapping.hpp
@@ -734,7 +734,7 @@ const T other_t<I>::static_query_v;
typedef detail::mapping_t<> mapping_t;
-BOOST_ASIO_INLINE_VARIABLE constexpr mapping_t mapping;
+constexpr mapping_t mapping;
} // namespace execution
diff --git a/contrib/restricted/boost/asio/include/boost/asio/execution/occupancy.hpp b/contrib/restricted/boost/asio/include/boost/asio/execution/occupancy.hpp
index 20bc40a3956..dddcd84939e 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/execution/occupancy.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/execution/occupancy.hpp
@@ -132,7 +132,7 @@ const T occupancy_t<I>::static_query_v;
typedef detail::occupancy_t<> occupancy_t;
-BOOST_ASIO_INLINE_VARIABLE constexpr occupancy_t occupancy;
+constexpr occupancy_t occupancy;
} // namespace execution
diff --git a/contrib/restricted/boost/asio/include/boost/asio/execution/outstanding_work.hpp b/contrib/restricted/boost/asio/include/boost/asio/execution/outstanding_work.hpp
index f5ea64cebf6..b8d96777767 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/execution/outstanding_work.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/execution/outstanding_work.hpp
@@ -545,7 +545,7 @@ const T tracked_t<I>::static_query_v;
typedef detail::outstanding_work_t<> outstanding_work_t;
-BOOST_ASIO_INLINE_VARIABLE constexpr outstanding_work_t outstanding_work;
+constexpr outstanding_work_t outstanding_work;
} // namespace execution
diff --git a/contrib/restricted/boost/asio/include/boost/asio/execution/relationship.hpp b/contrib/restricted/boost/asio/include/boost/asio/execution/relationship.hpp
index 9cc0fe4f1da..4ccda00bc24 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/execution/relationship.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/execution/relationship.hpp
@@ -543,7 +543,7 @@ const T continuation_t<I>::static_query_v;
typedef detail::relationship_t<> relationship_t;
-BOOST_ASIO_INLINE_VARIABLE constexpr relationship_t relationship;
+constexpr relationship_t relationship;
} // namespace execution
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/basic_channel.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/basic_channel.hpp
index 682884023f2..c1fc5e0ad2c 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/basic_channel.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/basic_channel.hpp
@@ -111,8 +111,7 @@ private:
template <typename... PayloadSignatures,
BOOST_ASIO_COMPLETION_TOKEN_FOR(PayloadSignatures...) CompletionToken>
- auto do_async_receive(
- boost::asio::detail::completion_payload<PayloadSignatures...>*,
+ auto do_async_receive(detail::channel_payload<PayloadSignatures...>*,
CompletionToken&& token)
-> decltype(
async_initiate<CompletionToken, PayloadSignatures...>(
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/basic_concurrent_channel.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/basic_concurrent_channel.hpp
index dabab3ecc9b..33ccef1357b 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/basic_concurrent_channel.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/basic_concurrent_channel.hpp
@@ -111,8 +111,7 @@ private:
template <typename... PayloadSignatures,
BOOST_ASIO_COMPLETION_TOKEN_FOR(PayloadSignatures...) CompletionToken>
- auto do_async_receive(
- boost::asio::detail::completion_payload<PayloadSignatures...>*,
+ auto do_async_receive(detail::channel_payload<PayloadSignatures...>*,
CompletionToken&& token)
-> decltype(
async_initiate<CompletionToken, PayloadSignatures...>(
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/co_composed.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/co_composed.hpp
index f227631ee63..faa0221ee06 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/co_composed.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/co_composed.hpp
@@ -16,7 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
-#include <boost/asio/co_composed.hpp>
+#include <boost/asio/async_result.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -24,7 +24,117 @@ namespace boost {
namespace asio {
namespace experimental {
-using boost::asio::co_composed;
+/// Creates an initiation function object that may be used to launch a
+/// coroutine-based composed asynchronous operation.
+/**
+ * The experimental::co_composed utility simplifies the implementation of
+ * composed asynchronous operations by automatically adapting a coroutine to be
+ * an initiation function object for use with @c async_initiate. When awaiting
+ * asynchronous operations, the coroutine automatically uses a conforming
+ * intermediate completion handler.
+ *
+ * @param implementation A function object that contains the coroutine-based
+ * implementation of the composed asynchronous operation. The first argument to
+ * the function object represents the state of the operation, and may be used
+ * to test for cancellation. The remaining arguments are those passed to @c
+ * async_initiate after the completion token.
+ *
+ * @param io_objects_or_executors Zero or more I/O objects or I/O executors for
+ * which outstanding work must be maintained while the operation is incomplete.
+ *
+ * @par Per-Operation Cancellation
+ * By default, terminal per-operation cancellation is enabled for composed
+ * operations that use experimental::co_composed. To disable cancellation for
+ * the composed operation, or to alter its supported cancellation types, call
+ * the state's @c reset_cancellation_state function.
+ *
+ * @par Examples
+ * The following example illustrates manual error handling and explicit checks
+ * for cancellation. The completion handler is invoked via a @c co_yield to the
+ * state's @c complete function, which never returns.
+ *
+ * @code template <typename CompletionToken>
+ * auto async_echo(tcp::socket& socket,
+ * CompletionToken&& token)
+ * {
+ * return boost::asio::async_initiate<
+ * CompletionToken, void(boost::system::error_code)>(
+ * boost::asio::experimental::co_composed(
+ * [](auto state, tcp::socket& socket) -> void
+ * {
+ * state.reset_cancellation_state(
+ * boost::asio::enable_terminal_cancellation());
+ *
+ * while (!state.cancelled())
+ * {
+ * char data[1024];
+ * auto [e1, n1] =
+ * co_await socket.async_read_some(
+ * boost::asio::buffer(data),
+ * boost::asio::as_tuple(boost::asio::deferred));
+ *
+ * if (e1)
+ * co_yield state.complete(e1);
+ *
+ * if (!!state.cancelled())
+ * co_yield state.complete(
+ * make_error_code(boost::asio::error::operation_aborted));
+ *
+ * auto [e2, n2] =
+ * co_await boost::asio::async_write(socket,
+ * boost::asio::buffer(data, n1),
+ * boost::asio::as_tuple(boost::asio::deferred));
+ *
+ * if (e2)
+ * co_yield state.complete(e2);
+ * }
+ * }, socket),
+ * token, std::ref(socket));
+ * } @endcode
+ *
+ * This next example shows exception-based error handling and implicit checks
+ * for cancellation. The completion handler is invoked after returning from the
+ * coroutine via @c co_return. Valid @c co_return values are specified using
+ * completion signatures passed to the @c co_composed function.
+ *
+ * @code template <typename CompletionToken>
+ * auto async_echo(tcp::socket& socket,
+ * CompletionToken&& token)
+ * {
+ * return boost::asio::async_initiate<
+ * CompletionToken, void(boost::system::error_code)>(
+ * boost::asio::experimental::co_composed<
+ * void(boost::system::error_code)>(
+ * [](auto state, tcp::socket& socket) -> void
+ * {
+ * try
+ * {
+ * state.throw_if_cancelled(true);
+ * state.reset_cancellation_state(
+ * boost::asio::enable_terminal_cancellation());
+ *
+ * for (;;)
+ * {
+ * char data[1024];
+ * std::size_t n = co_await socket.async_read_some(
+ * boost::asio::buffer(data), boost::asio::deferred);
+ *
+ * co_await boost::asio::async_write(socket,
+ * boost::asio::buffer(data, n), boost::asio::deferred);
+ * }
+ * }
+ * catch (const boost::system::system_error& e)
+ * {
+ * co_return {e.code()};
+ * }
+ * }, socket),
+ * token, std::ref(socket));
+ * } @endcode
+ */
+template <completion_signature... Signatures,
+ typename Implementation, typename... IoObjectsOrExecutors>
+auto co_composed(Implementation&& implementation,
+ IoObjectsOrExecutors&&... io_objects_or_executors);
} // namespace experimental
} // namespace asio
@@ -32,4 +142,6 @@ using boost::asio::co_composed;
#include <boost/asio/detail/pop_options.hpp>
+#include <boost/asio/experimental/impl/co_composed.hpp>
+
#endif // BOOST_ASIO_EXPERIMENTAL_CO_COMPOSED_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/completion_payload_handler.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_handler.hpp
index db08b250138..09eafad2332 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/completion_payload_handler.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_handler.hpp
@@ -1,6 +1,6 @@
//
-// detail/completion_payload_handler.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// experimental/detail/channel_handler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
@@ -8,8 +8,8 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-#ifndef BOOST_ASIO_DETAIL_COMPLETION_PAYLOAD_HANDLER_HPP
-#define BOOST_ASIO_DETAIL_COMPLETION_PAYLOAD_HANDLER_HPP
+#ifndef BOOST_ASIO_EXPERIMENTAL_DETAIL_CHANNEL_HANDLER_HPP
+#define BOOST_ASIO_EXPERIMENTAL_DETAIL_CHANNEL_HANDLER_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
@@ -17,18 +17,20 @@
#include <boost/asio/detail/config.hpp>
#include <boost/asio/associator.hpp>
+#include <boost/asio/experimental/detail/channel_payload.hpp>
#include <boost/asio/detail/push_options.hpp>
namespace boost {
namespace asio {
+namespace experimental {
namespace detail {
template <typename Payload, typename Handler>
-class completion_payload_handler
+class channel_handler
{
public:
- completion_payload_handler(Payload&& p, Handler& h)
+ channel_handler(Payload&& p, Handler& h)
: payload_(static_cast<Payload&&>(p)),
handler_(static_cast<Handler&&>(h))
{
@@ -39,33 +41,29 @@ public:
payload_.receive(handler_);
}
- Handler& handler()
- {
- return handler_;
- }
-
//private:
Payload payload_;
Handler handler_;
};
} // namespace detail
+} // namespace experimental
template <template <typename, typename> class Associator,
typename Payload, typename Handler, typename DefaultCandidate>
struct associator<Associator,
- detail::completion_payload_handler<Payload, Handler>,
+ experimental::detail::channel_handler<Payload, Handler>,
DefaultCandidate>
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::completion_payload_handler<Payload, Handler>& h) noexcept
+ const experimental::detail::channel_handler<Payload, Handler>& h) noexcept
{
return Associator<Handler, DefaultCandidate>::get(h.handler_);
}
static auto get(
- const detail::completion_payload_handler<Payload, Handler>& h,
+ const experimental::detail::channel_handler<Payload, Handler>& h,
const DefaultCandidate& c) noexcept
-> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
@@ -78,4 +76,4 @@ struct associator<Associator,
#include <boost/asio/detail/pop_options.hpp>
-#endif // BOOST_ASIO_DETAIL_COMPLETION_PAYLOAD_HANDLER_HPP
+#endif // BOOST_ASIO_EXPERIMENTAL_DETAIL_CHANNEL_HANDLER_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/completion_message.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_message.hpp
index 345deb21065..c3a7b131821 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/completion_message.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_message.hpp
@@ -1,6 +1,6 @@
//
-// detail/completion_message.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+// experimental/detail/channel_message.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
@@ -8,8 +8,8 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-#ifndef BOOST_ASIO_DETAIL_COMPLETION_MESSAGE_HPP
-#define BOOST_ASIO_DETAIL_COMPLETION_MESSAGE_HPP
+#ifndef BOOST_ASIO_EXPERIMENTAL_DETAIL_CHANNEL_MESSAGE_HPP
+#define BOOST_ASIO_EXPERIMENTAL_DETAIL_CHANNEL_MESSAGE_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
@@ -24,16 +24,17 @@
namespace boost {
namespace asio {
+namespace experimental {
namespace detail {
template <typename Signature>
-class completion_message;
+class channel_message;
template <typename R>
-class completion_message<R()>
+class channel_message<R()>
{
public:
- completion_message(int)
+ channel_message(int)
{
}
@@ -45,11 +46,11 @@ public:
};
template <typename R, typename Arg0>
-class completion_message<R(Arg0)>
+class channel_message<R(Arg0)>
{
public:
template <typename T0>
- completion_message(int, T0&& t0)
+ channel_message(int, T0&& t0)
: arg0_(static_cast<T0&&>(t0))
{
}
@@ -67,11 +68,11 @@ private:
};
template <typename R, typename Arg0, typename Arg1>
-class completion_message<R(Arg0, Arg1)>
+class channel_message<R(Arg0, Arg1)>
{
public:
template <typename T0, typename T1>
- completion_message(int, T0&& t0, T1&& t1)
+ channel_message(int, T0&& t0, T1&& t1)
: arg0_(static_cast<T0&&>(t0)),
arg1_(static_cast<T1&&>(t1))
{
@@ -93,11 +94,11 @@ private:
};
template <typename R, typename... Args>
-class completion_message<R(Args...)>
+class channel_message<R(Args...)>
{
public:
template <typename... T>
- completion_message(int, T&&... t)
+ channel_message(int, T&&... t)
: args_(static_cast<T&&>(t)...)
{
}
@@ -121,9 +122,10 @@ private:
};
} // namespace detail
+} // namespace experimental
} // namespace asio
} // namespace boost
#include <boost/asio/detail/pop_options.hpp>
-#endif // BOOST_ASIO_DETAIL_COMPLETION_MESSAGE_HPP
+#endif // BOOST_ASIO_EXPERIMENTAL_DETAIL_CHANNEL_MESSAGE_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/completion_payload.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_payload.hpp
index 1135bff3fe5..544c3d154e8 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/completion_payload.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_payload.hpp
@@ -1,6 +1,6 @@
//
-// detail/completion_payload.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// experimental/detail/channel_payload.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
@@ -8,8 +8,8 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-#ifndef BOOST_ASIO_DETAIL_COMPLETION_PAYLOAD_HPP
-#define BOOST_ASIO_DETAIL_COMPLETION_PAYLOAD_HPP
+#ifndef BOOST_ASIO_EXPERIMENTAL_DETAIL_CHANNEL_PAYLOAD_HPP
+#define BOOST_ASIO_EXPERIMENTAL_DETAIL_CHANNEL_PAYLOAD_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
@@ -18,7 +18,7 @@
#include <boost/asio/detail/config.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/system/error_code.hpp>
-#include <boost/asio/detail/completion_message.hpp>
+#include <boost/asio/experimental/detail/channel_message.hpp>
#if defined(BOOST_ASIO_HAS_STD_VARIANT)
# include <variant>
@@ -30,16 +30,17 @@
namespace boost {
namespace asio {
+namespace experimental {
namespace detail {
template <typename... Signatures>
-class completion_payload;
+class channel_payload;
template <typename R>
-class completion_payload<R()>
+class channel_payload<R()>
{
public:
- explicit completion_payload(completion_message<R()>)
+ explicit channel_payload(channel_message<R()>)
{
}
@@ -51,11 +52,11 @@ public:
};
template <typename Signature>
-class completion_payload<Signature>
+class channel_payload<Signature>
{
public:
- completion_payload(completion_message<Signature>&& m)
- : message_(static_cast<completion_message<Signature>&&>(m))
+ channel_payload(channel_message<Signature>&& m)
+ : message_(static_cast<channel_message<Signature>&&>(m))
{
}
@@ -66,18 +67,18 @@ public:
}
private:
- completion_message<Signature> message_;
+ channel_message<Signature> message_;
};
#if defined(BOOST_ASIO_HAS_STD_VARIANT)
template <typename... Signatures>
-class completion_payload
+class channel_payload
{
public:
template <typename Signature>
- completion_payload(completion_message<Signature>&& m)
- : message_(static_cast<completion_message<Signature>&&>(m))
+ channel_payload(channel_message<Signature>&& m)
+ : message_(static_cast<channel_message<Signature>&&>(m))
{
}
@@ -92,25 +93,25 @@ public:
}
private:
- std::variant<completion_message<Signatures>...> message_;
+ std::variant<channel_message<Signatures>...> message_;
};
#else // defined(BOOST_ASIO_HAS_STD_VARIANT)
template <typename R1, typename R2>
-class completion_payload<R1(), R2(boost::system::error_code)>
+class channel_payload<R1(), R2(boost::system::error_code)>
{
public:
- typedef completion_message<R1()> void_message_type;
- typedef completion_message<R2(boost::system::error_code)> error_message_type;
+ typedef channel_message<R1()> void_message_type;
+ typedef channel_message<R2(boost::system::error_code)> error_message_type;
- completion_payload(void_message_type&&)
+ channel_payload(void_message_type&&)
: message_(0, boost::system::error_code()),
empty_(true)
{
}
- completion_payload(error_message_type&& m)
+ channel_payload(error_message_type&& m)
: message_(static_cast<error_message_type&&>(m)),
empty_(false)
{
@@ -120,7 +121,7 @@ public:
void receive(Handler& handler)
{
if (empty_)
- completion_message<R1()>(0).receive(handler);
+ channel_message<R1()>(0).receive(handler);
else
message_.receive(handler);
}
@@ -131,25 +132,25 @@ private:
};
template <typename Sig1, typename Sig2>
-class completion_payload<Sig1, Sig2>
+class channel_payload<Sig1, Sig2>
{
public:
- typedef completion_message<Sig1> message_1_type;
- typedef completion_message<Sig2> message_2_type;
+ typedef channel_message<Sig1> message_1_type;
+ typedef channel_message<Sig2> message_2_type;
- completion_payload(message_1_type&& m)
+ channel_payload(message_1_type&& m)
: index_(1)
{
new (&storage_.message_1_) message_1_type(static_cast<message_1_type&&>(m));
}
- completion_payload(message_2_type&& m)
+ channel_payload(message_2_type&& m)
: index_(2)
{
new (&storage_.message_2_) message_2_type(static_cast<message_2_type&&>(m));
}
- completion_payload(completion_payload&& other)
+ channel_payload(channel_payload&& other)
: index_(other.index_)
{
switch (index_)
@@ -167,7 +168,7 @@ public:
}
}
- ~completion_payload()
+ ~channel_payload()
{
switch (index_)
{
@@ -214,9 +215,10 @@ private:
#endif // defined(BOOST_ASIO_HAS_STD_VARIANT)
} // namespace detail
+} // namespace experimental
} // namespace asio
} // namespace boost
#include <boost/asio/detail/pop_options.hpp>
-#endif // BOOST_ASIO_DETAIL_COMPLETION_PAYLOAD_HPP
+#endif // BOOST_ASIO_EXPERIMENTAL_DETAIL_CHANNEL_PAYLOAD_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_receive_op.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_receive_op.hpp
index 5ed64e445b7..76a09a4d36b 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_receive_op.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_receive_op.hpp
@@ -17,10 +17,11 @@
#include <boost/asio/detail/config.hpp>
#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/completion_handler.hpp>
#include <boost/asio/detail/handler_alloc_helpers.hpp>
#include <boost/asio/error.hpp>
+#include <boost/asio/experimental/detail/channel_handler.hpp>
#include <boost/asio/experimental/detail/channel_operation.hpp>
+#include <boost/asio/experimental/detail/channel_payload.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -92,7 +93,7 @@ public:
if (a != channel_operation::destroy_op)
{
Payload* payload = static_cast<Payload*>(v);
- boost::asio::detail::completion_payload_handler<Payload, Handler> handler(
+ channel_handler<Payload, Handler> handler(
static_cast<Payload&&>(*payload), o->handler_);
p.h = boost::asio::detail::addressof(handler.handler_);
p.reset();
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_send_functions.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_send_functions.hpp
index b748f8ba5aa..4587ae3f6ef 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_send_functions.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_send_functions.hpp
@@ -17,9 +17,9 @@
#include <boost/asio/detail/config.hpp>
#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/completion_message.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/system/error_code.hpp>
+#include <boost/asio/experimental/detail/channel_message.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -37,12 +37,11 @@ class channel_send_functions<Derived, Executor, R(Args...)>
public:
template <typename... Args2>
enable_if_t<
- is_constructible<boost::asio::detail::completion_message<R(Args...)>,
- int, Args2...>::value,
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
bool
> try_send(Args2&&... args)
{
- typedef boost::asio::detail::completion_message<R(Args...)> message_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
Derived* self = static_cast<Derived*>(this);
return self->service_->template try_send<message_type>(
self->impl_, false, static_cast<Args2&&>(args)...);
@@ -50,12 +49,11 @@ public:
template <typename... Args2>
enable_if_t<
- is_constructible<boost::asio::detail::completion_message<R(Args...)>,
- int, Args2...>::value,
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
bool
> try_send_via_dispatch(Args2&&... args)
{
- typedef boost::asio::detail::completion_message<R(Args...)> message_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
Derived* self = static_cast<Derived*>(this);
return self->service_->template try_send<message_type>(
self->impl_, true, static_cast<Args2&&>(args)...);
@@ -63,12 +61,11 @@ public:
template <typename... Args2>
enable_if_t<
- is_constructible<boost::asio::detail::completion_message<R(Args...)>,
- int, Args2...>::value,
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
std::size_t
> try_send_n(std::size_t count, Args2&&... args)
{
- typedef boost::asio::detail::completion_message<R(Args...)> message_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
Derived* self = static_cast<Derived*>(this);
return self->service_->template try_send_n<message_type>(
self->impl_, count, false, static_cast<Args2&&>(args)...);
@@ -76,12 +73,11 @@ public:
template <typename... Args2>
enable_if_t<
- is_constructible<boost::asio::detail::completion_message<R(Args...)>,
- int, Args2...>::value,
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
std::size_t
> try_send_n_via_dispatch(std::size_t count, Args2&&... args)
{
- typedef boost::asio::detail::completion_message<R(Args...)> message_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
Derived* self = static_cast<Derived*>(this);
return self->service_->template try_send_n<message_type>(
self->impl_, count, true, static_cast<Args2&&>(args)...);
@@ -101,7 +97,7 @@ public:
Derived>::payload_type>()))
{
typedef typename Derived::payload_type payload_type;
- typedef boost::asio::detail::completion_message<R(Args...)> message_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
Derived* self = static_cast<Derived*>(this);
return async_initiate<CompletionToken, void (boost::system::error_code)>(
typename Derived::initiate_async_send(self), token,
@@ -120,12 +116,11 @@ public:
template <typename... Args2>
enable_if_t<
- is_constructible<boost::asio::detail::completion_message<R(Args...)>,
- int, Args2...>::value,
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
bool
> try_send(Args2&&... args)
{
- typedef boost::asio::detail::completion_message<R(Args...)> message_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
Derived* self = static_cast<Derived*>(this);
return self->service_->template try_send<message_type>(
self->impl_, false, static_cast<Args2&&>(args)...);
@@ -133,12 +128,11 @@ public:
template <typename... Args2>
enable_if_t<
- is_constructible<boost::asio::detail::completion_message<R(Args...)>,
- int, Args2...>::value,
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
bool
> try_send_via_dispatch(Args2&&... args)
{
- typedef boost::asio::detail::completion_message<R(Args...)> message_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
Derived* self = static_cast<Derived*>(this);
return self->service_->template try_send<message_type>(
self->impl_, true, static_cast<Args2&&>(args)...);
@@ -146,12 +140,11 @@ public:
template <typename... Args2>
enable_if_t<
- is_constructible<boost::asio::detail::completion_message<R(Args...)>,
- int, Args2...>::value,
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
std::size_t
> try_send_n(std::size_t count, Args2&&... args)
{
- typedef boost::asio::detail::completion_message<R(Args...)> message_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
Derived* self = static_cast<Derived*>(this);
return self->service_->template try_send_n<message_type>(
self->impl_, count, false, static_cast<Args2&&>(args)...);
@@ -159,12 +152,11 @@ public:
template <typename... Args2>
enable_if_t<
- is_constructible<boost::asio::detail::completion_message<R(Args...)>,
- int, Args2...>::value,
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
std::size_t
> try_send_n_via_dispatch(std::size_t count, Args2&&... args)
{
- typedef boost::asio::detail::completion_message<R(Args...)> message_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
Derived* self = static_cast<Derived*>(this);
return self->service_->template try_send_n<message_type>(
self->impl_, count, true, static_cast<Args2&&>(args)...);
@@ -184,7 +176,7 @@ public:
Derived>::payload_type>()))
{
typedef typename Derived::payload_type payload_type;
- typedef boost::asio::detail::completion_message<R(Args...)> message_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
Derived* self = static_cast<Derived*>(this);
return async_initiate<CompletionToken, void (boost::system::error_code)>(
typename Derived::initiate_async_send(self), token,
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_send_op.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_send_op.hpp
index 49b444c19b0..aca8de826d8 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_send_op.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_send_op.hpp
@@ -21,6 +21,7 @@
#include <boost/asio/error.hpp>
#include <boost/asio/experimental/channel_error.hpp>
#include <boost/asio/experimental/detail/channel_operation.hpp>
+#include <boost/asio/experimental/detail/channel_payload.hpp>
#include <boost/asio/detail/push_options.hpp>
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_service.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_service.hpp
index 341797f1b6b..819aad114b0 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_service.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/channel_service.hpp
@@ -18,12 +18,10 @@
#include <boost/asio/detail/config.hpp>
#include <boost/asio/associated_cancellation_slot.hpp>
#include <boost/asio/cancellation_type.hpp>
-#include <boost/asio/detail/completion_message.hpp>
-#include <boost/asio/detail/completion_payload.hpp>
-#include <boost/asio/detail/completion_payload_handler.hpp>
#include <boost/asio/detail/mutex.hpp>
#include <boost/asio/detail/op_queue.hpp>
#include <boost/asio/execution_context.hpp>
+#include <boost/asio/experimental/detail/channel_message.hpp>
#include <boost/asio/experimental/detail/channel_receive_op.hpp>
#include <boost/asio/experimental/detail/channel_send_op.hpp>
#include <boost/asio/experimental/detail/has_signature.hpp>
@@ -234,7 +232,7 @@ private:
void operator()(Args&&... args)
{
op_->post(
- boost::asio::detail::completion_message<Signature>(0,
+ channel_message<Signature>(0,
static_cast<Args&&>(args)...));
}
@@ -310,8 +308,8 @@ struct channel_service<Mutex>::implementation_type : base_implementation_type
typename traits_type::receive_closed_signature,
Signatures...
>::value,
- boost::asio::detail::completion_payload<Signatures...>,
- boost::asio::detail::completion_payload<
+ channel_payload<Signatures...>,
+ channel_payload<
Signatures...,
typename traits_type::receive_closed_signature
>
@@ -322,11 +320,11 @@ struct channel_service<Mutex>::implementation_type : base_implementation_type
Signatures...,
typename traits_type::receive_cancelled_signature
>::value,
- boost::asio::detail::completion_payload<
+ channel_payload<
Signatures...,
typename traits_type::receive_cancelled_signature
>,
- boost::asio::detail::completion_payload<
+ channel_payload<
Signatures...,
typename traits_type::receive_cancelled_signature,
typename traits_type::receive_closed_signature
@@ -407,8 +405,8 @@ struct channel_service<Mutex>::implementation_type<Traits, R()>
typename traits_type::receive_closed_signature,
R()
>::value,
- boost::asio::detail::completion_payload<R()>,
- boost::asio::detail::completion_payload<
+ channel_payload<R()>,
+ channel_payload<
R(),
typename traits_type::receive_closed_signature
>
@@ -419,11 +417,11 @@ struct channel_service<Mutex>::implementation_type<Traits, R()>
R(),
typename traits_type::receive_cancelled_signature
>::value,
- boost::asio::detail::completion_payload<
+ channel_payload<
R(),
typename traits_type::receive_cancelled_signature
>,
- boost::asio::detail::completion_payload<
+ channel_payload<
R(),
typename traits_type::receive_cancelled_signature,
typename traits_type::receive_closed_signature
@@ -468,7 +466,7 @@ struct channel_service<Mutex>::implementation_type<Traits, R()>
// Get the element at the front of the buffer.
payload_type buffer_front()
{
- return payload_type(boost::asio::detail::completion_message<R()>(0));
+ return payload_type(channel_message<R()>(0));
}
// Pop a value from the front of the buffer.
@@ -510,8 +508,8 @@ struct channel_service<Mutex>::implementation_type<
typename traits_type::receive_closed_signature,
R(boost::system::error_code)
>::value,
- boost::asio::detail::completion_payload<R(boost::system::error_code)>,
- boost::asio::detail::completion_payload<
+ channel_payload<R(boost::system::error_code)>,
+ channel_payload<
R(boost::system::error_code),
typename traits_type::receive_closed_signature
>
@@ -522,11 +520,11 @@ struct channel_service<Mutex>::implementation_type<
R(boost::system::error_code),
typename traits_type::receive_cancelled_signature
>::value,
- boost::asio::detail::completion_payload<
+ channel_payload<
R(boost::system::error_code),
typename traits_type::receive_cancelled_signature
>,
- boost::asio::detail::completion_payload<
+ channel_payload<
R(boost::system::error_code),
typename traits_type::receive_cancelled_signature,
typename traits_type::receive_closed_signature
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/coro_promise_allocator.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/coro_promise_allocator.hpp
index c4e534fda1e..322ecbbef2c 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/coro_promise_allocator.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/coro_promise_allocator.hpp
@@ -65,6 +65,7 @@ constexpr std::size_t variadic_first(std::size_t = 0u)
return std::numeric_limits<std::size_t>::max();
}
+
template <typename T, typename First, typename... Args>
constexpr std::size_t variadic_first(std::size_t pos = 0u)
{
@@ -94,14 +95,14 @@ struct coro_promise_allocator
allocator_type get_allocator() const {return alloc_;}
template <typename... Args>
- void* operator new(std::size_t size, Args & ... args)
+ void* operator new(const std::size_t size, Args & ... args)
{
return allocate_coroutine(size,
get_variadic<variadic_first<std::allocator_arg_t,
std::decay_t<Args>...>() + 1u>(args...));
}
- void operator delete(void* raw, std::size_t size)
+ void operator delete(void* raw, const std::size_t size)
{
deallocate_coroutine<allocator_type>(raw, size);
}
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/impl/channel_service.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/impl/channel_service.hpp
index eb672be5114..8b7b2e22734 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/impl/channel_service.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/impl/channel_service.hpp
@@ -518,8 +518,7 @@ bool channel_service<Mutex>::try_receive(
}
lock.unlock();
boost::asio::detail::non_const_lvalue<Handler> handler2(handler);
- boost::asio::detail::completion_payload_handler<
- payload_type, decay_t<Handler>>(
+ channel_handler<payload_type, decay_t<Handler>>(
static_cast<payload_type&&>(payload), handler2.value)();
return true;
}
@@ -534,8 +533,7 @@ bool channel_service<Mutex>::try_receive(
send_op->post();
lock.unlock();
boost::asio::detail::non_const_lvalue<Handler> handler2(handler);
- boost::asio::detail::completion_payload_handler<
- payload_type, decay_t<Handler>>(
+ channel_handler<payload_type, decay_t<Handler>>(
static_cast<payload_type&&>(payload), handler2.value)();
return true;
}
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/partial_promise.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/partial_promise.hpp
index 2c128f8b517..48c8496609d 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/partial_promise.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/detail/partial_promise.hpp
@@ -55,12 +55,12 @@ template <typename Allocator>
struct partial_promise_base
{
template <typename Executor, typename Token, typename... Args>
- void* operator new(std::size_t size, Executor&, Token& tk, Args&...)
+ void* operator new(const std::size_t size, Executor&, Token& tk, Args&...)
{
return allocate_coroutine<Allocator>(size, get_associated_allocator(tk));
}
- void operator delete(void* raw, std::size_t size)
+ void operator delete(void* raw, const std::size_t size)
{
deallocate_coroutine<Allocator>(raw, size);
}
@@ -111,7 +111,9 @@ struct partial_promise : partial_promise_base<Allocator>
}
};
-} // namespace detail
+
+
+}; // namespace detail
} // namespace experimental
} // namespace asio
} // namespace boost
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/impl/as_single.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/impl/as_single.hpp
index 14a822ae666..81841fb3bea 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/impl/as_single.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/impl/as_single.hpp
@@ -20,7 +20,6 @@
#include <boost/asio/associator.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/detail/handler_cont_helpers.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -112,27 +111,23 @@ template <typename CompletionToken, typename Signature>
struct async_result<experimental::as_single_t<CompletionToken>, Signature>
{
template <typename Initiation>
- struct init_wrapper : detail::initiation_base<Initiation>
+ struct init_wrapper
{
- using detail::initiation_base<Initiation>::initiation_base;
-
- template <typename Handler, typename... Args>
- void operator()(Handler&& handler, Args&&... args) &&
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
{
- static_cast<Initiation&&>(*this)(
- experimental::detail::as_single_handler<decay_t<Handler>>(
- static_cast<Handler&&>(handler)),
- static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
- void operator()(Handler&& handler, Args&&... args) const &
+ void operator()(Handler&& handler, Args&&... args)
{
- static_cast<const Initiation&>(*this)(
+ static_cast<Initiation&&>(initiation_)(
experimental::detail::as_single_handler<decay_t<Handler>>(
static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
+
+ Initiation initiation_;
};
template <typename Initiation, typename RawCompletionToken, typename... Args>
diff --git a/contrib/restricted/boost/asio/include/boost/asio/co_composed.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/impl/co_composed.hpp
index e75377d47e5..54d95aa8f04 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/co_composed.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/impl/co_composed.hpp
@@ -1,6 +1,6 @@
//
-// co_composed.hpp
-// ~~~~~~~~~~~~~~~
+// experimental/impl/co_composed.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
@@ -8,17 +8,14 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-#ifndef BOOST_ASIO_CO_COMPOSED_HPP
-#define BOOST_ASIO_CO_COMPOSED_HPP
+#ifndef BOOST_ASIO_IMPL_EXPERIMENTAL_CO_COMPOSED_HPP
+#define BOOST_ASIO_IMPL_EXPERIMENTAL_CO_COMPOSED_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
-
-#if defined(BOOST_ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
-
#include <new>
#include <tuple>
#include <variant>
@@ -48,6 +45,7 @@
namespace boost {
namespace asio {
+namespace experimental {
namespace detail {
#if defined(BOOST_ASIO_HAS_STD_COROUTINE)
@@ -77,7 +75,7 @@ class co_composed_handler_base;
template <typename Executors, typename Handler, typename Return>
class co_composed_promise;
-template <BOOST_ASIO_COMPLETION_SIGNATURE... Signatures>
+template <completion_signature... Signatures>
class co_composed_returns
{
};
@@ -93,7 +91,7 @@ struct co_composed_completion : std::tuple<T&&...>
{
template <typename... U>
co_composed_completion(U&&... u) noexcept
- : std::tuple<T&&...>(static_cast<U&&>(u)...)
+ : std::tuple<T&&...>(std::forward<U>(u)...)
{
}
};
@@ -315,8 +313,8 @@ public:
(get_associated_cancellation_slot)(
static_cast<co_composed_state<Executors, Handler, Return>*>(
this)->handler()),
- static_cast<InFilter&&>(in_filter),
- static_cast<OutFilter&&>(out_filter));
+ std::forward<InFilter>(in_filter),
+ std::forward<OutFilter>(out_filter));
}
cancellation_type_t cancelled() const noexcept
@@ -471,7 +469,7 @@ public:
co_composed_state(composed_io_executors<Executors>&& executors,
H&& h, co_composed_on_suspend& on_suspend)
: work_(std::move(executors)),
- handler_(static_cast<H&&>(h)),
+ handler_(std::forward<H>(h)),
on_suspend_(&on_suspend)
{
this->reset_cancellation_state(enable_terminal_cancellation());
@@ -484,9 +482,9 @@ public:
template <typename... Args>
[[nodiscard]] co_composed_completion<Args...> complete(Args&&... args)
- requires requires { declval<Handler>()(static_cast<Args&&>(args)...); }
+ requires requires { declval<Handler>()(std::forward<Args>(args)...); }
{
- return co_composed_completion<Args...>(static_cast<Args&&>(args)...);
+ return co_composed_completion<Args...>(std::forward<Args>(args)...);
}
const Handler& handler() const noexcept
@@ -595,7 +593,7 @@ public:
template <typename... T>
void operator()(T&&... args)
{
- result_type result(static_cast<T&&>(args)...);
+ result_type result(std::forward<T>(args)...);
this->resume(&result);
}
@@ -627,7 +625,7 @@ public:
template <typename... T>
void operator()(const boost::system::error_code& ec, T&&... args)
{
- result_type result(ec, args_type(static_cast<T&&>(args)...));
+ result_type result(ec, args_type(std::forward<T>(args)...));
this->resume(&result);
}
@@ -660,7 +658,7 @@ public:
template <typename... T>
void operator()(std::exception_ptr ex, T&&... args)
{
- result_type result(std::move(ex), args_type(static_cast<T&&>(args)...));
+ result_type result(std::move(ex), args_type(std::forward<T>(args)...));
this->resume(&result);
}
@@ -866,7 +864,7 @@ public:
# endif // defined(BOOST_ASIO_HAS_SOURCE_LOCATION)
#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
)
- : op_(static_cast<Op&&>(op)),
+ : op_(std::forward<Op>(op)),
promise_(promise)
#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
# if defined(BOOST_ASIO_HAS_SOURCE_LOCATION)
@@ -897,7 +895,7 @@ public:
static_cast<awaitable*>(p)->location_.function_name()));
# endif // defined(BOOST_ASIO_HAS_SOURCE_LOCATION)
#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
- static_cast<Op&&>(static_cast<awaitable*>(p)->op_)(
+ std::forward<Op>(static_cast<awaitable*>(p)->op_)(
co_composed_handler<Executors, Handler,
Return, completion_signature_of_t<Op>>(
static_cast<awaitable*>(p)->promise_));
@@ -922,7 +920,7 @@ public:
};
state_.check_for_cancellation_on_transform();
- return awaitable{static_cast<Op&&>(op), *this
+ return awaitable{std::forward<Op>(op), *this
#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING)
# if defined(BOOST_ASIO_HAS_SOURCE_LOCATION)
, location
@@ -963,7 +961,7 @@ public:
Handler handler(std::move(a.promise_.state_.handler_));
std::tuple<decay_t<Args>...> result(
- std::move(static_cast<std::tuple<Args&&...>&>(a.result_)));
+ std::move(static_cast<std::tuple<Args&&...>>(a.result_)));
co_composed_handler_base<Executors, Handler,
Return>(std::move(composed_handler));
@@ -1016,7 +1014,7 @@ public:
template <typename I>
initiate_co_composed(I&& impl, composed_io_executors<Executors>&& executors)
- : implementation_(static_cast<I&&>(impl)),
+ : implementation_(std::forward<I>(impl)),
executors_(std::move(executors))
{
}
@@ -1034,8 +1032,8 @@ public:
co_composed_on_suspend on_suspend{};
implementation_(
co_composed_state<Executors, handler_type, returns_type>(
- executors_, static_cast<Handler&&>(handler), on_suspend),
- static_cast<InitArgs&&>(init_args)...);
+ executors_, std::forward<Handler>(handler), on_suspend),
+ std::forward<InitArgs>(init_args)...);
if (on_suspend.fn_)
on_suspend.fn_(on_suspend.arg_);
}
@@ -1048,8 +1046,8 @@ public:
co_composed_on_suspend on_suspend{};
std::move(implementation_)(
co_composed_state<Executors, handler_type, returns_type>(
- std::move(executors_), static_cast<Handler&&>(handler), on_suspend),
- static_cast<InitArgs&&>(init_args)...);
+ std::move(executors_), std::forward<Handler>(handler), on_suspend),
+ std::forward<InitArgs>(init_args)...);
if (on_suspend.fn_)
on_suspend.fn_(on_suspend.arg_);
}
@@ -1059,74 +1057,46 @@ private:
composed_io_executors<Executors> executors_;
};
-template <typename Implementation, typename... Signatures>
-class initiate_co_composed<Implementation, void(), Signatures...>
-{
-public:
- template <typename I>
- initiate_co_composed(I&& impl, composed_io_executors<void()>&&)
- : implementation_(static_cast<I&&>(impl))
- {
- }
-
- template <typename Handler, typename... InitArgs>
- void operator()(Handler&& handler, InitArgs&&... init_args) const &
- {
- using handler_type = decay_t<Handler>;
- using returns_type = co_composed_returns<Signatures...>;
- co_composed_on_suspend on_suspend{};
- implementation_(
- co_composed_state<void(), handler_type, returns_type>(
- composed_io_executors<void()>(),
- static_cast<Handler&&>(handler), on_suspend),
- static_cast<InitArgs&&>(init_args)...);
- if (on_suspend.fn_)
- on_suspend.fn_(on_suspend.arg_);
- }
-
- template <typename Handler, typename... InitArgs>
- void operator()(Handler&& handler, InitArgs&&... init_args) &&
- {
- using handler_type = decay_t<Handler>;
- using returns_type = co_composed_returns<Signatures...>;
- co_composed_on_suspend on_suspend{};
- std::move(implementation_)(
- co_composed_state<void(), handler_type, returns_type>(
- composed_io_executors<void()>(),
- static_cast<Handler&&>(handler), on_suspend),
- static_cast<InitArgs&&>(init_args)...);
- if (on_suspend.fn_)
- on_suspend.fn_(on_suspend.arg_);
- }
-
-private:
- Implementation implementation_;
-};
-
template <typename... Signatures, typename Implementation, typename Executors>
-inline initiate_co_composed<decay_t<Implementation>, Executors, Signatures...>
+inline initiate_co_composed<Implementation, Executors, Signatures...>
make_initiate_co_composed(Implementation&& implementation,
composed_io_executors<Executors>&& executors)
{
return initiate_co_composed<
decay_t<Implementation>, Executors, Signatures...>(
- static_cast<Implementation&&>(implementation), std::move(executors));
+ std::forward<Implementation>(implementation), std::move(executors));
}
} // namespace detail
+template <completion_signature... Signatures,
+ typename Implementation, typename... IoObjectsOrExecutors>
+inline auto co_composed(Implementation&& implementation,
+ IoObjectsOrExecutors&&... io_objects_or_executors)
+{
+ return detail::make_initiate_co_composed<Signatures...>(
+ std::forward<Implementation>(implementation),
+ detail::make_composed_io_executors(
+ detail::get_composed_io_executor(
+ std::forward<IoObjectsOrExecutors>(
+ io_objects_or_executors))...));
+}
+
+} // namespace experimental
+
#if !defined(GENERATING_DOCUMENTATION)
template <template <typename, typename> class Associator,
typename Executors, typename Handler, typename Return,
typename Signature, typename DefaultCandidate>
struct associator<Associator,
- detail::co_composed_handler<Executors, Handler, Return, Signature>,
+ experimental::detail::co_composed_handler<
+ Executors, Handler, Return, Signature>,
DefaultCandidate>
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::co_composed_handler<
+ const experimental::detail::co_composed_handler<
Executors, Handler, Return, Signature>& h) noexcept
{
return Associator<Handler, DefaultCandidate>::get(
@@ -1134,7 +1104,7 @@ struct associator<Associator,
}
static auto get(
- const detail::co_composed_handler<
+ const experimental::detail::co_composed_handler<
Executors, Handler, Return, Signature>& h,
const DefaultCandidate& c) noexcept
-> decltype(
@@ -1161,28 +1131,37 @@ namespace std { namespace experimental {
template <typename C, typename Executors,
typename Handler, typename Return, typename... Args>
struct coroutine_traits<void, C&,
- boost::asio::detail::co_composed_state<Executors, Handler, Return>, Args...>
+ boost::asio::experimental::detail::co_composed_state<
+ Executors, Handler, Return>,
+ Args...>
{
using promise_type =
- boost::asio::detail::co_composed_promise<Executors, Handler, Return>;
+ boost::asio::experimental::detail::co_composed_promise<
+ Executors, Handler, Return>;
};
template <typename C, typename Executors,
typename Handler, typename Return, typename... Args>
struct coroutine_traits<void, C&&,
- boost::asio::detail::co_composed_state<Executors, Handler, Return>, Args...>
+ boost::asio::experimental::detail::co_composed_state<
+ Executors, Handler, Return>,
+ Args...>
{
using promise_type =
- boost::asio::detail::co_composed_promise<Executors, Handler, Return>;
+ boost::asio::experimental::detail::co_composed_promise<
+ Executors, Handler, Return>;
};
template <typename Executors, typename Handler,
typename Return, typename... Args>
struct coroutine_traits<void,
- boost::asio::detail::co_composed_state<Executors, Handler, Return>, Args...>
+ boost::asio::experimental::detail::co_composed_state<
+ Executors, Handler, Return>,
+ Args...>
{
using promise_type =
- boost::asio::detail::co_composed_promise<Executors, Handler, Return>;
+ boost::asio::experimental::detail::co_composed_promise<
+ Executors, Handler, Return>;
};
# if defined(BOOST_ASIO_HAS_STD_COROUTINE)
@@ -1192,132 +1171,6 @@ struct coroutine_traits<void,
# endif // defined(BOOST_ASIO_HAS_STD_COROUTINE)
#endif // !defined(GENERATING_DOCUMENTATION)
-namespace boost {
-namespace asio {
-
-/// Creates an initiation function object that may be used to launch a
-/// coroutine-based composed asynchronous operation.
-/**
- * The co_composed utility simplifies the implementation of composed
- * asynchronous operations by automatically adapting a coroutine to be an
- * initiation function object for use with @c async_initiate. When awaiting
- * asynchronous operations, the coroutine automatically uses a conforming
- * intermediate completion handler.
- *
- * @param implementation A function object that contains the coroutine-based
- * implementation of the composed asynchronous operation. The first argument to
- * the function object represents the state of the operation, and may be used
- * to test for cancellation. The remaining arguments are those passed to @c
- * async_initiate after the completion token.
- *
- * @param io_objects_or_executors Zero or more I/O objects or I/O executors for
- * which outstanding work must be maintained while the operation is incomplete.
- *
- * @par Per-Operation Cancellation
- * By default, terminal per-operation cancellation is enabled for composed
- * operations that use co_composed. To disable cancellation for the composed
- * operation, or to alter its supported cancellation types, call the state's
- * @c reset_cancellation_state function.
- *
- * @par Examples
- * The following example illustrates manual error handling and explicit checks
- * for cancellation. The completion handler is invoked via a @c co_yield to the
- * state's @c complete function, which never returns.
- *
- * @code template <typename CompletionToken>
- * auto async_echo(tcp::socket& socket,
- * CompletionToken&& token)
- * {
- * return boost::asio::async_initiate<
- * CompletionToken, void(boost::system::error_code)>(
- * boost::asio::co_composed(
- * [](auto state, tcp::socket& socket) -> void
- * {
- * state.reset_cancellation_state(
- * boost::asio::enable_terminal_cancellation());
- *
- * while (!state.cancelled())
- * {
- * char data[1024];
- * auto [e1, n1] =
- * co_await socket.async_read_some(
- * boost::asio::buffer(data));
- *
- * if (e1)
- * co_yield state.complete(e1);
- *
- * if (!!state.cancelled())
- * co_yield state.complete(
- * make_error_code(boost::asio::error::operation_aborted));
- *
- * auto [e2, n2] =
- * co_await boost::asio::async_write(socket,
- * boost::asio::buffer(data, n1));
- *
- * if (e2)
- * co_yield state.complete(e2);
- * }
- * }, socket),
- * token, std::ref(socket));
- * } @endcode
- *
- * This next example shows exception-based error handling and implicit checks
- * for cancellation. The completion handler is invoked after returning from the
- * coroutine via @c co_return. Valid @c co_return values are specified using
- * completion signatures passed to the @c co_composed function.
- *
- * @code template <typename CompletionToken>
- * auto async_echo(tcp::socket& socket,
- * CompletionToken&& token)
- * {
- * return boost::asio::async_initiate<
- * CompletionToken, void(boost::system::error_code)>(
- * boost::asio::co_composed<
- * void(boost::system::error_code)>(
- * [](auto state, tcp::socket& socket) -> void
- * {
- * try
- * {
- * state.throw_if_cancelled(true);
- * state.reset_cancellation_state(
- * boost::asio::enable_terminal_cancellation());
- *
- * for (;;)
- * {
- * char data[1024];
- * std::size_t n = co_await socket.async_read_some(
- * boost::asio::buffer(data));
- *
- * co_await boost::asio::async_write(socket,
- * boost::asio::buffer(data, n));
- * }
- * }
- * catch (const boost::system::system_error& e)
- * {
- * co_return {e.code()};
- * }
- * }, socket),
- * token, std::ref(socket));
- * } @endcode
- */
-template <BOOST_ASIO_COMPLETION_SIGNATURE... Signatures,
- typename Implementation, typename... IoObjectsOrExecutors>
-inline auto co_composed(Implementation&& implementation,
- IoObjectsOrExecutors&&... io_objects_or_executors)
-{
- return detail::make_initiate_co_composed<Signatures...>(
- static_cast<Implementation&&>(implementation),
- detail::make_composed_io_executors(
- detail::get_composed_io_executor(
- static_cast<IoObjectsOrExecutors&&>(
- io_objects_or_executors))...));
-}
-
-} // namespace asio
-} // namespace boost
-
#include <boost/asio/detail/pop_options.hpp>
-#endif // defined(BOOST_ASIO_HAS_CO_AWAIT) || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_CO_COMPOSED_HPP
+#endif // BOOST_ASIO_IMPL_EXPERIMENTAL_CO_COMPOSED_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/impl/coro.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/impl/coro.hpp
index 80f2b4e3fb2..6e0bf0cc77d 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/impl/coro.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/impl/coro.hpp
@@ -601,7 +601,7 @@ struct coro_promise final :
cancellation_slot_type get_cancellation_slot() const noexcept
{
- return cancel ? cancel->state.slot() : cancellation_slot_type{};
+ return cancel ? cancel->slot : cancellation_slot_type{};
}
using allocator_type =
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/parallel_group.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/parallel_group.hpp
index e283e3fb1e7..cdaa7533773 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/parallel_group.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/parallel_group.hpp
@@ -208,36 +208,6 @@ public:
/**
* For example:
* @code boost::asio::experimental::make_parallel_group(
- * in.async_read_some(boost::asio::buffer(data)),
- * timer.async_wait()
- * ).async_wait(
- * boost::asio::experimental::wait_for_all(),
- * [](
- * std::array<std::size_t, 2> completion_order,
- * boost::system::error_code ec1, std::size_t n1,
- * boost::system::error_code ec2
- * )
- * {
- * switch (completion_order[0])
- * {
- * case 0:
- * {
- * std::cout << "descriptor finished: " << ec1 << ", " << n1 << "\n";
- * }
- * break;
- * case 1:
- * {
- * std::cout << "timer finished: " << ec2 << "\n";
- * }
- * break;
- * }
- * }
- * );
- * @endcode
- *
- * If preferred, the asynchronous operations may be explicitly packaged as
- * function objects:
- * @code boost::asio::experimental::make_parallel_group(
* [&](auto token)
* {
* return in.async_read_some(boost::asio::buffer(data), token);
@@ -363,12 +333,28 @@ public:
*
* For example:
* @code
- * using op_type =
- * decltype(socket1.async_read_some(boost::asio::buffer(data1)));
+ * using op_type = decltype(
+ * socket1.async_read_some(
+ * boost::asio::buffer(data1),
+ * boost::asio::deferred
+ * )
+ * );
*
* std::vector<op_type> ops;
- * ops.push_back(socket1.async_read_some(boost::asio::buffer(data1)));
- * ops.push_back(socket2.async_read_some(boost::asio::buffer(data2)));
+ *
+ * ops.push_back(
+ * socket1.async_read_some(
+ * boost::asio::buffer(data1),
+ * boost::asio::deferred
+ * )
+ * );
+ *
+ * ops.push_back(
+ * socket2.async_read_some(
+ * boost::asio::buffer(data2),
+ * boost::asio::deferred
+ * )
+ * );
*
* boost::asio::experimental::make_parallel_group(ops).async_wait(
* boost::asio::experimental::wait_for_all(),
@@ -406,12 +392,28 @@ make_parallel_group(Range&& range,
*
* For example:
* @code
- * using op_type =
- * decltype(socket1.async_read_some(boost::asio::buffer(data1)));
+ * using op_type = decltype(
+ * socket1.async_read_some(
+ * boost::asio::buffer(data1),
+ * boost::asio::deferred
+ * )
+ * );
*
* std::vector<op_type> ops;
- * ops.push_back(socket1.async_read_some(boost::asio::buffer(data1)));
- * ops.push_back(socket2.async_read_some(boost::asio::buffer(data2)));
+ *
+ * ops.push_back(
+ * socket1.async_read_some(
+ * boost::asio::buffer(data1),
+ * boost::asio::deferred
+ * )
+ * );
+ *
+ * ops.push_back(
+ * socket2.async_read_some(
+ * boost::asio::buffer(data2),
+ * boost::asio::deferred
+ * )
+ * );
*
* boost::asio::experimental::make_parallel_group(
* std::allocator_arg_t,
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/promise.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/promise.hpp
index e118007b5e2..205d7954569 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/promise.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/promise.hpp
@@ -85,9 +85,8 @@ struct promise_value_type<>
* awaitable<void> read_write_some(boost::asio::ip::tcp::socket & sock,
* boost::asio::mutable_buffer read_buf, boost::asio::const_buffer to_write)
* {
- * auto p = boost::asio::async_read(read_buf,
- * boost::asio::experimental::use_promise);
- * co_await boost::asio::async_write_some(to_write);
+ * auto p = boost::asio::async_read(read_buf, boost::asio::use_awaitable);
+ * co_await boost::asio::async_write_some(to_write, boost::asio::deferred);
* co_await p;
* }
* @endcode
@@ -141,6 +140,7 @@ struct promise<void(Ts...), Executor, Allocator>
*/
~promise() { cancel(); }
+
private:
#if !defined(GENERATING_DOCUMENTATION)
template <typename, typename, typename> friend struct promise;
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/use_coro.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/use_coro.hpp
index d8d0d355852..133a23aa21a 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/use_coro.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/use_coro.hpp
@@ -48,9 +48,8 @@ namespace experimental {
* the asynchronous operation completes, and the result of the operation is
* returned.
*
- * Note that this token is not the most efficient (use the default completion
- * token @c boost::asio::deferred for that) but does provide type erasure, as it
- * will always return a @c coro.
+ * Note that this token is not the most efficient (use @c boost::asio::deferred
+ * for that) but does provide type erasure, as it will always return a @c coro.
*/
template <typename Allocator = std::allocator<void>>
struct use_coro_t
@@ -85,6 +84,7 @@ struct use_coro_t
{
}
+
/// Specify an alternate allocator.
template <typename OtherAllocator>
use_coro_t<OtherAllocator> rebind(const OtherAllocator& allocator) const
@@ -174,9 +174,9 @@ private:
* See the documentation for boost::asio::use_coro_t for a usage example.
*/
#if defined(GENERATING_DOCUMENTATION)
-BOOST_ASIO_INLINE_VARIABLE constexpr use_coro_t<> use_coro;
+constexpr use_coro_t<> use_coro;
#else
-BOOST_ASIO_INLINE_VARIABLE constexpr use_coro_t<> use_coro(0, 0, 0);
+constexpr use_coro_t<> use_coro(0, 0, 0);
#endif
} // namespace experimental
diff --git a/contrib/restricted/boost/asio/include/boost/asio/experimental/use_promise.hpp b/contrib/restricted/boost/asio/include/boost/asio/experimental/use_promise.hpp
index e78921a4125..a2fa9d51bc7 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/experimental/use_promise.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/experimental/use_promise.hpp
@@ -100,7 +100,7 @@ private:
Allocator allocator_;
};
-BOOST_ASIO_INLINE_VARIABLE constexpr use_promise_t<> use_promise;
+constexpr use_promise_t<> use_promise;
} // namespace experimental
} // namespace asio
diff --git a/contrib/restricted/boost/asio/include/boost/asio/immediate.hpp b/contrib/restricted/boost/asio/include/boost/asio/immediate.hpp
deleted file mode 100644
index c5ff2f67adf..00000000000
--- a/contrib/restricted/boost/asio/include/boost/asio/immediate.hpp
+++ /dev/null
@@ -1,144 +0,0 @@
-//
-// immediate.hpp
-// ~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_IMMEDIATE_HPP
-#define BOOST_ASIO_IMMEDIATE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/associated_immediate_executor.hpp>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/dispatch.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Executor>
-class initiate_immediate
-{
-public:
- typedef Executor executor_type;
-
- explicit initiate_immediate(const Executor& ex)
- : ex_(ex)
- {
- }
-
- executor_type get_executor() const noexcept
- {
- return ex_;
- }
-
- template <typename CompletionHandler>
- void operator()(CompletionHandler&& handler) const
- {
- typename associated_immediate_executor<
- CompletionHandler, executor_type>::type ex =
- (get_associated_immediate_executor)(handler, ex_);
- (dispatch)(ex, static_cast<CompletionHandler&&>(handler));
- }
-
-private:
- Executor ex_;
-};
-
-} // namespace detail
-
-/// Launch a trivial asynchronous operation that completes immediately.
-/**
- * The async_immediate function is intended for use by composed operations,
- * which can delegate to this operation in order to implement the correct
- * semantics for immediate completion.
- *
- * @param ex The asynchronous operation's I/O executor.
- *
- * @param token The completion token.
- *
- * The completion handler is immediately submitted for execution by calling
- * boost::asio::dispatch() on the handler's associated immediate executor.
- *
- * If the completion handler does not have a customised associated immediate
- * executor, then the handler is submitted as if by calling boost::asio::post()
- * on the supplied I/O executor.
- *
- * @par Completion Signature
- * @code void() @endcode
- */
-template <typename Executor,
- BOOST_ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
- = default_completion_token_t<Executor>>
-inline auto async_immediate(const Executor& ex,
- NullaryToken&& token = default_completion_token_t<Executor>(),
- constraint_t<
- (execution::is_executor<Executor>::value
- && can_require<Executor, execution::blocking_t::never_t>::value)
- || is_executor<Executor>::value
- > = 0)
- -> decltype(
- async_initiate<NullaryToken, void()>(
- declval<detail::initiate_immediate<Executor>>(), token))
-{
- return async_initiate<NullaryToken, void()>(
- detail::initiate_immediate<Executor>(ex), token);
-}
-
-/// Launch a trivial asynchronous operation that completes immediately.
-/**
- * The async_immediate function is intended for use by composed operations,
- * which can delegate to this operation in order to implement the correct
- * semantics for immediate completion.
- *
- * @param ex The execution context used to obtain the asynchronous operation's
- * I/O executor.
- *
- * @param token The completion token.
- *
- * The completion handler is immediately submitted for execution by calling
- * boost::asio::dispatch() on the handler's associated immediate executor.
- *
- * If the completion handler does not have a customised associated immediate
- * executor, then the handler is submitted as if by calling boost::asio::post()
- * on the I/O executor obtained from the supplied execution context.
- *
- * @par Completion Signature
- * @code void() @endcode
- */
-template <typename ExecutionContext,
- BOOST_ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
- = default_completion_token_t<typename ExecutionContext::executor_type>>
-inline auto async_immediate(ExecutionContext& ctx,
- NullaryToken&& token = default_completion_token_t<
- typename ExecutionContext::executor_type>(),
- constraint_t<
- is_convertible<ExecutionContext&, execution_context&>::value
- > = 0)
- -> decltype(
- async_initiate<NullaryToken, void()>(
- declval<detail::initiate_immediate<
- typename ExecutionContext::executor_type>>(), token))
-{
- return async_initiate<NullaryToken, void()>(
- detail::initiate_immediate<
- typename ExecutionContext::executor_type>(
- ctx.get_executor()), token);
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMMEDIATE_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/append.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/append.hpp
index e358ea2b072..2e409e0dfe0 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/append.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/append.hpp
@@ -19,7 +19,6 @@
#include <boost/asio/associator.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/detail/handler_cont_helpers.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/detail/utility.hpp>
@@ -95,31 +94,25 @@ struct async_result<append_t<CompletionToken, Values...>, Signature>
Signature, Values...>::type signature;
template <typename Initiation>
- struct init_wrapper : detail::initiation_base<Initiation>
+ struct init_wrapper
{
- using detail::initiation_base<Initiation>::initiation_base;
-
- template <typename Handler, typename... Args>
- void operator()(Handler&& handler,
- std::tuple<Values...> values, Args&&... args) &&
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
{
- static_cast<Initiation&&>(*this)(
- detail::append_handler<decay_t<Handler>, Values...>(
- static_cast<Handler&&>(handler),
- static_cast<std::tuple<Values...>&&>(values)),
- static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
void operator()(Handler&& handler,
- std::tuple<Values...> values, Args&&... args) const &
+ std::tuple<Values...> values, Args&&... args)
{
- static_cast<const Initiation&>(*this)(
+ static_cast<Initiation&&>(initiation_)(
detail::append_handler<decay_t<Handler>, Values...>(
static_cast<Handler&&>(handler),
static_cast<std::tuple<Values...>&&>(values)),
static_cast<Args&&>(args)...);
}
+
+ Initiation initiation_;
};
template <typename Initiation, typename RawCompletionToken, typename... Args>
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/as_tuple.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/as_tuple.hpp
index 912e2666f98..780b271d051 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/as_tuple.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/as_tuple.hpp
@@ -17,11 +17,9 @@
#include <boost/asio/detail/config.hpp>
#include <tuple>
-#include <boost/asio/associated_executor.hpp>
#include <boost/asio/associator.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/detail/handler_cont_helpers.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -121,27 +119,23 @@ struct async_result<as_tuple_t<CompletionToken>, Signatures...>
typename detail::as_tuple_signature<Signatures>::type...>
{
template <typename Initiation>
- struct init_wrapper : detail::initiation_base<Initiation>
+ struct init_wrapper
{
- using detail::initiation_base<Initiation>::initiation_base;
-
- template <typename Handler, typename... Args>
- void operator()(Handler&& handler, Args&&... args) &&
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
{
- static_cast<Initiation&&>(*this)(
- detail::as_tuple_handler<decay_t<Handler>>(
- static_cast<Handler&&>(handler)),
- static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
- void operator()(Handler&& handler, Args&&... args) const &
+ void operator()(Handler&& handler, Args&&... args)
{
- static_cast<const Initiation&>(*this)(
+ static_cast<Initiation&&>(initiation_)(
detail::as_tuple_handler<decay_t<Handler>>(
static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
+
+ Initiation initiation_;
};
template <typename Initiation, typename RawCompletionToken, typename... Args>
@@ -178,27 +172,23 @@ struct async_result<as_tuple_t<CompletionToken>, Signature>
typename detail::as_tuple_signature<Signature>::type>
{
template <typename Initiation>
- struct init_wrapper : detail::initiation_base<Initiation>
+ struct init_wrapper
{
- using detail::initiation_base<Initiation>::initiation_base;
-
- template <typename Handler, typename... Args>
- void operator()(Handler&& handler, Args&&... args) &&
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
{
- static_cast<Initiation&&>(*this)(
- detail::as_tuple_handler<decay_t<Handler>>(
- static_cast<Handler&&>(handler)),
- static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
- void operator()(Handler&& handler, Args&&... args) const &
+ void operator()(Handler&& handler, Args&&... args)
{
- static_cast<const Initiation&>(*this)(
+ static_cast<Initiation&&>(initiation_)(
detail::as_tuple_handler<decay_t<Handler>>(
static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
+
+ Initiation initiation_;
};
template <typename Initiation, typename RawCompletionToken, typename... Args>
@@ -247,27 +237,6 @@ struct associator<Associator,
}
};
-template <typename... Signatures>
-struct async_result<partial_as_tuple, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&&, Args&&... args)
- -> decltype(
- async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- as_tuple_t<
- default_completion_token_t<associated_executor_t<Initiation>>>{},
- static_cast<Args&&>(args)...))
- {
- return async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- as_tuple_t<
- default_completion_token_t<associated_executor_t<Initiation>>>{},
- static_cast<Args&&>(args)...);
- }
-};
-
#endif // !defined(GENERATING_DOCUMENTATION)
} // namespace asio
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/awaitable.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/awaitable.hpp
index 477a45acffa..09833ead276 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/awaitable.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/awaitable.hpp
@@ -546,7 +546,7 @@ public:
{
this->coro_ = coroutine_handle<awaitable_frame>::from_promise(*this);
return awaitable<T, Executor>(this);
- }
+ };
template <typename U>
void return_value(U&& u)
@@ -583,7 +583,7 @@ public:
{
this->coro_ = coroutine_handle<awaitable_frame>::from_promise(*this);
return awaitable<void, Executor>(this);
- }
+ };
void return_void()
{
@@ -621,7 +621,7 @@ public:
{
this->coro_ = coroutine_handle<awaitable_frame>::from_promise(*this);
return awaitable<awaitable_thread_entry_point, Executor>(this);
- }
+ };
void return_void()
{
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/cancel_after.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/cancel_after.hpp
deleted file mode 100644
index 1a89a558920..00000000000
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/cancel_after.hpp
+++ /dev/null
@@ -1,270 +0,0 @@
-//
-// impl/cancel_after.hpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_IMPL_CANCEL_AFTER_HPP
-#define BOOST_ASIO_IMPL_CANCEL_AFTER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
-#include <boost/asio/detail/timed_cancel_op.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Initiation, typename Clock,
- typename WaitTraits, typename... Signatures>
-struct initiate_cancel_after : initiation_base<Initiation>
-{
- using initiation_base<Initiation>::initiation_base;
-
- template <typename Handler, typename Rep, typename Period, typename... Args>
- void operator()(Handler&& handler,
- const chrono::duration<Rep, Period>& timeout,
- cancellation_type_t cancel_type, Args&&... args) &&
- {
- using op = detail::timed_cancel_op<decay_t<Handler>,
- basic_waitable_timer<Clock, WaitTraits>, Signatures...>;
-
- non_const_lvalue<Handler> handler2(handler);
- typename op::ptr p = { boost::asio::detail::addressof(handler2.value),
- op::ptr::allocate(handler2.value), 0 };
- p.p = new (p.v) op(handler2.value,
- basic_waitable_timer<Clock, WaitTraits,
- typename Initiation::executor_type>(this->get_executor(), timeout),
- cancel_type);
-
- op* o = p.p;
- p.v = p.p = 0;
- o->start(static_cast<Initiation&&>(*this), static_cast<Args&&>(args)...);
- }
-
- template <typename Handler, typename Rep, typename Period, typename... Args>
- void operator()(Handler&& handler,
- const chrono::duration<Rep, Period>& timeout,
- cancellation_type_t cancel_type, Args&&... args) const &
- {
- using op = detail::timed_cancel_op<decay_t<Handler>,
- basic_waitable_timer<Clock, WaitTraits>, Signatures...>;
-
- non_const_lvalue<Handler> handler2(handler);
- typename op::ptr p = { boost::asio::detail::addressof(handler2.value),
- op::ptr::allocate(handler2.value), 0 };
- p.p = new (p.v) op(handler2.value,
- basic_waitable_timer<Clock, WaitTraits,
- typename Initiation::executor_type>(this->get_executor(), timeout),
- cancel_type);
-
- op* o = p.p;
- p.v = p.p = 0;
- o->start(static_cast<const Initiation&>(*this),
- static_cast<Args&&>(args)...);
- }
-};
-
-template <typename Initiation, typename Clock,
- typename WaitTraits, typename Executor, typename... Signatures>
-struct initiate_cancel_after_timer : initiation_base<Initiation>
-{
- using initiation_base<Initiation>::initiation_base;
-
- template <typename Handler, typename Rep, typename Period, typename... Args>
- void operator()(Handler&& handler,
- basic_waitable_timer<Clock, WaitTraits, Executor>* timer,
- const chrono::duration<Rep, Period>& timeout,
- cancellation_type_t cancel_type, Args&&... args) &&
- {
- using op = detail::timed_cancel_op<decay_t<Handler>,
- basic_waitable_timer<Clock, WaitTraits, Executor>&, Signatures...>;
-
- non_const_lvalue<Handler> handler2(handler);
- typename op::ptr p = { boost::asio::detail::addressof(handler2.value),
- op::ptr::allocate(handler2.value), 0 };
- timer->expires_after(timeout);
- p.p = new (p.v) op(handler2.value, *timer, cancel_type);
-
- op* o = p.p;
- p.v = p.p = 0;
- o->start(static_cast<Initiation&&>(*this), static_cast<Args&&>(args)...);
- }
-
- template <typename Handler, typename Rep, typename Period, typename... Args>
- void operator()(Handler&& handler,
- basic_waitable_timer<Clock, WaitTraits, Executor>* timer,
- const chrono::duration<Rep, Period>& timeout,
- cancellation_type_t cancel_type, Args&&... args) const &
- {
- using op = detail::timed_cancel_op<decay_t<Handler>,
- basic_waitable_timer<Clock, WaitTraits, Executor>&, Signatures...>;
-
- non_const_lvalue<Handler> handler2(handler);
- typename op::ptr p = { boost::asio::detail::addressof(handler2.value),
- op::ptr::allocate(handler2.value), 0 };
- timer->expires_after(timeout);
- p.p = new (p.v) op(handler2.value, *timer, cancel_type);
-
- op* o = p.p;
- p.v = p.p = 0;
- o->start(static_cast<const Initiation&>(*this),
- static_cast<Args&&>(args)...);
- }
-};
-
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename CompletionToken, typename Clock,
- typename WaitTraits, typename... Signatures>
-struct async_result<
- cancel_after_t<CompletionToken, Clock, WaitTraits>, Signatures...>
- : async_result<CompletionToken, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value,
- const CompletionToken, CompletionToken>,
- Signatures...>(
- declval<detail::initiate_cancel_after<
- decay_t<Initiation>, Clock, WaitTraits, Signatures...>>(),
- token.token_, token.timeout_, token.cancel_type_,
- static_cast<Args&&>(args)...))
- {
- return async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value,
- const CompletionToken, CompletionToken>,
- Signatures...>(
- detail::initiate_cancel_after<
- decay_t<Initiation>, Clock, WaitTraits, Signatures...>(
- static_cast<Initiation&&>(initiation)),
- token.token_, token.timeout_, token.cancel_type_,
- static_cast<Args&&>(args)...);
- }
-};
-
-template <typename CompletionToken, typename Clock,
- typename WaitTraits, typename Executor, typename... Signatures>
-struct async_result<
- cancel_after_timer<CompletionToken, Clock, WaitTraits, Executor>,
- Signatures...>
- : async_result<CompletionToken, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value,
- const CompletionToken, CompletionToken>,
- Signatures...>(
- declval<detail::initiate_cancel_after_timer<
- decay_t<Initiation>, Clock, WaitTraits, Executor, Signatures...>>(),
- token.token_, &token.timer_, token.timeout_,
- token.cancel_type_, static_cast<Args&&>(args)...))
- {
- return async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value,
- const CompletionToken, CompletionToken>,
- Signatures...>(
- detail::initiate_cancel_after_timer<
- decay_t<Initiation>, Clock, WaitTraits, Executor, Signatures...>(
- static_cast<Initiation&&>(initiation)),
- token.token_, &token.timer_, token.timeout_,
- token.cancel_type_, static_cast<Args&&>(args)...);
- }
-};
-
-template <typename Clock, typename WaitTraits, typename... Signatures>
-struct async_result<partial_cancel_after<Clock, WaitTraits>, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<
- const cancel_after_t<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits>&,
- Signatures...>(
- static_cast<Initiation&&>(initiation),
- cancel_after_t<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits>(
- default_completion_token_t<associated_executor_t<Initiation>>{},
- token.timeout_, token.cancel_type_),
- static_cast<Args&&>(args)...))
- {
- return async_initiate<
- const cancel_after_t<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits>&,
- Signatures...>(
- static_cast<Initiation&&>(initiation),
- cancel_after_t<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits>(
- default_completion_token_t<associated_executor_t<Initiation>>{},
- token.timeout_, token.cancel_type_),
- static_cast<Args&&>(args)...);
- }
-};
-
-template <typename Clock, typename WaitTraits,
- typename Executor, typename... Signatures>
-struct async_result<
- partial_cancel_after_timer<Clock, WaitTraits, Executor>, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- cancel_after_timer<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits, Executor>(
- default_completion_token_t<associated_executor_t<Initiation>>{},
- token.timer_, token.timeout_, token.cancel_type_),
- static_cast<Args&&>(args)...))
- {
- return async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- cancel_after_timer<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits, Executor>(
- default_completion_token_t<associated_executor_t<Initiation>>{},
- token.timer_, token.timeout_, token.cancel_type_),
- static_cast<Args&&>(args)...);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_CANCEL_AFTER_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/cancel_at.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/cancel_at.hpp
deleted file mode 100644
index 7634b5da03e..00000000000
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/cancel_at.hpp
+++ /dev/null
@@ -1,270 +0,0 @@
-//
-// impl/cancel_at.hpp
-// ~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_IMPL_CANCEL_AT_HPP
-#define BOOST_ASIO_IMPL_CANCEL_AT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
-#include <boost/asio/detail/timed_cancel_op.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Initiation, typename Clock,
- typename WaitTraits, typename... Signatures>
-struct initiate_cancel_at : initiation_base<Initiation>
-{
- using initiation_base<Initiation>::initiation_base;
-
- template <typename Handler, typename Duration, typename... Args>
- void operator()(Handler&& handler,
- const chrono::time_point<Clock, Duration>& expiry,
- cancellation_type_t cancel_type, Args&&... args) &&
- {
- using op = detail::timed_cancel_op<decay_t<Handler>,
- basic_waitable_timer<Clock, WaitTraits>, Signatures...>;
-
- non_const_lvalue<Handler> handler2(handler);
- typename op::ptr p = { boost::asio::detail::addressof(handler2.value),
- op::ptr::allocate(handler2.value), 0 };
- p.p = new (p.v) op(handler2.value,
- basic_waitable_timer<Clock, WaitTraits,
- typename Initiation::executor_type>(this->get_executor(), expiry),
- cancel_type);
-
- op* o = p.p;
- p.v = p.p = 0;
- o->start(static_cast<Initiation&&>(*this), static_cast<Args&&>(args)...);
- }
-
- template <typename Handler, typename Duration, typename... Args>
- void operator()(Handler&& handler,
- const chrono::time_point<Clock, Duration>& expiry,
- cancellation_type_t cancel_type, Args&&... args) const &
- {
- using op = detail::timed_cancel_op<decay_t<Handler>,
- basic_waitable_timer<Clock, WaitTraits>, Signatures...>;
-
- non_const_lvalue<Handler> handler2(handler);
- typename op::ptr p = { boost::asio::detail::addressof(handler2.value),
- op::ptr::allocate(handler2.value), 0 };
- p.p = new (p.v) op(handler2.value,
- basic_waitable_timer<Clock, WaitTraits,
- typename Initiation::executor_type>(this->get_executor(), expiry),
- cancel_type);
-
- op* o = p.p;
- p.v = p.p = 0;
- o->start(static_cast<const Initiation&>(*this),
- static_cast<Args&&>(args)...);
- }
-};
-
-template <typename Initiation, typename Clock,
- typename WaitTraits, typename Executor, typename... Signatures>
-struct initiate_cancel_at_timer : initiation_base<Initiation>
-{
- using initiation_base<Initiation>::initiation_base;
-
- template <typename Handler, typename Duration, typename... Args>
- void operator()(Handler&& handler,
- basic_waitable_timer<Clock, WaitTraits, Executor>* timer,
- const chrono::time_point<Clock, Duration>& expiry,
- cancellation_type_t cancel_type, Args&&... args) &&
- {
- using op = detail::timed_cancel_op<decay_t<Handler>,
- basic_waitable_timer<Clock, WaitTraits, Executor>&, Signatures...>;
-
- non_const_lvalue<Handler> handler2(handler);
- typename op::ptr p = { boost::asio::detail::addressof(handler2.value),
- op::ptr::allocate(handler2.value), 0 };
- timer->expires_at(expiry);
- p.p = new (p.v) op(handler2.value, *timer, cancel_type);
-
- op* o = p.p;
- p.v = p.p = 0;
- o->start(static_cast<Initiation&&>(*this), static_cast<Args&&>(args)...);
- }
-
- template <typename Handler, typename Duration, typename... Args>
- void operator()(Handler&& handler,
- basic_waitable_timer<Clock, WaitTraits, Executor>* timer,
- const chrono::time_point<Clock, Duration>& expiry,
- cancellation_type_t cancel_type, Args&&... args) const &
- {
- using op = detail::timed_cancel_op<decay_t<Handler>,
- basic_waitable_timer<Clock, WaitTraits, Executor>&, Signatures...>;
-
- non_const_lvalue<Handler> handler2(handler);
- typename op::ptr p = { boost::asio::detail::addressof(handler2.value),
- op::ptr::allocate(handler2.value), 0 };
- timer->expires_at(expiry);
- p.p = new (p.v) op(handler2.value, *timer, cancel_type);
-
- op* o = p.p;
- p.v = p.p = 0;
- o->start(static_cast<const Initiation&>(*this),
- static_cast<Args&&>(args)...);
- }
-};
-
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename CompletionToken, typename Clock,
- typename WaitTraits, typename... Signatures>
-struct async_result<
- cancel_at_t<CompletionToken, Clock, WaitTraits>, Signatures...>
- : async_result<CompletionToken, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value,
- const CompletionToken, CompletionToken>,
- Signatures...>(
- declval<detail::initiate_cancel_at<
- decay_t<Initiation>, Clock, WaitTraits, Signatures...>>(),
- token.token_, token.expiry_, token.cancel_type_,
- static_cast<Args&&>(args)...))
- {
- return async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value,
- const CompletionToken, CompletionToken>,
- Signatures...>(
- detail::initiate_cancel_at<
- decay_t<Initiation>, Clock, WaitTraits, Signatures...>(
- static_cast<Initiation&&>(initiation)),
- token.token_, token.expiry_, token.cancel_type_,
- static_cast<Args&&>(args)...);
- }
-};
-
-template <typename CompletionToken, typename Clock,
- typename WaitTraits, typename Executor, typename... Signatures>
-struct async_result<
- cancel_at_timer<CompletionToken, Clock, WaitTraits, Executor>,
- Signatures...>
- : async_result<CompletionToken, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value,
- const CompletionToken, CompletionToken>,
- Signatures...>(
- declval<detail::initiate_cancel_at_timer<
- decay_t<Initiation>, Clock, WaitTraits, Executor, Signatures...>>(),
- token.token_, &token.timer_, token.expiry_, token.cancel_type_,
- static_cast<Args&&>(args)...))
- {
- return async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value,
- const CompletionToken, CompletionToken>,
- Signatures...>(
- detail::initiate_cancel_at_timer<
- decay_t<Initiation>, Clock, WaitTraits, Executor, Signatures...>(
- static_cast<Initiation&&>(initiation)),
- token.token_, &token.timer_, token.expiry_, token.cancel_type_,
- static_cast<Args&&>(args)...);
- }
-};
-
-template <typename Clock, typename WaitTraits, typename... Signatures>
-struct async_result<partial_cancel_at<Clock, WaitTraits>, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<
- const cancel_at_t<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits>&,
- Signatures...>(
- static_cast<Initiation&&>(initiation),
- cancel_at_t<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits>(
- default_completion_token_t<associated_executor_t<Initiation>>{},
- token.expiry_, token.cancel_type_),
- static_cast<Args&&>(args)...))
- {
- return async_initiate<
- const cancel_at_t<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits>&,
- Signatures...>(
- static_cast<Initiation&&>(initiation),
- cancel_at_t<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits>(
- default_completion_token_t<associated_executor_t<Initiation>>{},
- token.expiry_, token.cancel_type_),
- static_cast<Args&&>(args)...);
- }
-};
-
-template <typename Clock, typename WaitTraits,
- typename Executor, typename... Signatures>
-struct async_result<
- partial_cancel_at_timer<Clock, WaitTraits, Executor>, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- cancel_at_timer<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits, Executor>(
- default_completion_token_t<associated_executor_t<Initiation>>{},
- token.timer_, token.expiry_, token.cancel_type_),
- static_cast<Args&&>(args)...))
- {
- return async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- cancel_at_timer<
- default_completion_token_t<associated_executor_t<Initiation>>,
- Clock, WaitTraits, Executor>(
- default_completion_token_t<associated_executor_t<Initiation>>{},
- token.timer_, token.expiry_, token.cancel_type_),
- static_cast<Args&&>(args)...);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_CANCEL_AT_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/co_spawn.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/co_spawn.hpp
index 31d3311c003..f2b5137f877 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/co_spawn.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/co_spawn.hpp
@@ -143,9 +143,7 @@ awaitable<awaitable_thread_entry_point, Executor> co_spawn_entry_point(
(co_await awaitable_thread_has_context_switched{}) = false;
std::exception_ptr e = nullptr;
bool done = false;
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
try
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
{
T t = co_await s.function();
@@ -166,7 +164,6 @@ awaitable<awaitable_thread_entry_point, Executor> co_spawn_entry_point(
co_return;
}
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
catch (...)
{
if (done)
@@ -174,7 +171,6 @@ awaitable<awaitable_thread_entry_point, Executor> co_spawn_entry_point(
e = std::current_exception();
}
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
bool switched = (co_await awaitable_thread_has_context_switched{});
if (!switched)
@@ -198,18 +194,14 @@ awaitable<awaitable_thread_entry_point, Executor> co_spawn_entry_point(
(co_await awaitable_thread_has_context_switched{}) = false;
std::exception_ptr e = nullptr;
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
try
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
{
co_await s.function();
}
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
catch (...)
{
e = std::current_exception();
}
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
bool switched = (co_await awaitable_thread_has_context_switched{});
if (!switched)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/connect.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/connect.hpp
index ab06b04c884..29138f648b5 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/connect.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/connect.hpp
@@ -35,6 +35,15 @@ namespace asio {
namespace detail
{
+ struct default_connect_condition
+ {
+ template <typename Endpoint>
+ bool operator()(const boost::system::error_code&, const Endpoint&)
+ {
+ return true;
+ }
+ };
+
template <typename Protocol, typename Iterator>
inline typename Protocol::endpoint deref_connect_result(
Iterator iter, boost::system::error_code& ec)
@@ -42,15 +51,38 @@ namespace detail
return ec ? typename Protocol::endpoint() : *iter;
}
+ template <typename T, typename Iterator>
+ struct legacy_connect_condition_helper : T
+ {
+ typedef char (*fallback_func_type)(...);
+ operator fallback_func_type() const;
+ };
+
+ template <typename R, typename Arg1, typename Arg2, typename Iterator>
+ struct legacy_connect_condition_helper<R (*)(Arg1, Arg2), Iterator>
+ {
+ R operator()(Arg1, Arg2) const;
+ char operator()(...) const;
+ };
+
+ template <typename T, typename Iterator>
+ struct is_legacy_connect_condition
+ {
+ static char asio_connect_condition_check(char);
+ static char (&asio_connect_condition_check(Iterator))[2];
+
+ static const bool value =
+ sizeof(asio_connect_condition_check(
+ (declval<legacy_connect_condition_helper<T, Iterator>>())(
+ declval<const boost::system::error_code>(),
+ declval<const Iterator>()))) != 1;
+ };
+
template <typename ConnectCondition, typename Iterator>
inline Iterator call_connect_condition(ConnectCondition& connect_condition,
const boost::system::error_code& ec, Iterator next, Iterator end,
- constraint_t<
- is_same<
- result_of_t<ConnectCondition(boost::system::error_code, Iterator)>,
- Iterator
- >::value
- > = 0)
+ enable_if_t<is_legacy_connect_condition<
+ ConnectCondition, Iterator>::value>* = 0)
{
if (next != end)
return connect_condition(ec, next);
@@ -60,27 +92,20 @@ namespace detail
template <typename ConnectCondition, typename Iterator>
inline Iterator call_connect_condition(ConnectCondition& connect_condition,
const boost::system::error_code& ec, Iterator next, Iterator end,
- constraint_t<
- is_same<
- result_of_t<ConnectCondition(boost::system::error_code,
- decltype(*declval<Iterator>()))>,
- bool
- >::value
- > = 0)
+ enable_if_t<!is_legacy_connect_condition<
+ ConnectCondition, Iterator>::value>* = 0)
{
for (;next != end; ++next)
if (connect_condition(ec, *next))
return next;
return end;
}
-} // namespace detail
+}
template <typename Protocol, typename Executor, typename EndpointSequence>
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints,
- constraint_t<
- is_endpoint_sequence<EndpointSequence>::value
- >)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
boost::system::error_code ec;
typename Protocol::endpoint result = connect(s, endpoints, ec);
@@ -91,9 +116,7 @@ typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
template <typename Protocol, typename Executor, typename EndpointSequence>
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, boost::system::error_code& ec,
- constraint_t<
- is_endpoint_sequence<EndpointSequence>::value
- >)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
return detail::deref_connect_result<Protocol>(
connect(s, endpoints.begin(), endpoints.end(),
@@ -103,9 +126,7 @@ typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
#if !defined(BOOST_ASIO_NO_DEPRECATED)
template <typename Protocol, typename Executor, typename Iterator>
Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
- constraint_t<
- !is_endpoint_sequence<Iterator>::value
- >)
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
boost::system::error_code ec;
Iterator result = connect(s, begin, ec);
@@ -116,9 +137,7 @@ Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
template <typename Protocol, typename Executor, typename Iterator>
inline Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, boost::system::error_code& ec,
- constraint_t<
- !is_endpoint_sequence<Iterator>::value
- >)
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
return connect(s, begin, Iterator(), detail::default_connect_condition(), ec);
}
@@ -145,13 +164,7 @@ template <typename Protocol, typename Executor,
typename EndpointSequence, typename ConnectCondition>
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
- constraint_t<
- is_endpoint_sequence<EndpointSequence>::value
- >,
- constraint_t<
- is_connect_condition<ConnectCondition,
- decltype(declval<const EndpointSequence&>().begin())>::value
- >)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
boost::system::error_code ec;
typename Protocol::endpoint result = connect(
@@ -165,13 +178,7 @@ template <typename Protocol, typename Executor,
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
boost::system::error_code& ec,
- constraint_t<
- is_endpoint_sequence<EndpointSequence>::value
- >,
- constraint_t<
- is_connect_condition<ConnectCondition,
- decltype(declval<const EndpointSequence&>().begin())>::value
- >)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
return detail::deref_connect_result<Protocol>(
connect(s, endpoints.begin(), endpoints.end(),
@@ -183,12 +190,7 @@ template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, ConnectCondition connect_condition,
- constraint_t<
- !is_endpoint_sequence<Iterator>::value
- >,
- constraint_t<
- is_connect_condition<ConnectCondition, Iterator>::value
- >)
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
boost::system::error_code ec;
Iterator result = connect(s, begin, connect_condition, ec);
@@ -201,12 +203,7 @@ template <typename Protocol, typename Executor,
inline Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, ConnectCondition connect_condition,
boost::system::error_code& ec,
- constraint_t<
- !is_endpoint_sequence<Iterator>::value
- >,
- constraint_t<
- is_connect_condition<ConnectCondition, Iterator>::value
- >)
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
return connect(s, begin, Iterator(), connect_condition, ec);
}
@@ -215,10 +212,7 @@ inline Iterator connect(basic_socket<Protocol, Executor>& s,
template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
- Iterator end, ConnectCondition connect_condition,
- constraint_t<
- is_connect_condition<ConnectCondition, Iterator>::value
- >)
+ Iterator end, ConnectCondition connect_condition)
{
boost::system::error_code ec;
Iterator result = connect(s, begin, end, connect_condition, ec);
@@ -230,10 +224,7 @@ template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
Iterator end, ConnectCondition connect_condition,
- boost::system::error_code& ec,
- constraint_t<
- is_connect_condition<ConnectCondition, Iterator>::value
- >)
+ boost::system::error_code& ec)
{
ec = boost::system::error_code();
@@ -697,6 +688,121 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename Protocol, typename Executor, typename EndpointSequence,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ typename Protocol::endpoint)) RangeConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
+ const EndpointSequence& endpoints, RangeConnectToken&& token,
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
+ -> decltype(
+ async_initiate<RangeConnectToken,
+ void (boost::system::error_code, typename Protocol::endpoint)>(
+ declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
+ token, endpoints, declval<detail::default_connect_condition>()))
+{
+ return async_initiate<RangeConnectToken,
+ void (boost::system::error_code, typename Protocol::endpoint)>(
+ detail::initiate_async_range_connect<Protocol, Executor>(s),
+ token, endpoints, detail::default_connect_condition());
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+template <typename Protocol, typename Executor, typename Iterator,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ Iterator)) IteratorConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, IteratorConnectToken&& token,
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (boost::system::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, Iterator(), declval<detail::default_connect_condition>()))
+{
+ return async_initiate<IteratorConnectToken,
+ void (boost::system::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect<Protocol, Executor>(s),
+ token, begin, Iterator(), detail::default_connect_condition());
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Protocol, typename Executor, typename Iterator,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ Iterator)) IteratorConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, Iterator end, IteratorConnectToken&& token)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (boost::system::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, end, declval<detail::default_connect_condition>()))
+{
+ return async_initiate<IteratorConnectToken,
+ void (boost::system::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect<Protocol, Executor>(s),
+ token, begin, end, detail::default_connect_condition());
+}
+
+template <typename Protocol, typename Executor,
+ typename EndpointSequence, typename ConnectCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ typename Protocol::endpoint)) RangeConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
+ const EndpointSequence& endpoints, ConnectCondition connect_condition,
+ RangeConnectToken&& token,
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
+ -> decltype(
+ async_initiate<RangeConnectToken,
+ void (boost::system::error_code, typename Protocol::endpoint)>(
+ declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
+ token, endpoints, connect_condition))
+{
+ return async_initiate<RangeConnectToken,
+ void (boost::system::error_code, typename Protocol::endpoint)>(
+ detail::initiate_async_range_connect<Protocol, Executor>(s),
+ token, endpoints, connect_condition);
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+template <typename Protocol, typename Executor,
+ typename Iterator, typename ConnectCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ Iterator)) IteratorConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+ ConnectCondition connect_condition, IteratorConnectToken&& token,
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (boost::system::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, Iterator(), connect_condition))
+{
+ return async_initiate<IteratorConnectToken,
+ void (boost::system::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect<Protocol, Executor>(s),
+ token, begin, Iterator(), connect_condition);
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Protocol, typename Executor,
+ typename Iterator, typename ConnectCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ Iterator)) IteratorConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, Iterator end, ConnectCondition connect_condition,
+ IteratorConnectToken&& token)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (boost::system::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, end, connect_condition))
+{
+ return async_initiate<IteratorConnectToken,
+ void (boost::system::error_code, Iterator)>(
+ detail::initiate_async_iterator_connect<Protocol, Executor>(s),
+ token, begin, end, connect_condition);
+}
+
} // namespace asio
} // namespace boost
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/consign.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/consign.hpp
index 03942963c68..59e977d5450 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/consign.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/consign.hpp
@@ -19,7 +19,6 @@
#include <boost/asio/associator.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/detail/handler_cont_helpers.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/detail/utility.hpp>
@@ -71,31 +70,25 @@ struct async_result<consign_t<CompletionToken, Values...>, Signatures...>
: async_result<CompletionToken, Signatures...>
{
template <typename Initiation>
- struct init_wrapper : detail::initiation_base<Initiation>
+ struct init_wrapper
{
- using detail::initiation_base<Initiation>::initiation_base;
-
- template <typename Handler, typename... Args>
- void operator()(Handler&& handler,
- std::tuple<Values...> values, Args&&... args) &&
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
{
- static_cast<Initiation&&>(*this)(
- detail::consign_handler<decay_t<Handler>, Values...>(
- static_cast<Handler&&>(handler),
- static_cast<std::tuple<Values...>&&>(values)),
- static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
void operator()(Handler&& handler,
- std::tuple<Values...> values, Args&&... args) const &
+ std::tuple<Values...> values, Args&&... args)
{
- static_cast<const Initiation&>(*this)(
+ static_cast<Initiation&&>(initiation_)(
detail::consign_handler<decay_t<Handler>, Values...>(
static_cast<Handler&&>(handler),
static_cast<std::tuple<Values...>&&>(values)),
static_cast<Args&&>(args)...);
}
+
+ Initiation initiation_;
};
template <typename Initiation, typename RawCompletionToken, typename... Args>
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/detached.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/detached.hpp
index 2ad31cb29bf..8fdcfc6d549 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/detached.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/detached.hpp
@@ -44,8 +44,8 @@ namespace detail {
#if !defined(GENERATING_DOCUMENTATION)
-template <typename... Signatures>
-struct async_result<detached_t, Signatures...>
+template <typename Signature>
+struct async_result<detached_t, Signature>
{
typedef boost::asio::detail::detached_handler completion_handler_type;
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/prepend.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/prepend.hpp
index 7db1bf2f1b9..841fb890943 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/prepend.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/prepend.hpp
@@ -19,7 +19,6 @@
#include <boost/asio/associator.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/detail/handler_cont_helpers.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/detail/utility.hpp>
@@ -96,31 +95,25 @@ struct async_result<
Signature, Values...>::type signature;
template <typename Initiation>
- struct init_wrapper : detail::initiation_base<Initiation>
+ struct init_wrapper
{
- using detail::initiation_base<Initiation>::initiation_base;
-
- template <typename Handler, typename... Args>
- void operator()(Handler&& handler,
- std::tuple<Values...> values, Args&&... args) &&
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
{
- static_cast<Initiation&&>(*this)(
- detail::prepend_handler<decay_t<Handler>, Values...>(
- static_cast<Handler&&>(handler),
- static_cast<std::tuple<Values...>&&>(values)),
- static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
void operator()(Handler&& handler,
- std::tuple<Values...> values, Args&&... args) const &
+ std::tuple<Values...> values, Args&&... args)
{
- static_cast<const Initiation&>(*this)(
+ static_cast<Initiation&&>(initiation_)(
detail::prepend_handler<decay_t<Handler>, Values...>(
static_cast<Handler&&>(handler),
static_cast<std::tuple<Values...>&&>(values)),
static_cast<Args&&>(args)...);
}
+
+ Initiation initiation_;
};
template <typename Initiation, typename RawCompletionToken, typename... Args>
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/read.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/read.hpp
index 9b05a671fbe..28465873989 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/read.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/read.hpp
@@ -65,9 +65,6 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
return detail::read_buffer_seq(s, buffers,
@@ -103,9 +100,6 @@ inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
boost::system::error_code ec;
@@ -127,9 +121,6 @@ std::size_t read(SyncReadStream& s,
>,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
decay_t<DynamicBuffer_v1> b(
@@ -198,9 +189,6 @@ inline std::size_t read(SyncReadStream& s,
>,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
boost::system::error_code ec;
@@ -218,10 +206,7 @@ template <typename SyncReadStream, typename Allocator,
typename CompletionCondition>
inline std::size_t read(SyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition, boost::system::error_code& ec)
{
return read(s, basic_streambuf_ref<Allocator>(b),
static_cast<CompletionCondition&&>(completion_condition), ec);
@@ -246,10 +231,7 @@ template <typename SyncReadStream, typename Allocator,
typename CompletionCondition>
inline std::size_t read(SyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition)
{
return read(s, basic_streambuf_ref<Allocator>(b),
static_cast<CompletionCondition&&>(completion_condition));
@@ -265,9 +247,6 @@ std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
DynamicBuffer_v2& b = buffers;
@@ -326,9 +305,6 @@ inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
boost::system::error_code ec;
@@ -522,6 +498,47 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncReadStream,
+ typename MutableBufferSequence, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
+ CompletionCondition completion_condition, ReadToken&& token,
+ constraint_t<
+ is_mutable_buffer_sequence<MutableBufferSequence>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read<AsyncReadStream>>(), token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read<AsyncReadStream>(s), token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
+template <typename AsyncReadStream, typename MutableBufferSequence,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s,
+ const MutableBufferSequence& buffers, ReadToken&& token,
+ constraint_t<
+ is_mutable_buffer_sequence<MutableBufferSequence>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read<AsyncReadStream>>(),
+ token, buffers, transfer_all()))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read<AsyncReadStream>(s),
+ token, buffers, transfer_all());
+}
+
#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
namespace detail
@@ -706,6 +723,97 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s,
+ DynamicBuffer_v1&& buffers, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), transfer_all()))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), transfer_all());
+}
+
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ CompletionCondition completion_condition, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+template <typename AsyncReadStream, typename Allocator,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s,
+ basic_streambuf<Allocator>& b, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all()))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all());
+}
+
+template <typename AsyncReadStream,
+ typename Allocator, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
namespace detail
@@ -896,6 +1004,49 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s,
+ DynamicBuffer_v2 buffers, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), transfer_all()))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), transfer_all());
+}
+
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_dynbuf_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
} // namespace asio
} // namespace boost
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/read_at.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/read_at.hpp
index 44cc717d3de..77246f39c72 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/read_at.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/read_at.hpp
@@ -67,10 +67,7 @@ template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition, boost::system::error_code& ec)
{
return detail::read_at_buffer_sequence(d, offset, buffers,
boost::asio::buffer_sequence_begin(buffers),
@@ -100,10 +97,7 @@ template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
typename CompletionCondition>
inline std::size_t read_at(SyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition)
{
boost::system::error_code ec;
std::size_t bytes_transferred = read_at(d, offset, buffers,
@@ -119,10 +113,7 @@ template <typename SyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition, boost::system::error_code& ec)
{
ec = boost::system::error_code();
std::size_t total_transferred = 0;
@@ -165,10 +156,7 @@ template <typename SyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition>
inline std::size_t read_at(SyncRandomAccessReadDevice& d,
uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition)
{
boost::system::error_code ec;
std::size_t bytes_transferred = read_at(d, offset, b,
@@ -372,6 +360,44 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncRandomAccessReadDevice,
+ typename MutableBufferSequence, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ CompletionCondition completion_condition, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_at<AsyncRandomAccessReadDevice>(d),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
+template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
+ token, offset, buffers, transfer_all()))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_at<AsyncRandomAccessReadDevice>(d),
+ token, offset, buffers, transfer_all());
+}
+
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if !defined(BOOST_ASIO_NO_IOSTREAM)
@@ -553,6 +579,46 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncRandomAccessReadDevice,
+ typename Allocator, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at_streambuf<
+ AsyncRandomAccessReadDevice>>(),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_at_streambuf<AsyncRandomAccessReadDevice>(d),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
+template <typename AsyncRandomAccessReadDevice, typename Allocator,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
+ boost::asio::basic_streambuf<Allocator>& b, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at_streambuf<
+ AsyncRandomAccessReadDevice>>(),
+ token, offset, &b, transfer_all()))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_at_streambuf<AsyncRandomAccessReadDevice>(d),
+ token, offset, &b, transfer_all());
+}
+
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/read_until.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/read_until.hpp
index 08e51ecc486..322c9d1d86f 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/read_until.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/read_until.hpp
@@ -69,19 +69,6 @@ namespace detail
}
return std::make_pair(last1, false);
}
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
- struct regex_match_flags
- {
- template <typename T>
- operator T() const
- {
- return T::match_default | T::match_partial;
- }
- };
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
} // namespace detail
#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -245,6 +232,19 @@ std::size_t read_until(SyncReadStream& s,
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
+namespace detail {
+
+struct regex_match_flags
+{
+ template <typename T>
+ operator T() const
+ {
+ return T::match_default | T::match_partial;
+ }
+};
+
+} // namespace detail
+
template <typename SyncReadStream, typename DynamicBuffer_v1, typename Traits>
inline std::size_t read_until(SyncReadStream& s, DynamicBuffer_v1&& buffers,
const boost::basic_regex<char, Traits>& expr,
@@ -1029,6 +1029,29 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v1&& buffers, char delim, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), delim))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), delim);
+}
+
namespace detail
{
template <typename AsyncReadStream,
@@ -1257,6 +1280,32 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncReadStream, typename DynamicBuffer_v1,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_string_v1<
+ AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<std::string>(delim)))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_string_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<std::string>(delim));
+}
+
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
@@ -1489,6 +1538,29 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncReadStream, typename DynamicBuffer_v1, typename Traits,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ const boost::basic_regex<char, Traits>& expr, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), expr))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_expr_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), expr);
+}
+
#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
namespace detail
@@ -1719,6 +1791,117 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v1, typename MatchCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ MatchCondition match_condition, ReadToken&& token,
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ >,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ match_condition))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_match_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ match_condition);
+}
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+template <typename AsyncReadStream, typename Allocator,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, char delim, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), delim))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), delim);
+}
+
+template <typename AsyncReadStream, typename Allocator,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ BOOST_ASIO_STRING_VIEW_PARAM delim, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_string_v1<
+ AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<std::string>(delim)))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_string_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<std::string>(delim));
+}
+
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+template <typename AsyncReadStream, typename Allocator, typename Traits,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), expr))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_expr_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), expr);
+}
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+template <typename AsyncReadStream, typename Allocator, typename MatchCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ MatchCondition match_condition, ReadToken&& token,
+ constraint_t<is_match_condition<MatchCondition>::value>)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), match_condition))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_match_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), match_condition);
+}
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -1946,6 +2129,26 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncReadStream, typename DynamicBuffer_v2,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v2 buffers, char delim, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), delim))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), delim);
+}
+
namespace detail
{
template <typename AsyncReadStream,
@@ -2182,6 +2385,30 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v2,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_string_v2<
+ AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<std::string>(delim)))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_delim_string_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<std::string>(delim));
+}
+
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
@@ -2423,6 +2650,26 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncReadStream, typename DynamicBuffer_v2, typename Traits,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::basic_regex<char, Traits>& expr, ReadToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), expr))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_expr_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), expr);
+}
+
#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
namespace detail
@@ -2660,6 +2907,32 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncReadStream,
+ typename DynamicBuffer_v2, typename MatchCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ MatchCondition match_condition, ReadToken&& token,
+ constraint_t<
+ is_match_condition<MatchCondition>::value
+ >,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ match_condition))
+{
+ return async_initiate<ReadToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_read_until_match_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ match_condition);
+}
+
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
} // namespace asio
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/redirect_error.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/redirect_error.hpp
index b2f8ac7f398..f97a96b14e6 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/redirect_error.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/redirect_error.hpp
@@ -16,11 +16,9 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
-#include <boost/asio/associated_executor.hpp>
#include <boost/asio/associator.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/detail/handler_cont_helpers.hpp>
-#include <boost/asio/detail/initiation_base.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/system/system_error.hpp>
@@ -185,52 +183,42 @@ struct async_result<redirect_error_t<CompletionToken>, Signature>
: async_result<CompletionToken,
typename detail::redirect_error_signature<Signature>::type>
{
- template <typename Initiation>
- struct init_wrapper : detail::initiation_base<Initiation>
- {
- using detail::initiation_base<Initiation>::initiation_base;
- template <typename Handler, typename... Args>
- void operator()(Handler&& handler,
- boost::system::error_code* ec, Args&&... args) &&
+ struct init_wrapper
+ {
+ explicit init_wrapper(boost::system::error_code& ec)
+ : ec_(ec)
{
- static_cast<Initiation&&>(*this)(
- detail::redirect_error_handler<decay_t<Handler>>(
- *ec, static_cast<Handler&&>(handler)),
- static_cast<Args&&>(args)...);
}
- template <typename Handler, typename... Args>
+ template <typename Handler, typename Initiation, typename... Args>
void operator()(Handler&& handler,
- boost::system::error_code* ec, Args&&... args) const &
+ Initiation&& initiation, Args&&... args) const
{
- static_cast<const Initiation&>(*this)(
+ static_cast<Initiation&&>(initiation)(
detail::redirect_error_handler<decay_t<Handler>>(
- *ec, static_cast<Handler&&>(handler)),
+ ec_, static_cast<Handler&&>(handler)),
static_cast<Args&&>(args)...);
}
+
+ boost::system::error_code& ec_;
};
template <typename Initiation, typename RawCompletionToken, typename... Args>
static auto initiate(Initiation&& initiation,
RawCompletionToken&& token, Args&&... args)
-> decltype(
- async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value,
- const CompletionToken, CompletionToken>,
+ async_initiate<CompletionToken,
typename detail::redirect_error_signature<Signature>::type>(
- declval<init_wrapper<decay_t<Initiation>>>(),
- token.token_, &token.ec_, static_cast<Args&&>(args)...))
+ declval<init_wrapper>(), token.token_,
+ static_cast<Initiation&&>(initiation),
+ static_cast<Args&&>(args)...))
{
- return async_initiate<
- conditional_t<
- is_const<remove_reference_t<RawCompletionToken>>::value,
- const CompletionToken, CompletionToken>,
+ return async_initiate<CompletionToken,
typename detail::redirect_error_signature<Signature>::type>(
- init_wrapper<decay_t<Initiation>>(
- static_cast<Initiation&&>(initiation)),
- token.token_, &token.ec_, static_cast<Args&&>(args)...);
+ init_wrapper(token.ec_), token.token_,
+ static_cast<Initiation&&>(initiation),
+ static_cast<Args&&>(args)...);
}
};
@@ -254,31 +242,6 @@ struct associator<Associator,
}
};
-template <typename... Signatures>
-struct async_result<partial_redirect_error, Signatures...>
-{
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static auto initiate(Initiation&& initiation,
- RawCompletionToken&& token, Args&&... args)
- -> decltype(
- async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- redirect_error_t<
- default_completion_token_t<associated_executor_t<Initiation>>>(
- default_completion_token_t<associated_executor_t<Initiation>>{},
- token.ec_),
- static_cast<Args&&>(args)...))
- {
- return async_initiate<Signatures...>(
- static_cast<Initiation&&>(initiation),
- redirect_error_t<
- default_completion_token_t<associated_executor_t<Initiation>>>(
- default_completion_token_t<associated_executor_t<Initiation>>{},
- token.ec_),
- static_cast<Args&&>(args)...);
- }
-};
-
#endif // !defined(GENERATING_DOCUMENTATION)
} // namespace asio
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/spawn.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/spawn.hpp
index 03800c5ca59..04b6710ae48 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/spawn.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/spawn.hpp
@@ -29,7 +29,6 @@
#include <boost/asio/detail/noncopyable.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/detail/utility.hpp>
-#include <boost/asio/error.hpp>
#include <boost/system/system_error.hpp>
#if defined(BOOST_ASIO_HAS_BOOST_CONTEXT_FIBER)
@@ -977,6 +976,7 @@ private:
Executor ex_;
};
+
template <typename Handler, typename Executor>
class spawn_cancellation_handler<Handler, Executor,
enable_if_t<
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/write.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/write.hpp
index ff26e1773f0..e859f38c881 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/write.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/write.hpp
@@ -63,9 +63,6 @@ inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
return detail::write(s, buffers,
@@ -101,9 +98,6 @@ inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
boost::system::error_code ec;
@@ -125,9 +119,6 @@ std::size_t write(SyncWriteStream& s,
>,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
decay_t<DynamicBuffer_v1> b(
@@ -182,9 +173,6 @@ inline std::size_t write(SyncWriteStream& s,
>,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
boost::system::error_code ec;
@@ -202,10 +190,7 @@ template <typename SyncWriteStream, typename Allocator,
typename CompletionCondition>
inline std::size_t write(SyncWriteStream& s,
boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition, boost::system::error_code& ec)
{
return write(s, basic_streambuf_ref<Allocator>(b),
static_cast<CompletionCondition&&>(completion_condition), ec);
@@ -230,10 +215,7 @@ template <typename SyncWriteStream, typename Allocator,
typename CompletionCondition>
inline std::size_t write(SyncWriteStream& s,
boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition)
{
return write(s, basic_streambuf_ref<Allocator>(b),
static_cast<CompletionCondition&&>(completion_condition));
@@ -249,9 +231,6 @@ std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
std::size_t bytes_transferred = write(s, buffers.data(0, buffers.size()),
@@ -291,9 +270,6 @@ inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
>)
{
boost::system::error_code ec;
@@ -487,6 +463,49 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncWriteStream,
+ typename ConstBufferSequence, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
+ CompletionCondition completion_condition, WriteToken&& token,
+ constraint_t<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write<AsyncWriteStream>>(),
+ token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write<AsyncWriteStream>(s),
+ token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
+template <typename AsyncWriteStream, typename ConstBufferSequence,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
+ const ConstBufferSequence& buffers, WriteToken&& token,
+ constraint_t<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write<AsyncWriteStream>>(),
+ token, buffers, transfer_all()))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write<AsyncWriteStream>(s),
+ token, buffers, transfer_all());
+}
+
#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
namespace detail
@@ -631,6 +650,101 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
+ DynamicBuffer_v1&& buffers, WriteToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ transfer_all()))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ transfer_all());
+}
+
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v1, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
+ CompletionCondition completion_condition, WriteToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+template <typename AsyncWriteStream, typename Allocator,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all()))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all());
+}
+
+template <typename AsyncWriteStream,
+ typename Allocator, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
namespace detail
@@ -774,6 +888,51 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
+ DynamicBuffer_v2 buffers, WriteToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ transfer_all()))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ transfer_all());
+}
+
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v2, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
+ CompletionCondition completion_condition, WriteToken&& token,
+ constraint_t<
+ is_dynamic_buffer_v2<DynamicBuffer_v2>::value
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
} // namespace asio
} // namespace boost
diff --git a/contrib/restricted/boost/asio/include/boost/asio/impl/write_at.hpp b/contrib/restricted/boost/asio/include/boost/asio/impl/write_at.hpp
index faa0ed2cc99..f516b88a657 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/impl/write_at.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/impl/write_at.hpp
@@ -65,10 +65,7 @@ template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
typename CompletionCondition>
std::size_t write_at(SyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition, boost::system::error_code& ec)
{
return detail::write_at_buffer_sequence(d, offset, buffers,
boost::asio::buffer_sequence_begin(buffers),
@@ -98,10 +95,7 @@ template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
typename CompletionCondition>
inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition)
{
boost::system::error_code ec;
std::size_t bytes_transferred = write_at(d, offset, buffers,
@@ -117,10 +111,7 @@ template <typename SyncRandomAccessWriteDevice, typename Allocator,
typename CompletionCondition>
std::size_t write_at(SyncRandomAccessWriteDevice& d,
uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition, boost::system::error_code& ec)
{
std::size_t bytes_transferred = write_at(d, offset, b.data(),
static_cast<CompletionCondition&&>(completion_condition), ec);
@@ -150,10 +141,7 @@ template <typename SyncRandomAccessWriteDevice, typename Allocator,
typename CompletionCondition>
inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- >)
+ CompletionCondition completion_condition)
{
boost::system::error_code ec;
std::size_t bytes_transferred = write_at(d, offset, b,
@@ -357,6 +345,46 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncRandomAccessWriteDevice,
+ typename ConstBufferSequence, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ CompletionCondition completion_condition, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_at<AsyncRandomAccessWriteDevice>(d),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
+template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, buffers, transfer_all()))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_at<AsyncRandomAccessWriteDevice>(d),
+ token, offset, buffers, transfer_all());
+}
+
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if !defined(BOOST_ASIO_NO_IOSTREAM)
@@ -471,6 +499,49 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
+template <typename AsyncRandomAccessWriteDevice,
+ typename Allocator, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>(d),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition));
+}
+
+template <typename AsyncRandomAccessWriteDevice, typename Allocator,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, boost::asio::basic_streambuf<Allocator>& b,
+ WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, &b, transfer_all()))
+{
+ return async_initiate<WriteToken,
+ void (boost::system::error_code, std::size_t)>(
+ detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>(d),
+ token, offset, &b, transfer_all());
+}
+
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/io_context_strand.hpp b/contrib/restricted/boost/asio/include/boost/asio/io_context_strand.hpp
index c612584e52d..e2864763a1b 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/io_context_strand.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/io_context_strand.hpp
@@ -55,18 +55,18 @@ namespace asio {
* if any of the following conditions are true:
*
* @li @c s.post(a) happens-before @c s.post(b)
- *
+ *
* @li @c s.post(a) happens-before @c s.dispatch(b), where the latter is
* performed outside the strand
- *
+ *
* @li @c s.dispatch(a) happens-before @c s.post(b), where the former is
* performed outside the strand
- *
+ *
* @li @c s.dispatch(a) happens-before @c s.dispatch(b), where both are
* performed outside the strand
- *
+ *
* then @c a() happens-before @c b()
- *
+ *
* Note that in the following case:
* @code async_op_1(..., s.wrap(a));
* async_op_2(..., s.wrap(b)); @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/ip/basic_resolver.hpp b/contrib/restricted/boost/asio/include/boost/asio/ip/basic_resolver.hpp
index 9ed8578005f..e46a8333dd6 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/ip/basic_resolver.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/ip/basic_resolver.hpp
@@ -663,7 +663,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
@@ -715,7 +715,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
@@ -784,7 +784,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
@@ -855,7 +855,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
@@ -927,7 +927,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
@@ -1032,7 +1032,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
diff --git a/contrib/restricted/boost/asio/include/boost/asio/ip/detail/socket_option.hpp b/contrib/restricted/boost/asio/include/boost/asio/ip/detail/socket_option.hpp
index 3ae928c7f68..a806d344fd1 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/ip/detail/socket_option.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/ip/detail/socket_option.hpp
@@ -40,7 +40,7 @@ public:
#if defined(__sun) || defined(__osf__)
typedef unsigned char ipv4_value_type;
typedef unsigned char ipv6_value_type;
-#elif defined(_AIX) || defined(__hpux) || defined(__QNXNTO__)
+#elif defined(_AIX) || defined(__hpux) || defined(__QNXNTO__)
typedef unsigned char ipv4_value_type;
typedef unsigned int ipv6_value_type;
#else
diff --git a/contrib/restricted/boost/asio/include/boost/asio/ip/impl/address_v6.ipp b/contrib/restricted/boost/asio/include/boost/asio/ip/impl/address_v6.ipp
index adb7ae1d4e6..cf81cca410c 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/ip/impl/address_v6.ipp
+++ b/contrib/restricted/boost/asio/include/boost/asio/ip/impl/address_v6.ipp
@@ -282,7 +282,7 @@ address_v6 make_address_v6(const char* str,
if (boost::asio::detail::socket_ops::inet_pton(
BOOST_ASIO_OS_DEF(AF_INET6), str, &bytes[0], &scope_id, ec) <= 0)
return address_v6();
- return address_v6(bytes, static_cast<scope_id_type>(scope_id));
+ return address_v6(bytes, scope_id);
}
address_v6 make_address_v6(const std::string& str)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/placeholders.hpp b/contrib/restricted/boost/asio/include/boost/asio/placeholders.hpp
index 5476c800ce2..eacc28c7271 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/placeholders.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/placeholders.hpp
@@ -59,18 +59,12 @@ unspecified signal_number;
#else
-static BOOST_ASIO_INLINE_VARIABLE constexpr auto& error
- = std::placeholders::_1;
-static BOOST_ASIO_INLINE_VARIABLE constexpr auto& bytes_transferred
- = std::placeholders::_2;
-static BOOST_ASIO_INLINE_VARIABLE constexpr auto& iterator
- = std::placeholders::_2;
-static BOOST_ASIO_INLINE_VARIABLE constexpr auto& results
- = std::placeholders::_2;
-static BOOST_ASIO_INLINE_VARIABLE constexpr auto& endpoint
- = std::placeholders::_2;
-static BOOST_ASIO_INLINE_VARIABLE constexpr auto& signal_number
- = std::placeholders::_2;
+static constexpr auto& error = std::placeholders::_1;
+static constexpr auto& bytes_transferred = std::placeholders::_2;
+static constexpr auto& iterator = std::placeholders::_2;
+static constexpr auto& results = std::placeholders::_2;
+static constexpr auto& endpoint = std::placeholders::_2;
+static constexpr auto& signal_number = std::placeholders::_2;
#endif
diff --git a/contrib/restricted/boost/asio/include/boost/asio/posix/basic_descriptor.hpp b/contrib/restricted/boost/asio/include/boost/asio/posix/basic_descriptor.hpp
index 82ea554dfcb..8e22760ec48 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/posix/basic_descriptor.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/posix/basic_descriptor.hpp
@@ -661,7 +661,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/posix/basic_stream_descriptor.hpp b/contrib/restricted/boost/asio/include/boost/asio/posix/basic_stream_descriptor.hpp
index 149e85db397..882f27c71dd 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/posix/basic_stream_descriptor.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/posix/basic_stream_descriptor.hpp
@@ -308,7 +308,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -437,7 +437,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/read.hpp b/contrib/restricted/boost/asio/include/boost/asio/read.hpp
index 6e1733d60c6..b66c79e17eb 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/read.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/read.hpp
@@ -185,9 +185,6 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
/// Attempt to read a certain amount of data from a stream before returning.
@@ -235,9 +232,6 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -362,9 +356,6 @@ std::size_t read(SyncReadStream& s,
> = 0,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
/// Attempt to read a certain amount of data from a stream before returning.
@@ -414,9 +405,6 @@ std::size_t read(SyncReadStream& s,
> = 0,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
@@ -519,10 +507,7 @@ std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
template <typename SyncReadStream, typename Allocator,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+ CompletionCondition completion_condition);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -563,10 +548,7 @@ std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
template <typename SyncReadStream, typename Allocator,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+ CompletionCondition completion_condition, boost::system::error_code& ec);
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
@@ -680,9 +662,6 @@ std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
/// Attempt to read a certain amount of data from a stream before returning.
@@ -728,9 +707,6 @@ std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
/*@}*/
@@ -787,7 +763,7 @@ std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -822,26 +798,17 @@ template <typename AsyncReadStream, typename MutableBufferSequence,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
+auto async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- > = 0,
- constraint_t<
- !is_completion_condition<ReadToken>::value
> = 0)
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read<AsyncReadStream>>(),
- token, buffers, transfer_all()))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read<AsyncReadStream>(s),
- token, buffers, transfer_all());
-}
+ token, buffers, transfer_all()));
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
@@ -896,7 +863,7 @@ inline auto async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -927,28 +894,19 @@ template <typename AsyncReadStream,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
+auto async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0)
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read<AsyncReadStream>>(),
token, buffers,
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read<AsyncReadStream>(s), token, buffers,
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -996,7 +954,7 @@ inline auto async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1022,7 +980,7 @@ template <typename AsyncReadStream, typename DynamicBuffer_v1,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
constraint_t<
@@ -1030,21 +988,12 @@ inline auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
> = 0,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- > = 0,
- constraint_t<
- !is_completion_condition<ReadToken>::value
> = 0)
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
- token, static_cast<DynamicBuffer_v1&&>(buffers), transfer_all()))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v1&&>(buffers), transfer_all());
-}
+ token, static_cast<DynamicBuffer_v1&&>(buffers), transfer_all()));
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
@@ -1104,7 +1053,7 @@ inline auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1125,7 +1074,7 @@ template <typename AsyncReadStream,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
@@ -1134,23 +1083,13 @@ inline auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
> = 0,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0)
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
token, static_cast<DynamicBuffer_v1&&>(buffers),
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v1&&>(buffers),
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if !defined(BOOST_ASIO_NO_IOSTREAM)
@@ -1197,7 +1136,7 @@ inline auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1223,23 +1162,14 @@ template <typename AsyncReadStream, typename Allocator,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
ReadToken&& token = default_completion_token_t<
- typename AsyncReadStream::executor_type>(),
- constraint_t<
- !is_completion_condition<ReadToken>::value
- > = 0)
+ typename AsyncReadStream::executor_type>())
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
- token, basic_streambuf_ref<Allocator>(b), transfer_all()))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
- token, basic_streambuf_ref<Allocator>(b), transfer_all());
-}
+ token, basic_streambuf_ref<Allocator>(b), transfer_all()));
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
@@ -1297,7 +1227,7 @@ inline auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1318,26 +1248,16 @@ template <typename AsyncReadStream,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
CompletionCondition completion_condition,
ReadToken&& token = default_completion_token_t<
- typename AsyncReadStream::executor_type>(),
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0)
+ typename AsyncReadStream::executor_type>())
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
token, basic_streambuf_ref<Allocator>(b),
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
- token, basic_streambuf_ref<Allocator>(b),
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
@@ -1387,7 +1307,7 @@ inline auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1413,26 +1333,17 @@ template <typename AsyncReadStream, typename DynamicBuffer_v2,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+auto async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- > = 0,
- constraint_t<
- !is_completion_condition<ReadToken>::value
> = 0)
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_dynbuf_v2<AsyncReadStream>>(),
- token, static_cast<DynamicBuffer_v2&&>(buffers), transfer_all()))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_dynbuf_v2<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v2&&>(buffers), transfer_all());
-}
+ token, static_cast<DynamicBuffer_v2&&>(buffers), transfer_all()));
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
@@ -1492,7 +1403,7 @@ inline auto async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1513,29 +1424,19 @@ template <typename AsyncReadStream,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+auto async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0)
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_dynbuf_v2<AsyncReadStream>>(),
token, static_cast<DynamicBuffer_v2&&>(buffers),
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_dynbuf_v2<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v2&&>(buffers),
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
/*@}*/
diff --git a/contrib/restricted/boost/asio/include/boost/asio/read_at.hpp b/contrib/restricted/boost/asio/include/boost/asio/read_at.hpp
index ee6f267fcbd..482d169bf49 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/read_at.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/read_at.hpp
@@ -191,10 +191,7 @@ template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+ CompletionCondition completion_condition);
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
@@ -243,10 +240,7 @@ template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+ CompletionCondition completion_condition, boost::system::error_code& ec);
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if !defined(BOOST_ASIO_NO_IOSTREAM)
@@ -357,10 +351,7 @@ template <typename SyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
uint64_t offset, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+ CompletionCondition completion_condition);
/// Attempt to read a certain amount of data at the specified offset before
/// returning.
@@ -404,10 +395,7 @@ template <typename SyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition>
std::size_t read_at(SyncRandomAccessReadDevice& d,
uint64_t offset, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+ CompletionCondition completion_condition, boost::system::error_code& ec);
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
@@ -466,7 +454,7 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -501,24 +489,15 @@ template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncRandomAccessReadDevice::executor_type>>
-inline auto async_read_at(AsyncRandomAccessReadDevice& d,
+auto async_read_at(AsyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
ReadToken&& token = default_completion_token_t<
- typename AsyncRandomAccessReadDevice::executor_type>(),
- constraint_t<
- !is_completion_condition<ReadToken>::value
- > = 0)
+ typename AsyncRandomAccessReadDevice::executor_type>())
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
- token, offset, buffers, transfer_all()))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_at<AsyncRandomAccessReadDevice>(d),
- token, offset, buffers, transfer_all());
-}
+ token, offset, buffers, transfer_all()));
/// Start an asynchronous operation to read a certain amount of data at the
/// specified offset.
@@ -576,7 +555,7 @@ inline auto async_read_at(AsyncRandomAccessReadDevice& d,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -607,27 +586,17 @@ template <typename AsyncRandomAccessReadDevice,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncRandomAccessReadDevice::executor_type>>
-inline auto async_read_at(AsyncRandomAccessReadDevice& d,
+auto async_read_at(AsyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
ReadToken&& token = default_completion_token_t<
- typename AsyncRandomAccessReadDevice::executor_type>(),
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0)
+ typename AsyncRandomAccessReadDevice::executor_type>())
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
token, offset, buffers,
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_at<AsyncRandomAccessReadDevice>(d),
- token, offset, buffers,
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if !defined(BOOST_ASIO_NO_IOSTREAM)
@@ -672,7 +641,7 @@ inline auto async_read_at(AsyncRandomAccessReadDevice& d,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -698,25 +667,16 @@ template <typename AsyncRandomAccessReadDevice, typename Allocator,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncRandomAccessReadDevice::executor_type>>
-inline auto async_read_at(AsyncRandomAccessReadDevice& d,
+auto async_read_at(AsyncRandomAccessReadDevice& d,
uint64_t offset, basic_streambuf<Allocator>& b,
ReadToken&& token = default_completion_token_t<
- typename AsyncRandomAccessReadDevice::executor_type>(),
- constraint_t<
- !is_completion_condition<ReadToken>::value
- > = 0)
+ typename AsyncRandomAccessReadDevice::executor_type>())
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_at_streambuf<
AsyncRandomAccessReadDevice>>(),
- token, offset, &b, transfer_all()))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_at_streambuf<AsyncRandomAccessReadDevice>(d),
- token, offset, &b, transfer_all());
-}
+ token, offset, &b, transfer_all()));
/// Start an asynchronous operation to read a certain amount of data at the
/// specified offset.
@@ -772,7 +732,7 @@ inline auto async_read_at(AsyncRandomAccessReadDevice& d,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -793,27 +753,17 @@ template <typename AsyncRandomAccessReadDevice,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncRandomAccessReadDevice::executor_type>>
-inline auto async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
+auto async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
basic_streambuf<Allocator>& b, CompletionCondition completion_condition,
ReadToken&& token = default_completion_token_t<
- typename AsyncRandomAccessReadDevice::executor_type>(),
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0)
+ typename AsyncRandomAccessReadDevice::executor_type>())
-> decltype(
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_at_streambuf<
AsyncRandomAccessReadDevice>>(),
token, offset, &b,
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_at_streambuf<AsyncRandomAccessReadDevice>(d),
- token, offset, &b,
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/read_until.hpp b/contrib/restricted/boost/asio/include/boost/asio/read_until.hpp
index 0075c3220a3..091a5424e2c 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/read_until.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/read_until.hpp
@@ -1603,7 +1603,7 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1656,7 +1656,7 @@ template <typename AsyncReadStream, typename DynamicBuffer_v1,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s,
+auto async_read_until(AsyncReadStream& s,
DynamicBuffer_v1&& buffers, char delim,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
@@ -1670,13 +1670,7 @@ inline auto async_read_until(AsyncReadStream& s,
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
- token, static_cast<DynamicBuffer_v1&&>(buffers), delim))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_delim_v1<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v1&&>(buffers), delim);
-}
+ token, static_cast<DynamicBuffer_v1&&>(buffers), delim));
/// Start an asynchronous operation to read data into a dynamic buffer sequence
/// until it contains a specified delimiter.
@@ -1726,7 +1720,7 @@ inline auto async_read_until(AsyncReadStream& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1779,7 +1773,7 @@ template <typename AsyncReadStream, typename DynamicBuffer_v1,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s,
+auto async_read_until(AsyncReadStream& s,
DynamicBuffer_v1&& buffers,
BOOST_ASIO_STRING_VIEW_PARAM delim,
ReadToken&& token = default_completion_token_t<
@@ -1796,14 +1790,7 @@ inline auto async_read_until(AsyncReadStream& s,
declval<detail::initiate_async_read_until_delim_string_v1<
AsyncReadStream>>(),
token, static_cast<DynamicBuffer_v1&&>(buffers),
- static_cast<std::string>(delim)))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_delim_string_v1<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v1&&>(buffers),
- static_cast<std::string>(delim));
-}
+ static_cast<std::string>(delim)));
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \
@@ -1861,7 +1848,7 @@ inline auto async_read_until(AsyncReadStream& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1915,7 +1902,7 @@ template <typename AsyncReadStream, typename DynamicBuffer_v1, typename Traits,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
const boost::basic_regex<char, Traits>& expr,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
@@ -1929,13 +1916,7 @@ inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
- token, static_cast<DynamicBuffer_v1&&>(buffers), expr))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_expr_v1<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v1&&>(buffers), expr);
-}
+ token, static_cast<DynamicBuffer_v1&&>(buffers), expr));
#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
// || defined(GENERATING_DOCUMENTATION)
@@ -2003,7 +1984,7 @@ inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond that which matched the function
@@ -2089,7 +2070,7 @@ template <typename AsyncReadStream,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s,
+auto async_read_until(AsyncReadStream& s,
DynamicBuffer_v1&& buffers, MatchCondition match_condition,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
@@ -2107,14 +2088,7 @@ inline auto async_read_until(AsyncReadStream& s,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_until_match_v1<AsyncReadStream>>(),
token, static_cast<DynamicBuffer_v1&&>(buffers),
- match_condition))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_match_v1<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v1&&>(buffers),
- match_condition);
-}
+ match_condition));
#if !defined(BOOST_ASIO_NO_IOSTREAM)
@@ -2165,7 +2139,7 @@ inline auto async_read_until(AsyncReadStream& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -2217,7 +2191,7 @@ template <typename AsyncReadStream, typename Allocator,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s,
+auto async_read_until(AsyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& b, char delim,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>())
@@ -2225,13 +2199,7 @@ inline auto async_read_until(AsyncReadStream& s,
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
- token, basic_streambuf_ref<Allocator>(b), delim))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_delim_v1<AsyncReadStream>(s),
- token, basic_streambuf_ref<Allocator>(b), delim);
-}
+ token, basic_streambuf_ref<Allocator>(b), delim));
/// Start an asynchronous operation to read data into a streambuf until it
/// contains a specified delimiter.
@@ -2280,7 +2248,7 @@ inline auto async_read_until(AsyncReadStream& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -2332,7 +2300,7 @@ template <typename AsyncReadStream, typename Allocator,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s,
+auto async_read_until(AsyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& b,
BOOST_ASIO_STRING_VIEW_PARAM delim,
ReadToken&& token = default_completion_token_t<
@@ -2343,14 +2311,7 @@ inline auto async_read_until(AsyncReadStream& s,
declval<detail::initiate_async_read_until_delim_string_v1<
AsyncReadStream>>(),
token, basic_streambuf_ref<Allocator>(b),
- static_cast<std::string>(delim)))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_delim_string_v1<AsyncReadStream>(s),
- token, basic_streambuf_ref<Allocator>(b),
- static_cast<std::string>(delim));
-}
+ static_cast<std::string>(delim)));
#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \
|| defined(GENERATING_DOCUMENTATION)
@@ -2404,7 +2365,7 @@ inline auto async_read_until(AsyncReadStream& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -2457,7 +2418,7 @@ template <typename AsyncReadStream, typename Allocator, typename Traits,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s,
+auto async_read_until(AsyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& b,
const boost::basic_regex<char, Traits>& expr,
ReadToken&& token = default_completion_token_t<
@@ -2466,13 +2427,7 @@ inline auto async_read_until(AsyncReadStream& s,
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
- token, basic_streambuf_ref<Allocator>(b), expr))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_expr_v1<AsyncReadStream>(s),
- token, basic_streambuf_ref<Allocator>(b), expr);
-}
+ token, basic_streambuf_ref<Allocator>(b), expr));
#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
// || defined(GENERATING_DOCUMENTATION)
@@ -2537,7 +2492,7 @@ inline auto async_read_until(AsyncReadStream& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @note After a successful async_read_until operation, the streambuf may
* contain additional data beyond that which matched the function object. An
@@ -2621,7 +2576,7 @@ template <typename AsyncReadStream, typename Allocator, typename MatchCondition,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s,
+auto async_read_until(AsyncReadStream& s,
boost::asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
@@ -2630,13 +2585,7 @@ inline auto async_read_until(AsyncReadStream& s,
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_until_match_v1<AsyncReadStream>>(),
- token, basic_streambuf_ref<Allocator>(b), match_condition))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_match_v1<AsyncReadStream>(s),
- token, basic_streambuf_ref<Allocator>(b), match_condition);
-}
+ token, basic_streambuf_ref<Allocator>(b), match_condition));
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
@@ -2691,7 +2640,7 @@ inline auto async_read_until(AsyncReadStream& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -2744,8 +2693,7 @@ template <typename AsyncReadStream, typename DynamicBuffer_v2,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s,
- DynamicBuffer_v2 buffers, char delim,
+auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, char delim,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
constraint_t<
@@ -2755,13 +2703,7 @@ inline auto async_read_until(AsyncReadStream& s,
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_until_delim_v2<AsyncReadStream>>(),
- token, static_cast<DynamicBuffer_v2&&>(buffers), delim))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_delim_v2<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v2&&>(buffers), delim);
-}
+ token, static_cast<DynamicBuffer_v2&&>(buffers), delim));
/// Start an asynchronous operation to read data into a dynamic buffer sequence
/// until it contains a specified delimiter.
@@ -2811,7 +2753,7 @@ inline auto async_read_until(AsyncReadStream& s,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -2864,7 +2806,7 @@ template <typename AsyncReadStream, typename DynamicBuffer_v2,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
BOOST_ASIO_STRING_VIEW_PARAM delim,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
@@ -2877,14 +2819,7 @@ inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
declval<detail::initiate_async_read_until_delim_string_v2<
AsyncReadStream>>(),
token, static_cast<DynamicBuffer_v2&&>(buffers),
- static_cast<std::string>(delim)))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_delim_string_v2<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v2&&>(buffers),
- static_cast<std::string>(delim));
-}
+ static_cast<std::string>(delim)));
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \
@@ -2942,7 +2877,7 @@ inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -2996,7 +2931,7 @@ template <typename AsyncReadStream, typename DynamicBuffer_v2, typename Traits,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
const boost::basic_regex<char, Traits>& expr,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
@@ -3007,13 +2942,7 @@ inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_until_expr_v2<AsyncReadStream>>(),
- token, static_cast<DynamicBuffer_v2&&>(buffers), expr))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_expr_v2<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v2&&>(buffers), expr);
-}
+ token, static_cast<DynamicBuffer_v2&&>(buffers), expr));
#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
// || defined(GENERATING_DOCUMENTATION)
@@ -3081,7 +3010,7 @@ inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond that which matched the function
@@ -3167,7 +3096,7 @@ template <typename AsyncReadStream,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) ReadToken = default_completion_token_t<
typename AsyncReadStream::executor_type>>
-inline auto async_read_until(AsyncReadStream& s,
+auto async_read_until(AsyncReadStream& s,
DynamicBuffer_v2 buffers, MatchCondition match_condition,
ReadToken&& token = default_completion_token_t<
typename AsyncReadStream::executor_type>(),
@@ -3181,14 +3110,7 @@ inline auto async_read_until(AsyncReadStream& s,
async_initiate<ReadToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_read_until_match_v2<AsyncReadStream>>(),
- token, static_cast<DynamicBuffer_v2&&>(buffers), match_condition))
-{
- return async_initiate<ReadToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_read_until_match_v2<AsyncReadStream>(s),
- token, static_cast<DynamicBuffer_v2&&>(buffers),
- match_condition);
-}
+ token, static_cast<DynamicBuffer_v2&&>(buffers), match_condition));
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/redirect_error.hpp b/contrib/restricted/boost/asio/include/boost/asio/redirect_error.hpp
index af62e2803dd..ac01bd856e5 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/redirect_error.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/redirect_error.hpp
@@ -34,7 +34,7 @@ template <typename CompletionToken>
class redirect_error_t
{
public:
- /// Constructor.
+ /// Constructor.
template <typename T>
redirect_error_t(T&& completion_token, boost::system::error_code& ec)
: token_(static_cast<T&&>(completion_token)),
@@ -47,50 +47,10 @@ public:
boost::system::error_code& ec_;
};
-/// A function object type that adapts a @ref completion_token to capture
-/// error_code values to a variable.
-/**
- * May also be used directly as a completion token, in which case it adapts the
- * asynchronous operation's default completion token (or boost::asio::deferred
- * if no default is available).
- */
-class partial_redirect_error
-{
-public:
- /// Constructor that specifies the variable used to capture error_code values.
- explicit partial_redirect_error(boost::system::error_code& ec)
- : ec_(ec)
- {
- }
-
- /// Adapt a @ref completion_token to specify that the completion handler
- /// should capture error_code values to a variable.
- template <typename CompletionToken>
- BOOST_ASIO_NODISCARD inline
- constexpr redirect_error_t<decay_t<CompletionToken>>
- operator()(CompletionToken&& completion_token) const
- {
- return redirect_error_t<decay_t<CompletionToken>>(
- static_cast<CompletionToken&&>(completion_token), ec_);
- }
-
-//private:
- boost::system::error_code& ec_;
-};
-
-/// Create a partial completion token adapter that captures error_code values
-/// to a variable.
-BOOST_ASIO_NODISCARD inline partial_redirect_error
-redirect_error(boost::system::error_code& ec)
-{
- return partial_redirect_error(ec);
-}
-
/// Adapt a @ref completion_token to capture error_code values to a variable.
template <typename CompletionToken>
-BOOST_ASIO_NODISCARD inline redirect_error_t<decay_t<CompletionToken>>
-redirect_error(CompletionToken&& completion_token,
- boost::system::error_code& ec)
+inline redirect_error_t<decay_t<CompletionToken>> redirect_error(
+ CompletionToken&& completion_token, boost::system::error_code& ec)
{
return redirect_error_t<decay_t<CompletionToken>>(
static_cast<CompletionToken&&>(completion_token), ec);
diff --git a/contrib/restricted/boost/asio/include/boost/asio/registered_buffer.hpp b/contrib/restricted/boost/asio/include/boost/asio/registered_buffer.hpp
index 1396b20e70c..b2c78363cbd 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/registered_buffer.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/registered_buffer.hpp
@@ -79,7 +79,7 @@ private:
};
/// Holds a registered buffer over modifiable data.
-/**
+/**
* Satisfies the @c MutableBufferSequence type requirements.
*/
class mutable_registered_buffer
@@ -150,7 +150,7 @@ private:
};
/// Holds a registered buffer over non-modifiable data.
-/**
+/**
* Satisfies the @c ConstBufferSequence type requirements.
*/
class const_registered_buffer
diff --git a/contrib/restricted/boost/asio/include/boost/asio/spawn.hpp b/contrib/restricted/boost/asio/include/boost/asio/spawn.hpp
index d7c508a4e47..765518e025a 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/spawn.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/spawn.hpp
@@ -146,6 +146,7 @@ private:
}
};
+
template <typename T>
struct spawn_signature
{
diff --git a/contrib/restricted/boost/asio/include/boost/asio/ssl/detail/impl/openssl_init.ipp b/contrib/restricted/boost/asio/include/boost/asio/ssl/detail/impl/openssl_init.ipp
index ea10e242fb0..23be3b66725 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/ssl/detail/impl/openssl_init.ipp
+++ b/contrib/restricted/boost/asio/include/boost/asio/ssl/detail/impl/openssl_init.ipp
@@ -38,7 +38,7 @@ public:
{
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
::SSL_library_init();
- ::SSL_load_error_strings();
+ ::SSL_load_error_strings();
::OpenSSL_add_all_algorithms();
mutexes_.resize(::CRYPTO_num_locks());
@@ -124,7 +124,7 @@ private:
#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
- static void openssl_locking_func(int mode, int n,
+ static void openssl_locking_func(int mode, int n,
const char* /*file*/, int /*line*/)
{
if (mode & CRYPTO_LOCK)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/ssl/impl/context.ipp b/contrib/restricted/boost/asio/include/boost/asio/ssl/impl/context.ipp
index 3b1b7f53603..86f97447e1d 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/ssl/impl/context.ipp
+++ b/contrib/restricted/boost/asio/include/boost/asio/ssl/impl/context.ipp
@@ -270,9 +270,8 @@ context::context(context::method m)
#endif // defined(SSL_TXT_TLSV1_2)
// TLS v1.3.
-#if ((OPENSSL_VERSION_NUMBER >= 0x10101000L) \
- && !defined(LIBRESSL_VERSION_NUMBER)) \
- || defined(BOOST_ASIO_USE_WOLFSSL)
+#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) \
+ && !defined(LIBRESSL_VERSION_NUMBER)
case context::tlsv13:
handle_ = ::SSL_CTX_new(::TLS_method());
if (handle_)
@@ -297,18 +296,16 @@ context::context(context::method m)
SSL_CTX_set_max_proto_version(handle_, TLS1_3_VERSION);
}
break;
-#else // ((OPENSSL_VERSION_NUMBER >= 0x10101000L)
- // && !defined(LIBRESSL_VERSION_NUMBER))
- // || defined(BOOST_ASIO_USE_WOLFSSL)
+#else // (OPENSSL_VERSION_NUMBER >= 0x10101000L)
+ // && !defined(LIBRESSL_VERSION_NUMBER)
case context::tlsv13:
case context::tlsv13_client:
case context::tlsv13_server:
boost::asio::detail::throw_error(
boost::asio::error::invalid_argument, "context");
break;
-#endif // ((OPENSSL_VERSION_NUMBER >= 0x10101000L)
- // && !defined(LIBRESSL_VERSION_NUMBER))
- // || defined(BOOST_ASIO_USE_WOLFSSL)
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10101000L)
+ // && !defined(LIBRESSL_VERSION_NUMBER)
// Any supported SSL/TLS version.
case context::sslv23:
@@ -798,7 +795,7 @@ BOOST_ASIO_SYNC_OP_VOID context::use_certificate_chain(
BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
}
}
-
+
result = ::ERR_peek_last_error();
if ((ERR_GET_LIB(result) == ERR_LIB_PEM)
&& (ERR_GET_REASON(result) == PEM_R_NO_START_LINE))
diff --git a/contrib/restricted/boost/asio/include/boost/asio/ssl/stream.hpp b/contrib/restricted/boost/asio/include/boost/asio/ssl/stream.hpp
index de2559beace..30660c8a88c 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/ssl/stream.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/ssl/stream.hpp
@@ -482,7 +482,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code) @endcode
@@ -539,7 +539,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -619,7 +619,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code) @endcode
@@ -723,7 +723,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -831,7 +831,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/this_coro.hpp b/contrib/restricted/boost/asio/include/boost/asio/this_coro.hpp
index 02accdf787a..936d360b6b1 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/this_coro.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/this_coro.hpp
@@ -33,7 +33,7 @@ struct executor_t
};
/// Awaitable object that returns the executor of the current coroutine.
-BOOST_ASIO_INLINE_VARIABLE constexpr executor_t executor;
+constexpr executor_t executor;
/// Awaitable type that returns the cancellation state of the current coroutine.
struct cancellation_state_t
@@ -58,7 +58,7 @@ struct cancellation_state_t
* // ...
* } @endcode
*/
-BOOST_ASIO_INLINE_VARIABLE constexpr cancellation_state_t cancellation_state;
+constexpr cancellation_state_t cancellation_state;
#if defined(GENERATING_DOCUMENTATION)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/use_awaitable.hpp b/contrib/restricted/boost/asio/include/boost/asio/use_awaitable.hpp
index 5e0e95a9c76..cbb8dc52cc7 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/use_awaitable.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/use_awaitable.hpp
@@ -146,9 +146,9 @@ struct use_awaitable_t
* See the documentation for boost::asio::use_awaitable_t for a usage example.
*/
#if defined(GENERATING_DOCUMENTATION)
-BOOST_ASIO_INLINE_VARIABLE constexpr use_awaitable_t<> use_awaitable;
+constexpr use_awaitable_t<> use_awaitable;
#else
-BOOST_ASIO_INLINE_VARIABLE constexpr use_awaitable_t<> use_awaitable(0, 0, 0);
+constexpr use_awaitable_t<> use_awaitable(0, 0, 0);
#endif
} // namespace asio
diff --git a/contrib/restricted/boost/asio/include/boost/asio/use_future.hpp b/contrib/restricted/boost/asio/include/boost/asio/use_future.hpp
index 9f7bd777cfd..973bcfec6c5 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/use_future.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/use_future.hpp
@@ -146,7 +146,7 @@ private:
/**
* See the documentation for boost::asio::use_future_t for a usage example.
*/
-BOOST_ASIO_INLINE_VARIABLE constexpr use_future_t<> use_future;
+constexpr use_future_t<> use_future;
} // namespace asio
} // namespace boost
diff --git a/contrib/restricted/boost/asio/include/boost/asio/uses_executor.hpp b/contrib/restricted/boost/asio/include/boost/asio/uses_executor.hpp
index d91f2178117..4105c3b2a4c 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/uses_executor.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/uses_executor.hpp
@@ -46,7 +46,7 @@ struct executor_arg_t
* See boost::asio::executor_arg_t and boost::asio::uses_executor
* for more information.
*/
-BOOST_ASIO_INLINE_VARIABLE constexpr executor_arg_t executor_arg;
+constexpr executor_arg_t executor_arg;
/// The uses_executor trait detects whether a type T has an associated executor
/// that is convertible from type Executor.
diff --git a/contrib/restricted/boost/asio/include/boost/asio/version.hpp b/contrib/restricted/boost/asio/include/boost/asio/version.hpp
index 671e1c60db2..dbb6d2d8cb0 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/version.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/version.hpp
@@ -18,6 +18,6 @@
// BOOST_ASIO_VERSION % 100 is the sub-minor version
// BOOST_ASIO_VERSION / 100 % 1000 is the minor version
// BOOST_ASIO_VERSION / 100000 is the major version
-#define BOOST_ASIO_VERSION 103200 // 1.32.0
+#define BOOST_ASIO_VERSION 103002 // 1.30.2
#endif // BOOST_ASIO_VERSION_HPP
diff --git a/contrib/restricted/boost/asio/include/boost/asio/windows/basic_object_handle.hpp b/contrib/restricted/boost/asio/include/boost/asio/windows/basic_object_handle.hpp
index d019e9b06a1..e429f75a3b3 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/windows/basic_object_handle.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/windows/basic_object_handle.hpp
@@ -416,7 +416,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/windows/basic_random_access_handle.hpp b/contrib/restricted/boost/asio/include/boost/asio/windows/basic_random_access_handle.hpp
index 7f191ca7d31..88498ce18cb 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/windows/basic_random_access_handle.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/windows/basic_random_access_handle.hpp
@@ -309,7 +309,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -445,7 +445,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/windows/basic_stream_handle.hpp b/contrib/restricted/boost/asio/include/boost/asio/windows/basic_stream_handle.hpp
index 68cc7fac5ff..bf8e407453e 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/windows/basic_stream_handle.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/windows/basic_stream_handle.hpp
@@ -300,7 +300,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -429,7 +429,7 @@ public:
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
diff --git a/contrib/restricted/boost/asio/include/boost/asio/write.hpp b/contrib/restricted/boost/asio/include/boost/asio/write.hpp
index 9888f79db63..0fb866b5d5a 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/write.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/write.hpp
@@ -185,9 +185,6 @@ std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
/// Write a certain amount of data to a stream before returning.
@@ -235,9 +232,6 @@ std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -363,9 +357,6 @@ std::size_t write(SyncWriteStream& s,
> = 0,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
/// Write a certain amount of data to a stream before returning.
@@ -415,9 +406,6 @@ std::size_t write(SyncWriteStream& s,
> = 0,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
@@ -520,10 +508,7 @@ std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
template <typename SyncWriteStream, typename Allocator,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+ CompletionCondition completion_condition);
/// Write a certain amount of data to a stream before returning.
/**
@@ -564,10 +549,7 @@ std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
template <typename SyncWriteStream, typename Allocator,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+ CompletionCondition completion_condition, boost::system::error_code& ec);
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
@@ -682,9 +664,6 @@ std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
/// Write a certain amount of data to a stream before returning.
@@ -730,9 +709,6 @@ std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0);
/*@}*/
@@ -787,7 +763,7 @@ std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -816,26 +792,17 @@ template <typename AsyncWriteStream, typename ConstBufferSequence,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) WriteToken
= default_completion_token_t<typename AsyncWriteStream::executor_type>>
-inline auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
+auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
WriteToken&& token
= default_completion_token_t<typename AsyncWriteStream::executor_type>(),
constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- > = 0,
- constraint_t<
- !is_completion_condition<decay_t<WriteToken>>::value
> = 0)
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write<AsyncWriteStream>>(),
- token, buffers, transfer_all()))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write<AsyncWriteStream>(s),
- token, buffers, transfer_all());
-}
+ token, buffers, transfer_all()));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
@@ -894,7 +861,7 @@ inline auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -923,31 +890,19 @@ inline auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
template <typename AsyncWriteStream,
typename ConstBufferSequence, typename CompletionCondition,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
- std::size_t)) WriteToken
- = default_completion_token_t<typename AsyncWriteStream::executor_type>>
-inline auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
+ std::size_t)) WriteToken>
+auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
- WriteToken&& token
- = default_completion_token_t<typename AsyncWriteStream::executor_type>(),
+ WriteToken&& token,
constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0)
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write<AsyncWriteStream>>(),
token, buffers,
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write<AsyncWriteStream>(s),
- token, buffers,
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -994,7 +949,7 @@ inline auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1014,7 +969,7 @@ template <typename AsyncWriteStream, typename DynamicBuffer_v1,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) WriteToken
= default_completion_token_t<typename AsyncWriteStream::executor_type>>
-inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
+auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
WriteToken&& token
= default_completion_token_t<typename AsyncWriteStream::executor_type>(),
constraint_t<
@@ -1022,23 +977,13 @@ inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
> = 0,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- > = 0,
- constraint_t<
- !is_completion_condition<decay_t<WriteToken>>::value
> = 0)
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
token, static_cast<DynamicBuffer_v1&&>(buffers),
- transfer_all()))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
- token, static_cast<DynamicBuffer_v1&&>(buffers),
- transfer_all());
-}
+ transfer_all()));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
@@ -1097,7 +1042,7 @@ inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1116,34 +1061,21 @@ inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
template <typename AsyncWriteStream,
typename DynamicBuffer_v1, typename CompletionCondition,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
- std::size_t)) WriteToken
- = default_completion_token_t<typename AsyncWriteStream::executor_type>>
-inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
- CompletionCondition completion_condition,
- WriteToken&& token
- = default_completion_token_t<typename AsyncWriteStream::executor_type>(),
+ std::size_t)) WriteToken>
+auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
+ CompletionCondition completion_condition, WriteToken&& token,
constraint_t<
is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
> = 0,
constraint_t<
!is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0)
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
token, static_cast<DynamicBuffer_v1&&>(buffers),
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
- token, static_cast<DynamicBuffer_v1&&>(buffers),
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if !defined(BOOST_ASIO_NO_IOSTREAM)
@@ -1189,7 +1121,7 @@ inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1209,23 +1141,14 @@ template <typename AsyncWriteStream, typename Allocator,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) WriteToken
= default_completion_token_t<typename AsyncWriteStream::executor_type>>
-inline auto async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
+auto async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
WriteToken&& token
- = default_completion_token_t<typename AsyncWriteStream::executor_type>(),
- constraint_t<
- !is_completion_condition<decay_t<WriteToken>>::value
- > = 0)
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>())
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
- token, basic_streambuf_ref<Allocator>(b), transfer_all()))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
- token, basic_streambuf_ref<Allocator>(b), transfer_all());
-}
+ token, basic_streambuf_ref<Allocator>(b), transfer_all()));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
@@ -1282,7 +1205,7 @@ inline auto async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1301,28 +1224,15 @@ inline auto async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
template <typename AsyncWriteStream,
typename Allocator, typename CompletionCondition,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
- std::size_t)) WriteToken
- = default_completion_token_t<typename AsyncWriteStream::executor_type>>
-inline auto async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- WriteToken&& token
- = default_completion_token_t<typename AsyncWriteStream::executor_type>(),
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0)
+ std::size_t)) WriteToken>
+auto async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, WriteToken&& token)
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
token, basic_streambuf_ref<Allocator>(b),
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
- token, basic_streambuf_ref<Allocator>(b),
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
@@ -1371,7 +1281,7 @@ inline auto async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1391,28 +1301,18 @@ template <typename AsyncWriteStream, typename DynamicBuffer_v2,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) WriteToken
= default_completion_token_t<typename AsyncWriteStream::executor_type>>
-inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
+auto async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
WriteToken&& token
= default_completion_token_t<typename AsyncWriteStream::executor_type>(),
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- > = 0,
- constraint_t<
- !is_completion_condition<decay_t<WriteToken>>::value
> = 0)
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>>(),
token, static_cast<DynamicBuffer_v2&&>(buffers),
- transfer_all()))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>(s),
- token, static_cast<DynamicBuffer_v2&&>(buffers),
- transfer_all());
-}
+ transfer_all()));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
@@ -1471,7 +1371,7 @@ inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -1490,31 +1390,19 @@ inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
template <typename AsyncWriteStream,
typename DynamicBuffer_v2, typename CompletionCondition,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
- std::size_t)) WriteToken
- = default_completion_token_t<typename AsyncWriteStream::executor_type>>
-inline auto async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
+ std::size_t)) WriteToken>
+auto async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
- WriteToken&& token
- = default_completion_token_t<typename AsyncWriteStream::executor_type>(),
+ WriteToken&& token,
constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- > = 0,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
> = 0)
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>>(),
token, static_cast<DynamicBuffer_v2&&>(buffers),
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>(s),
- token, static_cast<DynamicBuffer_v2&&>(buffers),
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
/*@}*/
diff --git a/contrib/restricted/boost/asio/include/boost/asio/write_at.hpp b/contrib/restricted/boost/asio/include/boost/asio/write_at.hpp
index 504a2d1e974..9c17a581183 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/write_at.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/write_at.hpp
@@ -188,10 +188,7 @@ template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
typename CompletionCondition>
std::size_t write_at(SyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+ CompletionCondition completion_condition);
/// Write a certain amount of data at a specified offset before returning.
/**
@@ -239,10 +236,7 @@ template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
typename CompletionCondition>
std::size_t write_at(SyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+ CompletionCondition completion_condition, boost::system::error_code& ec);
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if !defined(BOOST_ASIO_NO_IOSTREAM)
@@ -355,10 +349,7 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d,
template <typename SyncRandomAccessWriteDevice, typename Allocator,
typename CompletionCondition>
std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
- basic_streambuf<Allocator>& b, CompletionCondition completion_condition,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+ basic_streambuf<Allocator>& b, CompletionCondition completion_condition);
/// Write a certain amount of data at a specified offset before returning.
/**
@@ -401,12 +392,9 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
*/
template <typename SyncRandomAccessWriteDevice, typename Allocator,
typename CompletionCondition>
-std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0);
+std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
+ basic_streambuf<Allocator>& b, CompletionCondition completion_condition,
+ boost::system::error_code& ec);
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
@@ -469,7 +457,7 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -498,25 +486,16 @@ template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) WriteToken = default_completion_token_t<
typename AsyncRandomAccessWriteDevice::executor_type>>
-inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
+auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
WriteToken&& token = default_completion_token_t<
- typename AsyncRandomAccessWriteDevice::executor_type>(),
- constraint_t<
- !is_completion_condition<WriteToken>::value
- > = 0)
+ typename AsyncRandomAccessWriteDevice::executor_type>())
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write_at<
AsyncRandomAccessWriteDevice>>(),
- token, offset, buffers, transfer_all()))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write_at<AsyncRandomAccessWriteDevice>(d),
- token, offset, buffers, transfer_all());
-}
+ token, offset, buffers, transfer_all()));
/// Start an asynchronous operation to write a certain amount of data at the
/// specified offset.
@@ -580,7 +559,7 @@ inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -611,28 +590,18 @@ template <typename AsyncRandomAccessWriteDevice,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) WriteToken = default_completion_token_t<
typename AsyncRandomAccessWriteDevice::executor_type>>
-inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
+auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
WriteToken&& token = default_completion_token_t<
- typename AsyncRandomAccessWriteDevice::executor_type>(),
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0)
+ typename AsyncRandomAccessWriteDevice::executor_type>())
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write_at<
AsyncRandomAccessWriteDevice>>(),
token, offset, buffers,
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write_at<AsyncRandomAccessWriteDevice>(d),
- token, offset, buffers,
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
#if !defined(BOOST_ASIO_NO_IOSTREAM)
@@ -683,7 +652,7 @@ inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -703,26 +672,16 @@ template <typename AsyncRandomAccessWriteDevice, typename Allocator,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) WriteToken = default_completion_token_t<
typename AsyncRandomAccessWriteDevice::executor_type>>
-inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
+auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, basic_streambuf<Allocator>& b,
WriteToken&& token = default_completion_token_t<
- typename AsyncRandomAccessWriteDevice::executor_type>(),
- constraint_t<
- !is_completion_condition<WriteToken>::value
- > = 0)
+ typename AsyncRandomAccessWriteDevice::executor_type>())
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write_at_streambuf<
AsyncRandomAccessWriteDevice>>(),
- token, offset, &b, transfer_all()))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write_at_streambuf<
- AsyncRandomAccessWriteDevice>(d),
- token, offset, &b, transfer_all());
-}
+ token, offset, &b, transfer_all()));
/// Start an asynchronous operation to write a certain amount of data at the
/// specified offset.
@@ -784,7 +743,7 @@ inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
* Regardless of whether the asynchronous operation completes immediately or
* not, the completion handler will not be invoked from within this function.
* On immediate completion, invocation of the handler will be performed in a
- * manner equivalent to using boost::asio::async_immediate().
+ * manner equivalent to using boost::asio::post().
*
* @par Completion Signature
* @code void(boost::system::error_code, std::size_t) @endcode
@@ -805,28 +764,17 @@ template <typename AsyncRandomAccessWriteDevice,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
std::size_t)) WriteToken = default_completion_token_t<
typename AsyncRandomAccessWriteDevice::executor_type>>
-inline auto async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
+auto async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
basic_streambuf<Allocator>& b, CompletionCondition completion_condition,
WriteToken&& token = default_completion_token_t<
- typename AsyncRandomAccessWriteDevice::executor_type>(),
- constraint_t<
- is_completion_condition<CompletionCondition>::value
- > = 0)
+ typename AsyncRandomAccessWriteDevice::executor_type>())
-> decltype(
async_initiate<WriteToken,
void (boost::system::error_code, std::size_t)>(
declval<detail::initiate_async_write_at_streambuf<
AsyncRandomAccessWriteDevice>>(),
token, offset, &b,
- static_cast<CompletionCondition&&>(completion_condition)))
-{
- return async_initiate<WriteToken,
- void (boost::system::error_code, std::size_t)>(
- detail::initiate_async_write_at_streambuf<
- AsyncRandomAccessWriteDevice>(d),
- token, offset, &b,
- static_cast<CompletionCondition&&>(completion_condition));
-}
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
diff --git a/contrib/restricted/boost/asio/ya.make b/contrib/restricted/boost/asio/ya.make
index f33aefc30bb..f5f8e8c7664 100644
--- a/contrib/restricted/boost/asio/ya.make
+++ b/contrib/restricted/boost/asio/ya.make
@@ -9,9 +9,9 @@ LICENSE(
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(1.86.0)
+VERSION(1.85.0)
-ORIGINAL_SOURCE(https://github.com/boostorg/asio/archive/boost-1.86.0.tar.gz)
+ORIGINAL_SOURCE(https://github.com/boostorg/asio/archive/boost-1.85.0.tar.gz)
PEERDIR(
contrib/libs/openssl