summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio')
-rw-r--r--3rdparty/asio/COPYING2
-rw-r--r--3rdparty/asio/Makefile.am3
-rw-r--r--3rdparty/asio/Makefile.in107
-rw-r--r--3rdparty/asio/README4
-rw-r--r--3rdparty/asio/aclocal.m4357
-rw-r--r--3rdparty/asio/asio.pc.in11
-rwxr-xr-x3rdparty/asio/compile17
-rwxr-xr-x3rdparty/asio/config.guess1686
-rwxr-xr-x3rdparty/asio/config.sub2627
-rwxr-xr-x3rdparty/asio/configure3672
-rw-r--r--3rdparty/asio/configure.ac29
-rw-r--r--3rdparty/asio/depcomp10
-rw-r--r--3rdparty/asio/include/Makefile.am163
-rw-r--r--3rdparty/asio/include/Makefile.in178
-rw-r--r--3rdparty/asio/include/asio.hpp49
-rw-r--r--3rdparty/asio/include/asio/any_completion_executor.hpp336
-rw-r--r--3rdparty/asio/include/asio/any_completion_handler.hpp822
-rw-r--r--3rdparty/asio/include/asio/any_io_executor.hpp163
-rw-r--r--3rdparty/asio/include/asio/append.hpp65
-rw-r--r--3rdparty/asio/include/asio/as_tuple.hpp126
-rw-r--r--3rdparty/asio/include/asio/associated_allocator.hpp129
-rw-r--r--3rdparty/asio/include/asio/associated_cancellation_slot.hpp96
-rw-r--r--3rdparty/asio/include/asio/associated_executor.hpp91
-rw-r--r--3rdparty/asio/include/asio/associated_immediate_executor.hpp280
-rw-r--r--3rdparty/asio/include/asio/associator.hpp2
-rw-r--r--3rdparty/asio/include/asio/async_result.hpp1037
-rw-r--r--3rdparty/asio/include/asio/awaitable.hpp11
-rw-r--r--3rdparty/asio/include/asio/basic_datagram_socket.hpp403
-rw-r--r--3rdparty/asio/include/asio/basic_deadline_timer.hpp71
-rw-r--r--3rdparty/asio/include/asio/basic_file.hpp824
-rw-r--r--3rdparty/asio/include/asio/basic_io_object.hpp12
-rw-r--r--3rdparty/asio/include/asio/basic_random_access_file.hpp689
-rw-r--r--3rdparty/asio/include/asio/basic_raw_socket.hpp410
-rw-r--r--3rdparty/asio/include/asio/basic_readable_pipe.hpp626
-rw-r--r--3rdparty/asio/include/asio/basic_seq_packet_socket.hpp185
-rw-r--r--3rdparty/asio/include/asio/basic_serial_port.hpp202
-rw-r--r--3rdparty/asio/include/asio/basic_signal_set.hpp134
-rw-r--r--3rdparty/asio/include/asio/basic_socket.hpp137
-rw-r--r--3rdparty/asio/include/asio/basic_socket_acceptor.hpp620
-rw-r--r--3rdparty/asio/include/asio/basic_socket_iostream.hpp88
-rw-r--r--3rdparty/asio/include/asio/basic_socket_streambuf.hpp57
-rw-r--r--3rdparty/asio/include/asio/basic_stream_file.hpp744
-rw-r--r--3rdparty/asio/include/asio/basic_stream_socket.hpp301
-rw-r--r--3rdparty/asio/include/asio/basic_streambuf.hpp28
-rw-r--r--3rdparty/asio/include/asio/basic_streambuf_fwd.hpp6
-rw-r--r--3rdparty/asio/include/asio/basic_waitable_timer.hpp85
-rw-r--r--3rdparty/asio/include/asio/basic_writable_pipe.hpp622
-rw-r--r--3rdparty/asio/include/asio/bind_allocator.hpp530
-rw-r--r--3rdparty/asio/include/asio/bind_cancellation_slot.hpp379
-rw-r--r--3rdparty/asio/include/asio/bind_executor.hpp400
-rw-r--r--3rdparty/asio/include/asio/bind_immediate_executor.hpp549
-rw-r--r--3rdparty/asio/include/asio/buffer.hpp843
-rw-r--r--3rdparty/asio/include/asio/buffer_registration.hpp318
-rw-r--r--3rdparty/asio/include/asio/buffered_read_stream.hpp78
-rw-r--r--3rdparty/asio/include/asio/buffered_read_stream_fwd.hpp2
-rw-r--r--3rdparty/asio/include/asio/buffered_stream.hpp93
-rw-r--r--3rdparty/asio/include/asio/buffered_stream_fwd.hpp2
-rw-r--r--3rdparty/asio/include/asio/buffered_write_stream.hpp78
-rw-r--r--3rdparty/asio/include/asio/buffered_write_stream_fwd.hpp2
-rw-r--r--3rdparty/asio/include/asio/buffers_iterator.hpp8
-rw-r--r--3rdparty/asio/include/asio/cancellation_signal.hpp182
-rw-r--r--3rdparty/asio/include/asio/cancellation_state.hpp32
-rw-r--r--3rdparty/asio/include/asio/cancellation_type.hpp33
-rw-r--r--3rdparty/asio/include/asio/co_spawn.hpp74
-rw-r--r--3rdparty/asio/include/asio/completion_condition.hpp2
-rw-r--r--3rdparty/asio/include/asio/compose.hpp253
-rw-r--r--3rdparty/asio/include/asio/connect.hpp242
-rw-r--r--3rdparty/asio/include/asio/connect_pipe.hpp83
-rw-r--r--3rdparty/asio/include/asio/consign.hpp75
-rw-r--r--3rdparty/asio/include/asio/coroutine.hpp3
-rw-r--r--3rdparty/asio/include/asio/deadline_timer.hpp2
-rw-r--r--3rdparty/asio/include/asio/defer.hpp198
-rw-r--r--3rdparty/asio/include/asio/deferred.hpp715
-rw-r--r--3rdparty/asio/include/asio/detached.hpp41
-rw-r--r--3rdparty/asio/include/asio/detail/array.hpp12
-rw-r--r--3rdparty/asio/include/asio/detail/array_fwd.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/assert.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/atomic_count.hpp19
-rw-r--r--3rdparty/asio/include/asio/detail/base_from_cancellation_state.hpp41
-rw-r--r--3rdparty/asio/include/asio/detail/base_from_completion_cond.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/bind_handler.hpp664
-rw-r--r--3rdparty/asio/include/asio/detail/blocking_executor_op.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/buffer_resize_guard.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/buffer_sequence_adapter.hpp201
-rw-r--r--3rdparty/asio/include/asio/detail/buffered_stream_storage.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/bulk_executor_op.hpp88
-rw-r--r--3rdparty/asio/include/asio/detail/call_stack.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/chrono.hpp25
-rw-r--r--3rdparty/asio/include/asio/detail/chrono_time_traits.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/completion_handler.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/composed_work.hpp252
-rw-r--r--3rdparty/asio/include/asio/detail/concurrency_hint.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/conditionally_enabled_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/config.hpp1266
-rw-r--r--3rdparty/asio/include/asio/detail/consuming_buffers.hpp51
-rw-r--r--3rdparty/asio/include/asio/detail/cstddef.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/cstdint.hpp26
-rw-r--r--3rdparty/asio/include/asio/detail/date_time_fwd.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/deadline_timer_service.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/dependent_type.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/descriptor_ops.hpp44
-rw-r--r--3rdparty/asio/include/asio/detail/descriptor_read_op.hpp46
-rw-r--r--3rdparty/asio/include/asio/detail/descriptor_write_op.hpp45
-rw-r--r--3rdparty/asio/include/asio/detail/dev_poll_reactor.hpp33
-rw-r--r--3rdparty/asio/include/asio/detail/epoll_reactor.hpp27
-rw-r--r--3rdparty/asio/include/asio/detail/event.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/eventfd_select_interrupter.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/exception.hpp29
-rw-r--r--3rdparty/asio/include/asio/detail/executor_function.hpp68
-rw-r--r--3rdparty/asio/include/asio/detail/executor_op.hpp12
-rw-r--r--3rdparty/asio/include/asio/detail/fd_set_adapter.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/fenced_block.hpp46
-rw-r--r--3rdparty/asio/include/asio/detail/functional.hpp13
-rw-r--r--3rdparty/asio/include/asio/detail/future.hpp19
-rw-r--r--3rdparty/asio/include/asio/detail/gcc_arm_fenced_block.hpp91
-rw-r--r--3rdparty/asio/include/asio/detail/gcc_hppa_fenced_block.hpp68
-rw-r--r--3rdparty/asio/include/asio/detail/gcc_sync_fenced_block.hpp65
-rw-r--r--3rdparty/asio/include/asio/detail/gcc_x86_fenced_block.hpp99
-rw-r--r--3rdparty/asio/include/asio/detail/global.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/handler_alloc_helpers.hpp147
-rw-r--r--3rdparty/asio/include/asio/detail/handler_cont_helpers.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/handler_invoke_helpers.hpp80
-rw-r--r--3rdparty/asio/include/asio/detail/handler_tracking.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/handler_type_requirements.hpp24
-rw-r--r--3rdparty/asio/include/asio/detail/handler_work.hpp226
-rw-r--r--3rdparty/asio/include/asio/detail/hash_map.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/descriptor_ops.ipp393
-rw-r--r--3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.hpp16
-rw-r--r--3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.ipp17
-rw-r--r--3rdparty/asio/include/asio/detail/impl/epoll_reactor.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/impl/epoll_reactor.ipp25
-rw-r--r--3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/handler_tracking.ipp14
-rw-r--r--3rdparty/asio/include/asio/detail/impl/io_uring_descriptor_service.ipp205
-rw-r--r--3rdparty/asio/include/asio/detail/impl/io_uring_file_service.ipp140
-rw-r--r--3rdparty/asio/include/asio/detail/impl/io_uring_service.hpp112
-rw-r--r--3rdparty/asio/include/asio/detail/impl/io_uring_service.ipp914
-rw-r--r--3rdparty/asio/include/asio/detail/impl/io_uring_socket_service_base.ipp249
-rw-r--r--3rdparty/asio/include/asio/detail/impl/kqueue_reactor.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/impl/kqueue_reactor.ipp21
-rw-r--r--3rdparty/asio/include/asio/detail/impl/null_event.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/pipe_select_interrupter.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/posix_event.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/posix_mutex.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/posix_serial_port_service.ipp (renamed from 3rdparty/asio/include/asio/detail/impl/reactive_serial_port_service.ipp)57
-rw-r--r--3rdparty/asio/include/asio/detail/impl/posix_thread.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/posix_tss_ptr.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/reactive_descriptor_service.ipp27
-rw-r--r--3rdparty/asio/include/asio/detail/impl/reactive_socket_service_base.ipp50
-rw-r--r--3rdparty/asio/include/asio/detail/impl/resolver_service_base.ipp6
-rw-r--r--3rdparty/asio/include/asio/detail/impl/scheduler.ipp24
-rw-r--r--3rdparty/asio/include/asio/detail/impl/select_reactor.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/impl/select_reactor.ipp53
-rw-r--r--3rdparty/asio/include/asio/detail/impl/service_registry.hpp5
-rw-r--r--3rdparty/asio/include/asio/detail/impl/service_registry.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/signal_set_service.ipp170
-rw-r--r--3rdparty/asio/include/asio/detail/impl/socket_ops.ipp323
-rw-r--r--3rdparty/asio/include/asio/detail/impl/socket_select_interrupter.ipp8
-rw-r--r--3rdparty/asio/include/asio/detail/impl/strand_executor_service.hpp112
-rw-r--r--3rdparty/asio/include/asio/detail/impl/strand_executor_service.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/strand_service.hpp5
-rw-r--r--3rdparty/asio/include/asio/detail/impl/strand_service.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/thread_context.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/throw_error.ipp37
-rw-r--r--3rdparty/asio/include/asio/detail/impl/timer_queue_ptime.ipp24
-rw-r--r--3rdparty/asio/include/asio/detail/impl/timer_queue_set.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_event.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_file_service.ipp280
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_handle_service.ipp96
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.hpp3
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.ipp12
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp10
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp24
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_mutex.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp6
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_static_mutex.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_thread.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/win_tss_ptr.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp10
-rw-r--r--3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/impl/winsock_init.ipp2
-rw-r--r--3rdparty/asio/include/asio/detail/initiate_defer.hpp207
-rw-r--r--3rdparty/asio/include/asio/detail/initiate_dispatch.hpp193
-rw-r--r--3rdparty/asio/include/asio/detail/initiate_post.hpp207
-rw-r--r--3rdparty/asio/include/asio/detail/io_control.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/io_object_impl.hpp27
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_descriptor_read_at_op.hpp195
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_descriptor_read_op.hpp190
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_descriptor_service.hpp687
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_descriptor_write_at_op.hpp189
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_descriptor_write_op.hpp185
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_file_service.hpp261
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_null_buffers_op.hpp114
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_operation.hpp84
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_service.hpp319
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_accept_op.hpp280
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_connect_op.hpp140
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_recv_op.hpp205
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_recvfrom_op.hpp206
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_recvmsg_op.hpp192
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_send_op.hpp191
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_sendto_op.hpp194
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_service.hpp629
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_socket_service_base.hpp663
-rw-r--r--3rdparty/asio/include/asio/detail/io_uring_wait_op.hpp112
-rw-r--r--3rdparty/asio/include/asio/detail/is_buffer_sequence.hpp82
-rw-r--r--3rdparty/asio/include/asio/detail/is_executor.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/keyword_tss_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/kqueue_reactor.hpp27
-rw-r--r--3rdparty/asio/include/asio/detail/limits.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/local_free_on_block_exit.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/macos_fenced_block.hpp62
-rw-r--r--3rdparty/asio/include/asio/detail/memory.hpp79
-rw-r--r--3rdparty/asio/include/asio/detail/mutex.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/non_const_lvalue.hpp19
-rw-r--r--3rdparty/asio/include/asio/detail/noncopyable.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_event.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_fenced_block.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_global.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_mutex.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/null_reactor.hpp23
-rw-r--r--3rdparty/asio/include/asio/detail/null_signal_blocker.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_socket_service.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/null_static_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_thread.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/null_tss_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/object_pool.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/old_win_sdk_compat.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/op_queue.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/operation.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/pipe_select_interrupter.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/pop_options.hpp10
-rw-r--r--3rdparty/asio/include/asio/detail/posix_event.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_fd_set_adapter.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_global.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_serial_port_service.hpp (renamed from 3rdparty/asio/include/asio/detail/reactive_serial_port_service.hpp)48
-rw-r--r--3rdparty/asio/include/asio/detail/posix_signal_blocker.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_static_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_thread.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/posix_tss_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/push_options.hpp14
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_descriptor_service.hpp121
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_null_buffers_op.hpp41
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_accept_op.hpp105
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_connect_op.hpp47
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_recv_op.hpp46
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp47
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp47
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_send_op.hpp47
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_sendto_op.hpp46
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_service.hpp92
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_socket_service_base.hpp178
-rw-r--r--3rdparty/asio/include/asio/detail/reactive_wait_op.hpp41
-rw-r--r--3rdparty/asio/include/asio/detail/reactor.hpp32
-rw-r--r--3rdparty/asio/include/asio/detail/reactor_fwd.hpp40
-rw-r--r--3rdparty/asio/include/asio/detail/reactor_op.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/reactor_op_queue.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/recycling_allocator.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/regex_fwd.hpp17
-rw-r--r--3rdparty/asio/include/asio/detail/resolve_endpoint_op.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/resolve_op.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/resolve_query_op.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/resolver_service.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/resolver_service_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/scheduler.hpp20
-rw-r--r--3rdparty/asio/include/asio/detail/scheduler_operation.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/scheduler_task.hpp49
-rw-r--r--3rdparty/asio/include/asio/detail/scheduler_thread_info.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/scoped_lock.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/scoped_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/select_interrupter.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/select_reactor.hpp49
-rw-r--r--3rdparty/asio/include/asio/detail/service_registry.hpp5
-rw-r--r--3rdparty/asio/include/asio/detail/signal_blocker.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/signal_handler.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/signal_init.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/signal_op.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/signal_set_service.hpp71
-rw-r--r--3rdparty/asio/include/asio/detail/socket_holder.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/socket_ops.hpp82
-rw-r--r--3rdparty/asio/include/asio/detail/socket_option.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/socket_select_interrupter.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/socket_types.hpp12
-rw-r--r--3rdparty/asio/include/asio/detail/solaris_fenced_block.hpp62
-rw-r--r--3rdparty/asio/include/asio/detail/source_location.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/static_mutex.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/std_event.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/std_fenced_block.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/std_global.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/std_mutex.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/std_static_mutex.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/std_thread.hpp7
-rw-r--r--3rdparty/asio/include/asio/detail/strand_executor_service.hpp26
-rw-r--r--3rdparty/asio/include/asio/detail/strand_service.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/string_view.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/thread.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/thread_context.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/thread_group.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/thread_info_base.hpp38
-rw-r--r--3rdparty/asio/include/asio/detail/throw_error.hpp27
-rw-r--r--3rdparty/asio/include/asio/detail/throw_exception.hpp10
-rw-r--r--3rdparty/asio/include/asio/detail/timer_queue.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/timer_queue_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/timer_queue_ptime.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/timer_queue_set.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/timer_scheduler.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/timer_scheduler_fwd.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/tss_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/type_traits.hpp190
-rw-r--r--3rdparty/asio/include/asio/detail/utility.hpp83
-rw-r--r--3rdparty/asio/include/asio/detail/variadic_templates.hpp294
-rw-r--r--3rdparty/asio/include/asio/detail/wait_handler.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/wait_op.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_event.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_fd_set_adapter.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_fenced_block.hpp90
-rw-r--r--3rdparty/asio/include/asio/detail/win_global.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_file_service.hpp287
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_handle_read_op.hpp10
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_handle_service.hpp38
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_handle_write_op.hpp14
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_io_context.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_null_buffers_op.hpp10
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_operation.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_overlapped_op.hpp14
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp14
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp3
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_accept_op.hpp25
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_connect_op.hpp11
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_recv_op.hpp10
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp10
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp12
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_send_op.hpp10
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_service.hpp61
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_socket_service_base.hpp29
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_thread_info.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_wait_op.hpp10
-rw-r--r--3rdparty/asio/include/asio/detail/win_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_object_handle_service.hpp3
-rw-r--r--3rdparty/asio/include/asio/detail/win_static_mutex.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_thread.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/win_tss_ptr.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/winapp_thread.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/wince_thread.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_async_manager.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_async_op.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_resolve_op.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_resolver_service.hpp6
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_socket_connect_op.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_socket_recv_op.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_socket_send_op.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_ssocket_service.hpp8
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_ssocket_service_base.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_timer_scheduler.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/winrt_utils.hpp2
-rw-r--r--3rdparty/asio/include/asio/detail/winsock_init.hpp4
-rw-r--r--3rdparty/asio/include/asio/detail/work_dispatcher.hpp50
-rw-r--r--3rdparty/asio/include/asio/detail/wrapped_handler.hpp124
-rw-r--r--3rdparty/asio/include/asio/dispatch.hpp180
-rw-r--r--3rdparty/asio/include/asio/error.hpp39
-rw-r--r--3rdparty/asio/include/asio/error_code.hpp169
-rw-r--r--3rdparty/asio/include/asio/execution.hpp17
-rw-r--r--3rdparty/asio/include/asio/execution/allocator.hpp127
-rw-r--r--3rdparty/asio/include/asio/execution/any_executor.hpp1531
-rw-r--r--3rdparty/asio/include/asio/execution/bad_executor.hpp7
-rw-r--r--3rdparty/asio/include/asio/execution/blocking.hpp787
-rw-r--r--3rdparty/asio/include/asio/execution/blocking_adaptation.hpp600
-rw-r--r--3rdparty/asio/include/asio/execution/bulk_execute.hpp397
-rw-r--r--3rdparty/asio/include/asio/execution/bulk_guarantee.hpp1215
-rw-r--r--3rdparty/asio/include/asio/execution/connect.hpp489
-rw-r--r--3rdparty/asio/include/asio/execution/context.hpp82
-rw-r--r--3rdparty/asio/include/asio/execution/context_as.hpp91
-rw-r--r--3rdparty/asio/include/asio/execution/detail/as_invocable.hpp152
-rw-r--r--3rdparty/asio/include/asio/execution/detail/as_operation.hpp105
-rw-r--r--3rdparty/asio/include/asio/execution/detail/as_receiver.hpp128
-rw-r--r--3rdparty/asio/include/asio/execution/detail/bulk_sender.hpp261
-rw-r--r--3rdparty/asio/include/asio/execution/detail/submit_receiver.hpp233
-rw-r--r--3rdparty/asio/include/asio/execution/detail/void_receiver.hpp90
-rw-r--r--3rdparty/asio/include/asio/execution/execute.hpp283
-rw-r--r--3rdparty/asio/include/asio/execution/executor.hpp186
-rw-r--r--3rdparty/asio/include/asio/execution/impl/bad_executor.ipp6
-rw-r--r--3rdparty/asio/include/asio/execution/impl/receiver_invocation_error.ipp36
-rw-r--r--3rdparty/asio/include/asio/execution/invocable_archetype.hpp32
-rw-r--r--3rdparty/asio/include/asio/execution/mapping.hpp594
-rw-r--r--3rdparty/asio/include/asio/execution/occupancy.hpp82
-rw-r--r--3rdparty/asio/include/asio/execution/operation_state.hpp94
-rw-r--r--3rdparty/asio/include/asio/execution/outstanding_work.hpp412
-rw-r--r--3rdparty/asio/include/asio/execution/prefer_only.hpp115
-rw-r--r--3rdparty/asio/include/asio/execution/receiver.hpp280
-rw-r--r--3rdparty/asio/include/asio/execution/receiver_invocation_error.hpp48
-rw-r--r--3rdparty/asio/include/asio/execution/relationship.hpp412
-rw-r--r--3rdparty/asio/include/asio/execution/schedule.hpp287
-rw-r--r--3rdparty/asio/include/asio/execution/scheduler.hpp86
-rw-r--r--3rdparty/asio/include/asio/execution/sender.hpp311
-rw-r--r--3rdparty/asio/include/asio/execution/set_done.hpp250
-rw-r--r--3rdparty/asio/include/asio/execution/set_error.hpp250
-rw-r--r--3rdparty/asio/include/asio/execution/set_value.hpp483
-rw-r--r--3rdparty/asio/include/asio/execution/start.hpp247
-rw-r--r--3rdparty/asio/include/asio/execution/submit.hpp450
-rw-r--r--3rdparty/asio/include/asio/execution_context.hpp26
-rw-r--r--3rdparty/asio/include/asio/executor.hpp102
-rw-r--r--3rdparty/asio/include/asio/executor_work_guard.hpp234
-rw-r--r--3rdparty/asio/include/asio/experimental/append.hpp47
-rw-r--r--3rdparty/asio/include/asio/experimental/as_single.hpp51
-rw-r--r--3rdparty/asio/include/asio/experimental/as_tuple.hpp107
-rw-r--r--3rdparty/asio/include/asio/experimental/awaitable_operators.hpp40
-rw-r--r--3rdparty/asio/include/asio/experimental/basic_channel.hpp513
-rw-r--r--3rdparty/asio/include/asio/experimental/basic_concurrent_channel.hpp513
-rw-r--r--3rdparty/asio/include/asio/experimental/cancellation_condition.hpp53
-rw-r--r--3rdparty/asio/include/asio/experimental/channel.hpp70
-rw-r--r--3rdparty/asio/include/asio/experimental/channel_error.hpp82
-rw-r--r--3rdparty/asio/include/asio/experimental/channel_traits.hpp301
-rw-r--r--3rdparty/asio/include/asio/experimental/co_composed.hpp145
-rw-r--r--3rdparty/asio/include/asio/experimental/co_spawn.hpp187
-rw-r--r--3rdparty/asio/include/asio/experimental/concurrent_channel.hpp70
-rw-r--r--3rdparty/asio/include/asio/experimental/coro.hpp1014
-rw-r--r--3rdparty/asio/include/asio/experimental/coro_traits.hpp (renamed from 3rdparty/asio/include/asio/experimental/detail/coro_traits.hpp)85
-rw-r--r--3rdparty/asio/include/asio/experimental/deferred.hpp581
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_handler.hpp77
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_message.hpp129
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_operation.hpp361
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_payload.hpp222
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_receive_op.hpp127
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_send_functions.hpp192
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_send_op.hpp148
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/channel_service.hpp677
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/completion_handler_erasure.hpp158
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/coro_completion_handler.hpp169
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/coro_promise_allocator.hpp161
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/has_signature.hpp54
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/impl/channel_service.hpp621
-rw-r--r--3rdparty/asio/include/asio/experimental/detail/partial_promise.hpp118
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/append.hpp217
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/as_single.hpp125
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/as_tuple.hpp246
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/channel_error.ipp61
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/co_composed.hpp1174
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/coro.hpp1222
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/deferred.hpp104
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/parallel_group.hpp442
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/prepend.hpp217
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/promise.hpp219
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/use_coro.hpp214
-rw-r--r--3rdparty/asio/include/asio/experimental/impl/use_promise.hpp66
-rw-r--r--3rdparty/asio/include/asio/experimental/parallel_group.hpp316
-rw-r--r--3rdparty/asio/include/asio/experimental/prepend.hpp47
-rw-r--r--3rdparty/asio/include/asio/experimental/promise.hpp554
-rw-r--r--3rdparty/asio/include/asio/experimental/use_coro.hpp363
-rw-r--r--3rdparty/asio/include/asio/experimental/use_promise.hpp111
-rw-r--r--3rdparty/asio/include/asio/file_base.hpp166
-rw-r--r--3rdparty/asio/include/asio/generic/basic_endpoint.hpp8
-rw-r--r--3rdparty/asio/include/asio/generic/datagram_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/generic/detail/endpoint.hpp2
-rw-r--r--3rdparty/asio/include/asio/generic/detail/impl/endpoint.ipp2
-rw-r--r--3rdparty/asio/include/asio/generic/raw_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/generic/seq_packet_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/generic/stream_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/handler_alloc_hook.hpp104
-rw-r--r--3rdparty/asio/include/asio/handler_continuation_hook.hpp2
-rw-r--r--3rdparty/asio/include/asio/handler_invoke_hook.hpp111
-rw-r--r--3rdparty/asio/include/asio/high_resolution_timer.hpp7
-rw-r--r--3rdparty/asio/include/asio/impl/any_completion_executor.ipp126
-rw-r--r--3rdparty/asio/include/asio/impl/any_io_executor.ipp134
-rw-r--r--3rdparty/asio/include/asio/impl/append.hpp162
-rw-r--r--3rdparty/asio/include/asio/impl/as_tuple.hpp245
-rw-r--r--3rdparty/asio/include/asio/impl/awaitable.hpp478
-rw-r--r--3rdparty/asio/include/asio/impl/buffered_read_stream.hpp222
-rw-r--r--3rdparty/asio/include/asio/impl/buffered_write_stream.hpp222
-rw-r--r--3rdparty/asio/include/asio/impl/cancellation_signal.ipp96
-rw-r--r--3rdparty/asio/include/asio/impl/co_spawn.hpp303
-rw-r--r--3rdparty/asio/include/asio/impl/compose.hpp687
-rw-r--r--3rdparty/asio/include/asio/impl/connect.hpp345
-rw-r--r--3rdparty/asio/include/asio/impl/connect_pipe.hpp73
-rw-r--r--3rdparty/asio/include/asio/impl/connect_pipe.ipp149
-rw-r--r--3rdparty/asio/include/asio/impl/consign.hpp137
-rw-r--r--3rdparty/asio/include/asio/impl/defer.hpp256
-rw-r--r--3rdparty/asio/include/asio/impl/deferred.hpp147
-rw-r--r--3rdparty/asio/include/asio/impl/detached.hpp63
-rw-r--r--3rdparty/asio/include/asio/impl/dispatch.hpp251
-rw-r--r--3rdparty/asio/include/asio/impl/error.ipp8
-rw-r--r--3rdparty/asio/include/asio/impl/error_code.ipp6
-rw-r--r--3rdparty/asio/include/asio/impl/execution_context.hpp38
-rw-r--r--3rdparty/asio/include/asio/impl/execution_context.ipp2
-rw-r--r--3rdparty/asio/include/asio/impl/executor.hpp103
-rw-r--r--3rdparty/asio/include/asio/impl/executor.ipp6
-rw-r--r--3rdparty/asio/include/asio/impl/handler_alloc_hook.ipp62
-rw-r--r--3rdparty/asio/include/asio/impl/io_context.hpp179
-rw-r--r--3rdparty/asio/include/asio/impl/io_context.ipp3
-rw-r--r--3rdparty/asio/include/asio/impl/multiple_exceptions.ipp12
-rw-r--r--3rdparty/asio/include/asio/impl/post.hpp256
-rw-r--r--3rdparty/asio/include/asio/impl/prepend.hpp163
-rw-r--r--3rdparty/asio/include/asio/impl/read.hpp648
-rw-r--r--3rdparty/asio/include/asio/impl/read_at.hpp295
-rw-r--r--3rdparty/asio/include/asio/impl/read_until.hpp1406
-rw-r--r--3rdparty/asio/include/asio/impl/redirect_error.hpp451
-rw-r--r--3rdparty/asio/include/asio/impl/serial_port_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/impl/serial_port_base.ipp2
-rw-r--r--3rdparty/asio/include/asio/impl/spawn.hpp1513
-rw-r--r--3rdparty/asio/include/asio/impl/src.hpp16
-rw-r--r--3rdparty/asio/include/asio/impl/system_context.hpp4
-rw-r--r--3rdparty/asio/include/asio/impl/system_context.ipp4
-rw-r--r--3rdparty/asio/include/asio/impl/system_executor.hpp44
-rw-r--r--3rdparty/asio/include/asio/impl/thread_pool.hpp141
-rw-r--r--3rdparty/asio/include/asio/impl/thread_pool.ipp9
-rw-r--r--3rdparty/asio/include/asio/impl/use_awaitable.hpp28
-rw-r--r--3rdparty/asio/include/asio/impl/use_future.hpp515
-rw-r--r--3rdparty/asio/include/asio/impl/write.hpp699
-rw-r--r--3rdparty/asio/include/asio/impl/write_at.hpp283
-rw-r--r--3rdparty/asio/include/asio/io_context.hpp415
-rw-r--r--3rdparty/asio/include/asio/io_context_strand.hpp62
-rw-r--r--3rdparty/asio/include/asio/io_service.hpp2
-rw-r--r--3rdparty/asio/include/asio/io_service_strand.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/address.hpp61
-rw-r--r--3rdparty/asio/include/asio/ip/address_v4.hpp138
-rw-r--r--3rdparty/asio/include/asio/ip/address_v4_iterator.hpp32
-rw-r--r--3rdparty/asio/include/asio/ip/address_v4_range.hpp38
-rw-r--r--3rdparty/asio/include/asio/ip/address_v6.hpp109
-rw-r--r--3rdparty/asio/include/asio/ip/address_v6_iterator.hpp31
-rw-r--r--3rdparty/asio/include/asio/ip/address_v6_range.hpp35
-rw-r--r--3rdparty/asio/include/asio/ip/bad_address_cast.hpp16
-rw-r--r--3rdparty/asio/include/asio/ip/basic_endpoint.hpp61
-rw-r--r--3rdparty/asio/include/asio/ip/basic_resolver.hpp250
-rw-r--r--3rdparty/asio/include/asio/ip/basic_resolver_entry.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/basic_resolver_iterator.hpp12
-rw-r--r--3rdparty/asio/include/asio/ip/basic_resolver_query.hpp18
-rw-r--r--3rdparty/asio/include/asio/ip/basic_resolver_results.hpp22
-rw-r--r--3rdparty/asio/include/asio/ip/detail/endpoint.hpp34
-rw-r--r--3rdparty/asio/include/asio/ip/detail/impl/endpoint.ipp24
-rw-r--r--3rdparty/asio/include/asio/ip/detail/socket_option.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/host_name.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/icmp.hpp14
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address.ipp40
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address_v4.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address_v4.ipp22
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address_v6.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/address_v6.ipp56
-rw-r--r--3rdparty/asio/include/asio/ip/impl/basic_endpoint.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/host_name.ipp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/network_v4.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/network_v4.ipp10
-rw-r--r--3rdparty/asio/include/asio/ip/impl/network_v6.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/impl/network_v6.ipp10
-rw-r--r--3rdparty/asio/include/asio/ip/multicast.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/network_v4.hpp38
-rw-r--r--3rdparty/asio/include/asio/ip/network_v6.hpp32
-rw-r--r--3rdparty/asio/include/asio/ip/resolver_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/resolver_query_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/tcp.hpp14
-rw-r--r--3rdparty/asio/include/asio/ip/udp.hpp14
-rw-r--r--3rdparty/asio/include/asio/ip/unicast.hpp2
-rw-r--r--3rdparty/asio/include/asio/ip/v6_only.hpp4
-rw-r--r--3rdparty/asio/include/asio/is_applicable_property.hpp12
-rw-r--r--3rdparty/asio/include/asio/is_contiguous_iterator.hpp45
-rw-r--r--3rdparty/asio/include/asio/is_executor.hpp2
-rw-r--r--3rdparty/asio/include/asio/is_read_buffered.hpp2
-rw-r--r--3rdparty/asio/include/asio/is_write_buffered.hpp2
-rw-r--r--3rdparty/asio/include/asio/local/basic_endpoint.hpp8
-rw-r--r--3rdparty/asio/include/asio/local/connect_pair.hpp2
-rw-r--r--3rdparty/asio/include/asio/local/datagram_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/local/detail/endpoint.hpp2
-rw-r--r--3rdparty/asio/include/asio/local/detail/impl/endpoint.ipp2
-rw-r--r--3rdparty/asio/include/asio/local/seq_packet_protocol.hpp84
-rw-r--r--3rdparty/asio/include/asio/local/stream_protocol.hpp8
-rw-r--r--3rdparty/asio/include/asio/multiple_exceptions.hpp12
-rw-r--r--3rdparty/asio/include/asio/packaged_task.hpp62
-rw-r--r--3rdparty/asio/include/asio/placeholders.hpp134
-rw-r--r--3rdparty/asio/include/asio/posix/basic_descriptor.hpp135
-rw-r--r--3rdparty/asio/include/asio/posix/basic_stream_descriptor.hpp150
-rw-r--r--3rdparty/asio/include/asio/posix/descriptor.hpp2
-rw-r--r--3rdparty/asio/include/asio/posix/descriptor_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/posix/stream_descriptor.hpp2
-rw-r--r--3rdparty/asio/include/asio/post.hpp197
-rw-r--r--3rdparty/asio/include/asio/prefer.hpp509
-rw-r--r--3rdparty/asio/include/asio/prepend.hpp66
-rw-r--r--3rdparty/asio/include/asio/query.hpp127
-rw-r--r--3rdparty/asio/include/asio/random_access_file.hpp35
-rw-r--r--3rdparty/asio/include/asio/read.hpp578
-rw-r--r--3rdparty/asio/include/asio/read_at.hpp192
-rw-r--r--3rdparty/asio/include/asio/read_until.hpp843
-rw-r--r--3rdparty/asio/include/asio/readable_pipe.hpp35
-rw-r--r--3rdparty/asio/include/asio/recycling_allocator.hpp138
-rw-r--r--3rdparty/asio/include/asio/redirect_error.hpp20
-rw-r--r--3rdparty/asio/include/asio/registered_buffer.hpp344
-rw-r--r--3rdparty/asio/include/asio/require.hpp354
-rw-r--r--3rdparty/asio/include/asio/require_concept.hpp149
-rw-r--r--3rdparty/asio/include/asio/serial_port.hpp2
-rw-r--r--3rdparty/asio/include/asio/serial_port_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/signal_set.hpp2
-rw-r--r--3rdparty/asio/include/asio/signal_set_base.hpp171
-rw-r--r--3rdparty/asio/include/asio/socket_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/spawn.hpp742
-rw-r--r--3rdparty/asio/include/asio/ssl.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/context.hpp7
-rw-r--r--3rdparty/asio/include/asio/ssl/context_base.hpp48
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/buffered_handshake_op.hpp6
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/engine.hpp13
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/handshake_op.hpp6
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/impl/engine.ipp28
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/impl/openssl_init.ipp12
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/io.hpp87
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/openssl_init.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/openssl_types.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/password_callback.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/read_op.hpp6
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/shutdown_op.hpp8
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/stream_core.hpp49
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/verify_callback.hpp4
-rw-r--r--3rdparty/asio/include/asio/ssl/detail/write_op.hpp6
-rw-r--r--3rdparty/asio/include/asio/ssl/error.hpp4
-rw-r--r--3rdparty/asio/include/asio/ssl/host_name_verification.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/context.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/context.ipp208
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/error.ipp32
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/host_name_verification.ipp2
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/rfc2818_verification.ipp2
-rw-r--r--3rdparty/asio/include/asio/ssl/impl/src.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/rfc2818_verification.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/stream.hpp280
-rw-r--r--3rdparty/asio/include/asio/ssl/stream_base.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/verify_context.hpp2
-rw-r--r--3rdparty/asio/include/asio/ssl/verify_mode.hpp2
-rw-r--r--3rdparty/asio/include/asio/static_thread_pool.hpp2
-rw-r--r--3rdparty/asio/include/asio/steady_timer.hpp7
-rw-r--r--3rdparty/asio/include/asio/strand.hpp220
-rw-r--r--3rdparty/asio/include/asio/stream_file.hpp35
-rw-r--r--3rdparty/asio/include/asio/streambuf.hpp2
-rw-r--r--3rdparty/asio/include/asio/system_context.hpp6
-rw-r--r--3rdparty/asio/include/asio/system_error.hpp104
-rw-r--r--3rdparty/asio/include/asio/system_executor.hpp137
-rw-r--r--3rdparty/asio/include/asio/system_timer.hpp7
-rw-r--r--3rdparty/asio/include/asio/this_coro.hpp91
-rw-r--r--3rdparty/asio/include/asio/thread.hpp2
-rw-r--r--3rdparty/asio/include/asio/thread_pool.hpp368
-rw-r--r--3rdparty/asio/include/asio/time_traits.hpp2
-rw-r--r--3rdparty/asio/include/asio/traits/bulk_execute_free.hpp114
-rw-r--r--3rdparty/asio/include/asio/traits/bulk_execute_member.hpp114
-rw-r--r--3rdparty/asio/include/asio/traits/connect_free.hpp112
-rw-r--r--3rdparty/asio/include/asio/traits/connect_member.hpp112
-rw-r--r--3rdparty/asio/include/asio/traits/equality_comparable.hpp32
-rw-r--r--3rdparty/asio/include/asio/traits/execute_free.hpp108
-rw-r--r--3rdparty/asio/include/asio/traits/execute_member.hpp36
-rw-r--r--3rdparty/asio/include/asio/traits/prefer_free.hpp36
-rw-r--r--3rdparty/asio/include/asio/traits/prefer_member.hpp36
-rw-r--r--3rdparty/asio/include/asio/traits/query_free.hpp36
-rw-r--r--3rdparty/asio/include/asio/traits/query_member.hpp36
-rw-r--r--3rdparty/asio/include/asio/traits/query_static_constexpr_member.hpp37
-rw-r--r--3rdparty/asio/include/asio/traits/require_concept_free.hpp36
-rw-r--r--3rdparty/asio/include/asio/traits/require_concept_member.hpp36
-rw-r--r--3rdparty/asio/include/asio/traits/require_free.hpp36
-rw-r--r--3rdparty/asio/include/asio/traits/require_member.hpp36
-rw-r--r--3rdparty/asio/include/asio/traits/schedule_free.hpp108
-rw-r--r--3rdparty/asio/include/asio/traits/schedule_member.hpp108
-rw-r--r--3rdparty/asio/include/asio/traits/set_done_free.hpp108
-rw-r--r--3rdparty/asio/include/asio/traits/set_done_member.hpp108
-rw-r--r--3rdparty/asio/include/asio/traits/set_error_free.hpp112
-rw-r--r--3rdparty/asio/include/asio/traits/set_error_member.hpp112
-rw-r--r--3rdparty/asio/include/asio/traits/set_value_free.hpp234
-rw-r--r--3rdparty/asio/include/asio/traits/set_value_member.hpp234
-rw-r--r--3rdparty/asio/include/asio/traits/start_free.hpp108
-rw-r--r--3rdparty/asio/include/asio/traits/start_member.hpp108
-rw-r--r--3rdparty/asio/include/asio/traits/static_query.hpp46
-rw-r--r--3rdparty/asio/include/asio/traits/static_require.hpp52
-rw-r--r--3rdparty/asio/include/asio/traits/static_require_concept.hpp52
-rw-r--r--3rdparty/asio/include/asio/traits/submit_free.hpp112
-rw-r--r--3rdparty/asio/include/asio/traits/submit_member.hpp112
-rw-r--r--3rdparty/asio/include/asio/ts/buffer.hpp2
-rw-r--r--3rdparty/asio/include/asio/ts/executor.hpp2
-rw-r--r--3rdparty/asio/include/asio/ts/internet.hpp2
-rw-r--r--3rdparty/asio/include/asio/ts/io_context.hpp2
-rw-r--r--3rdparty/asio/include/asio/ts/net.hpp2
-rw-r--r--3rdparty/asio/include/asio/ts/netfwd.hpp30
-rw-r--r--3rdparty/asio/include/asio/ts/socket.hpp2
-rw-r--r--3rdparty/asio/include/asio/ts/timer.hpp2
-rw-r--r--3rdparty/asio/include/asio/unyield.hpp2
-rw-r--r--3rdparty/asio/include/asio/use_awaitable.hpp41
-rw-r--r--3rdparty/asio/include/asio/use_future.hpp35
-rw-r--r--3rdparty/asio/include/asio/uses_executor.hpp8
-rw-r--r--3rdparty/asio/include/asio/version.hpp4
-rw-r--r--3rdparty/asio/include/asio/wait_traits.hpp2
-rw-r--r--3rdparty/asio/include/asio/windows/basic_object_handle.hpp110
-rw-r--r--3rdparty/asio/include/asio/windows/basic_overlapped_handle.hpp122
-rw-r--r--3rdparty/asio/include/asio/windows/basic_random_access_handle.hpp155
-rw-r--r--3rdparty/asio/include/asio/windows/basic_stream_handle.hpp149
-rw-r--r--3rdparty/asio/include/asio/windows/object_handle.hpp2
-rw-r--r--3rdparty/asio/include/asio/windows/overlapped_handle.hpp2
-rw-r--r--3rdparty/asio/include/asio/windows/overlapped_ptr.hpp34
-rw-r--r--3rdparty/asio/include/asio/windows/random_access_handle.hpp2
-rw-r--r--3rdparty/asio/include/asio/windows/stream_handle.hpp2
-rw-r--r--3rdparty/asio/include/asio/writable_pipe.hpp35
-rw-r--r--3rdparty/asio/include/asio/write.hpp554
-rw-r--r--3rdparty/asio/include/asio/write_at.hpp191
-rw-r--r--3rdparty/asio/include/asio/yield.hpp2
-rwxr-xr-x3rdparty/asio/install-sh422
-rwxr-xr-x3rdparty/asio/missing16
-rw-r--r--3rdparty/asio/src/Makefile.am22
-rw-r--r--3rdparty/asio/src/Makefile.in33
-rw-r--r--3rdparty/asio/src/Makefile.mgw176
-rw-r--r--3rdparty/asio/src/Makefile.msc289
-rw-r--r--3rdparty/asio/src/asio.cpp2
-rw-r--r--3rdparty/asio/src/asio_ssl.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp03/Makefile.am251
-rw-r--r--3rdparty/asio/src/examples/cpp03/Makefile.in2339
-rw-r--r--3rdparty/asio/src/examples/cpp03/allocation/server.cpp285
-rw-r--r--3rdparty/asio/src/examples/cpp03/buffers/reference_counted.cpp131
-rw-r--r--3rdparty/asio/src/examples/cpp03/chat/chat_client.cpp177
-rw-r--r--3rdparty/asio/src/examples/cpp03/chat/chat_message.hpp93
-rw-r--r--3rdparty/asio/src/examples/cpp03/chat/chat_server.cpp249
-rw-r--r--3rdparty/asio/src/examples/cpp03/chat/posix_chat_client.cpp204
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp137
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp92
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp59
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp79
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp59
-rw-r--r--3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp53
-rw-r--r--3rdparty/asio/src/examples/cpp03/fork/daemon.cpp190
-rw-r--r--3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp161
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/connection.cpp99
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/connection.hpp83
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/connection_manager.cpp38
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/connection_manager.hpp44
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/header.hpp28
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/main.cpp44
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/mime_types.cpp46
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/mime_types.hpp27
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/reply.cpp256
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/reply.hpp64
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/request_handler.cpp122
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/request_handler.hpp46
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/server.cpp94
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server/server.hpp69
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server2/connection.cpp93
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server3/connection.cpp94
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server4/request.hpp46
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server4/request_parser.cpp226
-rw-r--r--3rdparty/asio/src/examples/cpp03/http/server4/request_parser.hpp78
-rw-r--r--3rdparty/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp171
-rw-r--r--3rdparty/asio/src/examples/cpp03/iostreams/http_client.cpp91
-rw-r--r--3rdparty/asio/src/examples/cpp03/local/connect_pair.cpp141
-rw-r--r--3rdparty/asio/src/examples/cpp03/local/iostream_client.cpp62
-rw-r--r--3rdparty/asio/src/examples/cpp03/local/stream_client.cpp61
-rw-r--r--3rdparty/asio/src/examples/cpp03/local/stream_server.cpp141
-rw-r--r--3rdparty/asio/src/examples/cpp03/multicast/receiver.cpp93
-rw-r--r--3rdparty/asio/src/examples/cpp03/multicast/sender.cpp98
-rw-r--r--3rdparty/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp240
-rw-r--r--3rdparty/asio/src/examples/cpp03/socks4/socks4.hpp144
-rw-r--r--3rdparty/asio/src/examples/cpp03/socks4/sync_client.cpp94
-rw-r--r--3rdparty/asio/src/examples/cpp03/spawn/echo_server.cpp122
-rw-r--r--3rdparty/asio/src/examples/cpp03/spawn/parallel_grep.cpp89
-rw-r--r--3rdparty/asio/src/examples/cpp03/ssl/ca.pem49
-rw-r--r--3rdparty/asio/src/examples/cpp03/ssl/client.cpp157
-rw-r--r--3rdparty/asio/src/examples/cpp03/ssl/dh2048.pem8
-rw-r--r--3rdparty/asio/src/examples/cpp03/ssl/server.cpp170
-rw-r--r--3rdparty/asio/src/examples/cpp03/ssl/server.pem71
-rw-r--r--3rdparty/asio/src/examples/cpp03/timeouts/async_tcp_client.cpp311
-rw-r--r--3rdparty/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp191
-rw-r--r--3rdparty/asio/src/examples/cpp03/timeouts/blocking_token_tcp_client.cpp201
-rw-r--r--3rdparty/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp154
-rw-r--r--3rdparty/asio/src/examples/cpp03/timeouts/server.cpp433
-rw-r--r--3rdparty/asio/src/examples/cpp03/timers/time_t_timer.cpp106
-rw-r--r--3rdparty/asio/src/examples/cpp11/Makefile.am171
-rw-r--r--3rdparty/asio/src/examples/cpp11/Makefile.in1256
-rw-r--r--3rdparty/asio/src/examples/cpp11/allocation/server.cpp48
-rw-r--r--3rdparty/asio/src/examples/cpp11/buffers/reference_counted.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/chat/chat_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/chat/chat_message.hpp6
-rw-r--r--3rdparty/asio/src/examples/cpp11/chat/chat_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/chat/posix_chat_client.cpp198
-rw-r--r--3rdparty/asio/src/examples/cpp11/deferred/deferred_1.cpp35
-rw-r--r--3rdparty/asio/src/examples/cpp11/deferred/deferred_2.cpp44
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp6
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/executors/bank_account_1.cpp9
-rw-r--r--3rdparty/asio/src/examples/cpp11/executors/bank_account_2.cpp12
-rw-r--r--3rdparty/asio/src/examples/cpp11/executors/fork_join.cpp7
-rw-r--r--3rdparty/asio/src/examples/cpp11/files/async_file_copy.cpp101
-rw-r--r--3rdparty/asio/src/examples/cpp11/files/blocking_file_copy.cpp65
-rw-r--r--3rdparty/asio/src/examples/cpp11/fork/daemon.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/fork/process_per_connection.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/futures/daytime_client.cpp5
-rw-r--r--3rdparty/asio/src/examples/cpp11/handler_tracking/async_tcp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp6
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/client/async_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/client/async_client.cpp)30
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/client/sync_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/client/sync_client.cpp)6
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/connection.cpp5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/connection.hpp4
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/connection_manager.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/connection_manager.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/header.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/main.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/mime_types.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/mime_types.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/reply.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/reply.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/request.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/request_handler.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/request_handler.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/request_parser.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/request_parser.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server/server.hpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/connection.cpp89
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/connection.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/connection.hpp)34
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/header.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/header.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.cpp)18
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.hpp)17
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/main.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/main.cpp)6
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/mime_types.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/mime_types.cpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/mime_types.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/mime_types.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/reply.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/reply.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/reply.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/reply.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/request.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/request.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/request_handler.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/request_handler.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/request_handler.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/request_handler.hpp)7
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/request_parser.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/request_parser.cpp)104
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/request_parser.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/request_parser.hpp)29
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/server.cpp)51
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server2/server.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server2/server.hpp)24
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/connection.cpp89
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/connection.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/connection.hpp)37
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/header.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/header.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/main.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/main.cpp)6
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/mime_types.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/mime_types.cpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/mime_types.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/mime_types.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/reply.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/reply.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/reply.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/reply.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/request.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/request.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/request_handler.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/request_handler.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/request_handler.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/request_handler.hpp)7
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/request_parser.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/request_parser.cpp)104
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/request_parser.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/request_parser.hpp)29
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/server.cpp)66
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server3/server.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server3/server.hpp)24
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/file_handler.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/file_handler.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/file_handler.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/file_handler.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/header.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/header.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/main.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/main.cpp)10
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/mime_types.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/mime_types.cpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/mime_types.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/mime_types.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/reply.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/reply.cpp)5
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/reply.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/reply.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/request.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server/request.hpp)12
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/request_parser.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server/request_parser.cpp)108
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/request_parser.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server/request_parser.hpp)39
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/server.cpp)14
-rw-r--r--3rdparty/asio/src/examples/cpp11/http/server4/server.hpp (renamed from 3rdparty/asio/src/examples/cpp03/http/server4/server.hpp)26
-rw-r--r--3rdparty/asio/src/examples/cpp11/icmp/icmp_header.hpp (renamed from 3rdparty/asio/src/examples/cpp03/icmp/icmp_header.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/icmp/ipv4_header.hpp (renamed from 3rdparty/asio/src/examples/cpp03/icmp/ipv4_header.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/icmp/ping.cpp (renamed from 3rdparty/asio/src/examples/cpp03/icmp/ping.cpp)9
-rw-r--r--3rdparty/asio/src/examples/cpp11/invocation/prioritised_handlers.cpp6
-rw-r--r--3rdparty/asio/src/examples/cpp11/iostreams/daytime_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/iostreams/daytime_client.cpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/iostreams/daytime_server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/iostreams/daytime_server.cpp)4
-rw-r--r--3rdparty/asio/src/examples/cpp11/iostreams/http_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/connect_pair.cpp6
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_client.cpp102
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_server.cpp160
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/iostream_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/stream_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/local/stream_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/multicast/receiver.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/multicast/sender.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/nonblocking/third_party_lib.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_1.cpp64
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_2.cpp162
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_3.cpp64
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_4.cpp63
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_5.cpp64
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_6.cpp75
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_7.cpp64
-rw-r--r--3rdparty/asio/src/examples/cpp11/operations/composed_8.cpp64
-rw-r--r--3rdparty/asio/src/examples/cpp11/parallel_group/ranged_wait_for_all.cpp70
-rw-r--r--3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_all.cpp62
-rw-r--r--3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one.cpp62
-rw-r--r--3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_error.cpp62
-rw-r--r--3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_success.cpp62
-rw-r--r--3rdparty/asio/src/examples/cpp11/porthopper/client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/porthopper/client.cpp)76
-rw-r--r--3rdparty/asio/src/examples/cpp11/porthopper/protocol.hpp (renamed from 3rdparty/asio/src/examples/cpp03/porthopper/protocol.hpp)12
-rw-r--r--3rdparty/asio/src/examples/cpp11/porthopper/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/porthopper/server.cpp)34
-rw-r--r--3rdparty/asio/src/examples/cpp11/serialization/client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/serialization/client.cpp)8
-rw-r--r--3rdparty/asio/src/examples/cpp11/serialization/connection.hpp (renamed from 3rdparty/asio/src/examples/cpp03/serialization/connection.hpp)60
-rw-r--r--3rdparty/asio/src/examples/cpp11/serialization/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/serialization/server.cpp)17
-rw-r--r--3rdparty/asio/src/examples/cpp11/serialization/stock.hpp (renamed from 3rdparty/asio/src/examples/cpp03/serialization/stock.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/services/basic_logger.hpp (renamed from 3rdparty/asio/src/examples/cpp03/services/basic_logger.hpp)7
-rw-r--r--3rdparty/asio/src/examples/cpp11/services/daytime_client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/services/daytime_client.cpp)10
-rw-r--r--3rdparty/asio/src/examples/cpp11/services/logger.hpp (renamed from 3rdparty/asio/src/examples/cpp03/services/logger.hpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/services/logger_service.cpp (renamed from 3rdparty/asio/src/examples/cpp03/services/logger_service.cpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/services/logger_service.hpp (renamed from 3rdparty/asio/src/examples/cpp03/services/logger_service.hpp)42
-rw-r--r--3rdparty/asio/src/examples/cpp11/socks4/socks4.hpp4
-rw-r--r--3rdparty/asio/src/examples/cpp11/socks4/sync_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/spawn/echo_server.cpp20
-rw-r--r--3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp6
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/README (renamed from 3rdparty/asio/src/examples/cpp03/ssl/README)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/ca.pem50
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/dh4096.pem25
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/server.cpp4
-rw-r--r--3rdparty/asio/src/examples/cpp11/ssl/server.pem99
-rw-r--r--3rdparty/asio/src/examples/cpp11/timeouts/async_tcp_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/timeouts/blocking_tcp_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/timeouts/blocking_token_tcp_client.cpp79
-rw-r--r--3rdparty/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/timeouts/server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/timers/time_t_timer.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime1/client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime1/client.cpp)10
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime2/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime2/server.cpp)4
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime3/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime3/server.cpp)19
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime4/client.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime4/client.cpp)8
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime5/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime5/server.cpp)8
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime6/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime6/server.cpp)22
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/daytime7/server.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/daytime7/server.cpp)31
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/timer1/timer.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/timer1/timer.cpp)2
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/timer2/timer.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/timer2/timer.cpp)4
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/timer3/timer.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/timer3/timer.cpp)10
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/timer4/timer.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/timer4/timer.cpp)8
-rw-r--r--3rdparty/asio/src/examples/cpp11/tutorial/timer5/timer.cpp (renamed from 3rdparty/asio/src/examples/cpp03/tutorial/timer5/timer.cpp)15
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/line_reader.hpp48
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/main.cpp60
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/sleep.cpp22
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/sleep.hpp35
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.cpp44
-rw-r--r--3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.hpp30
-rw-r--r--3rdparty/asio/src/examples/cpp11/windows/transmit_file.cpp (renamed from 3rdparty/asio/src/examples/cpp03/windows/transmit_file.cpp)25
-rw-r--r--3rdparty/asio/src/examples/cpp14/Makefile.am7
-rw-r--r--3rdparty/asio/src/examples/cpp14/Makefile.in82
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_1.cpp5
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_2.cpp5
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_3.cpp5
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_4.cpp5
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_5.cpp5
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_6.cpp8
-rw-r--r--3rdparty/asio/src/examples/cpp14/deferred/deferred_7.cpp8
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/async_1.cpp6
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/async_2.cpp6
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/bank_account_1.cpp9
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/bank_account_2.cpp13
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/fork_join.cpp7
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/pipeline.cpp10
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/priority_scheduler.cpp20
-rw-r--r--3rdparty/asio/src/examples/cpp14/iostreams/http_client.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/c_callback_wrapper.cpp230
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/callback_wrapper.cpp152
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_1.cpp56
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_2.cpp146
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_3.cpp54
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_4.cpp53
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_5.cpp54
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_6.cpp64
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_7.cpp56
-rw-r--r--3rdparty/asio/src/examples/cpp14/operations/composed_8.cpp56
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp5
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/ranged_wait_for_all.cpp70
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_all.cpp8
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one.cpp8
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_error.cpp8
-rw-r--r--3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_success.cpp8
-rw-r--r--3rdparty/asio/src/examples/cpp17/Makefile.in15
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/chat_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_single_default.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_tuple_default.cpp6
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_default.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/range_based_for.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp17/coroutines_ts/refactored_echo_server.cpp2
-rw-r--r--3rdparty/asio/src/examples/cpp20/Makefile.am79
-rw-r--r--3rdparty/asio/src/examples/cpp20/Makefile.in1173
-rw-r--r--3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp182
-rw-r--r--3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp192
-rw-r--r--3rdparty/asio/src/examples/cpp20/channels/throttling_proxy.cpp135
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/chat_server.cpp222
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server.cpp76
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_single_default.cpp71
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_tuple_default.cpp71
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_default.cpp73
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred.cpp72
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred_default.cpp74
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/refactored_echo_server.cpp80
-rw-r--r--3rdparty/asio/src/examples/cpp20/coroutines/timeout.cpp66
-rw-r--r--3rdparty/asio/src/examples/cpp20/invocation/completion_executor.cpp83
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/c_callback_wrapper.cpp232
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/callback_wrapper.cpp154
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_1.cpp157
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_2.cpp225
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_3.cpp232
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_4.cpp247
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_5.cpp284
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_6.cpp345
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_7.cpp262
-rw-r--r--3rdparty/asio/src/examples/cpp20/operations/composed_8.cpp255
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/line_reader.hpp39
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/main.cpp35
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/sleep.cpp22
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/sleep.hpp32
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.cpp44
-rw-r--r--3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.hpp30
-rw-r--r--3rdparty/asio/src/tests/Makefile.am162
-rw-r--r--3rdparty/asio/src/tests/Makefile.in1679
-rw-r--r--3rdparty/asio/src/tests/latency/allocator.hpp2
-rw-r--r--3rdparty/asio/src/tests/latency/high_res_clock.hpp2
-rw-r--r--3rdparty/asio/src/tests/latency/tcp_client.cpp2
-rw-r--r--3rdparty/asio/src/tests/latency/tcp_server.cpp2
-rw-r--r--3rdparty/asio/src/tests/latency/udp_client.cpp2
-rw-r--r--3rdparty/asio/src/tests/latency/udp_server.cpp2
-rw-r--r--3rdparty/asio/src/tests/performance/client.cpp2
-rw-r--r--3rdparty/asio/src/tests/performance/handler_allocator.hpp2
-rw-r--r--3rdparty/asio/src/tests/performance/server.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/Makefile.in18
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_prefer_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_query_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_concept_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/can_require_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/prefer_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/query_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/query_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/query_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_concept_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_concept_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_concept_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp03/require_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_prefer_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_query_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_concept_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/can_require_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/prefer_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/query_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/query_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/query_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_concept_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_concept_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_concept_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp11/require_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_prefer_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_query_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_concept_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/can_require_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_free_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_free_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_member_prefer.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_member_require.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/prefer_unsupported.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/query_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/query_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/query_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_concept_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_concept_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_concept_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_free.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_member.cpp2
-rw-r--r--3rdparty/asio/src/tests/properties/cpp14/require_static.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/any_completion_executor.cpp463
-rw-r--r--3rdparty/asio/src/tests/unit/any_completion_handler.cpp260
-rw-r--r--3rdparty/asio/src/tests/unit/any_io_executor.cpp515
-rw-r--r--3rdparty/asio/src/tests/unit/append.cpp58
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/async_ops.hpp132
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/async_result.hpp82
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/gettable_socket_option.hpp2
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/io_control_command.hpp2
-rw-r--r--3rdparty/asio/src/tests/unit/archetypes/settable_socket_option.hpp2
-rw-r--r--3rdparty/asio/src/tests/unit/as_tuple.cpp122
-rw-r--r--3rdparty/asio/src/tests/unit/associated_allocator.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/associated_cancellation_slot.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/associated_executor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/associated_immediate_executor.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/associator.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/async_result.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/awaitable.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_datagram_socket.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_deadline_timer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_file.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/basic_random_access_file.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/basic_raw_socket.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_readable_pipe.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/basic_seq_packet_socket.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_serial_port.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_signal_set.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_socket.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_socket_acceptor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_stream_file.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/basic_stream_socket.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_streambuf.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_waitable_timer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/basic_writable_pipe.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/bind_allocator.cpp237
-rw-r--r--3rdparty/asio/src/tests/unit/bind_cancellation_slot.cpp133
-rw-r--r--3rdparty/asio/src/tests/unit/bind_executor.cpp123
-rw-r--r--3rdparty/asio/src/tests/unit/bind_immediate_executor.cpp199
-rw-r--r--3rdparty/asio/src/tests/unit/buffer.cpp133
-rw-r--r--3rdparty/asio/src/tests/unit/buffer_registration.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/buffered_read_stream.cpp15
-rw-r--r--3rdparty/asio/src/tests/unit/buffered_stream.cpp15
-rw-r--r--3rdparty/asio/src/tests/unit/buffered_write_stream.cpp15
-rw-r--r--3rdparty/asio/src/tests/unit/buffers_iterator.cpp17
-rw-r--r--3rdparty/asio/src/tests/unit/cancellation_signal.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/cancellation_state.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/cancellation_type.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/co_spawn.cpp110
-rw-r--r--3rdparty/asio/src/tests/unit/completion_condition.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/compose.cpp44
-rw-r--r--3rdparty/asio/src/tests/unit/connect.cpp14
-rw-r--r--3rdparty/asio/src/tests/unit/connect_pipe.cpp154
-rw-r--r--3rdparty/asio/src/tests/unit/consign.cpp56
-rw-r--r--3rdparty/asio/src/tests/unit/coroutine.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/deadline_timer.cpp14
-rw-r--r--3rdparty/asio/src/tests/unit/defer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/deferred.cpp (renamed from 3rdparty/asio/src/tests/unit/experimental/deferred.cpp)10
-rw-r--r--3rdparty/asio/src/tests/unit/detached.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/dispatch.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/error.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/execution/any_executor.cpp428
-rw-r--r--3rdparty/asio/src/tests/unit/execution/blocking.cpp151
-rw-r--r--3rdparty/asio/src/tests/unit/execution/blocking_adaptation.cpp194
-rw-r--r--3rdparty/asio/src/tests/unit/execution/bulk_execute.cpp320
-rw-r--r--3rdparty/asio/src/tests/unit/execution/bulk_guarantee.cpp1978
-rw-r--r--3rdparty/asio/src/tests/unit/execution/connect.cpp481
-rw-r--r--3rdparty/asio/src/tests/unit/execution/context_as.cpp14
-rw-r--r--3rdparty/asio/src/tests/unit/execution/execute.cpp388
-rw-r--r--3rdparty/asio/src/tests/unit/execution/executor.cpp98
-rw-r--r--3rdparty/asio/src/tests/unit/execution/invocable_archetype.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/execution/mapping.cpp151
-rw-r--r--3rdparty/asio/src/tests/unit/execution/operation_state.cpp104
-rw-r--r--3rdparty/asio/src/tests/unit/execution/outstanding_work.cpp146
-rw-r--r--3rdparty/asio/src/tests/unit/execution/prefer_only.cpp94
-rw-r--r--3rdparty/asio/src/tests/unit/execution/receiver.cpp549
-rw-r--r--3rdparty/asio/src/tests/unit/execution/relationship.cpp146
-rw-r--r--3rdparty/asio/src/tests/unit/execution/schedule.cpp490
-rw-r--r--3rdparty/asio/src/tests/unit/execution/scheduler.cpp99
-rw-r--r--3rdparty/asio/src/tests/unit/execution/sender.cpp231
-rw-r--r--3rdparty/asio/src/tests/unit/execution/set_done.cpp228
-rw-r--r--3rdparty/asio/src/tests/unit/execution/set_error.cpp244
-rw-r--r--3rdparty/asio/src/tests/unit/execution/set_value.cpp820
-rw-r--r--3rdparty/asio/src/tests/unit/execution/start.cpp228
-rw-r--r--3rdparty/asio/src/tests/unit/execution/submit.cpp546
-rw-r--r--3rdparty/asio/src/tests/unit/execution_context.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/executor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/executor_work_guard.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/awaitable_operators.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/basic_channel.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/basic_concurrent_channel.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/channel.cpp888
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/channel_traits.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/co_composed.cpp518
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/concurrent_channel.cpp165
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/allocator.cpp113
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/cancel.cpp39
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/co_spawn.cpp67
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/exception.cpp6
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/executor.cpp116
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/partial.cpp6
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/simple_test.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/stack_test.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/coro/use_coro.cpp6
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/parallel_group.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/experimental/promise.cpp326
-rw-r--r--3rdparty/asio/src/tests/unit/file_base.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/generic/basic_endpoint.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/generic/datagram_protocol.cpp41
-rw-r--r--3rdparty/asio/src/tests/unit/generic/raw_protocol.cpp42
-rw-r--r--3rdparty/asio/src/tests/unit/generic/seq_packet_protocol.cpp19
-rw-r--r--3rdparty/asio/src/tests/unit/generic/stream_protocol.cpp27
-rw-r--r--3rdparty/asio/src/tests/unit/high_resolution_timer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/io_context.cpp103
-rw-r--r--3rdparty/asio/src/tests/unit/io_context_strand.cpp15
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address.cpp6
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v4.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v4_iterator.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v4_range.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v6.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v6_iterator.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/address_v6_range.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/basic_endpoint.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/basic_resolver.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/basic_resolver_entry.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/basic_resolver_iterator.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/basic_resolver_query.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/host_name.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/ip/icmp.cpp67
-rw-r--r--3rdparty/asio/src/tests/unit/ip/multicast.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/ip/network_v4.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/ip/network_v6.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/ip/resolver_query_base.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ip/tcp.cpp111
-rw-r--r--3rdparty/asio/src/tests/unit/ip/udp.cpp81
-rw-r--r--3rdparty/asio/src/tests/unit/ip/unicast.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/ip/v6_only.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/is_read_buffered.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/is_write_buffered.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/local/basic_endpoint.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/local/connect_pair.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/local/seq_packet_protocol.cpp209
-rw-r--r--3rdparty/asio/src/tests/unit/local/stream_protocol.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/packaged_task.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/placeholders.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/posix/basic_descriptor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/posix/basic_stream_descriptor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/posix/descriptor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/posix/descriptor_base.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/posix/stream_descriptor.cpp23
-rw-r--r--3rdparty/asio/src/tests/unit/post.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/prepend.cpp58
-rw-r--r--3rdparty/asio/src/tests/unit/random_access_file.cpp171
-rw-r--r--3rdparty/asio/src/tests/unit/read.cpp76
-rw-r--r--3rdparty/asio/src/tests/unit/read_at.cpp68
-rw-r--r--3rdparty/asio/src/tests/unit/read_until.cpp37
-rw-r--r--3rdparty/asio/src/tests/unit/readable_pipe.cpp131
-rw-r--r--3rdparty/asio/src/tests/unit/recycling_allocator.cpp80
-rw-r--r--3rdparty/asio/src/tests/unit/redirect_error.cpp100
-rw-r--r--3rdparty/asio/src/tests/unit/registered_buffer.cpp111
-rw-r--r--3rdparty/asio/src/tests/unit/serial_port.cpp20
-rw-r--r--3rdparty/asio/src/tests/unit/serial_port_base.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/signal_set.cpp7
-rw-r--r--3rdparty/asio/src/tests/unit/signal_set_base.cpp30
-rw-r--r--3rdparty/asio/src/tests/unit/socket_base.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/context.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/context_base.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/error.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/host_name_verification.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/rfc2818_verification.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/stream.cpp8
-rw-r--r--3rdparty/asio/src/tests/unit/ssl/stream_base.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/static_thread_pool.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/steady_timer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/strand.cpp94
-rw-r--r--3rdparty/asio/src/tests/unit/stream_file.cpp173
-rw-r--r--3rdparty/asio/src/tests/unit/streambuf.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/system_context.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/system_executor.cpp93
-rw-r--r--3rdparty/asio/src/tests/unit/system_timer.cpp39
-rw-r--r--3rdparty/asio/src/tests/unit/this_coro.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/thread.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/thread_pool.cpp315
-rw-r--r--3rdparty/asio/src/tests/unit/time_traits.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ts/buffer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ts/executor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ts/internet.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ts/io_context.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ts/net.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ts/netfwd.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ts/socket.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/ts/timer.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/unit_test.hpp2
-rw-r--r--3rdparty/asio/src/tests/unit/use_awaitable.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/use_future.cpp8
-rw-r--r--3rdparty/asio/src/tests/unit/uses_executor.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/wait_traits.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_overlapped_handle.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/windows/object_handle.cpp16
-rw-r--r--3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp4
-rw-r--r--3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/windows/stream_handle.cpp25
-rw-r--r--3rdparty/asio/src/tests/unit/writable_pipe.cpp136
-rw-r--r--3rdparty/asio/src/tests/unit/write.cpp84
-rw-r--r--3rdparty/asio/src/tests/unit/write_at.cpp76
-rwxr-xr-x3rdparty/asio/src/tools/handlerlive.pl2
-rwxr-xr-x3rdparty/asio/src/tools/handlertree.pl2
-rwxr-xr-x3rdparty/asio/src/tools/handlerviz.pl2
-rwxr-xr-x3rdparty/asio/test-driver38
1403 files changed, 71490 insertions, 58793 deletions
diff --git a/3rdparty/asio/COPYING b/3rdparty/asio/COPYING
index 532cec6c8f9..da1a2db4d7b 100644
--- a/3rdparty/asio/COPYING
+++ b/3rdparty/asio/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+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)
diff --git a/3rdparty/asio/Makefile.am b/3rdparty/asio/Makefile.am
index 0acdc02d9a1..bc4f75b3553 100644
--- a/3rdparty/asio/Makefile.am
+++ b/3rdparty/asio/Makefile.am
@@ -1,5 +1,8 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2 dist-zip
+pkgconfig_DATA = asio.pc
+pkgconfigdir = $(libdir)/pkgconfig
+
SUBDIRS = include src
MAINTAINERCLEANFILES = \
diff --git a/3rdparty/asio/Makefile.in b/3rdparty/asio/Makefile.in
index 6d79b0ec1d4..e3f325123c4 100644
--- a/3rdparty/asio/Makefile.in
+++ b/3rdparty/asio/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,6 +13,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
+
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
@@ -97,7 +98,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = asio.pc
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -126,6 +127,35 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
+DATA = $(pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
@@ -151,12 +181,10 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
-am__DIST_COMMON = $(srcdir)/Makefile.in COPYING INSTALL README compile \
- config.guess config.sub depcomp install-sh missing
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/asio.pc.in COPYING \
+ INSTALL README compile config.guess config.sub depcomp \
+ install-sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -195,6 +223,8 @@ am__relativize = \
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip
GZIP_ENV = --best
DIST_TARGETS = dist-bzip2 dist-gzip dist-zip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -210,8 +240,9 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CXX = @CXX@
-CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -220,9 +251,8 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
-EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
-GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -289,9 +319,11 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgconfigdir = $(libdir)/pkgconfig
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -301,6 +333,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign dist-bzip2 dist-zip
+pkgconfig_DATA = asio.pc
SUBDIRS = include src
MAINTAINERCLEANFILES = \
$(srcdir)/aclocal.m4 \
@@ -354,6 +387,29 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
+asio.pc: $(top_builddir)/config.status $(srcdir)/asio.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
@@ -460,7 +516,6 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
-
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -543,6 +598,10 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
+dist-zstd: distdir
+ tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+ $(am__post_remove_distdir)
+
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@@ -584,6 +643,8 @@ distcheck: dist
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
+ *.tar.zst*) \
+ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
@@ -599,7 +660,7 @@ distcheck: dist
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
@@ -652,9 +713,12 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-recursive
-all-am: Makefile
+all-am: Makefile $(DATA)
installdirs: installdirs-recursive
installdirs-am:
+ for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
@@ -707,7 +771,7 @@ info: info-recursive
info-am:
-install-data-am:
+install-data-am: install-pkgconfigDATA
install-dvi: install-dvi-recursive
@@ -753,7 +817,7 @@ ps: ps-recursive
ps-am:
-uninstall-am:
+uninstall-am: uninstall-pkgconfigDATA
.MAKE: $(am__recursive_targets) install-am install-strip
@@ -761,16 +825,17 @@ uninstall-am:
am--refresh check check-am clean clean-cscope clean-generic \
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
- distcheck distclean distclean-generic distclean-tags \
+ dist-zstd distcheck distclean distclean-generic distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-am uninstall uninstall-am
+ install-pkgconfigDATA install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am uninstall-pkgconfigDATA
.PRECIOUS: Makefile
diff --git a/3rdparty/asio/README b/3rdparty/asio/README
index a5aa5cb4cf1..7c7d49dd49e 100644
--- a/3rdparty/asio/README
+++ b/3rdparty/asio/README
@@ -1,4 +1,4 @@
-asio version 1.20.0
-Released Saturday, 16 October 2021.
+asio version 1.30.2
+Released Tuesday, 16 April 2024.
See doc/index.html for API documentation and a tutorial.
diff --git a/3rdparty/asio/aclocal.m4 b/3rdparty/asio/aclocal.m4
index a49964a8b44..00ffbd53c14 100644
--- a/3rdparty/asio/aclocal.m4
+++ b/3rdparty/asio/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,13 +14,289 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
-[m4_warning([this file was generated for autoconf 2.69.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
+[m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
+
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $2])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
+
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -35,7 +311,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.16.1], [],
+m4_if([$1], [1.16.5], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,14 +327,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.1])dnl
+[AM_AUTOMAKE_VERSION([1.16.5])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -110,7 +386,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -141,7 +417,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -332,7 +608,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -371,7 +647,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
done
if test $am_rc -ne 0; then
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
- for automatic dependency tracking. Try re-running configure with the
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE="gmake" (or whatever is
+ necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).])
fi
@@ -398,7 +676,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -426,6 +704,10 @@ m4_defn([AC_PROG_CC])
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.65])dnl
+m4_ifdef([_$0_ALREADY_INIT],
+ [m4_fatal([$0 expanded multiple times
+]m4_defn([_$0_ALREADY_INIT]))],
+ [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -462,7 +744,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(
- m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
[ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
@@ -514,6 +796,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+AC_SUBST([CTAGS])
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+AC_SUBST([CSCOPE])
+
AC_REQUIRE([AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
@@ -595,7 +891,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -616,7 +912,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 2003-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -638,7 +934,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -673,7 +969,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -716,7 +1012,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -737,12 +1033,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
@@ -755,7 +1046,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -784,7 +1075,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -831,7 +1122,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -850,7 +1141,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -931,7 +1222,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -991,7 +1282,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1019,7 +1310,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# Copyright (C) 2006-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1038,7 +1329,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2018 Free Software Foundation, Inc.
+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/3rdparty/asio/asio.pc.in b/3rdparty/asio/asio.pc.in
new file mode 100644
index 00000000000..b93eb673dac
--- /dev/null
+++ b/3rdparty/asio/asio.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: A cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach.
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Lflags:
+Requires:
+Requires.private:
diff --git a/3rdparty/asio/compile b/3rdparty/asio/compile
index 531136b068e..df363c8fbfb 100755
--- a/3rdparty/asio/compile
+++ b/3rdparty/asio/compile
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -53,7 +53,7 @@ func_file_conv ()
MINGW*)
file_conv=mingw
;;
- CYGWIN*)
+ CYGWIN* | MSYS*)
file_conv=cygwin
;;
*)
@@ -67,7 +67,7 @@ func_file_conv ()
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
- cygwin/*)
+ cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
@@ -255,7 +255,8 @@ EOF
echo "compile $scriptversion"
exit $?
;;
- cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
@@ -339,9 +340,9 @@ exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/3rdparty/asio/config.guess b/3rdparty/asio/config.guess
index 9afd6762064..e81d3ae7c21 100755
--- a/3rdparty/asio/config.guess
+++ b/3rdparty/asio/config.guess
@@ -1,8 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2021 Free Software Foundation, Inc.
-timestamp='2013-11-29'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2021-06-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +17,7 @@ timestamp='2013-11-29'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -24,12 +26,20 @@ timestamp='2013-11-29'
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
#
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -39,7 +49,7 @@ Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -50,7 +60,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -84,7 +94,8 @@ if test $# != 0; then
exit 1
fi
-trap 'exit 1' 1 2 15
+# Just in case it came from the environment.
+GUESS=
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
@@ -96,66 +107,90 @@ trap 'exit 1' 1 2 15
# Portable tmp directory creation inspired by the Autoconf team.
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+ # prevent multiple calls if $tmp is already set
+ test "$tmp" && return 0
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039,SC3028
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD=$driver
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+if test -f /.attbin/uname ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-case "${UNAME_SYSTEM}" in
+case $UNAME_SYSTEM in
Linux|GNU|GNU/*)
- # If the system lacks a compiler, then just pick glibc.
- # We could probably try harder.
- LIBC=gnu
+ LIBC=unknown
- eval $set_cc_for_build
- cat <<-EOF > $dummy.c
+ set_cc_for_build
+ cat <<-EOF > "$dummy.c"
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
- #else
+ #elif defined(__GLIBC__)
LIBC=gnu
+ #else
+ #include <stdarg.h>
+ /* First heuristic to detect musl libc. */
+ #ifdef __DEFINED_va_list
+ LIBC=musl
+ #endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ eval "$cc_set_libc"
+
+ # Second heuristic to detect musl libc.
+ if [ "$LIBC" = unknown ] &&
+ command -v ldd >/dev/null &&
+ ldd --version 2>&1 | grep -q ^musl; then
+ LIBC=musl
+ fi
+
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ if [ "$LIBC" = unknown ]; then
+ LIBC=gnu
+ fi
;;
esac
# Note: order is significant - the case branches are not exclusive.
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -167,22 +202,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
#
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ echo unknown)`
+ case $UNAME_MACHINE_ARCH in
+ aarch64eb) machine=aarch64_be-unknown ;;
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
+ *) machine=$UNAME_MACHINE_ARCH-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
+ # to ELF recently (or will in the future) and ABI.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ os=netbsdelf
+ ;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
+ set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
@@ -197,45 +242,80 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
os=netbsd
;;
esac
+ # Determine ABI tags.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+ ;;
+ esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
+ case $UNAME_VERSION in
Debian*)
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
+ GUESS=$machine-${os}${release}${abi-}
+ ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
- exit ;;
+ GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+ ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
+ GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+ ;;
+ *:SecBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+ ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+ ;;
+ *:MidnightBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+ ;;
*:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+ ;;
*:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+ ;;
+ *:OS108:*:*)
+ GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+ ;;
macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
+ GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+ ;;
*:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+ ;;
+ *:Sortix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-sortix
+ ;;
+ *:Twizzler:*:*)
+ GUESS=$UNAME_MACHINE-unknown-twizzler
+ ;;
+ *:Redox:*:*)
+ GUESS=$UNAME_MACHINE-unknown-redox
+ ;;
+ mips:OSF1:*.*)
+ GUESS=mips-dec-osf1
+ ;;
alpha:OSF1:*:*)
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ trap '' 0
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -249,163 +329,158 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
+ case $ALPHA_CPU_TYPE in
"EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
+ UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
+ UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
+ UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
+ UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
+ UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
+ UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
+ UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
+ UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
+ UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
- exitcode=$?
- trap '' 0
- exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
+ OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+ ;;
Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
+ GUESS=m68k-unknown-sysv4
+ ;;
*:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-amigaos
+ ;;
*:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-morphos
+ ;;
*:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
+ GUESS=i370-ibm-openedition
+ ;;
*:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
+ GUESS=s390-ibm-zvmoe
+ ;;
*:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
+ GUESS=powerpc-ibm-os400
+ ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
+ GUESS=arm-acorn-riscix$UNAME_RELEASE
+ ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
+ GUESS=arm-unknown-riscos
+ ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
+ GUESS=hppa1.1-hitachi-hiuxmpp
+ ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
+ case `(/bin/universe) 2>/dev/null` in
+ att) GUESS=pyramid-pyramid-sysv3 ;;
+ *) GUESS=pyramid-pyramid-bsd ;;
+ esac
+ ;;
NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
+ GUESS=pyramid-pyramid-svr4
+ ;;
DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
+ GUESS=sparc-icl-nx6
+ ;;
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
+ sparc) GUESS=sparc-icl-nx7 ;;
+ esac
+ ;;
s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+ ;;
sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-hal-solaris2$SUN_REL
+ ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris2$SUN_REL
+ ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
- exit ;;
+ GUESS=i386-pc-auroraux$UNAME_RELEASE
+ ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
+ set_cc_for_build
+ SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
- SUN_ARCH="x86_64"
+ SUN_ARCH=x86_64
fi
fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+ ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris3$SUN_REL
+ ;;
sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
+ case `/usr/bin/arch -k` in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+ GUESS=sparc-sun-sunos$SUN_REL
+ ;;
sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
+ ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+ case `/bin/arch` in
sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
;;
sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
+ GUESS=sparc-sun-sunos$UNAME_RELEASE
;;
esac
- exit ;;
+ ;;
aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
+ GUESS=sparc-auspex-sunos$UNAME_RELEASE
+ ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -415,44 +490,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
+ GUESS=m68k-milan-mint$UNAME_RELEASE
+ ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
+ GUESS=m68k-hades-mint$UNAME_RELEASE
+ ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
+ GUESS=m68k-unknown-mint$UNAME_RELEASE
+ ;;
m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
+ GUESS=m68k-apple-machten$UNAME_RELEASE
+ ;;
powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
+ GUESS=powerpc-apple-machten$UNAME_RELEASE
+ ;;
RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
+ GUESS=mips-dec-mach_bsd4.3
+ ;;
RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
+ GUESS=mips-dec-ultrix$UNAME_RELEASE
+ ;;
VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
+ GUESS=vax-dec-ultrix$UNAME_RELEASE
+ ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
+ GUESS=clipper-intergraph-clix$UNAME_RELEASE
+ ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
@@ -461,95 +536,96 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
{ echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
+ GUESS=mips-mips-riscos$UNAME_RELEASE
+ ;;
Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
+ GUESS=powerpc-motorola-powermax
+ ;;
Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
+ GUESS=powerpc-harris-powermax
+ ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
+ GUESS=powerpc-harris-powermax
+ ;;
Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
+ GUESS=powerpc-harris-powerunix
+ ;;
m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
+ GUESS=m88k-harris-cxux7
+ ;;
m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
+ GUESS=m88k-motorola-sysv4
+ ;;
m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
+ GUESS=m88k-motorola-sysv3
+ ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
+ if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+ test "$TARGET_BINARY_INTERFACE"x = x
then
- echo m88k-dg-dgux${UNAME_RELEASE}
+ GUESS=m88k-dg-dgux$UNAME_RELEASE
else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
fi
else
- echo i586-dg-dgux${UNAME_RELEASE}
+ GUESS=i586-dg-dgux$UNAME_RELEASE
fi
- exit ;;
+ ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
+ GUESS=m88k-dolphin-sysv3
+ ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
+ GUESS=m88k-motorola-sysv3
+ ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
+ GUESS=m88k-tektronix-sysv3
+ ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
+ GUESS=m68k-tektronix-bsd
+ ;;
*:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
+ IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+ GUESS=mips-sgi-irix$IRIX_REL
+ ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
+ GUESS=i386-ibm-aix
+ ;;
ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
+ if test -x /usr/bin/oslevel ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
+ GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+ ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
main()
@@ -560,76 +636,77 @@ EOF
exit(0);
}
EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
then
- echo "$SYSTEM_NAME"
+ GUESS=$SYSTEM_NAME
else
- echo rs6000-ibm-aix3.2.5
+ GUESS=rs6000-ibm-aix3.2.5
fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
+ GUESS=rs6000-ibm-aix3.2.4
else
- echo rs6000-ibm-aix3.2
+ GUESS=rs6000-ibm-aix3.2
fi
- exit ;;
+ ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if test -x /usr/bin/lslpp ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
+ GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+ ;;
*:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
+ GUESS=rs6000-ibm-aix
+ ;;
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+ GUESS=romp-ibm-bsd4.4
+ ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
+ GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
+ ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
+ GUESS=rs6000-bull-bosx
+ ;;
DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
+ GUESS=m68k-bull-sysv3
+ ;;
9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
+ GUESS=m68k-hp-bsd
+ ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
+ GUESS=m68k-hp-bsd4.4
+ ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ case $UNAME_MACHINE in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
+ if test -x /usr/bin/getconf; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ case $sc_cpu_version in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ case $sc_kernel_bits in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ if test "$HP_ARCH" = ""; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -662,13 +739,13 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
+ if test "$HP_ARCH" = hppa2.0w
then
- eval $set_cc_for_build
+ set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -679,23 +756,23 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
- HP_ARCH="hppa2.0w"
+ HP_ARCH=hppa2.0w
else
- HP_ARCH="hppa64"
+ HP_ARCH=hppa64
fi
fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
+ GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+ ;;
ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ GUESS=ia64-hp-hpux$HPUX_REV
+ ;;
3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
int
main ()
@@ -720,38 +797,38 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
{ echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
+ GUESS=unknown-hitachi-hiuxwe2
+ ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+ GUESS=hppa1.1-hp-bsd
+ ;;
9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
+ GUESS=hppa1.0-hp-bsd
+ ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
+ GUESS=hppa1.0-hp-mpeix
+ ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+ GUESS=hppa1.1-hp-osf
+ ;;
hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
+ GUESS=hppa1.0-hp-osf
+ ;;
i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
+ if test -x /usr/sbin/sysversion ; then
+ GUESS=$UNAME_MACHINE-unknown-osf1mk
else
- echo ${UNAME_MACHINE}-unknown-osf1
+ GUESS=$UNAME_MACHINE-unknown-osf1
fi
- exit ;;
+ ;;
parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
+ GUESS=hppa1.1-hp-lites
+ ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
+ GUESS=c1-convex-bsd
+ ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
@@ -759,139 +836,145 @@ EOF
fi
exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
+ GUESS=c34-convex-bsd
+ ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
+ GUESS=c38-convex-bsd
+ ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
+ GUESS=c4-convex-bsd
+ ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=ymp-cray-unicos$CRAY_REL
+ ;;
CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=t90-cray-unicos$CRAY_REL
+ ;;
CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=alphaev5-cray-unicosmk$CRAY_REL
+ ;;
CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=sv1-cray-unicos$CRAY_REL
+ ;;
*:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=craynv-cray-unicosmp$CRAY_REL
+ ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+ GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
+ GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+ ;;
sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
+ GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+ ;;
*:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+ ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+ else
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+ fi
+ ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
+ case $UNAME_PROCESSOR in
amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
esac
- exit ;;
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+ ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
+ GUESS=$UNAME_MACHINE-pc-cygwin
+ ;;
*:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
- exit ;;
+ GUESS=$UNAME_MACHINE-pc-mingw64
+ ;;
*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
+ GUESS=$UNAME_MACHINE-pc-mingw32
+ ;;
+ *:MSYS*:*)
+ GUESS=$UNAME_MACHINE-pc-msys
+ ;;
i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
+ GUESS=$UNAME_MACHINE-pc-pw32
+ ;;
*:Interix*:*)
- case ${UNAME_MACHINE} in
+ case $UNAME_MACHINE in
x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
+ GUESS=i586-pc-interix$UNAME_RELEASE
+ ;;
authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
+ GUESS=x86_64-unknown-interix$UNAME_RELEASE
+ ;;
IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
+ GUESS=ia64-unknown-interix$UNAME_RELEASE
+ ;;
esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
+ GUESS=$UNAME_MACHINE-pc-uwin
+ ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
+ GUESS=x86_64-pc-cygwin
+ ;;
prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=powerpcle-unknown-solaris2$SUN_REL
+ ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
+ GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+ GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+ ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
+ GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+ ;;
+ *:Minix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-minix
+ ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
@@ -901,172 +984,226 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- arc:Linux:*:* | arceb:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
arm*:Linux:*:*)
- eval $set_cc_for_build
+ set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
fi
fi
- exit ;;
+ ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
+ e2k:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
i*86:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+ ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ k1om:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ IS_GLIBC=0
+ test x"${LIBC}" = xgnu && IS_GLIBC=1
+ sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
+ #undef mips
+ #undef mipsel
+ #undef mips64
+ #undef mips64el
+ #if ${IS_GLIBC} && defined(_ABI64)
+ LIBCABI=gnuabi64
+ #else
+ #if ${IS_GLIBC} && defined(_ABIN32)
+ LIBCABI=gnuabin32
+ #else
+ LIBCABI=${LIBC}
+ #endif
+ #endif
+
+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa64r6
+ #else
+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa32r6
+ #else
+ #if defined(__mips64)
+ CPU=mips64
+ #else
+ CPU=mips
+ #endif
+ #endif
+ #endif
+
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
+ MIPS_ENDIAN=el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
+ MIPS_ENDIAN=
#else
- CPU=
+ MIPS_ENDIAN=
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+ eval "$cc_set_vars"
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ openrisc*:Linux:*:*)
+ GUESS=or1k-unknown-linux-$LIBC
+ ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
- or1k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-${LIBC}
- exit ;;
+ GUESS=sparc-unknown-linux-$LIBC
+ ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-${LIBC}
- exit ;;
+ GUESS=hppa64-unknown-linux-$LIBC
+ ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
- PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
- *) echo hppa-unknown-linux-${LIBC} ;;
+ PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+ PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+ *) GUESS=hppa-unknown-linux-$LIBC ;;
esac
- exit ;;
+ ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-${LIBC}
- exit ;;
+ GUESS=powerpc64-unknown-linux-$LIBC
+ ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-${LIBC}
- exit ;;
+ GUESS=powerpc-unknown-linux-$LIBC
+ ;;
ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-${LIBC}
- exit ;;
+ GUESS=powerpc64le-unknown-linux-$LIBC
+ ;;
ppcle:Linux:*:*)
- echo powerpcle-unknown-linux-${LIBC}
- exit ;;
+ GUESS=powerpcle-unknown-linux-$LIBC
+ ;;
+ riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+ ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+ ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ set_cc_for_build
+ LIBCABI=$LIBC
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_X32 >/dev/null
+ then
+ LIBCABI=${LIBC}x32
+ fi
+ fi
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+ ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
+ GUESS=i386-sequent-sysv4
+ ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
+ GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+ ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
+ GUESS=$UNAME_MACHINE-pc-os2-emx
+ ;;
i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-stop
+ ;;
i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-atheos
+ ;;
i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
+ GUESS=$UNAME_MACHINE-pc-syllable
+ ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ GUESS=i386-unknown-lynxos$UNAME_RELEASE
+ ;;
i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+ ;;
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
fi
- exit ;;
+ ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
@@ -1074,12 +1211,12 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1089,43 +1226,43 @@ EOF
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
else
- echo ${UNAME_MACHINE}-pc-sysv32
+ GUESS=$UNAME_MACHINE-pc-sysv32
fi
- exit ;;
+ ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
+ # prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
+ GUESS=i586-pc-msdosdjgpp
+ ;;
Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
+ GUESS=i386-pc-mach3
+ ;;
paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
+ GUESS=i860-intel-osf1
+ ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
fi
- exit ;;
+ ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
- echo m68010-convergent-sysv
- exit ;;
+ GUESS=m68010-convergent-sysv
+ ;;
mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
+ GUESS=m68k-convergent-sysv
+ ;;
M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
+ GUESS=m68k-diab-dnix
+ ;;
M68*:*:R3V[5678]*:*)
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
@@ -1133,9 +1270,9 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
@@ -1144,238 +1281,281 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+ ;;
mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
+ GUESS=m68k-atari-sysv4
+ ;;
TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+ ;;
rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+ ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+ ;;
SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
+ GUESS=mips-dde-sysv$UNAME_RELEASE
+ ;;
RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
+ GUESS=mips-sni-sysv4
+ ;;
RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
+ GUESS=mips-sni-sysv4
+ ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
+ GUESS=$UNAME_MACHINE-sni-sysv4
else
- echo ns32k-sni-sysv
+ GUESS=ns32k-sni-sysv
fi
- exit ;;
+ ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
+ GUESS=i586-unisys-sysv4
+ ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
+ GUESS=hppa1.1-stratus-sysv4
+ ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
- exit ;;
+ GUESS=i860-stratus-sysv4
+ ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
+ GUESS=$UNAME_MACHINE-stratus-vos
+ ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit ;;
+ GUESS=hppa1.1-stratus-vos
+ ;;
mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
+ GUESS=m68k-apple-aux$UNAME_RELEASE
+ ;;
news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
+ GUESS=mips-sony-newsos6
+ ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ if test -d /usr/nec; then
+ GUESS=mips-nec-sysv$UNAME_RELEASE
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ GUESS=mips-unknown-sysv$UNAME_RELEASE
fi
- exit ;;
+ ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
+ GUESS=powerpc-be-beos
+ ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
+ GUESS=powerpc-apple-beos
+ ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
+ GUESS=i586-pc-beos
+ ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
+ GUESS=i586-pc-haiku
+ ;;
x86_64:Haiku:*:*)
- echo x86_64-unknown-haiku
- exit ;;
+ GUESS=x86_64-unknown-haiku
+ ;;
SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
+ GUESS=sx4-nec-superux$UNAME_RELEASE
+ ;;
SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
+ GUESS=sx5-nec-superux$UNAME_RELEASE
+ ;;
SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
+ GUESS=sx6-nec-superux$UNAME_RELEASE
+ ;;
SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
+ GUESS=sx7-nec-superux$UNAME_RELEASE
+ ;;
SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
+ GUESS=sx8-nec-superux$UNAME_RELEASE
+ ;;
SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
+ GUESS=sx8r-nec-superux$UNAME_RELEASE
+ ;;
+ SX-ACE:SUPER-UX:*:*)
+ GUESS=sxace-nec-superux$UNAME_RELEASE
+ ;;
Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
+ GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+ ;;
*:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
+ GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+ ;;
+ arm64:Darwin:*:*)
+ GUESS=aarch64-apple-darwin$UNAME_RELEASE
+ ;;
*:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval $set_cc_for_build
- if test "$UNAME_PROCESSOR" = unknown ; then
- UNAME_PROCESSOR=powerpc
+ UNAME_PROCESSOR=`uname -p`
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ if command -v xcode-select > /dev/null 2> /dev/null && \
+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
+ # Avoid executing cc if there is no toolchain installed as
+ # cc will be a stub that puts up a graphical alert
+ # prompting the user to install developer tools.
+ CC_FOR_BUILD=no_compiler_found
+ else
+ set_cc_for_build
fi
- if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
- fi
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
- # Avoid executing cc on OS X 10.9, as it ships with a stub
- # that puts up a graphical alert prompting to install
- # developer tools. Any system running Mac OS X 10.7 or
- # later (Darwin 11 and later) is required to have a 64-bit
- # processor. This is not true of the ARM version of Darwin
- # that Apple uses in portable devices.
- UNAME_PROCESSOR=x86_64
+ # uname -m returns i386 or x86_64
+ UNAME_PROCESSOR=$UNAME_MACHINE
fi
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
+ GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+ ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
+ if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
+ GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+ ;;
*:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
- exit ;;
+ GUESS=i386-pc-qnx
+ ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ GUESS=neo-tandem-nsk$UNAME_RELEASE
+ ;;
NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
+ GUESS=nse-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsr-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsv-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsx-tandem-nsk$UNAME_RELEASE
+ ;;
*:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
+ GUESS=mips-compaq-nonstopux
+ ;;
BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
+ GUESS=bs2000-siemens-sysv
+ ;;
DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
+ GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+ ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- if test "$cputype" = "386"; then
+ if test "${cputype-}" = 386; then
UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
+ elif test "x${cputype-}" != x; then
+ UNAME_MACHINE=$cputype
fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-plan9
+ ;;
*:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
+ GUESS=pdp10-unknown-tops10
+ ;;
*:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
+ GUESS=pdp10-unknown-tenex
+ ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
+ GUESS=pdp10-dec-tops20
+ ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
+ GUESS=pdp10-xkl-tops20
+ ;;
*:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
+ GUESS=pdp10-unknown-tops20
+ ;;
*:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
+ GUESS=pdp10-unknown-its
+ ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
+ GUESS=mips-sei-seiux$UNAME_RELEASE
+ ;;
*:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
+ DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+ ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
+ case $UNAME_MACHINE in
+ A*) GUESS=alpha-dec-vms ;;
+ I*) GUESS=ia64-dec-vms ;;
+ V*) GUESS=vax-dec-vms ;;
esac ;;
*:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
+ GUESS=i386-pc-xenix
+ ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
+ SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+ GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+ ;;
i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
+ GUESS=$UNAME_MACHINE-pc-rdos
+ ;;
+ *:AROS:*:*)
+ GUESS=$UNAME_MACHINE-unknown-aros
+ ;;
x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
- exit ;;
+ GUESS=$UNAME_MACHINE-unknown-esx
+ ;;
+ amd64:Isilon\ OneFS:*:*)
+ GUESS=x86_64-unknown-onefs
+ ;;
+ *:Unleashed:*:*)
+ GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+ ;;
esac
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+ echo "$GUESS"
+ exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
#endif
main ()
{
@@ -1388,22 +1568,14 @@ main ()
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
- "4"
+ "4"
#else
- ""
+ ""
#endif
- ); exit (0);
+ ); exit (0);
#endif
#endif
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
@@ -1443,39 +1615,54 @@ main ()
#endif
#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
+ struct utsname un;
+ uname(&un);
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname un;
+ uname (&un);
+ printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname *un;
+ uname (&un);
+ printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
#endif
#if defined (alliant) && defined (i860)
@@ -1486,54 +1673,46 @@ main ()
}
EOF
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
{ echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+echo "$0: unable to guess system type" >&2
-# Convex versions that predate uname can use getsysinfo(1)
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
cat >&2 <<EOF
-$0: unable to guess system type
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+ cat >&2 <<EOF
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
@@ -1552,16 +1731,17 @@ hostinfo = `(hostinfo) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
EOF
+fi
exit 1
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/3rdparty/asio/config.sub b/3rdparty/asio/config.sub
index 61cb4bc22db..d74fb6deac9 100755
--- a/3rdparty/asio/config.sub
+++ b/3rdparty/asio/config.sub
@@ -1,8 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2021 Free Software Foundation, Inc.
-timestamp='2013-10-01'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2021-08-14'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +17,7 @@ timestamp='2013-10-01'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -25,7 +27,7 @@ timestamp='2013-10-01'
# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -33,7 +35,7 @@ timestamp='2013-10-01'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -50,15 +52,21 @@ timestamp='2013-10-01'
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -68,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -90,12 +98,12 @@ while test $# -gt 0 ; do
- ) # Use stdin as input.
break ;;
-* )
- echo "$me: invalid option $1$help"
+ echo "$me: invalid option $1$help" >&2
exit 1 ;;
*local*)
# First pass through any local machine types.
- echo $1
+ echo "$1"
exit ;;
* )
@@ -111,1211 +119,1181 @@ case $# in
exit 1;;
esac
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- android-linux)
- os=-linux-android
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+IFS=$saved_IFS
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze*)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*178)
- os=-lynxos178
- ;;
- -lynx*5)
- os=-lynxos5
- ;;
- -lynx*)
- os=-lynxos
+# Separate into logical components for further validation
+case $1 in
+ *-*-*-*-*)
+ echo Invalid configuration \`"$1"\': more than four components >&2
+ exit 1
;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ basic_os=$field3-$field4
;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ basic_os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ basic_os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ basic_os=$field3
+ ;;
+ esac
;;
- -psos*)
- os=-psos
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ zephyr*)
+ basic_machine=$field1-unknown
+ basic_os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ basic_os=
+ ;;
+ *)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ esac
+ ;;
+ esac
;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ basic_os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ basic_os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ basic_os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ basic_os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ basic_os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ basic_os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ basic_os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ basic_os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ basic_os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ basic_os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ basic_os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ basic_os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ basic_os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ basic_os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ basic_os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ basic_os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ basic_os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ basic_os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ basic_os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ basic_os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ basic_os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ basic_os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ basic_os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ basic_os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ basic_os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ basic_os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ basic_os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ basic_os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ basic_os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ basic_os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ basic_os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ basic_os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ basic_os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ basic_os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ basic_os=sysv3
+ ;;
+ hp300 | hp300hpux)
+ basic_machine=m68k-hp
+ basic_os=hpux
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ basic_os=bsd
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ basic_os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ basic_os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ basic_os=mach
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ basic_os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ basic_os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ basic_os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ basic_os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ basic_os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ basic_os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ basic_os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ basic_os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ basic_os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ basic_os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ basic_os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ basic_os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ basic_os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ basic_os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ basic_os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ basic_os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ basic_os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ basic_os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ basic_os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ basic_os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ basic_os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ basic_os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ basic_os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ basic_os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ basic_os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ basic_os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ basic_os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ basic_os=linux
+ ;;
+ psp)
+ basic_machine=mipsallegrexel-sony
+ basic_os=psp
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ basic_os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ basic_os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ basic_os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ basic_os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ basic_os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ basic_os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ basic_os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ basic_os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ basic_os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ basic_os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ basic_os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ basic_os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ basic_os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ basic_os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ basic_os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ basic_os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ basic_os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ basic_os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ basic_os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ basic_os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ basic_os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ basic_os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ basic_os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ basic_os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ basic_os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ basic_os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ basic_os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ basic_os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ basic_os=vms
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ basic_os=vsta
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ basic_os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ basic_os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ basic_os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ basic_os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ basic_os=
+ ;;
+ esac
;;
esac
-# Decode aliases for certain CPU-COMPANY combinations.
+# Decode 1-component or ad-hoc basic machines
case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | aarch64 | aarch64_be \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arceb \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
- | avr | avr32 \
- | be32 | be64 \
- | bfin \
- | c4x | c8051 | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | hexagon \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | k1om \
- | le32 | le64 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nds32 | nds32le | nds32be \
- | nios | nios2 | nios2eb | nios2el \
- | ns16k | ns32k \
- | open8 \
- | or1k | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle \
- | pyramid \
- | rl78 | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu \
- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
- | ubicom32 \
- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | we32k \
- | x86 | xc16x | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
;;
-
- strongarm | thumb | xscale)
- basic_machine=arm-unknown
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
;;
- xgate)
- basic_machine=$basic_machine-unknown
- os=-none
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
;;
- xscaleeb)
- basic_machine=armeb-unknown
+ ibm*)
+ cpu=i370
+ vendor=ibm
;;
-
- xscaleel)
- basic_machine=armel-unknown
+ orion105)
+ cpu=clipper
+ vendor=highlevel
;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | aarch64-* | aarch64_be-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | be32-* | be64-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
- | c8051-* | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | k1om-* \
- | le32-* | le64-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | microblaze-* | microblazeel-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipsr5900-* | mipsr5900el-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* | nios2eb-* | nios2el-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | open8-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
- | pyramid-* \
- | rl78-* | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
- | tahoe-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile*-* \
- | tron-* \
- | ubicom32-* \
- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
- | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
;;
+
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
+ cpu=m68000
+ vendor=att
;;
3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
+ cpu=we32k
+ vendor=att
;;
bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16 | cr16-*)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
+ cpu=powerpc
+ vendor=ibm
+ basic_os=cnk
;;
decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops10
;;
decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
+ cpu=m68k
+ vendor=motorola
;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ basic_os=sysv3
;;
encore | umax | mmax)
- basic_machine=ns32k-encore
+ cpu=ns32k
+ vendor=encore
;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ basic_os=${basic_os:-bsd}
;;
fx2800)
- basic_machine=i860-alliant
+ cpu=i860
+ vendor=alliant
;;
genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
+ cpu=ns32k
+ vendor=ns
;;
h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
+ cpu=hppa1.0
+ vendor=hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
+ cpu=m68000
+ vendor=hp
;;
hp9k3[2-9][0-9])
- basic_machine=m68k-hp
+ cpu=m68k
+ vendor=hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
+ cpu=hppa1.0
+ vendor=hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
+ cpu=hppa1.0
+ vendor=hp
;;
i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv32
;;
i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv4
;;
i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv
;;
i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=solaris2
;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ basic_os=${basic_os:-unicos}
;;
iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
+ cpu=mips
+ vendor=sgi
+ case $basic_os in
+ irix*)
;;
*)
- os=-irix4
+ basic_os=irix4
;;
esac
;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- microblaze*)
- basic_machine=microblaze-xilinx
- ;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
- mingw32)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
miniframe)
- basic_machine=m68000-convergent
+ cpu=m68000
+ vendor=convergent
;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- msys)
- basic_machine=i686-pc
- os=-msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=-nacl
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ basic_os=mint
;;
news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
+ cpu=mips
+ vendor=sony
+ basic_os=newsos
+ ;;
+ next | m*-next)
+ cpu=m68k
+ vendor=next
+ case $basic_os in
+ openstep*)
+ ;;
+ nextstep*)
;;
- -ns2*)
- os=-nextstep2
+ ns2*)
+ basic_os=nextstep2
;;
*)
- os=-nextstep3
+ basic_os=nextstep3
;;
esac
;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
np1)
- basic_machine=np1-gould
- ;;
- neo-tandem)
- basic_machine=neo-tandem
- ;;
- nse-tandem)
- basic_machine=nse-tandem
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
+ cpu=np1
+ vendor=gould
;;
op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
+ cpu=hppa1.1
+ vendor=oki
+ basic_os=proelf
;;
pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
;;
pbd)
- basic_machine=sparc-tti
+ cpu=sparc
+ vendor=tti
;;
pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ cpu=m68k
+ vendor=tti
;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ pc532)
+ cpu=ns32k
+ vendor=pc532
;;
pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc | ppcbe) basic_machine=powerpc-unknown
- ;;
- ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ cpu=pn
+ vendor=gould
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ power)
+ cpu=power
+ vendor=ibm
;;
ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
+ cpu=i386
+ vendor=ibm
;;
rm[46]00)
- basic_machine=mips-siemens
+ cpu=mips
+ vendor=siemens
;;
rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
+ cpu=romp
+ vendor=ibm
;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
+ sde)
+ cpu=mipsisa32
+ vendor=sde
+ basic_os=${basic_os:-elf}
;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ basic_os=vxworks
;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
;;
- sei)
- basic_machine=mips-sei
- os=-seiux
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
;;
- sequent)
- basic_machine=i386-sequent
+ w65)
+ cpu=w65
+ vendor=wdc
;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ basic_os=proelf
;;
- sh5el)
- basic_machine=sh5le-unknown
+ none)
+ cpu=none
+ vendor=none
;;
- sh64)
- basic_machine=sh64-unknown
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
+
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+ IFS=$saved_IFS
;;
- spur)
- basic_machine=spur-unknown
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ cpu=$basic_machine
+ vendor=pc
;;
- st2000)
- basic_machine=m68k-tandem
+ # These rules are duplicated from below for sake of the special case above;
+ # i.e. things that normalized to x86 arches should also default to "pc"
+ pc98)
+ cpu=i386
+ vendor=pc
;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
+ x64 | amd64)
+ cpu=x86_64
+ vendor=pc
;;
- strongarm-* | thumb-*)
- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ # Recognize the basic CPU types without company name.
+ *)
+ cpu=$basic_machine
+ vendor=unknown
;;
- sun2)
- basic_machine=m68000-sun
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+ # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ craynv-unknown)
+ vendor=cray
+ basic_os=${basic_os:-unicosmp}
;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
+ c90-unknown | c90-cray)
+ vendor=cray
+ basic_os=${Basic_os:-unicos}
;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
+ fx80-unknown)
+ vendor=alliant
;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
+ romp-unknown)
+ vendor=ibm
;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
+ mmix-unknown)
+ vendor=knuth
;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
+ microblaze-unknown | microblazeel-unknown)
+ vendor=xilinx
;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
+ rs6000-unknown)
+ vendor=ibm
;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
+ vax-unknown)
+ vendor=dec
;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
+ pdp11-unknown)
+ vendor=dec
;;
- sun4)
- basic_machine=sparc-sun
+ we32k-unknown)
+ vendor=att
;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
+ cydra-unknown)
+ vendor=cydrome
;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
+ i370-ibm*)
+ vendor=ibm
;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
+ orion-unknown)
+ vendor=highlevel
;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
+ xps-unknown | xps100-unknown)
+ cpu=xps100
+ vendor=honeywell
;;
- t90)
- basic_machine=t90-cray
- os=-unicos
+
+ # Here we normalize CPU types with a missing or matching vendor
+ dpx20-unknown | dpx20-bull)
+ cpu=rs6000
+ vendor=bull
+ basic_os=${basic_os:-bosx}
;;
- tile*)
- basic_machine=$basic_machine-unknown
- os=-linux-gnu
+
+ # Here we normalize CPU types irrespective of the vendor
+ amd64-*)
+ cpu=x86_64
;;
- tx39)
- basic_machine=mipstx39-unknown
+ blackfin-*)
+ cpu=bfin
+ basic_os=linux
;;
- tx39el)
- basic_machine=mipstx39el-unknown
+ c54x-*)
+ cpu=tic54x
;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
+ c55x-*)
+ cpu=tic55x
;;
- tower | tower-32)
- basic_machine=m68k-ncr
+ c6x-*)
+ cpu=tic6x
;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
+ e500v[12]-*)
+ cpu=powerpc
+ basic_os=${basic_os}"spe"
;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
+ mips3*-*)
+ cpu=mips64
;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
+ ms1-*)
+ cpu=mt
;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
+ m68knommu-*)
+ cpu=m68k
+ basic_os=linux
;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+ cpu=s12z
;;
- vms)
- basic_machine=vax-dec
- os=-vms
+ openrisc-*)
+ cpu=or32
;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
+ parisc-*)
+ cpu=hppa
+ basic_os=linux
;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ cpu=i586
;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ cpu=i686
;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ cpu=i686
;;
- w65*)
- basic_machine=w65-wdc
- os=-none
+ pentium4-*)
+ cpu=i786
;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
+ pc98-*)
+ cpu=i386
;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
+ ppc-* | ppcbe-*)
+ cpu=powerpc
;;
- xps | xps100)
- basic_machine=xps100-honeywell
+ ppcle-* | powerpclittle-*)
+ cpu=powerpcle
;;
- xscale-* | xscalee[bl]-*)
- basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ppc64-*)
+ cpu=powerpc64
;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
+ ppc64le-* | powerpc64little-*)
+ cpu=powerpc64le
;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
+ sb1-*)
+ cpu=mipsisa64sb1
;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
+ sb1el-*)
+ cpu=mipsisa64sb1el
;;
- none)
- basic_machine=none-none
- os=-none
+ sh5e[lb]-*)
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
+ spur-*)
+ cpu=spur
;;
- op50n)
- basic_machine=hppa1.1-oki
+ strongarm-* | thumb-*)
+ cpu=arm
;;
- op60c)
- basic_machine=hppa1.1-oki
+ tx39-*)
+ cpu=mipstx39
;;
- romp)
- basic_machine=romp-ibm
+ tx39el-*)
+ cpu=mipstx39el
;;
- mmix)
- basic_machine=mmix-knuth
+ x64-*)
+ cpu=x86_64
;;
- rs6000)
- basic_machine=rs6000-ibm
+ xscale-* | xscalee[bl]-*)
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
- vax)
- basic_machine=vax-dec
+ arm64-*)
+ cpu=aarch64
;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
+
+ # Recognize the canonical CPU Types that limit and/or modify the
+ # company names they are paired with.
+ cr16-*)
+ basic_os=${basic_os:-elf}
;;
- pdp11)
- basic_machine=pdp11-dec
+ crisv32-* | etraxfs*-*)
+ cpu=crisv32
+ vendor=axis
;;
- we32k)
- basic_machine=we32k-att
+ cris-* | etrax*-*)
+ cpu=cris
+ vendor=axis
;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
+ crx-*)
+ basic_os=${basic_os:-elf}
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
+ neo-tandem)
+ cpu=neo
+ vendor=tandem
;;
- cydra)
- basic_machine=cydra-cydrome
+ nse-tandem)
+ cpu=nse
+ vendor=tandem
;;
- orion)
- basic_machine=orion-highlevel
+ nsr-tandem)
+ cpu=nsr
+ vendor=tandem
;;
- orion105)
- basic_machine=clipper-highlevel
+ nsv-tandem)
+ cpu=nsv
+ vendor=tandem
;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
+ nsx-tandem)
+ cpu=nsx
+ vendor=tandem
;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
+ mipsallegrexel-sony)
+ cpu=mipsallegrexel
+ vendor=sony
;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
+ tile*-*)
+ basic_os=${basic_os:-linux-gnu}
;;
+
*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
+ # Recognize the canonical CPU types that are allowed with any
+ # company name.
+ case $cpu in
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | amdgcn \
+ | arc | arceb | arc32 | arc64 \
+ | arm | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bpf | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | loongarch32 | loongarch64 | loongarchx32 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64eb | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r3 | mipsisa32r3el \
+ | mipsisa32r5 | mipsisa32r5el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r3 | mipsisa64r3el \
+ | mipsisa64r5 | mipsisa64r5el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k | nvptx \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | picochip \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+ | rl78 | romp | rs6000 | rx \
+ | s390 | s390x \
+ | score \
+ | sh | shl \
+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | thumbv7* \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | w65 \
+ | wasm32 | wasm64 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ exit 1
+ ;;
+ esac
;;
esac
# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+case $vendor in
+ digital*)
+ vendor=dec
;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ commodore*)
+ vendor=cbm
;;
*)
;;
@@ -1323,200 +1301,215 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
-if [ x"$os" != x"" ]
+if test x$basic_os != x
then
+
+# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+ gnu/linux*)
+ kernel=linux
+ os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+ ;;
+ os2-emx)
+ kernel=os2
+ os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+ ;;
+ nto-qnx*)
+ kernel=nto
+ os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+ ;;
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+ IFS=$saved_IFS
+ ;;
+ # Default OS when just kernel was specified
+ nto*)
+ kernel=nto
+ os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+ ;;
+ linux*)
+ kernel=linux
+ os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+ ;;
+ *)
+ kernel=
+ os=$basic_os
+ ;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
;;
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ bluegene*)
+ os=cnk
;;
- -solaris)
- os=-solaris2
+ solaris1 | solaris1.*)
+ os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
;;
- -svr4*)
- os=-sysv4
+ solaris)
+ os=solaris2
;;
- -unixware*)
- os=-sysv4.2uw
+ unixware*)
+ os=sysv4.2uw
;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
;;
- -nto-qnx*)
+ isc)
+ os=isc2.2
;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ sco6)
+ os=sco5v6
;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ sco5)
+ os=sco3.2v5
;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
+ sco4)
+ os=sco3.2v4
;;
- -linux-dietlibc)
- os=-linux-dietlibc
+ sco3.2.[4-9]*)
+ os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ sco*v* | scout)
+ # Don't match below
;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ sco*)
+ os=sco3.2v2
;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ psos*)
+ os=psos
;;
- -opened*)
- os=-openedition
+ qnx*)
+ os=qnx
;;
- -os400*)
- os=-os400
+ hiux*)
+ os=hiuxwe2
;;
- -wince*)
- os=-wince
+ lynx*178)
+ os=lynxos178
;;
- -osfrose*)
- os=-osfrose
+ lynx*5)
+ os=lynxos5
;;
- -osf*)
- os=-osf
+ lynxos*)
+ # don't get caught up in next wildcard
;;
- -utek*)
- os=-bsd
+ lynx*)
+ os=lynxos
;;
- -dynix*)
- os=-bsd
+ mac[0-9]*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
;;
- -acis*)
- os=-aos
+ opened*)
+ os=openedition
;;
- -atheos*)
- os=-atheos
+ os400*)
+ os=os400
;;
- -syllable*)
- os=-syllable
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
- -386bsd)
- os=-bsd
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
- -ctix* | -uts*)
- os=-sysv
+ wince*)
+ os=wince
;;
- -nova*)
- os=-rtmk-nova
+ utek*)
+ os=bsd
;;
- -ns2 )
- os=-nextstep2
+ dynix*)
+ os=bsd
;;
- -nsk*)
- os=-nsk
+ acis*)
+ os=aos
;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
+ atheos*)
+ os=atheos
;;
- -sinix*)
- os=-sysv4
+ syllable*)
+ os=syllable
;;
- -tpf*)
- os=-tpf
+ 386bsd)
+ os=bsd
;;
- -triton*)
- os=-sysv3
+ ctix* | uts*)
+ os=sysv
;;
- -oss*)
- os=-sysv3
+ nova*)
+ os=rtmk-nova
;;
- -svr4)
- os=-sysv4
+ ns2)
+ os=nextstep2
;;
- -svr3)
- os=-sysv3
+ # Preserve the version number of sinix5.
+ sinix5.*)
+ os=`echo "$os" | sed -e 's|sinix|sysv|'`
;;
- -sysvr4)
- os=-sysv4
+ sinix*)
+ os=sysv4
;;
- # This must come after -sysvr4.
- -sysv*)
+ tpf*)
+ os=tpf
;;
- -ose*)
- os=-ose
+ triton*)
+ os=sysv3
;;
- -es1800*)
- os=-ose
+ oss*)
+ os=sysv3
;;
- -xenix)
- os=-xenix
+ svr4*)
+ os=sysv4
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
+ svr3)
+ os=sysv3
;;
- -aros*)
- os=-aros
+ sysvr4)
+ os=sysv4
;;
- -zvmoe)
- os=-zvmoe
+ ose*)
+ os=ose
;;
- -dicos*)
- os=-dicos
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
;;
- -nacl*)
+ dicos*)
+ os=dicos
;;
- -none)
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $cpu in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
;;
*)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
+ # No normalization, but not necessarily accepted, that comes below.
;;
esac
+
else
# Here we handle the default operating systems that come with various machines.
@@ -1529,264 +1522,362 @@ else
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
-case $basic_machine in
+kernel=
+case $cpu-$vendor in
score-*)
- os=-elf
+ os=elf
;;
spu-*)
- os=-elf
+ os=elf
;;
*-acorn)
- os=-riscix1.2
+ os=riscix1.2
;;
arm*-rebel)
- os=-linux
+ kernel=linux
+ os=gnu
;;
arm*-semi)
- os=-aout
+ os=aout
;;
c4x-* | tic4x-*)
- os=-coff
+ os=coff
;;
c8051-*)
- os=-elf
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
;;
hexagon-*)
- os=-elf
+ os=elf
;;
tic54x-*)
- os=-coff
+ os=coff
;;
tic55x-*)
- os=-coff
+ os=coff
;;
tic6x-*)
- os=-coff
+ os=coff
;;
# This must come before the *-dec entry.
pdp10-*)
- os=-tops20
+ os=tops20
;;
pdp11-*)
- os=-none
+ os=none
;;
*-dec | vax-*)
- os=-ultrix4.2
+ os=ultrix4.2
;;
m68*-apollo)
- os=-domain
+ os=domain
;;
i386-sun)
- os=-sunos4.0.2
+ os=sunos4.0.2
;;
m68000-sun)
- os=-sunos3
+ os=sunos3
;;
m68*-cisco)
- os=-aout
+ os=aout
;;
mep-*)
- os=-elf
+ os=elf
;;
mips*-cisco)
- os=-elf
+ os=elf
;;
mips*-*)
- os=-elf
- ;;
- or1k-*)
- os=-elf
+ os=elf
;;
or32-*)
- os=-coff
+ os=coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
+ os=sysv3
;;
sparc-* | *-sun)
- os=-sunos4.1.1
+ os=sunos4.1.1
;;
- *-be)
- os=-beos
+ pru-*)
+ os=elf
;;
- *-haiku)
- os=-haiku
+ *-be)
+ os=beos
;;
*-ibm)
- os=-aix
+ os=aix
;;
*-knuth)
- os=-mmixware
+ os=mmixware
;;
*-wec)
- os=-proelf
+ os=proelf
;;
*-winbond)
- os=-proelf
+ os=proelf
;;
*-oki)
- os=-proelf
+ os=proelf
;;
*-hp)
- os=-hpux
+ os=hpux
;;
*-hitachi)
- os=-hiux
+ os=hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
+ os=sysv
;;
*-cbm)
- os=-amigaos
+ os=amigaos
;;
*-dg)
- os=-dgux
+ os=dgux
;;
*-dolphin)
- os=-sysv3
+ os=sysv3
;;
m68k-ccur)
- os=-rtu
+ os=rtu
;;
m88k-omron*)
- os=-luna
+ os=luna
;;
- *-next )
- os=-nextstep
+ *-next)
+ os=nextstep
;;
*-sequent)
- os=-ptx
+ os=ptx
;;
*-crds)
- os=-unos
+ os=unos
;;
*-ns)
- os=-genix
+ os=genix
;;
i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
+ os=mvs
;;
*-gould)
- os=-sysv
+ os=sysv
;;
*-highlevel)
- os=-bsd
+ os=bsd
;;
*-encore)
- os=-bsd
+ os=bsd
;;
*-sgi)
- os=-irix
+ os=irix
;;
*-siemens)
- os=-sysv4
+ os=sysv4
;;
*-masscomp)
- os=-rtu
+ os=rtu
;;
f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
+ os=uxpv
;;
*-rom68k)
- os=-coff
+ os=coff
;;
*-*bug)
- os=-coff
+ os=coff
;;
*-apple)
- os=-macos
+ os=macos
;;
*-atari*)
- os=-mint
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
;;
*)
- os=-none
+ os=none
;;
esac
+
fi
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+ # Sometimes we do "kernel-libc", so those need to count as OSes.
+ musl* | newlib* | relibc* | uclibc*)
+ ;;
+ # Likewise for "kernel-abi"
+ eabi* | gnueabi*)
+ ;;
+ # VxWorks passes extra cpu info in the 4th filed.
+ simlinux | simwindows | spe)
+ ;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
+ | hiux* | abug | nacl* | netware* | windows* \
+ | os9* | macos* | osx* | ios* \
+ | mpw* | magic* | mmixware* | mon960* | lnews* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* | twizzler* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* | serenity* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | mint* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+ | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*)
+ ;;
+ # This one is extra strict with allowed versions
+ sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ none)
+ ;;
+ *)
+ echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+ linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+ | linux-musl* | linux-relibc* | linux-uclibc* )
+ ;;
+ uclinux-uclibc* )
+ ;;
+ -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+ # These are just libc implementations, not actual OSes, and thus
+ # require a kernel.
+ echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+ exit 1
+ ;;
+ kfreebsd*-gnu* | kopensolaris*-gnu*)
+ ;;
+ vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+ ;;
+ nto-qnx*)
+ ;;
+ os2-emx)
+ ;;
+ *-eabi* | *-gnueabi*)
+ ;;
+ -*)
+ # Blank kernel with real OS is always fine.
+ ;;
+ *-*)
+ echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+ exit 1
+ ;;
+esac
+
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
+case $vendor in
+ unknown)
+ case $cpu-$os in
+ *-riscix*)
vendor=acorn
;;
- -sunos*)
+ *-sunos*)
vendor=sun
;;
- -cnk*|-aix*)
+ *-cnk* | *-aix*)
vendor=ibm
;;
- -beos*)
+ *-beos*)
vendor=be
;;
- -hpux*)
+ *-hpux*)
vendor=hp
;;
- -mpeix*)
+ *-mpeix*)
vendor=hp
;;
- -hiux*)
+ *-hiux*)
vendor=hitachi
;;
- -unos*)
+ *-unos*)
vendor=crds
;;
- -dgux*)
+ *-dgux*)
vendor=dg
;;
- -luna*)
+ *-luna*)
vendor=omron
;;
- -genix*)
+ *-genix*)
vendor=ns
;;
- -mvs* | -opened*)
+ *-clix*)
+ vendor=intergraph
+ ;;
+ *-mvs* | *-opened*)
+ vendor=ibm
+ ;;
+ *-os400*)
vendor=ibm
;;
- -os400*)
+ s390-* | s390x-*)
vendor=ibm
;;
- -ptx*)
+ *-ptx*)
vendor=sequent
;;
- -tpf*)
+ *-tpf*)
vendor=ibm
;;
- -vxsim* | -vxworks* | -windiss*)
+ *-vxsim* | *-vxworks* | *-windiss*)
vendor=wrs
;;
- -aux*)
+ *-aux*)
vendor=apple
;;
- -hms*)
+ *-hms*)
vendor=hitachi
;;
- -mpw* | -macos*)
+ *-mpw* | *-macos*)
vendor=apple
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
vendor=atari
;;
- -vos*)
+ *-vos*)
vendor=stratus
;;
esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
-echo $basic_machine$os
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
exit
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/3rdparty/asio/configure b/3rdparty/asio/configure
index bd9b1ca1644..3f97eb5ce3f 100755
--- a/3rdparty/asio/configure
+++ b/3rdparty/asio/configure
@@ -1,9 +1,10 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for asio 1.20.0.
+# Generated by GNU Autoconf 2.71 for asio 1.30.2.
#
#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -14,14 +15,16 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -31,46 +34,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -79,13 +82,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -94,8 +90,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -107,30 +107,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
@@ -152,20 +132,22 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
-else
+else \$as_nop
case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
@@ -185,42 +167,52 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
-else
+else \$as_nop
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null
+then :
as_have_required=yes
-else
+else $as_nop
as_have_required=no
fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
-else
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
+ as_shell=$as_dir$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
break 2
fi
fi
@@ -228,14 +220,21 @@ fi
esac
as_found=false
done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
IFS=$as_save_IFS
+if $as_found
+then :
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
- if test "x$CONFIG_SHELL" != x; then :
+
+ if test "x$CONFIG_SHELL" != x
+then :
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
@@ -253,18 +252,19 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
$0: including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
@@ -291,6 +291,7 @@ as_fn_unset ()
}
as_unset=as_fn_unset
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -308,6 +309,14 @@ as_fn_exit ()
as_fn_set_status $1
exit $1
} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_mkdir_p
# -------------
@@ -322,7 +331,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -331,7 +340,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -370,12 +379,13 @@ as_fn_executable_p ()
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -387,18 +397,27 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
@@ -410,9 +429,9 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -439,7 +458,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -483,7 +502,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
@@ -497,6 +516,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
exit
}
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -510,6 +533,13 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -577,48 +607,44 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='asio'
PACKAGE_TARNAME='asio'
-PACKAGE_VERSION='1.20.0'
-PACKAGE_STRING='asio 1.20.0'
+PACKAGE_VERSION='1.30.2'
+PACKAGE_STRING='asio 1.30.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
ac_unique_file="include/asio.hpp"
# Factoring default headers for most tests.
ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
#endif
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
#endif
#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
# include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
+ac_header_cxx_list=
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
@@ -643,9 +669,7 @@ STANDALONE_FALSE
STANDALONE_TRUE
HAVE_OPENSSL_FALSE
HAVE_OPENSSL_TRUE
-EGREP
-GREP
-CXXCPP
+pkgconfigdir
RANLIB
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
@@ -681,6 +705,9 @@ AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
AM_V
+CSCOPE
+ETAGS
+CTAGS
am__untar
am__tar
AMTAR
@@ -726,6 +753,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -752,6 +780,7 @@ enable_option_checking
enable_maintainer_mode
enable_silent_rules
enable_dependency_tracking
+with_pkgconfigdir
with_boost
enable_separate_compilation
enable_boost_coroutine
@@ -767,8 +796,7 @@ LIBS
CPPFLAGS
CXX
CXXFLAGS
-CCC
-CXXCPP'
+CCC'
# Initialize some variables set by options.
@@ -807,6 +835,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -836,8 +865,6 @@ do
*) ac_optarg=yes ;;
esac
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
case $ac_dashdash$ac_option in
--)
ac_dashdash=yes ;;
@@ -878,9 +905,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -904,9 +931,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1059,6 +1086,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1108,9 +1144,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1124,9 +1160,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1170,9 +1206,9 @@ Try \`$0 --help' for more information"
*)
# FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
: "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
@@ -1188,7 +1224,7 @@ if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1196,7 +1232,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1252,7 +1288,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_myself" : 'X\(//\)[^/]' \| \
X"$as_myself" : 'X\(//\)$' \| \
X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
+printf "%s\n" X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1309,7 +1345,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures asio 1.20.0 to adapt to many kinds of systems.
+\`configure' configures asio 1.30.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1349,6 +1385,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1379,7 +1416,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of asio 1.20.0:";;
+ short | recursive ) echo "Configuration of asio 1.30.2:";;
esac
cat <<\_ACEOF
@@ -1402,6 +1439,8 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pkgconfigdir pkg-config installation directory
+ ['${libdir}/pkgconfig']
--with-boost=DIR location of boost distribution
--with-openssl=DIR location of openssl
@@ -1415,7 +1454,6 @@ Some influential environment variables:
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
- CXXCPP C++ preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1436,9 +1474,9 @@ if test "$ac_init_help" = "recursive"; then
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1466,7 +1504,8 @@ esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
if test -f "$ac_srcdir/configure.gnu"; then
echo &&
$SHELL "$ac_srcdir/configure.gnu" --help=recursive
@@ -1474,7 +1513,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1483,10 +1522,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-asio configure 1.20.0
-generated by GNU Autoconf 2.69
+asio configure 1.30.2
+generated by GNU Autoconf 2.71
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1503,14 +1542,14 @@ fi
ac_fn_c_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
+ rm -f conftest.$ac_objext conftest.beam
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1518,14 +1557,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
+ } && test -s conftest.$ac_objext
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1541,14 +1581,14 @@ fi
ac_fn_cxx_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
+ rm -f conftest.$ac_objext conftest.beam
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1556,14 +1596,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
+ } && test -s conftest.$ac_objext
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1573,172 +1614,6 @@ fi
} # ac_fn_cxx_try_compile
-# ac_fn_cxx_try_cpp LINENO
-# ------------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_cpp
-
-# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
-# ---------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_cxx_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_cxx_check_header_mongrel
-
-# ac_fn_cxx_try_run LINENO
-# ------------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_cxx_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_run
-
# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
# ---------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
@@ -1746,37 +1621,59 @@ fi
ac_fn_cxx_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_cxx_check_header_compile
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by asio $as_me 1.20.0, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+It was created by asio $as_me 1.30.2, which was
+generated by GNU Autoconf 2.71. Invocation command line was
- $ $0 $@
+ $ $0$ac_configure_args_raw
_ACEOF
exec 5>>config.log
@@ -1809,8 +1706,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -1845,7 +1746,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
@@ -1880,11 +1781,13 @@ done
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
# Save into config.log some information that might help in debugging.
{
echo
- $as_echo "## ---------------- ##
+ printf "%s\n" "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
echo
@@ -1895,8 +1798,8 @@ trap 'exit_status=$?
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -1920,7 +1823,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- $as_echo "## ----------------- ##
+ printf "%s\n" "## ----------------- ##
## Output variables. ##
## ----------------- ##"
echo
@@ -1928,14 +1831,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
+ printf "%s\n" "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
echo
@@ -1943,15 +1846,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
echo
@@ -1959,8 +1862,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
echo
fi
test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -1974,63 +1877,48 @@ ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
-$as_echo "/* confdefs.h */" > confdefs.h
+printf "%s\n" "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
+ ac_site_files="$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+
+for ac_site_file in $ac_site_files
do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -2040,19 +1928,650 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+# Test code for whether the C++ compiler supports C++98 (global declarations)
+ac_cxx_conftest_cxx98_globals='
+// Does the compiler advertise C++98 conformance?
+#if !defined __cplusplus || __cplusplus < 199711L
+# error "Compiler does not advertise C++98 conformance"
+#endif
+
+// These inclusions are to reject old compilers that
+// lack the unsuffixed header files.
+#include <cstdlib>
+#include <exception>
+
+// <cassert> and <cstring> are *not* freestanding headers in C++98.
+extern void assert (int);
+namespace std {
+ extern int strcmp (const char *, const char *);
+}
+
+// Namespaces, exceptions, and templates were all added after "C++ 2.0".
+using std::exception;
+using std::strcmp;
+
+namespace {
+
+void test_exception_syntax()
+{
+ try {
+ throw "test";
+ } catch (const char *s) {
+ // Extra parentheses suppress a warning when building autoconf itself,
+ // due to lint rules shared with more typical C programs.
+ assert (!(strcmp) (s, "test"));
+ }
+}
+
+template <typename T> struct test_template
+{
+ T const val;
+ explicit test_template(T t) : val(t) {}
+ template <typename U> T add(U u) { return static_cast<T>(u) + val; }
+};
+
+} // anonymous namespace
+'
+
+# Test code for whether the C++ compiler supports C++98 (body of main)
+ac_cxx_conftest_cxx98_main='
+ assert (argc);
+ assert (! argv[0]);
+{
+ test_exception_syntax ();
+ test_template<double> tt (2.0);
+ assert (tt.add (4) == 6.0);
+ assert (true && !false);
+}
+'
+
+# Test code for whether the C++ compiler supports C++11 (global declarations)
+ac_cxx_conftest_cxx11_globals='
+// Does the compiler advertise C++ 2011 conformance?
+#if !defined __cplusplus || __cplusplus < 201103L
+# error "Compiler does not advertise C++11 conformance"
+#endif
+
+namespace cxx11test
+{
+ constexpr int get_val() { return 20; }
+
+ struct testinit
+ {
+ int i;
+ double d;
+ };
+
+ class delegate
+ {
+ public:
+ delegate(int n) : n(n) {}
+ delegate(): delegate(2354) {}
+
+ virtual int getval() { return this->n; };
+ protected:
+ int n;
+ };
+
+ class overridden : public delegate
+ {
+ public:
+ overridden(int n): delegate(n) {}
+ virtual int getval() override final { return this->n * 2; }
+ };
+
+ class nocopy
+ {
+ public:
+ nocopy(int i): i(i) {}
+ nocopy() = default;
+ nocopy(const nocopy&) = delete;
+ nocopy & operator=(const nocopy&) = delete;
+ private:
+ int i;
+ };
+
+ // for testing lambda expressions
+ template <typename Ret, typename Fn> Ret eval(Fn f, Ret v)
+ {
+ return f(v);
+ }
+
+ // for testing variadic templates and trailing return types
+ template <typename V> auto sum(V first) -> V
+ {
+ return first;
+ }
+ template <typename V, typename... Args> auto sum(V first, Args... rest) -> V
+ {
+ return first + sum(rest...);
+ }
+}
+'
+
+# Test code for whether the C++ compiler supports C++11 (body of main)
+ac_cxx_conftest_cxx11_main='
+{
+ // Test auto and decltype
+ auto a1 = 6538;
+ auto a2 = 48573953.4;
+ auto a3 = "String literal";
+
+ int total = 0;
+ for (auto i = a3; *i; ++i) { total += *i; }
+
+ decltype(a2) a4 = 34895.034;
+}
+{
+ // Test constexpr
+ short sa[cxx11test::get_val()] = { 0 };
+}
+{
+ // Test initializer lists
+ cxx11test::testinit il = { 4323, 435234.23544 };
+}
+{
+ // Test range-based for
+ int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
+ 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
+ for (auto &x : array) { x += 23; }
+}
+{
+ // Test lambda expressions
+ using cxx11test::eval;
+ assert (eval ([](int x) { return x*2; }, 21) == 42);
+ double d = 2.0;
+ assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
+ assert (d == 5.0);
+ assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
+ assert (d == 5.0);
+}
+{
+ // Test use of variadic templates
+ using cxx11test::sum;
+ auto a = sum(1);
+ auto b = sum(1, 2);
+ auto c = sum(1.0, 2.0, 3.0);
+}
+{
+ // Test constructor delegation
+ cxx11test::delegate d1;
+ cxx11test::delegate d2();
+ cxx11test::delegate d3(45);
+}
+{
+ // Test override and final
+ cxx11test::overridden o1(55464);
+}
+{
+ // Test nullptr
+ char *c = nullptr;
+}
+{
+ // Test template brackets
+ test_template<::test_template<int>> v(test_template<int>(12));
+}
+{
+ // Unicode literals
+ char const *utf8 = u8"UTF-8 string \u2500";
+ char16_t const *utf16 = u"UTF-8 string \u2500";
+ char32_t const *utf32 = U"UTF-32 string \u2500";
+}
+'
+
+# Test code for whether the C compiler supports C++11 (complete).
+ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
+${ac_cxx_conftest_cxx11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_cxx_conftest_cxx98_main}
+ ${ac_cxx_conftest_cxx11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C++98 (complete).
+ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_cxx_conftest_cxx98_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_cxx_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_cxx_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_cxx_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_cxx_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_cxx_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_cxx_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_cxx_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_cxx_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_cxx_list " unistd.h unistd_h HAVE_UNISTD_H"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="compile config.guess config.sub missing install-sh"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -2063,12 +2582,12 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
@@ -2077,24 +2596,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -2104,11 +2623,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2123,17 +2643,18 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
-$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
# Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then :
+if test ${enable_maintainer_mode+y}
+then :
enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else
+else $as_nop
USE_MAINTAINER_MODE=no
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
-$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+printf "%s\n" "$USE_MAINTAINER_MODE" >&6; }
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
MAINTAINER_MODE_FALSE='#'
@@ -2147,36 +2668,9 @@ fi
am__api_version='1.16'
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-# Find a good install program. We prefer a C program (faster),
+ # Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
@@ -2190,20 +2684,25 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
@@ -2213,13 +2712,13 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
@@ -2227,12 +2726,12 @@ case $as_dir/ in #((
echo one > conftest.one
echo two > conftest.two
mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
test -s conftest.one && test -s conftest.two &&
test -s conftest.dir/conftest.one &&
test -s conftest.dir/conftest.two
then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
break 3
fi
fi
@@ -2248,7 +2747,7 @@ IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
fi
- if test "${ac_cv_path_install+set}" = set; then
+ if test ${ac_cv_path_install+y}; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. Don't cache a
@@ -2258,8 +2757,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -2269,8 +2768,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+printf %s "checking whether build environment is sane... " >&6; }
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -2324,8 +2823,8 @@ else
as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
@@ -2344,26 +2843,23 @@ test "$program_suffix" != NONE &&
# Double any \ or $.
# By default was `s,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
+
# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
+
+ if test x"${MISSING+set}" != xset; then
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
am_missing_run="$MISSING "
else
am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
if test x"${install_sh+set}" != xset; then
@@ -2383,11 +2879,12 @@ if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
@@ -2395,11 +2892,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2410,11 +2911,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2423,11 +2924,12 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
@@ -2435,11 +2937,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2450,11 +2956,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -2462,8 +2968,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -2475,25 +2981,31 @@ fi
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
- if ${ac_cv_path_mkdir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${ac_cv_path_mkdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
- 'mkdir (GNU coreutils) '* | \
- 'mkdir (coreutils) '* | \
+ as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir ('*'coreutils) '* | \
+ 'BusyBox '* | \
'mkdir (fileutils) '4.1*)
- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
break 3;;
esac
done
@@ -2504,7 +3016,7 @@ IFS=$as_save_IFS
fi
test -d ./--version && rmdir ./--version
- if test "${ac_cv_path_mkdir+set}" = set; then
+ if test ${ac_cv_path_mkdir+y}; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
# As a last resort, use the slow shell script. Don't cache a
@@ -2514,18 +3026,19 @@ fi
MKDIR_P="$ac_install_sh -d"
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
@@ -2533,11 +3046,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2548,24 +3065,25 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
test -n "$AWK" && break
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
@@ -2581,12 +3099,12 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
SET_MAKE=
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -2600,7 +3118,8 @@ fi
rmdir .tst 2>/dev/null
# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
+if test ${enable_silent_rules+y}
+then :
enableval=$enable_silent_rules;
fi
@@ -2610,12 +3129,13 @@ case $enable_silent_rules in # (((
*) AM_DEFAULT_VERBOSITY=1;;
esac
am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if $as_echo 'TRUE=$(BAR$(V))
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
@@ -2627,8 +3147,8 @@ else
am_cv_make_support_nested_variables=no
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
@@ -2660,17 +3180,13 @@ fi
# Define the identity of the package.
PACKAGE='asio'
- VERSION='1.20.0'
+ VERSION='1.30.2'
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
# Some tools Automake needs.
@@ -2702,47 +3218,16 @@ AMTAR='$${TAR-tar}'
# We'll loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar plaintar pax cpio none'
-
-# The POSIX 1988 'ustar' format is defined with fixed-size fields.
- # There is notably a 21 bits limit for the UID and the GID. In fact,
- # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
- # and bug#13588).
- am_max_uid=2097151 # 2^21 - 1
- am_max_gid=$am_max_uid
- # The $UID and $GID variables are not portable, so we need to resort
- # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
- # below are definitely unexpected, so allow the users to see them
- # (that is, avoid stderr redirection).
- am_uid=`id -u || echo unknown`
- am_gid=`id -g || echo unknown`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
-$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
- if test $am_uid -le $am_max_uid; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- _am_tools=none
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
-$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
- if test $am_gid -le $am_max_gid; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- _am_tools=none
- fi
+_am_tools='gnutar pax cpio none'
+
+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
-$as_echo_n "checking how to create a ustar tar archive... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5
+printf %s "checking how to create a pax tar archive... " >&6; }
# Go ahead even if we have the value already cached. We do so because we
# need to set the values for the 'am__tar' and 'am__untar' variables.
- _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
+ _am_tools=${am_cv_prog_tar_pax-$_am_tools}
for _am_tool in $_am_tools; do
case $_am_tool in
@@ -2754,8 +3239,8 @@ $as_echo_n "checking how to create a ustar tar archive... " >&6; }
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && break
done
- am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
+ am__tar="$_am_tar --format=posix -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=posix -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
@@ -2767,14 +3252,14 @@ $as_echo_n "checking how to create a ustar tar archive... " >&6; }
am__untar='tar xf -'
;;
pax)
- am__tar='pax -L -x ustar -w "$$tardir"'
- am__tar_='pax -L -x ustar -w "$tardir"'
+ am__tar='pax -L -x pax -w "$$tardir"'
+ am__tar_='pax -L -x pax -w "$tardir"'
am__untar='pax -r'
;;
cpio)
- am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
- am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
- am__untar='cpio -i -H ustar -d'
+ am__tar='find "$$tardir" -print | cpio -o -H pax -L'
+ am__tar_='find "$tardir" -print | cpio -o -H pax -L'
+ am__untar='cpio -i -H pax -d'
;;
none)
am__tar=false
@@ -2785,7 +3270,7 @@ $as_echo_n "checking how to create a ustar tar archive... " >&6; }
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
- test -n "${am_cv_prog_tar_ustar}" && break
+ test -n "${am_cv_prog_tar_pax}" && break
# tar/untar a dummy directory, and stop if the command works.
rm -rf conftest.dir
@@ -2813,17 +3298,32 @@ $as_echo_n "checking how to create a ustar tar archive... " >&6; }
done
rm -rf conftest.dir
- if ${am_cv_prog_tar_ustar+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- am_cv_prog_tar_ustar=$_am_tool
+ if test ${am_cv_prog_tar_pax+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ am_cv_prog_tar_pax=$_am_tool
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
-$as_echo "$am_cv_prog_tar_ustar" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5
+printf "%s\n" "$am_cv_prog_tar_pax" >&6; }
+
+
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
@@ -2870,26 +3370,29 @@ END
fi
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
test "x$ac_build_alias" = x &&
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
@@ -2908,21 +3411,22 @@ IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
@@ -2941,12 +3445,21 @@ IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+
+
+
+
+
+
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
-$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
cat > confinc.mk << 'END'
am__doit:
@echo this is the am__doit target >confinc.out
@@ -2982,11 +3495,12 @@ esac
fi
done
rm -f confinc.* confmf.*
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
-$as_echo "${_am_result}" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+printf "%s\n" "${_am_result}" >&6; }
# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
+if test ${enable_dependency_tracking+y}
+then :
enableval=$enable_dependency_tracking;
fi
@@ -3012,11 +3526,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3024,11 +3539,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3039,11 +3558,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3052,11 +3571,12 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -3064,11 +3584,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3079,11 +3603,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -3091,8 +3615,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -3105,11 +3629,12 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3117,11 +3642,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3132,11 +3661,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3145,11 +3674,12 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3158,15 +3688,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3182,18 +3716,18 @@ if test $ac_prog_rejected = yes; then
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3204,11 +3738,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3216,11 +3751,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3231,11 +3770,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3248,11 +3787,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -3260,11 +3800,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3275,11 +3819,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3291,8 +3835,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -3300,25 +3844,129 @@ esac
fi
fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+
+
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -3328,7 +3976,7 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -3336,7 +3984,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -3348,9 +3996,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
@@ -3371,11 +4019,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -3392,7 +4041,7 @@ do
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
@@ -3408,44 +4057,46 @@ do
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
-else
+else $as_nop
ac_file=''
fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -3459,15 +4110,15 @@ for ac_file in conftest.exe conftest conftest.*; do
* ) break;;
esac
done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
@@ -3476,7 +4127,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
@@ -3488,8 +4139,8 @@ _ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
@@ -3497,10 +4148,10 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if { ac_try='./conftest$ac_cv_exeext'
{ { case "(($ac_try" in
@@ -3508,39 +4159,40 @@ $as_echo "$ac_try_echo"; } >&5
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -3554,11 +4206,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
@@ -3567,31 +4220,32 @@ $as_echo "$ac_try_echo"; } >&5
break;;
esac
done
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -3601,29 +4255,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_compiler_gnu=yes
-else
+else $as_nop
ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
@@ -3632,57 +4290,60 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
-else
+else $as_nop
CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
@@ -3697,94 +4358,144 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
-
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
fi
ac_ext=c
@@ -3793,21 +4504,23 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_ext=c
+
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -3835,8 +4548,8 @@ _ACEOF
rm -f core conftest*
unset am_i
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
@@ -3854,11 +4567,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
depcc="$CC" am_compiler_list=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CC_dependencies_compiler_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CC_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
@@ -3965,8 +4679,8 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
@@ -3981,6 +4695,12 @@ fi
+
+
+
+
+
+
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3991,15 +4711,16 @@ if test -z "$CXX"; then
CXX=$CCC
else
if test -n "$ac_tool_prefix"; then
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CXX+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
@@ -4007,11 +4728,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -4022,11 +4747,11 @@ fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+printf "%s\n" "$CXX" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -4035,15 +4760,16 @@ fi
fi
if test -z "$CXX"; then
ac_ct_CXX=$CXX
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CXX+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CXX"; then
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
@@ -4051,11 +4777,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -4066,11 +4796,11 @@ fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+printf "%s\n" "$ac_ct_CXX" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -4082,8 +4812,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CXX=$ac_ct_CXX
@@ -4093,7 +4823,7 @@ fi
fi
fi
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
@@ -4103,7 +4833,7 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -4113,20 +4843,21 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if ${ac_cv_cxx_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
+printf %s "checking whether the compiler supports GNU C++... " >&6; }
+if test ${ac_cv_cxx_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -4136,29 +4867,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"
+then :
ac_compiler_gnu=yes
-else
+else $as_nop
ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
if test $ac_compiler_gnu = yes; then
GXX=yes
else
GXX=
fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_test_CXXFLAGS=${CXXFLAGS+y}
ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if ${ac_cv_prog_cxx_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+printf %s "checking whether $CXX accepts -g... " >&6; }
+if test ${ac_cv_prog_cxx_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
ac_cxx_werror_flag=yes
ac_cv_prog_cxx_g=no
@@ -4167,57 +4902,60 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"
+then :
ac_cv_prog_cxx_g=yes
-else
+else $as_nop
CXXFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"
+then :
-else
+else $as_nop
ac_cxx_werror_flag=$ac_save_cxx_werror_flag
CXXFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"
+then :
ac_cv_prog_cxx_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
+if test $ac_test_CXXFLAGS; then
CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then
@@ -4232,6 +4970,100 @@ else
CXXFLAGS=
fi
fi
+ac_prog_cxx_stdcxx=no
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
+printf %s "checking for $CXX option to enable C++11 features... " >&6; }
+if test ${ac_cv_prog_cxx_11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_11=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx11_program
+_ACEOF
+for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx11"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
+ ac_prog_cxx_stdcxx=cxx11
+fi
+fi
+if test x$ac_prog_cxx_stdcxx = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
+printf %s "checking for $CXX option to enable C++98 features... " >&6; }
+if test ${ac_cv_prog_cxx_98+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cxx_98=no
+ac_save_CXX=$CXX
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_cxx_conftest_cxx98_program
+_ACEOF
+for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
+do
+ CXX="$ac_save_CXX $ac_arg"
+ if ac_fn_cxx_try_compile "$LINENO"
+then :
+ ac_cv_prog_cxx_cxx98=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CXX=$ac_save_CXX
+fi
+
+if test "x$ac_cv_prog_cxx_cxx98" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cxx_cxx98" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
+printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
+ CXX="$CXX $ac_cv_prog_cxx_cxx98"
+fi
+ ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
+ ac_prog_cxx_stdcxx=cxx98
+fi
+fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4240,11 +5072,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
depcc="$CXX" am_compiler_list=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CXX_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
@@ -4351,8 +5184,8 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
if
@@ -4375,11 +5208,12 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
@@ -4387,11 +5221,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -4402,11 +5240,11 @@ fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -4415,11 +5253,12 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
@@ -4427,11 +5266,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -4442,11 +5285,11 @@ fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_RANLIB" = x; then
@@ -4454,8 +5297,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
RANLIB=$ac_ct_RANLIB
@@ -4466,12 +5309,29 @@ fi
-$as_echo "#define _REENTRANT 1" >>confdefs.h
+
+# Check whether --with-pkgconfigdir was given.
+if test ${with_pkgconfigdir+y}
+then :
+ withval=$with_pkgconfigdir;
+else $as_nop
+ with_pkgconfigdir='${libdir}/pkgconfig'
+fi
+
+pkgconfigdir=$with_pkgconfigdir
+
+
+
+
+
+
+printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
# Check whether --with-boost was given.
-if test "${with_boost+set}" = set; then :
+if test ${with_boost+y}
+then :
withval=$with_boost;
if test "${withval}" = no; then
STANDALONE="yes"
@@ -4483,7 +5343,7 @@ if test "${with_boost+set}" = set; then :
CPPFLAGS="$CPPFLAGS -DASIO_ENABLE_BOOST -DBOOST_CHRONO_HEADER_ONLY -DBOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING"
fi
-else
+else $as_nop
STANDALONE="yes"
@@ -4491,7 +5351,8 @@ fi
# Check whether --enable-separate-compilation was given.
-if test "${enable_separate_compilation+set}" = set; then :
+if test ${enable_separate_compilation+y}
+then :
enableval=$enable_separate_compilation;
SEPARATE_COMPILATION=yes
@@ -4499,7 +5360,8 @@ fi
# Check whether --enable-boost-coroutine was given.
-if test "${enable_boost_coroutine+set}" = set; then :
+if test ${enable_boost_coroutine+y}
+then :
enableval=$enable_boost_coroutine;
HAVE_BOOST_COROUTINE=yes
@@ -4508,403 +5370,40 @@ fi
if test "$STANDALONE" != yes; then
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
-if test -z "$CXXCPP"; then
- if ${ac_cv_prog_CXXCPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CXXCPP needs to be expanded
- for CXXCPP in "$CXX -E" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
- CXXCPP=$ac_cv_prog_CXXCPP
-else
- ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
-$as_echo "$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
+ac_header= ac_cache=
+for ac_item in $ac_header_cxx_list
do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
+ if test $ac_cache; then
+ ac_fn_cxx_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
+done
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-fi
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_run "$LINENO"; then :
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-fi
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
fi
+ac_fn_cxx_check_header_compile "$LINENO" "boost/noncopyable.hpp" "ac_cv_header_boost_noncopyable_hpp" "$ac_includes_default"
+if test "x$ac_cv_header_boost_noncopyable_hpp" = xyes
+then :
-done
-
-
-ac_fn_cxx_check_header_mongrel "$LINENO" "boost/noncopyable.hpp" "ac_cv_header_boost_noncopyable_hpp" "$ac_includes_default"
-if test "x$ac_cv_header_boost_noncopyable_hpp" = xyes; then :
-
-else
+else $as_nop
echo "Can't find boost headers. Please check the location of the boost"
echo "distribution and rerun configure using the --with-boost=DIR option."
@@ -4913,12 +5412,12 @@ else
fi
-
fi
# Check whether --with-openssl was given.
-if test "${with_openssl+set}" = set; then :
+if test ${with_openssl+y}
+then :
withval=$with_openssl;
CPPFLAGS="$CPPFLAGS -I${withval}/include"
LIBS="$LIBS -L${withval}/lib"
@@ -4926,17 +5425,17 @@ if test "${with_openssl+set}" = set; then :
fi
-ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
-if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+ac_fn_cxx_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes
+then :
-else
+else $as_nop
OPENSSL_FOUND=no
fi
-
if test x$OPENSSL_FOUND != xno; then
LIBS="$LIBS -lssl -lcrypto"
fi
@@ -5013,34 +5512,35 @@ if test "$SEPARATE_COMPILATION" = yes; then
CPPFLAGS="$CPPFLAGS -DASIO_SEPARATE_COMPILATION"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++11 is enabled" >&5
-$as_echo_n "checking whether C++11 is enabled... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++11 is enabled" >&5
+printf %s "checking whether C++11 is enabled... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if __cplusplus < 201103L
#error C++11 not available
#endif
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
HAVE_CXX11=yes;
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
HAVE_CXX11=no;
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++14 is enabled" >&5
-$as_echo_n "checking whether C++14 is enabled... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++14 is enabled" >&5
+printf %s "checking whether C++14 is enabled... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if defined(__GNUC__) && !defined(__clang__)
@@ -5052,84 +5552,99 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#error C++14 not available
#endif
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
HAVE_CXX14=yes;
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
HAVE_CXX14=no;
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++17 is enabled" >&5
-$as_echo_n "checking whether C++17 is enabled... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++17 is enabled" >&5
+printf %s "checking whether C++17 is enabled... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if __cplusplus < 201703L
#error C++17 not available
#endif
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
HAVE_CXX17=yes;
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
HAVE_CXX17=no;
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++20 is enabled" >&5
-$as_echo_n "checking whether C++20 is enabled... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++20 is enabled" >&5
+printf %s "checking whether C++20 is enabled... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if __cplusplus < 202002L
#error C++20 not available
#endif
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
HAVE_CXX20=yes;
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
HAVE_CXX20=no;
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether coroutines are enabled" >&5
-$as_echo_n "checking whether coroutines are enabled... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether coroutines are enabled" >&5
+printf %s "checking whether coroutines are enabled... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if defined(__clang__)
- # if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
- # if __has_include(<experimental/coroutine>)
- # define ASIO_HAS_CO_AWAIT 1
+ # if (__clang_major__ >= 14)
+ # if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)
+ # if __has_include(<coroutine>)
+ # define ASIO_HAS_CO_AWAIT 1
+ # endif
+ # elif (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
+ # if __has_include(<experimental/coroutine>)
+ # define ASIO_HAS_CO_AWAIT 1
+ # endif
+ # endif
+ # else
+ # if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
+ # if __has_include(<experimental/coroutine>)
+ # define ASIO_HAS_CO_AWAIT 1
+ # endif
# endif
# endif
#elif defined(__GNUC__)
@@ -5143,23 +5658,24 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
# error coroutines not available
#endif
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_cxx_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
HAVE_COROUTINES=yes;
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
HAVE_COROUTINES=no;
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
if test "$GXX" = yes; then
if test "$STANDALONE" = yes; then
@@ -5251,7 +5767,10 @@ else
fi
-ac_config_files="$ac_config_files Makefile include/Makefile src/Makefile src/tests/Makefile src/tests/properties/Makefile src/examples/cpp03/Makefile src/examples/cpp11/Makefile src/examples/cpp14/Makefile src/examples/cpp17/Makefile"
+ac_config_files="$ac_config_files asio.pc"
+
+
+ac_config_files="$ac_config_files Makefile include/Makefile src/Makefile src/tests/Makefile src/tests/properties/Makefile src/examples/cpp11/Makefile src/examples/cpp14/Makefile src/examples/cpp17/Makefile src/examples/cpp20/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -5280,8 +5799,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -5311,15 +5830,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -5333,8 +5852,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -5387,7 +5906,7 @@ U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -5402,14 +5921,14 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+printf %s "checking that generated files are newer than configure... " >&6; }
if test -n "$am_sleep_pid"; then
# Hide warnings about reused PIDs.
wait $am_sleep_pid 2>/dev/null
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
+printf "%s\n" "done" >&6; }
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@@ -5475,8 +5994,8 @@ fi
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
@@ -5499,14 +6018,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -5516,46 +6037,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -5564,13 +6085,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -5579,8 +6093,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -5592,30 +6110,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD]
@@ -5628,13 +6126,14 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -5661,18 +6160,20 @@ as_fn_unset ()
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
+
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -5684,12 +6185,13 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
@@ -5720,7 +6222,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -5742,6 +6244,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -5755,6 +6261,12 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -5796,7 +6308,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -5805,7 +6317,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -5867,8 +6379,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by asio $as_me 1.20.0, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+This file was extended by asio $as_me 1.30.2, which was
+generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5921,14 +6433,16 @@ $config_commands
Report bugs to the package provider."
_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-asio config.status 1.20.0
-configured by $0, generated by GNU Autoconf 2.69,
+asio config.status 1.30.2
+configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -5968,21 +6482,21 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
+ printf "%s\n" "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
+ printf "%s\n" "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
--he | --h | --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
+ printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
@@ -6010,7 +6524,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
exec "\$@"
@@ -6024,7 +6538,7 @@ exec 5>>config.log
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- $as_echo "$ac_log"
+ printf "%s\n" "$ac_log"
} >&5
_ACEOF
@@ -6043,15 +6557,16 @@ for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "asio.pc") CONFIG_FILES="$CONFIG_FILES asio.pc" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;;
"src/tests/properties/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/properties/Makefile" ;;
- "src/examples/cpp03/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/cpp03/Makefile" ;;
"src/examples/cpp11/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/cpp11/Makefile" ;;
"src/examples/cpp14/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/cpp14/Makefile" ;;
"src/examples/cpp17/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/cpp17/Makefile" ;;
+ "src/examples/cpp20/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/cpp20/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -6063,8 +6578,8 @@ done
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -6292,7 +6807,7 @@ do
esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
@@ -6300,17 +6815,17 @@ do
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
@@ -6327,7 +6842,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+printf "%s\n" X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -6351,9 +6866,9 @@ $as_echo X"$ac_file" |
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -6415,8 +6930,8 @@ ac_sed_dataroot='
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
@@ -6460,9 +6975,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
@@ -6474,8 +6989,8 @@ which seems to be undefined. Please make sure it is defined" >&2;}
;;
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
;;
esac
@@ -6501,7 +7016,7 @@ esac
for am_mf
do
# Strip MF so we end up with the name of the file.
- am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
+ am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile which includes
# dependency-tracking related rules and includes.
# Grep'ing the whole file directly is not great: AIX grep has a line
@@ -6513,7 +7028,7 @@ $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$am_mf" : 'X\(//\)[^/]' \| \
X"$am_mf" : 'X\(//\)$' \| \
X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$am_mf" |
+printf "%s\n" X"$am_mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -6535,7 +7050,7 @@ $as_echo X"$am_mf" |
$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
X"$am_mf" : 'X\(//\)$' \| \
X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$am_mf" |
+printf "%s\n" X/"$am_mf" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -6560,10 +7075,12 @@ $as_echo X/"$am_mf" |
(exit $ac_status); } || am_rc=$?
done
if test $am_rc -ne 0; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Something went wrong bootstrapping makefile fragments
- for automatic dependency tracking. Try re-running configure with the
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE=\"gmake\" (or whatever is
+ necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See \`config.log' for more details" "$LINENO" 5; }
@@ -6609,7 +7126,8 @@ if test "$no_create" != yes; then
$ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+
diff --git a/3rdparty/asio/configure.ac b/3rdparty/asio/configure.ac
index 036e41a1b78..15e470fd1a4 100644
--- a/3rdparty/asio/configure.ac
+++ b/3rdparty/asio/configure.ac
@@ -1,13 +1,14 @@
-AC_INIT(asio, [1.20.0])
+AC_INIT(asio, [1.30.2])
AC_CONFIG_SRCDIR(include/asio.hpp)
AM_MAINTAINER_MODE
-AM_INIT_AUTOMAKE([tar-ustar])
+AM_INIT_AUTOMAKE([tar-pax])
AC_CANONICAL_HOST
AM_PROG_CC_C_O
AC_PROG_CXX
AC_LANG(C++)
AC_PROG_RANLIB
+PKG_INSTALLDIR
AC_DEFINE(_REENTRANT, [1], [Define this])
@@ -184,9 +185,21 @@ AC_MSG_CHECKING([whether coroutines are enabled])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#if defined(__clang__)]]
- [[# if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)]]
- [[# if __has_include(<experimental/coroutine>)]]
- [[# define ASIO_HAS_CO_AWAIT 1]]
+ [[# if (__clang_major__ >= 14)]]
+ [[# if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)]]
+ [[# if __has_include(<coroutine>)]]
+ [[# define ASIO_HAS_CO_AWAIT 1]]
+ [[# endif]]
+ [[# elif (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)]]
+ [[# if __has_include(<experimental/coroutine>)]]
+ [[# define ASIO_HAS_CO_AWAIT 1]]
+ [[# endif]]
+ [[# endif]]
+ [[# else]]
+ [[# if (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)]]
+ [[# if __has_include(<experimental/coroutine>)]]
+ [[# define ASIO_HAS_CO_AWAIT 1]]
+ [[# endif]]
[[# endif]]
[[# endif]]
[[#elif defined(__GNUC__)]]
@@ -231,13 +244,15 @@ AM_CONDITIONAL(HAVE_CXX20,test x$HAVE_CXX20 = xyes)
AM_CONDITIONAL(HAVE_COROUTINES,test x$HAVE_COROUTINES = xyes)
+AC_CONFIG_FILES([asio.pc])
+
AC_OUTPUT([
Makefile
include/Makefile
src/Makefile
src/tests/Makefile
src/tests/properties/Makefile
- src/examples/cpp03/Makefile
src/examples/cpp11/Makefile
src/examples/cpp14/Makefile
- src/examples/cpp17/Makefile])
+ src/examples/cpp17/Makefile
+ src/examples/cpp20/Makefile])
diff --git a/3rdparty/asio/depcomp b/3rdparty/asio/depcomp
index 4ebd5b3a2f2..715e34311ed 100644
--- a/3rdparty/asio/depcomp
+++ b/3rdparty/asio/depcomp
@@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2013-05-30.07; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -783,9 +783,9 @@ exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/3rdparty/asio/include/Makefile.am b/3rdparty/asio/include/Makefile.am
index 74933ee7d35..8f43766563e 100644
--- a/3rdparty/asio/include/Makefile.am
+++ b/3rdparty/asio/include/Makefile.am
@@ -1,16 +1,24 @@
# find . -name "*.*pp" | sed -e 's/^\.\///' | sed -e 's/^.*$/ & \\/' | sort
nobase_include_HEADERS = \
+ asio/any_completion_executor.hpp \
+ asio/any_completion_handler.hpp \
asio/any_io_executor.hpp \
+ asio/append.hpp \
+ asio/as_tuple.hpp \
asio/associated_allocator.hpp \
asio/associated_cancellation_slot.hpp \
asio/associated_executor.hpp \
+ asio/associated_immediate_executor.hpp \
asio/associator.hpp \
asio/async_result.hpp \
asio/awaitable.hpp \
asio/basic_datagram_socket.hpp \
asio/basic_deadline_timer.hpp \
+ asio/basic_file.hpp \
asio/basic_io_object.hpp \
+ asio/basic_random_access_file.hpp \
asio/basic_raw_socket.hpp \
+ asio/basic_readable_pipe.hpp \
asio/basic_seq_packet_socket.hpp \
asio/basic_serial_port.hpp \
asio/basic_signal_set.hpp \
@@ -20,10 +28,14 @@ nobase_include_HEADERS = \
asio/basic_socket_streambuf.hpp \
asio/basic_streambuf_fwd.hpp \
asio/basic_streambuf.hpp \
+ asio/basic_stream_file.hpp \
asio/basic_stream_socket.hpp \
asio/basic_waitable_timer.hpp \
+ asio/basic_writable_pipe.hpp \
+ asio/bind_allocator.hpp \
asio/bind_cancellation_slot.hpp \
asio/bind_executor.hpp \
+ asio/bind_immediate_executor.hpp \
asio/buffered_read_stream_fwd.hpp \
asio/buffered_read_stream.hpp \
asio/buffered_stream_fwd.hpp \
@@ -31,6 +43,7 @@ nobase_include_HEADERS = \
asio/buffered_write_stream_fwd.hpp \
asio/buffered_write_stream.hpp \
asio/buffer.hpp \
+ asio/buffer_registration.hpp \
asio/buffers_iterator.hpp \
asio/cancellation_signal.hpp \
asio/cancellation_state.hpp \
@@ -39,9 +52,12 @@ nobase_include_HEADERS = \
asio/completion_condition.hpp \
asio/compose.hpp \
asio/connect.hpp \
+ asio/connect_pipe.hpp \
+ asio/consign.hpp \
asio/coroutine.hpp \
asio/deadline_timer.hpp \
asio/defer.hpp \
+ asio/deferred.hpp \
asio/detached.hpp \
asio/detail/array_fwd.hpp \
asio/detail/array.hpp \
@@ -54,11 +70,11 @@ nobase_include_HEADERS = \
asio/detail/buffered_stream_storage.hpp \
asio/detail/buffer_resize_guard.hpp \
asio/detail/buffer_sequence_adapter.hpp \
- asio/detail/bulk_executor_op.hpp \
asio/detail/call_stack.hpp \
asio/detail/chrono.hpp \
asio/detail/chrono_time_traits.hpp \
asio/detail/completion_handler.hpp \
+ asio/detail/composed_work.hpp \
asio/detail/concurrency_hint.hpp \
asio/detail/conditionally_enabled_event.hpp \
asio/detail/conditionally_enabled_mutex.hpp \
@@ -76,20 +92,16 @@ nobase_include_HEADERS = \
asio/detail/epoll_reactor.hpp \
asio/detail/eventfd_select_interrupter.hpp \
asio/detail/event.hpp \
+ asio/detail/exception.hpp \
asio/detail/executor_function.hpp \
asio/detail/executor_op.hpp \
asio/detail/fd_set_adapter.hpp \
asio/detail/fenced_block.hpp \
asio/detail/functional.hpp \
asio/detail/future.hpp \
- asio/detail/gcc_arm_fenced_block.hpp \
- asio/detail/gcc_hppa_fenced_block.hpp \
- asio/detail/gcc_sync_fenced_block.hpp \
- asio/detail/gcc_x86_fenced_block.hpp \
asio/detail/global.hpp \
asio/detail/handler_alloc_helpers.hpp \
asio/detail/handler_cont_helpers.hpp \
- asio/detail/handler_invoke_helpers.hpp \
asio/detail/handler_tracking.hpp \
asio/detail/handler_type_requirements.hpp \
asio/detail/handler_work.hpp \
@@ -102,16 +114,21 @@ nobase_include_HEADERS = \
asio/detail/impl/epoll_reactor.ipp \
asio/detail/impl/eventfd_select_interrupter.ipp \
asio/detail/impl/handler_tracking.ipp \
+ asio/detail/impl/io_uring_descriptor_service.ipp \
+ asio/detail/impl/io_uring_file_service.ipp \
+ asio/detail/impl/io_uring_service.hpp \
+ asio/detail/impl/io_uring_service.ipp \
+ asio/detail/impl/io_uring_socket_service_base.ipp \
asio/detail/impl/kqueue_reactor.hpp \
asio/detail/impl/kqueue_reactor.ipp \
asio/detail/impl/null_event.ipp \
asio/detail/impl/pipe_select_interrupter.ipp \
asio/detail/impl/posix_event.ipp \
asio/detail/impl/posix_mutex.ipp \
+ asio/detail/impl/posix_serial_port_service.ipp \
asio/detail/impl/posix_thread.ipp \
asio/detail/impl/posix_tss_ptr.ipp \
asio/detail/impl/reactive_descriptor_service.ipp \
- asio/detail/impl/reactive_serial_port_service.ipp \
asio/detail/impl/reactive_socket_service_base.ipp \
asio/detail/impl/resolver_service_base.ipp \
asio/detail/impl/scheduler.ipp \
@@ -131,6 +148,7 @@ nobase_include_HEADERS = \
asio/detail/impl/timer_queue_ptime.ipp \
asio/detail/impl/timer_queue_set.ipp \
asio/detail/impl/win_event.ipp \
+ asio/detail/impl/win_iocp_file_service.ipp \
asio/detail/impl/win_iocp_handle_service.ipp \
asio/detail/impl/win_iocp_io_context.hpp \
asio/detail/impl/win_iocp_io_context.ipp \
@@ -145,15 +163,36 @@ nobase_include_HEADERS = \
asio/detail/impl/win_static_mutex.ipp \
asio/detail/impl/win_thread.ipp \
asio/detail/impl/win_tss_ptr.ipp \
+ asio/detail/initiate_defer.hpp \
+ asio/detail/initiate_dispatch.hpp \
+ asio/detail/initiate_post.hpp \
asio/detail/io_control.hpp \
asio/detail/io_object_impl.hpp \
+ asio/detail/io_uring_descriptor_read_at_op.hpp \
+ asio/detail/io_uring_descriptor_read_op.hpp \
+ asio/detail/io_uring_descriptor_service.hpp \
+ asio/detail/io_uring_descriptor_write_at_op.hpp \
+ asio/detail/io_uring_descriptor_write_op.hpp \
+ asio/detail/io_uring_file_service.hpp \
+ asio/detail/io_uring_null_buffers_op.hpp \
+ asio/detail/io_uring_operation.hpp \
+ asio/detail/io_uring_service.hpp \
+ asio/detail/io_uring_socket_accept_op.hpp \
+ asio/detail/io_uring_socket_connect_op.hpp \
+ asio/detail/io_uring_socket_recvfrom_op.hpp \
+ asio/detail/io_uring_socket_recvmsg_op.hpp \
+ asio/detail/io_uring_socket_recv_op.hpp \
+ asio/detail/io_uring_socket_send_op.hpp \
+ asio/detail/io_uring_socket_sendto_op.hpp \
+ asio/detail/io_uring_socket_service_base.hpp \
+ asio/detail/io_uring_socket_service.hpp \
+ asio/detail/io_uring_wait_op.hpp \
asio/detail/is_buffer_sequence.hpp \
asio/detail/is_executor.hpp \
asio/detail/keyword_tss_ptr.hpp \
asio/detail/kqueue_reactor.hpp \
asio/detail/limits.hpp \
asio/detail/local_free_on_block_exit.hpp \
- asio/detail/macos_fenced_block.hpp \
asio/detail/memory.hpp \
asio/detail/mutex.hpp \
asio/detail/non_const_lvalue.hpp \
@@ -178,6 +217,7 @@ nobase_include_HEADERS = \
asio/detail/posix_fd_set_adapter.hpp \
asio/detail/posix_global.hpp \
asio/detail/posix_mutex.hpp \
+ asio/detail/posix_serial_port_service.hpp \
asio/detail/posix_signal_blocker.hpp \
asio/detail/posix_static_mutex.hpp \
asio/detail/posix_thread.hpp \
@@ -185,7 +225,6 @@ nobase_include_HEADERS = \
asio/detail/push_options.hpp \
asio/detail/reactive_descriptor_service.hpp \
asio/detail/reactive_null_buffers_op.hpp \
- asio/detail/reactive_serial_port_service.hpp \
asio/detail/reactive_socket_accept_op.hpp \
asio/detail/reactive_socket_connect_op.hpp \
asio/detail/reactive_socket_recvfrom_op.hpp \
@@ -196,7 +235,6 @@ nobase_include_HEADERS = \
asio/detail/reactive_socket_service_base.hpp \
asio/detail/reactive_socket_service.hpp \
asio/detail/reactive_wait_op.hpp \
- asio/detail/reactor_fwd.hpp \
asio/detail/reactor.hpp \
asio/detail/reactor_op.hpp \
asio/detail/reactor_op_queue.hpp \
@@ -209,6 +247,7 @@ nobase_include_HEADERS = \
asio/detail/resolver_service.hpp \
asio/detail/scheduler.hpp \
asio/detail/scheduler_operation.hpp \
+ asio/detail/scheduler_task.hpp \
asio/detail/scheduler_thread_info.hpp \
asio/detail/scoped_lock.hpp \
asio/detail/scoped_ptr.hpp \
@@ -225,7 +264,6 @@ nobase_include_HEADERS = \
asio/detail/socket_option.hpp \
asio/detail/socket_select_interrupter.hpp \
asio/detail/socket_types.hpp \
- asio/detail/solaris_fenced_block.hpp \
asio/detail/source_location.hpp \
asio/detail/static_mutex.hpp \
asio/detail/std_event.hpp \
@@ -251,15 +289,15 @@ nobase_include_HEADERS = \
asio/detail/timer_scheduler.hpp \
asio/detail/tss_ptr.hpp \
asio/detail/type_traits.hpp \
- asio/detail/variadic_templates.hpp \
+ asio/detail/utility.hpp \
asio/detail/wait_handler.hpp \
asio/detail/wait_op.hpp \
asio/detail/winapp_thread.hpp \
asio/detail/wince_thread.hpp \
asio/detail/win_event.hpp \
asio/detail/win_fd_set_adapter.hpp \
- asio/detail/win_fenced_block.hpp \
asio/detail/win_global.hpp \
+ asio/detail/win_iocp_file_service.hpp \
asio/detail/win_iocp_handle_read_op.hpp \
asio/detail/win_iocp_handle_service.hpp \
asio/detail/win_iocp_handle_write_op.hpp \
@@ -308,62 +346,61 @@ nobase_include_HEADERS = \
asio/execution/bad_executor.hpp \
asio/execution/blocking.hpp \
asio/execution/blocking_adaptation.hpp \
- asio/execution/bulk_execute.hpp \
- asio/execution/bulk_guarantee.hpp \
- asio/execution/connect.hpp \
asio/execution/context.hpp \
asio/execution/context_as.hpp \
- asio/execution/detail/as_invocable.hpp \
- asio/execution/detail/as_operation.hpp \
- asio/execution/detail/as_receiver.hpp \
- asio/execution/detail/bulk_sender.hpp \
- asio/execution/detail/submit_receiver.hpp \
- asio/execution/detail/void_receiver.hpp \
- asio/execution/execute.hpp \
asio/execution/executor.hpp \
asio/execution/impl/bad_executor.ipp \
- asio/execution/impl/receiver_invocation_error.ipp \
asio/execution/invocable_archetype.hpp \
asio/execution/mapping.hpp \
asio/execution/occupancy.hpp \
- asio/execution/operation_state.hpp \
asio/execution/outstanding_work.hpp \
asio/execution/prefer_only.hpp \
- asio/execution/receiver.hpp \
- asio/execution/receiver_invocation_error.hpp \
asio/execution/relationship.hpp \
- asio/execution/schedule.hpp \
- asio/execution/scheduler.hpp \
- asio/execution/sender.hpp \
- asio/execution/set_done.hpp \
- asio/execution/set_error.hpp \
- asio/execution/set_value.hpp \
- asio/execution/start.hpp \
- asio/execution/submit.hpp \
asio/executor.hpp \
asio/executor_work_guard.hpp \
asio/experimental/append.hpp \
asio/experimental/as_single.hpp \
asio/experimental/as_tuple.hpp \
asio/experimental/awaitable_operators.hpp \
+ asio/experimental/basic_channel.hpp \
+ asio/experimental/basic_concurrent_channel.hpp \
asio/experimental/cancellation_condition.hpp \
+ asio/experimental/channel.hpp \
+ asio/experimental/channel_error.hpp \
+ asio/experimental/channel_traits.hpp \
+ asio/experimental/co_composed.hpp \
+ asio/experimental/co_spawn.hpp \
+ asio/experimental/concurrent_channel.hpp \
asio/experimental/coro.hpp \
+ asio/experimental/coro_traits.hpp \
asio/experimental/deferred.hpp \
- asio/experimental/detail/completion_handler_erasure.hpp \
+ asio/experimental/detail/channel_handler.hpp \
+ asio/experimental/detail/channel_message.hpp \
+ asio/experimental/detail/channel_operation.hpp \
+ asio/experimental/detail/channel_payload.hpp \
+ asio/experimental/detail/channel_receive_op.hpp \
+ asio/experimental/detail/channel_send_functions.hpp \
+ asio/experimental/detail/channel_send_op.hpp \
+ asio/experimental/detail/channel_service.hpp \
+ asio/experimental/detail/coro_completion_handler.hpp \
asio/experimental/detail/coro_promise_allocator.hpp \
- asio/experimental/detail/coro_traits.hpp \
+ asio/experimental/detail/has_signature.hpp \
+ asio/experimental/detail/impl/channel_service.hpp \
asio/experimental/detail/partial_promise.hpp \
- asio/experimental/impl/append.hpp \
asio/experimental/impl/as_single.hpp \
- asio/experimental/impl/as_tuple.hpp \
- asio/experimental/impl/deferred.hpp \
+ asio/experimental/impl/channel_error.ipp \
+ asio/experimental/impl/co_composed.hpp \
+ asio/experimental/impl/coro.hpp \
asio/experimental/impl/parallel_group.hpp \
- asio/experimental/impl/prepend.hpp \
asio/experimental/impl/promise.hpp \
+ asio/experimental/impl/use_coro.hpp \
+ asio/experimental/impl/use_promise.hpp \
asio/experimental/parallel_group.hpp \
asio/experimental/prepend.hpp \
asio/experimental/promise.hpp \
asio/experimental/use_coro.hpp \
+ asio/experimental/use_promise.hpp \
+ asio/file_base.hpp \
asio/generic/basic_endpoint.hpp \
asio/generic/datagram_protocol.hpp \
asio/generic/detail/endpoint.hpp \
@@ -371,31 +408,34 @@ nobase_include_HEADERS = \
asio/generic/raw_protocol.hpp \
asio/generic/seq_packet_protocol.hpp \
asio/generic/stream_protocol.hpp \
- asio/handler_alloc_hook.hpp \
asio/handler_continuation_hook.hpp \
- asio/handler_invoke_hook.hpp \
asio/high_resolution_timer.hpp \
asio.hpp \
+ asio/impl/any_completion_executor.ipp \
+ asio/impl/any_io_executor.ipp \
+ asio/impl/append.hpp \
+ asio/impl/as_tuple.hpp \
asio/impl/awaitable.hpp \
asio/impl/buffered_read_stream.hpp \
asio/impl/buffered_write_stream.hpp \
+ asio/impl/cancellation_signal.ipp \
asio/impl/co_spawn.hpp \
- asio/impl/compose.hpp \
asio/impl/connect.hpp \
- asio/impl/defer.hpp \
+ asio/impl/connect_pipe.hpp \
+ asio/impl/connect_pipe.ipp \
+ asio/impl/consign.hpp \
+ asio/impl/deferred.hpp \
asio/impl/detached.hpp \
- asio/impl/dispatch.hpp \
asio/impl/error_code.ipp \
asio/impl/error.ipp \
asio/impl/execution_context.hpp \
asio/impl/execution_context.ipp \
asio/impl/executor.hpp \
asio/impl/executor.ipp \
- asio/impl/handler_alloc_hook.ipp \
asio/impl/io_context.hpp \
asio/impl/io_context.ipp \
asio/impl/multiple_exceptions.ipp \
- asio/impl/post.hpp \
+ asio/impl/prepend.hpp \
asio/impl/read_at.hpp \
asio/impl/read.hpp \
asio/impl/read_until.hpp \
@@ -458,6 +498,7 @@ nobase_include_HEADERS = \
asio/ip/unicast.hpp \
asio/ip/v6_only.hpp \
asio/is_applicable_property.hpp \
+ asio/is_contiguous_iterator.hpp \
asio/is_executor.hpp \
asio/is_read_buffered.hpp \
asio/is_write_buffered.hpp \
@@ -466,6 +507,7 @@ nobase_include_HEADERS = \
asio/local/datagram_protocol.hpp \
asio/local/detail/endpoint.hpp \
asio/local/detail/impl/endpoint.ipp \
+ asio/local/seq_packet_protocol.hpp \
asio/local/stream_protocol.hpp \
asio/multiple_exceptions.hpp \
asio/packaged_task.hpp \
@@ -477,15 +519,21 @@ nobase_include_HEADERS = \
asio/posix/stream_descriptor.hpp \
asio/post.hpp \
asio/prefer.hpp \
+ asio/prepend.hpp \
asio/query.hpp \
+ asio/random_access_file.hpp \
asio/read_at.hpp \
asio/read.hpp \
asio/read_until.hpp \
+ asio/readable_pipe.hpp \
+ asio/recycling_allocator.hpp \
asio/redirect_error.hpp \
+ asio/registered_buffer.hpp \
asio/require.hpp \
asio/require_concept.hpp \
asio/serial_port_base.hpp \
asio/serial_port.hpp \
+ asio/signal_set_base.hpp \
asio/signal_set.hpp \
asio/socket_base.hpp \
asio/spawn.hpp \
@@ -523,6 +571,7 @@ nobase_include_HEADERS = \
asio/steady_timer.hpp \
asio/strand.hpp \
asio/streambuf.hpp \
+ asio/stream_file.hpp \
asio/system_context.hpp \
asio/system_error.hpp \
asio/system_executor.hpp \
@@ -531,12 +580,7 @@ nobase_include_HEADERS = \
asio/thread.hpp \
asio/thread_pool.hpp \
asio/time_traits.hpp \
- asio/traits/bulk_execute_free.hpp \
- asio/traits/bulk_execute_member.hpp \
- asio/traits/connect_free.hpp \
- asio/traits/connect_member.hpp \
asio/traits/equality_comparable.hpp \
- asio/traits/execute_free.hpp \
asio/traits/execute_member.hpp \
asio/traits/prefer_free.hpp \
asio/traits/prefer_member.hpp \
@@ -547,21 +591,9 @@ nobase_include_HEADERS = \
asio/traits/require_concept_member.hpp \
asio/traits/require_free.hpp \
asio/traits/require_member.hpp \
- asio/traits/schedule_free.hpp \
- asio/traits/schedule_member.hpp \
- asio/traits/set_done_free.hpp \
- asio/traits/set_done_member.hpp \
- asio/traits/set_error_free.hpp \
- asio/traits/set_error_member.hpp \
- asio/traits/set_value_free.hpp \
- asio/traits/set_value_member.hpp \
- asio/traits/start_free.hpp \
- asio/traits/start_member.hpp \
asio/traits/static_query.hpp \
asio/traits/static_require.hpp \
asio/traits/static_require_concept.hpp \
- asio/traits/submit_free.hpp \
- asio/traits/submit_member.hpp \
asio/ts/buffer.hpp \
asio/ts/executor.hpp \
asio/ts/internet.hpp \
@@ -585,6 +617,7 @@ nobase_include_HEADERS = \
asio/windows/overlapped_ptr.hpp \
asio/windows/random_access_handle.hpp \
asio/windows/stream_handle.hpp \
+ asio/writable_pipe.hpp \
asio/write_at.hpp \
asio/write.hpp \
asio/yield.hpp
diff --git a/3rdparty/asio/include/Makefile.in b/3rdparty/asio/include/Makefile.in
index 4bb29452b71..e71be1bf590 100644
--- a/3rdparty/asio/include/Makefile.in
+++ b/3rdparty/asio/include/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -163,8 +163,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -178,8 +176,9 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CXX = @CXX@
-CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -188,9 +187,8 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
-EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
-GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -257,9 +255,11 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -271,17 +271,25 @@ top_srcdir = @top_srcdir@
# find . -name "*.*pp" | sed -e 's/^\.\///' | sed -e 's/^.*$/ & \\/' | sort
nobase_include_HEADERS = \
+ asio/any_completion_executor.hpp \
+ asio/any_completion_handler.hpp \
asio/any_io_executor.hpp \
+ asio/append.hpp \
+ asio/as_tuple.hpp \
asio/associated_allocator.hpp \
asio/associated_cancellation_slot.hpp \
asio/associated_executor.hpp \
+ asio/associated_immediate_executor.hpp \
asio/associator.hpp \
asio/async_result.hpp \
asio/awaitable.hpp \
asio/basic_datagram_socket.hpp \
asio/basic_deadline_timer.hpp \
+ asio/basic_file.hpp \
asio/basic_io_object.hpp \
+ asio/basic_random_access_file.hpp \
asio/basic_raw_socket.hpp \
+ asio/basic_readable_pipe.hpp \
asio/basic_seq_packet_socket.hpp \
asio/basic_serial_port.hpp \
asio/basic_signal_set.hpp \
@@ -291,10 +299,14 @@ nobase_include_HEADERS = \
asio/basic_socket_streambuf.hpp \
asio/basic_streambuf_fwd.hpp \
asio/basic_streambuf.hpp \
+ asio/basic_stream_file.hpp \
asio/basic_stream_socket.hpp \
asio/basic_waitable_timer.hpp \
+ asio/basic_writable_pipe.hpp \
+ asio/bind_allocator.hpp \
asio/bind_cancellation_slot.hpp \
asio/bind_executor.hpp \
+ asio/bind_immediate_executor.hpp \
asio/buffered_read_stream_fwd.hpp \
asio/buffered_read_stream.hpp \
asio/buffered_stream_fwd.hpp \
@@ -302,6 +314,7 @@ nobase_include_HEADERS = \
asio/buffered_write_stream_fwd.hpp \
asio/buffered_write_stream.hpp \
asio/buffer.hpp \
+ asio/buffer_registration.hpp \
asio/buffers_iterator.hpp \
asio/cancellation_signal.hpp \
asio/cancellation_state.hpp \
@@ -310,9 +323,12 @@ nobase_include_HEADERS = \
asio/completion_condition.hpp \
asio/compose.hpp \
asio/connect.hpp \
+ asio/connect_pipe.hpp \
+ asio/consign.hpp \
asio/coroutine.hpp \
asio/deadline_timer.hpp \
asio/defer.hpp \
+ asio/deferred.hpp \
asio/detached.hpp \
asio/detail/array_fwd.hpp \
asio/detail/array.hpp \
@@ -325,11 +341,11 @@ nobase_include_HEADERS = \
asio/detail/buffered_stream_storage.hpp \
asio/detail/buffer_resize_guard.hpp \
asio/detail/buffer_sequence_adapter.hpp \
- asio/detail/bulk_executor_op.hpp \
asio/detail/call_stack.hpp \
asio/detail/chrono.hpp \
asio/detail/chrono_time_traits.hpp \
asio/detail/completion_handler.hpp \
+ asio/detail/composed_work.hpp \
asio/detail/concurrency_hint.hpp \
asio/detail/conditionally_enabled_event.hpp \
asio/detail/conditionally_enabled_mutex.hpp \
@@ -347,20 +363,16 @@ nobase_include_HEADERS = \
asio/detail/epoll_reactor.hpp \
asio/detail/eventfd_select_interrupter.hpp \
asio/detail/event.hpp \
+ asio/detail/exception.hpp \
asio/detail/executor_function.hpp \
asio/detail/executor_op.hpp \
asio/detail/fd_set_adapter.hpp \
asio/detail/fenced_block.hpp \
asio/detail/functional.hpp \
asio/detail/future.hpp \
- asio/detail/gcc_arm_fenced_block.hpp \
- asio/detail/gcc_hppa_fenced_block.hpp \
- asio/detail/gcc_sync_fenced_block.hpp \
- asio/detail/gcc_x86_fenced_block.hpp \
asio/detail/global.hpp \
asio/detail/handler_alloc_helpers.hpp \
asio/detail/handler_cont_helpers.hpp \
- asio/detail/handler_invoke_helpers.hpp \
asio/detail/handler_tracking.hpp \
asio/detail/handler_type_requirements.hpp \
asio/detail/handler_work.hpp \
@@ -373,16 +385,21 @@ nobase_include_HEADERS = \
asio/detail/impl/epoll_reactor.ipp \
asio/detail/impl/eventfd_select_interrupter.ipp \
asio/detail/impl/handler_tracking.ipp \
+ asio/detail/impl/io_uring_descriptor_service.ipp \
+ asio/detail/impl/io_uring_file_service.ipp \
+ asio/detail/impl/io_uring_service.hpp \
+ asio/detail/impl/io_uring_service.ipp \
+ asio/detail/impl/io_uring_socket_service_base.ipp \
asio/detail/impl/kqueue_reactor.hpp \
asio/detail/impl/kqueue_reactor.ipp \
asio/detail/impl/null_event.ipp \
asio/detail/impl/pipe_select_interrupter.ipp \
asio/detail/impl/posix_event.ipp \
asio/detail/impl/posix_mutex.ipp \
+ asio/detail/impl/posix_serial_port_service.ipp \
asio/detail/impl/posix_thread.ipp \
asio/detail/impl/posix_tss_ptr.ipp \
asio/detail/impl/reactive_descriptor_service.ipp \
- asio/detail/impl/reactive_serial_port_service.ipp \
asio/detail/impl/reactive_socket_service_base.ipp \
asio/detail/impl/resolver_service_base.ipp \
asio/detail/impl/scheduler.ipp \
@@ -402,6 +419,7 @@ nobase_include_HEADERS = \
asio/detail/impl/timer_queue_ptime.ipp \
asio/detail/impl/timer_queue_set.ipp \
asio/detail/impl/win_event.ipp \
+ asio/detail/impl/win_iocp_file_service.ipp \
asio/detail/impl/win_iocp_handle_service.ipp \
asio/detail/impl/win_iocp_io_context.hpp \
asio/detail/impl/win_iocp_io_context.ipp \
@@ -416,15 +434,36 @@ nobase_include_HEADERS = \
asio/detail/impl/win_static_mutex.ipp \
asio/detail/impl/win_thread.ipp \
asio/detail/impl/win_tss_ptr.ipp \
+ asio/detail/initiate_defer.hpp \
+ asio/detail/initiate_dispatch.hpp \
+ asio/detail/initiate_post.hpp \
asio/detail/io_control.hpp \
asio/detail/io_object_impl.hpp \
+ asio/detail/io_uring_descriptor_read_at_op.hpp \
+ asio/detail/io_uring_descriptor_read_op.hpp \
+ asio/detail/io_uring_descriptor_service.hpp \
+ asio/detail/io_uring_descriptor_write_at_op.hpp \
+ asio/detail/io_uring_descriptor_write_op.hpp \
+ asio/detail/io_uring_file_service.hpp \
+ asio/detail/io_uring_null_buffers_op.hpp \
+ asio/detail/io_uring_operation.hpp \
+ asio/detail/io_uring_service.hpp \
+ asio/detail/io_uring_socket_accept_op.hpp \
+ asio/detail/io_uring_socket_connect_op.hpp \
+ asio/detail/io_uring_socket_recvfrom_op.hpp \
+ asio/detail/io_uring_socket_recvmsg_op.hpp \
+ asio/detail/io_uring_socket_recv_op.hpp \
+ asio/detail/io_uring_socket_send_op.hpp \
+ asio/detail/io_uring_socket_sendto_op.hpp \
+ asio/detail/io_uring_socket_service_base.hpp \
+ asio/detail/io_uring_socket_service.hpp \
+ asio/detail/io_uring_wait_op.hpp \
asio/detail/is_buffer_sequence.hpp \
asio/detail/is_executor.hpp \
asio/detail/keyword_tss_ptr.hpp \
asio/detail/kqueue_reactor.hpp \
asio/detail/limits.hpp \
asio/detail/local_free_on_block_exit.hpp \
- asio/detail/macos_fenced_block.hpp \
asio/detail/memory.hpp \
asio/detail/mutex.hpp \
asio/detail/non_const_lvalue.hpp \
@@ -449,6 +488,7 @@ nobase_include_HEADERS = \
asio/detail/posix_fd_set_adapter.hpp \
asio/detail/posix_global.hpp \
asio/detail/posix_mutex.hpp \
+ asio/detail/posix_serial_port_service.hpp \
asio/detail/posix_signal_blocker.hpp \
asio/detail/posix_static_mutex.hpp \
asio/detail/posix_thread.hpp \
@@ -456,7 +496,6 @@ nobase_include_HEADERS = \
asio/detail/push_options.hpp \
asio/detail/reactive_descriptor_service.hpp \
asio/detail/reactive_null_buffers_op.hpp \
- asio/detail/reactive_serial_port_service.hpp \
asio/detail/reactive_socket_accept_op.hpp \
asio/detail/reactive_socket_connect_op.hpp \
asio/detail/reactive_socket_recvfrom_op.hpp \
@@ -467,7 +506,6 @@ nobase_include_HEADERS = \
asio/detail/reactive_socket_service_base.hpp \
asio/detail/reactive_socket_service.hpp \
asio/detail/reactive_wait_op.hpp \
- asio/detail/reactor_fwd.hpp \
asio/detail/reactor.hpp \
asio/detail/reactor_op.hpp \
asio/detail/reactor_op_queue.hpp \
@@ -480,6 +518,7 @@ nobase_include_HEADERS = \
asio/detail/resolver_service.hpp \
asio/detail/scheduler.hpp \
asio/detail/scheduler_operation.hpp \
+ asio/detail/scheduler_task.hpp \
asio/detail/scheduler_thread_info.hpp \
asio/detail/scoped_lock.hpp \
asio/detail/scoped_ptr.hpp \
@@ -496,7 +535,6 @@ nobase_include_HEADERS = \
asio/detail/socket_option.hpp \
asio/detail/socket_select_interrupter.hpp \
asio/detail/socket_types.hpp \
- asio/detail/solaris_fenced_block.hpp \
asio/detail/source_location.hpp \
asio/detail/static_mutex.hpp \
asio/detail/std_event.hpp \
@@ -522,15 +560,15 @@ nobase_include_HEADERS = \
asio/detail/timer_scheduler.hpp \
asio/detail/tss_ptr.hpp \
asio/detail/type_traits.hpp \
- asio/detail/variadic_templates.hpp \
+ asio/detail/utility.hpp \
asio/detail/wait_handler.hpp \
asio/detail/wait_op.hpp \
asio/detail/winapp_thread.hpp \
asio/detail/wince_thread.hpp \
asio/detail/win_event.hpp \
asio/detail/win_fd_set_adapter.hpp \
- asio/detail/win_fenced_block.hpp \
asio/detail/win_global.hpp \
+ asio/detail/win_iocp_file_service.hpp \
asio/detail/win_iocp_handle_read_op.hpp \
asio/detail/win_iocp_handle_service.hpp \
asio/detail/win_iocp_handle_write_op.hpp \
@@ -579,62 +617,61 @@ nobase_include_HEADERS = \
asio/execution/bad_executor.hpp \
asio/execution/blocking.hpp \
asio/execution/blocking_adaptation.hpp \
- asio/execution/bulk_execute.hpp \
- asio/execution/bulk_guarantee.hpp \
- asio/execution/connect.hpp \
asio/execution/context.hpp \
asio/execution/context_as.hpp \
- asio/execution/detail/as_invocable.hpp \
- asio/execution/detail/as_operation.hpp \
- asio/execution/detail/as_receiver.hpp \
- asio/execution/detail/bulk_sender.hpp \
- asio/execution/detail/submit_receiver.hpp \
- asio/execution/detail/void_receiver.hpp \
- asio/execution/execute.hpp \
asio/execution/executor.hpp \
asio/execution/impl/bad_executor.ipp \
- asio/execution/impl/receiver_invocation_error.ipp \
asio/execution/invocable_archetype.hpp \
asio/execution/mapping.hpp \
asio/execution/occupancy.hpp \
- asio/execution/operation_state.hpp \
asio/execution/outstanding_work.hpp \
asio/execution/prefer_only.hpp \
- asio/execution/receiver.hpp \
- asio/execution/receiver_invocation_error.hpp \
asio/execution/relationship.hpp \
- asio/execution/schedule.hpp \
- asio/execution/scheduler.hpp \
- asio/execution/sender.hpp \
- asio/execution/set_done.hpp \
- asio/execution/set_error.hpp \
- asio/execution/set_value.hpp \
- asio/execution/start.hpp \
- asio/execution/submit.hpp \
asio/executor.hpp \
asio/executor_work_guard.hpp \
asio/experimental/append.hpp \
asio/experimental/as_single.hpp \
asio/experimental/as_tuple.hpp \
asio/experimental/awaitable_operators.hpp \
+ asio/experimental/basic_channel.hpp \
+ asio/experimental/basic_concurrent_channel.hpp \
asio/experimental/cancellation_condition.hpp \
+ asio/experimental/channel.hpp \
+ asio/experimental/channel_error.hpp \
+ asio/experimental/channel_traits.hpp \
+ asio/experimental/co_composed.hpp \
+ asio/experimental/co_spawn.hpp \
+ asio/experimental/concurrent_channel.hpp \
asio/experimental/coro.hpp \
+ asio/experimental/coro_traits.hpp \
asio/experimental/deferred.hpp \
- asio/experimental/detail/completion_handler_erasure.hpp \
+ asio/experimental/detail/channel_handler.hpp \
+ asio/experimental/detail/channel_message.hpp \
+ asio/experimental/detail/channel_operation.hpp \
+ asio/experimental/detail/channel_payload.hpp \
+ asio/experimental/detail/channel_receive_op.hpp \
+ asio/experimental/detail/channel_send_functions.hpp \
+ asio/experimental/detail/channel_send_op.hpp \
+ asio/experimental/detail/channel_service.hpp \
+ asio/experimental/detail/coro_completion_handler.hpp \
asio/experimental/detail/coro_promise_allocator.hpp \
- asio/experimental/detail/coro_traits.hpp \
+ asio/experimental/detail/has_signature.hpp \
+ asio/experimental/detail/impl/channel_service.hpp \
asio/experimental/detail/partial_promise.hpp \
- asio/experimental/impl/append.hpp \
asio/experimental/impl/as_single.hpp \
- asio/experimental/impl/as_tuple.hpp \
- asio/experimental/impl/deferred.hpp \
+ asio/experimental/impl/channel_error.ipp \
+ asio/experimental/impl/co_composed.hpp \
+ asio/experimental/impl/coro.hpp \
asio/experimental/impl/parallel_group.hpp \
- asio/experimental/impl/prepend.hpp \
asio/experimental/impl/promise.hpp \
+ asio/experimental/impl/use_coro.hpp \
+ asio/experimental/impl/use_promise.hpp \
asio/experimental/parallel_group.hpp \
asio/experimental/prepend.hpp \
asio/experimental/promise.hpp \
asio/experimental/use_coro.hpp \
+ asio/experimental/use_promise.hpp \
+ asio/file_base.hpp \
asio/generic/basic_endpoint.hpp \
asio/generic/datagram_protocol.hpp \
asio/generic/detail/endpoint.hpp \
@@ -642,31 +679,34 @@ nobase_include_HEADERS = \
asio/generic/raw_protocol.hpp \
asio/generic/seq_packet_protocol.hpp \
asio/generic/stream_protocol.hpp \
- asio/handler_alloc_hook.hpp \
asio/handler_continuation_hook.hpp \
- asio/handler_invoke_hook.hpp \
asio/high_resolution_timer.hpp \
asio.hpp \
+ asio/impl/any_completion_executor.ipp \
+ asio/impl/any_io_executor.ipp \
+ asio/impl/append.hpp \
+ asio/impl/as_tuple.hpp \
asio/impl/awaitable.hpp \
asio/impl/buffered_read_stream.hpp \
asio/impl/buffered_write_stream.hpp \
+ asio/impl/cancellation_signal.ipp \
asio/impl/co_spawn.hpp \
- asio/impl/compose.hpp \
asio/impl/connect.hpp \
- asio/impl/defer.hpp \
+ asio/impl/connect_pipe.hpp \
+ asio/impl/connect_pipe.ipp \
+ asio/impl/consign.hpp \
+ asio/impl/deferred.hpp \
asio/impl/detached.hpp \
- asio/impl/dispatch.hpp \
asio/impl/error_code.ipp \
asio/impl/error.ipp \
asio/impl/execution_context.hpp \
asio/impl/execution_context.ipp \
asio/impl/executor.hpp \
asio/impl/executor.ipp \
- asio/impl/handler_alloc_hook.ipp \
asio/impl/io_context.hpp \
asio/impl/io_context.ipp \
asio/impl/multiple_exceptions.ipp \
- asio/impl/post.hpp \
+ asio/impl/prepend.hpp \
asio/impl/read_at.hpp \
asio/impl/read.hpp \
asio/impl/read_until.hpp \
@@ -729,6 +769,7 @@ nobase_include_HEADERS = \
asio/ip/unicast.hpp \
asio/ip/v6_only.hpp \
asio/is_applicable_property.hpp \
+ asio/is_contiguous_iterator.hpp \
asio/is_executor.hpp \
asio/is_read_buffered.hpp \
asio/is_write_buffered.hpp \
@@ -737,6 +778,7 @@ nobase_include_HEADERS = \
asio/local/datagram_protocol.hpp \
asio/local/detail/endpoint.hpp \
asio/local/detail/impl/endpoint.ipp \
+ asio/local/seq_packet_protocol.hpp \
asio/local/stream_protocol.hpp \
asio/multiple_exceptions.hpp \
asio/packaged_task.hpp \
@@ -748,15 +790,21 @@ nobase_include_HEADERS = \
asio/posix/stream_descriptor.hpp \
asio/post.hpp \
asio/prefer.hpp \
+ asio/prepend.hpp \
asio/query.hpp \
+ asio/random_access_file.hpp \
asio/read_at.hpp \
asio/read.hpp \
asio/read_until.hpp \
+ asio/readable_pipe.hpp \
+ asio/recycling_allocator.hpp \
asio/redirect_error.hpp \
+ asio/registered_buffer.hpp \
asio/require.hpp \
asio/require_concept.hpp \
asio/serial_port_base.hpp \
asio/serial_port.hpp \
+ asio/signal_set_base.hpp \
asio/signal_set.hpp \
asio/socket_base.hpp \
asio/spawn.hpp \
@@ -794,6 +842,7 @@ nobase_include_HEADERS = \
asio/steady_timer.hpp \
asio/strand.hpp \
asio/streambuf.hpp \
+ asio/stream_file.hpp \
asio/system_context.hpp \
asio/system_error.hpp \
asio/system_executor.hpp \
@@ -802,12 +851,7 @@ nobase_include_HEADERS = \
asio/thread.hpp \
asio/thread_pool.hpp \
asio/time_traits.hpp \
- asio/traits/bulk_execute_free.hpp \
- asio/traits/bulk_execute_member.hpp \
- asio/traits/connect_free.hpp \
- asio/traits/connect_member.hpp \
asio/traits/equality_comparable.hpp \
- asio/traits/execute_free.hpp \
asio/traits/execute_member.hpp \
asio/traits/prefer_free.hpp \
asio/traits/prefer_member.hpp \
@@ -818,21 +862,9 @@ nobase_include_HEADERS = \
asio/traits/require_concept_member.hpp \
asio/traits/require_free.hpp \
asio/traits/require_member.hpp \
- asio/traits/schedule_free.hpp \
- asio/traits/schedule_member.hpp \
- asio/traits/set_done_free.hpp \
- asio/traits/set_done_member.hpp \
- asio/traits/set_error_free.hpp \
- asio/traits/set_error_member.hpp \
- asio/traits/set_value_free.hpp \
- asio/traits/set_value_member.hpp \
- asio/traits/start_free.hpp \
- asio/traits/start_member.hpp \
asio/traits/static_query.hpp \
asio/traits/static_require.hpp \
asio/traits/static_require_concept.hpp \
- asio/traits/submit_free.hpp \
- asio/traits/submit_member.hpp \
asio/ts/buffer.hpp \
asio/ts/executor.hpp \
asio/ts/internet.hpp \
@@ -856,6 +888,7 @@ nobase_include_HEADERS = \
asio/windows/overlapped_ptr.hpp \
asio/windows/random_access_handle.hpp \
asio/windows/stream_handle.hpp \
+ asio/writable_pipe.hpp \
asio/write_at.hpp \
asio/write.hpp \
asio/yield.hpp
@@ -971,7 +1004,6 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
diff --git a/3rdparty/asio/include/asio.hpp b/3rdparty/asio/include/asio.hpp
index 94db21e8173..3421b58bdae 100644
--- a/3rdparty/asio/include/asio.hpp
+++ b/3rdparty/asio/include/asio.hpp
@@ -2,7 +2,7 @@
// asio.hpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -15,16 +15,25 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+#include "asio/any_completion_executor.hpp"
+#include "asio/any_completion_handler.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/append.hpp"
+#include "asio/as_tuple.hpp"
#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
#include "asio/associated_cancellation_slot.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/associated_immediate_executor.hpp"
#include "asio/associator.hpp"
#include "asio/async_result.hpp"
#include "asio/awaitable.hpp"
#include "asio/basic_datagram_socket.hpp"
#include "asio/basic_deadline_timer.hpp"
+#include "asio/basic_file.hpp"
#include "asio/basic_io_object.hpp"
+#include "asio/basic_random_access_file.hpp"
#include "asio/basic_raw_socket.hpp"
+#include "asio/basic_readable_pipe.hpp"
#include "asio/basic_seq_packet_socket.hpp"
#include "asio/basic_serial_port.hpp"
#include "asio/basic_signal_set.hpp"
@@ -32,12 +41,17 @@
#include "asio/basic_socket_acceptor.hpp"
#include "asio/basic_socket_iostream.hpp"
#include "asio/basic_socket_streambuf.hpp"
+#include "asio/basic_stream_file.hpp"
#include "asio/basic_stream_socket.hpp"
#include "asio/basic_streambuf.hpp"
#include "asio/basic_waitable_timer.hpp"
+#include "asio/basic_writable_pipe.hpp"
+#include "asio/bind_allocator.hpp"
#include "asio/bind_cancellation_slot.hpp"
#include "asio/bind_executor.hpp"
+#include "asio/bind_immediate_executor.hpp"
#include "asio/buffer.hpp"
+#include "asio/buffer_registration.hpp"
#include "asio/buffered_read_stream_fwd.hpp"
#include "asio/buffered_read_stream.hpp"
#include "asio/buffered_stream_fwd.hpp"
@@ -52,9 +66,12 @@
#include "asio/completion_condition.hpp"
#include "asio/compose.hpp"
#include "asio/connect.hpp"
+#include "asio/connect_pipe.hpp"
+#include "asio/consign.hpp"
#include "asio/coroutine.hpp"
#include "asio/deadline_timer.hpp"
#include "asio/defer.hpp"
+#include "asio/deferred.hpp"
#include "asio/detached.hpp"
#include "asio/dispatch.hpp"
#include "asio/error.hpp"
@@ -64,40 +81,24 @@
#include "asio/execution/any_executor.hpp"
#include "asio/execution/blocking.hpp"
#include "asio/execution/blocking_adaptation.hpp"
-#include "asio/execution/bulk_execute.hpp"
-#include "asio/execution/bulk_guarantee.hpp"
-#include "asio/execution/connect.hpp"
#include "asio/execution/context.hpp"
#include "asio/execution/context_as.hpp"
-#include "asio/execution/execute.hpp"
#include "asio/execution/executor.hpp"
#include "asio/execution/invocable_archetype.hpp"
#include "asio/execution/mapping.hpp"
#include "asio/execution/occupancy.hpp"
-#include "asio/execution/operation_state.hpp"
#include "asio/execution/outstanding_work.hpp"
#include "asio/execution/prefer_only.hpp"
-#include "asio/execution/receiver.hpp"
-#include "asio/execution/receiver_invocation_error.hpp"
#include "asio/execution/relationship.hpp"
-#include "asio/execution/schedule.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
-#include "asio/execution/set_done.hpp"
-#include "asio/execution/set_error.hpp"
-#include "asio/execution/set_value.hpp"
-#include "asio/execution/start.hpp"
-#include "asio/execution_context.hpp"
#include "asio/executor.hpp"
#include "asio/executor_work_guard.hpp"
+#include "asio/file_base.hpp"
#include "asio/generic/basic_endpoint.hpp"
#include "asio/generic/datagram_protocol.hpp"
#include "asio/generic/raw_protocol.hpp"
#include "asio/generic/seq_packet_protocol.hpp"
#include "asio/generic/stream_protocol.hpp"
-#include "asio/handler_alloc_hook.hpp"
#include "asio/handler_continuation_hook.hpp"
-#include "asio/handler_invoke_hook.hpp"
#include "asio/high_resolution_timer.hpp"
#include "asio/io_context.hpp"
#include "asio/io_context_strand.hpp"
@@ -128,12 +129,14 @@
#include "asio/ip/unicast.hpp"
#include "asio/ip/v6_only.hpp"
#include "asio/is_applicable_property.hpp"
+#include "asio/is_contiguous_iterator.hpp"
#include "asio/is_executor.hpp"
#include "asio/is_read_buffered.hpp"
#include "asio/is_write_buffered.hpp"
#include "asio/local/basic_endpoint.hpp"
#include "asio/local/connect_pair.hpp"
#include "asio/local/datagram_protocol.hpp"
+#include "asio/local/seq_packet_protocol.hpp"
#include "asio/local/stream_protocol.hpp"
#include "asio/multiple_exceptions.hpp"
#include "asio/packaged_task.hpp"
@@ -145,20 +148,27 @@
#include "asio/posix/stream_descriptor.hpp"
#include "asio/post.hpp"
#include "asio/prefer.hpp"
+#include "asio/prepend.hpp"
#include "asio/query.hpp"
+#include "asio/random_access_file.hpp"
#include "asio/read.hpp"
#include "asio/read_at.hpp"
#include "asio/read_until.hpp"
+#include "asio/readable_pipe.hpp"
+#include "asio/recycling_allocator.hpp"
#include "asio/redirect_error.hpp"
+#include "asio/registered_buffer.hpp"
#include "asio/require.hpp"
#include "asio/require_concept.hpp"
#include "asio/serial_port.hpp"
#include "asio/serial_port_base.hpp"
#include "asio/signal_set.hpp"
+#include "asio/signal_set_base.hpp"
#include "asio/socket_base.hpp"
#include "asio/static_thread_pool.hpp"
#include "asio/steady_timer.hpp"
#include "asio/strand.hpp"
+#include "asio/stream_file.hpp"
#include "asio/streambuf.hpp"
#include "asio/system_context.hpp"
#include "asio/system_error.hpp"
@@ -182,6 +192,7 @@
#include "asio/windows/overlapped_ptr.hpp"
#include "asio/windows/random_access_handle.hpp"
#include "asio/windows/stream_handle.hpp"
+#include "asio/writable_pipe.hpp"
#include "asio/write.hpp"
#include "asio/write_at.hpp"
diff --git a/3rdparty/asio/include/asio/any_completion_executor.hpp b/3rdparty/asio/include/asio/any_completion_executor.hpp
new file mode 100644
index 00000000000..650ff7bafdd
--- /dev/null
+++ b/3rdparty/asio/include/asio/any_completion_executor.hpp
@@ -0,0 +1,336 @@
+//
+// any_completion_executor.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 ASIO_ANY_COMPLETION_EXECUTOR_HPP
+#define ASIO_ANY_COMPLETION_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#if defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+# include "asio/executor.hpp"
+#else // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+# include "asio/execution.hpp"
+#endif // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+typedef executor any_completion_executor;
+
+#else // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+/// Polymorphic executor type for use with I/O objects.
+/**
+ * The @c any_completion_executor type is a polymorphic executor that supports
+ * the set of properties required for the execution of completion handlers. It
+ * is defined as the execution::any_executor class template parameterised as
+ * follows:
+ * @code execution::any_executor<
+ * execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ * execution::prefer_only<execution::outstanding_work_t::untracked_t>
+ * execution::prefer_only<execution::relationship_t::fork_t>,
+ * execution::prefer_only<execution::relationship_t::continuation_t>
+ * > @endcode
+ */
+class any_completion_executor :
+#if defined(GENERATING_DOCUMENTATION)
+ public execution::any_executor<...>
+#else // defined(GENERATING_DOCUMENTATION)
+ public execution::any_executor<
+ execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ execution::prefer_only<execution::outstanding_work_t::untracked_t>,
+ execution::prefer_only<execution::relationship_t::fork_t>,
+ execution::prefer_only<execution::relationship_t::continuation_t>
+ >
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+public:
+#if !defined(GENERATING_DOCUMENTATION)
+ typedef execution::any_executor<
+ execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ execution::prefer_only<execution::outstanding_work_t::untracked_t>,
+ execution::prefer_only<execution::relationship_t::fork_t>,
+ execution::prefer_only<execution::relationship_t::continuation_t>
+ > base_type;
+
+ typedef void supportable_properties_type(
+ execution::prefer_only<execution::outstanding_work_t::tracked_t>,
+ execution::prefer_only<execution::outstanding_work_t::untracked_t>,
+ execution::prefer_only<execution::relationship_t::fork_t>,
+ execution::prefer_only<execution::relationship_t::continuation_t>
+ );
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// Default constructor.
+ ASIO_DECL any_completion_executor() noexcept;
+
+ /// Construct in an empty state. Equivalent effects to default constructor.
+ ASIO_DECL any_completion_executor(nullptr_t) noexcept;
+
+ /// Copy constructor.
+ ASIO_DECL any_completion_executor(
+ const any_completion_executor& e) noexcept;
+
+ /// Move constructor.
+ ASIO_DECL any_completion_executor(
+ any_completion_executor&& e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <class... OtherSupportableProperties>
+ any_completion_executor(
+ execution::any_executor<OtherSupportableProperties...> e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <typename OtherAnyExecutor>
+ any_completion_executor(OtherAnyExecutor e,
+ constraint_t<
+ conditional<
+ !is_same<OtherAnyExecutor, any_completion_executor>::value
+ && is_base_of<execution::detail::any_executor_base,
+ OtherAnyExecutor>::value,
+ typename execution::detail::supportable_properties<
+ 0, supportable_properties_type>::template
+ is_valid_target<OtherAnyExecutor>,
+ false_type
+ >::type::value
+ > = 0)
+ : base_type(static_cast<OtherAnyExecutor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct to point to the same target as another any_executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <class... OtherSupportableProperties>
+ any_completion_executor(std::nothrow_t,
+ execution::any_executor<OtherSupportableProperties...> e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <typename OtherAnyExecutor>
+ any_completion_executor(std::nothrow_t, OtherAnyExecutor e,
+ constraint_t<
+ conditional<
+ !is_same<OtherAnyExecutor, any_completion_executor>::value
+ && is_base_of<execution::detail::any_executor_base,
+ OtherAnyExecutor>::value,
+ typename execution::detail::supportable_properties<
+ 0, supportable_properties_type>::template
+ is_valid_target<OtherAnyExecutor>,
+ false_type
+ >::type::value
+ > = 0) noexcept
+ : base_type(std::nothrow, static_cast<OtherAnyExecutor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct to point to the same target as another any_executor.
+ ASIO_DECL any_completion_executor(std::nothrow_t,
+ const any_completion_executor& e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+ ASIO_DECL any_completion_executor(std::nothrow_t,
+ any_completion_executor&& e) noexcept;
+
+ /// Construct a polymorphic wrapper for the specified executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_completion_executor(Executor e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_completion_executor(Executor e,
+ constraint_t<
+ conditional<
+ !is_same<Executor, any_completion_executor>::value
+ && !is_base_of<execution::detail::any_executor_base,
+ Executor>::value,
+ execution::detail::is_valid_target_executor<
+ Executor, supportable_properties_type>,
+ false_type
+ >::type::value
+ > = 0)
+ : base_type(static_cast<Executor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct a polymorphic wrapper for the specified executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_completion_executor(std::nothrow_t, Executor e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_completion_executor(std::nothrow_t, Executor e,
+ constraint_t<
+ conditional<
+ !is_same<Executor, any_completion_executor>::value
+ && !is_base_of<execution::detail::any_executor_base,
+ Executor>::value,
+ execution::detail::is_valid_target_executor<
+ Executor, supportable_properties_type>,
+ false_type
+ >::type::value
+ > = 0) noexcept
+ : base_type(std::nothrow, static_cast<Executor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Assignment operator.
+ ASIO_DECL any_completion_executor& operator=(
+ const any_completion_executor& e) noexcept;
+
+ /// Move assignment operator.
+ ASIO_DECL any_completion_executor& operator=(
+ any_completion_executor&& e) noexcept;
+
+ /// Assignment operator that sets the polymorphic wrapper to the empty state.
+ ASIO_DECL any_completion_executor& operator=(nullptr_t);
+
+ /// Destructor.
+ ASIO_DECL ~any_completion_executor();
+
+ /// Swap targets with another polymorphic wrapper.
+ ASIO_DECL void swap(any_completion_executor& other) noexcept;
+
+ /// Obtain a polymorphic wrapper with the specified property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::require and asio::prefer customisation points.
+ *
+ * For example:
+ * @code any_completion_executor ex = ...;
+ * auto ex2 = asio::require(ex, execution::relationship.fork); @endcode
+ */
+ template <typename Property>
+ any_completion_executor require(const Property& p,
+ constraint_t<
+ traits::require_member<const base_type&, const Property&>::is_valid
+ > = 0) const
+ {
+ return static_cast<const base_type&>(*this).require(p);
+ }
+
+ /// Obtain a polymorphic wrapper with the specified property.
+ /**
+ * Do not call this function directly. It is intended for use with the
+ * asio::prefer customisation point.
+ *
+ * For example:
+ * @code any_completion_executor ex = ...;
+ * auto ex2 = asio::prefer(ex, execution::relationship.fork); @endcode
+ */
+ template <typename Property>
+ any_completion_executor prefer(const Property& p,
+ constraint_t<
+ traits::prefer_member<const base_type&, const Property&>::is_valid
+ > = 0) const
+ {
+ return static_cast<const base_type&>(*this).prefer(p);
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <>
+ASIO_DECL any_completion_executor any_completion_executor::prefer(
+ const execution::outstanding_work_t::tracked_t&, int) const;
+
+template <>
+ASIO_DECL any_completion_executor any_completion_executor::prefer(
+ const execution::outstanding_work_t::untracked_t&, int) const;
+
+template <>
+ASIO_DECL any_completion_executor any_completion_executor::prefer(
+ const execution::relationship_t::fork_t&, int) const;
+
+template <>
+ASIO_DECL any_completion_executor any_completion_executor::prefer(
+ const execution::relationship_t::continuation_t&, int) const;
+
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<any_completion_executor>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<any_completion_executor, F>
+{
+ static const bool is_valid = true;
+ static const bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename Prop>
+struct query_member<any_completion_executor, Prop> :
+ query_member<any_completion_executor::base_type, Prop>
+{
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+template <typename Prop>
+struct require_member<any_completion_executor, Prop> :
+ require_member<any_completion_executor::base_type, Prop>
+{
+ typedef any_completion_executor result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+template <typename Prop>
+struct prefer_member<any_completion_executor, Prop> :
+ prefer_member<any_completion_executor::base_type, Prop>
+{
+ typedef any_completion_executor result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
+
+} // namespace traits
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#endif // defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY) \
+ && !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+# include "asio/impl/any_completion_executor.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+ // && !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#endif // ASIO_ANY_COMPLETION_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/any_completion_handler.hpp b/3rdparty/asio/include/asio/any_completion_handler.hpp
new file mode 100644
index 00000000000..45b3e75fec7
--- /dev/null
+++ b/3rdparty/asio/include/asio/any_completion_handler.hpp
@@ -0,0 +1,822 @@
+//
+// any_completion_handler.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 ASIO_ANY_COMPLETION_HANDLER_HPP
+#define ASIO_ANY_COMPLETION_HANDLER_HPP
+
+#include "asio/detail/config.hpp"
+#include <cstring>
+#include <functional>
+#include <memory>
+#include <utility>
+#include "asio/any_completion_executor.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/associated_immediate_executor.hpp"
+#include "asio/cancellation_state.hpp"
+#include "asio/recycling_allocator.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class any_completion_handler_impl_base
+{
+public:
+ template <typename S>
+ explicit any_completion_handler_impl_base(S&& slot)
+ : cancel_state_(static_cast<S&&>(slot), enable_total_cancellation())
+ {
+ }
+
+ cancellation_slot get_cancellation_slot() const noexcept
+ {
+ return cancel_state_.slot();
+ }
+
+private:
+ cancellation_state cancel_state_;
+};
+
+template <typename Handler>
+class any_completion_handler_impl :
+ public any_completion_handler_impl_base
+{
+public:
+ template <typename S, typename H>
+ any_completion_handler_impl(S&& slot, H&& h)
+ : any_completion_handler_impl_base(static_cast<S&&>(slot)),
+ handler_(static_cast<H&&>(h))
+ {
+ }
+
+ struct uninit_deleter
+ {
+ typename std::allocator_traits<
+ associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<any_completion_handler_impl> alloc;
+
+ void operator()(any_completion_handler_impl* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ };
+
+ struct deleter
+ {
+ typename std::allocator_traits<
+ associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<any_completion_handler_impl> alloc;
+
+ void operator()(any_completion_handler_impl* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::destroy(alloc, ptr);
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ };
+
+ template <typename S, typename H>
+ static any_completion_handler_impl* create(S&& slot, H&& h)
+ {
+ uninit_deleter d{
+ (get_associated_allocator)(h,
+ asio::recycling_allocator<void>())};
+
+ std::unique_ptr<any_completion_handler_impl, uninit_deleter> uninit_ptr(
+ std::allocator_traits<decltype(d.alloc)>::allocate(d.alloc, 1), d);
+
+ any_completion_handler_impl* ptr =
+ new (uninit_ptr.get()) any_completion_handler_impl(
+ static_cast<S&&>(slot), static_cast<H&&>(h));
+
+ uninit_ptr.release();
+ return ptr;
+ }
+
+ void destroy()
+ {
+ deleter d{
+ (get_associated_allocator)(handler_,
+ asio::recycling_allocator<void>())};
+
+ d(this);
+ }
+
+ any_completion_executor executor(
+ const any_completion_executor& candidate) const noexcept
+ {
+ return any_completion_executor(std::nothrow,
+ (get_associated_executor)(handler_, candidate));
+ }
+
+ any_completion_executor immediate_executor(
+ const any_io_executor& candidate) const noexcept
+ {
+ return any_completion_executor(std::nothrow,
+ (get_associated_immediate_executor)(handler_, candidate));
+ }
+
+ void* allocate(std::size_t size, std::size_t align) const
+ {
+ typename std::allocator_traits<
+ associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<unsigned char> alloc(
+ (get_associated_allocator)(handler_,
+ asio::recycling_allocator<void>()));
+
+ std::size_t space = size + align - 1;
+ unsigned char* base =
+ std::allocator_traits<decltype(alloc)>::allocate(
+ alloc, space + sizeof(std::ptrdiff_t));
+
+ void* p = base;
+ if (detail::align(align, size, p, space))
+ {
+ std::ptrdiff_t off = static_cast<unsigned char*>(p) - base;
+ std::memcpy(static_cast<unsigned char*>(p) + size, &off, sizeof(off));
+ return p;
+ }
+
+ std::bad_alloc ex;
+ asio::detail::throw_exception(ex);
+ return nullptr;
+ }
+
+ void deallocate(void* p, std::size_t size, std::size_t align) const
+ {
+ if (p)
+ {
+ typename std::allocator_traits<
+ associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<unsigned char> alloc(
+ (get_associated_allocator)(handler_,
+ asio::recycling_allocator<void>()));
+
+ std::ptrdiff_t off;
+ std::memcpy(&off, static_cast<unsigned char*>(p) + size, sizeof(off));
+ unsigned char* base = static_cast<unsigned char*>(p) - off;
+
+ std::allocator_traits<decltype(alloc)>::deallocate(
+ alloc, base, size + align -1 + sizeof(std::ptrdiff_t));
+ }
+ }
+
+ template <typename... Args>
+ void call(Args&&... args)
+ {
+ deleter d{
+ (get_associated_allocator)(handler_,
+ asio::recycling_allocator<void>())};
+
+ std::unique_ptr<any_completion_handler_impl, deleter> ptr(this, d);
+ Handler handler(static_cast<Handler&&>(handler_));
+ ptr.reset();
+
+ static_cast<Handler&&>(handler)(
+ static_cast<Args&&>(args)...);
+ }
+
+private:
+ Handler handler_;
+};
+
+template <typename Signature>
+class any_completion_handler_call_fn;
+
+template <typename R, typename... Args>
+class any_completion_handler_call_fn<R(Args...)>
+{
+public:
+ using type = void(*)(any_completion_handler_impl_base*, Args...);
+
+ constexpr any_completion_handler_call_fn(type fn)
+ : call_fn_(fn)
+ {
+ }
+
+ void call(any_completion_handler_impl_base* impl, Args... args) const
+ {
+ call_fn_(impl, static_cast<Args&&>(args)...);
+ }
+
+ template <typename Handler>
+ static void impl(any_completion_handler_impl_base* impl, Args... args)
+ {
+ static_cast<any_completion_handler_impl<Handler>*>(impl)->call(
+ static_cast<Args&&>(args)...);
+ }
+
+private:
+ type call_fn_;
+};
+
+template <typename... Signatures>
+class any_completion_handler_call_fns;
+
+template <typename Signature>
+class any_completion_handler_call_fns<Signature> :
+ public any_completion_handler_call_fn<Signature>
+{
+public:
+ using any_completion_handler_call_fn<
+ Signature>::any_completion_handler_call_fn;
+ using any_completion_handler_call_fn<Signature>::call;
+};
+
+template <typename Signature, typename... Signatures>
+class any_completion_handler_call_fns<Signature, Signatures...> :
+ public any_completion_handler_call_fn<Signature>,
+ public any_completion_handler_call_fns<Signatures...>
+{
+public:
+ template <typename CallFn, typename... CallFns>
+ constexpr any_completion_handler_call_fns(CallFn fn, CallFns... fns)
+ : any_completion_handler_call_fn<Signature>(fn),
+ any_completion_handler_call_fns<Signatures...>(fns...)
+ {
+ }
+
+ using any_completion_handler_call_fn<Signature>::call;
+ using any_completion_handler_call_fns<Signatures...>::call;
+};
+
+class any_completion_handler_destroy_fn
+{
+public:
+ using type = void(*)(any_completion_handler_impl_base*);
+
+ constexpr any_completion_handler_destroy_fn(type fn)
+ : destroy_fn_(fn)
+ {
+ }
+
+ void destroy(any_completion_handler_impl_base* impl) const
+ {
+ destroy_fn_(impl);
+ }
+
+ template <typename Handler>
+ static void impl(any_completion_handler_impl_base* impl)
+ {
+ static_cast<any_completion_handler_impl<Handler>*>(impl)->destroy();
+ }
+
+private:
+ type destroy_fn_;
+};
+
+class any_completion_handler_executor_fn
+{
+public:
+ using type = any_completion_executor(*)(
+ any_completion_handler_impl_base*, const any_completion_executor&);
+
+ constexpr any_completion_handler_executor_fn(type fn)
+ : executor_fn_(fn)
+ {
+ }
+
+ any_completion_executor executor(any_completion_handler_impl_base* impl,
+ const any_completion_executor& candidate) const
+ {
+ return executor_fn_(impl, candidate);
+ }
+
+ template <typename Handler>
+ static any_completion_executor impl(any_completion_handler_impl_base* impl,
+ const any_completion_executor& candidate)
+ {
+ return static_cast<any_completion_handler_impl<Handler>*>(impl)->executor(
+ candidate);
+ }
+
+private:
+ type executor_fn_;
+};
+
+class any_completion_handler_immediate_executor_fn
+{
+public:
+ using type = any_completion_executor(*)(
+ any_completion_handler_impl_base*, const any_io_executor&);
+
+ constexpr any_completion_handler_immediate_executor_fn(type fn)
+ : immediate_executor_fn_(fn)
+ {
+ }
+
+ any_completion_executor immediate_executor(
+ any_completion_handler_impl_base* impl,
+ const any_io_executor& candidate) const
+ {
+ return immediate_executor_fn_(impl, candidate);
+ }
+
+ template <typename Handler>
+ static any_completion_executor impl(any_completion_handler_impl_base* impl,
+ const any_io_executor& candidate)
+ {
+ return static_cast<any_completion_handler_impl<Handler>*>(
+ impl)->immediate_executor(candidate);
+ }
+
+private:
+ type immediate_executor_fn_;
+};
+
+class any_completion_handler_allocate_fn
+{
+public:
+ using type = void*(*)(any_completion_handler_impl_base*,
+ std::size_t, std::size_t);
+
+ constexpr any_completion_handler_allocate_fn(type fn)
+ : allocate_fn_(fn)
+ {
+ }
+
+ void* allocate(any_completion_handler_impl_base* impl,
+ std::size_t size, std::size_t align) const
+ {
+ return allocate_fn_(impl, size, align);
+ }
+
+ template <typename Handler>
+ static void* impl(any_completion_handler_impl_base* impl,
+ std::size_t size, std::size_t align)
+ {
+ return static_cast<any_completion_handler_impl<Handler>*>(impl)->allocate(
+ size, align);
+ }
+
+private:
+ type allocate_fn_;
+};
+
+class any_completion_handler_deallocate_fn
+{
+public:
+ using type = void(*)(any_completion_handler_impl_base*,
+ void*, std::size_t, std::size_t);
+
+ constexpr any_completion_handler_deallocate_fn(type fn)
+ : deallocate_fn_(fn)
+ {
+ }
+
+ void deallocate(any_completion_handler_impl_base* impl,
+ void* p, std::size_t size, std::size_t align) const
+ {
+ deallocate_fn_(impl, p, size, align);
+ }
+
+ template <typename Handler>
+ static void impl(any_completion_handler_impl_base* impl,
+ void* p, std::size_t size, std::size_t align)
+ {
+ static_cast<any_completion_handler_impl<Handler>*>(impl)->deallocate(
+ p, size, align);
+ }
+
+private:
+ type deallocate_fn_;
+};
+
+template <typename... Signatures>
+class any_completion_handler_fn_table
+ : private any_completion_handler_destroy_fn,
+ private any_completion_handler_executor_fn,
+ private any_completion_handler_immediate_executor_fn,
+ private any_completion_handler_allocate_fn,
+ private any_completion_handler_deallocate_fn,
+ private any_completion_handler_call_fns<Signatures...>
+{
+public:
+ template <typename... CallFns>
+ constexpr any_completion_handler_fn_table(
+ any_completion_handler_destroy_fn::type destroy_fn,
+ any_completion_handler_executor_fn::type executor_fn,
+ any_completion_handler_immediate_executor_fn::type immediate_executor_fn,
+ any_completion_handler_allocate_fn::type allocate_fn,
+ any_completion_handler_deallocate_fn::type deallocate_fn,
+ CallFns... call_fns)
+ : any_completion_handler_destroy_fn(destroy_fn),
+ any_completion_handler_executor_fn(executor_fn),
+ any_completion_handler_immediate_executor_fn(immediate_executor_fn),
+ any_completion_handler_allocate_fn(allocate_fn),
+ any_completion_handler_deallocate_fn(deallocate_fn),
+ any_completion_handler_call_fns<Signatures...>(call_fns...)
+ {
+ }
+
+ using any_completion_handler_destroy_fn::destroy;
+ using any_completion_handler_executor_fn::executor;
+ using any_completion_handler_immediate_executor_fn::immediate_executor;
+ using any_completion_handler_allocate_fn::allocate;
+ using any_completion_handler_deallocate_fn::deallocate;
+ using any_completion_handler_call_fns<Signatures...>::call;
+};
+
+template <typename Handler, typename... Signatures>
+struct any_completion_handler_fn_table_instance
+{
+ static constexpr any_completion_handler_fn_table<Signatures...>
+ value = any_completion_handler_fn_table<Signatures...>(
+ &any_completion_handler_destroy_fn::impl<Handler>,
+ &any_completion_handler_executor_fn::impl<Handler>,
+ &any_completion_handler_immediate_executor_fn::impl<Handler>,
+ &any_completion_handler_allocate_fn::impl<Handler>,
+ &any_completion_handler_deallocate_fn::impl<Handler>,
+ &any_completion_handler_call_fn<Signatures>::template impl<Handler>...);
+};
+
+template <typename Handler, typename... Signatures>
+constexpr any_completion_handler_fn_table<Signatures...>
+any_completion_handler_fn_table_instance<Handler, Signatures...>::value;
+
+} // namespace detail
+
+template <typename... Signatures>
+class any_completion_handler;
+
+/// An allocator type that forwards memory allocation operations through an
+/// instance of @c any_completion_handler.
+template <typename T, typename... Signatures>
+class any_completion_handler_allocator
+{
+private:
+ template <typename...>
+ friend class any_completion_handler;
+
+ template <typename, typename...>
+ friend class any_completion_handler_allocator;
+
+ const detail::any_completion_handler_fn_table<Signatures...>* fn_table_;
+ detail::any_completion_handler_impl_base* impl_;
+
+ constexpr any_completion_handler_allocator(int,
+ const any_completion_handler<Signatures...>& h) noexcept
+ : fn_table_(h.fn_table_),
+ impl_(h.impl_)
+ {
+ }
+
+public:
+ /// The type of objects that may be allocated by the allocator.
+ typedef T value_type;
+
+ /// Rebinds an allocator to another value type.
+ template <typename U>
+ struct rebind
+ {
+ /// Specifies the type of the rebound allocator.
+ typedef any_completion_handler_allocator<U, Signatures...> other;
+ };
+
+ /// Construct from another @c any_completion_handler_allocator.
+ template <typename U>
+ constexpr any_completion_handler_allocator(
+ const any_completion_handler_allocator<U, Signatures...>& a)
+ noexcept
+ : fn_table_(a.fn_table_),
+ impl_(a.impl_)
+ {
+ }
+
+ /// Equality operator.
+ constexpr bool operator==(
+ const any_completion_handler_allocator& other) const noexcept
+ {
+ return fn_table_ == other.fn_table_ && impl_ == other.impl_;
+ }
+
+ /// Inequality operator.
+ constexpr bool operator!=(
+ const any_completion_handler_allocator& other) const noexcept
+ {
+ return fn_table_ != other.fn_table_ || impl_ != other.impl_;
+ }
+
+ /// Allocate space for @c n objects of the allocator's value type.
+ T* allocate(std::size_t n) const
+ {
+ if (fn_table_)
+ {
+ return static_cast<T*>(
+ fn_table_->allocate(
+ impl_, sizeof(T) * n, alignof(T)));
+ }
+ std::bad_alloc ex;
+ asio::detail::throw_exception(ex);
+ return nullptr;
+ }
+
+ /// Deallocate space for @c n objects of the allocator's value type.
+ void deallocate(T* p, std::size_t n) const
+ {
+ fn_table_->deallocate(impl_, p, sizeof(T) * n, alignof(T));
+ }
+};
+
+/// A protoco-allocator type that may be rebound to obtain an allocator that
+/// forwards memory allocation operations through an instance of
+/// @c any_completion_handler.
+template <typename... Signatures>
+class any_completion_handler_allocator<void, Signatures...>
+{
+private:
+ template <typename...>
+ friend class any_completion_handler;
+
+ template <typename, typename...>
+ friend class any_completion_handler_allocator;
+
+ const detail::any_completion_handler_fn_table<Signatures...>* fn_table_;
+ detail::any_completion_handler_impl_base* impl_;
+
+ constexpr any_completion_handler_allocator(int,
+ const any_completion_handler<Signatures...>& h) noexcept
+ : fn_table_(h.fn_table_),
+ impl_(h.impl_)
+ {
+ }
+
+public:
+ /// @c void as no objects can be allocated through a proto-allocator.
+ typedef void value_type;
+
+ /// Rebinds an allocator to another value type.
+ template <typename U>
+ struct rebind
+ {
+ /// Specifies the type of the rebound allocator.
+ typedef any_completion_handler_allocator<U, Signatures...> other;
+ };
+
+ /// Construct from another @c any_completion_handler_allocator.
+ template <typename U>
+ constexpr any_completion_handler_allocator(
+ const any_completion_handler_allocator<U, Signatures...>& a)
+ noexcept
+ : fn_table_(a.fn_table_),
+ impl_(a.impl_)
+ {
+ }
+
+ /// Equality operator.
+ constexpr bool operator==(
+ const any_completion_handler_allocator& other) const noexcept
+ {
+ return fn_table_ == other.fn_table_ && impl_ == other.impl_;
+ }
+
+ /// Inequality operator.
+ constexpr bool operator!=(
+ const any_completion_handler_allocator& other) const noexcept
+ {
+ return fn_table_ != other.fn_table_ || impl_ != other.impl_;
+ }
+};
+
+/// Polymorphic wrapper for completion handlers.
+/**
+ * The @c any_completion_handler class template is a polymorphic wrapper for
+ * completion handlers that propagates the associated executor, associated
+ * allocator, and associated cancellation slot through a type-erasing interface.
+ *
+ * When using @c any_completion_handler, specify one or more completion
+ * signatures as template parameters. These will dictate the arguments that may
+ * be passed to the handler through the polymorphic interface.
+ *
+ * Typical uses for @c any_completion_handler include:
+ *
+ * @li Separate compilation of asynchronous operation implementations.
+ *
+ * @li Enabling interoperability between asynchronous operations and virtual
+ * functions.
+ */
+template <typename... Signatures>
+class any_completion_handler
+{
+#if !defined(GENERATING_DOCUMENTATION)
+private:
+ template <typename, typename...>
+ friend class any_completion_handler_allocator;
+
+ template <typename, typename>
+ friend struct associated_executor;
+
+ template <typename, typename>
+ friend struct associated_immediate_executor;
+
+ const detail::any_completion_handler_fn_table<Signatures...>* fn_table_;
+ detail::any_completion_handler_impl_base* impl_;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+public:
+ /// The associated allocator type.
+ using allocator_type = any_completion_handler_allocator<void, Signatures...>;
+
+ /// The associated cancellation slot type.
+ using cancellation_slot_type = cancellation_slot;
+
+ /// Construct an @c any_completion_handler in an empty state, without a target
+ /// object.
+ constexpr any_completion_handler()
+ : fn_table_(nullptr),
+ impl_(nullptr)
+ {
+ }
+
+ /// Construct an @c any_completion_handler in an empty state, without a target
+ /// object.
+ constexpr any_completion_handler(nullptr_t)
+ : fn_table_(nullptr),
+ impl_(nullptr)
+ {
+ }
+
+ /// Construct an @c any_completion_handler to contain the specified target.
+ template <typename H, typename Handler = decay_t<H>>
+ any_completion_handler(H&& h,
+ constraint_t<
+ !is_same<decay_t<H>, any_completion_handler>::value
+ > = 0)
+ : fn_table_(
+ &detail::any_completion_handler_fn_table_instance<
+ Handler, Signatures...>::value),
+ impl_(detail::any_completion_handler_impl<Handler>::create(
+ (get_associated_cancellation_slot)(h), static_cast<H&&>(h)))
+ {
+ }
+
+ /// Move-construct an @c any_completion_handler from another.
+ /**
+ * After the operation, the moved-from object @c other has no target.
+ */
+ any_completion_handler(any_completion_handler&& other) noexcept
+ : fn_table_(other.fn_table_),
+ impl_(other.impl_)
+ {
+ other.fn_table_ = nullptr;
+ other.impl_ = nullptr;
+ }
+
+ /// Move-assign an @c any_completion_handler from another.
+ /**
+ * After the operation, the moved-from object @c other has no target.
+ */
+ any_completion_handler& operator=(
+ any_completion_handler&& other) noexcept
+ {
+ any_completion_handler(
+ static_cast<any_completion_handler&&>(other)).swap(*this);
+ return *this;
+ }
+
+ /// Assignment operator that sets the polymorphic wrapper to the empty state.
+ any_completion_handler& operator=(nullptr_t) noexcept
+ {
+ any_completion_handler().swap(*this);
+ return *this;
+ }
+
+ /// Destructor.
+ ~any_completion_handler()
+ {
+ if (impl_)
+ fn_table_->destroy(impl_);
+ }
+
+ /// Test if the polymorphic wrapper is empty.
+ constexpr explicit operator bool() const noexcept
+ {
+ return impl_ != nullptr;
+ }
+
+ /// Test if the polymorphic wrapper is non-empty.
+ constexpr bool operator!() const noexcept
+ {
+ return impl_ == nullptr;
+ }
+
+ /// Swap the content of an @c any_completion_handler with another.
+ void swap(any_completion_handler& other) noexcept
+ {
+ std::swap(fn_table_, other.fn_table_);
+ std::swap(impl_, other.impl_);
+ }
+
+ /// Get the associated allocator.
+ allocator_type get_allocator() const noexcept
+ {
+ return allocator_type(0, *this);
+ }
+
+ /// Get the associated cancellation slot.
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return impl_ ? impl_->get_cancellation_slot() : cancellation_slot_type();
+ }
+
+ /// Function call operator.
+ /**
+ * Invokes target completion handler with the supplied arguments.
+ *
+ * This function may only be called once, as the target handler is moved from.
+ * The polymorphic wrapper is left in an empty state.
+ *
+ * Throws @c std::bad_function_call if the polymorphic wrapper is empty.
+ */
+ template <typename... Args>
+ auto operator()(Args&&... args)
+ -> decltype(fn_table_->call(impl_, static_cast<Args&&>(args)...))
+ {
+ if (detail::any_completion_handler_impl_base* impl = impl_)
+ {
+ impl_ = nullptr;
+ return fn_table_->call(impl, static_cast<Args&&>(args)...);
+ }
+ std::bad_function_call ex;
+ asio::detail::throw_exception(ex);
+ }
+
+ /// Equality operator.
+ friend constexpr bool operator==(
+ const any_completion_handler& a, nullptr_t) noexcept
+ {
+ return a.impl_ == nullptr;
+ }
+
+ /// Equality operator.
+ friend constexpr bool operator==(
+ nullptr_t, const any_completion_handler& b) noexcept
+ {
+ return nullptr == b.impl_;
+ }
+
+ /// Inequality operator.
+ friend constexpr bool operator!=(
+ const any_completion_handler& a, nullptr_t) noexcept
+ {
+ return a.impl_ != nullptr;
+ }
+
+ /// Inequality operator.
+ friend constexpr bool operator!=(
+ nullptr_t, const any_completion_handler& b) noexcept
+ {
+ return nullptr != b.impl_;
+ }
+};
+
+template <typename... Signatures, typename Candidate>
+struct associated_executor<any_completion_handler<Signatures...>, Candidate>
+{
+ using type = any_completion_executor;
+
+ static type get(const any_completion_handler<Signatures...>& handler,
+ const Candidate& candidate = Candidate()) noexcept
+ {
+ any_completion_executor any_candidate(std::nothrow, candidate);
+ return handler.fn_table_
+ ? handler.fn_table_->executor(handler.impl_, any_candidate)
+ : any_candidate;
+ }
+};
+
+template <typename... Signatures, typename Candidate>
+struct associated_immediate_executor<
+ any_completion_handler<Signatures...>, Candidate>
+{
+ using type = any_completion_executor;
+
+ static type get(const any_completion_handler<Signatures...>& handler,
+ const Candidate& candidate = Candidate()) noexcept
+ {
+ any_io_executor any_candidate(std::nothrow, candidate);
+ return handler.fn_table_
+ ? handler.fn_table_->immediate_executor(handler.impl_, any_candidate)
+ : any_candidate;
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_ANY_COMPLETION_HANDLER_HPP
diff --git a/3rdparty/asio/include/asio/any_io_executor.hpp b/3rdparty/asio/include/asio/any_io_executor.hpp
index 5f2c13f014c..d35acf44ae3 100644
--- a/3rdparty/asio/include/asio/any_io_executor.hpp
+++ b/3rdparty/asio/include/asio/any_io_executor.hpp
@@ -2,7 +2,7 @@
// any_io_executor.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -87,30 +87,16 @@ public:
#endif // !defined(GENERATING_DOCUMENTATION)
/// Default constructor.
- any_io_executor() ASIO_NOEXCEPT
- : base_type()
- {
- }
+ ASIO_DECL any_io_executor() noexcept;
/// Construct in an empty state. Equivalent effects to default constructor.
- any_io_executor(nullptr_t) ASIO_NOEXCEPT
- : base_type(nullptr_t())
- {
- }
+ ASIO_DECL any_io_executor(nullptr_t) noexcept;
/// Copy constructor.
- any_io_executor(const any_io_executor& e) ASIO_NOEXCEPT
- : base_type(static_cast<const base_type&>(e))
- {
- }
+ ASIO_DECL any_io_executor(const any_io_executor& e) noexcept;
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
- any_io_executor(any_io_executor&& e) ASIO_NOEXCEPT
- : base_type(static_cast<base_type&&>(e))
- {
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ ASIO_DECL any_io_executor(any_io_executor&& e) noexcept;
/// Construct to point to the same target as another any_executor.
#if defined(GENERATING_DOCUMENTATION)
@@ -119,8 +105,32 @@ public:
#else // defined(GENERATING_DOCUMENTATION)
template <typename OtherAnyExecutor>
any_io_executor(OtherAnyExecutor e,
- typename constraint<
- conditional<
+ constraint_t<
+ conditional_t<
+ !is_same<OtherAnyExecutor, any_io_executor>::value
+ && is_base_of<execution::detail::any_executor_base,
+ OtherAnyExecutor>::value,
+ typename execution::detail::supportable_properties<
+ 0, supportable_properties_type>::template
+ is_valid_target<OtherAnyExecutor>,
+ false_type
+ >::value
+ > = 0)
+ : base_type(static_cast<OtherAnyExecutor&&>(e))
+ {
+ }
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct to point to the same target as another any_executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <class... OtherSupportableProperties>
+ any_io_executor(std::nothrow_t,
+ execution::any_executor<OtherSupportableProperties...> e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <typename OtherAnyExecutor>
+ any_io_executor(std::nothrow_t, OtherAnyExecutor e,
+ constraint_t<
+ conditional_t<
!is_same<OtherAnyExecutor, any_io_executor>::value
&& is_base_of<execution::detail::any_executor_base,
OtherAnyExecutor>::value,
@@ -128,13 +138,20 @@ public:
0, supportable_properties_type>::template
is_valid_target<OtherAnyExecutor>,
false_type
- >::type::value
- >::type = 0)
- : base_type(ASIO_MOVE_CAST(OtherAnyExecutor)(e))
+ >::value
+ > = 0) noexcept
+ : base_type(std::nothrow, static_cast<OtherAnyExecutor&&>(e))
{
}
#endif // defined(GENERATING_DOCUMENTATION)
+ /// Construct to point to the same target as another any_executor.
+ ASIO_DECL any_io_executor(std::nothrow_t,
+ const any_io_executor& e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+ ASIO_DECL any_io_executor(std::nothrow_t, any_io_executor&& e) noexcept;
+
/// Construct a polymorphic wrapper for the specified executor.
#if defined(GENERATING_DOCUMENTATION)
template <ASIO_EXECUTION_EXECUTOR Executor>
@@ -142,54 +159,58 @@ public:
#else // defined(GENERATING_DOCUMENTATION)
template <ASIO_EXECUTION_EXECUTOR Executor>
any_io_executor(Executor e,
- typename constraint<
- conditional<
+ constraint_t<
+ conditional_t<
!is_same<Executor, any_io_executor>::value
&& !is_base_of<execution::detail::any_executor_base,
Executor>::value,
execution::detail::is_valid_target_executor<
Executor, supportable_properties_type>,
false_type
- >::type::value
- >::type = 0)
- : base_type(ASIO_MOVE_CAST(Executor)(e))
+ >::value
+ > = 0)
+ : base_type(static_cast<Executor&&>(e))
{
}
#endif // defined(GENERATING_DOCUMENTATION)
- /// Assignment operator.
- any_io_executor& operator=(const any_io_executor& e) ASIO_NOEXCEPT
+ /// Construct a polymorphic wrapper for the specified executor.
+#if defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_io_executor(std::nothrow_t, Executor e);
+#else // defined(GENERATING_DOCUMENTATION)
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_io_executor(std::nothrow_t, Executor e,
+ constraint_t<
+ conditional_t<
+ !is_same<Executor, any_io_executor>::value
+ && !is_base_of<execution::detail::any_executor_base,
+ Executor>::value,
+ execution::detail::is_valid_target_executor<
+ Executor, supportable_properties_type>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : base_type(std::nothrow, static_cast<Executor&&>(e))
{
- base_type::operator=(static_cast<const base_type&>(e));
- return *this;
}
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Assignment operator.
+ ASIO_DECL any_io_executor& operator=(
+ const any_io_executor& e) noexcept;
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move assignment operator.
- any_io_executor& operator=(any_io_executor&& e) ASIO_NOEXCEPT
- {
- base_type::operator=(static_cast<base_type&&>(e));
- return *this;
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ ASIO_DECL any_io_executor& operator=(any_io_executor&& e) noexcept;
/// Assignment operator that sets the polymorphic wrapper to the empty state.
- any_io_executor& operator=(nullptr_t)
- {
- base_type::operator=(nullptr_t());
- return *this;
- }
+ ASIO_DECL any_io_executor& operator=(nullptr_t);
/// Destructor.
- ~any_io_executor()
- {
- }
+ ASIO_DECL ~any_io_executor();
/// Swap targets with another polymorphic wrapper.
- void swap(any_io_executor& other) ASIO_NOEXCEPT
- {
- static_cast<base_type&>(*this).swap(static_cast<base_type&>(other));
- }
+ ASIO_DECL void swap(any_io_executor& other) noexcept;
/// Obtain a polymorphic wrapper with the specified property.
/**
@@ -202,9 +223,9 @@ public:
*/
template <typename Property>
any_io_executor require(const Property& p,
- typename constraint<
+ constraint_t<
traits::require_member<const base_type&, const Property&>::is_valid
- >::type = 0) const
+ > = 0) const
{
return static_cast<const base_type&>(*this).require(p);
}
@@ -220,9 +241,9 @@ public:
*/
template <typename Property>
any_io_executor prefer(const Property& p,
- typename constraint<
+ constraint_t<
traits::prefer_member<const base_type&, const Property&>::is_valid
- >::type = 0) const
+ > = 0) const
{
return static_cast<const base_type&>(*this).prefer(p);
}
@@ -230,6 +251,30 @@ public:
#if !defined(GENERATING_DOCUMENTATION)
+template <>
+ASIO_DECL any_io_executor any_io_executor::require(
+ const execution::blocking_t::never_t&, int) const;
+
+template <>
+ASIO_DECL any_io_executor any_io_executor::prefer(
+ const execution::blocking_t::possibly_t&, int) const;
+
+template <>
+ASIO_DECL any_io_executor any_io_executor::prefer(
+ const execution::outstanding_work_t::tracked_t&, int) const;
+
+template <>
+ASIO_DECL any_io_executor any_io_executor::prefer(
+ const execution::outstanding_work_t::untracked_t&, int) const;
+
+template <>
+ASIO_DECL any_io_executor any_io_executor::prefer(
+ const execution::relationship_t::fork_t&, int) const;
+
+template <>
+ASIO_DECL any_io_executor any_io_executor::prefer(
+ const execution::relationship_t::continuation_t&, int) const;
+
namespace traits {
#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -297,4 +342,10 @@ struct prefer_member<any_io_executor, Prop> :
#include "asio/detail/pop_options.hpp"
+#if defined(ASIO_HEADER_ONLY) \
+ && !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+# include "asio/impl/any_io_executor.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+ // && !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
#endif // ASIO_ANY_IO_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/append.hpp b/3rdparty/asio/include/asio/append.hpp
new file mode 100644
index 00000000000..04608924280
--- /dev/null
+++ b/3rdparty/asio/include/asio/append.hpp
@@ -0,0 +1,65 @@
+//
+// append.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 ASIO_APPEND_HPP
+#define ASIO_APPEND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Completion token type used to specify that the completion handler
+/// arguments should be passed additional values after the results of the
+/// operation.
+template <typename CompletionToken, typename... Values>
+class append_t
+{
+public:
+ /// Constructor.
+ template <typename T, typename... V>
+ constexpr explicit append_t(T&& completion_token, V&&... values)
+ : token_(static_cast<T&&>(completion_token)),
+ values_(static_cast<V&&>(values)...)
+ {
+ }
+
+//private:
+ CompletionToken token_;
+ std::tuple<Values...> values_;
+};
+
+/// Completion token type used to specify that the completion handler
+/// arguments should be passed additional values after the results of the
+/// operation.
+template <typename CompletionToken, typename... Values>
+ASIO_NODISCARD inline constexpr
+append_t<decay_t<CompletionToken>, decay_t<Values>...>
+append(CompletionToken&& completion_token, Values&&... values)
+{
+ return append_t<decay_t<CompletionToken>, decay_t<Values>...>(
+ static_cast<CompletionToken&&>(completion_token),
+ static_cast<Values&&>(values)...);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/append.hpp"
+
+#endif // ASIO_APPEND_HPP
diff --git a/3rdparty/asio/include/asio/as_tuple.hpp b/3rdparty/asio/include/asio/as_tuple.hpp
new file mode 100644
index 00000000000..60008bda5c2
--- /dev/null
+++ b/3rdparty/asio/include/asio/as_tuple.hpp
@@ -0,0 +1,126 @@
+//
+// as_tuple.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 ASIO_AS_TUPLE_HPP
+#define ASIO_AS_TUPLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// A @ref completion_token adapter used to specify that the completion handler
+/// arguments should be combined into a single tuple argument.
+/**
+ * The as_tuple_t class is used to indicate that any arguments to the
+ * completion handler should be combined and passed as a single tuple argument.
+ * The arguments are first moved into a @c std::tuple and that tuple is then
+ * passed to the completion handler.
+ */
+template <typename CompletionToken>
+class as_tuple_t
+{
+public:
+ /// Tag type used to prevent the "default" constructor from being used for
+ /// conversions.
+ struct default_constructor_tag {};
+
+ /// Default constructor.
+ /**
+ * This constructor is only valid if the underlying completion token is
+ * default constructible and move constructible. The underlying completion
+ * token is itself defaulted as an argument to allow it to capture a source
+ * location.
+ */
+ constexpr as_tuple_t(
+ default_constructor_tag = default_constructor_tag(),
+ CompletionToken token = CompletionToken())
+ : token_(static_cast<CompletionToken&&>(token))
+ {
+ }
+
+ /// Constructor.
+ template <typename T>
+ constexpr explicit as_tuple_t(
+ T&& completion_token)
+ : token_(static_cast<T&&>(completion_token))
+ {
+ }
+
+ /// Adapts an executor to add the @c as_tuple_t completion token as the
+ /// default.
+ template <typename InnerExecutor>
+ struct executor_with_default : InnerExecutor
+ {
+ /// Specify @c as_tuple_t as the default completion token type.
+ typedef as_tuple_t default_completion_token_type;
+
+ /// Construct the adapted executor from the inner executor type.
+ template <typename InnerExecutor1>
+ executor_with_default(const InnerExecutor1& ex,
+ constraint_t<
+ conditional_t<
+ !is_same<InnerExecutor1, executor_with_default>::value,
+ is_convertible<InnerExecutor1, InnerExecutor>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+ };
+
+ /// Type alias to adapt an I/O object to use @c as_tuple_t as its
+ /// default completion token type.
+ template <typename T>
+ using as_default_on_t = typename T::template rebind_executor<
+ executor_with_default<typename T::executor_type>>::other;
+
+ /// Function helper to adapt an I/O object to use @c as_tuple_t as its
+ /// default completion token type.
+ template <typename T>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other
+ as_default_on(T&& object)
+ {
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
+ }
+
+//private:
+ CompletionToken token_;
+};
+
+/// Adapt a @ref completion_token to specify that the completion handler
+/// arguments should be combined into a single tuple argument.
+template <typename CompletionToken>
+ASIO_NODISCARD inline
+constexpr as_tuple_t<decay_t<CompletionToken>>
+as_tuple(CompletionToken&& completion_token)
+{
+ return as_tuple_t<decay_t<CompletionToken>>(
+ static_cast<CompletionToken&&>(completion_token));
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/as_tuple.hpp"
+
+#endif // ASIO_AS_TUPLE_HPP
diff --git a/3rdparty/asio/include/asio/associated_allocator.hpp b/3rdparty/asio/include/asio/associated_allocator.hpp
index 3f945834a95..f21ea250efb 100644
--- a/3rdparty/asio/include/asio/associated_allocator.hpp
+++ b/3rdparty/asio/include/asio/associated_allocator.hpp
@@ -2,7 +2,7 @@
// associated_allocator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -36,43 +36,54 @@ struct has_allocator_type : false_type
};
template <typename T>
-struct has_allocator_type<T,
- typename void_type<typename T::executor_type>::type>
- : true_type
+struct has_allocator_type<T, void_t<typename T::allocator_type>> : true_type
{
};
-template <typename T, typename E, typename = void, typename = void>
+template <typename T, typename A, typename = void, typename = void>
struct associated_allocator_impl
{
- typedef E type;
+ typedef void asio_associated_allocator_is_unspecialised;
- static type get(const T&, const E& e) ASIO_NOEXCEPT
+ typedef A type;
+
+ static type get(const T&) noexcept
+ {
+ return type();
+ }
+
+ static const type& get(const T&, const A& a) noexcept
{
- return e;
+ return a;
}
};
-template <typename T, typename E>
-struct associated_allocator_impl<T, E,
- typename void_type<typename T::allocator_type>::type>
+template <typename T, typename A>
+struct associated_allocator_impl<T, A, void_t<typename T::allocator_type>>
{
typedef typename T::allocator_type type;
- static type get(const T& t, const E&) ASIO_NOEXCEPT
+ static auto get(const T& t) noexcept
+ -> decltype(t.get_allocator())
+ {
+ return t.get_allocator();
+ }
+
+ static auto get(const T& t, const A&) noexcept
+ -> decltype(t.get_allocator())
{
return t.get_allocator();
}
};
-template <typename T, typename E>
-struct associated_allocator_impl<T, E,
- typename enable_if<
+template <typename T, typename A>
+struct associated_allocator_impl<T, A,
+ enable_if_t<
!has_allocator_type<T>::value
- >::type,
- typename void_type<
- typename associator<associated_allocator, T, E>::type
- >::type> : associator<associated_allocator, T, E>
+ >,
+ void_t<
+ typename associator<associated_allocator, T, A>::type
+ >> : associator<associated_allocator, T, A>
{
};
@@ -92,29 +103,32 @@ struct associated_allocator_impl<T, E,
* Allocator requirements.
*
* @li Provide a noexcept static member function named @c get, callable as @c
- * get(t) and with return type @c type.
+ * get(t) and with return type @c type or a (possibly const) reference to @c
+ * type.
*
* @li Provide a noexcept static member function named @c get, callable as @c
- * get(t,a) and with return type @c type.
+ * get(t,a) and with return type @c type or a (possibly const) reference to @c
+ * type.
*/
-template <typename T, typename Allocator = std::allocator<void> >
+template <typename T, typename Allocator = std::allocator<void>>
struct associated_allocator
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_allocator_impl<T, Allocator>
+#endif // !defined(GENERATING_DOCUMENTATION)
{
+#if defined(GENERATING_DOCUMENTATION)
/// If @c T has a nested type @c allocator_type, <tt>T::allocator_type</tt>.
/// Otherwise @c Allocator.
-#if defined(GENERATING_DOCUMENTATION)
typedef see_below type;
-#else // defined(GENERATING_DOCUMENTATION)
- typedef typename detail::associated_allocator_impl<T, Allocator>::type type;
-#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// If @c T has a nested type @c allocator_type, returns
+ /// <tt>t.get_allocator()</tt>. Otherwise returns @c type().
+ static decltype(auto) get(const T& t) noexcept;
/// If @c T has a nested type @c allocator_type, returns
/// <tt>t.get_allocator()</tt>. Otherwise returns @c a.
- static type get(const T& t,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
- {
- return detail::associated_allocator_impl<T, Allocator>::get(t, a);
- }
+ static decltype(auto) get(const T& t, const Allocator& a) noexcept;
+#endif // defined(GENERATING_DOCUMENTATION)
};
/// Helper function to obtain an object's associated allocator.
@@ -122,8 +136,8 @@ struct associated_allocator
* @returns <tt>associated_allocator<T>::get(t)</tt>
*/
template <typename T>
-inline typename associated_allocator<T>::type
-get_associated_allocator(const T& t) ASIO_NOEXCEPT
+ASIO_NODISCARD inline typename associated_allocator<T>::type
+get_associated_allocator(const T& t) noexcept
{
return associated_allocator<T>::get(t);
}
@@ -133,26 +147,45 @@ get_associated_allocator(const T& t) ASIO_NOEXCEPT
* @returns <tt>associated_allocator<T, Allocator>::get(t, a)</tt>
*/
template <typename T, typename Allocator>
-inline typename associated_allocator<T, Allocator>::type
-get_associated_allocator(const T& t, const Allocator& a) ASIO_NOEXCEPT
+ASIO_NODISCARD inline auto get_associated_allocator(
+ const T& t, const Allocator& a) noexcept
+ -> decltype(associated_allocator<T, Allocator>::get(t, a))
{
return associated_allocator<T, Allocator>::get(t, a);
}
-#if defined(ASIO_HAS_ALIAS_TEMPLATES)
-
-template <typename T, typename Allocator = std::allocator<void> >
+template <typename T, typename Allocator = std::allocator<void>>
using associated_allocator_t
= typename associated_allocator<T, Allocator>::type;
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
+namespace detail {
+
+template <typename T, typename A, typename = void>
+struct associated_allocator_forwarding_base
+{
+};
-#if defined(ASIO_HAS_STD_REFERENCE_WRAPPER) \
- || defined(GENERATING_DOCUMENTATION)
+template <typename T, typename A>
+struct associated_allocator_forwarding_base<T, A,
+ enable_if_t<
+ is_same<
+ typename associated_allocator<T,
+ A>::asio_associated_allocator_is_unspecialised,
+ void
+ >::value
+ >>
+{
+ typedef void asio_associated_allocator_is_unspecialised;
+};
+
+} // namespace detail
/// Specialisation of associated_allocator for @c std::reference_wrapper.
template <typename T, typename Allocator>
struct associated_allocator<reference_wrapper<T>, Allocator>
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_allocator_forwarding_base<T, Allocator>
+#endif // !defined(GENERATING_DOCUMENTATION)
{
/// Forwards @c type to the associator specialisation for the unwrapped type
/// @c T.
@@ -160,16 +193,20 @@ struct associated_allocator<reference_wrapper<T>, Allocator>
/// Forwards the request to get the allocator to the associator specialisation
/// for the unwrapped type @c T.
- static type get(reference_wrapper<T> t,
- const Allocator& a = Allocator()) ASIO_NOEXCEPT
+ static type get(reference_wrapper<T> t) noexcept
+ {
+ return associated_allocator<T, Allocator>::get(t.get());
+ }
+
+ /// Forwards the request to get the allocator to the associator specialisation
+ /// for the unwrapped type @c T.
+ static auto get(reference_wrapper<T> t, const Allocator& a) noexcept
+ -> decltype(associated_allocator<T, Allocator>::get(t.get(), a))
{
return associated_allocator<T, Allocator>::get(t.get(), a);
}
};
-#endif // defined(ASIO_HAS_STD_REFERENCE_WRAPPER)
- // || defined(GENERATING_DOCUMENTATION)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/associated_cancellation_slot.hpp b/3rdparty/asio/include/asio/associated_cancellation_slot.hpp
index 6a809e71104..518bd881eaf 100644
--- a/3rdparty/asio/include/asio/associated_cancellation_slot.hpp
+++ b/3rdparty/asio/include/asio/associated_cancellation_slot.hpp
@@ -2,7 +2,7 @@
// associated_cancellation_slot.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,6 +18,7 @@
#include "asio/detail/config.hpp"
#include "asio/associator.hpp"
#include "asio/cancellation_signal.hpp"
+#include "asio/detail/functional.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/detail/push_options.hpp"
@@ -35,9 +36,8 @@ struct has_cancellation_slot_type : false_type
};
template <typename T>
-struct has_cancellation_slot_type<T,
- typename void_type<typename T::cancellation_slot_type>::type>
- : true_type
+struct has_cancellation_slot_type<T, void_t<typename T::cancellation_slot_type>>
+ : true_type
{
};
@@ -48,7 +48,12 @@ struct associated_cancellation_slot_impl
typedef S type;
- static type get(const T&, const S& s = S()) ASIO_NOEXCEPT
+ static type get(const T&) noexcept
+ {
+ return type();
+ }
+
+ static const type& get(const T&, const S& s) noexcept
{
return s;
}
@@ -56,11 +61,18 @@ struct associated_cancellation_slot_impl
template <typename T, typename S>
struct associated_cancellation_slot_impl<T, S,
- typename void_type<typename T::cancellation_slot_type>::type>
+ void_t<typename T::cancellation_slot_type>>
{
typedef typename T::cancellation_slot_type type;
- static type get(const T& t, const S& = S()) ASIO_NOEXCEPT
+ static auto get(const T& t) noexcept
+ -> decltype(t.get_cancellation_slot())
+ {
+ return t.get_cancellation_slot();
+ }
+
+ static auto get(const T& t, const S&) noexcept
+ -> decltype(t.get_cancellation_slot())
{
return t.get_cancellation_slot();
}
@@ -68,12 +80,12 @@ struct associated_cancellation_slot_impl<T, S,
template <typename T, typename S>
struct associated_cancellation_slot_impl<T, S,
- typename enable_if<
+ enable_if_t<
!has_cancellation_slot_type<T>::value
- >::type,
- typename void_type<
+ >,
+ void_t<
typename associator<associated_cancellation_slot, T, S>::type
- >::type> : associator<associated_cancellation_slot, T, S>
+ >> : associator<associated_cancellation_slot, T, S>
{
};
@@ -93,10 +105,12 @@ struct associated_cancellation_slot_impl<T, S,
* CancellationSlot requirements.
*
* @li Provide a noexcept static member function named @c get, callable as @c
- * get(t) and with return type @c type.
+ * get(t) and with return type @c type or a (possibly const) reference to @c
+ * type.
*
* @li Provide a noexcept static member function named @c get, callable as @c
- * get(t,s) and with return type @c type.
+ * get(t,s) and with return type @c type or a (possibly const) reference to @c
+ * type.
*/
template <typename T, typename CancellationSlot = cancellation_slot>
struct associated_cancellation_slot
@@ -111,9 +125,13 @@ struct associated_cancellation_slot
typedef see_below type;
/// If @c T has a nested type @c cancellation_slot_type, returns
+ /// <tt>t.get_cancellation_slot()</tt>. Otherwise returns @c type().
+ static decltype(auto) get(const T& t) noexcept;
+
+ /// If @c T has a nested type @c cancellation_slot_type, returns
/// <tt>t.get_cancellation_slot()</tt>. Otherwise returns @c s.
- static type get(const T& t,
- const CancellationSlot& s = CancellationSlot()) ASIO_NOEXCEPT;
+ static decltype(auto) get(const T& t,
+ const CancellationSlot& s) noexcept;
#endif // defined(GENERATING_DOCUMENTATION)
};
@@ -122,8 +140,8 @@ struct associated_cancellation_slot
* @returns <tt>associated_cancellation_slot<T>::get(t)</tt>
*/
template <typename T>
-inline typename associated_cancellation_slot<T>::type
-get_associated_cancellation_slot(const T& t) ASIO_NOEXCEPT
+ASIO_NODISCARD inline typename associated_cancellation_slot<T>::type
+get_associated_cancellation_slot(const T& t) noexcept
{
return associated_cancellation_slot<T>::get(t);
}
@@ -134,21 +152,17 @@ get_associated_cancellation_slot(const T& t) ASIO_NOEXCEPT
* CancellationSlot>::get(t, st)</tt>
*/
template <typename T, typename CancellationSlot>
-inline typename associated_cancellation_slot<T, CancellationSlot>::type
-get_associated_cancellation_slot(const T& t,
- const CancellationSlot& st) ASIO_NOEXCEPT
+ASIO_NODISCARD inline auto get_associated_cancellation_slot(
+ const T& t, const CancellationSlot& st) noexcept
+ -> decltype(associated_cancellation_slot<T, CancellationSlot>::get(t, st))
{
return associated_cancellation_slot<T, CancellationSlot>::get(t, st);
}
-#if defined(ASIO_HAS_ALIAS_TEMPLATES)
-
template <typename T, typename CancellationSlot = cancellation_slot>
using associated_cancellation_slot_t =
typename associated_cancellation_slot<T, CancellationSlot>::type;
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
-
namespace detail {
template <typename T, typename S, typename = void>
@@ -158,18 +172,48 @@ struct associated_cancellation_slot_forwarding_base
template <typename T, typename S>
struct associated_cancellation_slot_forwarding_base<T, S,
- typename enable_if<
+ enable_if_t<
is_same<
typename associated_cancellation_slot<T,
S>::asio_associated_cancellation_slot_is_unspecialised,
void
>::value
- >::type>
+ >>
{
typedef void asio_associated_cancellation_slot_is_unspecialised;
};
} // namespace detail
+
+/// Specialisation of associated_cancellation_slot for @c
+/// std::reference_wrapper.
+template <typename T, typename CancellationSlot>
+struct associated_cancellation_slot<reference_wrapper<T>, CancellationSlot>
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_cancellation_slot_forwarding_base<T, CancellationSlot>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+ /// Forwards @c type to the associator specialisation for the unwrapped type
+ /// @c T.
+ typedef typename associated_cancellation_slot<T, CancellationSlot>::type type;
+
+ /// Forwards the request to get the cancellation slot to the associator
+ /// specialisation for the unwrapped type @c T.
+ static type get(reference_wrapper<T> t) noexcept
+ {
+ return associated_cancellation_slot<T, CancellationSlot>::get(t.get());
+ }
+
+ /// Forwards the request to get the cancellation slot to the associator
+ /// specialisation for the unwrapped type @c T.
+ static auto get(reference_wrapper<T> t, const CancellationSlot& s) noexcept
+ -> decltype(
+ associated_cancellation_slot<T, CancellationSlot>::get(t.get(), s))
+ {
+ return associated_cancellation_slot<T, CancellationSlot>::get(t.get(), s);
+ }
+};
+
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/associated_executor.hpp b/3rdparty/asio/include/asio/associated_executor.hpp
index 1e62e37a12e..4ca7ba149e9 100644
--- a/3rdparty/asio/include/asio/associated_executor.hpp
+++ b/3rdparty/asio/include/asio/associated_executor.hpp
@@ -2,7 +2,7 @@
// associated_executor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -38,8 +38,7 @@ struct has_executor_type : false_type
};
template <typename T>
-struct has_executor_type<T,
- typename void_type<typename T::executor_type>::type>
+struct has_executor_type<T, void_t<typename T::executor_type>>
: true_type
{
};
@@ -51,19 +50,30 @@ struct associated_executor_impl
typedef E type;
- static type get(const T&, const E& e = E()) ASIO_NOEXCEPT
+ static type get(const T&) noexcept
+ {
+ return type();
+ }
+
+ static const type& get(const T&, const E& e) noexcept
{
return e;
}
};
template <typename T, typename E>
-struct associated_executor_impl<T, E,
- typename void_type<typename T::executor_type>::type>
+struct associated_executor_impl<T, E, void_t<typename T::executor_type>>
{
typedef typename T::executor_type type;
- static type get(const T& t, const E& = E()) ASIO_NOEXCEPT
+ static auto get(const T& t) noexcept
+ -> decltype(t.get_executor())
+ {
+ return t.get_executor();
+ }
+
+ static auto get(const T& t, const E&) noexcept
+ -> decltype(t.get_executor())
{
return t.get_executor();
}
@@ -71,12 +81,12 @@ struct associated_executor_impl<T, E,
template <typename T, typename E>
struct associated_executor_impl<T, E,
- typename enable_if<
+ enable_if_t<
!has_executor_type<T>::value
- >::type,
- typename void_type<
+ >,
+ void_t<
typename associator<associated_executor, T, E>::type
- >::type> : associator<associated_executor, T, E>
+ >> : associator<associated_executor, T, E>
{
};
@@ -96,10 +106,12 @@ struct associated_executor_impl<T, E,
* Executor requirements.
*
* @li Provide a noexcept static member function named @c get, callable as @c
- * get(t) and with return type @c type.
+ * get(t) and with return type @c type or a (possibly const) reference to @c
+ * type.
*
* @li Provide a noexcept static member function named @c get, callable as @c
- * get(t,e) and with return type @c type.
+ * get(t,e) and with return type @c type or a (possibly const) reference to @c
+ * type.
*/
template <typename T, typename Executor = system_executor>
struct associated_executor
@@ -113,9 +125,12 @@ struct associated_executor
typedef see_below type;
/// If @c T has a nested type @c executor_type, returns
+ /// <tt>t.get_executor()</tt>. Otherwise returns @c type().
+ static decltype(auto) get(const T& t) noexcept;
+
+ /// If @c T has a nested type @c executor_type, returns
/// <tt>t.get_executor()</tt>. Otherwise returns @c ex.
- static type get(const T& t,
- const Executor& ex = Executor()) ASIO_NOEXCEPT;
+ static decltype(auto) get(const T& t, const Executor& ex) noexcept;
#endif // defined(GENERATING_DOCUMENTATION)
};
@@ -124,8 +139,8 @@ struct associated_executor
* @returns <tt>associated_executor<T>::get(t)</tt>
*/
template <typename T>
-inline typename associated_executor<T>::type
-get_associated_executor(const T& t) ASIO_NOEXCEPT
+ASIO_NODISCARD inline typename associated_executor<T>::type
+get_associated_executor(const T& t) noexcept
{
return associated_executor<T>::get(t);
}
@@ -135,11 +150,12 @@ get_associated_executor(const T& t) ASIO_NOEXCEPT
* @returns <tt>associated_executor<T, Executor>::get(t, ex)</tt>
*/
template <typename T, typename Executor>
-inline typename associated_executor<T, Executor>::type
-get_associated_executor(const T& t, const Executor& ex,
- typename constraint<
+ASIO_NODISCARD inline auto get_associated_executor(
+ const T& t, const Executor& ex,
+ constraint_t<
is_executor<Executor>::value || execution::is_executor<Executor>::value
- >::type = 0) ASIO_NOEXCEPT
+ > = 0) noexcept
+ -> decltype(associated_executor<T, Executor>::get(t, ex))
{
return associated_executor<T, Executor>::get(t, ex);
}
@@ -150,23 +166,19 @@ get_associated_executor(const T& t, const Executor& ex,
* ExecutionContext::executor_type>::get(t, ctx.get_executor())</tt>
*/
template <typename T, typename ExecutionContext>
-inline typename associated_executor<T,
- typename ExecutionContext::executor_type>::type
+ASIO_NODISCARD inline typename associated_executor<T,
+ typename ExecutionContext::executor_type>::type
get_associated_executor(const T& t, ExecutionContext& ctx,
- typename constraint<is_convertible<ExecutionContext&,
- execution_context&>::value>::type = 0) ASIO_NOEXCEPT
+ constraint_t<is_convertible<ExecutionContext&,
+ execution_context&>::value> = 0) noexcept
{
return associated_executor<T,
typename ExecutionContext::executor_type>::get(t, ctx.get_executor());
}
-#if defined(ASIO_HAS_ALIAS_TEMPLATES)
-
template <typename T, typename Executor = system_executor>
using associated_executor_t = typename associated_executor<T, Executor>::type;
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
-
namespace detail {
template <typename T, typename E, typename = void>
@@ -176,22 +188,19 @@ struct associated_executor_forwarding_base
template <typename T, typename E>
struct associated_executor_forwarding_base<T, E,
- typename enable_if<
+ enable_if_t<
is_same<
typename associated_executor<T,
E>::asio_associated_executor_is_unspecialised,
void
>::value
- >::type>
+ >>
{
typedef void asio_associated_executor_is_unspecialised;
};
} // namespace detail
-#if defined(ASIO_HAS_STD_REFERENCE_WRAPPER) \
- || defined(GENERATING_DOCUMENTATION)
-
/// Specialisation of associated_executor for @c std::reference_wrapper.
template <typename T, typename Executor>
struct associated_executor<reference_wrapper<T>, Executor>
@@ -205,16 +214,20 @@ struct associated_executor<reference_wrapper<T>, Executor>
/// Forwards the request to get the executor to the associator specialisation
/// for the unwrapped type @c T.
- static type get(reference_wrapper<T> t,
- const Executor& ex = Executor()) ASIO_NOEXCEPT
+ static type get(reference_wrapper<T> t) noexcept
+ {
+ return associated_executor<T, Executor>::get(t.get());
+ }
+
+ /// Forwards the request to get the executor to the associator specialisation
+ /// for the unwrapped type @c T.
+ static auto get(reference_wrapper<T> t, const Executor& ex) noexcept
+ -> decltype(associated_executor<T, Executor>::get(t.get(), ex))
{
return associated_executor<T, Executor>::get(t.get(), ex);
}
};
-#endif // defined(ASIO_HAS_STD_REFERENCE_WRAPPER)
- // || defined(GENERATING_DOCUMENTATION)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/associated_immediate_executor.hpp b/3rdparty/asio/include/asio/associated_immediate_executor.hpp
new file mode 100644
index 00000000000..aa6e0fcfee7
--- /dev/null
+++ b/3rdparty/asio/include/asio/associated_immediate_executor.hpp
@@ -0,0 +1,280 @@
+//
+// associated_immediate_executor.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 ASIO_ASSOCIATED_IMMEDIATE_EXECUTOR_HPP
+#define ASIO_ASSOCIATED_IMMEDIATE_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/detail/functional.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/is_executor.hpp"
+#include "asio/require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+template <typename T, typename Executor>
+struct associated_immediate_executor;
+
+namespace detail {
+
+template <typename T, typename = void>
+struct has_immediate_executor_type : false_type
+{
+};
+
+template <typename T>
+struct has_immediate_executor_type<T,
+ void_t<typename T::immediate_executor_type>>
+ : true_type
+{
+};
+
+template <typename E, typename = void, typename = void>
+struct default_immediate_executor
+{
+ typedef require_result_t<E, execution::blocking_t::never_t> type;
+
+ static type get(const E& e) noexcept
+ {
+ return asio::require(e, execution::blocking.never);
+ }
+};
+
+template <typename E>
+struct default_immediate_executor<E,
+ enable_if_t<
+ !execution::is_executor<E>::value
+ >,
+ enable_if_t<
+ is_executor<E>::value
+ >>
+{
+ class type : public E
+ {
+ public:
+ template <typename Executor1>
+ explicit type(const Executor1& e,
+ constraint_t<
+ conditional_t<
+ !is_same<Executor1, type>::value,
+ is_convertible<Executor1, E>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : E(e)
+ {
+ }
+
+ type(const type& other) noexcept
+ : E(static_cast<const E&>(other))
+ {
+ }
+
+ type(type&& other) noexcept
+ : E(static_cast<E&&>(other))
+ {
+ }
+
+ template <typename Function, typename Allocator>
+ void dispatch(Function&& f, const Allocator& a) const
+ {
+ this->post(static_cast<Function&&>(f), a);
+ }
+
+ friend bool operator==(const type& a, const type& b) noexcept
+ {
+ return static_cast<const E&>(a) == static_cast<const E&>(b);
+ }
+
+ friend bool operator!=(const type& a, const type& b) noexcept
+ {
+ return static_cast<const E&>(a) != static_cast<const E&>(b);
+ }
+ };
+
+ static type get(const E& e) noexcept
+ {
+ return type(e);
+ }
+};
+
+template <typename T, typename E, typename = void, typename = void>
+struct associated_immediate_executor_impl
+{
+ typedef void asio_associated_immediate_executor_is_unspecialised;
+
+ typedef typename default_immediate_executor<E>::type type;
+
+ static auto get(const T&, const E& e) noexcept
+ -> decltype(default_immediate_executor<E>::get(e))
+ {
+ return default_immediate_executor<E>::get(e);
+ }
+};
+
+template <typename T, typename E>
+struct associated_immediate_executor_impl<T, E,
+ void_t<typename T::immediate_executor_type>>
+{
+ typedef typename T::immediate_executor_type type;
+
+ static auto get(const T& t, const E&) noexcept
+ -> decltype(t.get_immediate_executor())
+ {
+ return t.get_immediate_executor();
+ }
+};
+
+template <typename T, typename E>
+struct associated_immediate_executor_impl<T, E,
+ enable_if_t<
+ !has_immediate_executor_type<T>::value
+ >,
+ void_t<
+ typename associator<associated_immediate_executor, T, E>::type
+ >> : associator<associated_immediate_executor, T, E>
+{
+};
+
+} // namespace detail
+
+/// Traits type used to obtain the immediate executor associated with an object.
+/**
+ * A program may specialise this traits type if the @c T template parameter in
+ * the specialisation is a user-defined type. The template parameter @c
+ * Executor shall be a type meeting the Executor requirements.
+ *
+ * Specialisations shall meet the following requirements, where @c t is a const
+ * reference to an object of type @c T, and @c e is an object of type @c
+ * Executor.
+ *
+ * @li Provide a nested typedef @c type that identifies a type meeting the
+ * Executor requirements.
+ *
+ * @li Provide a noexcept static member function named @c get, callable as @c
+ * get(t) and with return type @c type or a (possibly const) reference to @c
+ * type.
+ *
+ * @li Provide a noexcept static member function named @c get, callable as @c
+ * get(t,e) and with return type @c type or a (possibly const) reference to @c
+ * type.
+ */
+template <typename T, typename Executor>
+struct associated_immediate_executor
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_immediate_executor_impl<T, Executor>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+#if defined(GENERATING_DOCUMENTATION)
+ /// If @c T has a nested type @c immediate_executor_type,
+ // <tt>T::immediate_executor_type</tt>. Otherwise @c Executor.
+ typedef see_below type;
+
+ /// If @c T has a nested type @c immediate_executor_type, returns
+ /// <tt>t.get_immediate_executor()</tt>. Otherwise returns
+ /// <tt>asio::require(ex, asio::execution::blocking.never)</tt>.
+ static decltype(auto) get(const T& t, const Executor& ex) noexcept;
+#endif // defined(GENERATING_DOCUMENTATION)
+};
+
+/// Helper function to obtain an object's associated executor.
+/**
+ * @returns <tt>associated_immediate_executor<T, Executor>::get(t, ex)</tt>
+ */
+template <typename T, typename Executor>
+ASIO_NODISCARD inline auto get_associated_immediate_executor(
+ const T& t, const Executor& ex,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0) noexcept
+ -> decltype(associated_immediate_executor<T, Executor>::get(t, ex))
+{
+ return associated_immediate_executor<T, Executor>::get(t, ex);
+}
+
+/// Helper function to obtain an object's associated executor.
+/**
+ * @returns <tt>associated_immediate_executor<T, typename
+ * ExecutionContext::executor_type>::get(t, ctx.get_executor())</tt>
+ */
+template <typename T, typename ExecutionContext>
+ASIO_NODISCARD inline typename associated_immediate_executor<T,
+ typename ExecutionContext::executor_type>::type
+get_associated_immediate_executor(const T& t, ExecutionContext& ctx,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0) noexcept
+{
+ return associated_immediate_executor<T,
+ typename ExecutionContext::executor_type>::get(t, ctx.get_executor());
+}
+
+template <typename T, typename Executor>
+using associated_immediate_executor_t =
+ typename associated_immediate_executor<T, Executor>::type;
+
+namespace detail {
+
+template <typename T, typename E, typename = void>
+struct associated_immediate_executor_forwarding_base
+{
+};
+
+template <typename T, typename E>
+struct associated_immediate_executor_forwarding_base<T, E,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<T,
+ E>::asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >>
+{
+ typedef void asio_associated_immediate_executor_is_unspecialised;
+};
+
+} // namespace detail
+
+/// Specialisation of associated_immediate_executor for
+/// @c std::reference_wrapper.
+template <typename T, typename Executor>
+struct associated_immediate_executor<reference_wrapper<T>, Executor>
+#if !defined(GENERATING_DOCUMENTATION)
+ : detail::associated_immediate_executor_forwarding_base<T, Executor>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+ /// Forwards @c type to the associator specialisation for the unwrapped type
+ /// @c T.
+ typedef typename associated_immediate_executor<T, Executor>::type type;
+
+ /// Forwards the request to get the executor to the associator specialisation
+ /// for the unwrapped type @c T.
+ static auto get(reference_wrapper<T> t, const Executor& ex) noexcept
+ -> decltype(associated_immediate_executor<T, Executor>::get(t.get(), ex))
+ {
+ return associated_immediate_executor<T, Executor>::get(t.get(), ex);
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_ASSOCIATED_IMMEDIATE_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/associator.hpp b/3rdparty/asio/include/asio/associator.hpp
index 0f93b120623..7952fcc51ba 100644
--- a/3rdparty/asio/include/asio/associator.hpp
+++ b/3rdparty/asio/include/asio/associator.hpp
@@ -2,7 +2,7 @@
// associator.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/async_result.hpp b/3rdparty/asio/include/asio/async_result.hpp
index 1750e19e3a4..cdae9ede687 100644
--- a/3rdparty/asio/include/asio/async_result.hpp
+++ b/3rdparty/asio/include/asio/async_result.hpp
@@ -2,7 +2,7 @@
// async_result.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,15 +17,12 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
-#if defined(ASIO_HAS_CONCEPTS) \
- && defined(ASIO_HAS_VARIADIC_TEMPLATES) \
- && defined(ASIO_HAS_DECLTYPE)
+#if defined(ASIO_HAS_CONCEPTS)
namespace detail {
@@ -39,8 +36,6 @@ struct is_completion_signature<R(Args...)> : true_type
{
};
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
template <typename R, typename... Args>
struct is_completion_signature<R(Args...) &> : true_type
{
@@ -69,7 +64,6 @@ struct is_completion_signature<R(Args...) && noexcept> : true_type
};
# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
template <typename... T>
struct are_completion_signatures : false_type
@@ -103,21 +97,19 @@ struct is_completion_handler_for : false_type
template <typename T, typename R, typename... Args>
struct is_completion_handler_for<T, R(Args...)>
- : integral_constant<bool, (callable_with<T, Args...>)>
+ : integral_constant<bool, (callable_with<decay_t<T>, Args...>)>
{
};
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
template <typename T, typename R, typename... Args>
struct is_completion_handler_for<T, R(Args...) &>
- : integral_constant<bool, (callable_with<T&, Args...>)>
+ : integral_constant<bool, (callable_with<decay_t<T>&, Args...>)>
{
};
template <typename T, typename R, typename... Args>
struct is_completion_handler_for<T, R(Args...) &&>
- : integral_constant<bool, (callable_with<T&&, Args...>)>
+ : integral_constant<bool, (callable_with<decay_t<T>&&, Args...>)>
{
};
@@ -125,24 +117,23 @@ struct is_completion_handler_for<T, R(Args...) &&>
template <typename T, typename R, typename... Args>
struct is_completion_handler_for<T, R(Args...) noexcept>
- : integral_constant<bool, (callable_with<T, Args...>)>
+ : integral_constant<bool, (callable_with<decay_t<T>, Args...>)>
{
};
template <typename T, typename R, typename... Args>
struct is_completion_handler_for<T, R(Args...) & noexcept>
- : integral_constant<bool, (callable_with<T&, Args...>)>
+ : integral_constant<bool, (callable_with<decay_t<T>&, Args...>)>
{
};
template <typename T, typename R, typename... Args>
struct is_completion_handler_for<T, R(Args...) && noexcept>
- : integral_constant<bool, (callable_with<T&&, Args...>)>
+ : integral_constant<bool, (callable_with<decay_t<T>&&, Args...>)>
{
};
# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
template <typename T, typename Signature0, typename... SignatureN>
struct is_completion_handler_for<T, Signature0, SignatureN...>
@@ -174,8 +165,6 @@ ASIO_CONCEPT completion_handler_for =
::asio::completion_handler_for<sig0, sig1, sig2>
#else // defined(ASIO_HAS_CONCEPTS)
- // && defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // && defined(ASIO_HAS_DECLTYPE)
#define ASIO_COMPLETION_SIGNATURE typename
#define ASIO_COMPLETION_HANDLER_FOR(sig) typename
@@ -183,271 +172,130 @@ ASIO_CONCEPT completion_handler_for =
#define ASIO_COMPLETION_HANDLER_FOR3(sig0, sig1, sig2) typename
#endif // defined(ASIO_HAS_CONCEPTS)
- // && defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // && defined(ASIO_HAS_DECLTYPE)
namespace detail {
template <typename T>
-struct is_simple_completion_signature : false_type
+struct is_lvalue_completion_signature : false_type
{
};
-template <typename T>
-struct simple_completion_signature;
+template <typename R, typename... Args>
+struct is_lvalue_completion_signature<R(Args...) &> : true_type
+{
+};
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
+# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
template <typename R, typename... Args>
-struct is_simple_completion_signature<R(Args...)> : true_type
+struct is_lvalue_completion_signature<R(Args...) & noexcept> : true_type
{
};
+# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
template <typename... Signatures>
-struct are_simple_completion_signatures : false_type
+struct are_any_lvalue_completion_signatures : false_type
{
};
template <typename Sig0>
-struct are_simple_completion_signatures<Sig0>
- : is_simple_completion_signature<Sig0>
+struct are_any_lvalue_completion_signatures<Sig0>
+ : is_lvalue_completion_signature<Sig0>
{
};
template <typename Sig0, typename... SigN>
-struct are_simple_completion_signatures<Sig0, SigN...>
+struct are_any_lvalue_completion_signatures<Sig0, SigN...>
: integral_constant<bool, (
- is_simple_completion_signature<Sig0>::value
- && are_simple_completion_signatures<SigN...>::value)>
+ is_lvalue_completion_signature<Sig0>::value
+ || are_any_lvalue_completion_signatures<SigN...>::value)>
{
};
-template <typename R, typename... Args>
-struct simple_completion_signature<R(Args...)>
-{
- typedef R type(Args...);
-};
-
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-template <typename R, typename... Args>
-struct simple_completion_signature<R(Args...) &>
+template <typename T>
+struct is_rvalue_completion_signature : false_type
{
- typedef R type(Args...);
};
template <typename R, typename... Args>
-struct simple_completion_signature<R(Args...) &&>
+struct is_rvalue_completion_signature<R(Args...) &&> : true_type
{
- typedef R type(Args...);
};
# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
template <typename R, typename... Args>
-struct simple_completion_signature<R(Args...) noexcept>
-{
- typedef R type(Args...);
-};
-
-template <typename R, typename... Args>
-struct simple_completion_signature<R(Args...) & noexcept>
+struct is_rvalue_completion_signature<R(Args...) && noexcept> : true_type
{
- typedef R type(Args...);
-};
-
-template <typename R, typename... Args>
-struct simple_completion_signature<R(Args...) && noexcept>
-{
- typedef R type(Args...);
};
# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename R>
-struct is_simple_completion_signature<R()> : true_type
-{
-};
-
-#define ASIO_PRIVATE_SIMPLE_SIG_DEF(n) \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct is_simple_completion_signature<R(ASIO_VARIADIC_TARGS(n))> \
- : true_type \
- { \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SIMPLE_SIG_DEF)
-#undef ASIO_PRIVATE_SIMPLE_SIG_DEF
-
-template <typename Sig0 = void, typename Sig1 = void,
- typename Sig2 = void, typename = void>
-struct are_simple_completion_signatures : false_type
+template <typename... Signatures>
+struct are_any_rvalue_completion_signatures : false_type
{
};
template <typename Sig0>
-struct are_simple_completion_signatures<Sig0>
- : is_simple_completion_signature<Sig0>
+struct are_any_rvalue_completion_signatures<Sig0>
+ : is_rvalue_completion_signature<Sig0>
{
};
-template <typename Sig0, typename Sig1>
-struct are_simple_completion_signatures<Sig0, Sig1>
- : integral_constant<bool,
- (is_simple_completion_signature<Sig0>::value
- && is_simple_completion_signature<Sig1>::value)>
+template <typename Sig0, typename... SigN>
+struct are_any_rvalue_completion_signatures<Sig0, SigN...>
+ : integral_constant<bool, (
+ is_rvalue_completion_signature<Sig0>::value
+ || are_any_rvalue_completion_signatures<SigN...>::value)>
{
};
-template <typename Sig0, typename Sig1, typename Sig2>
-struct are_simple_completion_signatures<Sig0, Sig1, Sig2>
- : integral_constant<bool,
- (is_simple_completion_signature<Sig0>::value
- && is_simple_completion_signature<Sig1>::value
- && is_simple_completion_signature<Sig2>::value)>
-{
-};
+template <typename T>
+struct simple_completion_signature;
-template <typename R>
-struct simple_completion_signature<R()>
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...)>
{
- typedef R type();
+ typedef R type(Args...);
};
-#define ASIO_PRIVATE_SIMPLE_SIG_DEF(n) \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct simple_completion_signature<R(ASIO_VARIADIC_TARGS(n))> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)); \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SIMPLE_SIG_DEF)
-#undef ASIO_PRIVATE_SIMPLE_SIG_DEF
-
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-template <typename R>
-struct simple_completion_signature<R() &>
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...) &>
{
- typedef R type();
+ typedef R type(Args...);
};
-template <typename R>
-struct simple_completion_signature<R() &&>
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...) &&>
{
- typedef R type();
+ typedef R type(Args...);
};
-#define ASIO_PRIVATE_SIMPLE_SIG_DEF(n) \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct simple_completion_signature< \
- R(ASIO_VARIADIC_TARGS(n)) &> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)); \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct simple_completion_signature< \
- R(ASIO_VARIADIC_TARGS(n)) &&> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)); \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SIMPLE_SIG_DEF)
-#undef ASIO_PRIVATE_SIMPLE_SIG_DEF
-
# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-template <typename R>
-struct simple_completion_signature<R() noexcept>
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...) noexcept>
{
- typedef R type();
+ typedef R type(Args...);
};
-template <typename R>
-struct simple_completion_signature<R() & noexcept>
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...) & noexcept>
{
- typedef R type();
+ typedef R type(Args...);
};
-template <typename R>
-struct simple_completion_signature<R() && noexcept>
+template <typename R, typename... Args>
+struct simple_completion_signature<R(Args...) && noexcept>
{
- typedef R type();
+ typedef R type(Args...);
};
-#define ASIO_PRIVATE_SIMPLE_SIG_DEF(n) \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct simple_completion_signature< \
- R(ASIO_VARIADIC_TARGS(n)) noexcept> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)); \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct simple_completion_signature< \
- R(ASIO_VARIADIC_TARGS(n)) & noexcept> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)); \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct simple_completion_signature< \
- R(ASIO_VARIADIC_TARGS(n)) && noexcept> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)); \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SIMPLE_SIG_DEF)
-#undef ASIO_PRIVATE_SIMPLE_SIG_DEF
-
# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
-
-# define ASIO_COMPLETION_SIGNATURES_TPARAMS \
- ASIO_COMPLETION_SIGNATURE... Signatures
-# define ASIO_COMPLETION_SIGNATURES_TSPECPARAMS \
- ASIO_COMPLETION_SIGNATURE... Signatures
-
-# define ASIO_COMPLETION_SIGNATURES_TARGS Signatures...
-
-# define ASIO_COMPLETION_SIGNATURES_TSIMPLEARGS \
- typename asio::detail::simple_completion_signature< \
- Signatures>::type...
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
-# define ASIO_COMPLETION_SIGNATURES_TPARAMS \
- typename Sig0 = void, \
- typename Sig1 = void, \
- typename Sig2 = void
-
-# define ASIO_COMPLETION_SIGNATURES_TSPECPARAMS \
- typename Sig0, \
- typename Sig1, \
- typename Sig2
-
-# define ASIO_COMPLETION_SIGNATURES_TARGS Sig0, Sig1, Sig2
-
-# define ASIO_COMPLETION_SIGNATURES_TSIMPLEARGS \
- typename ::asio::detail::simple_completion_signature<Sig0>::type, \
- typename ::asio::detail::simple_completion_signature<Sig1>::type, \
- typename ::asio::detail::simple_completion_signature<Sig2>::type
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
-template <typename CompletionToken, ASIO_COMPLETION_SIGNATURES_TPARAMS>
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures>
class completion_handler_async_result
{
public:
@@ -462,56 +310,22 @@ public:
{
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Initiation,
ASIO_COMPLETION_HANDLER_FOR(Signatures...) RawCompletionToken,
typename... Args>
- static return_type initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token,
- ASIO_MOVE_ARG(Args)... args)
+ static return_type initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
{
- ASIO_MOVE_CAST(Initiation)(initiation)(
- ASIO_MOVE_CAST(RawCompletionToken)(token),
- ASIO_MOVE_CAST(Args)(args)...);
+ static_cast<Initiation&&>(initiation)(
+ static_cast<RawCompletionToken&&>(token),
+ static_cast<Args&&>(args)...);
}
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Initiation, typename RawCompletionToken>
- static return_type initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token)
- {
- ASIO_MOVE_CAST(Initiation)(initiation)(
- ASIO_MOVE_CAST(RawCompletionToken)(token));
- }
-
-#define ASIO_PRIVATE_INITIATE_DEF(n) \
- template <typename Initiation, \
- typename RawCompletionToken, \
- ASIO_VARIADIC_TPARAMS(n)> \
- static return_type initiate( \
- ASIO_MOVE_ARG(Initiation) initiation, \
- ASIO_MOVE_ARG(RawCompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- ASIO_MOVE_CAST(Initiation)(initiation)( \
- ASIO_MOVE_CAST(RawCompletionToken)(token), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INITIATE_DEF)
-#undef ASIO_PRIVATE_INITIATE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
private:
completion_handler_async_result(
- const completion_handler_async_result&) ASIO_DELETED;
+ const completion_handler_async_result&) = delete;
completion_handler_async_result& operator=(
- const completion_handler_async_result&) ASIO_DELETED;
+ const completion_handler_async_result&) = delete;
};
} // namespace detail
@@ -536,7 +350,8 @@ private:
* The primary template assumes that the CompletionToken is the completion
* handler.
*/
-template <typename CompletionToken, ASIO_COMPLETION_SIGNATURES_TPARAMS>
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures>
class async_result
{
public:
@@ -561,70 +376,46 @@ public:
/// obtain the value to be returned from the initiating function.
template <typename Initiation, typename RawCompletionToken, typename... Args>
static return_type initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token,
- ASIO_MOVE_ARG(Args)... args);
+ Initiation&& initiation,
+ RawCompletionToken&& token,
+ Args&&... args);
private:
- async_result(const async_result&) ASIO_DELETED;
- async_result& operator=(const async_result&) ASIO_DELETED;
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
};
#else // defined(GENERATING_DOCUMENTATION)
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-template <typename CompletionToken, ASIO_COMPLETION_SIGNATURES_TPARAMS>
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures>
class async_result :
- public conditional<
- detail::are_simple_completion_signatures<
- ASIO_COMPLETION_SIGNATURES_TARGS>::value,
- detail::completion_handler_async_result<
- CompletionToken, ASIO_COMPLETION_SIGNATURES_TARGS>,
+ public conditional_t<
+ detail::are_any_lvalue_completion_signatures<Signatures...>::value
+ || !detail::are_any_rvalue_completion_signatures<Signatures...>::value,
+ detail::completion_handler_async_result<CompletionToken, Signatures...>,
async_result<CompletionToken,
- ASIO_COMPLETION_SIGNATURES_TSIMPLEARGS>
- >::type
+ typename detail::simple_completion_signature<Signatures>::type...>
+ >
{
public:
- typedef typename conditional<
- detail::are_simple_completion_signatures<
- ASIO_COMPLETION_SIGNATURES_TARGS>::value,
- detail::completion_handler_async_result<
- CompletionToken, ASIO_COMPLETION_SIGNATURES_TARGS>,
+ typedef conditional_t<
+ detail::are_any_lvalue_completion_signatures<Signatures...>::value
+ || !detail::are_any_rvalue_completion_signatures<Signatures...>::value,
+ detail::completion_handler_async_result<CompletionToken, Signatures...>,
async_result<CompletionToken,
- ASIO_COMPLETION_SIGNATURES_TSIMPLEARGS>
- >::type base_type;
+ typename detail::simple_completion_signature<Signatures>::type...>
+ > base_type;
using base_type::base_type;
private:
- async_result(const async_result&) ASIO_DELETED;
- async_result& operator=(const async_result&) ASIO_DELETED;
-};
-
-#else // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-template <typename CompletionToken, ASIO_COMPLETION_SIGNATURES_TPARAMS>
-class async_result :
- public detail::completion_handler_async_result<
- CompletionToken, ASIO_COMPLETION_SIGNATURES_TARGS>
-{
-public:
- explicit async_result(CompletionToken& h)
- : detail::completion_handler_async_result<
- CompletionToken, ASIO_COMPLETION_SIGNATURES_TARGS>(h)
- {
- }
-
-private:
- async_result(const async_result&) ASIO_DELETED;
- async_result& operator=(const async_result&) ASIO_DELETED;
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
};
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-template <ASIO_COMPLETION_SIGNATURES_TSPECPARAMS>
-class async_result<void, ASIO_COMPLETION_SIGNATURES_TARGS>
+template <ASIO_COMPLETION_SIGNATURE... Signatures>
+class async_result<void, Signatures...>
{
// Empty.
};
@@ -634,65 +425,39 @@ class async_result<void, ASIO_COMPLETION_SIGNATURES_TARGS>
/// Helper template to deduce the handler type from a CompletionToken, capture
/// a local copy of the handler, and then create an async_result for the
/// handler.
-template <typename CompletionToken, ASIO_COMPLETION_SIGNATURES_TPARAMS>
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures>
struct async_completion
{
/// The real handler type to be used for the asynchronous operation.
typedef typename asio::async_result<
- typename decay<CompletionToken>::type,
- ASIO_COMPLETION_SIGNATURES_TARGS>::completion_handler_type
- completion_handler_type;
+ decay_t<CompletionToken>, Signatures...>::completion_handler_type
+ completion_handler_type;
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Constructor.
/**
* The constructor creates the concrete completion handler and makes the link
* between the handler and the asynchronous result.
*/
explicit async_completion(CompletionToken& token)
- : completion_handler(static_cast<typename conditional<
+ : completion_handler(static_cast<conditional_t<
is_same<CompletionToken, completion_handler_type>::value,
- completion_handler_type&, CompletionToken&&>::type>(token)),
- result(completion_handler)
- {
- }
-#else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- explicit async_completion(typename decay<CompletionToken>::type& token)
- : completion_handler(token),
+ completion_handler_type&, CompletionToken&&>>(token)),
result(completion_handler)
{
}
- explicit async_completion(const typename decay<CompletionToken>::type& token)
- : completion_handler(token),
- result(completion_handler)
- {
- }
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
/// A copy of, or reference to, a real handler object.
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- typename conditional<
+ conditional_t<
is_same<CompletionToken, completion_handler_type>::value,
- completion_handler_type&, completion_handler_type>::type completion_handler;
-#else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- completion_handler_type completion_handler;
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ completion_handler_type&, completion_handler_type> completion_handler;
/// The result of the asynchronous operation's initiating function.
- async_result<typename decay<CompletionToken>::type,
- ASIO_COMPLETION_SIGNATURES_TARGS> result;
+ async_result<decay_t<CompletionToken>, Signatures...> result;
};
namespace detail {
-template <typename CompletionToken, ASIO_COMPLETION_SIGNATURES_TPARAMS>
-struct async_result_helper
- : async_result<typename decay<CompletionToken>::type,
- ASIO_COMPLETION_SIGNATURES_TARGS>
-{
-};
-
struct async_result_memfns_base
{
void initiate();
@@ -718,11 +483,11 @@ char async_result_initiate_memfn_helper(
void (async_result_memfns_base::*)(),
&async_result_memfns_derived<T>::initiate>*);
-template <typename CompletionToken, ASIO_COMPLETION_SIGNATURES_TPARAMS>
+template <typename CompletionToken,
+ ASIO_COMPLETION_SIGNATURE... Signatures>
struct async_result_has_initiate_memfn
: integral_constant<bool, sizeof(async_result_initiate_memfn_helper<
- async_result<typename decay<CompletionToken>::type,
- ASIO_COMPLETION_SIGNATURES_TARGS>
+ async_result<decay_t<CompletionToken>, Signatures...>
>(0)) != 1>
{
};
@@ -736,25 +501,6 @@ struct async_result_has_initiate_memfn
void_or_deduced
# define ASIO_INITFN_RESULT_TYPE3(ct, sig0, sig1, sig2) \
void_or_deduced
-#elif defined(_MSC_VER) && (_MSC_VER < 1500)
-# define ASIO_INITFN_RESULT_TYPE(ct, sig) \
- typename ::asio::detail::async_result_helper< \
- ct, sig>::return_type
-# define ASIO_INITFN_RESULT_TYPE2(ct, sig0, sig1) \
- typename ::asio::detail::async_result_helper< \
- ct, sig0, sig1>::return_type
-# define ASIO_INITFN_RESULT_TYPE3(ct, sig0, sig1, sig2) \
- typename ::asio::detail::async_result_helper< \
- ct, sig0, sig1, sig2>::return_type
-#define ASIO_HANDLER_TYPE(ct, sig) \
- typename ::asio::detail::async_result_helper< \
- ct, sig>::completion_handler_type
-#define ASIO_HANDLER_TYPE2(ct, sig0, sig1) \
- typename ::asio::detail::async_result_helper< \
- ct, sig0, sig1>::completion_handler_type
-#define ASIO_HANDLER_TYPE3(ct, sig0, sig1, sig2) \
- typename ::asio::detail::async_result_helper< \
- ct, sig0, sig1, sig2>::completion_handler_type
#else
# define ASIO_INITFN_RESULT_TYPE(ct, sig) \
typename ::asio::async_result< \
@@ -802,26 +548,45 @@ struct async_result_has_initiate_memfn
#endif
#if defined(GENERATING_DOCUMENTATION)
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ct, sig) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX2(ct, sig0, sig1) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX3(ct, sig0, sig1, sig2) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(expr)
+#elif defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ct, sig) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX2(ct, sig0, sig1) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX3(ct, sig0, sig1, sig2) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(expr)
+#else
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ct, sig) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX2(ct, sig0, sig1) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX3(ct, sig0, sig1, sig2) \
+ auto
+# define ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(expr) -> decltype expr
+#endif
+
+#if defined(GENERATING_DOCUMENTATION)
# define ASIO_INITFN_DEDUCED_RESULT_TYPE(ct, sig, expr) \
void_or_deduced
# define ASIO_INITFN_DEDUCED_RESULT_TYPE2(ct, sig0, sig1, expr) \
void_or_deduced
# define ASIO_INITFN_DEDUCED_RESULT_TYPE3(ct, sig0, sig1, sig2, expr) \
void_or_deduced
-#elif defined(ASIO_HAS_DECLTYPE)
+#else
# define ASIO_INITFN_DEDUCED_RESULT_TYPE(ct, sig, expr) \
decltype expr
# define ASIO_INITFN_DEDUCED_RESULT_TYPE2(ct, sig0, sig1, expr) \
decltype expr
# define ASIO_INITFN_DEDUCED_RESULT_TYPE3(ct, sig0, sig1, sig2, expr) \
decltype expr
-#else
-# define ASIO_INITFN_DEDUCED_RESULT_TYPE(ct, sig, expr) \
- ASIO_INITFN_RESULT_TYPE(ct, sig)
-# define ASIO_INITFN_DEDUCED_RESULT_TYPE2(ct, sig0, sig1, expr) \
- ASIO_INITFN_RESULT_TYPE2(ct, sig0, sig1)
-# define ASIO_INITFN_DEDUCED_RESULT_TYPE3(ct, sig0, sig1, sig2, expr) \
- ASIO_INITFN_RESULT_TYPE3(ct, sig0, sig1, sig2)
#endif
#if defined(GENERATING_DOCUMENTATION)
@@ -830,326 +595,57 @@ template <typename CompletionToken,
completion_signature... Signatures,
typename Initiation, typename... Args>
void_or_deduced async_initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken),
- ASIO_MOVE_ARG(Args)... args);
+ Initiation&& initiation,
+ type_identity_t<CompletionToken>& token,
+ Args&&... args);
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
+#else // defined(GENERATING_DOCUMENTATION)
template <typename CompletionToken,
ASIO_COMPLETION_SIGNATURE... Signatures,
typename Initiation, typename... Args>
-inline typename constraint<
+inline auto async_initiate(Initiation&& initiation,
+ type_identity_t<CompletionToken>& token, Args&&... args)
+ -> constraint_t<
detail::async_result_has_initiate_memfn<
CompletionToken, Signatures...>::value,
- ASIO_INITFN_DEDUCED_RESULT_TYPE(CompletionToken, Signatures...,
- (async_result<typename decay<CompletionToken>::type,
- Signatures...>::initiate(declval<ASIO_MOVE_ARG(Initiation)>(),
- declval<ASIO_MOVE_ARG(CompletionToken)>(),
- declval<ASIO_MOVE_ARG(Args)>()...)))>::type
-async_initiate(ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token,
- ASIO_MOVE_ARG(Args)... args)
-{
- return async_result<typename decay<CompletionToken>::type,
- Signatures...>::initiate(ASIO_MOVE_CAST(Initiation)(initiation),
- ASIO_MOVE_CAST(CompletionToken)(token),
- ASIO_MOVE_CAST(Args)(args)...);
+ 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),
+ static_cast<CompletionToken&&>(token),
+ static_cast<Args&&>(args)...);
}
template <typename CompletionToken,
ASIO_COMPLETION_SIGNATURE... Signatures,
typename Initiation, typename... Args>
-inline typename constraint<
+inline constraint_t<
!detail::async_result_has_initiate_memfn<
CompletionToken, Signatures...>::value,
- ASIO_INITFN_RESULT_TYPE(CompletionToken, Signatures...)>::type
-async_initiate(ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token,
- ASIO_MOVE_ARG(Args)... args)
+ typename async_result<decay_t<CompletionToken>, Signatures...>::return_type>
+async_initiate(Initiation&& initiation,
+ type_identity_t<CompletionToken>& token, Args&&... args)
{
async_completion<CompletionToken, Signatures...> completion(token);
- ASIO_MOVE_CAST(Initiation)(initiation)(
- ASIO_MOVE_CAST(ASIO_HANDLER_TYPE(CompletionToken,
- Signatures...))(completion.completion_handler),
- ASIO_MOVE_CAST(Args)(args)...);
+ 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();
}
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename CompletionToken,
- ASIO_COMPLETION_SIGNATURE Sig0,
- typename Initiation>
-inline typename constraint<
- detail::async_result_has_initiate_memfn<
- CompletionToken, Sig0>::value,
- ASIO_INITFN_DEDUCED_RESULT_TYPE(CompletionToken, Sig0,
- (async_result<typename decay<CompletionToken>::type,
- Sig0>::initiate(declval<ASIO_MOVE_ARG(Initiation)>(),
- declval<ASIO_MOVE_ARG(CompletionToken)>())))>::type
-async_initiate(ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token)
-{
- return async_result<typename decay<CompletionToken>::type,
- Sig0>::initiate(ASIO_MOVE_CAST(Initiation)(initiation),
- ASIO_MOVE_CAST(CompletionToken)(token));
-}
-
-template <typename CompletionToken,
- ASIO_COMPLETION_SIGNATURE Sig0,
- ASIO_COMPLETION_SIGNATURE Sig1,
- typename Initiation>
-inline typename constraint<
- detail::async_result_has_initiate_memfn<
- CompletionToken, Sig0, Sig1>::value,
- ASIO_INITFN_DEDUCED_RESULT_TYPE2(CompletionToken, Sig0, Sig1,
- (async_result<typename decay<CompletionToken>::type,
- Sig0, Sig1>::initiate(declval<ASIO_MOVE_ARG(Initiation)>(),
- declval<ASIO_MOVE_ARG(CompletionToken)>())))>::type
-async_initiate(ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token)
-{
- return async_result<typename decay<CompletionToken>::type,
- Sig0, Sig1>::initiate(ASIO_MOVE_CAST(Initiation)(initiation),
- ASIO_MOVE_CAST(CompletionToken)(token));
-}
-
-template <typename CompletionToken,
- ASIO_COMPLETION_SIGNATURE Sig0,
- ASIO_COMPLETION_SIGNATURE Sig1,
- ASIO_COMPLETION_SIGNATURE Sig2,
- typename Initiation>
-inline typename constraint<
- detail::async_result_has_initiate_memfn<
- CompletionToken, Sig0, Sig1, Sig2>::value,
- ASIO_INITFN_DEDUCED_RESULT_TYPE3(CompletionToken, Sig0, Sig1, Sig2,
- (async_result<typename decay<CompletionToken>::type,
- Sig0, Sig1, Sig2>::initiate(declval<ASIO_MOVE_ARG(Initiation)>(),
- declval<ASIO_MOVE_ARG(CompletionToken)>())))>::type
-async_initiate(ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token)
-{
- return async_result<typename decay<CompletionToken>::type,
- Sig0, Sig1, Sig2>::initiate(ASIO_MOVE_CAST(Initiation)(initiation),
- ASIO_MOVE_CAST(CompletionToken)(token));
-}
-
-template <typename CompletionToken,
- ASIO_COMPLETION_SIGNATURE Sig0,
- typename Initiation>
-inline typename constraint<
- !detail::async_result_has_initiate_memfn<
- CompletionToken, Sig0>::value,
- ASIO_INITFN_RESULT_TYPE(CompletionToken, Sig0)>::type
-async_initiate(ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token)
-{
- async_completion<CompletionToken, Sig0> completion(token);
-
- ASIO_MOVE_CAST(Initiation)(initiation)(
- ASIO_MOVE_CAST(ASIO_HANDLER_TYPE(CompletionToken,
- Sig0))(completion.completion_handler));
-
- return completion.result.get();
-}
-
-template <typename CompletionToken,
- ASIO_COMPLETION_SIGNATURE Sig0,
- ASIO_COMPLETION_SIGNATURE Sig1,
- typename Initiation>
-inline typename constraint<
- !detail::async_result_has_initiate_memfn<
- CompletionToken, Sig0, Sig1>::value,
- ASIO_INITFN_RESULT_TYPE2(CompletionToken, Sig0, Sig1)>::type
-async_initiate(ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token)
-{
- async_completion<CompletionToken, Sig0, Sig1> completion(token);
-
- ASIO_MOVE_CAST(Initiation)(initiation)(
- ASIO_MOVE_CAST(ASIO_HANDLER_TYPE2(CompletionToken,
- Sig0, Sig1))(completion.completion_handler));
-
- return completion.result.get();
-}
-
-template <typename CompletionToken,
- ASIO_COMPLETION_SIGNATURE Sig0,
- ASIO_COMPLETION_SIGNATURE Sig1,
- ASIO_COMPLETION_SIGNATURE Sig2,
- typename Initiation>
-inline typename constraint<
- !detail::async_result_has_initiate_memfn<
- CompletionToken, Sig0, Sig1, Sig2>::value,
- ASIO_INITFN_RESULT_TYPE3(CompletionToken, Sig0, Sig1, Sig2)>::type
-async_initiate(ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token)
-{
- async_completion<CompletionToken, Sig0, Sig1, Sig2> completion(token);
-
- ASIO_MOVE_CAST(Initiation)(initiation)(
- ASIO_MOVE_CAST(ASIO_HANDLER_TYPE3(CompletionToken,
- Sig0, Sig1, Sig2))(completion.completion_handler));
-
- return completion.result.get();
-}
+#endif // defined(GENERATING_DOCUMENTATION)
-#define ASIO_PRIVATE_INITIATE_DEF(n) \
- template <typename CompletionToken, \
- ASIO_COMPLETION_SIGNATURE Sig0, \
- typename Initiation, ASIO_VARIADIC_TPARAMS(n)> \
- inline typename constraint< \
- detail::async_result_has_initiate_memfn< \
- CompletionToken, Sig0>::value, \
- ASIO_INITFN_DEDUCED_RESULT_TYPE( \
- CompletionToken, Sig0, \
- (async_result<typename decay<CompletionToken>::type, \
- Sig0>::initiate( \
- declval<ASIO_MOVE_ARG(Initiation)>(), \
- declval<ASIO_MOVE_ARG(CompletionToken)>(), \
- ASIO_VARIADIC_MOVE_DECLVAL(n))))>::type \
- async_initiate(ASIO_MOVE_ARG(Initiation) initiation, \
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return async_result<typename decay<CompletionToken>::type, \
- Sig0>::initiate( \
- ASIO_MOVE_CAST(Initiation)(initiation), \
- ASIO_MOVE_CAST(CompletionToken)(token), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <typename CompletionToken, \
- ASIO_COMPLETION_SIGNATURE Sig0, \
- ASIO_COMPLETION_SIGNATURE Sig1, \
- typename Initiation, ASIO_VARIADIC_TPARAMS(n)> \
- inline typename constraint< \
- detail::async_result_has_initiate_memfn< \
- CompletionToken, Sig0, Sig1>::value, \
- ASIO_INITFN_DEDUCED_RESULT_TYPE2( \
- CompletionToken, Sig0, Sig1, \
- (async_result<typename decay<CompletionToken>::type, \
- Sig0, Sig1>::initiate( \
- declval<ASIO_MOVE_ARG(Initiation)>(), \
- declval<ASIO_MOVE_ARG(CompletionToken)>(), \
- ASIO_VARIADIC_MOVE_DECLVAL(n))))>::type \
- async_initiate(ASIO_MOVE_ARG(Initiation) initiation, \
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return async_result<typename decay<CompletionToken>::type, \
- Sig0, Sig1>::initiate( \
- ASIO_MOVE_CAST(Initiation)(initiation), \
- ASIO_MOVE_CAST(CompletionToken)(token), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <typename CompletionToken, \
- ASIO_COMPLETION_SIGNATURE Sig0, \
- ASIO_COMPLETION_SIGNATURE Sig1, \
- ASIO_COMPLETION_SIGNATURE Sig2, \
- typename Initiation, ASIO_VARIADIC_TPARAMS(n)> \
- inline typename constraint< \
- detail::async_result_has_initiate_memfn< \
- CompletionToken, Sig0, Sig1, Sig2>::value, \
- ASIO_INITFN_DEDUCED_RESULT_TYPE3( \
- CompletionToken, Sig0, Sig1, Sig2, \
- (async_result<typename decay<CompletionToken>::type, \
- Sig0, Sig1, Sig2>::initiate( \
- declval<ASIO_MOVE_ARG(Initiation)>(), \
- declval<ASIO_MOVE_ARG(CompletionToken)>(), \
- ASIO_VARIADIC_MOVE_DECLVAL(n))))>::type \
- async_initiate(ASIO_MOVE_ARG(Initiation) initiation, \
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return async_result<typename decay<CompletionToken>::type, \
- Sig0, Sig1, Sig2>::initiate( \
- ASIO_MOVE_CAST(Initiation)(initiation), \
- ASIO_MOVE_CAST(CompletionToken)(token), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <typename CompletionToken, \
- ASIO_COMPLETION_SIGNATURE Sig0, \
- typename Initiation, ASIO_VARIADIC_TPARAMS(n)> \
- inline typename constraint< \
- !detail::async_result_has_initiate_memfn< \
- CompletionToken, Sig0>::value, \
- ASIO_INITFN_RESULT_TYPE(CompletionToken, Sig0)>::type \
- async_initiate(ASIO_MOVE_ARG(Initiation) initiation, \
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- async_completion<CompletionToken, \
- Sig0> completion(token); \
- \
- ASIO_MOVE_CAST(Initiation)(initiation)( \
- ASIO_MOVE_CAST(ASIO_HANDLER_TYPE(CompletionToken, \
- Sig0))(completion.completion_handler), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- \
- return completion.result.get(); \
- } \
- \
- template <typename CompletionToken, \
- ASIO_COMPLETION_SIGNATURE Sig0, \
- ASIO_COMPLETION_SIGNATURE Sig1, \
- typename Initiation, ASIO_VARIADIC_TPARAMS(n)> \
- inline typename constraint< \
- !detail::async_result_has_initiate_memfn< \
- CompletionToken, Sig0, Sig1>::value, \
- ASIO_INITFN_RESULT_TYPE2(CompletionToken, Sig0, Sig1)>::type \
- async_initiate(ASIO_MOVE_ARG(Initiation) initiation, \
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- async_completion<CompletionToken, \
- Sig0, Sig1> completion(token); \
- \
- ASIO_MOVE_CAST(Initiation)(initiation)( \
- ASIO_MOVE_CAST(ASIO_HANDLER_TYPE2(CompletionToken, \
- Sig0, Sig1))(completion.completion_handler), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- \
- return completion.result.get(); \
- } \
- \
- template <typename CompletionToken, \
- ASIO_COMPLETION_SIGNATURE Sig0, \
- ASIO_COMPLETION_SIGNATURE Sig1, \
- ASIO_COMPLETION_SIGNATURE Sig2, \
- typename Initiation, ASIO_VARIADIC_TPARAMS(n)> \
- inline typename constraint< \
- !detail::async_result_has_initiate_memfn< \
- CompletionToken, Sig0, Sig1, Sig2>::value, \
- ASIO_INITFN_RESULT_TYPE3(CompletionToken, Sig0, Sig1, Sig2)>::type \
- async_initiate(ASIO_MOVE_ARG(Initiation) initiation, \
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- async_completion<CompletionToken, \
- Sig0, Sig1, Sig2> completion(token); \
- \
- ASIO_MOVE_CAST(Initiation)(initiation)( \
- ASIO_MOVE_CAST(ASIO_HANDLER_TYPE3(CompletionToken, \
- Sig0, Sig1, Sig2))(completion.completion_handler), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- \
- return completion.result.get(); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INITIATE_DEF)
-#undef ASIO_PRIVATE_INITIATE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#if defined(ASIO_HAS_CONCEPTS) \
- && defined(ASIO_HAS_VARIADIC_TEMPLATES) \
- && defined(ASIO_HAS_DECLTYPE)
+#if defined(ASIO_HAS_CONCEPTS)
namespace detail {
@@ -1182,16 +678,209 @@ ASIO_CONCEPT completion_token_for =
::asio::completion_token_for<sig0, sig1, sig2>
#else // defined(ASIO_HAS_CONCEPTS)
- // && defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // && defined(ASIO_HAS_DECLTYPE)
#define ASIO_COMPLETION_TOKEN_FOR(sig) typename
#define ASIO_COMPLETION_TOKEN_FOR2(sig0, sig1) typename
#define ASIO_COMPLETION_TOKEN_FOR3(sig0, sig1, sig2) typename
#endif // defined(ASIO_HAS_CONCEPTS)
- // && defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // && defined(ASIO_HAS_DECLTYPE)
+
+namespace detail {
+
+struct async_operation_probe {};
+struct async_operation_probe_result {};
+
+template <typename Call, typename = void>
+struct is_async_operation_call : false_type
+{
+};
+
+template <typename Call>
+struct is_async_operation_call<Call,
+ void_t<
+ enable_if_t<
+ is_same<
+ result_of_t<Call>,
+ async_operation_probe_result
+ >::value
+ >
+ >
+ > : true_type
+{
+};
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename... Signatures>
+class async_result<detail::async_operation_probe, Signatures...>
+{
+public:
+ typedef detail::async_operation_probe_result return_type;
+
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation&&,
+ detail::async_operation_probe, InitArgs&&...)
+ {
+ return return_type();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// The is_async_operation trait detects whether a type @c T and arguments
+/// @c Args... may be used to initiate an asynchronous operation.
+/**
+ * Class template @c is_async_operation is a trait is derived from @c true_type
+ * if the expression <tt>T(Args..., token)</tt> initiates an asynchronous
+ * operation, where @c token is an unspecified completion token type. Otherwise,
+ * @c is_async_operation is derived from @c false_type.
+ */
+template <typename T, typename... Args>
+struct is_async_operation : integral_constant<bool, automatically_determined>
+{
+};
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+template <typename T, typename... Args>
+struct is_async_operation :
+ detail::is_async_operation_call<
+ T(Args..., detail::async_operation_probe)>
+{
+};
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+#if defined(ASIO_HAS_CONCEPTS)
+
+template <typename T, typename... Args>
+ASIO_CONCEPT async_operation = is_async_operation<T, Args...>::value;
+
+#define ASIO_ASYNC_OPERATION(t) \
+ ::asio::async_operation<t>
+#define ASIO_ASYNC_OPERATION1(t, a0) \
+ ::asio::async_operation<t, a0>
+#define ASIO_ASYNC_OPERATION2(t, a0, a1) \
+ ::asio::async_operation<t, a0, a1>
+#define ASIO_ASYNC_OPERATION3(t, a0, a1, a2) \
+ ::asio::async_operation<t, a0, a1, a2>
+
+#else // defined(ASIO_HAS_CONCEPTS)
+
+#define ASIO_ASYNC_OPERATION(t) typename
+#define ASIO_ASYNC_OPERATION1(t, a0) typename
+#define ASIO_ASYNC_OPERATION2(t, a0, a1) typename
+#define ASIO_ASYNC_OPERATION3(t, a0, a1, a2) typename
+
+#endif // defined(ASIO_HAS_CONCEPTS)
+
+namespace detail {
+
+struct completion_signature_probe {};
+
+template <typename... T>
+struct completion_signature_probe_result
+{
+ template <template <typename...> class Op>
+ struct apply
+ {
+ typedef Op<T...> type;
+ };
+};
+
+template <typename T>
+struct completion_signature_probe_result<T>
+{
+ typedef T type;
+
+ template <template <typename...> class Op>
+ struct apply
+ {
+ typedef Op<T> type;
+ };
+};
+
+template <>
+struct completion_signature_probe_result<void>
+{
+ template <template <typename...> class Op>
+ struct apply
+ {
+ typedef Op<> type;
+ };
+};
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename... Signatures>
+class async_result<detail::completion_signature_probe, Signatures...>
+{
+public:
+ typedef detail::completion_signature_probe_result<Signatures...> return_type;
+
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation&&,
+ detail::completion_signature_probe, InitArgs&&...)
+ {
+ return return_type();
+ }
+};
+
+template <typename Signature>
+class async_result<detail::completion_signature_probe, Signature>
+{
+public:
+ typedef detail::completion_signature_probe_result<Signature> return_type;
+
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation&&,
+ detail::completion_signature_probe, InitArgs&&...)
+ {
+ return return_type();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// The completion_signature_of trait determines the completion signature
+/// of an asynchronous operation.
+/**
+ * Class template @c completion_signature_of is a trait with a member type
+ * alias @c type that denotes the completion signature of the asynchronous
+ * operation initiated by the expression <tt>T(Args..., token)</tt> operation,
+ * where @c token is an unspecified completion token type. If the asynchronous
+ * operation does not have exactly one completion signature, the instantion of
+ * the trait is well-formed but the member type alias @c type is omitted. If
+ * the expression <tt>T(Args..., token)</tt> is not an asynchronous operation
+ * then use of the trait is ill-formed.
+ */
+template <typename T, typename... Args>
+struct completion_signature_of
+{
+ typedef automatically_determined type;
+};
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+template <typename T, typename... Args>
+struct completion_signature_of :
+ result_of_t<T(Args..., detail::completion_signature_probe)>
+{
+};
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+template <typename T, typename... Args>
+using completion_signature_of_t =
+ typename completion_signature_of<T, Args...>::type;
namespace detail {
@@ -1203,7 +892,8 @@ struct default_completion_token_impl
template <typename T>
struct default_completion_token_impl<T,
- typename void_type<typename T::default_completion_token_type>::type>
+ void_t<typename T::default_completion_token_type>
+ >
{
typedef typename T::default_completion_token_type type;
};
@@ -1237,27 +927,14 @@ struct default_completion_token
};
#endif
-#if defined(ASIO_HAS_ALIAS_TEMPLATES)
-
template <typename T>
using default_completion_token_t = typename default_completion_token<T>::type;
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
-
-#if defined(ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
-
#define ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(e) \
= typename ::asio::default_completion_token<e>::type
#define ASIO_DEFAULT_COMPLETION_TOKEN(e) \
= typename ::asio::default_completion_token<e>::type()
-#else // defined(ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
-
-#define ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(e)
-#define ASIO_DEFAULT_COMPLETION_TOKEN(e)
-
-#endif // defined(ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/awaitable.hpp b/3rdparty/asio/include/asio/awaitable.hpp
index b9e8d51df5c..7e4ee7a2f22 100644
--- a/3rdparty/asio/include/asio/awaitable.hpp
+++ b/3rdparty/asio/include/asio/awaitable.hpp
@@ -2,7 +2,7 @@
// awaitable.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -25,6 +25,7 @@
# include <experimental/coroutine>
#endif // defined(ASIO_HAS_STD_COROUTINE)
+#include <utility>
#include "asio/any_io_executor.hpp"
#include "asio/detail/push_options.hpp"
@@ -75,6 +76,14 @@ public:
frame_->destroy();
}
+ /// Move assignment.
+ awaitable& operator=(awaitable&& other) noexcept
+ {
+ if (this != &other)
+ frame_ = std::exchange(other.frame_, nullptr);
+ return *this;
+ }
+
/// Checks if the awaitable refers to a future result.
bool valid() const noexcept
{
diff --git a/3rdparty/asio/include/asio/basic_datagram_socket.hpp b/3rdparty/asio/include/asio/basic_datagram_socket.hpp
index a09dfcdbee8..3d72a38475a 100644
--- a/3rdparty/asio/include/asio/basic_datagram_socket.hpp
+++ b/3rdparty/asio/include/asio/basic_datagram_socket.hpp
@@ -2,7 +2,7 @@
// basic_datagram_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -46,17 +46,23 @@ class basic_datagram_socket;
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*
- * Synchronous @c send, @c send_to, @c receive, @c receive_from, and @c connect
- * operations are thread safe with respect to each other, if the underlying
- * operating system calls are also thread safe. This means that it is permitted
- * to perform concurrent calls to these synchronous operations on a single
- * socket object. Other synchronous operations, such as @c open or @c close, are
- * not thread safe.
+ * Synchronous @c send, @c send_to, @c receive, @c receive_from, @c connect,
+ * and @c shutdown operations are thread safe with respect to each other, if
+ * the underlying operating system calls are also thread safe. This means that
+ * it is permitted to perform concurrent calls to these synchronous operations
+ * on a single socket object. Other synchronous operations, such as @c open or
+ * @c close, are not thread safe.
*/
template <typename Protocol, typename Executor>
class basic_datagram_socket
: public basic_socket<Protocol, Executor>
{
+private:
+ class initiate_async_send;
+ class initiate_async_send_to;
+ class initiate_async_receive;
+ class initiate_async_receive_from;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -107,9 +113,9 @@ public:
*/
template <typename ExecutionContext>
explicit basic_datagram_socket(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context)
{
}
@@ -145,10 +151,10 @@ public:
template <typename ExecutionContext>
basic_datagram_socket(ExecutionContext& context,
const protocol_type& protocol,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: basic_socket<Protocol, Executor>(context, protocol)
{
}
@@ -192,9 +198,9 @@ public:
template <typename ExecutionContext>
basic_datagram_socket(ExecutionContext& context,
const endpoint_type& endpoint,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context, endpoint)
{
}
@@ -237,14 +243,13 @@ public:
template <typename ExecutionContext>
basic_datagram_socket(ExecutionContext& context,
const protocol_type& protocol, const native_handle_type& native_socket,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context, protocol, native_socket)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_datagram_socket from another.
/**
* This constructor moves a datagram socket from one object to another.
@@ -256,7 +261,7 @@ public:
* constructed using the @c basic_datagram_socket(const executor_type&)
* constructor.
*/
- basic_datagram_socket(basic_datagram_socket&& other) ASIO_NOEXCEPT
+ basic_datagram_socket(basic_datagram_socket&& other) noexcept
: basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -293,10 +298,10 @@ public:
*/
template <typename Protocol1, typename Executor1>
basic_datagram_socket(basic_datagram_socket<Protocol1, Executor1>&& other,
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -315,16 +320,15 @@ public:
* constructor.
*/
template <typename Protocol1, typename Executor1>
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value,
basic_datagram_socket&
- >::type operator=(basic_datagram_socket<Protocol1, Executor1>&& other)
+ > operator=(basic_datagram_socket<Protocol1, Executor1>&& other)
{
basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the socket.
/**
@@ -423,25 +427,31 @@ public:
/// Start an asynchronous send on a connected socket.
/**
* This function is used to asynchronously send data on the datagram socket.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The async_send operation can only be used with a connected socket.
* Use the async_send_to function to send data on an unconnected datagram
* socket.
@@ -467,44 +477,51 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token,
+ buffers, socket_base::message_flags(0)))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send(this), handler,
+ initiate_async_send(this), token,
buffers, socket_base::message_flags(0));
}
/// Start an asynchronous send on a connected socket.
/**
* This function is used to asynchronously send data on the datagram socket.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The async_send operation can only be used with a connected socket.
* Use the async_send_to function to send data on an unconnected datagram
* socket.
@@ -521,18 +538,18 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token, buffers, flags))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send(this), handler, buffers, flags);
+ initiate_async_send(this), token, buffers, flags);
}
/// Send a datagram to the specified endpoint.
@@ -626,28 +643,34 @@ public:
/// Start an asynchronous send.
/**
* This function is used to asynchronously send a datagram to the specified
- * remote endpoint. The function call always returns immediately.
+ * remote endpoint. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more data buffers to be sent to the remote endpoint.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param destination The remote endpoint to which the data will be sent.
* Copies will be made of the endpoint as required.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To send a single data buffer use the @ref buffer function as follows:
* @code
@@ -672,48 +695,55 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send_to>(), token, buffers,
+ destination, socket_base::message_flags(0)))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send_to(this), handler, buffers,
+ initiate_async_send_to(this), token, buffers,
destination, socket_base::message_flags(0));
}
/// Start an asynchronous send.
/**
* This function is used to asynchronously send a datagram to the specified
- * remote endpoint. The function call always returns immediately.
+ * remote endpoint. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more data buffers to be sent to the remote endpoint.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
* @param destination The remote endpoint to which the data will be sent.
* Copies will be made of the endpoint as required.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* On POSIX or Windows operating systems, this asynchronous operation supports
* cancellation for the following asio::cancellation_type values:
@@ -726,18 +756,20 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination, socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send_to>(), token,
+ buffers, destination, flags))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send_to(this), handler, buffers, destination, flags);
+ initiate_async_send_to(this), token,
+ buffers, destination, flags);
}
/// Receive some data on a connected socket.
@@ -832,25 +864,31 @@ public:
/// Start an asynchronous receive on a connected socket.
/**
* This function is used to asynchronously receive data from the datagram
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The async_receive operation can only be used with a connected socket.
* Use the async_receive_from function to receive data on an unconnected
* datagram socket.
@@ -877,44 +915,51 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token,
+ buffers, socket_base::message_flags(0)))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive(this), handler,
+ initiate_async_receive(this), token,
buffers, socket_base::message_flags(0));
}
/// Start an asynchronous receive on a connected socket.
/**
* This function is used to asynchronously receive data from the datagram
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param flags Flags specifying how the receive call is to be made.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The async_receive operation can only be used with a connected socket.
* Use the async_receive_from function to receive data on an unconnected
* datagram socket.
@@ -931,18 +976,18 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token, buffers, flags))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive(this), handler, buffers, flags);
+ initiate_async_receive(this), token, buffers, flags);
}
/// Receive a datagram with the endpoint of the sender.
@@ -1036,31 +1081,37 @@ public:
/// Start an asynchronous receive.
/**
- * This function is used to asynchronously receive a datagram. The function
- * call always returns immediately.
+ * This function is used to asynchronously receive a datagram. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param sender_endpoint An endpoint object that receives the endpoint of
* the remote sender of the datagram. Ownership of the sender_endpoint object
* is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To receive into a single data buffer use the @ref buffer function as
* follows:
@@ -1082,50 +1133,57 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_from>(), token, buffers,
+ &sender_endpoint, socket_base::message_flags(0)))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive_from(this), handler, buffers,
+ initiate_async_receive_from(this), token, buffers,
&sender_endpoint, socket_base::message_flags(0));
}
/// Start an asynchronous receive.
/**
- * This function is used to asynchronously receive a datagram. The function
- * call always returns immediately.
+ * This function is used to asynchronously receive a datagram. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param sender_endpoint An endpoint object that receives the endpoint of
* the remote sender of the datagram. Ownership of the sender_endpoint object
* is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
* @param flags Flags specifying how the receive call is to be made.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* On POSIX or Windows operating systems, this asynchronous operation supports
* cancellation for the following asio::cancellation_type values:
@@ -1138,26 +1196,27 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint, socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_from>(), token,
+ buffers, &sender_endpoint, flags))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive_from(this), handler,
+ initiate_async_receive_from(this), token,
buffers, &sender_endpoint, flags);
}
private:
// Disallow copying and assignment.
- basic_datagram_socket(const basic_datagram_socket&) ASIO_DELETED;
+ basic_datagram_socket(const basic_datagram_socket&) = delete;
basic_datagram_socket& operator=(
- const basic_datagram_socket&) ASIO_DELETED;
+ const basic_datagram_socket&) = delete;
class initiate_async_send
{
@@ -1169,13 +1228,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
const ConstBufferSequence& buffers,
socket_base::message_flags flags) const
{
@@ -1203,13 +1262,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
const ConstBufferSequence& buffers, const endpoint_type& destination,
socket_base::message_flags flags) const
{
@@ -1237,13 +1296,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
const MutableBufferSequence& buffers,
socket_base::message_flags flags) const
{
@@ -1271,13 +1330,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
const MutableBufferSequence& buffers, endpoint_type* sender_endpoint,
socket_base::message_flags flags) const
{
diff --git a/3rdparty/asio/include/asio/basic_deadline_timer.hpp b/3rdparty/asio/include/asio/basic_deadline_timer.hpp
index 4d647f888ce..9343591bf8b 100644
--- a/3rdparty/asio/include/asio/basic_deadline_timer.hpp
+++ b/3rdparty/asio/include/asio/basic_deadline_timer.hpp
@@ -2,7 +2,7 @@
// basic_deadline_timer.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -128,6 +128,9 @@ template <typename Time,
typename Executor = any_io_executor>
class basic_deadline_timer
{
+private:
+ class initiate_async_wait;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -175,9 +178,9 @@ public:
*/
template <typename ExecutionContext>
explicit basic_deadline_timer(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
}
@@ -213,9 +216,9 @@ public:
*/
template <typename ExecutionContext>
basic_deadline_timer(ExecutionContext& context, const time_type& expiry_time,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -257,9 +260,9 @@ public:
template <typename ExecutionContext>
basic_deadline_timer(ExecutionContext& context,
const duration_type& expiry_time,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -268,7 +271,6 @@ public:
asio::detail::throw_error(ec, "expires_from_now");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_deadline_timer from another.
/**
* This constructor moves a timer from one object to another.
@@ -302,7 +304,6 @@ public:
impl_ = std::move(other.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the timer.
/**
@@ -314,7 +315,7 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
return impl_.get_executor();
}
@@ -607,30 +608,36 @@ public:
/// Start an asynchronous wait on the timer.
/**
* This function may be used to initiate an asynchronous wait against the
- * timer. It always returns immediately.
+ * timer. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
- * For each call to async_wait(), the supplied handler will be called exactly
- * once. The handler will be called when:
+ * For each call to async_wait(), the completion handler will be called
+ * exactly once. The completion handler will be called when:
*
* @li The timer has expired.
*
* @li The timer was cancelled, in which case the handler is passed the error
* code asio::error::operation_aborted.
*
- * @param handler The handler to be called when the timer expires. Copies
- * will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the timer expires. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error // Result of operation.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
* @par Per-Operation Cancellation
- * On POSIX or Windows operating systems, this asynchronous operation supports
- * cancellation for the following asio::cancellation_type values:
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
*
* @li @c cancellation_type::terminal
*
@@ -640,22 +647,22 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
- WaitHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(
- ASIO_MOVE_ARG(WaitHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token))
{
- return async_initiate<WaitHandler, void (asio::error_code)>(
- initiate_async_wait(this), handler);
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token);
}
private:
// Disallow copying and assignment.
- basic_deadline_timer(const basic_deadline_timer&) ASIO_DELETED;
+ basic_deadline_timer(const basic_deadline_timer&) = delete;
basic_deadline_timer& operator=(
- const basic_deadline_timer&) ASIO_DELETED;
+ const basic_deadline_timer&) = delete;
class initiate_async_wait
{
@@ -667,13 +674,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WaitHandler>
- void operator()(ASIO_MOVE_ARG(WaitHandler) handler) const
+ void operator()(WaitHandler&& handler) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a WaitHandler.
diff --git a/3rdparty/asio/include/asio/basic_file.hpp b/3rdparty/asio/include/asio/basic_file.hpp
new file mode 100644
index 00000000000..dbdb6d843d0
--- /dev/null
+++ b/3rdparty/asio/include/asio/basic_file.hpp
@@ -0,0 +1,824 @@
+//
+// basic_file.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 ASIO_BASIC_FILE_HPP
+#define ASIO_BASIC_FILE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <string>
+#include <utility>
+#include "asio/any_io_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/cstdint.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/post.hpp"
+#include "asio/file_base.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_file_service.hpp"
+#elif defined(ASIO_HAS_IO_URING)
+# include "asio/detail/io_uring_file_service.hpp"
+#endif
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if !defined(ASIO_BASIC_FILE_FWD_DECL)
+#define ASIO_BASIC_FILE_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Executor = any_io_executor>
+class basic_file;
+
+#endif // !defined(ASIO_BASIC_FILE_FWD_DECL)
+
+/// Provides file functionality.
+/**
+ * The basic_file class template provides functionality that is common to both
+ * stream-oriented and random-access files.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor>
+class basic_file
+ : public file_base
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the file type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The file type when rebound to the specified executor.
+ typedef basic_file<Executor1> other;
+ };
+
+ /// The native representation of a file.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#elif defined(ASIO_HAS_IOCP)
+ typedef detail::win_iocp_file_service::native_handle_type native_handle_type;
+#elif defined(ASIO_HAS_IO_URING)
+ typedef detail::io_uring_file_service::native_handle_type native_handle_type;
+#endif
+
+ /// Construct a basic_file without opening it.
+ /**
+ * This constructor initialises a file without opening it.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ */
+ explicit basic_file(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
+ /// Construct a basic_file without opening it.
+ /**
+ * This constructor initialises a file without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ */
+ template <typename ExecutionContext>
+ explicit basic_file(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ }
+
+ /// Construct and open a basic_file.
+ /**
+ * This constructor initialises a file and opens it.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ */
+ explicit basic_file(const executor_type& ex,
+ const char* path, file_base::flags open_flags)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), path, open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct a basic_file without opening it.
+ /**
+ * This constructor initialises a file and opens it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ */
+ template <typename ExecutionContext>
+ explicit basic_file(ExecutionContext& context,
+ const char* path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), path, open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_file.
+ /**
+ * This constructor initialises a file and opens it.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ */
+ explicit basic_file(const executor_type& ex,
+ const std::string& path, file_base::flags open_flags)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct a basic_file without opening it.
+ /**
+ * This constructor initialises a file and opens it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ */
+ template <typename ExecutionContext>
+ explicit basic_file(ExecutionContext& context,
+ const std::string& path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct a basic_file on an existing native file handle.
+ /**
+ * This constructor initialises a file object to hold an existing native file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param native_file A native file handle.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_file(const executor_type& ex, const native_handle_type& native_file)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(
+ impl_.get_implementation(), native_file, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_file on an existing native file.
+ /**
+ * This constructor initialises a file object to hold an existing native file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param native_file A native file.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_file(ExecutionContext& context, const native_handle_type& native_file,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(
+ impl_.get_implementation(), native_file, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Move-construct a basic_file from another.
+ /**
+ * This constructor moves a file from one object to another.
+ *
+ * @param other The other basic_file object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_file(const executor_type&) constructor.
+ */
+ basic_file(basic_file&& other) noexcept
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_file from another.
+ /**
+ * This assignment operator moves a file from one object to another.
+ *
+ * @param other The other basic_file object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_file(const executor_type&) constructor.
+ */
+ basic_file& operator=(basic_file&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ // All files have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_file;
+
+ /// Move-construct a basic_file from a file of another executor type.
+ /**
+ * This constructor moves a file from one object to another.
+ *
+ * @param other The other basic_file object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_file(const executor_type&) constructor.
+ */
+ template <typename Executor1>
+ basic_file(basic_file<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_file from a file of another executor type.
+ /**
+ * This assignment operator moves a file from one object to another.
+ *
+ * @param other The other basic_file object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_file(const executor_type&) constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_file&
+ > operator=(basic_file<Executor1>&& other)
+ {
+ basic_file tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return impl_.get_executor();
+ }
+
+ /// Open the file using the specified path.
+ /**
+ * This function opens the file so that it will use the specified path.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * asio::stream_file file(my_context);
+ * file.open("/path/to/my/file", asio::stream_file::read_only);
+ * @endcode
+ */
+ void open(const char* path, file_base::flags open_flags)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(), path, open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Open the file using the specified path.
+ /**
+ * This function opens the file so that it will use the specified path.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * asio::stream_file file(my_context);
+ * asio::error_code ec;
+ * file.open("/path/to/my/file", asio::stream_file::read_only, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ ASIO_SYNC_OP_VOID open(const char* path,
+ file_base::flags open_flags, asio::error_code& ec)
+ {
+ impl_.get_service().open(impl_.get_implementation(), path, open_flags, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Open the file using the specified path.
+ /**
+ * This function opens the file so that it will use the specified path.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @par Example
+ * @code
+ * asio::stream_file file(my_context);
+ * file.open("/path/to/my/file", asio::stream_file::read_only);
+ * @endcode
+ */
+ void open(const std::string& path, file_base::flags open_flags)
+ {
+ asio::error_code ec;
+ impl_.get_service().open(impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Open the file using the specified path.
+ /**
+ * This function opens the file so that it will use the specified path.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @par Example
+ * @code
+ * asio::stream_file file(my_context);
+ * asio::error_code ec;
+ * file.open("/path/to/my/file", asio::stream_file::read_only, ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ ASIO_SYNC_OP_VOID open(const std::string& path,
+ file_base::flags open_flags, asio::error_code& ec)
+ {
+ impl_.get_service().open(impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Assign an existing native file to the file.
+ /*
+ * This function opens the file to hold an existing native file.
+ *
+ * @param native_file A native file.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& native_file)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(
+ impl_.get_implementation(), native_file, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native file to the file.
+ /*
+ * This function opens the file to hold an existing native file.
+ *
+ * @param native_file A native file.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID assign(const native_handle_type& native_file,
+ asio::error_code& ec)
+ {
+ impl_.get_service().assign(
+ impl_.get_implementation(), native_file, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the file is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the file.
+ /**
+ * This function is used to close the file. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure. Note that, even if
+ * the function indicates an error, the underlying descriptor is closed.
+ */
+ void close()
+ {
+ asio::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the file.
+ /**
+ * This function is used to close the file. Any asynchronous read or write
+ * operations will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any. Note that, even if
+ * the function indicates an error, the underlying descriptor is closed.
+ *
+ * @par Example
+ * @code
+ * asio::stream_file file(my_context);
+ * ...
+ * asio::error_code ec;
+ * file.close(ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * @endcode
+ */
+ ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Release ownership of the underlying native file.
+ /**
+ * This function causes all outstanding asynchronous read and write
+ * operations to finish immediately, and the handlers for cancelled
+ * operations will be passed the asio::error::operation_aborted error.
+ * Ownership of the native file is then transferred to the caller.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ asio::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native file.
+ /**
+ * This function causes all outstanding asynchronous read and write
+ * operations to finish immediately, and the handlers for cancelled
+ * operations will be passed the asio::error::operation_aborted error.
+ * Ownership of the native file is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(asio::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
+ /// Get the native file representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * file. This is intended to allow access to native file functionality
+ * that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the file.
+ /**
+ * This function causes all outstanding asynchronous read and write
+ * operations to finish immediately, and the handlers for cancelled
+ * operations will be passed the asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note Calls to cancel() will always fail with
+ * asio::error::operation_not_supported when run on Windows XP, Windows
+ * Server 2003, and earlier versions of Windows, unless
+ * ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has
+ * two issues that should be considered before enabling its use:
+ *
+ * @li It will only cancel asynchronous operations that were initiated in the
+ * current thread.
+ *
+ * @li It can appear to complete without error, but the request to cancel the
+ * unfinished operations may be silently ignored by the operating system.
+ * Whether it works or not seems to depend on the drivers that are installed.
+ *
+ * For portable cancellation, consider using the close() function to
+ * simultaneously cancel the outstanding operations and close the file.
+ *
+ * When running on Windows Vista, Windows Server 2008, and later, the
+ * CancelIoEx function is always used. This function does not have the
+ * problems described above.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \
+ && !defined(ASIO_ENABLE_CANCELIO)
+ __declspec(deprecated("By default, this function always fails with "
+ "operation_not_supported when used on Windows XP, Windows Server 2003, "
+ "or earlier. Consult documentation for details."))
+#endif
+ void cancel()
+ {
+ asio::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the file.
+ /**
+ * This function causes all outstanding asynchronous read and write
+ * operations to finish immediately, and the handlers for cancelled
+ * operations will be passed the asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls to cancel() will always fail with
+ * asio::error::operation_not_supported when run on Windows XP, Windows
+ * Server 2003, and earlier versions of Windows, unless
+ * ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has
+ * two issues that should be considered before enabling its use:
+ *
+ * @li It will only cancel asynchronous operations that were initiated in the
+ * current thread.
+ *
+ * @li It can appear to complete without error, but the request to cancel the
+ * unfinished operations may be silently ignored by the operating system.
+ * Whether it works or not seems to depend on the drivers that are installed.
+ *
+ * For portable cancellation, consider using the close() function to
+ * simultaneously cancel the outstanding operations and close the file.
+ *
+ * When running on Windows Vista, Windows Server 2008, and later, the
+ * CancelIoEx function is always used. This function does not have the
+ * problems described above.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \
+ && !defined(ASIO_ENABLE_CANCELIO)
+ __declspec(deprecated("By default, this function always fails with "
+ "operation_not_supported when used on Windows XP, Windows Server 2003, "
+ "or earlier. Consult documentation for details."))
+#endif
+ ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Get the size of the file.
+ /**
+ * This function determines the size of the file, in bytes.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ uint64_t size() const
+ {
+ asio::error_code ec;
+ uint64_t s = impl_.get_service().size(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "size");
+ return s;
+ }
+
+ /// Get the size of the file.
+ /**
+ * This function determines the size of the file, in bytes.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ uint64_t size(asio::error_code& ec) const
+ {
+ return impl_.get_service().size(impl_.get_implementation(), ec);
+ }
+
+ /// Alter the size of the file.
+ /**
+ * This function resizes the file to the specified size, in bytes. If the
+ * current file size exceeds @c n then any extra data is discarded. If the
+ * current size is less than @c n then the file is extended and filled with
+ * zeroes.
+ *
+ * @param n The new size for the file.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void resize(uint64_t n)
+ {
+ asio::error_code ec;
+ impl_.get_service().resize(impl_.get_implementation(), n, ec);
+ asio::detail::throw_error(ec, "resize");
+ }
+
+ /// Alter the size of the file.
+ /**
+ * This function resizes the file to the specified size, in bytes. If the
+ * current file size exceeds @c n then any extra data is discarded. If the
+ * current size is less than @c n then the file is extended and filled with
+ * zeroes.
+ *
+ * @param n The new size for the file.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID resize(uint64_t n, asio::error_code& ec)
+ {
+ impl_.get_service().resize(impl_.get_implementation(), n, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Synchronise the file to disk.
+ /**
+ * This function synchronises the file data and metadata to disk. Note that
+ * the semantics of this synchronisation vary between operation systems.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void sync_all()
+ {
+ asio::error_code ec;
+ impl_.get_service().sync_all(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "sync_all");
+ }
+
+ /// Synchronise the file to disk.
+ /**
+ * This function synchronises the file data and metadata to disk. Note that
+ * the semantics of this synchronisation vary between operation systems.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID sync_all(asio::error_code& ec)
+ {
+ impl_.get_service().sync_all(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Synchronise the file data to disk.
+ /**
+ * This function synchronises the file data to disk. Note that the semantics
+ * of this synchronisation vary between operation systems.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void sync_data()
+ {
+ asio::error_code ec;
+ impl_.get_service().sync_data(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "sync_data");
+ }
+
+ /// Synchronise the file data to disk.
+ /**
+ * This function synchronises the file data to disk. Note that the semantics
+ * of this synchronisation vary between operation systems.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID sync_data(asio::error_code& ec)
+ {
+ impl_.get_service().sync_data(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ /**
+ * This function destroys the file, cancelling any outstanding asynchronous
+ * operations associated with the file as if by calling @c cancel.
+ */
+ ~basic_file()
+ {
+ }
+
+#if defined(ASIO_HAS_IOCP)
+ detail::io_object_impl<detail::win_iocp_file_service, Executor> impl_;
+#elif defined(ASIO_HAS_IO_URING)
+ detail::io_object_impl<detail::io_uring_file_service, Executor> impl_;
+#endif
+
+private:
+ // Disallow copying and assignment.
+ basic_file(const basic_file&) = delete;
+ basic_file& operator=(const basic_file&) = delete;
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_BASIC_FILE_HPP
diff --git a/3rdparty/asio/include/asio/basic_io_object.hpp b/3rdparty/asio/include/asio/basic_io_object.hpp
index 733557e3e10..7e502206ff8 100644
--- a/3rdparty/asio/include/asio/basic_io_object.hpp
+++ b/3rdparty/asio/include/asio/basic_io_object.hpp
@@ -2,7 +2,7 @@
// basic_io_object.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,7 +22,6 @@
namespace asio {
-#if defined(ASIO_HAS_MOVE)
namespace detail
{
// Type trait used to determine whether a service supports move.
@@ -45,14 +44,13 @@ namespace detail
static_cast<implementation_type*>(0))) == 1;
};
}
-#endif // defined(ASIO_HAS_MOVE)
/// Base class for all I/O objects.
/**
* @note All I/O objects are non-copyable. However, when using C++0x, certain
* I/O objects do support move construction and move assignment.
*/
-#if !defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+#if defined(GENERATING_DOCUMENTATION)
template <typename IoObjectService>
#else
template <typename IoObjectService,
@@ -101,7 +99,7 @@ public:
typedef asio::io_context::executor_type executor_type;
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return service_.get_io_context().get_executor();
}
@@ -190,7 +188,6 @@ private:
implementation_type implementation_;
};
-#if defined(ASIO_HAS_MOVE)
// Specialisation for movable objects.
template <typename IoObjectService>
class basic_io_object<IoObjectService, true>
@@ -213,7 +210,7 @@ public:
typedef asio::io_context::executor_type executor_type;
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return service_->get_io_context().get_executor();
}
@@ -281,7 +278,6 @@ private:
IoObjectService* service_;
implementation_type implementation_;
};
-#endif // defined(ASIO_HAS_MOVE)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/basic_random_access_file.hpp b/3rdparty/asio/include/asio/basic_random_access_file.hpp
new file mode 100644
index 00000000000..fe88f420560
--- /dev/null
+++ b/3rdparty/asio/include/asio/basic_random_access_file.hpp
@@ -0,0 +1,689 @@
+//
+// basic_random_access_file.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 ASIO_BASIC_RANDOM_ACCESS_FILE_HPP
+#define ASIO_BASIC_RANDOM_ACCESS_FILE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <cstddef>
+#include "asio/async_result.hpp"
+#include "asio/basic_file.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if !defined(ASIO_BASIC_RANDOM_ACCESS_FILE_FWD_DECL)
+#define ASIO_BASIC_RANDOM_ACCESS_FILE_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Executor = any_io_executor>
+class basic_random_access_file;
+
+#endif // !defined(ASIO_BASIC_RANDOM_ACCESS_FILE_FWD_DECL)
+
+/// Provides random-access file functionality.
+/**
+ * The basic_random_access_file class template provides asynchronous and
+ * blocking random-access file functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * Synchronous @c read_some_at and @c write_some_at operations are thread safe
+ * with respect to each other, if the underlying operating system calls are
+ * also thread safe. This means that it is permitted to perform concurrent
+ * calls to these synchronous operations on a single file object. Other
+ * synchronous operations, such as @c open or @c close, are not thread safe.
+ */
+template <typename Executor>
+class basic_random_access_file
+ : public basic_file<Executor>
+{
+private:
+ class initiate_async_write_some_at;
+ class initiate_async_read_some_at;
+
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the file type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The file type when rebound to the specified executor.
+ typedef basic_random_access_file<Executor1> other;
+ };
+
+ /// The native representation of a file.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef typename basic_file<Executor>::native_handle_type native_handle_type;
+#endif
+
+ /// Construct a basic_random_access_file without opening it.
+ /**
+ * This constructor initialises a file without opening it. The file needs to
+ * be opened before data can be read from or or written to it.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ */
+ explicit basic_random_access_file(const executor_type& ex)
+ : basic_file<Executor>(ex)
+ {
+ }
+
+ /// Construct a basic_random_access_file without opening it.
+ /**
+ * This constructor initialises a file without opening it. The file needs to
+ * be opened before data can be read from or or written to it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ */
+ template <typename ExecutionContext>
+ explicit basic_random_access_file(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context)
+ {
+ }
+
+ /// Construct and open a basic_random_access_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_random_access_file(const executor_type& ex,
+ const char* path, file_base::flags open_flags)
+ : basic_file<Executor>(ex, path, open_flags)
+ {
+ }
+
+ /// Construct and open a basic_random_access_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_random_access_file(ExecutionContext& context,
+ const char* path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context, path, open_flags)
+ {
+ }
+
+ /// Construct and open a basic_random_access_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_random_access_file(const executor_type& ex,
+ const std::string& path, file_base::flags open_flags)
+ : basic_file<Executor>(ex, path, open_flags)
+ {
+ }
+
+ /// Construct and open a basic_random_access_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_random_access_file(ExecutionContext& context,
+ const std::string& path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context, path, open_flags)
+ {
+ }
+
+ /// Construct a basic_random_access_file on an existing native file.
+ /**
+ * This constructor initialises a random-access file object to hold an
+ * existing native file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param native_file The new underlying file implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_random_access_file(const executor_type& ex,
+ const native_handle_type& native_file)
+ : basic_file<Executor>(ex, native_file)
+ {
+ }
+
+ /// Construct a basic_random_access_file on an existing native file.
+ /**
+ * This constructor initialises a random-access file object to hold an
+ * existing native file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param native_file The new underlying file implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_random_access_file(ExecutionContext& context,
+ const native_handle_type& native_file,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context, native_file)
+ {
+ }
+
+ /// Move-construct a basic_random_access_file from another.
+ /**
+ * This constructor moves a random-access file from one object to another.
+ *
+ * @param other The other basic_random_access_file object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_random_access_file(const executor_type&)
+ * constructor.
+ */
+ basic_random_access_file(basic_random_access_file&& other) noexcept
+ : basic_file<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_random_access_file from another.
+ /**
+ * This assignment operator moves a random-access file from one object to
+ * another.
+ *
+ * @param other The other basic_random_access_file object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_random_access_file(const executor_type&)
+ * constructor.
+ */
+ basic_random_access_file& operator=(basic_random_access_file&& other)
+ {
+ basic_file<Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Move-construct a basic_random_access_file from a file of another executor
+ /// type.
+ /**
+ * This constructor moves a random-access file from one object to another.
+ *
+ * @param other The other basic_random_access_file object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_random_access_file(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_random_access_file(basic_random_access_file<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_random_access_file from a file of another executor
+ /// type.
+ /**
+ * This assignment operator moves a random-access file from one object to
+ * another.
+ *
+ * @param other The other basic_random_access_file object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_random_access_file(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_random_access_file&
+ > operator=(basic_random_access_file<Executor1>&& other)
+ {
+ basic_file<Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Destroys the file.
+ /**
+ * This function destroys the file, cancelling any outstanding asynchronous
+ * operations associated with the file as if by calling @c cancel.
+ */
+ ~basic_random_access_file()
+ {
+ }
+
+ /// Write some data to the handle at the specified offset.
+ /**
+ * This function is used to write data to the random-access handle. The
+ * function call will block until one or more bytes of the data has been
+ * written successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the end of the file was reached.
+ *
+ * @note The write_some_at operation may not write all of the data. Consider
+ * using the @ref write_at function if you need to ensure that all data is
+ * written before the blocking operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.write_some_at(42, asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some_at(uint64_t offset,
+ const ConstBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = this->impl_.get_service().write_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ asio::detail::throw_error(ec, "write_some_at");
+ return s;
+ }
+
+ /// Write some data to the handle at the specified offset.
+ /**
+ * This function is used to write data to the random-access handle. The
+ * function call will block until one or more bytes of the data has been
+ * written successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. Returns 0 if an error occurred.
+ *
+ * @note The write_some operation may not write all of the data to the
+ * file. Consider using the @ref write_at function if you need to ensure that
+ * all data is written before the blocking operation completes.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some_at(uint64_t offset,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ return this->impl_.get_service().write_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ }
+
+ /// Start an asynchronous write at the specified offset.
+ /**
+ * This function is used to asynchronously write data to the random-access
+ * handle. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more data buffers to be written to the handle.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes written.
+ * ); @endcode
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The write operation may not write all of the data to the file.
+ * Consider using the @ref async_write_at function if you need to ensure that
+ * all data is written before the asynchronous operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.async_write_some_at(42, asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
+ */
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some_at(uint64_t offset, const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some_at>(), token, offset, buffers))
+ {
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some_at(this), token, offset, buffers);
+ }
+
+ /// Read some data from the handle at the specified offset.
+ /**
+ * This function is used to read data from the random-access handle. The
+ * function call will block until one or more bytes of data has been read
+ * successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the end of the file was reached.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read_at function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.read_some_at(42, asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some_at(uint64_t offset,
+ const MutableBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = this->impl_.get_service().read_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ asio::detail::throw_error(ec, "read_some_at");
+ return s;
+ }
+
+ /// Read some data from the handle at the specified offset.
+ /**
+ * This function is used to read data from the random-access handle. The
+ * function call will block until one or more bytes of data has been read
+ * successfully, or until an error occurs.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. Returns 0 if an error occurred.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read_at function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some_at(uint64_t offset,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ return this->impl_.get_service().read_some_at(
+ this->impl_.get_implementation(), offset, buffers, ec);
+ }
+
+ /// Start an asynchronous read at the specified offset.
+ /**
+ * This function is used to asynchronously read data from the random-access
+ * handle. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes read.
+ * ); @endcode
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The read operation may not read all of the requested number of bytes.
+ * Consider using the @ref async_read_at function if you need to ensure that
+ * the requested amount of data is read before the asynchronous operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * handle.async_read_some_at(42, asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
+ */
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some_at(uint64_t offset, const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some_at>(), token, offset, buffers))
+ {
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_read_some_at(this), token, offset, buffers);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_random_access_file(const basic_random_access_file&) = delete;
+ basic_random_access_file& operator=(
+ const basic_random_access_file&) = delete;
+
+ class initiate_async_write_some_at
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_write_some_at(basic_random_access_file* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ uint64_t offset, const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_write_some_at(
+ self_->impl_.get_implementation(), offset, buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_random_access_file* self_;
+ };
+
+ class initiate_async_read_some_at
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_read_some_at(basic_random_access_file* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ uint64_t offset, const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_read_some_at(
+ self_->impl_.get_implementation(), offset, buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_random_access_file* self_;
+ };
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_BASIC_RANDOM_ACCESS_FILE_HPP
diff --git a/3rdparty/asio/include/asio/basic_raw_socket.hpp b/3rdparty/asio/include/asio/basic_raw_socket.hpp
index d48885dfc45..112090900ce 100644
--- a/3rdparty/asio/include/asio/basic_raw_socket.hpp
+++ b/3rdparty/asio/include/asio/basic_raw_socket.hpp
@@ -2,7 +2,7 @@
// basic_raw_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -46,17 +46,23 @@ class basic_raw_socket;
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*
- * Synchronous @c send, @c send_to, @c receive, @c receive_from, and @c connect
- * operations are thread safe with respect to each other, if the underlying
- * operating system calls are also thread safe. This means that it is permitted
- * to perform concurrent calls to these synchronous operations on a single
- * socket object. Other synchronous operations, such as @c open or @c close, are
- * not thread safe.
+ * Synchronous @c send, @c send_to, @c receive, @c receive_from, @c connect,
+ * and @c shutdown operations are thread safe with respect to each other, if
+ * the underlying operating system calls are also thread safe. This means that
+ * it is permitted to perform concurrent calls to these synchronous operations
+ * on a single socket object. Other synchronous operations, such as @c open or
+ * @c close, are not thread safe.
*/
template <typename Protocol, typename Executor>
class basic_raw_socket
: public basic_socket<Protocol, Executor>
{
+private:
+ class initiate_async_send;
+ class initiate_async_send_to;
+ class initiate_async_receive;
+ class initiate_async_receive_from;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -107,9 +113,9 @@ public:
*/
template <typename ExecutionContext>
explicit basic_raw_socket(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context)
{
}
@@ -144,10 +150,10 @@ public:
*/
template <typename ExecutionContext>
basic_raw_socket(ExecutionContext& context, const protocol_type& protocol,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: basic_socket<Protocol, Executor>(context, protocol)
{
}
@@ -190,9 +196,9 @@ public:
*/
template <typename ExecutionContext>
basic_raw_socket(ExecutionContext& context, const endpoint_type& endpoint,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context, endpoint)
{
}
@@ -235,14 +241,13 @@ public:
template <typename ExecutionContext>
basic_raw_socket(ExecutionContext& context,
const protocol_type& protocol, const native_handle_type& native_socket,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context, protocol, native_socket)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_raw_socket from another.
/**
* This constructor moves a raw socket from one object to another.
@@ -254,7 +259,7 @@ public:
* constructed using the @c basic_raw_socket(const executor_type&)
* constructor.
*/
- basic_raw_socket(basic_raw_socket&& other) ASIO_NOEXCEPT
+ basic_raw_socket(basic_raw_socket&& other) noexcept
: basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -290,10 +295,10 @@ public:
*/
template <typename Protocol1, typename Executor1>
basic_raw_socket(basic_raw_socket<Protocol1, Executor1>&& other,
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -310,16 +315,15 @@ public:
* constructor.
*/
template <typename Protocol1, typename Executor1>
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value,
basic_raw_socket&
- >::type operator=(basic_raw_socket<Protocol1, Executor1>&& other)
+ > operator=(basic_raw_socket<Protocol1, Executor1>&& other)
{
basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the socket.
/**
@@ -414,26 +418,32 @@ public:
/// Start an asynchronous send on a connected socket.
/**
- * This function is used to send data on the raw socket. The function call
- * will block until the data has been sent successfully or an error occurs.
+ * This function is used to asynchronously send data on the raw socket. It is
+ * an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The async_send operation can only be used with a connected socket.
* Use the async_send_to function to send data on an unconnected raw
* socket.
@@ -459,44 +469,51 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token,
+ buffers, socket_base::message_flags(0)))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send(this), handler,
+ initiate_async_send(this), token,
buffers, socket_base::message_flags(0));
}
/// Start an asynchronous send on a connected socket.
/**
- * This function is used to send data on the raw socket. The function call
- * will block until the data has been sent successfully or an error occurs.
+ * This function is used to asynchronously send data on the raw socket. It is
+ * an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The async_send operation can only be used with a connected socket.
* Use the async_send_to function to send data on an unconnected raw
* socket.
@@ -513,18 +530,18 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token, buffers, flags))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send(this), handler, buffers, flags);
+ initiate_async_send(this), token, buffers, flags);
}
/// Send raw data to the specified endpoint.
@@ -618,28 +635,34 @@ public:
/// Start an asynchronous send.
/**
* This function is used to asynchronously send raw data to the specified
- * remote endpoint. The function call always returns immediately.
+ * remote endpoint. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more data buffers to be sent to the remote endpoint.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param destination The remote endpoint to which the data will be sent.
* Copies will be made of the endpoint as required.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To send a single data buffer use the @ref buffer function as follows:
* @code
@@ -664,48 +687,55 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send_to>(), token, buffers,
+ destination, socket_base::message_flags(0)))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send_to(this), handler, buffers,
+ initiate_async_send_to(this), token, buffers,
destination, socket_base::message_flags(0));
}
/// Start an asynchronous send.
/**
* This function is used to asynchronously send raw data to the specified
- * remote endpoint. The function call always returns immediately.
+ * remote endpoint. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more data buffers to be sent to the remote endpoint.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
* @param destination The remote endpoint to which the data will be sent.
* Copies will be made of the endpoint as required.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* On POSIX or Windows operating systems, this asynchronous operation supports
* cancellation for the following asio::cancellation_type values:
@@ -718,18 +748,20 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send_to(const ConstBufferSequence& buffers,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination, socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send_to>(), token,
+ buffers, destination, flags))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send_to(this), handler, buffers, destination, flags);
+ initiate_async_send_to(this), token,
+ buffers, destination, flags);
}
/// Receive some data on a connected socket.
@@ -824,25 +856,31 @@ public:
/// Start an asynchronous receive on a connected socket.
/**
* This function is used to asynchronously receive data from the raw
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The async_receive operation can only be used with a connected socket.
* Use the async_receive_from function to receive data on an unconnected
* raw socket.
@@ -869,44 +907,51 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token,
+ buffers, socket_base::message_flags(0)))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive(this), handler,
+ initiate_async_receive(this), token,
buffers, socket_base::message_flags(0));
}
/// Start an asynchronous receive on a connected socket.
/**
* This function is used to asynchronously receive data from the raw
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param flags Flags specifying how the receive call is to be made.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The async_receive operation can only be used with a connected socket.
* Use the async_receive_from function to receive data on an unconnected
* raw socket.
@@ -923,18 +968,19 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
+ std::size_t)) ReadToken
+ = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token, buffers, flags))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive(this), handler, buffers, flags);
+ initiate_async_receive(this), token, buffers, flags);
}
/// Receive raw data with the endpoint of the sender.
@@ -1028,31 +1074,37 @@ public:
/// Start an asynchronous receive.
/**
- * This function is used to asynchronously receive raw data. The function
- * call always returns immediately.
+ * This function is used to asynchronously receive raw data. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param sender_endpoint An endpoint object that receives the endpoint of
* the remote sender of the data. Ownership of the sender_endpoint object
* is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To receive into a single data buffer use the @ref buffer function as
* follows:
@@ -1074,50 +1126,58 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ReadToken&& token
+ = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_from>(), token, buffers,
+ &sender_endpoint, socket_base::message_flags(0)))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive_from(this), handler, buffers,
+ initiate_async_receive_from(this), token, buffers,
&sender_endpoint, socket_base::message_flags(0));
}
/// Start an asynchronous receive.
/**
- * This function is used to asynchronously receive raw data. The function
- * call always returns immediately.
+ * This function is used to asynchronously receive raw data. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param sender_endpoint An endpoint object that receives the endpoint of
* the remote sender of the data. Ownership of the sender_endpoint object
* is retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
* @param flags Flags specifying how the receive call is to be made.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* On POSIX or Windows operating systems, this asynchronous operation supports
* cancellation for the following asio::cancellation_type values:
@@ -1130,25 +1190,27 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive_from(const MutableBufferSequence& buffers,
+ std::size_t)) ReadToken
+ = default_completion_token_t<executor_type>>
+ auto async_receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint, socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_from>(), token,
+ buffers, &sender_endpoint, flags))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive_from(this), handler,
+ initiate_async_receive_from(this), token,
buffers, &sender_endpoint, flags);
}
private:
// Disallow copying and assignment.
- basic_raw_socket(const basic_raw_socket&) ASIO_DELETED;
- basic_raw_socket& operator=(const basic_raw_socket&) ASIO_DELETED;
+ basic_raw_socket(const basic_raw_socket&) = delete;
+ basic_raw_socket& operator=(const basic_raw_socket&) = delete;
class initiate_async_send
{
@@ -1160,13 +1222,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
const ConstBufferSequence& buffers,
socket_base::message_flags flags) const
{
@@ -1194,13 +1256,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
const ConstBufferSequence& buffers, const endpoint_type& destination,
socket_base::message_flags flags) const
{
@@ -1228,13 +1290,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
const MutableBufferSequence& buffers,
socket_base::message_flags flags) const
{
@@ -1262,13 +1324,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
const MutableBufferSequence& buffers, endpoint_type* sender_endpoint,
socket_base::message_flags flags) const
{
diff --git a/3rdparty/asio/include/asio/basic_readable_pipe.hpp b/3rdparty/asio/include/asio/basic_readable_pipe.hpp
new file mode 100644
index 00000000000..9a5a0653f6b
--- /dev/null
+++ b/3rdparty/asio/include/asio/basic_readable_pipe.hpp
@@ -0,0 +1,626 @@
+//
+// basic_readable_pipe.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 ASIO_BASIC_READABLE_PIPE_HPP
+#define ASIO_BASIC_READABLE_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <string>
+#include <utility>
+#include "asio/any_io_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_handle_service.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_descriptor_service.hpp"
+#else
+# include "asio/detail/reactive_descriptor_service.hpp"
+#endif
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Provides pipe functionality.
+/**
+ * The basic_readable_pipe class provides a wrapper over pipe
+ * functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor = any_io_executor>
+class basic_readable_pipe
+{
+private:
+ class initiate_async_read_some;
+
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the pipe type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The pipe type when rebound to the specified executor.
+ typedef basic_readable_pipe<Executor1> other;
+ };
+
+ /// The native representation of a pipe.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#elif defined(ASIO_HAS_IOCP)
+ typedef detail::win_iocp_handle_service::native_handle_type
+ native_handle_type;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef detail::io_uring_descriptor_service::native_handle_type
+ native_handle_type;
+#else
+ typedef detail::reactive_descriptor_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// A basic_readable_pipe is always the lowest layer.
+ typedef basic_readable_pipe lowest_layer_type;
+
+ /// Construct a basic_readable_pipe without opening it.
+ /**
+ * This constructor creates a pipe without opening it.
+ *
+ * @param ex The I/O executor that the pipe will use, by default, to dispatch
+ * handlers for any asynchronous operations performed on the pipe.
+ */
+ explicit basic_readable_pipe(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
+ /// Construct a basic_readable_pipe without opening it.
+ /**
+ * This constructor creates a pipe without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the pipe will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the pipe.
+ */
+ template <typename ExecutionContext>
+ explicit basic_readable_pipe(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ }
+
+ /// Construct a basic_readable_pipe on an existing native pipe.
+ /**
+ * This constructor creates a pipe object to hold an existing native
+ * pipe.
+ *
+ * @param ex The I/O executor that the pipe will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_readable_pipe(const executor_type& ex,
+ const native_handle_type& native_pipe)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_readable_pipe on an existing native pipe.
+ /**
+ * This constructor creates a pipe object to hold an existing native
+ * pipe.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the pipe will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_readable_pipe(ExecutionContext& context,
+ const native_handle_type& native_pipe,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Move-construct a basic_readable_pipe from another.
+ /**
+ * This constructor moves a pipe from one object to another.
+ *
+ * @param other The other basic_readable_pipe object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_readable_pipe(const executor_type&)
+ * constructor.
+ */
+ basic_readable_pipe(basic_readable_pipe&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_readable_pipe from another.
+ /**
+ * This assignment operator moves a pipe from one object to another.
+ *
+ * @param other The other basic_readable_pipe object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_readable_pipe(const executor_type&)
+ * constructor.
+ */
+ basic_readable_pipe& operator=(basic_readable_pipe&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ // All pipes have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_readable_pipe;
+
+ /// Move-construct a basic_readable_pipe from a pipe of another executor type.
+ /**
+ * This constructor moves a pipe from one object to another.
+ *
+ * @param other The other basic_readable_pipe object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_readable_pipe(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_readable_pipe(basic_readable_pipe<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_readable_pipe from a pipe of another executor type.
+ /**
+ * This assignment operator moves a pipe from one object to another.
+ *
+ * @param other The other basic_readable_pipe object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_readable_pipe(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_readable_pipe&
+ > operator=(basic_readable_pipe<Executor1>&& other)
+ {
+ basic_readable_pipe tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
+ }
+
+ /// Destroys the pipe.
+ /**
+ * This function destroys the pipe, cancelling any outstanding
+ * asynchronous wait operations associated with the pipe as if by
+ * calling @c cancel.
+ */
+ ~basic_readable_pipe()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return impl_.get_executor();
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * layers. Since a basic_readable_pipe cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A reference to the lowest layer in the stack of layers. Ownership
+ * is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return *this;
+ }
+
+ /// Get a const reference to the lowest layer.
+ /**
+ * This function returns a const reference to the lowest layer in a stack of
+ * layers. Since a basic_readable_pipe cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A const reference to the lowest layer in the stack of layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
+ return *this;
+ }
+
+ /// Assign an existing native pipe to the pipe.
+ /*
+ * This function opens the pipe to hold an existing native pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& native_pipe)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native pipe to the pipe.
+ /*
+ * This function opens the pipe to hold an existing native pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID assign(const native_handle_type& native_pipe,
+ asio::error_code& ec)
+ {
+ impl_.get_service().assign(impl_.get_implementation(), native_pipe, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the pipe is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the pipe.
+ /**
+ * This function is used to close the pipe. Any asynchronous read operations
+ * will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void close()
+ {
+ asio::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the pipe.
+ /**
+ * This function is used to close the pipe. Any asynchronous read operations
+ * will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Release ownership of the underlying native pipe.
+ /**
+ * This function causes all outstanding asynchronous read operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error. Ownership of the
+ * native pipe is then transferred to the caller.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ asio::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native pipe.
+ /**
+ * This function causes all outstanding asynchronous read operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error. Ownership of the
+ * native pipe is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(asio::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
+ /// Get the native pipe representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * pipe. This is intended to allow access to native pipe
+ * functionality that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the pipe.
+ /**
+ * This function causes all outstanding asynchronous read operations to finish
+ * immediately, and the handlers for cancelled operations will be passed the
+ * asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void cancel()
+ {
+ asio::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the pipe.
+ /**
+ * This function causes all outstanding asynchronous read operations to finish
+ * immediately, and the handlers for cancelled operations will be passed the
+ * asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Read some data from the pipe.
+ /**
+ * This function is used to read data from the pipe. The function call will
+ * block until one or more bytes of data has been read successfully, or until
+ * an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * basic_readable_pipe.read_some(asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = impl_.get_service().read_some(
+ impl_.get_implementation(), buffers, ec);
+ asio::detail::throw_error(ec, "read_some");
+ return s;
+ }
+
+ /// Read some data from the pipe.
+ /**
+ * This function is used to read data from the pipe. The function call will
+ * block until one or more bytes of data has been read successfully, or until
+ * an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. Returns 0 if an error occurred.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers,
+ asio::error_code& ec)
+ {
+ return impl_.get_service().read_some(
+ impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous read.
+ /**
+ * This function is used to asynchronously read data from the pipe. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes read.
+ * ); @endcode
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The read operation may not read all of the requested number of bytes.
+ * Consider using the @ref async_read function if you need to ensure that the
+ * requested amount of data is read before the asynchronous operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * basic_readable_pipe.async_read_some(
+ * asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
+ {
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_read_some(this), token, buffers);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_readable_pipe(const basic_readable_pipe&) = delete;
+ basic_readable_pipe& operator=(const basic_readable_pipe&) = delete;
+
+ class initiate_async_read_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_read_some(basic_readable_pipe* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_read_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_readable_pipe* self_;
+ };
+
+#if defined(ASIO_HAS_IOCP)
+ detail::io_object_impl<detail::win_iocp_handle_service, Executor> impl_;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ detail::io_object_impl<detail::io_uring_descriptor_service, Executor> impl_;
+#else
+ detail::io_object_impl<detail::reactive_descriptor_service, Executor> impl_;
+#endif
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_PIPE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_BASIC_READABLE_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/basic_seq_packet_socket.hpp b/3rdparty/asio/include/asio/basic_seq_packet_socket.hpp
index a1f6d99831f..cf2a4b6ad71 100644
--- a/3rdparty/asio/include/asio/basic_seq_packet_socket.hpp
+++ b/3rdparty/asio/include/asio/basic_seq_packet_socket.hpp
@@ -2,7 +2,7 @@
// basic_seq_packet_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -44,16 +44,21 @@ class basic_seq_packet_socket;
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*
- * Synchronous @c send, @c receive, and @c connect operations are thread safe
- * with respect to each other, if the underlying operating system calls are
- * also thread safe. This means that it is permitted to perform concurrent
- * calls to these synchronous operations on a single socket object. Other
- * synchronous operations, such as @c open or @c close, are not thread safe.
+ * Synchronous @c send, @c receive, @c connect, and @c shutdown operations are
+ * thread safe with respect to each other, if the underlying operating system
+ * calls are also thread safe. This means that it is permitted to perform
+ * concurrent calls to these synchronous operations on a single socket object.
+ * Other synchronous operations, such as @c open or @c close, are not thread
+ * safe.
*/
template <typename Protocol, typename Executor>
class basic_seq_packet_socket
: public basic_socket<Protocol, Executor>
{
+private:
+ class initiate_async_send;
+ class initiate_async_receive_with_flags;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -106,9 +111,9 @@ public:
*/
template <typename ExecutionContext>
explicit basic_seq_packet_socket(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context)
{
}
@@ -149,10 +154,10 @@ public:
template <typename ExecutionContext>
basic_seq_packet_socket(ExecutionContext& context,
const protocol_type& protocol,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: basic_socket<Protocol, Executor>(context, protocol)
{
}
@@ -197,9 +202,9 @@ public:
template <typename ExecutionContext>
basic_seq_packet_socket(ExecutionContext& context,
const endpoint_type& endpoint,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context, endpoint)
{
}
@@ -242,14 +247,13 @@ public:
template <typename ExecutionContext>
basic_seq_packet_socket(ExecutionContext& context,
const protocol_type& protocol, const native_handle_type& native_socket,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context, protocol, native_socket)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_seq_packet_socket from another.
/**
* This constructor moves a sequenced packet socket from one object to
@@ -262,7 +266,7 @@ public:
* constructed using the @c basic_seq_packet_socket(const executor_type&)
* constructor.
*/
- basic_seq_packet_socket(basic_seq_packet_socket&& other) ASIO_NOEXCEPT
+ basic_seq_packet_socket(basic_seq_packet_socket&& other) noexcept
: basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -300,10 +304,10 @@ public:
*/
template <typename Protocol1, typename Executor1>
basic_seq_packet_socket(basic_seq_packet_socket<Protocol1, Executor1>&& other,
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -322,16 +326,15 @@ public:
* constructor.
*/
template <typename Protocol1, typename Executor1>
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value,
basic_seq_packet_socket&
- >::type operator=(basic_seq_packet_socket<Protocol1, Executor1>&& other)
+ > operator=(basic_seq_packet_socket<Protocol1, Executor1>&& other)
{
basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the socket.
/**
@@ -405,27 +408,33 @@ public:
/// Start an asynchronous send.
/**
* This function is used to asynchronously send data on the sequenced packet
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To send a single data buffer use the @ref buffer function as follows:
* @code
@@ -447,18 +456,20 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
+ std::size_t)) WriteToken
+ = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WriteToken&& token
+ = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token, buffers, flags))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send(this), handler, buffers, flags);
+ initiate_async_send(this), token, buffers, flags);
}
/// Receive some data on the socket.
@@ -583,31 +594,37 @@ public:
/// Start an asynchronous receive.
/**
* This function is used to asynchronously receive data from the sequenced
- * packet socket. The function call always returns immediately.
+ * packet socket. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param out_flags Once the asynchronous operation completes, contains flags
* associated with the received data. For example, if the
* socket_base::message_end_of_record bit is set then the received data marks
* the end of a record. The caller must guarantee that the referenced
- * variable remains valid until the handler is called.
+ * variable remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To receive into a single data buffer use the @ref buffer function as
* follows:
@@ -630,30 +647,32 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
socket_base::message_flags& out_flags,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_with_flags>(), token,
+ buffers, socket_base::message_flags(0), &out_flags))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive_with_flags(this), handler,
+ initiate_async_receive_with_flags(this), token,
buffers, socket_base::message_flags(0), &out_flags);
}
/// Start an asynchronous receive.
/**
* This function is used to asynchronously receive data from the sequenced
- * data socket. The function call always returns immediately.
+ * data socket. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param in_flags Flags specifying how the receive call is to be made.
*
@@ -661,20 +680,25 @@ public:
* associated with the received data. For example, if the
* socket_base::message_end_of_record bit is set then the received data marks
* the end of a record. The caller must guarantee that the referenced
- * variable remains valid until the handler is called.
+ * variable remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To receive into a single data buffer use the @ref buffer function as
* follows:
@@ -699,27 +723,28 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
socket_base::message_flags in_flags,
socket_base::message_flags& out_flags,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive_with_flags>(),
+ token, buffers, in_flags, &out_flags))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
initiate_async_receive_with_flags(this),
- handler, buffers, in_flags, &out_flags);
+ token, buffers, in_flags, &out_flags);
}
private:
// Disallow copying and assignment.
- basic_seq_packet_socket(const basic_seq_packet_socket&) ASIO_DELETED;
+ basic_seq_packet_socket(const basic_seq_packet_socket&) = delete;
basic_seq_packet_socket& operator=(
- const basic_seq_packet_socket&) ASIO_DELETED;
+ const basic_seq_packet_socket&) = delete;
class initiate_async_send
{
@@ -731,13 +756,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
const ConstBufferSequence& buffers,
socket_base::message_flags flags) const
{
@@ -765,13 +790,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
const MutableBufferSequence& buffers,
socket_base::message_flags in_flags,
socket_base::message_flags* out_flags) const
diff --git a/3rdparty/asio/include/asio/basic_serial_port.hpp b/3rdparty/asio/include/asio/basic_serial_port.hpp
index 1c0c636976c..8fa66c0b0d7 100644
--- a/3rdparty/asio/include/asio/basic_serial_port.hpp
+++ b/3rdparty/asio/include/asio/basic_serial_port.hpp
@@ -2,7 +2,7 @@
// basic_serial_port.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -22,6 +22,7 @@
|| defined(GENERATING_DOCUMENTATION)
#include <string>
+#include <utility>
#include "asio/any_io_executor.hpp"
#include "asio/async_result.hpp"
#include "asio/detail/handler_type_requirements.hpp"
@@ -35,13 +36,9 @@
#if defined(ASIO_HAS_IOCP)
# include "asio/detail/win_iocp_serial_port_service.hpp"
#else
-# include "asio/detail/reactive_serial_port_service.hpp"
+# include "asio/detail/posix_serial_port_service.hpp"
#endif
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -59,6 +56,10 @@ template <typename Executor = any_io_executor>
class basic_serial_port
: public serial_port_base
{
+private:
+ class initiate_async_write_some;
+ class initiate_async_read_some;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -78,7 +79,7 @@ public:
typedef detail::win_iocp_serial_port_service::native_handle_type
native_handle_type;
#else
- typedef detail::reactive_serial_port_service::native_handle_type
+ typedef detail::posix_serial_port_service::native_handle_type
native_handle_type;
#endif
@@ -108,10 +109,10 @@ public:
*/
template <typename ExecutionContext>
explicit basic_serial_port(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: impl_(0, 0, context)
{
}
@@ -150,9 +151,9 @@ public:
*/
template <typename ExecutionContext>
basic_serial_port(ExecutionContext& context, const char* device,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -194,9 +195,9 @@ public:
*/
template <typename ExecutionContext>
basic_serial_port(ExecutionContext& context, const std::string& device,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -243,9 +244,9 @@ public:
template <typename ExecutionContext>
basic_serial_port(ExecutionContext& context,
const native_handle_type& native_serial_port,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -254,7 +255,6 @@ public:
asio::detail::throw_error(ec, "assign");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_serial_port from another.
/**
* This constructor moves a serial port from one object to another.
@@ -287,7 +287,55 @@ public:
impl_ = std::move(other.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ // All serial ports have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_serial_port;
+
+ /// Move-construct a basic_serial_port from a serial port of another executor
+ /// type.
+ /**
+ * This constructor moves a serial port from one object to another.
+ *
+ * @param other The other basic_serial_port object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_serial_port(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_serial_port(basic_serial_port<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_serial_port from a serial port of another executor
+ /// type.
+ /**
+ * This assignment operator moves a serial port from one object to another.
+ *
+ * @param other The other basic_serial_port object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_serial_port(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_serial_port&
+ > operator=(basic_serial_port<Executor1>&& other)
+ {
+ basic_serial_port tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
+ }
/// Destroys the serial port.
/**
@@ -300,7 +348,7 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
return impl_.get_executor();
}
@@ -656,25 +704,31 @@ public:
/// Start an asynchronous write.
/**
* This function is used to asynchronously write data to the serial port.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be written to the serial port.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The write operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
* data is written before the asynchronous operation completes.
@@ -688,20 +742,30 @@ public:
* See the @ref buffer documentation for information on writing multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
- {
- return async_initiate<WriteHandler,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some>(), token, buffers))
+ {
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_write_some(this), handler, buffers);
+ initiate_async_write_some(this), token, buffers);
}
/// Read some data from the serial port.
@@ -770,25 +834,31 @@ public:
/// Start an asynchronous read.
/**
* This function is used to asynchronously read data from the serial port.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more buffers into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The read operation may not read all of the requested number of bytes.
* Consider using the @ref async_read function if you need to ensure that the
* requested amount of data is read before the asynchronous operation
@@ -803,26 +873,36 @@ public:
* See the @ref buffer documentation for information on reading into multiple
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
- {
- return async_initiate<ReadHandler,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
+ {
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_read_some(this), handler, buffers);
+ initiate_async_read_some(this), token, buffers);
}
private:
// Disallow copying and assignment.
- basic_serial_port(const basic_serial_port&) ASIO_DELETED;
- basic_serial_port& operator=(const basic_serial_port&) ASIO_DELETED;
+ basic_serial_port(const basic_serial_port&) = delete;
+ basic_serial_port& operator=(const basic_serial_port&) = delete;
class initiate_async_write_some
{
@@ -834,13 +914,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
const ConstBufferSequence& buffers) const
{
// If you get an error on the following line it means that your handler
@@ -867,13 +947,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
const MutableBufferSequence& buffers) const
{
// If you get an error on the following line it means that your handler
@@ -893,7 +973,7 @@ private:
#if defined(ASIO_HAS_IOCP)
detail::io_object_impl<detail::win_iocp_serial_port_service, Executor> impl_;
#else
- detail::io_object_impl<detail::reactive_serial_port_service, Executor> impl_;
+ detail::io_object_impl<detail::posix_serial_port_service, Executor> impl_;
#endif
};
diff --git a/3rdparty/asio/include/asio/basic_signal_set.hpp b/3rdparty/asio/include/asio/basic_signal_set.hpp
index 25144346c23..bf74c39b3a8 100644
--- a/3rdparty/asio/include/asio/basic_signal_set.hpp
+++ b/3rdparty/asio/include/asio/basic_signal_set.hpp
@@ -2,7 +2,7 @@
// basic_signal_set.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -27,6 +27,7 @@
#include "asio/detail/type_traits.hpp"
#include "asio/error.hpp"
#include "asio/execution_context.hpp"
+#include "asio/signal_set_base.hpp"
#include "asio/detail/push_options.hpp"
@@ -93,8 +94,11 @@ namespace asio {
* least one thread.
*/
template <typename Executor = any_io_executor>
-class basic_signal_set
+class basic_signal_set : public signal_set_base
{
+private:
+ class initiate_async_wait;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -130,10 +134,10 @@ public:
*/
template <typename ExecutionContext>
explicit basic_signal_set(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: impl_(0, 0, context)
{
}
@@ -176,10 +180,10 @@ public:
*/
template <typename ExecutionContext>
basic_signal_set(ExecutionContext& context, int signal_number_1,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -235,10 +239,10 @@ public:
template <typename ExecutionContext>
basic_signal_set(ExecutionContext& context, int signal_number_1,
int signal_number_2,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -304,10 +308,10 @@ public:
template <typename ExecutionContext>
basic_signal_set(ExecutionContext& context, int signal_number_1,
int signal_number_2, int signal_number_3,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -330,7 +334,7 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
return impl_.get_executor();
}
@@ -367,6 +371,58 @@ public:
ASIO_SYNC_OP_VOID_RETURN(ec);
}
+ /// Add a signal to a signal_set with the specified flags.
+ /**
+ * This function adds the specified signal to the set. It has no effect if the
+ * signal is already in the set.
+ *
+ * Flags other than flags::dont_care require OS support for the @c sigaction
+ * call, and this function will fail with @c error::operation_not_supported if
+ * this is unavailable.
+ *
+ * The specified flags will conflict with a prior, active registration of the
+ * same signal, if either specified a flags value other than flags::dont_care.
+ * In this case, the @c add will fail with @c error::invalid_argument.
+ *
+ * @param signal_number The signal to be added to the set.
+ *
+ * @param f Flags to modify the behaviour of the specified signal.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void add(int signal_number, flags_t f)
+ {
+ asio::error_code ec;
+ impl_.get_service().add(impl_.get_implementation(), signal_number, f, ec);
+ asio::detail::throw_error(ec, "add");
+ }
+
+ /// Add a signal to a signal_set with the specified flags.
+ /**
+ * This function adds the specified signal to the set. It has no effect if the
+ * signal is already in the set.
+ *
+ * Flags other than flags::dont_care require OS support for the @c sigaction
+ * call, and this function will fail with @c error::operation_not_supported if
+ * this is unavailable.
+ *
+ * The specified flags will conflict with a prior, active registration of the
+ * same signal, if either specified a flags value other than flags::dont_care.
+ * In this case, the @c add will fail with @c error::invalid_argument.
+ *
+ * @param signal_number The signal to be added to the set.
+ *
+ * @param f Flags to modify the behaviour of the specified signal.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID add(int signal_number, flags_t f,
+ asio::error_code& ec)
+ {
+ impl_.get_service().add(impl_.get_implementation(), signal_number, f, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
/// Remove a signal from a signal_set.
/**
* This function removes the specified signal from the set. It has no effect
@@ -494,45 +550,61 @@ public:
/// Start an asynchronous operation to wait for a signal to be delivered.
/**
* This function may be used to initiate an asynchronous wait against the
- * signal set. It always returns immediately.
+ * signal set. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
- * For each call to async_wait(), the supplied handler will be called exactly
- * once. The handler will be called when:
+ * For each call to async_wait(), the completion handler will be called
+ * exactly once. The completion handler will be called when:
*
* @li One of the registered signals in the signal set occurs; or
*
* @li The signal set was cancelled, in which case the handler is passed the
* error code asio::error::operation_aborted.
*
- * @param handler The handler to be called when the signal occurs. Copies
- * will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the wait completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* int signal_number // Indicates which signal occurred.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, int) @endcode
+ *
+ * @par Per-Operation Cancellation
+ * This asynchronous operation supports cancellation for the following
+ * asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code, int))
- SignalHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(SignalHandler,
- void (asio::error_code, int))
- async_wait(
- ASIO_MOVE_ARG(SignalHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ SignalToken = default_completion_token_t<executor_type>>
+ auto async_wait(
+ SignalToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<SignalToken, void (asio::error_code, int)>(
+ declval<initiate_async_wait>(), token))
{
- return async_initiate<SignalHandler, void (asio::error_code, int)>(
- initiate_async_wait(this), handler);
+ return async_initiate<SignalToken, void (asio::error_code, int)>(
+ initiate_async_wait(this), token);
}
private:
// Disallow copying and assignment.
- basic_signal_set(const basic_signal_set&) ASIO_DELETED;
- basic_signal_set& operator=(const basic_signal_set&) ASIO_DELETED;
+ basic_signal_set(const basic_signal_set&) = delete;
+ basic_signal_set& operator=(const basic_signal_set&) = delete;
class initiate_async_wait
{
@@ -544,13 +616,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename SignalHandler>
- void operator()(ASIO_MOVE_ARG(SignalHandler) handler) const
+ void operator()(SignalHandler&& handler) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a SignalHandler.
diff --git a/3rdparty/asio/include/asio/basic_socket.hpp b/3rdparty/asio/include/asio/basic_socket.hpp
index ba63cbbdeaf..88c4b03fe18 100644
--- a/3rdparty/asio/include/asio/basic_socket.hpp
+++ b/3rdparty/asio/include/asio/basic_socket.hpp
@@ -2,7 +2,7 @@
// basic_socket.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -15,6 +15,7 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+#include <utility>
#include "asio/any_io_executor.hpp"
#include "asio/detail/config.hpp"
#include "asio/async_result.hpp"
@@ -32,14 +33,12 @@
# include "asio/detail/null_socket_service.hpp"
#elif defined(ASIO_HAS_IOCP)
# include "asio/detail/win_iocp_socket_service.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_socket_service.hpp"
#else
# include "asio/detail/reactive_socket_service.hpp"
#endif
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -66,6 +65,10 @@ template <typename Protocol, typename Executor>
class basic_socket
: public socket_base
{
+private:
+ class initiate_async_connect;
+ class initiate_async_wait;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -87,6 +90,9 @@ public:
#elif defined(ASIO_HAS_IOCP)
typedef typename detail::win_iocp_socket_service<
Protocol>::native_handle_type native_handle_type;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef typename detail::io_uring_socket_service<
+ Protocol>::native_handle_type native_handle_type;
#else
typedef typename detail::reactive_socket_service<
Protocol>::native_handle_type native_handle_type;
@@ -125,9 +131,9 @@ public:
*/
template <typename ExecutionContext>
explicit basic_socket(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
}
@@ -165,10 +171,10 @@ public:
*/
template <typename ExecutionContext>
basic_socket(ExecutionContext& context, const protocol_type& protocol,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -220,9 +226,9 @@ public:
*/
template <typename ExecutionContext>
basic_socket(ExecutionContext& context, const endpoint_type& endpoint,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -273,9 +279,9 @@ public:
template <typename ExecutionContext>
basic_socket(ExecutionContext& context, const protocol_type& protocol,
const native_handle_type& native_socket,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -284,7 +290,6 @@ public:
asio::detail::throw_error(ec, "assign");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_socket from another.
/**
* This constructor moves a socket from one object to another.
@@ -295,7 +300,7 @@ public:
* @note Following the move, the moved-from object is in the same state as if
* constructed using the @c basic_socket(const executor_type&) constructor.
*/
- basic_socket(basic_socket&& other) ASIO_NOEXCEPT
+ basic_socket(basic_socket&& other) noexcept
: impl_(std::move(other.impl_))
{
}
@@ -332,10 +337,10 @@ public:
*/
template <typename Protocol1, typename Executor1>
basic_socket(basic_socket<Protocol1, Executor1>&& other,
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value
- >::type = 0)
+ > = 0)
: impl_(std::move(other.impl_))
{
}
@@ -351,20 +356,19 @@ public:
* constructed using the @c basic_socket(const executor_type&) constructor.
*/
template <typename Protocol1, typename Executor1>
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value,
basic_socket&
- >::type operator=(basic_socket<Protocol1, Executor1> && other)
+ > operator=(basic_socket<Protocol1, Executor1>&& other)
{
basic_socket tmp(std::move(other));
impl_ = std::move(tmp.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
return impl_.get_executor();
}
@@ -902,7 +906,8 @@ public:
/// Start an asynchronous connect.
/**
* This function is used to asynchronously connect a socket to the specified
- * remote endpoint. The function call always returns immediately.
+ * remote endpoint. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* The socket is automatically opened if it is not already open. If the
* connect fails, and the socket was automatically opened, the socket is
@@ -911,17 +916,22 @@ public:
* @param peer_endpoint The remote endpoint to which the socket will be
* connected. Copies will be made of the endpoint object as required.
*
- * @param handler The handler to be called when the connection operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error // Result of operation
+ * const asio::error_code& error // Result of operation.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
* @par Example
* @code
* void connect_handler(const asio::error_code& error)
@@ -952,12 +962,13 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
- ConnectHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ConnectHandler,
- void (asio::error_code))
- async_connect(const endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(ConnectHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ConnectToken = default_completion_token_t<executor_type>>
+ auto async_connect(const endpoint_type& peer_endpoint,
+ ConnectToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ConnectToken, void (asio::error_code)>(
+ declval<initiate_async_connect>(), token,
+ peer_endpoint, declval<asio::error_code&>()))
{
asio::error_code open_ec;
if (!is_open())
@@ -966,8 +977,8 @@ public:
impl_.get_service().open(impl_.get_implementation(), protocol, open_ec);
}
- return async_initiate<ConnectHandler, void (asio::error_code)>(
- initiate_async_connect(this), handler, peer_endpoint, open_ec);
+ return async_initiate<ConnectToken, void (asio::error_code)>(
+ initiate_async_connect(this), token, peer_endpoint, open_ec);
}
/// Set an option on the socket.
@@ -1751,21 +1762,28 @@ public:
/// write, or to have pending error conditions.
/**
* This function is used to perform an asynchronous wait for a socket to enter
- * a ready to read, write or error condition state.
+ * a ready to read, write or error condition state. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param w Specifies the desired socket state.
*
- * @param handler The handler to be called when the wait operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the wait completes. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error // Result of operation
+ * const asio::error_code& error // Result of operation.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
* @par Example
* @code
* void wait_handler(const asio::error_code& error)
@@ -1795,15 +1813,15 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
- WaitHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(wait_type w,
- ASIO_MOVE_ARG(WaitHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(wait_type w,
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token, w))
{
- return async_initiate<WaitHandler, void (asio::error_code)>(
- initiate_async_wait(this), handler, w);
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token, w);
}
protected:
@@ -1822,6 +1840,9 @@ protected:
#elif defined(ASIO_HAS_IOCP)
detail::io_object_impl<
detail::win_iocp_socket_service<Protocol>, Executor> impl_;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ detail::io_object_impl<
+ detail::io_uring_socket_service<Protocol>, Executor> impl_;
#else
detail::io_object_impl<
detail::reactive_socket_service<Protocol>, Executor> impl_;
@@ -1829,8 +1850,8 @@ protected:
private:
// Disallow copying and assignment.
- basic_socket(const basic_socket&) ASIO_DELETED;
- basic_socket& operator=(const basic_socket&) ASIO_DELETED;
+ basic_socket(const basic_socket&) = delete;
+ basic_socket& operator=(const basic_socket&) = delete;
class initiate_async_connect
{
@@ -1842,13 +1863,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ConnectHandler>
- void operator()(ASIO_MOVE_ARG(ConnectHandler) handler,
+ void operator()(ConnectHandler&& handler,
const endpoint_type& peer_endpoint,
const asio::error_code& open_ec) const
{
@@ -1860,7 +1881,7 @@ private:
{
asio::post(self_->impl_.get_executor(),
asio::detail::bind_handler(
- ASIO_MOVE_CAST(ConnectHandler)(handler), open_ec));
+ static_cast<ConnectHandler&&>(handler), open_ec));
}
else
{
@@ -1885,13 +1906,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WaitHandler>
- void operator()(ASIO_MOVE_ARG(WaitHandler) handler, wait_type w) const
+ void operator()(WaitHandler&& handler, wait_type w) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a WaitHandler.
diff --git a/3rdparty/asio/include/asio/basic_socket_acceptor.hpp b/3rdparty/asio/include/asio/basic_socket_acceptor.hpp
index baa0c53ae6c..059d33ead53 100644
--- a/3rdparty/asio/include/asio/basic_socket_acceptor.hpp
+++ b/3rdparty/asio/include/asio/basic_socket_acceptor.hpp
@@ -2,7 +2,7 @@
// basic_socket_acceptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -15,6 +15,7 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+#include <utility>
#include "asio/detail/config.hpp"
#include "asio/any_io_executor.hpp"
#include "asio/basic_socket.hpp"
@@ -31,14 +32,12 @@
# include "asio/detail/null_socket_service.hpp"
#elif defined(ASIO_HAS_IOCP)
# include "asio/detail/win_iocp_socket_service.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_socket_service.hpp"
#else
# include "asio/detail/reactive_socket_service.hpp"
#endif
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -82,6 +81,11 @@ template <typename Protocol, typename Executor>
class basic_socket_acceptor
: public socket_base
{
+private:
+ class initiate_async_wait;
+ class initiate_async_accept;
+ class initiate_async_move_accept;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -103,6 +107,9 @@ public:
#elif defined(ASIO_HAS_IOCP)
typedef typename detail::win_iocp_socket_service<
Protocol>::native_handle_type native_handle_type;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef typename detail::io_uring_socket_service<
+ Protocol>::native_handle_type native_handle_type;
#else
typedef typename detail::reactive_socket_service<
Protocol>::native_handle_type native_handle_type;
@@ -141,9 +148,9 @@ public:
*/
template <typename ExecutionContext>
explicit basic_socket_acceptor(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
}
@@ -183,10 +190,10 @@ public:
template <typename ExecutionContext>
basic_socket_acceptor(ExecutionContext& context,
const protocol_type& protocol,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -272,9 +279,9 @@ public:
template <typename ExecutionContext>
basic_socket_acceptor(ExecutionContext& context,
const endpoint_type& endpoint, bool reuse_addr = true,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -337,9 +344,9 @@ public:
template <typename ExecutionContext>
basic_socket_acceptor(ExecutionContext& context,
const protocol_type& protocol, const native_handle_type& native_acceptor,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -348,7 +355,6 @@ public:
asio::detail::throw_error(ec, "assign");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_socket_acceptor from another.
/**
* This constructor moves an acceptor from one object to another.
@@ -360,7 +366,7 @@ public:
* constructed using the @c basic_socket_acceptor(const executor_type&)
* constructor.
*/
- basic_socket_acceptor(basic_socket_acceptor&& other) ASIO_NOEXCEPT
+ basic_socket_acceptor(basic_socket_acceptor&& other) noexcept
: impl_(std::move(other.impl_))
{
}
@@ -400,10 +406,10 @@ public:
*/
template <typename Protocol1, typename Executor1>
basic_socket_acceptor(basic_socket_acceptor<Protocol1, Executor1>&& other,
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value
- >::type = 0)
+ > = 0)
: impl_(std::move(other.impl_))
{
}
@@ -421,17 +427,16 @@ public:
* constructor.
*/
template <typename Protocol1, typename Executor1>
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value,
basic_socket_acceptor&
- >::type operator=(basic_socket_acceptor<Protocol1, Executor1>&& other)
+ > operator=(basic_socket_acceptor<Protocol1, Executor1>&& other)
{
basic_socket_acceptor tmp(std::move(other));
impl_ = std::move(tmp.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the acceptor.
/**
@@ -444,7 +449,7 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
return impl_.get_executor();
}
@@ -1191,21 +1196,28 @@ public:
/// write, or to have pending error conditions.
/**
* This function is used to perform an asynchronous wait for an acceptor to
- * enter a ready to read, write or error condition state.
+ * enter a ready to read, write or error condition state. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param w Specifies the desired acceptor state.
*
- * @param handler The handler to be called when the wait operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the wait completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error // Result of operation
+ * const asio::error_code& error // Result of operation.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
* @par Example
* @code
* void wait_handler(const asio::error_code& error)
@@ -1237,15 +1249,15 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
- WaitHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(wait_type w,
- ASIO_MOVE_ARG(WaitHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(wait_type w,
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token, w))
{
- return async_initiate<WaitHandler, void (asio::error_code)>(
- initiate_async_wait(this), handler, w);
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token, w);
}
#if !defined(ASIO_NO_EXTENSIONS)
@@ -1269,9 +1281,9 @@ public:
*/
template <typename Protocol1, typename Executor1>
void accept(basic_socket<Protocol1, Executor1>& peer,
- typename constraint<
+ constraint_t<
is_convertible<Protocol, Protocol1>::value
- >::type = 0)
+ > = 0)
{
asio::error_code ec;
impl_.get_service().accept(impl_.get_implementation(),
@@ -1305,9 +1317,9 @@ public:
template <typename Protocol1, typename Executor1>
ASIO_SYNC_OP_VOID accept(
basic_socket<Protocol1, Executor1>& peer, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_convertible<Protocol, Protocol1>::value
- >::type = 0)
+ > = 0)
{
impl_.get_service().accept(impl_.get_implementation(),
peer, static_cast<endpoint_type*>(0), ec);
@@ -1317,23 +1329,30 @@ public:
/// Start an asynchronous accept.
/**
* This function is used to asynchronously accept a new connection into a
- * socket. The function call always returns immediately.
+ * socket, and additionally obtain the endpoint of the remote peer. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param peer The socket into which the new connection will be accepted.
* Ownership of the peer object is retained by the caller, which must
- * guarantee that it is valid until the handler is called.
+ * guarantee that it is valid until the completion handler is called.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error // Result of operation.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
* @par Example
* @code
* void accept_handler(const asio::error_code& error)
@@ -1364,18 +1383,19 @@ public:
*/
template <typename Protocol1, typename Executor1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
- AcceptHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(AcceptHandler,
- void (asio::error_code))
- async_accept(basic_socket<Protocol1, Executor1>& peer,
- ASIO_MOVE_ARG(AcceptHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type),
- typename constraint<
+ AcceptToken = default_completion_token_t<executor_type>>
+ auto async_accept(basic_socket<Protocol1, Executor1>& peer,
+ AcceptToken&& token = default_completion_token_t<executor_type>(),
+ constraint_t<
is_convertible<Protocol, Protocol1>::value
- >::type = 0)
- {
- return async_initiate<AcceptHandler, void (asio::error_code)>(
- initiate_async_accept(this), handler,
+ > = 0)
+ -> decltype(
+ async_initiate<AcceptToken, void (asio::error_code)>(
+ declval<initiate_async_accept>(), token,
+ &peer, static_cast<endpoint_type*>(0)))
+ {
+ return async_initiate<AcceptToken, void (asio::error_code)>(
+ initiate_async_accept(this), token,
&peer, static_cast<endpoint_type*>(0));
}
@@ -1452,29 +1472,35 @@ public:
/// Start an asynchronous accept.
/**
* This function is used to asynchronously accept a new connection into a
- * socket, and additionally obtain the endpoint of the remote peer. The
- * function call always returns immediately.
+ * socket, and additionally obtain the endpoint of the remote peer. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param peer The socket into which the new connection will be accepted.
* Ownership of the peer object is retained by the caller, which must
- * guarantee that it is valid until the handler is called.
+ * guarantee that it is valid until the completion handler is called.
*
* @param peer_endpoint An endpoint object into which the endpoint of the
* remote peer will be written. Ownership of the peer_endpoint object is
* retained by the caller, which must guarantee that it is valid until the
* handler is called.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error // Result of operation.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
* @par Per-Operation Cancellation
* On POSIX or Windows operating systems, this asynchronous operation supports
* cancellation for the following asio::cancellation_type values:
@@ -1487,20 +1513,19 @@ public:
*/
template <typename Executor1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
- AcceptHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(AcceptHandler,
- void (asio::error_code))
- async_accept(basic_socket<protocol_type, Executor1>& peer,
+ AcceptToken = default_completion_token_t<executor_type>>
+ auto async_accept(basic_socket<protocol_type, Executor1>& peer,
endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(AcceptHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ AcceptToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<AcceptToken, void (asio::error_code)>(
+ declval<initiate_async_accept>(), token, &peer, &peer_endpoint))
{
- return async_initiate<AcceptHandler, void (asio::error_code)>(
- initiate_async_accept(this), handler, &peer, &peer_endpoint);
+ return async_initiate<AcceptToken, void (asio::error_code)>(
+ initiate_async_accept(this), token, &peer, &peer_endpoint);
}
#endif // !defined(ASIO_NO_EXTENSIONS)
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Accept a new connection.
/**
* This function is used to accept a new connection from a peer. The function
@@ -1568,27 +1593,36 @@ public:
/// Start an asynchronous accept.
/**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
+ *
* // On success, the newly accepted socket.
* typename Protocol::socket::template
* rebind_executor<executor_type>::other peer
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template
+ * rebind_executor<executor_type>::other)) @endcode
+ *
* @par Example
* @code
* void accept_handler(const asio::error_code& error,
@@ -1620,20 +1654,23 @@ public:
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
typename Protocol::socket::template rebind_executor<
- executor_type>::other)) MoveAcceptHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(MoveAcceptHandler,
- void (asio::error_code,
- typename Protocol::socket::template
- rebind_executor<executor_type>::other))
- async_accept(
- ASIO_MOVE_ARG(MoveAcceptHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
- {
- return async_initiate<MoveAcceptHandler,
+ executor_type>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code, typename Protocol::socket::template
+ rebind_executor<executor_type>::other)>(
+ declval<initiate_async_move_accept>(), token,
+ declval<const executor_type&>(), static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket::template
+ rebind_executor<executor_type>::other*>(0)))
+ {
+ return async_initiate<MoveAcceptToken,
void (asio::error_code, typename Protocol::socket::template
rebind_executor<executor_type>::other)>(
- initiate_async_move_accept(this), handler,
+ initiate_async_move_accept(this), token,
impl_.get_executor(), static_cast<endpoint_type*>(0),
static_cast<typename Protocol::socket::template
rebind_executor<executor_type>::other*>(0));
@@ -1665,10 +1702,10 @@ public:
template <typename Executor1>
typename Protocol::socket::template rebind_executor<Executor1>::other
accept(const Executor1& ex,
- typename constraint<
+ constraint_t<
is_executor<Executor1>::value
|| execution::is_executor<Executor1>::value
- >::type = 0)
+ > = 0)
{
asio::error_code ec;
typename Protocol::socket::template
@@ -1705,9 +1742,9 @@ public:
typename Protocol::socket::template rebind_executor<
typename ExecutionContext::executor_type>::other
accept(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
{
asio::error_code ec;
typename Protocol::socket::template rebind_executor<
@@ -1748,10 +1785,10 @@ public:
template <typename Executor1>
typename Protocol::socket::template rebind_executor<Executor1>::other
accept(const Executor1& ex, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_executor<Executor1>::value
|| execution::is_executor<Executor1>::value
- >::type = 0)
+ > = 0)
{
typename Protocol::socket::template
rebind_executor<Executor1>::other peer(ex);
@@ -1791,9 +1828,9 @@ public:
typename Protocol::socket::template rebind_executor<
typename ExecutionContext::executor_type>::other
accept(ExecutionContext& context, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
{
typename Protocol::socket::template rebind_executor<
typename ExecutionContext::executor_type>::other peer(context);
@@ -1803,8 +1840,9 @@ public:
/// Start an asynchronous accept.
/**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
@@ -1812,19 +1850,29 @@ public:
* @param ex The I/O executor object to be used for the newly accepted
* socket.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // On success, the newly accepted socket.
* typename Protocol::socket::template rebind_executor<
- * Executor1>::other peer // On success, the newly accepted socket.
+ * Executor1>::other peer
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template rebind_executor<
+ * Executor1>::other)) @endcode
+ *
* @par Example
* @code
* void accept_handler(const asio::error_code& error,
@@ -1856,34 +1904,41 @@ public:
template <typename Executor1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
typename Protocol::socket::template rebind_executor<
- Executor1>::other)) MoveAcceptHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(MoveAcceptHandler,
- void (asio::error_code,
- typename Protocol::socket::template rebind_executor<
- Executor1>::other))
- async_accept(const Executor1& ex,
- ASIO_MOVE_ARG(MoveAcceptHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type),
- typename constraint<
+ constraint_t<is_executor<Executor1>::value
+ || execution::is_executor<Executor1>::value,
+ Executor1>>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(const Executor1& ex,
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>(),
+ constraint_t<
is_executor<Executor1>::value
|| execution::is_executor<Executor1>::value
- >::type = 0)
- {
- typedef typename Protocol::socket::template rebind_executor<
- Executor1>::other other_socket_type;
-
- return async_initiate<MoveAcceptHandler,
- void (asio::error_code, other_socket_type)>(
- initiate_async_move_accept(this), handler,
- ex, static_cast<endpoint_type*>(0),
- static_cast<other_socket_type*>(0));
+ > = 0)
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ Executor1>::other)>(
+ declval<initiate_async_move_accept>(), token,
+ ex, static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket::template
+ rebind_executor<Executor1>::other*>(0)))
+ {
+ return async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ Executor1>::other)>(
+ initiate_async_move_accept(this), token,
+ ex, static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket::template
+ rebind_executor<Executor1>::other*>(0));
}
/// Start an asynchronous accept.
/**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
@@ -1891,20 +1946,29 @@ public:
* @param context The I/O execution context object to be used for the newly
* accepted socket.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // On success, the newly accepted socket.
* typename Protocol::socket::template rebind_executor<
* typename ExecutionContext::executor_type>::other peer
- * // On success, the newly accepted socket.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template rebind_executor<
+ * typename ExecutionContext::executor_type>::other)) @endcode
+ *
* @par Example
* @code
* void accept_handler(const asio::error_code& error,
@@ -1936,27 +2000,31 @@ public:
template <typename ExecutionContext,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
typename Protocol::socket::template rebind_executor<
- typename ExecutionContext::executor_type>::other)) MoveAcceptHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(MoveAcceptHandler,
+ typename ExecutionContext::executor_type>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(ExecutionContext& context,
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other)>(
+ declval<initiate_async_move_accept>(), token,
+ context.get_executor(), static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other*>(0)))
+ {
+ return async_initiate<MoveAcceptToken,
void (asio::error_code,
typename Protocol::socket::template rebind_executor<
- typename ExecutionContext::executor_type>::other))
- async_accept(ExecutionContext& context,
- ASIO_MOVE_ARG(MoveAcceptHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type),
- typename constraint<
- is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
- {
- typedef typename Protocol::socket::template rebind_executor<
- typename ExecutionContext::executor_type>::other other_socket_type;
-
- return async_initiate<MoveAcceptHandler,
- void (asio::error_code, other_socket_type)>(
- initiate_async_move_accept(this), handler,
- context.get_executor(), static_cast<endpoint_type*>(0),
- static_cast<other_socket_type*>(0));
+ typename ExecutionContext::executor_type>::other)>(
+ initiate_async_move_accept(this), token,
+ context.get_executor(), static_cast<endpoint_type*>(0),
+ static_cast<typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other*>(0));
}
/// Accept a new connection.
@@ -2036,8 +2104,9 @@ public:
/// Start an asynchronous accept.
/**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
@@ -2045,23 +2114,31 @@ public:
* @param peer_endpoint An endpoint object into which the endpoint of the
* remote peer will be written. Ownership of the peer_endpoint object is
* retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
+ *
* // On success, the newly accepted socket.
* typename Protocol::socket::template
* rebind_executor<executor_type>::other peer
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template
+ * rebind_executor<executor_type>::other)) @endcode
+ *
* @par Example
* @code
* void accept_handler(const asio::error_code& error,
@@ -2094,20 +2171,23 @@ public:
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
typename Protocol::socket::template rebind_executor<
- executor_type>::other)) MoveAcceptHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(MoveAcceptHandler,
- void (asio::error_code,
- typename Protocol::socket::template
- rebind_executor<executor_type>::other))
- async_accept(endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(MoveAcceptHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
- {
- return async_initiate<MoveAcceptHandler,
+ executor_type>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(endpoint_type& peer_endpoint,
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code, typename Protocol::socket::template
+ rebind_executor<executor_type>::other)>(
+ declval<initiate_async_move_accept>(), token,
+ declval<const executor_type&>(), &peer_endpoint,
+ static_cast<typename Protocol::socket::template
+ rebind_executor<executor_type>::other*>(0)))
+ {
+ return async_initiate<MoveAcceptToken,
void (asio::error_code, typename Protocol::socket::template
rebind_executor<executor_type>::other)>(
- initiate_async_move_accept(this), handler,
+ initiate_async_move_accept(this), token,
impl_.get_executor(), &peer_endpoint,
static_cast<typename Protocol::socket::template
rebind_executor<executor_type>::other*>(0));
@@ -2144,10 +2224,10 @@ public:
template <typename Executor1>
typename Protocol::socket::template rebind_executor<Executor1>::other
accept(const Executor1& ex, endpoint_type& peer_endpoint,
- typename constraint<
+ constraint_t<
is_executor<Executor1>::value
|| execution::is_executor<Executor1>::value
- >::type = 0)
+ > = 0)
{
asio::error_code ec;
typename Protocol::socket::template
@@ -2190,9 +2270,9 @@ public:
typename Protocol::socket::template rebind_executor<
typename ExecutionContext::executor_type>::other
accept(ExecutionContext& context, endpoint_type& peer_endpoint,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
{
asio::error_code ec;
typename Protocol::socket::template rebind_executor<
@@ -2240,10 +2320,10 @@ public:
typename Protocol::socket::template rebind_executor<Executor1>::other
accept(const executor_type& ex,
endpoint_type& peer_endpoint, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_executor<Executor1>::value
|| execution::is_executor<Executor1>::value
- >::type = 0)
+ > = 0)
{
typename Protocol::socket::template
rebind_executor<Executor1>::other peer(ex);
@@ -2290,9 +2370,9 @@ public:
typename ExecutionContext::executor_type>::other
accept(ExecutionContext& context,
endpoint_type& peer_endpoint, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
{
typename Protocol::socket::template rebind_executor<
typename ExecutionContext::executor_type>::other peer(context);
@@ -2303,8 +2383,9 @@ public:
/// Start an asynchronous accept.
/**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
@@ -2315,21 +2396,31 @@ public:
* @param peer_endpoint An endpoint object into which the endpoint of the
* remote peer will be written. Ownership of the peer_endpoint object is
* retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // On success, the newly accepted socket.
* typename Protocol::socket::template rebind_executor<
- * Executor1>::other peer // On success, the newly accepted socket.
+ * Executor1>::other peer
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template rebind_executor<
+ * Executor1>::other)) @endcode
+ *
* @par Example
* @code
* void accept_handler(const asio::error_code& error,
@@ -2362,34 +2453,39 @@ public:
template <typename Executor1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
typename Protocol::socket::template rebind_executor<
- Executor1>::other)) MoveAcceptHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(MoveAcceptHandler,
- void (asio::error_code,
- typename Protocol::socket::template rebind_executor<
- Executor1>::other))
- async_accept(const Executor1& ex, endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(MoveAcceptHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type),
- typename constraint<
+ constraint_t<is_executor<Executor1>::value
+ || execution::is_executor<Executor1>::value,
+ Executor1>>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(const Executor1& ex, endpoint_type& peer_endpoint,
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>(),
+ constraint_t<
is_executor<Executor1>::value
|| execution::is_executor<Executor1>::value
- >::type = 0)
+ > = 0)
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ Executor1>::other)>(
+ declval<initiate_async_move_accept>(), token, ex, &peer_endpoint,
+ static_cast<typename Protocol::socket::template
+ rebind_executor<Executor1>::other*>(0)))
{
- typedef typename Protocol::socket::template rebind_executor<
- Executor1>::other other_socket_type;
-
- return async_initiate<MoveAcceptHandler,
- void (asio::error_code, other_socket_type)>(
- initiate_async_move_accept(this), handler,
- ex, &peer_endpoint,
- static_cast<other_socket_type*>(0));
+ return async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ Executor1>::other)>(
+ initiate_async_move_accept(this), token, ex, &peer_endpoint,
+ static_cast<typename Protocol::socket::template
+ rebind_executor<Executor1>::other*>(0));
}
/// Start an asynchronous accept.
/**
- * This function is used to asynchronously accept a new connection. The
- * function call always returns immediately.
+ * This function is used to asynchronously accept a new connection. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* This overload requires that the Protocol template parameter satisfy the
* AcceptableProtocol type requirements.
@@ -2400,22 +2496,31 @@ public:
* @param peer_endpoint An endpoint object into which the endpoint of the
* remote peer will be written. Ownership of the peer_endpoint object is
* retained by the caller, which must guarantee that it is valid until the
- * handler is called.
+ * completion handler is called.
*
- * @param handler The handler to be called when the accept operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the accept completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
+ *
+ * // On success, the newly accepted socket.
* typename Protocol::socket::template rebind_executor<
* typename ExecutionContext::executor_type>::other peer
- * // On success, the newly accepted socket.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code,
+ * typename Protocol::socket::template rebind_executor<
+ * typename ExecutionContext::executor_type>::other)) @endcode
+ *
* @par Example
* @code
* void accept_handler(const asio::error_code& error,
@@ -2448,36 +2553,38 @@ public:
template <typename ExecutionContext,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
typename Protocol::socket::template rebind_executor<
- typename ExecutionContext::executor_type>::other)) MoveAcceptHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(MoveAcceptHandler,
+ typename ExecutionContext::executor_type>::other)) MoveAcceptToken
+ = default_completion_token_t<executor_type>>
+ auto async_accept(ExecutionContext& context, endpoint_type& peer_endpoint,
+ MoveAcceptToken&& token = default_completion_token_t<executor_type>(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
+ async_initiate<MoveAcceptToken,
+ void (asio::error_code,
+ typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other)>(
+ declval<initiate_async_move_accept>(), token,
+ context.get_executor(), &peer_endpoint,
+ static_cast<typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other*>(0)))
+ {
+ return async_initiate<MoveAcceptToken,
void (asio::error_code,
typename Protocol::socket::template rebind_executor<
- typename ExecutionContext::executor_type>::other))
- async_accept(ExecutionContext& context,
- endpoint_type& peer_endpoint,
- ASIO_MOVE_ARG(MoveAcceptHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type),
- typename constraint<
- is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
- {
- typedef typename Protocol::socket::template rebind_executor<
- typename ExecutionContext::executor_type>::other other_socket_type;
-
- return async_initiate<MoveAcceptHandler,
- void (asio::error_code, other_socket_type)>(
- initiate_async_move_accept(this), handler,
- context.get_executor(), &peer_endpoint,
- static_cast<other_socket_type*>(0));
+ typename ExecutionContext::executor_type>::other)>(
+ initiate_async_move_accept(this), token,
+ context.get_executor(), &peer_endpoint,
+ static_cast<typename Protocol::socket::template rebind_executor<
+ typename ExecutionContext::executor_type>::other*>(0));
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
private:
// Disallow copying and assignment.
- basic_socket_acceptor(const basic_socket_acceptor&) ASIO_DELETED;
+ basic_socket_acceptor(const basic_socket_acceptor&) = delete;
basic_socket_acceptor& operator=(
- const basic_socket_acceptor&) ASIO_DELETED;
+ const basic_socket_acceptor&) = delete;
class initiate_async_wait
{
@@ -2489,13 +2596,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WaitHandler>
- void operator()(ASIO_MOVE_ARG(WaitHandler) handler, wait_type w) const
+ void operator()(WaitHandler&& handler, wait_type w) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a WaitHandler.
@@ -2521,13 +2628,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename AcceptHandler, typename Protocol1, typename Executor1>
- void operator()(ASIO_MOVE_ARG(AcceptHandler) handler,
+ void operator()(AcceptHandler&& handler,
basic_socket<Protocol1, Executor1>* peer,
endpoint_type* peer_endpoint) const
{
@@ -2555,13 +2662,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename MoveAcceptHandler, typename Executor1, typename Socket>
- void operator()(ASIO_MOVE_ARG(MoveAcceptHandler) handler,
+ void operator()(MoveAcceptHandler&& handler,
const Executor1& peer_ex, endpoint_type* peer_endpoint, Socket*) const
{
// If you get an error on the following line it means that your handler
@@ -2585,6 +2692,9 @@ private:
#elif defined(ASIO_HAS_IOCP)
detail::io_object_impl<
detail::win_iocp_socket_service<Protocol>, Executor> impl_;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ detail::io_object_impl<
+ detail::io_uring_socket_service<Protocol>, Executor> impl_;
#else
detail::io_object_impl<
detail::reactive_socket_service<Protocol>, Executor> impl_;
diff --git a/3rdparty/asio/include/asio/basic_socket_iostream.hpp b/3rdparty/asio/include/asio/basic_socket_iostream.hpp
index b6fd88880de..902898d9502 100644
--- a/3rdparty/asio/include/asio/basic_socket_iostream.hpp
+++ b/3rdparty/asio/include/asio/basic_socket_iostream.hpp
@@ -2,7 +2,7 @@
// basic_socket_iostream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,55 +23,6 @@
#include <ostream>
#include "asio/basic_socket_streambuf.hpp"
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-# include "asio/detail/variadic_templates.hpp"
-
-// A macro that should expand to:
-// template <typename T1, ..., typename Tn>
-// explicit basic_socket_iostream(T1 x1, ..., Tn xn)
-// : std::basic_iostream<char>(
-// &this->detail::socket_iostream_base<
-// Protocol, Clock, WaitTraits>::streambuf_)
-// {
-// if (rdbuf()->connect(x1, ..., xn) == 0)
-// this->setstate(std::ios_base::failbit);
-// }
-// This macro should only persist within this file.
-
-# define ASIO_PRIVATE_CTR_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- explicit basic_socket_iostream(ASIO_VARIADIC_BYVAL_PARAMS(n)) \
- : std::basic_iostream<char>( \
- &this->detail::socket_iostream_base< \
- Protocol, Clock, WaitTraits>::streambuf_) \
- { \
- this->setf(std::ios_base::unitbuf); \
- if (rdbuf()->connect(ASIO_VARIADIC_BYVAL_ARGS(n)) == 0) \
- this->setstate(std::ios_base::failbit); \
- } \
- /**/
-
-// A macro that should expand to:
-// template <typename T1, ..., typename Tn>
-// void connect(T1 x1, ..., Tn xn)
-// {
-// if (rdbuf()->connect(x1, ..., xn) == 0)
-// this->setstate(std::ios_base::failbit);
-// }
-// This macro should only persist within this file.
-
-# define ASIO_PRIVATE_CONNECT_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void connect(ASIO_VARIADIC_BYVAL_PARAMS(n)) \
- { \
- if (rdbuf()->connect(ASIO_VARIADIC_BYVAL_ARGS(n)) == 0) \
- this->setstate(std::ios_base::failbit); \
- } \
- /**/
-
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -87,7 +38,6 @@ protected:
{
}
-#if defined(ASIO_HAS_MOVE)
socket_iostream_base(socket_iostream_base&& other)
: streambuf_(std::move(other.streambuf_))
{
@@ -103,7 +53,6 @@ protected:
streambuf_ = std::move(other.streambuf_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
basic_socket_streambuf<Protocol, Clock, WaitTraits> streambuf_;
};
@@ -118,11 +67,11 @@ template <typename Protocol,
#if defined(ASIO_HAS_BOOST_DATE_TIME) \
&& defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock> >
+ typename WaitTraits = time_traits<Clock>>
#else // defined(ASIO_HAS_BOOST_DATE_TIME)
// && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock> >
+ typename WaitTraits = wait_traits<Clock>>
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
// && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
class basic_socket_iostream;
@@ -133,7 +82,7 @@ class basic_socket_iostream;
#if defined(GENERATING_DOCUMENTATION)
template <typename Protocol,
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock> >
+ typename WaitTraits = wait_traits<Clock>>
#else // defined(GENERATING_DOCUMENTATION)
template <typename Protocol, typename Clock, typename WaitTraits>
#endif // defined(GENERATING_DOCUMENTATION)
@@ -193,7 +142,6 @@ public:
this->setf(std::ios_base::unitbuf);
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Construct a basic_socket_iostream from the supplied socket.
explicit basic_socket_iostream(basic_stream_socket<protocol_type> s)
: detail::socket_iostream_base<
@@ -205,8 +153,6 @@ public:
this->setf(std::ios_base::unitbuf);
}
-#if defined(ASIO_HAS_STD_IOSTREAM_MOVE) \
- || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_socket_iostream from another.
basic_socket_iostream(basic_socket_iostream&& other)
: detail::socket_iostream_base<
@@ -225,20 +171,13 @@ public:
Protocol, Clock, WaitTraits>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_STD_IOSTREAM_MOVE)
- // || defined(GENERATING_DOCUMENTATION)
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-#if defined(GENERATING_DOCUMENTATION)
/// Establish a connection to an endpoint corresponding to a resolver query.
/**
* This constructor automatically establishes a connection based on the
* supplied resolver query parameters. The arguments are used to construct
* a resolver query object.
*/
- template <typename T1, ..., typename TN>
- explicit basic_socket_iostream(T1 t1, ..., TN tn);
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename... T>
explicit basic_socket_iostream(T... x)
: std::basic_iostream<char>(
@@ -249,29 +188,19 @@ public:
if (rdbuf()->connect(x...) == 0)
this->setstate(std::ios_base::failbit);
}
-#else
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CTR_DEF)
-#endif
-#if defined(GENERATING_DOCUMENTATION)
/// Establish a connection to an endpoint corresponding to a resolver query.
/**
* This function automatically establishes a connection based on the supplied
* resolver query parameters. The arguments are used to construct a resolver
* query object.
*/
- template <typename T1, ..., typename TN>
- void connect(T1 t1, ..., TN tn);
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename... T>
void connect(T... x)
{
if (rdbuf()->connect(x...) == 0)
this->setstate(std::ios_base::failbit);
}
-#else
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CONNECT_DEF)
-#endif
/// Close the connection.
void close()
@@ -388,20 +317,15 @@ public:
private:
// Disallow copying and assignment.
- basic_socket_iostream(const basic_socket_iostream&) ASIO_DELETED;
+ basic_socket_iostream(const basic_socket_iostream&) = delete;
basic_socket_iostream& operator=(
- const basic_socket_iostream&) ASIO_DELETED;
+ const basic_socket_iostream&) = delete;
};
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-# undef ASIO_PRIVATE_CTR_DEF
-# undef ASIO_PRIVATE_CONNECT_DEF
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // ASIO_BASIC_SOCKET_IOSTREAM_HPP
diff --git a/3rdparty/asio/include/asio/basic_socket_streambuf.hpp b/3rdparty/asio/include/asio/basic_socket_streambuf.hpp
index 11efcce1091..e3a5f836382 100644
--- a/3rdparty/asio/include/asio/basic_socket_streambuf.hpp
+++ b/3rdparty/asio/include/asio/basic_socket_streambuf.hpp
@@ -2,7 +2,7 @@
// basic_socket_streambuf.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -37,38 +37,6 @@
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
// && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-# include "asio/detail/variadic_templates.hpp"
-
-// A macro that should expand to:
-// template <typename T1, ..., typename Tn>
-// basic_socket_streambuf* connect(T1 x1, ..., Tn xn)
-// {
-// init_buffers();
-// typedef typename Protocol::resolver resolver_type;
-// resolver_type resolver(socket().get_executor());
-// connect_to_endpoints(
-// resolver.resolve(x1, ..., xn, ec_));
-// return !ec_ ? this : 0;
-// }
-// This macro should only persist within this file.
-
-# define ASIO_PRIVATE_CONNECT_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- basic_socket_streambuf* connect(ASIO_VARIADIC_BYVAL_PARAMS(n)) \
- { \
- init_buffers(); \
- typedef typename Protocol::resolver resolver_type; \
- resolver_type resolver(socket().get_executor()); \
- connect_to_endpoints( \
- resolver.resolve(ASIO_VARIADIC_BYVAL_ARGS(n), ec_)); \
- return !ec_ ? this : 0; \
- } \
- /**/
-
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -116,11 +84,11 @@ template <typename Protocol,
#if defined(ASIO_HAS_BOOST_DATE_TIME) \
&& defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock> >
+ typename WaitTraits = time_traits<Clock>>
#else // defined(ASIO_HAS_BOOST_DATE_TIME)
// && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock> >
+ typename WaitTraits = wait_traits<Clock>>
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
// && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM)
class basic_socket_streambuf;
@@ -131,7 +99,7 @@ class basic_socket_streambuf;
#if defined(GENERATING_DOCUMENTATION)
template <typename Protocol,
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock> >
+ typename WaitTraits = wait_traits<Clock>>
#else // defined(GENERATING_DOCUMENTATION)
template <typename Protocol, typename Clock, typename WaitTraits>
#endif // defined(GENERATING_DOCUMENTATION)
@@ -197,7 +165,6 @@ public:
init_buffers();
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Construct a basic_socket_streambuf from the supplied socket.
explicit basic_socket_streambuf(basic_stream_socket<protocol_type> s)
: detail::socket_streambuf_io_context(0),
@@ -241,7 +208,6 @@ public:
other.init_buffers();
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destructor flushes buffered data.
virtual ~basic_socket_streambuf()
@@ -265,7 +231,6 @@ public:
return !ec_ ? this : 0;
}
-#if defined(GENERATING_DOCUMENTATION)
/// Establish a connection.
/**
* This function automatically establishes a connection based on the supplied
@@ -275,9 +240,6 @@ public:
* @return \c this if a connection was successfully established, a null
* pointer otherwise.
*/
- template <typename T1, ..., typename TN>
- basic_socket_streambuf* connect(T1 t1, ..., TN tn);
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename... T>
basic_socket_streambuf* connect(T... x)
{
@@ -287,9 +249,6 @@ public:
connect_to_endpoints(resolver.resolve(x..., ec_));
return !ec_ ? this : 0;
}
-#else
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CONNECT_DEF)
-#endif
/// Close the connection.
/**
@@ -559,9 +518,9 @@ protected:
private:
// Disallow copying and assignment.
- basic_socket_streambuf(const basic_socket_streambuf&) ASIO_DELETED;
+ basic_socket_streambuf(const basic_socket_streambuf&) = delete;
basic_socket_streambuf& operator=(
- const basic_socket_streambuf&) ASIO_DELETED;
+ const basic_socket_streambuf&) = delete;
void init_buffers()
{
@@ -678,10 +637,6 @@ private:
#include "asio/detail/pop_options.hpp"
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-# undef ASIO_PRIVATE_CONNECT_DEF
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // ASIO_BASIC_SOCKET_STREAMBUF_HPP
diff --git a/3rdparty/asio/include/asio/basic_stream_file.hpp b/3rdparty/asio/include/asio/basic_stream_file.hpp
new file mode 100644
index 00000000000..4b2ca8775e5
--- /dev/null
+++ b/3rdparty/asio/include/asio/basic_stream_file.hpp
@@ -0,0 +1,744 @@
+//
+// basic_stream_file.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 ASIO_BASIC_STREAM_FILE_HPP
+#define ASIO_BASIC_STREAM_FILE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <cstddef>
+#include "asio/async_result.hpp"
+#include "asio/basic_file.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if !defined(ASIO_BASIC_STREAM_FILE_FWD_DECL)
+#define ASIO_BASIC_STREAM_FILE_FWD_DECL
+
+// Forward declaration with defaulted arguments.
+template <typename Executor = any_io_executor>
+class basic_stream_file;
+
+#endif // !defined(ASIO_BASIC_STREAM_FILE_FWD_DECL)
+
+/// Provides stream-oriented file functionality.
+/**
+ * The basic_stream_file class template provides asynchronous and blocking
+ * stream-oriented file functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
+ */
+template <typename Executor>
+class basic_stream_file
+ : public basic_file<Executor>
+{
+private:
+ class initiate_async_write_some;
+ class initiate_async_read_some;
+
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the file type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The file type when rebound to the specified executor.
+ typedef basic_stream_file<Executor1> other;
+ };
+
+ /// The native representation of a file.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef typename basic_file<Executor>::native_handle_type native_handle_type;
+#endif
+
+ /// Construct a basic_stream_file without opening it.
+ /**
+ * This constructor initialises a file without opening it. The file needs to
+ * be opened before data can be read from or or written to it.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ */
+ explicit basic_stream_file(const executor_type& ex)
+ : basic_file<Executor>(ex)
+ {
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ }
+
+ /// Construct a basic_stream_file without opening it.
+ /**
+ * This constructor initialises a file without opening it. The file needs to
+ * be opened before data can be read from or or written to it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ */
+ template <typename ExecutionContext>
+ explicit basic_stream_file(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context)
+ {
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ }
+
+ /// Construct and open a basic_stream_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_stream_file(const executor_type& ex,
+ const char* path, file_base::flags open_flags)
+ : basic_file<Executor>(ex)
+ {
+ asio::error_code ec;
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ this->impl_.get_service().open(
+ this->impl_.get_implementation(),
+ path, open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_stream_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_file(ExecutionContext& context,
+ const char* path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context)
+ {
+ asio::error_code ec;
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ this->impl_.get_service().open(
+ this->impl_.get_implementation(),
+ path, open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_stream_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_stream_file(const executor_type& ex,
+ const std::string& path, file_base::flags open_flags)
+ : basic_file<Executor>(ex)
+ {
+ asio::error_code ec;
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ this->impl_.get_service().open(
+ this->impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct and open a basic_stream_file.
+ /**
+ * This constructor initialises and opens a file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param path The path name identifying the file to be opened.
+ *
+ * @param open_flags A set of flags that determine how the file should be
+ * opened.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_file(ExecutionContext& context,
+ const std::string& path, file_base::flags open_flags,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context)
+ {
+ asio::error_code ec;
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ this->impl_.get_service().open(
+ this->impl_.get_implementation(),
+ path.c_str(), open_flags, ec);
+ asio::detail::throw_error(ec, "open");
+ }
+
+ /// Construct a basic_stream_file on an existing native file.
+ /**
+ * This constructor initialises a stream file object to hold an existing
+ * native file.
+ *
+ * @param ex The I/O executor that the file will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the file.
+ *
+ * @param native_file The new underlying file implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_stream_file(const executor_type& ex,
+ const native_handle_type& native_file)
+ : basic_file<Executor>(ex, native_file)
+ {
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ }
+
+ /// Construct a basic_stream_file on an existing native file.
+ /**
+ * This constructor initialises a stream file object to hold an existing
+ * native file.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the file will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the file.
+ *
+ * @param native_file The new underlying file implementation.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_stream_file(ExecutionContext& context,
+ const native_handle_type& native_file,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(context, native_file)
+ {
+ this->impl_.get_service().set_is_stream(
+ this->impl_.get_implementation(), true);
+ }
+
+ /// Move-construct a basic_stream_file from another.
+ /**
+ * This constructor moves a stream file from one object to another.
+ *
+ * @param other The other basic_stream_file object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_stream_file(const executor_type&)
+ * constructor.
+ */
+ basic_stream_file(basic_stream_file&& other) noexcept
+ : basic_file<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_stream_file from another.
+ /**
+ * This assignment operator moves a stream file from one object to another.
+ *
+ * @param other The other basic_stream_file object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_stream_file(const executor_type&)
+ * constructor.
+ */
+ basic_stream_file& operator=(basic_stream_file&& other)
+ {
+ basic_file<Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Move-construct a basic_stream_file from a file of another executor
+ /// type.
+ /**
+ * This constructor moves a stream file from one object to another.
+ *
+ * @param other The other basic_stream_file object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_stream_file(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_stream_file(basic_stream_file<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_file<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_stream_file from a file of another executor type.
+ /**
+ * This assignment operator moves a stream file from one object to another.
+ *
+ * @param other The other basic_stream_file object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_stream_file(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_stream_file&
+ > operator=(basic_stream_file<Executor1>&& other)
+ {
+ basic_file<Executor>::operator=(std::move(other));
+ return *this;
+ }
+
+ /// Destroys the file.
+ /**
+ * This function destroys the file, cancelling any outstanding asynchronous
+ * operations associated with the file as if by calling @c cancel.
+ */
+ ~basic_stream_file()
+ {
+ }
+
+ /// Seek to a position in the file.
+ /**
+ * This function updates the current position in the file.
+ *
+ * @param offset The requested position in the file, relative to @c whence.
+ *
+ * @param whence One of @c seek_set, @c seek_cur or @c seek_end.
+ *
+ * @returns The new position relative to the beginning of the file.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ uint64_t seek(int64_t offset, file_base::seek_basis whence)
+ {
+ asio::error_code ec;
+ uint64_t n = this->impl_.get_service().seek(
+ this->impl_.get_implementation(), offset, whence, ec);
+ asio::detail::throw_error(ec, "seek");
+ return n;
+ }
+
+ /// Seek to a position in the file.
+ /**
+ * This function updates the current position in the file.
+ *
+ * @param offset The requested position in the file, relative to @c whence.
+ *
+ * @param whence One of @c seek_set, @c seek_cur or @c seek_end.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The new position relative to the beginning of the file.
+ */
+ uint64_t seek(int64_t offset, file_base::seek_basis whence,
+ asio::error_code& ec)
+ {
+ return this->impl_.get_service().seek(
+ this->impl_.get_implementation(), offset, whence, ec);
+ }
+
+ /// Write some data to the file.
+ /**
+ * This function is used to write data to the stream file. The function call
+ * will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the file.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the end of the file was reached.
+ *
+ * @note The write_some operation may not transmit all of the data to the
+ * peer. Consider using the @ref write function if you need to ensure that
+ * all data is written before the blocking operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * file.write_some(asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
+ asio::detail::throw_error(ec, "write_some");
+ return s;
+ }
+
+ /// Write some data to the file.
+ /**
+ * This function is used to write data to the stream file. The function call
+ * will block until one or more bytes of the data has been written
+ * successfully, or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the file.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. Returns 0 if an error occurred.
+ *
+ * @note The write_some operation may not transmit all of the data to the
+ * peer. Consider using the @ref write function if you need to ensure that
+ * all data is written before the blocking operation completes.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers,
+ asio::error_code& ec)
+ {
+ return this->impl_.get_service().write_some(
+ this->impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous write.
+ /**
+ * This function is used to asynchronously write data to the stream file.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
+ *
+ * @param buffers One or more data buffers to be written to the file.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes written.
+ * ); @endcode
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The write operation may not transmit all of the data to the peer.
+ * Consider using the @ref async_write function if you need to ensure that all
+ * data is written before the asynchronous operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * file.async_write_some(asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
+ */
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some>(), token, buffers))
+ {
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some(this), token, buffers);
+ }
+
+ /// Read some data from the file.
+ /**
+ * This function is used to read data from the stream file. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the end of the file was reached.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * file.read_some(asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
+ asio::detail::throw_error(ec, "read_some");
+ return s;
+ }
+
+ /// Read some data from the file.
+ /**
+ * This function is used to read data from the stream file. The function
+ * call will block until one or more bytes of data has been read successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. Returns 0 if an error occurred.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read function if you need to ensure that
+ * the requested amount of data is read before the blocking operation
+ * completes.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers,
+ asio::error_code& ec)
+ {
+ return this->impl_.get_service().read_some(
+ this->impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous read.
+ /**
+ * This function is used to asynchronously read data from the stream file.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
+ *
+ * @param buffers One or more buffers into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes read.
+ * ); @endcode
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The read operation may not read all of the requested number of bytes.
+ * Consider using the @ref async_read function if you need to ensure that the
+ * requested amount of data is read before the asynchronous operation
+ * completes.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * file.async_read_some(asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @par Per-Operation Cancellation
+ * On POSIX or Windows operating systems, this asynchronous operation supports
+ * cancellation for the following asio::cancellation_type values:
+ *
+ * @li @c cancellation_type::terminal
+ *
+ * @li @c cancellation_type::partial
+ *
+ * @li @c cancellation_type::total
+ */
+ template <typename MutableBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
+ {
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_read_some(this), token, buffers);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_stream_file(const basic_stream_file&) = delete;
+ basic_stream_file& operator=(const basic_stream_file&) = delete;
+
+ class initiate_async_write_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_write_some(basic_stream_file* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_write_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_stream_file* self_;
+ };
+
+ class initiate_async_read_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_read_some(basic_stream_file* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReadHandler, typename MutableBufferSequence>
+ void operator()(ReadHandler&& handler,
+ const MutableBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a ReadHandler.
+ ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ detail::non_const_lvalue<ReadHandler> handler2(handler);
+ self_->impl_.get_service().async_read_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_stream_file* self_;
+ };
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_BASIC_STREAM_FILE_HPP
diff --git a/3rdparty/asio/include/asio/basic_stream_socket.hpp b/3rdparty/asio/include/asio/basic_stream_socket.hpp
index 5b573849333..e3a79450037 100644
--- a/3rdparty/asio/include/asio/basic_stream_socket.hpp
+++ b/3rdparty/asio/include/asio/basic_stream_socket.hpp
@@ -2,7 +2,7 @@
// basic_stream_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -46,11 +46,12 @@ class basic_stream_socket;
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*
- * Synchronous @c send, @c receive, and @c connect operations are thread safe
- * with respect to each other, if the underlying operating system calls are
- * also thread safe. This means that it is permitted to perform concurrent
- * calls to these synchronous operations on a single socket object. Other
- * synchronous operations, such as @c open or @c close, are not thread safe.
+ * Synchronous @c send, @c receive, @c connect, and @c shutdown operations are
+ * thread safe with respect to each other, if the underlying operating system
+ * calls are also thread safe. This means that it is permitted to perform
+ * concurrent calls to these synchronous operations on a single socket object.
+ * Other synchronous operations, such as @c open or @c close, are not thread
+ * safe.
*
* @par Concepts:
* AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
@@ -59,6 +60,10 @@ template <typename Protocol, typename Executor>
class basic_stream_socket
: public basic_socket<Protocol, Executor>
{
+private:
+ class initiate_async_send;
+ class initiate_async_receive;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -111,9 +116,9 @@ public:
*/
template <typename ExecutionContext>
explicit basic_stream_socket(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context)
{
}
@@ -150,10 +155,10 @@ public:
*/
template <typename ExecutionContext>
basic_stream_socket(ExecutionContext& context, const protocol_type& protocol,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: basic_socket<Protocol, Executor>(context, protocol)
{
}
@@ -196,9 +201,9 @@ public:
*/
template <typename ExecutionContext>
basic_stream_socket(ExecutionContext& context, const endpoint_type& endpoint,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context, endpoint)
{
}
@@ -241,14 +246,13 @@ public:
template <typename ExecutionContext>
basic_stream_socket(ExecutionContext& context,
const protocol_type& protocol, const native_handle_type& native_socket,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(context, protocol, native_socket)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_stream_socket from another.
/**
* This constructor moves a stream socket from one object to another.
@@ -260,7 +264,7 @@ public:
* constructed using the @c basic_stream_socket(const executor_type&)
* constructor.
*/
- basic_stream_socket(basic_stream_socket&& other) ASIO_NOEXCEPT
+ basic_stream_socket(basic_stream_socket&& other) noexcept
: basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -296,10 +300,10 @@ public:
*/
template <typename Protocol1, typename Executor1>
basic_stream_socket(basic_stream_socket<Protocol1, Executor1>&& other,
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value
- >::type = 0)
+ > = 0)
: basic_socket<Protocol, Executor>(std::move(other))
{
}
@@ -316,16 +320,15 @@ public:
* constructor.
*/
template <typename Protocol1, typename Executor1>
- typename constraint<
+ constraint_t<
is_convertible<Protocol1, Protocol>::value
&& is_convertible<Executor1, Executor>::value,
basic_stream_socket&
- >::type operator=(basic_stream_socket<Protocol1, Executor1>&& other)
+ > operator=(basic_stream_socket<Protocol1, Executor1>&& other)
{
basic_socket<Protocol, Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the socket.
/**
@@ -438,25 +441,31 @@ public:
/// Start an asynchronous send.
/**
* This function is used to asynchronously send data on the stream socket.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The send operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
* data is written before the asynchronous operation completes.
@@ -482,44 +491,51 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token,
+ buffers, socket_base::message_flags(0)))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send(this), handler,
+ initiate_async_send(this), token,
buffers, socket_base::message_flags(0));
}
/// Start an asynchronous send.
/**
* This function is used to asynchronously send data on the stream socket.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be sent on the socket. Although
* the buffers object may be copied as necessary, ownership of the underlying
* memory blocks is retained by the caller, which must guarantee that they
- * remain valid until the handler is called.
+ * remain valid until the completion handler is called.
*
* @param flags Flags specifying how the send call is to be made.
*
- * @param handler The handler to be called when the send operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the send completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes sent.
+ * std::size_t bytes_transferred // Number of bytes sent.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The send operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
* data is written before the asynchronous operation completes.
@@ -545,18 +561,18 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_send(const ConstBufferSequence& buffers,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_send(const ConstBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token, buffers, flags))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send(this), handler, buffers, flags);
+ initiate_async_send(this), token, buffers, flags);
}
/// Receive some data on the socket.
@@ -667,25 +683,31 @@ public:
/// Start an asynchronous receive.
/**
* This function is used to asynchronously receive data from the stream
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The receive operation may not receive all of the requested number of
* bytes. Consider using the @ref async_read function if you need to ensure
* that the requested amount of data is received before the asynchronous
@@ -713,44 +735,51 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token,
+ buffers, socket_base::message_flags(0)))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive(this), handler,
+ initiate_async_receive(this), token,
buffers, socket_base::message_flags(0));
}
/// Start an asynchronous receive.
/**
* This function is used to asynchronously receive data from the stream
- * socket. The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be received.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param flags Flags specifying how the receive call is to be made.
*
- * @param handler The handler to be called when the receive operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the receive completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes received.
+ * std::size_t bytes_transferred // Number of bytes received.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The receive operation may not receive all of the requested number of
* bytes. Consider using the @ref async_read function if you need to ensure
* that the requested amount of data is received before the asynchronous
@@ -778,18 +807,18 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_receive(const MutableBufferSequence& buffers,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token, buffers, flags))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive(this), handler, buffers, flags);
+ initiate_async_receive(this), token, buffers, flags);
}
/// Write some data to the socket.
@@ -856,25 +885,31 @@ public:
/// Start an asynchronous write.
/**
* This function is used to asynchronously write data to the stream socket.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be written to the socket.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The write operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
* data is written before the asynchronous operation completes.
@@ -900,17 +935,18 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_send>(), token,
+ buffers, socket_base::message_flags(0)))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_send(this), handler,
+ initiate_async_send(this), token,
buffers, socket_base::message_flags(0));
}
@@ -980,25 +1016,31 @@ public:
/// Start an asynchronous read.
/**
* This function is used to asynchronously read data from the stream socket.
- * The function call always returns immediately.
+ * socket. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param buffers One or more buffers into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The read operation may not read all of the requested number of bytes.
* Consider using the @ref async_read function if you need to ensure that the
* requested amount of data is read before the asynchronous operation
@@ -1025,24 +1067,25 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_receive>(), token,
+ buffers, socket_base::message_flags(0)))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_receive(this), handler,
+ initiate_async_receive(this), token,
buffers, socket_base::message_flags(0));
}
private:
// Disallow copying and assignment.
- basic_stream_socket(const basic_stream_socket&) ASIO_DELETED;
- basic_stream_socket& operator=(const basic_stream_socket&) ASIO_DELETED;
+ basic_stream_socket(const basic_stream_socket&) = delete;
+ basic_stream_socket& operator=(const basic_stream_socket&) = delete;
class initiate_async_send
{
@@ -1054,13 +1097,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
const ConstBufferSequence& buffers,
socket_base::message_flags flags) const
{
@@ -1088,13 +1131,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
const MutableBufferSequence& buffers,
socket_base::message_flags flags) const
{
diff --git a/3rdparty/asio/include/asio/basic_streambuf.hpp b/3rdparty/asio/include/asio/basic_streambuf.hpp
index 3e0c6e4a22e..0450811dca1 100644
--- a/3rdparty/asio/include/asio/basic_streambuf.hpp
+++ b/3rdparty/asio/include/asio/basic_streambuf.hpp
@@ -2,7 +2,7 @@
// basic_streambuf.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -103,7 +103,7 @@ namespace asio {
* @endcode
*/
#if defined(GENERATING_DOCUMENTATION)
-template <typename Allocator = std::allocator<char> >
+template <typename Allocator = std::allocator<char>>
#else
template <typename Allocator>
#endif
@@ -155,7 +155,7 @@ public:
* }
* @endcode
*/
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
return pptr() - gptr();
}
@@ -165,7 +165,7 @@ public:
* @returns The allowed maximum of the sum of the sizes of the input sequence
* and output sequence.
*/
- std::size_t max_size() const ASIO_NOEXCEPT
+ std::size_t max_size() const noexcept
{
return max_size_;
}
@@ -175,7 +175,7 @@ public:
* @returns The current total capacity of the streambuf, i.e. for both the
* input sequence and output sequence.
*/
- std::size_t capacity() const ASIO_NOEXCEPT
+ std::size_t capacity() const noexcept
{
return buffer_.capacity();
}
@@ -189,7 +189,7 @@ public:
* @note The returned object is invalidated by any @c basic_streambuf member
* function that modifies the input sequence or output sequence.
*/
- const_buffers_type data() const ASIO_NOEXCEPT
+ const_buffers_type data() const noexcept
{
return asio::buffer(asio::const_buffer(gptr(),
(pptr() - gptr()) * sizeof(char_type)));
@@ -361,7 +361,7 @@ private:
/// Adapts basic_streambuf to the dynamic buffer sequence type requirements.
#if defined(GENERATING_DOCUMENTATION)
-template <typename Allocator = std::allocator<char> >
+template <typename Allocator = std::allocator<char>>
#else
template <typename Allocator>
#endif
@@ -383,39 +383,37 @@ public:
}
/// Copy construct a basic_streambuf_ref.
- basic_streambuf_ref(const basic_streambuf_ref& other) ASIO_NOEXCEPT
+ basic_streambuf_ref(const basic_streambuf_ref& other) noexcept
: sb_(other.sb_)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move construct a basic_streambuf_ref.
- basic_streambuf_ref(basic_streambuf_ref&& other) ASIO_NOEXCEPT
+ basic_streambuf_ref(basic_streambuf_ref&& other) noexcept
: sb_(other.sb_)
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Get the size of the input sequence.
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
return sb_.size();
}
/// Get the maximum size of the dynamic buffer.
- std::size_t max_size() const ASIO_NOEXCEPT
+ std::size_t max_size() const noexcept
{
return sb_.max_size();
}
/// Get the current capacity of the dynamic buffer.
- std::size_t capacity() const ASIO_NOEXCEPT
+ std::size_t capacity() const noexcept
{
return sb_.capacity();
}
/// Get a list of buffers that represents the input sequence.
- const_buffers_type data() const ASIO_NOEXCEPT
+ const_buffers_type data() const noexcept
{
return sb_.data();
}
diff --git a/3rdparty/asio/include/asio/basic_streambuf_fwd.hpp b/3rdparty/asio/include/asio/basic_streambuf_fwd.hpp
index 5856c966466..1ff320d4637 100644
--- a/3rdparty/asio/include/asio/basic_streambuf_fwd.hpp
+++ b/3rdparty/asio/include/asio/basic_streambuf_fwd.hpp
@@ -2,7 +2,7 @@
// basic_streambuf_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,10 +23,10 @@
namespace asio {
-template <typename Allocator = std::allocator<char> >
+template <typename Allocator = std::allocator<char>>
class basic_streambuf;
-template <typename Allocator = std::allocator<char> >
+template <typename Allocator = std::allocator<char>>
class basic_streambuf_ref;
} // namespace asio
diff --git a/3rdparty/asio/include/asio/basic_waitable_timer.hpp b/3rdparty/asio/include/asio/basic_waitable_timer.hpp
index 3b9adcec7f4..5e9df3ef4f8 100644
--- a/3rdparty/asio/include/asio/basic_waitable_timer.hpp
+++ b/3rdparty/asio/include/asio/basic_waitable_timer.hpp
@@ -2,7 +2,7 @@
// basic_waitable_timer.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,6 +17,7 @@
#include "asio/detail/config.hpp"
#include <cstddef>
+#include <utility>
#include "asio/any_io_executor.hpp"
#include "asio/detail/chrono_time_traits.hpp"
#include "asio/detail/deadline_timer_service.hpp"
@@ -27,10 +28,6 @@
#include "asio/error.hpp"
#include "asio/wait_traits.hpp"
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -141,6 +138,9 @@ class basic_waitable_timer;
template <typename Clock, typename WaitTraits, typename Executor>
class basic_waitable_timer
{
+private:
+ class initiate_async_wait;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -191,9 +191,9 @@ public:
*/
template <typename ExecutionContext>
explicit basic_waitable_timer(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
}
@@ -230,9 +230,9 @@ public:
template <typename ExecutionContext>
explicit basic_waitable_timer(ExecutionContext& context,
const time_point& expiry_time,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -273,9 +273,9 @@ public:
template <typename ExecutionContext>
explicit basic_waitable_timer(ExecutionContext& context,
const duration& expiry_time,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -284,7 +284,6 @@ public:
asio::detail::throw_error(ec, "expires_after");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_waitable_timer from another.
/**
* This constructor moves a timer from one object to another.
@@ -337,9 +336,9 @@ public:
template <typename Executor1>
basic_waitable_timer(
basic_waitable_timer<Clock, WaitTraits, Executor1>&& other,
- typename constraint<
- is_convertible<Executor1, Executor>::value
- >::type = 0)
+ constraint_t<
+ is_convertible<Executor1, Executor>::value
+ > = 0)
: impl_(std::move(other.impl_))
{
}
@@ -357,16 +356,15 @@ public:
* constructor.
*/
template <typename Executor1>
- typename constraint<
+ constraint_t<
is_convertible<Executor1, Executor>::value,
basic_waitable_timer&
- >::type operator=(basic_waitable_timer<Clock, WaitTraits, Executor1>&& other)
+ > operator=(basic_waitable_timer<Clock, WaitTraits, Executor1>&& other)
{
basic_waitable_timer tmp(std::move(other));
impl_ = std::move(tmp.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the timer.
/**
@@ -378,7 +376,7 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
return impl_.get_executor();
}
@@ -726,27 +724,33 @@ public:
/// Start an asynchronous wait on the timer.
/**
* This function may be used to initiate an asynchronous wait against the
- * timer. It always returns immediately.
+ * timer. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
- * For each call to async_wait(), the supplied handler will be called exactly
- * once. The handler will be called when:
+ * For each call to async_wait(), the completion handler will be called
+ * exactly once. The completion handler will be called when:
*
* @li The timer has expired.
*
* @li The timer was cancelled, in which case the handler is passed the error
* code asio::error::operation_aborted.
*
- * @param handler The handler to be called when the timer expires. Copies
- * will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the timer expires. Potential
+ * completion tokens include @ref use_future, @ref use_awaitable, @ref
+ * yield_context, or a function object with the correct completion signature.
+ * The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error // Result of operation.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -759,22 +763,21 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
- WaitHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(
- ASIO_MOVE_ARG(WaitHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token))
{
- return async_initiate<WaitHandler, void (asio::error_code)>(
- initiate_async_wait(this), handler);
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token);
}
private:
// Disallow copying and assignment.
- basic_waitable_timer(const basic_waitable_timer&) ASIO_DELETED;
- basic_waitable_timer& operator=(
- const basic_waitable_timer&) ASIO_DELETED;
+ basic_waitable_timer(const basic_waitable_timer&) = delete;
+ basic_waitable_timer& operator=(const basic_waitable_timer&) = delete;
class initiate_async_wait
{
@@ -786,13 +789,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WaitHandler>
- void operator()(ASIO_MOVE_ARG(WaitHandler) handler) const
+ void operator()(WaitHandler&& handler) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a WaitHandler.
@@ -810,7 +813,7 @@ private:
detail::io_object_impl<
detail::deadline_timer_service<
- detail::chrono_time_traits<Clock, WaitTraits> >,
+ detail::chrono_time_traits<Clock, WaitTraits>>,
executor_type > impl_;
};
diff --git a/3rdparty/asio/include/asio/basic_writable_pipe.hpp b/3rdparty/asio/include/asio/basic_writable_pipe.hpp
new file mode 100644
index 00000000000..4c389c9b464
--- /dev/null
+++ b/3rdparty/asio/include/asio/basic_writable_pipe.hpp
@@ -0,0 +1,622 @@
+//
+// basic_writable_pipe.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 ASIO_BASIC_WRITABLE_PIPE_HPP
+#define ASIO_BASIC_WRITABLE_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <string>
+#include <utility>
+#include "asio/any_io_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/io_object_impl.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#if defined(ASIO_HAS_IOCP)
+# include "asio/detail/win_iocp_handle_service.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_descriptor_service.hpp"
+#else
+# include "asio/detail/reactive_descriptor_service.hpp"
+#endif
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Provides pipe functionality.
+/**
+ * The basic_writable_pipe class provides a wrapper over pipe
+ * functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename Executor = any_io_executor>
+class basic_writable_pipe
+{
+private:
+ class initiate_async_write_some;
+
+public:
+ /// The type of the executor associated with the object.
+ typedef Executor executor_type;
+
+ /// Rebinds the pipe type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The pipe type when rebound to the specified executor.
+ typedef basic_writable_pipe<Executor1> other;
+ };
+
+ /// The native representation of a pipe.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#elif defined(ASIO_HAS_IOCP)
+ typedef detail::win_iocp_handle_service::native_handle_type
+ native_handle_type;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef detail::io_uring_descriptor_service::native_handle_type
+ native_handle_type;
+#else
+ typedef detail::reactive_descriptor_service::native_handle_type
+ native_handle_type;
+#endif
+
+ /// A basic_writable_pipe is always the lowest layer.
+ typedef basic_writable_pipe lowest_layer_type;
+
+ /// Construct a basic_writable_pipe without opening it.
+ /**
+ * This constructor creates a pipe without opening it.
+ *
+ * @param ex The I/O executor that the pipe will use, by default, to dispatch
+ * handlers for any asynchronous operations performed on the pipe.
+ */
+ explicit basic_writable_pipe(const executor_type& ex)
+ : impl_(0, ex)
+ {
+ }
+
+ /// Construct a basic_writable_pipe without opening it.
+ /**
+ * This constructor creates a pipe without opening it.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the pipe will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the pipe.
+ */
+ template <typename ExecutionContext>
+ explicit basic_writable_pipe(ExecutionContext& context,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(0, 0, context)
+ {
+ }
+
+ /// Construct a basic_writable_pipe on an existing native pipe.
+ /**
+ * This constructor creates a pipe object to hold an existing native
+ * pipe.
+ *
+ * @param ex The I/O executor that the pipe will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the
+ * pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ basic_writable_pipe(const executor_type& ex,
+ const native_handle_type& native_pipe)
+ : impl_(0, ex)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Construct a basic_writable_pipe on an existing native pipe.
+ /**
+ * This constructor creates a pipe object to hold an existing native
+ * pipe.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the pipe will use, by default, to dispatch handlers for any
+ * asynchronous operations performed on the pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ template <typename ExecutionContext>
+ basic_writable_pipe(ExecutionContext& context,
+ const native_handle_type& native_pipe,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : impl_(0, 0, context)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(),
+ native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Move-construct a basic_writable_pipe from another.
+ /**
+ * This constructor moves a pipe from one object to another.
+ *
+ * @param other The other basic_writable_pipe object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_writable_pipe(const executor_type&)
+ * constructor.
+ */
+ basic_writable_pipe(basic_writable_pipe&& other)
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_writable_pipe from another.
+ /**
+ * This assignment operator moves a pipe from one object to another.
+ *
+ * @param other The other basic_writable_pipe object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_writable_pipe(const executor_type&)
+ * constructor.
+ */
+ basic_writable_pipe& operator=(basic_writable_pipe&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
+
+ // All pipes have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_writable_pipe;
+
+ /// Move-construct a basic_writable_pipe from a pipe of another executor type.
+ /**
+ * This constructor moves a pipe from one object to another.
+ *
+ * @param other The other basic_writable_pipe object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_writable_pipe(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_writable_pipe(basic_writable_pipe<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_writable_pipe from a pipe of another executor type.
+ /**
+ * This assignment operator moves a pipe from one object to another.
+ *
+ * @param other The other basic_writable_pipe object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_writable_pipe(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_writable_pipe&
+ > operator=(basic_writable_pipe<Executor1>&& other)
+ {
+ basic_writable_pipe tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
+ }
+
+ /// Destroys the pipe.
+ /**
+ * This function destroys the pipe, cancelling any outstanding
+ * asynchronous wait operations associated with the pipe as if by
+ * calling @c cancel.
+ */
+ ~basic_writable_pipe()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return impl_.get_executor();
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * layers. Since a basic_writable_pipe cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A reference to the lowest layer in the stack of layers. Ownership
+ * is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return *this;
+ }
+
+ /// Get a const reference to the lowest layer.
+ /**
+ * This function returns a const reference to the lowest layer in a stack of
+ * layers. Since a basic_writable_pipe cannot contain any further layers, it
+ * simply returns a reference to itself.
+ *
+ * @return A const reference to the lowest layer in the stack of layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
+ return *this;
+ }
+
+ /// Assign an existing native pipe to the pipe.
+ /*
+ * This function opens the pipe to hold an existing native pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void assign(const native_handle_type& native_pipe)
+ {
+ asio::error_code ec;
+ impl_.get_service().assign(impl_.get_implementation(), native_pipe, ec);
+ asio::detail::throw_error(ec, "assign");
+ }
+
+ /// Assign an existing native pipe to the pipe.
+ /*
+ * This function opens the pipe to hold an existing native pipe.
+ *
+ * @param native_pipe A native pipe.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID assign(const native_handle_type& native_pipe,
+ asio::error_code& ec)
+ {
+ impl_.get_service().assign(impl_.get_implementation(), native_pipe, ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Determine whether the pipe is open.
+ bool is_open() const
+ {
+ return impl_.get_service().is_open(impl_.get_implementation());
+ }
+
+ /// Close the pipe.
+ /**
+ * This function is used to close the pipe. Any asynchronous write operations
+ * will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void close()
+ {
+ asio::error_code ec;
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "close");
+ }
+
+ /// Close the pipe.
+ /**
+ * This function is used to close the pipe. Any asynchronous write operations
+ * will be cancelled immediately, and will complete with the
+ * asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID close(asio::error_code& ec)
+ {
+ impl_.get_service().close(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Release ownership of the underlying native pipe.
+ /**
+ * This function causes all outstanding asynchronous write operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error. Ownership of the
+ * native pipe is then transferred to the caller.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ asio::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native pipe.
+ /**
+ * This function causes all outstanding asynchronous write operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error. Ownership of the
+ * native pipe is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(asio::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
+ /// Get the native pipe representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * pipe. This is intended to allow access to native pipe
+ * functionality that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return impl_.get_service().native_handle(impl_.get_implementation());
+ }
+
+ /// Cancel all asynchronous operations associated with the pipe.
+ /**
+ * This function causes all outstanding asynchronous write operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+ void cancel()
+ {
+ asio::error_code ec;
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "cancel");
+ }
+
+ /// Cancel all asynchronous operations associated with the pipe.
+ /**
+ * This function causes all outstanding asynchronous write operations to
+ * finish immediately, and the handlers for cancelled operations will be
+ * passed the asio::error::operation_aborted error.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ ASIO_SYNC_OP_VOID cancel(asio::error_code& ec)
+ {
+ impl_.get_service().cancel(impl_.get_implementation(), ec);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Write some data to the pipe.
+ /**
+ * This function is used to write data to the pipe. The function call will
+ * block until one or more bytes of the data has been written successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the pipe.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws asio::system_error Thrown on failure. An error code of
+ * asio::error::eof indicates that the connection was closed by the
+ * peer.
+ *
+ * @note The write_some operation may not transmit all of the data to the
+ * peer. Consider using the @ref write function if you need to ensure that
+ * all data is written before the blocking operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * pipe.write_some(asio::buffer(data, size));
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers)
+ {
+ asio::error_code ec;
+ std::size_t s = impl_.get_service().write_some(
+ impl_.get_implementation(), buffers, ec);
+ asio::detail::throw_error(ec, "write_some");
+ return s;
+ }
+
+ /// Write some data to the pipe.
+ /**
+ * This function is used to write data to the pipe. The function call will
+ * block until one or more bytes of the data has been written successfully,
+ * or until an error occurs.
+ *
+ * @param buffers One or more data buffers to be written to the pipe.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. Returns 0 if an error occurred.
+ *
+ * @note The write_some operation may not transmit all of the data to the
+ * peer. Consider using the @ref write function if you need to ensure that
+ * all data is written before the blocking operation completes.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers,
+ asio::error_code& ec)
+ {
+ return impl_.get_service().write_some(
+ impl_.get_implementation(), buffers, ec);
+ }
+
+ /// Start an asynchronous write.
+ /**
+ * This function is used to asynchronously write data to the pipe. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately.
+ *
+ * @param buffers One or more data buffers to be written to the pipe.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the completion handler is called.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
+ * @code void handler(
+ * const asio::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes written.
+ * ); @endcode
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
+ * @note The write operation may not transmit all of the data to the peer.
+ * Consider using the @ref async_write function if you need to ensure that all
+ * data is written before the asynchronous operation completes.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * pipe.async_write_some(asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+ template <typename ConstBufferSequence,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some>(), token, buffers))
+ {
+ return async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some(this), token, buffers);
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_writable_pipe(const basic_writable_pipe&) = delete;
+ basic_writable_pipe& operator=(const basic_writable_pipe&) = delete;
+
+ class initiate_async_write_some
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_write_some(basic_writable_pipe* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename WriteHandler, typename ConstBufferSequence>
+ void operator()(WriteHandler&& handler,
+ const ConstBufferSequence& buffers) const
+ {
+ // If you get an error on the following line it means that your handler
+ // does not meet the documented type requirements for a WriteHandler.
+ ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ detail::non_const_lvalue<WriteHandler> handler2(handler);
+ self_->impl_.get_service().async_write_some(
+ self_->impl_.get_implementation(), buffers,
+ handler2.value, self_->impl_.get_executor());
+ }
+
+ private:
+ basic_writable_pipe* self_;
+ };
+
+#if defined(ASIO_HAS_IOCP)
+ detail::io_object_impl<detail::win_iocp_handle_service, Executor> impl_;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ detail::io_object_impl<detail::io_uring_descriptor_service, Executor> impl_;
+#else
+ detail::io_object_impl<detail::reactive_descriptor_service, Executor> impl_;
+#endif
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_PIPE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_BASIC_WRITABLE_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/bind_allocator.hpp b/3rdparty/asio/include/asio/bind_allocator.hpp
new file mode 100644
index 00000000000..27910a2ec69
--- /dev/null
+++ b/3rdparty/asio/include/asio/bind_allocator.hpp
@@ -0,0 +1,530 @@
+//
+// bind_allocator.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 ASIO_BIND_ALLOCATOR_HPP
+#define ASIO_BIND_ALLOCATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Helper to automatically define nested typedef result_type.
+
+template <typename T, typename = void>
+struct allocator_binder_result_type
+{
+protected:
+ typedef void result_type_or_void;
+};
+
+template <typename T>
+struct allocator_binder_result_type<T, void_t<typename T::result_type>>
+{
+ typedef typename T::result_type result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct allocator_binder_result_type<R(*)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct allocator_binder_result_type<R(&)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct allocator_binder_result_type<R(*)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct allocator_binder_result_type<R(&)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct allocator_binder_result_type<R(*)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct allocator_binder_result_type<R(&)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+// Helper to automatically define nested typedef argument_type.
+
+template <typename T, typename = void>
+struct allocator_binder_argument_type {};
+
+template <typename T>
+struct allocator_binder_argument_type<T, void_t<typename T::argument_type>>
+{
+ typedef typename T::argument_type argument_type;
+};
+
+template <typename R, typename A1>
+struct allocator_binder_argument_type<R(*)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+template <typename R, typename A1>
+struct allocator_binder_argument_type<R(&)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+// Helper to automatically define nested typedefs first_argument_type and
+// second_argument_type.
+
+template <typename T, typename = void>
+struct allocator_binder_argument_types {};
+
+template <typename T>
+struct allocator_binder_argument_types<T,
+ void_t<typename T::first_argument_type>>
+{
+ typedef typename T::first_argument_type first_argument_type;
+ typedef typename T::second_argument_type second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct allocator_binder_argument_type<R(*)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct allocator_binder_argument_type<R(&)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+} // namespace detail
+
+/// A call wrapper type to bind an allocator of type @c Allocator
+/// to an object of type @c T.
+template <typename T, typename Allocator>
+class allocator_binder
+#if !defined(GENERATING_DOCUMENTATION)
+ : public detail::allocator_binder_result_type<T>,
+ public detail::allocator_binder_argument_type<T>,
+ public detail::allocator_binder_argument_types<T>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+public:
+ /// The type of the target object.
+ typedef T target_type;
+
+ /// The type of the associated allocator.
+ typedef Allocator allocator_type;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// The return type if a function.
+ /**
+ * The type of @c result_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to function type, @c result_type is a synonym for
+ * the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c result_type, then @c
+ * result_type is a synonym for @c T::result_type;
+ *
+ * @li otherwise @c result_type is not defined.
+ */
+ typedef see_below result_type;
+
+ /// The type of the function's argument.
+ /**
+ * The type of @c argument_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to a function type accepting a single argument,
+ * @c argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c argument_type, then @c
+ * argument_type is a synonym for @c T::argument_type;
+ *
+ * @li otherwise @c argument_type is not defined.
+ */
+ typedef see_below argument_type;
+
+ /// The type of the function's first argument.
+ /**
+ * The type of @c first_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * first_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c first_argument_type is a synonym for @c T::first_argument_type;
+ *
+ * @li otherwise @c first_argument_type is not defined.
+ */
+ typedef see_below first_argument_type;
+
+ /// The type of the function's second argument.
+ /**
+ * The type of @c second_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * second_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c second_argument_type is a synonym for @c T::second_argument_type;
+ *
+ * @li otherwise @c second_argument_type is not defined.
+ */
+ typedef see_below second_argument_type;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct an allocator wrapper for the specified object.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U>
+ allocator_binder(const allocator_type& s, U&& u)
+ : allocator_(s),
+ target_(static_cast<U&&>(u))
+ {
+ }
+
+ /// Copy constructor.
+ allocator_binder(const allocator_binder& other)
+ : allocator_(other.get_allocator()),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy, but specify a different allocator.
+ allocator_binder(const allocator_type& s, const allocator_binder& other)
+ : allocator_(s),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy of a different allocator wrapper type.
+ /**
+ * This constructor is only valid if the @c Allocator type is
+ * constructible from type @c OtherAllocator, and the type @c T is
+ * constructible from type @c U.
+ */
+ template <typename U, typename OtherAllocator>
+ allocator_binder(const allocator_binder<U, OtherAllocator>& other,
+ constraint_t<is_constructible<Allocator, OtherAllocator>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : allocator_(other.get_allocator()),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy of a different allocator wrapper type, but
+ /// specify a different allocator.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U, typename OtherAllocator>
+ allocator_binder(const allocator_type& s,
+ const allocator_binder<U, OtherAllocator>& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : allocator_(s),
+ target_(other.get())
+ {
+ }
+
+ /// Move constructor.
+ allocator_binder(allocator_binder&& other)
+ : allocator_(static_cast<allocator_type&&>(
+ other.get_allocator())),
+ target_(static_cast<T&&>(other.get()))
+ {
+ }
+
+ /// Move construct the target object, but specify a different allocator.
+ allocator_binder(const allocator_type& s,
+ allocator_binder&& other)
+ : allocator_(s),
+ target_(static_cast<T&&>(other.get()))
+ {
+ }
+
+ /// Move construct from a different allocator wrapper type.
+ template <typename U, typename OtherAllocator>
+ allocator_binder(
+ allocator_binder<U, OtherAllocator>&& other,
+ constraint_t<is_constructible<Allocator, OtherAllocator>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : allocator_(static_cast<OtherAllocator&&>(
+ other.get_allocator())),
+ target_(static_cast<U&&>(other.get()))
+ {
+ }
+
+ /// Move construct from a different allocator wrapper type, but
+ /// specify a different allocator.
+ template <typename U, typename OtherAllocator>
+ allocator_binder(const allocator_type& s,
+ allocator_binder<U, OtherAllocator>&& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : allocator_(s),
+ target_(static_cast<U&&>(other.get()))
+ {
+ }
+
+ /// Destructor.
+ ~allocator_binder()
+ {
+ }
+
+ /// Obtain a reference to the target object.
+ target_type& get() noexcept
+ {
+ return target_;
+ }
+
+ /// Obtain a reference to the target object.
+ const target_type& get() const noexcept
+ {
+ return target_;
+ }
+
+ /// Obtain the associated allocator.
+ allocator_type get_allocator() const noexcept
+ {
+ return allocator_;
+ }
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ result_of_t<T(Args...)> operator()(Args&&... args)
+ {
+ return target_(static_cast<Args&&>(args)...);
+ }
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ result_of_t<T(Args...)> operator()(Args&&... args) const
+ {
+ return target_(static_cast<Args&&>(args)...);
+ }
+
+private:
+ Allocator allocator_;
+ T target_;
+};
+
+/// Associate an object of type @c T with an allocator of type
+/// @c Allocator.
+template <typename Allocator, typename T>
+ASIO_NODISCARD inline allocator_binder<decay_t<T>, Allocator>
+bind_allocator(const Allocator& s, T&& t)
+{
+ return allocator_binder<decay_t<T>, Allocator>(s, static_cast<T&&>(t));
+}
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+namespace detail {
+
+template <typename TargetAsyncResult, typename Allocator, typename = void>
+class allocator_binder_completion_handler_async_result
+{
+public:
+ template <typename T>
+ explicit allocator_binder_completion_handler_async_result(T&)
+ {
+ }
+};
+
+template <typename TargetAsyncResult, typename Allocator>
+class allocator_binder_completion_handler_async_result<
+ TargetAsyncResult, Allocator,
+ void_t<typename TargetAsyncResult::completion_handler_type>>
+{
+private:
+ TargetAsyncResult target_;
+
+public:
+ typedef allocator_binder<
+ typename TargetAsyncResult::completion_handler_type, Allocator>
+ completion_handler_type;
+
+ explicit allocator_binder_completion_handler_async_result(
+ typename TargetAsyncResult::completion_handler_type& handler)
+ : target_(handler)
+ {
+ }
+
+ auto get() -> decltype(target_.get())
+ {
+ return target_.get();
+ }
+};
+
+template <typename TargetAsyncResult, typename = void>
+struct allocator_binder_async_result_return_type
+{
+};
+
+template <typename TargetAsyncResult>
+struct allocator_binder_async_result_return_type<
+ TargetAsyncResult, void_type<typename TargetAsyncResult::return_type>>
+{
+ typedef typename TargetAsyncResult::return_type return_type;
+};
+
+} // namespace detail
+
+template <typename T, typename Allocator, typename Signature>
+class async_result<allocator_binder<T, Allocator>, Signature> :
+ public detail::allocator_binder_completion_handler_async_result<
+ async_result<T, Signature>, Allocator>,
+ public detail::allocator_binder_async_result_return_type<
+ async_result<T, Signature>>
+{
+public:
+ explicit async_result(allocator_binder<T, Allocator>& b)
+ : detail::allocator_binder_completion_handler_async_result<
+ async_result<T, Signature>, Allocator>(b.get())
+ {
+ }
+
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ 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, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ allocator_binder<decay_t<Handler>, Allocator>(
+ allocator_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args) const
+ {
+ initiation_(
+ allocator_binder<decay_t<Handler>, Allocator>(
+ 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<T, Signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.get(), static_cast<Args&&>(args)...))
+ {
+ return async_initiate<T, Signature>(
+ init_wrapper<decay_t<Initiation>>(token.get_allocator(),
+ static_cast<Initiation&&>(initiation)),
+ token.get(), static_cast<Args&&>(args)...);
+ }
+
+private:
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
+
+ async_result<T, Signature> target_;
+};
+
+template <template <typename, typename> class Associator,
+ typename T, typename Allocator, typename DefaultCandidate>
+struct associator<Associator, allocator_binder<T, Allocator>, DefaultCandidate>
+ : Associator<T, DefaultCandidate>
+{
+ static typename Associator<T, DefaultCandidate>::type get(
+ const allocator_binder<T, Allocator>& b) noexcept
+ {
+ return Associator<T, DefaultCandidate>::get(b.get());
+ }
+
+ static auto get(const allocator_binder<T, Allocator>& b,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<T, DefaultCandidate>::get(b.get(), c))
+ {
+ return Associator<T, DefaultCandidate>::get(b.get(), c);
+ }
+};
+
+template <typename T, typename Allocator, typename Allocator1>
+struct associated_allocator<allocator_binder<T, Allocator>, Allocator1>
+{
+ typedef Allocator type;
+
+ static auto get(const allocator_binder<T, Allocator>& b,
+ const Allocator1& = Allocator1()) noexcept
+ -> decltype(b.get_allocator())
+ {
+ return b.get_allocator();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_BIND_ALLOCATOR_HPP
diff --git a/3rdparty/asio/include/asio/bind_cancellation_slot.hpp b/3rdparty/asio/include/asio/bind_cancellation_slot.hpp
index 2a17d8f7327..7be13426283 100644
--- a/3rdparty/asio/include/asio/bind_cancellation_slot.hpp
+++ b/3rdparty/asio/include/asio/bind_cancellation_slot.hpp
@@ -2,7 +2,7 @@
// bind_cancellation_slot.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,7 +17,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/associated_cancellation_slot.hpp"
#include "asio/associator.hpp"
#include "asio/async_result.hpp"
@@ -37,8 +36,7 @@ protected:
};
template <typename T>
-struct cancellation_slot_binder_result_type<T,
- typename void_type<typename T::result_type>::type>
+struct cancellation_slot_binder_result_type<T, void_t<typename T::result_type>>
{
typedef typename T::result_type result_type;
protected:
@@ -100,7 +98,7 @@ struct cancellation_slot_binder_argument_type {};
template <typename T>
struct cancellation_slot_binder_argument_type<T,
- typename void_type<typename T::argument_type>::type>
+ void_t<typename T::argument_type>>
{
typedef typename T::argument_type argument_type;
};
@@ -125,7 +123,7 @@ struct cancellation_slot_binder_argument_types {};
template <typename T>
struct cancellation_slot_binder_argument_types<T,
- typename void_type<typename T::first_argument_type>::type>
+ void_t<typename T::first_argument_type>>
{
typedef typename T::first_argument_type first_argument_type;
typedef typename T::second_argument_type second_argument_type;
@@ -145,21 +143,6 @@ struct cancellation_slot_binder_argument_type<R(&)(A1, A2)>
typedef A2 second_argument_type;
};
-// Helper to enable SFINAE on zero-argument operator() below.
-
-template <typename T, typename = void>
-struct cancellation_slot_binder_result_of0
-{
- typedef void type;
-};
-
-template <typename T>
-struct cancellation_slot_binder_result_of0<T,
- typename void_type<typename result_of<T()>::type>::type>
-{
- typedef typename result_of<T()>::type type;
-};
-
} // namespace detail
/// A call wrapper type to bind a cancellation slot of type @c CancellationSlot
@@ -247,10 +230,9 @@ public:
* @c U.
*/
template <typename U>
- cancellation_slot_binder(const cancellation_slot_type& s,
- ASIO_MOVE_ARG(U) u)
+ cancellation_slot_binder(const cancellation_slot_type& s, U&& u)
: slot_(s),
- target_(ASIO_MOVE_CAST(U)(u))
+ target_(static_cast<U&&>(u))
{
}
@@ -277,7 +259,10 @@ public:
*/
template <typename U, typename OtherCancellationSlot>
cancellation_slot_binder(
- const cancellation_slot_binder<U, OtherCancellationSlot>& other)
+ const cancellation_slot_binder<U, OtherCancellationSlot>& other,
+ constraint_t<is_constructible<CancellationSlot,
+ OtherCancellationSlot>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
: slot_(other.get_cancellation_slot()),
target_(other.get())
{
@@ -291,19 +276,18 @@ public:
*/
template <typename U, typename OtherCancellationSlot>
cancellation_slot_binder(const cancellation_slot_type& s,
- const cancellation_slot_binder<U, OtherCancellationSlot>& other)
+ const cancellation_slot_binder<U, OtherCancellationSlot>& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
: slot_(s),
target_(other.get())
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
/// Move constructor.
cancellation_slot_binder(cancellation_slot_binder&& other)
- : slot_(ASIO_MOVE_CAST(cancellation_slot_type)(
+ : slot_(static_cast<cancellation_slot_type&&>(
other.get_cancellation_slot())),
- target_(ASIO_MOVE_CAST(T)(other.get()))
+ target_(static_cast<T&&>(other.get()))
{
}
@@ -312,17 +296,20 @@ public:
cancellation_slot_binder(const cancellation_slot_type& s,
cancellation_slot_binder&& other)
: slot_(s),
- target_(ASIO_MOVE_CAST(T)(other.get()))
+ target_(static_cast<T&&>(other.get()))
{
}
/// Move construct from a different cancellation slot wrapper type.
template <typename U, typename OtherCancellationSlot>
cancellation_slot_binder(
- cancellation_slot_binder<U, OtherCancellationSlot>&& other)
- : slot_(ASIO_MOVE_CAST(OtherCancellationSlot)(
+ cancellation_slot_binder<U, OtherCancellationSlot>&& other,
+ constraint_t<is_constructible<CancellationSlot,
+ OtherCancellationSlot>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : slot_(static_cast<OtherCancellationSlot&&>(
other.get_cancellation_slot())),
- target_(ASIO_MOVE_CAST(U)(other.get()))
+ target_(static_cast<U&&>(other.get()))
{
}
@@ -330,126 +317,50 @@ public:
/// specify a different cancellation slot.
template <typename U, typename OtherCancellationSlot>
cancellation_slot_binder(const cancellation_slot_type& s,
- cancellation_slot_binder<U, OtherCancellationSlot>&& other)
+ cancellation_slot_binder<U, OtherCancellationSlot>&& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
: slot_(s),
- target_(ASIO_MOVE_CAST(U)(other.get()))
+ target_(static_cast<U&&>(other.get()))
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
/// Destructor.
~cancellation_slot_binder()
{
}
/// Obtain a reference to the target object.
- target_type& get() ASIO_NOEXCEPT
+ target_type& get() noexcept
{
return target_;
}
/// Obtain a reference to the target object.
- const target_type& get() const ASIO_NOEXCEPT
+ const target_type& get() const noexcept
{
return target_;
}
/// Obtain the associated cancellation slot.
- cancellation_slot_type get_cancellation_slot() const ASIO_NOEXCEPT
+ cancellation_slot_type get_cancellation_slot() const noexcept
{
return slot_;
}
-#if defined(GENERATING_DOCUMENTATION)
-
- template <typename... Args> auto operator()(Args&& ...);
- template <typename... Args> auto operator()(Args&& ...) const;
-
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
/// Forwarding function call operator.
template <typename... Args>
- typename result_of<T(Args...)>::type operator()(
- ASIO_MOVE_ARG(Args)... args)
+ result_of_t<T(Args...)> operator()(Args&&... args)
{
- return target_(ASIO_MOVE_CAST(Args)(args)...);
+ return target_(static_cast<Args&&>(args)...);
}
/// Forwarding function call operator.
template <typename... Args>
- typename result_of<T(Args...)>::type operator()(
- ASIO_MOVE_ARG(Args)... args) const
- {
- return target_(ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#elif defined(ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
- typename detail::cancellation_slot_binder_result_of0<T>::type operator()()
- {
- return target_();
- }
-
- typename detail::cancellation_slot_binder_result_of0<T>::type
- operator()() const
- {
- return target_();
- }
-
-#define ASIO_PRIVATE_BINDER_CALL_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- typename result_of<T(ASIO_VARIADIC_TARGS(n))>::type operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- typename result_of<T(ASIO_VARIADIC_TARGS(n))>::type operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- { \
- return target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_BINDER_CALL_DEF)
-#undef ASIO_PRIVATE_BINDER_CALL_DEF
-
-#else // defined(ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
- typedef typename detail::cancellation_slot_binder_result_type<
- T>::result_type_or_void result_type_or_void;
-
- result_type_or_void operator()()
+ result_of_t<T(Args...)> operator()(Args&&... args) const
{
- return target_();
+ return target_(static_cast<Args&&>(args)...);
}
- result_type_or_void operator()() const
- {
- return target_();
- }
-
-#define ASIO_PRIVATE_BINDER_CALL_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- result_type_or_void operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- result_type_or_void operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- { \
- return target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_BINDER_CALL_DEF)
-#undef ASIO_PRIVATE_BINDER_CALL_DEF
-
-#endif // defined(ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
private:
CancellationSlot slot_;
T target_;
@@ -458,12 +369,12 @@ private:
/// Associate an object of type @c T with a cancellation slot of type
/// @c CancellationSlot.
template <typename CancellationSlot, typename T>
-inline cancellation_slot_binder<typename decay<T>::type, CancellationSlot>
-bind_cancellation_slot(const CancellationSlot& s, ASIO_MOVE_ARG(T) t)
+ASIO_NODISCARD inline
+cancellation_slot_binder<decay_t<T>, CancellationSlot>
+bind_cancellation_slot(const CancellationSlot& s, T&& t)
{
- return cancellation_slot_binder<
- typename decay<T>::type, CancellationSlot>(
- s, ASIO_MOVE_CAST(T)(t));
+ return cancellation_slot_binder<decay_t<T>, CancellationSlot>(
+ s, static_cast<T&&>(t));
}
#if !defined(GENERATING_DOCUMENTATION)
@@ -471,21 +382,39 @@ bind_cancellation_slot(const CancellationSlot& s, ASIO_MOVE_ARG(T) t)
namespace detail {
template <typename TargetAsyncResult,
- typename CancellationSlot, typename = void>
-struct cancellation_slot_binder_async_result_completion_handler_type
+ typename CancellationSlot, typename = void>
+class cancellation_slot_binder_completion_handler_async_result
{
+public:
+ template <typename T>
+ explicit cancellation_slot_binder_completion_handler_async_result(T&)
+ {
+ }
};
template <typename TargetAsyncResult, typename CancellationSlot>
-struct cancellation_slot_binder_async_result_completion_handler_type<
- TargetAsyncResult, CancellationSlot,
- typename void_type<
- typename TargetAsyncResult::completion_handler_type
- >::type>
+class cancellation_slot_binder_completion_handler_async_result<
+ TargetAsyncResult, CancellationSlot,
+ void_t<typename TargetAsyncResult::completion_handler_type>>
{
+private:
+ TargetAsyncResult target_;
+
+public:
typedef cancellation_slot_binder<
typename TargetAsyncResult::completion_handler_type, CancellationSlot>
completion_handler_type;
+
+ explicit cancellation_slot_binder_completion_handler_async_result(
+ typename TargetAsyncResult::completion_handler_type& handler)
+ : target_(handler)
+ {
+ }
+
+ auto get() -> decltype(target_.get())
+ {
+ return target_.get();
+ }
};
template <typename TargetAsyncResult, typename = void>
@@ -495,10 +424,7 @@ struct cancellation_slot_binder_async_result_return_type
template <typename TargetAsyncResult>
struct cancellation_slot_binder_async_result_return_type<
- TargetAsyncResult,
- typename void_type<
- typename TargetAsyncResult::return_type
- >::type>
+ TargetAsyncResult, void_t<typename TargetAsyncResult::return_type>>
{
typedef typename TargetAsyncResult::return_type return_type;
};
@@ -507,178 +433,68 @@ struct cancellation_slot_binder_async_result_return_type<
template <typename T, typename CancellationSlot, typename Signature>
class async_result<cancellation_slot_binder<T, CancellationSlot>, Signature> :
- public detail::cancellation_slot_binder_async_result_completion_handler_type<
- async_result<T, Signature>, CancellationSlot>,
+ public detail::cancellation_slot_binder_completion_handler_async_result<
+ async_result<T, Signature>, CancellationSlot>,
public detail::cancellation_slot_binder_async_result_return_type<
- async_result<T, Signature> >
+ async_result<T, Signature>>
{
public:
explicit async_result(cancellation_slot_binder<T, CancellationSlot>& b)
- : target_(b.get())
+ : detail::cancellation_slot_binder_completion_handler_async_result<
+ async_result<T, Signature>, CancellationSlot>(b.get())
{
}
- typename async_result<T, Signature>::return_type get()
- {
- return target_.get();
- }
-
template <typename Initiation>
struct init_wrapper
{
template <typename Init>
- init_wrapper(const CancellationSlot& slot, ASIO_MOVE_ARG(Init) init)
+ init_wrapper(const CancellationSlot& slot, Init&& init)
: slot_(slot),
- initiation_(ASIO_MOVE_CAST(Init)(init))
+ initiation_(static_cast<Init&&>(init))
{
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Handler, typename... Args>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Args)... args)
+ void operator()(Handler&& handler, Args&&... args)
{
- ASIO_MOVE_CAST(Initiation)(initiation_)(
- cancellation_slot_binder<
- typename decay<Handler>::type, CancellationSlot>(
- slot_, ASIO_MOVE_CAST(Handler)(handler)),
- ASIO_MOVE_CAST(Args)(args)...);
+ static_cast<Initiation&&>(initiation_)(
+ cancellation_slot_binder<decay_t<Handler>, CancellationSlot>(
+ slot_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Args)... args) const
+ void operator()(Handler&& handler, Args&&... args) const
{
initiation_(
- cancellation_slot_binder<
- typename decay<Handler>::type, CancellationSlot>(
- slot_, ASIO_MOVE_CAST(Handler)(handler)),
- ASIO_MOVE_CAST(Args)(args)...);
+ cancellation_slot_binder<decay_t<Handler>, CancellationSlot>(
+ slot_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
}
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Handler>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler)
- {
- ASIO_MOVE_CAST(Initiation)(initiation_)(
- cancellation_slot_binder<
- typename decay<Handler>::type, CancellationSlot>(
- slot_, ASIO_MOVE_CAST(Handler)(handler)));
- }
-
- template <typename Handler>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler) const
- {
- initiation_(
- cancellation_slot_binder<
- typename decay<Handler>::type, CancellationSlot>(
- slot_, ASIO_MOVE_CAST(Handler)(handler)));
- }
-
-#define ASIO_PRIVATE_INIT_WRAPPER_DEF(n) \
- template <typename Handler, ASIO_VARIADIC_TPARAMS(n)> \
- void operator()( \
- ASIO_MOVE_ARG(Handler) handler, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- ASIO_MOVE_CAST(Initiation)(initiation_)( \
- cancellation_slot_binder< \
- typename decay<Handler>::type, CancellationSlot>( \
- slot_, ASIO_MOVE_CAST(Handler)(handler)), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <typename Handler, ASIO_VARIADIC_TPARAMS(n)> \
- void operator()( \
- ASIO_MOVE_ARG(Handler) handler, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- { \
- initiation_( \
- cancellation_slot_binder< \
- typename decay<Handler>::type, CancellationSlot>( \
- slot_, ASIO_MOVE_CAST(Handler)(handler)), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INIT_WRAPPER_DEF)
-#undef ASIO_PRIVATE_INIT_WRAPPER_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
CancellationSlot slot_;
Initiation initiation_;
};
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Initiation, typename RawCompletionToken, typename... Args>
- static ASIO_INITFN_DEDUCED_RESULT_TYPE(T, Signature,
- (async_result<T, Signature>::initiate(
- declval<init_wrapper<typename decay<Initiation>::type> >(),
- declval<T>(), declval<ASIO_MOVE_ARG(Args)>()...)))
- initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token,
- ASIO_MOVE_ARG(Args)... args)
- {
- return async_initiate<T, Signature>(
- init_wrapper<typename decay<Initiation>::type>(
- token.get_cancellation_slot(),
- ASIO_MOVE_CAST(Initiation)(initiation)),
- token.get(), ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Initiation, typename RawCompletionToken>
- static ASIO_INITFN_DEDUCED_RESULT_TYPE(T, Signature,
- (async_result<T, Signature>::initiate(
- declval<init_wrapper<typename decay<Initiation>::type> >(),
- declval<T>())))
- initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token)
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<T, Signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.get(), static_cast<Args&&>(args)...))
{
return async_initiate<T, Signature>(
- init_wrapper<typename decay<Initiation>::type>(
+ init_wrapper<decay_t<Initiation>>(
token.get_cancellation_slot(),
- ASIO_MOVE_CAST(Initiation)(initiation)),
- token.get());
+ static_cast<Initiation&&>(initiation)),
+ token.get(), static_cast<Args&&>(args)...);
}
-#define ASIO_PRIVATE_INITIATE_DEF(n) \
- template <typename Initiation, typename RawCompletionToken, \
- ASIO_VARIADIC_TPARAMS(n)> \
- static ASIO_INITFN_DEDUCED_RESULT_TYPE(T, Signature, \
- (async_result<T, Signature>::initiate( \
- declval<init_wrapper<typename decay<Initiation>::type> >(), \
- declval<T>(), ASIO_VARIADIC_MOVE_DECLVAL(n)))) \
- initiate( \
- ASIO_MOVE_ARG(Initiation) initiation, \
- ASIO_MOVE_ARG(RawCompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return async_initiate<T, Signature>( \
- init_wrapper<typename decay<Initiation>::type>( \
- token.get_cancellation_slot(), \
- ASIO_MOVE_CAST(Initiation)(initiation)), \
- token.get(), ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INITIATE_DEF)
-#undef ASIO_PRIVATE_INITIATE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
private:
- async_result(const async_result&) ASIO_DELETED;
- async_result& operator=(const async_result&) ASIO_DELETED;
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
async_result<T, Signature> target_;
};
@@ -688,11 +504,17 @@ template <template <typename, typename> class Associator,
struct associator<Associator,
cancellation_slot_binder<T, CancellationSlot>,
DefaultCandidate>
+ : Associator<T, DefaultCandidate>
{
- typedef typename Associator<T, DefaultCandidate>::type type;
+ static typename Associator<T, DefaultCandidate>::type get(
+ const cancellation_slot_binder<T, CancellationSlot>& b) noexcept
+ {
+ return Associator<T, DefaultCandidate>::get(b.get());
+ }
- static type get(const cancellation_slot_binder<T, CancellationSlot>& b,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ static auto get(const cancellation_slot_binder<T, CancellationSlot>& b,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<T, DefaultCandidate>::get(b.get(), c))
{
return Associator<T, DefaultCandidate>::get(b.get(), c);
}
@@ -705,8 +527,9 @@ struct associated_cancellation_slot<
{
typedef CancellationSlot type;
- static type get(const cancellation_slot_binder<T, CancellationSlot>& b,
- const CancellationSlot1& = CancellationSlot1()) ASIO_NOEXCEPT
+ static auto get(const cancellation_slot_binder<T, CancellationSlot>& b,
+ const CancellationSlot1& = CancellationSlot1()) noexcept
+ -> decltype(b.get_cancellation_slot())
{
return b.get_cancellation_slot();
}
diff --git a/3rdparty/asio/include/asio/bind_executor.hpp b/3rdparty/asio/include/asio/bind_executor.hpp
index 4da0b01e268..f117b4ce903 100644
--- a/3rdparty/asio/include/asio/bind_executor.hpp
+++ b/3rdparty/asio/include/asio/bind_executor.hpp
@@ -2,7 +2,7 @@
// bind_executor.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,7 +17,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/associated_executor.hpp"
#include "asio/associator.hpp"
#include "asio/async_result.hpp"
@@ -41,8 +40,7 @@ protected:
};
template <typename T>
-struct executor_binder_result_type<T,
- typename void_type<typename T::result_type>::type>
+struct executor_binder_result_type<T, void_t<typename T::result_type>>
{
typedef typename T::result_type result_type;
protected:
@@ -103,8 +101,7 @@ template <typename T, typename = void>
struct executor_binder_argument_type {};
template <typename T>
-struct executor_binder_argument_type<T,
- typename void_type<typename T::argument_type>::type>
+struct executor_binder_argument_type<T, void_t<typename T::argument_type>>
{
typedef typename T::argument_type argument_type;
};
@@ -129,7 +126,7 @@ struct executor_binder_argument_types {};
template <typename T>
struct executor_binder_argument_types<T,
- typename void_type<typename T::first_argument_type>::type>
+ void_t<typename T::first_argument_type>>
{
typedef typename T::first_argument_type first_argument_type;
typedef typename T::second_argument_type second_argument_type;
@@ -160,9 +157,9 @@ class executor_binder_base<T, Executor, true>
{
protected:
template <typename E, typename U>
- executor_binder_base(ASIO_MOVE_ARG(E) e, ASIO_MOVE_ARG(U) u)
- : executor_(ASIO_MOVE_CAST(E)(e)),
- target_(executor_arg_t(), executor_, ASIO_MOVE_CAST(U)(u))
+ executor_binder_base(E&& e, U&& u)
+ : executor_(static_cast<E&&>(e)),
+ target_(executor_arg_t(), executor_, static_cast<U&&>(u))
{
}
@@ -175,9 +172,9 @@ class executor_binder_base<T, Executor, false>
{
protected:
template <typename E, typename U>
- executor_binder_base(ASIO_MOVE_ARG(E) e, ASIO_MOVE_ARG(U) u)
- : executor_(ASIO_MOVE_CAST(E)(e)),
- target_(ASIO_MOVE_CAST(U)(u))
+ executor_binder_base(E&& e, U&& u)
+ : executor_(static_cast<E&&>(e)),
+ target_(static_cast<U&&>(u))
{
}
@@ -185,21 +182,6 @@ protected:
T target_;
};
-// Helper to enable SFINAE on zero-argument operator() below.
-
-template <typename T, typename = void>
-struct executor_binder_result_of0
-{
- typedef void type;
-};
-
-template <typename T>
-struct executor_binder_result_of0<T,
- typename void_type<typename result_of<T()>::type>::type>
-{
- typedef typename result_of<T()>::type type;
-};
-
} // namespace detail
/// A call wrapper type to bind an executor of type @c Executor to an object of
@@ -290,8 +272,8 @@ public:
*/
template <typename U>
executor_binder(executor_arg_t, const executor_type& e,
- ASIO_MOVE_ARG(U) u)
- : base_type(e, ASIO_MOVE_CAST(U)(u))
+ U&& u)
+ : base_type(e, static_cast<U&&>(u))
{
}
@@ -315,7 +297,9 @@ public:
* @c U.
*/
template <typename U, typename OtherExecutor>
- executor_binder(const executor_binder<U, OtherExecutor>& other)
+ executor_binder(const executor_binder<U, OtherExecutor>& other,
+ constraint_t<is_constructible<Executor, OtherExecutor>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
: base_type(other.get_executor(), other.get())
{
}
@@ -328,32 +312,33 @@ public:
*/
template <typename U, typename OtherExecutor>
executor_binder(executor_arg_t, const executor_type& e,
- const executor_binder<U, OtherExecutor>& other)
+ const executor_binder<U, OtherExecutor>& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
: base_type(e, other.get())
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
/// Move constructor.
executor_binder(executor_binder&& other)
- : base_type(ASIO_MOVE_CAST(executor_type)(other.get_executor()),
- ASIO_MOVE_CAST(T)(other.get()))
+ : base_type(static_cast<executor_type&&>(other.get_executor()),
+ static_cast<T&&>(other.get()))
{
}
/// Move construct the target object, but specify a different executor.
executor_binder(executor_arg_t, const executor_type& e,
executor_binder&& other)
- : base_type(e, ASIO_MOVE_CAST(T)(other.get()))
+ : base_type(e, static_cast<T&&>(other.get()))
{
}
/// Move construct from a different executor wrapper type.
template <typename U, typename OtherExecutor>
- executor_binder(executor_binder<U, OtherExecutor>&& other)
- : base_type(ASIO_MOVE_CAST(OtherExecutor)(other.get_executor()),
- ASIO_MOVE_CAST(U)(other.get()))
+ executor_binder(executor_binder<U, OtherExecutor>&& other,
+ constraint_t<is_constructible<Executor, OtherExecutor>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : base_type(static_cast<OtherExecutor&&>(other.get_executor()),
+ static_cast<U&&>(other.get()))
{
}
@@ -361,124 +346,49 @@ public:
/// different executor.
template <typename U, typename OtherExecutor>
executor_binder(executor_arg_t, const executor_type& e,
- executor_binder<U, OtherExecutor>&& other)
- : base_type(e, ASIO_MOVE_CAST(U)(other.get()))
+ executor_binder<U, OtherExecutor>&& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : base_type(e, static_cast<U&&>(other.get()))
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
/// Destructor.
~executor_binder()
{
}
/// Obtain a reference to the target object.
- target_type& get() ASIO_NOEXCEPT
+ target_type& get() noexcept
{
return this->target_;
}
/// Obtain a reference to the target object.
- const target_type& get() const ASIO_NOEXCEPT
+ const target_type& get() const noexcept
{
return this->target_;
}
/// Obtain the associated executor.
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return this->executor_;
}
-#if defined(GENERATING_DOCUMENTATION)
-
- template <typename... Args> auto operator()(Args&& ...);
- template <typename... Args> auto operator()(Args&& ...) const;
-
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
/// Forwarding function call operator.
template <typename... Args>
- typename result_of<T(Args...)>::type operator()(
- ASIO_MOVE_ARG(Args)... args)
+ result_of_t<T(Args...)> operator()(Args&&... args)
{
- return this->target_(ASIO_MOVE_CAST(Args)(args)...);
+ return this->target_(static_cast<Args&&>(args)...);
}
/// Forwarding function call operator.
template <typename... Args>
- typename result_of<T(Args...)>::type operator()(
- ASIO_MOVE_ARG(Args)... args) const
+ result_of_t<T(Args...)> operator()(Args&&... args) const
{
- return this->target_(ASIO_MOVE_CAST(Args)(args)...);
+ return this->target_(static_cast<Args&&>(args)...);
}
-#elif defined(ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
- typename detail::executor_binder_result_of0<T>::type operator()()
- {
- return this->target_();
- }
-
- typename detail::executor_binder_result_of0<T>::type operator()() const
- {
- return this->target_();
- }
-
-#define ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- typename result_of<T(ASIO_VARIADIC_TARGS(n))>::type operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return this->target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- typename result_of<T(ASIO_VARIADIC_TARGS(n))>::type operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- { \
- return this->target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF)
-#undef ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF
-
-#else // defined(ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
- typedef typename detail::executor_binder_result_type<T>::result_type_or_void
- result_type_or_void;
-
- result_type_or_void operator()()
- {
- return this->target_();
- }
-
- result_type_or_void operator()() const
- {
- return this->target_();
- }
-
-#define ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- result_type_or_void operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return this->target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- result_type_or_void operator()( \
- ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- { \
- return this->target_(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF)
-#undef ASIO_PRIVATE_BIND_EXECUTOR_CALL_DEF
-
-#endif // defined(ASIO_HAS_STD_TYPE_TRAITS) && !defined(_MSC_VER)
-
private:
typedef detail::executor_binder_base<T, Executor,
uses_executor<T, Executor>::value> base_type;
@@ -486,27 +396,27 @@ private:
/// Associate an object of type @c T with an executor of type @c Executor.
template <typename Executor, typename T>
-inline executor_binder<typename decay<T>::type, Executor>
-bind_executor(const Executor& ex, ASIO_MOVE_ARG(T) t,
- typename constraint<
+ASIO_NODISCARD inline executor_binder<decay_t<T>, Executor>
+bind_executor(const Executor& ex, T&& t,
+ constraint_t<
is_executor<Executor>::value || execution::is_executor<Executor>::value
- >::type = 0)
+ > = 0)
{
- return executor_binder<typename decay<T>::type, Executor>(
- executor_arg_t(), ex, ASIO_MOVE_CAST(T)(t));
+ return executor_binder<decay_t<T>, Executor>(
+ executor_arg_t(), ex, static_cast<T&&>(t));
}
/// Associate an object of type @c T with an execution context's executor.
template <typename ExecutionContext, typename T>
-inline executor_binder<typename decay<T>::type,
- typename ExecutionContext::executor_type>
-bind_executor(ExecutionContext& ctx, ASIO_MOVE_ARG(T) t,
- typename constraint<is_convertible<
- ExecutionContext&, execution_context&>::value>::type = 0)
+ASIO_NODISCARD inline executor_binder<decay_t<T>,
+ typename ExecutionContext::executor_type>
+bind_executor(ExecutionContext& ctx, T&& t,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
{
- return executor_binder<typename decay<T>::type,
- typename ExecutionContext::executor_type>(
- executor_arg_t(), ctx.get_executor(), ASIO_MOVE_CAST(T)(t));
+ return executor_binder<decay_t<T>, typename ExecutionContext::executor_type>(
+ executor_arg_t(), ctx.get_executor(), static_cast<T&&>(t));
}
#if !defined(GENERATING_DOCUMENTATION)
@@ -518,20 +428,38 @@ struct uses_executor<executor_binder<T, Executor>, Executor>
namespace detail {
template <typename TargetAsyncResult, typename Executor, typename = void>
-struct executor_binder_async_result_completion_handler_type
+class executor_binder_completion_handler_async_result
{
+public:
+ template <typename T>
+ explicit executor_binder_completion_handler_async_result(T&)
+ {
+ }
};
template <typename TargetAsyncResult, typename Executor>
-struct executor_binder_async_result_completion_handler_type<
- TargetAsyncResult, Executor,
- typename void_type<
- typename TargetAsyncResult::completion_handler_type
- >::type>
+class executor_binder_completion_handler_async_result<
+ TargetAsyncResult, Executor,
+ void_t<typename TargetAsyncResult::completion_handler_type >>
{
+private:
+ TargetAsyncResult target_;
+
+public:
typedef executor_binder<
typename TargetAsyncResult::completion_handler_type, Executor>
completion_handler_type;
+
+ explicit executor_binder_completion_handler_async_result(
+ typename TargetAsyncResult::completion_handler_type& handler)
+ : target_(handler)
+ {
+ }
+
+ auto get() -> decltype(target_.get())
+ {
+ return target_.get();
+ }
};
template <typename TargetAsyncResult, typename = void>
@@ -540,11 +468,8 @@ struct executor_binder_async_result_return_type
};
template <typename TargetAsyncResult>
-struct executor_binder_async_result_return_type<
- TargetAsyncResult,
- typename void_type<
- typename TargetAsyncResult::return_type
- >::type>
+struct executor_binder_async_result_return_type<TargetAsyncResult,
+ void_t<typename TargetAsyncResult::return_type>>
{
typedef typename TargetAsyncResult::return_type return_type;
};
@@ -553,181 +478,83 @@ struct executor_binder_async_result_return_type<
template <typename T, typename Executor, typename Signature>
class async_result<executor_binder<T, Executor>, Signature> :
- public detail::executor_binder_async_result_completion_handler_type<
- async_result<T, Signature>, Executor>,
+ public detail::executor_binder_completion_handler_async_result<
+ async_result<T, Signature>, Executor>,
public detail::executor_binder_async_result_return_type<
- async_result<T, Signature> >
+ async_result<T, Signature>>
{
public:
explicit async_result(executor_binder<T, Executor>& b)
- : target_(b.get())
+ : detail::executor_binder_completion_handler_async_result<
+ async_result<T, Signature>, Executor>(b.get())
{
}
- typename async_result<T, Signature>::return_type get()
- {
- return target_.get();
- }
-
template <typename Initiation>
struct init_wrapper
{
template <typename Init>
- init_wrapper(const Executor& ex, ASIO_MOVE_ARG(Init) init)
+ init_wrapper(const Executor& ex, Init&& init)
: ex_(ex),
- initiation_(ASIO_MOVE_CAST(Init)(init))
+ initiation_(static_cast<Init&&>(init))
{
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Handler, typename... Args>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Args)... args)
+ void operator()(Handler&& handler, Args&&... args)
{
- ASIO_MOVE_CAST(Initiation)(initiation_)(
- executor_binder<typename decay<Handler>::type, Executor>(
- executor_arg_t(), ex_, ASIO_MOVE_CAST(Handler)(handler)),
- ASIO_MOVE_CAST(Args)(args)...);
+ static_cast<Initiation&&>(initiation_)(
+ executor_binder<decay_t<Handler>, Executor>(
+ executor_arg_t(), ex_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
}
template <typename Handler, typename... Args>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Args)... args) const
+ void operator()(Handler&& handler, Args&&... args) const
{
initiation_(
- executor_binder<typename decay<Handler>::type, Executor>(
- executor_arg_t(), ex_, ASIO_MOVE_CAST(Handler)(handler)),
- ASIO_MOVE_CAST(Args)(args)...);
+ executor_binder<decay_t<Handler>, Executor>(
+ executor_arg_t(), ex_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
}
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Handler>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler)
- {
- ASIO_MOVE_CAST(Initiation)(initiation_)(
- executor_binder<typename decay<Handler>::type, Executor>(
- executor_arg_t(), ex_, ASIO_MOVE_CAST(Handler)(handler)));
- }
-
- template <typename Handler>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler) const
- {
- initiation_(
- executor_binder<typename decay<Handler>::type, Executor>(
- executor_arg_t(), ex_, ASIO_MOVE_CAST(Handler)(handler)));
- }
-
-#define ASIO_PRIVATE_INIT_WRAPPER_DEF(n) \
- template <typename Handler, ASIO_VARIADIC_TPARAMS(n)> \
- void operator()( \
- ASIO_MOVE_ARG(Handler) handler, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- ASIO_MOVE_CAST(Initiation)(initiation_)( \
- executor_binder<typename decay<Handler>::type, Executor>( \
- executor_arg_t(), ex_, ASIO_MOVE_CAST(Handler)(handler)), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <typename Handler, ASIO_VARIADIC_TPARAMS(n)> \
- void operator()( \
- ASIO_MOVE_ARG(Handler) handler, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- { \
- initiation_( \
- executor_binder<typename decay<Handler>::type, Executor>( \
- executor_arg_t(), ex_, ASIO_MOVE_CAST(Handler)(handler)), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INIT_WRAPPER_DEF)
-#undef ASIO_PRIVATE_INIT_WRAPPER_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
Executor ex_;
Initiation initiation_;
};
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Initiation, typename RawCompletionToken, typename... Args>
- static ASIO_INITFN_DEDUCED_RESULT_TYPE(T, Signature,
- (async_result<T, Signature>::initiate(
- declval<init_wrapper<typename decay<Initiation>::type> >(),
- declval<T>(), declval<ASIO_MOVE_ARG(Args)>()...)))
- initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token,
- ASIO_MOVE_ARG(Args)... args)
- {
- return async_initiate<T, Signature>(
- init_wrapper<typename decay<Initiation>::type>(
- token.get_executor(), ASIO_MOVE_CAST(Initiation)(initiation)),
- token.get(), ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Initiation, typename RawCompletionToken>
- static ASIO_INITFN_DEDUCED_RESULT_TYPE(T, Signature,
- (async_result<T, Signature>::initiate(
- declval<init_wrapper<typename decay<Initiation>::type> >(),
- declval<T>())))
- initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token)
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<T, Signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.get(), static_cast<Args&&>(args)...))
{
return async_initiate<T, Signature>(
- init_wrapper<typename decay<Initiation>::type>(
- token.get_executor(), ASIO_MOVE_CAST(Initiation)(initiation)),
- token.get());
+ init_wrapper<decay_t<Initiation>>(
+ token.get_executor(), static_cast<Initiation&&>(initiation)),
+ token.get(), static_cast<Args&&>(args)...);
}
-#define ASIO_PRIVATE_INITIATE_DEF(n) \
- template <typename Initiation, typename RawCompletionToken, \
- ASIO_VARIADIC_TPARAMS(n)> \
- static ASIO_INITFN_DEDUCED_RESULT_TYPE(T, Signature, \
- (async_result<T, Signature>::initiate( \
- declval<init_wrapper<typename decay<Initiation>::type> >(), \
- declval<T>(), ASIO_VARIADIC_MOVE_DECLVAL(n)))) \
- initiate( \
- ASIO_MOVE_ARG(Initiation) initiation, \
- ASIO_MOVE_ARG(RawCompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return async_initiate<T, Signature>( \
- init_wrapper<typename decay<Initiation>::type>( \
- token.get_executor(), ASIO_MOVE_CAST(Initiation)(initiation)), \
- token.get(), ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INITIATE_DEF)
-#undef ASIO_PRIVATE_INITIATE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
private:
- async_result(const async_result&) ASIO_DELETED;
- async_result& operator=(const async_result&) ASIO_DELETED;
-
- async_result<T, Signature> target_;
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
};
template <template <typename, typename> class Associator,
typename T, typename Executor, typename DefaultCandidate>
struct associator<Associator, executor_binder<T, Executor>, DefaultCandidate>
+ : Associator<T, DefaultCandidate>
{
- typedef typename Associator<T, DefaultCandidate>::type type;
+ static typename Associator<T, DefaultCandidate>::type get(
+ const executor_binder<T, Executor>& b) noexcept
+ {
+ return Associator<T, DefaultCandidate>::get(b.get());
+ }
- static type get(const executor_binder<T, Executor>& b,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ static auto get(const executor_binder<T, Executor>& b,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<T, DefaultCandidate>::get(b.get(), c))
{
return Associator<T, DefaultCandidate>::get(b.get(), c);
}
@@ -738,8 +565,9 @@ struct associated_executor<executor_binder<T, Executor>, Executor1>
{
typedef Executor type;
- static type get(const executor_binder<T, Executor>& b,
- const Executor1& = Executor1()) ASIO_NOEXCEPT
+ static auto get(const executor_binder<T, Executor>& b,
+ const Executor1& = Executor1()) noexcept
+ -> decltype(b.get_executor())
{
return b.get_executor();
}
diff --git a/3rdparty/asio/include/asio/bind_immediate_executor.hpp b/3rdparty/asio/include/asio/bind_immediate_executor.hpp
new file mode 100644
index 00000000000..b02c520a689
--- /dev/null
+++ b/3rdparty/asio/include/asio/bind_immediate_executor.hpp
@@ -0,0 +1,549 @@
+//
+// bind_immediate_executor.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 ASIO_BIND_IMMEDIATE_EXECUTOR_HPP
+#define ASIO_BIND_IMMEDIATE_EXECUTOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/associated_immediate_executor.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Helper to automatically define nested typedef result_type.
+
+template <typename T, typename = void>
+struct immediate_executor_binder_result_type
+{
+protected:
+ typedef void result_type_or_void;
+};
+
+template <typename T>
+struct immediate_executor_binder_result_type<T, void_t<typename T::result_type>>
+{
+ typedef typename T::result_type result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct immediate_executor_binder_result_type<R(*)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R>
+struct immediate_executor_binder_result_type<R(&)()>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct immediate_executor_binder_result_type<R(*)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1>
+struct immediate_executor_binder_result_type<R(&)(A1)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct immediate_executor_binder_result_type<R(*)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+template <typename R, typename A1, typename A2>
+struct immediate_executor_binder_result_type<R(&)(A1, A2)>
+{
+ typedef R result_type;
+protected:
+ typedef result_type result_type_or_void;
+};
+
+// Helper to automatically define nested typedef argument_type.
+
+template <typename T, typename = void>
+struct immediate_executor_binder_argument_type {};
+
+template <typename T>
+struct immediate_executor_binder_argument_type<T,
+ void_t<typename T::argument_type>>
+{
+ typedef typename T::argument_type argument_type;
+};
+
+template <typename R, typename A1>
+struct immediate_executor_binder_argument_type<R(*)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+template <typename R, typename A1>
+struct immediate_executor_binder_argument_type<R(&)(A1)>
+{
+ typedef A1 argument_type;
+};
+
+// Helper to automatically define nested typedefs first_argument_type and
+// second_argument_type.
+
+template <typename T, typename = void>
+struct immediate_executor_binder_argument_types {};
+
+template <typename T>
+struct immediate_executor_binder_argument_types<T,
+ void_t<typename T::first_argument_type>>
+{
+ typedef typename T::first_argument_type first_argument_type;
+ typedef typename T::second_argument_type second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct immediate_executor_binder_argument_type<R(*)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+template <typename R, typename A1, typename A2>
+struct immediate_executor_binder_argument_type<R(&)(A1, A2)>
+{
+ typedef A1 first_argument_type;
+ typedef A2 second_argument_type;
+};
+
+} // namespace detail
+
+/// A call wrapper type to bind a immediate executor of type @c Executor
+/// to an object of type @c T.
+template <typename T, typename Executor>
+class immediate_executor_binder
+#if !defined(GENERATING_DOCUMENTATION)
+ : public detail::immediate_executor_binder_result_type<T>,
+ public detail::immediate_executor_binder_argument_type<T>,
+ public detail::immediate_executor_binder_argument_types<T>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+public:
+ /// The type of the target object.
+ typedef T target_type;
+
+ /// The type of the associated immediate executor.
+ typedef Executor immediate_executor_type;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// The return type if a function.
+ /**
+ * The type of @c result_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to function type, @c result_type is a synonym for
+ * the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c result_type, then @c
+ * result_type is a synonym for @c T::result_type;
+ *
+ * @li otherwise @c result_type is not defined.
+ */
+ typedef see_below result_type;
+
+ /// The type of the function's argument.
+ /**
+ * The type of @c argument_type is based on the type @c T of the wrapper's
+ * target object:
+ *
+ * @li if @c T is a pointer to a function type accepting a single argument,
+ * @c argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c argument_type, then @c
+ * argument_type is a synonym for @c T::argument_type;
+ *
+ * @li otherwise @c argument_type is not defined.
+ */
+ typedef see_below argument_type;
+
+ /// The type of the function's first argument.
+ /**
+ * The type of @c first_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * first_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c first_argument_type is a synonym for @c T::first_argument_type;
+ *
+ * @li otherwise @c first_argument_type is not defined.
+ */
+ typedef see_below first_argument_type;
+
+ /// The type of the function's second argument.
+ /**
+ * The type of @c second_argument_type is based on the type @c T of the
+ * wrapper's target object:
+ *
+ * @li if @c T is a pointer to a function type accepting two arguments, @c
+ * second_argument_type is a synonym for the return type of @c T;
+ *
+ * @li if @c T is a class type with a member type @c first_argument_type,
+ * then @c second_argument_type is a synonym for @c T::second_argument_type;
+ *
+ * @li otherwise @c second_argument_type is not defined.
+ */
+ typedef see_below second_argument_type;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Construct a immediate executor wrapper for the specified object.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U>
+ immediate_executor_binder(const immediate_executor_type& e,
+ U&& u)
+ : executor_(e),
+ target_(static_cast<U&&>(u))
+ {
+ }
+
+ /// Copy constructor.
+ immediate_executor_binder(const immediate_executor_binder& other)
+ : executor_(other.get_immediate_executor()),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy, but specify a different immediate executor.
+ immediate_executor_binder(const immediate_executor_type& e,
+ const immediate_executor_binder& other)
+ : executor_(e),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy of a different immediate executor wrapper type.
+ /**
+ * This constructor is only valid if the @c Executor type is
+ * constructible from type @c OtherExecutor, and the type @c T is
+ * constructible from type @c U.
+ */
+ template <typename U, typename OtherExecutor>
+ immediate_executor_binder(
+ const immediate_executor_binder<U, OtherExecutor>& other,
+ constraint_t<is_constructible<Executor, OtherExecutor>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : executor_(other.get_immediate_executor()),
+ target_(other.get())
+ {
+ }
+
+ /// Construct a copy of a different immediate executor wrapper type, but
+ /// specify a different immediate executor.
+ /**
+ * This constructor is only valid if the type @c T is constructible from type
+ * @c U.
+ */
+ template <typename U, typename OtherExecutor>
+ immediate_executor_binder(const immediate_executor_type& e,
+ const immediate_executor_binder<U, OtherExecutor>& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : executor_(e),
+ target_(other.get())
+ {
+ }
+
+ /// Move constructor.
+ immediate_executor_binder(immediate_executor_binder&& other)
+ : executor_(static_cast<immediate_executor_type&&>(
+ other.get_immediate_executor())),
+ target_(static_cast<T&&>(other.get()))
+ {
+ }
+
+ /// Move construct the target object, but specify a different immediate
+ /// executor.
+ immediate_executor_binder(const immediate_executor_type& e,
+ immediate_executor_binder&& other)
+ : executor_(e),
+ target_(static_cast<T&&>(other.get()))
+ {
+ }
+
+ /// Move construct from a different immediate executor wrapper type.
+ template <typename U, typename OtherExecutor>
+ immediate_executor_binder(
+ immediate_executor_binder<U, OtherExecutor>&& other,
+ constraint_t<is_constructible<Executor, OtherExecutor>::value> = 0,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : executor_(static_cast<OtherExecutor&&>(
+ other.get_immediate_executor())),
+ target_(static_cast<U&&>(other.get()))
+ {
+ }
+
+ /// Move construct from a different immediate executor wrapper type, but
+ /// specify a different immediate executor.
+ template <typename U, typename OtherExecutor>
+ immediate_executor_binder(const immediate_executor_type& e,
+ immediate_executor_binder<U, OtherExecutor>&& other,
+ constraint_t<is_constructible<T, U>::value> = 0)
+ : executor_(e),
+ target_(static_cast<U&&>(other.get()))
+ {
+ }
+
+ /// Destructor.
+ ~immediate_executor_binder()
+ {
+ }
+
+ /// Obtain a reference to the target object.
+ target_type& get() noexcept
+ {
+ return target_;
+ }
+
+ /// Obtain a reference to the target object.
+ const target_type& get() const noexcept
+ {
+ return target_;
+ }
+
+ /// Obtain the associated immediate executor.
+ immediate_executor_type get_immediate_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ result_of_t<T(Args...)> operator()(Args&&... args)
+ {
+ return target_(static_cast<Args&&>(args)...);
+ }
+
+ /// Forwarding function call operator.
+ template <typename... Args>
+ result_of_t<T(Args...)> operator()(Args&&... args) const
+ {
+ return target_(static_cast<Args&&>(args)...);
+ }
+
+private:
+ Executor executor_;
+ T target_;
+};
+
+/// Associate an object of type @c T with a immediate executor of type
+/// @c Executor.
+template <typename Executor, typename T>
+ASIO_NODISCARD inline immediate_executor_binder<decay_t<T>, Executor>
+bind_immediate_executor(const Executor& e, T&& t)
+{
+ return immediate_executor_binder<
+ decay_t<T>, Executor>(
+ e, static_cast<T&&>(t));
+}
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+namespace detail {
+
+template <typename TargetAsyncResult, typename Executor, typename = void>
+class immediate_executor_binder_completion_handler_async_result
+{
+public:
+ template <typename T>
+ explicit immediate_executor_binder_completion_handler_async_result(T&)
+ {
+ }
+};
+
+template <typename TargetAsyncResult, typename Executor>
+class immediate_executor_binder_completion_handler_async_result<
+ TargetAsyncResult, Executor,
+ void_t<
+ typename TargetAsyncResult::completion_handler_type
+ >>
+{
+private:
+ TargetAsyncResult target_;
+
+public:
+ typedef immediate_executor_binder<
+ typename TargetAsyncResult::completion_handler_type, Executor>
+ completion_handler_type;
+
+ explicit immediate_executor_binder_completion_handler_async_result(
+ typename TargetAsyncResult::completion_handler_type& handler)
+ : target_(handler)
+ {
+ }
+
+ auto get() -> decltype(target_.get())
+ {
+ return target_.get();
+ }
+};
+
+template <typename TargetAsyncResult, typename = void>
+struct immediate_executor_binder_async_result_return_type
+{
+};
+
+template <typename TargetAsyncResult>
+struct immediate_executor_binder_async_result_return_type<
+ TargetAsyncResult,
+ void_t<
+ typename TargetAsyncResult::return_type
+ >>
+{
+ typedef typename TargetAsyncResult::return_type return_type;
+};
+
+} // namespace detail
+
+template <typename T, typename Executor, typename Signature>
+class async_result<immediate_executor_binder<T, Executor>, Signature> :
+ public detail::immediate_executor_binder_completion_handler_async_result<
+ async_result<T, Signature>, Executor>,
+ public detail::immediate_executor_binder_async_result_return_type<
+ async_result<T, Signature>>
+{
+public:
+ explicit async_result(immediate_executor_binder<T, Executor>& b)
+ : detail::immediate_executor_binder_completion_handler_async_result<
+ async_result<T, Signature>, Executor>(b.get())
+ {
+ }
+
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ 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, Args&&... args)
+ {
+ static_cast<Initiation&&>(initiation_)(
+ immediate_executor_binder<
+ decay_t<Handler>, Executor>(
+ executor_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args) const
+ {
+ initiation_(
+ immediate_executor_binder<
+ decay_t<Handler>, Executor>(
+ 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<T, Signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.get(), static_cast<Args&&>(args)...))
+ {
+ return async_initiate<T, Signature>(
+ init_wrapper<decay_t<Initiation>>(
+ token.get_immediate_executor(),
+ static_cast<Initiation&&>(initiation)),
+ token.get(), static_cast<Args&&>(args)...);
+ }
+
+private:
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
+
+ async_result<T, Signature> target_;
+};
+
+template <template <typename, typename> class Associator,
+ typename T, typename Executor, typename DefaultCandidate>
+struct associator<Associator,
+ immediate_executor_binder<T, Executor>,
+ DefaultCandidate>
+ : Associator<T, DefaultCandidate>
+{
+ static typename Associator<T, DefaultCandidate>::type get(
+ const immediate_executor_binder<T, Executor>& b) noexcept
+ {
+ return Associator<T, DefaultCandidate>::get(b.get());
+ }
+
+ static auto get(const immediate_executor_binder<T, Executor>& b,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<T, DefaultCandidate>::get(b.get(), c))
+ {
+ return Associator<T, DefaultCandidate>::get(b.get(), c);
+ }
+};
+
+template <typename T, typename Executor, typename Executor1>
+struct associated_immediate_executor<
+ immediate_executor_binder<T, Executor>,
+ Executor1>
+{
+ typedef Executor type;
+
+ static auto get(const immediate_executor_binder<T, Executor>& b,
+ const Executor1& = Executor1()) noexcept
+ -> decltype(b.get_immediate_executor())
+ {
+ return b.get_immediate_executor();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_BIND_IMMEDIATE_EXECUTOR_HPP
diff --git a/3rdparty/asio/include/asio/buffer.hpp b/3rdparty/asio/include/asio/buffer.hpp
index 32848dc7850..ad49f290a66 100644
--- a/3rdparty/asio/include/asio/buffer.hpp
+++ b/3rdparty/asio/include/asio/buffer.hpp
@@ -2,7 +2,7 @@
// buffer.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -27,6 +27,7 @@
#include "asio/detail/string_view.hpp"
#include "asio/detail/throw_exception.hpp"
#include "asio/detail/type_traits.hpp"
+#include "asio/is_contiguous_iterator.hpp"
#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1700)
# if defined(_HAS_ITERATOR_DEBUGGING) && (_HAS_ITERATOR_DEBUGGING != 0)
@@ -48,21 +49,6 @@
# include "asio/detail/functional.hpp"
#endif // ASIO_ENABLE_BUFFER_DEBUGGING
-#if defined(ASIO_HAS_BOOST_WORKAROUND)
-# include <boost/detail/workaround.hpp>
-# if !defined(__clang__)
-# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
-# define ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND
-# endif // BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
-# elif BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
-# define ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND
-# endif // BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
-#endif // defined(ASIO_HAS_BOOST_WORKAROUND)
-
-#if defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-# include "asio/detail/type_traits.hpp"
-#endif // defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -93,14 +79,14 @@ class mutable_buffer
{
public:
/// Construct an empty buffer.
- mutable_buffer() ASIO_NOEXCEPT
+ mutable_buffer() noexcept
: data_(0),
size_(0)
{
}
/// Construct a buffer to represent a given memory range.
- mutable_buffer(void* data, std::size_t size) ASIO_NOEXCEPT
+ mutable_buffer(void* data, std::size_t size) noexcept
: data_(data),
size_(size)
{
@@ -122,7 +108,7 @@ public:
#endif // ASIO_ENABLE_BUFFER_DEBUGGING
/// Get a pointer to the beginning of the memory range.
- void* data() const ASIO_NOEXCEPT
+ void* data() const noexcept
{
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
if (size_ && debug_check_)
@@ -132,13 +118,13 @@ public:
}
/// Get the size of the memory range.
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
return size_;
}
/// Move the start of the buffer by the specified number of bytes.
- mutable_buffer& operator+=(std::size_t n) ASIO_NOEXCEPT
+ mutable_buffer& operator+=(std::size_t n) noexcept
{
std::size_t offset = n < size_ ? n : size_;
data_ = static_cast<char*>(data_) + offset;
@@ -170,7 +156,7 @@ public:
typedef const mutable_buffer* const_iterator;
/// Construct to represent a given memory range.
- mutable_buffers_1(void* data, std::size_t size) ASIO_NOEXCEPT
+ mutable_buffers_1(void* data, std::size_t size) noexcept
: mutable_buffer(data, size)
{
}
@@ -184,19 +170,19 @@ public:
#endif // ASIO_ENABLE_BUFFER_DEBUGGING
/// Construct to represent a single modifiable buffer.
- explicit mutable_buffers_1(const mutable_buffer& b) ASIO_NOEXCEPT
+ explicit mutable_buffers_1(const mutable_buffer& b) noexcept
: mutable_buffer(b)
{
}
/// Get a random-access iterator to the first element.
- const_iterator begin() const ASIO_NOEXCEPT
+ const_iterator begin() const noexcept
{
return this;
}
/// Get a random-access iterator for one past the last element.
- const_iterator end() const ASIO_NOEXCEPT
+ const_iterator end() const noexcept
{
return begin() + 1;
}
@@ -227,21 +213,21 @@ class const_buffer
{
public:
/// Construct an empty buffer.
- const_buffer() ASIO_NOEXCEPT
+ const_buffer() noexcept
: data_(0),
size_(0)
{
}
/// Construct a buffer to represent a given memory range.
- const_buffer(const void* data, std::size_t size) ASIO_NOEXCEPT
+ const_buffer(const void* data, std::size_t size) noexcept
: data_(data),
size_(size)
{
}
/// Construct a non-modifiable buffer from a modifiable one.
- const_buffer(const mutable_buffer& b) ASIO_NOEXCEPT
+ const_buffer(const mutable_buffer& b) noexcept
: data_(b.data()),
size_(b.size())
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
@@ -266,7 +252,7 @@ public:
#endif // ASIO_ENABLE_BUFFER_DEBUGGING
/// Get a pointer to the beginning of the memory range.
- const void* data() const ASIO_NOEXCEPT
+ const void* data() const noexcept
{
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
if (size_ && debug_check_)
@@ -276,13 +262,13 @@ public:
}
/// Get the size of the memory range.
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
return size_;
}
/// Move the start of the buffer by the specified number of bytes.
- const_buffer& operator+=(std::size_t n) ASIO_NOEXCEPT
+ const_buffer& operator+=(std::size_t n) noexcept
{
std::size_t offset = n < size_ ? n : size_;
data_ = static_cast<const char*>(data_) + offset;
@@ -314,7 +300,7 @@ public:
typedef const const_buffer* const_iterator;
/// Construct to represent a given memory range.
- const_buffers_1(const void* data, std::size_t size) ASIO_NOEXCEPT
+ const_buffers_1(const void* data, std::size_t size) noexcept
: const_buffer(data, size)
{
}
@@ -328,19 +314,19 @@ public:
#endif // ASIO_ENABLE_BUFFER_DEBUGGING
/// Construct to represent a single non-modifiable buffer.
- explicit const_buffers_1(const const_buffer& b) ASIO_NOEXCEPT
+ explicit const_buffers_1(const const_buffer& b) noexcept
: const_buffer(b)
{
}
/// Get a random-access iterator to the first element.
- const_iterator begin() const ASIO_NOEXCEPT
+ const_iterator begin() const noexcept
{
return this;
}
/// Get a random-access iterator for one past the last element.
- const_iterator end() const ASIO_NOEXCEPT
+ const_iterator end() const noexcept
{
return begin() + 1;
}
@@ -361,13 +347,13 @@ public:
typedef const mutable_buffer* const_iterator;
/// Get a random-access iterator to the first element.
- const_iterator begin() const ASIO_NOEXCEPT
+ const_iterator begin() const noexcept
{
return &buf_;
}
/// Get a random-access iterator for one past the last element.
- const_iterator end() const ASIO_NOEXCEPT
+ const_iterator end() const noexcept
{
return &buf_;
}
@@ -386,9 +372,9 @@ private:
/// Get an iterator to the first element in a buffer sequence.
template <typename MutableBuffer>
inline const mutable_buffer* buffer_sequence_begin(const MutableBuffer& b,
- typename constraint<
+ constraint_t<
is_convertible<const MutableBuffer*, const mutable_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT
+ > = 0) noexcept
{
return static_cast<const mutable_buffer*>(detail::addressof(b));
}
@@ -396,22 +382,20 @@ inline const mutable_buffer* buffer_sequence_begin(const MutableBuffer& b,
/// Get an iterator to the first element in a buffer sequence.
template <typename ConstBuffer>
inline const const_buffer* buffer_sequence_begin(const ConstBuffer& b,
- typename constraint<
+ constraint_t<
is_convertible<const ConstBuffer*, const const_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT
+ > = 0) noexcept
{
return static_cast<const const_buffer*>(detail::addressof(b));
}
-#if defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
/// Get an iterator to the first element in a buffer sequence.
template <typename C>
inline auto buffer_sequence_begin(C& c,
- typename constraint<
+ constraint_t<
!is_convertible<const C*, const mutable_buffer*>::value
&& !is_convertible<const C*, const const_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT -> decltype(c.begin())
+ > = 0) noexcept -> decltype(c.begin())
{
return c.begin();
}
@@ -419,38 +403,14 @@ inline auto buffer_sequence_begin(C& c,
/// Get an iterator to the first element in a buffer sequence.
template <typename C>
inline auto buffer_sequence_begin(const C& c,
- typename constraint<
- !is_convertible<const C*, const mutable_buffer*>::value
- && !is_convertible<const C*, const const_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT -> decltype(c.begin())
-{
- return c.begin();
-}
-
-#else // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
-template <typename C>
-inline typename C::iterator buffer_sequence_begin(C& c,
- typename constraint<
- !is_convertible<const C*, const mutable_buffer*>::value
- && !is_convertible<const C*, const const_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT
-{
- return c.begin();
-}
-
-template <typename C>
-inline typename C::const_iterator buffer_sequence_begin(const C& c,
- typename constraint<
+ constraint_t<
!is_convertible<const C*, const mutable_buffer*>::value
&& !is_convertible<const C*, const const_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT
+ > = 0) noexcept -> decltype(c.begin())
{
return c.begin();
}
-#endif // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
/*@}*/
/** @defgroup buffer_sequence_end asio::buffer_sequence_end
@@ -463,9 +423,9 @@ inline typename C::const_iterator buffer_sequence_begin(const C& c,
/// Get an iterator to one past the end element in a buffer sequence.
template <typename MutableBuffer>
inline const mutable_buffer* buffer_sequence_end(const MutableBuffer& b,
- typename constraint<
+ constraint_t<
is_convertible<const MutableBuffer*, const mutable_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT
+ > = 0) noexcept
{
return static_cast<const mutable_buffer*>(detail::addressof(b)) + 1;
}
@@ -473,22 +433,20 @@ inline const mutable_buffer* buffer_sequence_end(const MutableBuffer& b,
/// Get an iterator to one past the end element in a buffer sequence.
template <typename ConstBuffer>
inline const const_buffer* buffer_sequence_end(const ConstBuffer& b,
- typename constraint<
+ constraint_t<
is_convertible<const ConstBuffer*, const const_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT
+ > = 0) noexcept
{
return static_cast<const const_buffer*>(detail::addressof(b)) + 1;
}
-#if defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
/// Get an iterator to one past the end element in a buffer sequence.
template <typename C>
inline auto buffer_sequence_end(C& c,
- typename constraint<
+ constraint_t<
!is_convertible<const C*, const mutable_buffer*>::value
&& !is_convertible<const C*, const const_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT -> decltype(c.end())
+ > = 0) noexcept -> decltype(c.end())
{
return c.end();
}
@@ -496,38 +454,14 @@ inline auto buffer_sequence_end(C& c,
/// Get an iterator to one past the end element in a buffer sequence.
template <typename C>
inline auto buffer_sequence_end(const C& c,
- typename constraint<
- !is_convertible<const C*, const mutable_buffer*>::value
- && !is_convertible<const C*, const const_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT -> decltype(c.end())
-{
- return c.end();
-}
-
-#else // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
-template <typename C>
-inline typename C::iterator buffer_sequence_end(C& c,
- typename constraint<
- !is_convertible<const C*, const mutable_buffer*>::value
- && !is_convertible<const C*, const const_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT
-{
- return c.end();
-}
-
-template <typename C>
-inline typename C::const_iterator buffer_sequence_end(const C& c,
- typename constraint<
+ constraint_t<
!is_convertible<const C*, const mutable_buffer*>::value
&& !is_convertible<const C*, const const_buffer*>::value
- >::type = 0) ASIO_NOEXCEPT
+ > = 0) noexcept -> decltype(c.end())
{
return c.end();
}
-#endif // defined(ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
/*@}*/
namespace detail {
@@ -539,25 +473,25 @@ struct multiple_buffers {};
// Helper trait to detect single buffers.
template <typename BufferSequence>
struct buffer_sequence_cardinality :
- conditional<
+ conditional_t<
is_same<BufferSequence, mutable_buffer>::value
#if !defined(ASIO_NO_DEPRECATED)
|| is_same<BufferSequence, mutable_buffers_1>::value
|| is_same<BufferSequence, const_buffers_1>::value
#endif // !defined(ASIO_NO_DEPRECATED)
|| is_same<BufferSequence, const_buffer>::value,
- one_buffer, multiple_buffers>::type {};
+ one_buffer, multiple_buffers> {};
template <typename Iterator>
inline std::size_t buffer_size(one_buffer,
- Iterator begin, Iterator) ASIO_NOEXCEPT
+ Iterator begin, Iterator) noexcept
{
return const_buffer(*begin).size();
}
template <typename Iterator>
inline std::size_t buffer_size(multiple_buffers,
- Iterator begin, Iterator end) ASIO_NOEXCEPT
+ Iterator begin, Iterator end) noexcept
{
std::size_t total_buffer_size = 0;
@@ -592,7 +526,7 @@ inline std::size_t buffer_size(multiple_buffers,
* ConstBufferSequence or @c MutableBufferSequence type requirements.
*/
template <typename BufferSequence>
-inline std::size_t buffer_size(const BufferSequence& b) ASIO_NOEXCEPT
+inline std::size_t buffer_size(const BufferSequence& b) noexcept
{
return detail::buffer_size(
detail::buffer_sequence_cardinality<BufferSequence>(),
@@ -627,14 +561,14 @@ inline std::size_t buffer_size(const BufferSequence& b) ASIO_NOEXCEPT
/// Cast a non-modifiable buffer to a specified pointer to POD type.
template <typename PointerToPodType>
-inline PointerToPodType buffer_cast(const mutable_buffer& b) ASIO_NOEXCEPT
+inline PointerToPodType buffer_cast(const mutable_buffer& b) noexcept
{
return static_cast<PointerToPodType>(b.data());
}
/// Cast a non-modifiable buffer to a specified pointer to POD type.
template <typename PointerToPodType>
-inline PointerToPodType buffer_cast(const const_buffer& b) ASIO_NOEXCEPT
+inline PointerToPodType buffer_cast(const const_buffer& b) noexcept
{
return static_cast<PointerToPodType>(b.data());
}
@@ -648,7 +582,7 @@ inline PointerToPodType buffer_cast(const const_buffer& b) ASIO_NOEXCEPT
* @relates mutable_buffer
*/
inline mutable_buffer operator+(const mutable_buffer& b,
- std::size_t n) ASIO_NOEXCEPT
+ std::size_t n) noexcept
{
std::size_t offset = n < b.size() ? n : b.size();
char* new_data = static_cast<char*>(b.data()) + offset;
@@ -665,7 +599,7 @@ inline mutable_buffer operator+(const mutable_buffer& b,
* @relates mutable_buffer
*/
inline mutable_buffer operator+(std::size_t n,
- const mutable_buffer& b) ASIO_NOEXCEPT
+ const mutable_buffer& b) noexcept
{
return b + n;
}
@@ -675,7 +609,7 @@ inline mutable_buffer operator+(std::size_t n,
* @relates const_buffer
*/
inline const_buffer operator+(const const_buffer& b,
- std::size_t n) ASIO_NOEXCEPT
+ std::size_t n) noexcept
{
std::size_t offset = n < b.size() ? n : b.size();
const char* new_data = static_cast<const char*>(b.data()) + offset;
@@ -692,7 +626,7 @@ inline const_buffer operator+(const const_buffer& b,
* @relates const_buffer
*/
inline const_buffer operator+(std::size_t n,
- const const_buffer& b) ASIO_NOEXCEPT
+ const const_buffer& b) noexcept
{
return b + n;
}
@@ -891,6 +825,25 @@ private:
* bufs2.push_back(asio::buffer(d2));
* bufs2.push_back(asio::buffer(d3));
* bytes_transferred = sock.send(bufs2); @endcode
+ *
+ * @par Buffer Literals
+ *
+ * The `_buf` literal suffix, defined in namespace
+ * <tt>asio::buffer_literals</tt>, may be used to create @c const_buffer
+ * objects from string, binary integer, and hexadecimal integer literals.
+ * For example:
+ *
+ * @code
+ * using namespace asio::buffer_literals;
+ *
+ * asio::const_buffer b1 = "hello"_buf;
+ * asio::const_buffer b2 = 0xdeadbeef_buf;
+ * asio::const_buffer b3 = 0x0123456789abcdef0123456789abcdef_buf;
+ * asio::const_buffer b4 = 0b1010101011001100_buf; @endcode
+ *
+ * Note that the memory associated with a buffer literal is valid for the
+ * lifetime of the program. This means that the buffer can be safely used with
+ * asynchronous operations.
*/
/*@{*/
@@ -906,8 +859,8 @@ private:
/**
* @returns <tt>mutable_buffer(b)</tt>.
*/
-inline ASIO_MUTABLE_BUFFER buffer(
- const mutable_buffer& b) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ const mutable_buffer& b) noexcept
{
return ASIO_MUTABLE_BUFFER(b);
}
@@ -919,8 +872,9 @@ inline ASIO_MUTABLE_BUFFER buffer(
* b.data(),
* min(b.size(), max_size_in_bytes)); @endcode
*/
-inline ASIO_MUTABLE_BUFFER buffer(const mutable_buffer& b,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ const mutable_buffer& b,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(
mutable_buffer(b.data(),
@@ -936,8 +890,8 @@ inline ASIO_MUTABLE_BUFFER buffer(const mutable_buffer& b,
/**
* @returns <tt>const_buffer(b)</tt>.
*/
-inline ASIO_CONST_BUFFER buffer(
- const const_buffer& b) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const const_buffer& b) noexcept
{
return ASIO_CONST_BUFFER(b);
}
@@ -949,8 +903,9 @@ inline ASIO_CONST_BUFFER buffer(
* b.data(),
* min(b.size(), max_size_in_bytes)); @endcode
*/
-inline ASIO_CONST_BUFFER buffer(const const_buffer& b,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const const_buffer& b,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(b.data(),
b.size() < max_size_in_bytes
@@ -965,8 +920,8 @@ inline ASIO_CONST_BUFFER buffer(const const_buffer& b,
/**
* @returns <tt>mutable_buffer(data, size_in_bytes)</tt>.
*/
-inline ASIO_MUTABLE_BUFFER buffer(void* data,
- std::size_t size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ void* data, std::size_t size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data, size_in_bytes);
}
@@ -975,8 +930,8 @@ inline ASIO_MUTABLE_BUFFER buffer(void* data,
/**
* @returns <tt>const_buffer(data, size_in_bytes)</tt>.
*/
-inline ASIO_CONST_BUFFER buffer(const void* data,
- std::size_t size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const void* data, std::size_t size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data, size_in_bytes);
}
@@ -989,7 +944,8 @@ inline ASIO_CONST_BUFFER buffer(const void* data,
* N * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N]) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ PodType (&data)[N]) noexcept
{
return ASIO_MUTABLE_BUFFER(data, N * sizeof(PodType));
}
@@ -1002,8 +958,9 @@ inline ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N]) ASIO_NOEXCEPT
* min(N * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N],
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ PodType (&data)[N],
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data,
N * sizeof(PodType) < max_size_in_bytes
@@ -1018,8 +975,8 @@ inline ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N],
* N * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(
- const PodType (&data)[N]) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const PodType (&data)[N]) noexcept
{
return ASIO_CONST_BUFFER(data, N * sizeof(PodType));
}
@@ -1032,84 +989,15 @@ inline ASIO_CONST_BUFFER buffer(
* min(N * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(const PodType (&data)[N],
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const PodType (&data)[N],
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data,
N * sizeof(PodType) < max_size_in_bytes
? N * sizeof(PodType) : max_size_in_bytes);
}
-#if defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
-// Borland C++ and Sun Studio think the overloads:
-//
-// unspecified buffer(boost::array<PodType, N>& array ...);
-//
-// and
-//
-// unspecified buffer(boost::array<const PodType, N>& array ...);
-//
-// are ambiguous. This will be worked around by using a buffer_types traits
-// class that contains typedefs for the appropriate buffer and container
-// classes, based on whether PodType is const or non-const.
-
-namespace detail {
-
-template <bool IsConst>
-struct buffer_types_base;
-
-template <>
-struct buffer_types_base<false>
-{
- typedef mutable_buffer buffer_type;
- typedef ASIO_MUTABLE_BUFFER container_type;
-};
-
-template <>
-struct buffer_types_base<true>
-{
- typedef const_buffer buffer_type;
- typedef ASIO_CONST_BUFFER container_type;
-};
-
-template <typename PodType>
-struct buffer_types
- : public buffer_types_base<is_const<PodType>::value>
-{
-};
-
-} // namespace detail
-
-template <typename PodType, std::size_t N>
-inline typename detail::buffer_types<PodType>::container_type
-buffer(boost::array<PodType, N>& data) ASIO_NOEXCEPT
-{
- typedef typename asio::detail::buffer_types<PodType>::buffer_type
- buffer_type;
- typedef typename asio::detail::buffer_types<PodType>::container_type
- container_type;
- return container_type(
- buffer_type(data.c_array(), data.size() * sizeof(PodType)));
-}
-
-template <typename PodType, std::size_t N>
-inline typename detail::buffer_types<PodType>::container_type
-buffer(boost::array<PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
-{
- typedef typename asio::detail::buffer_types<PodType>::buffer_type
- buffer_type;
- typedef typename asio::detail::buffer_types<PodType>::container_type
- container_type;
- return container_type(
- buffer_type(data.c_array(),
- data.size() * sizeof(PodType) < max_size_in_bytes
- ? data.size() * sizeof(PodType) : max_size_in_bytes));
-}
-
-#else // defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
/// Create a new modifiable buffer that represents the given POD array.
/**
* @returns A mutable_buffer value equivalent to:
@@ -1118,8 +1006,8 @@ buffer(boost::array<PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(
- boost::array<PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ boost::array<PodType, N>& data) noexcept
{
return ASIO_MUTABLE_BUFFER(
data.c_array(), data.size() * sizeof(PodType));
@@ -1133,8 +1021,9 @@ inline ASIO_MUTABLE_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(boost::array<PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ boost::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data.c_array(),
data.size() * sizeof(PodType) < max_size_in_bytes
@@ -1149,8 +1038,8 @@ inline ASIO_MUTABLE_BUFFER buffer(boost::array<PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(
- boost::array<const PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ boost::array<const PodType, N>& data) noexcept
{
return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
}
@@ -1163,16 +1052,15 @@ inline ASIO_CONST_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(boost::array<const PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ boost::array<const PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.data(),
data.size() * sizeof(PodType) < max_size_in_bytes
? data.size() * sizeof(PodType) : max_size_in_bytes);
}
-#endif // defined(ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
/// Create a new non-modifiable buffer that represents the given POD array.
/**
* @returns A const_buffer value equivalent to:
@@ -1181,8 +1069,8 @@ inline ASIO_CONST_BUFFER buffer(boost::array<const PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(
- const boost::array<PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const boost::array<PodType, N>& data) noexcept
{
return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
}
@@ -1195,16 +1083,15 @@ inline ASIO_CONST_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(const boost::array<PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const boost::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.data(),
data.size() * sizeof(PodType) < max_size_in_bytes
? data.size() * sizeof(PodType) : max_size_in_bytes);
}
-#if defined(ASIO_HAS_STD_ARRAY) || defined(GENERATING_DOCUMENTATION)
-
/// Create a new modifiable buffer that represents the given POD array.
/**
* @returns A mutable_buffer value equivalent to:
@@ -1213,8 +1100,8 @@ inline ASIO_CONST_BUFFER buffer(const boost::array<PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(
- std::array<PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ std::array<PodType, N>& data) noexcept
{
return ASIO_MUTABLE_BUFFER(data.data(), data.size() * sizeof(PodType));
}
@@ -1227,8 +1114,9 @@ inline ASIO_MUTABLE_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_MUTABLE_BUFFER buffer(std::array<PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ std::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data.data(),
data.size() * sizeof(PodType) < max_size_in_bytes
@@ -1243,8 +1131,8 @@ inline ASIO_MUTABLE_BUFFER buffer(std::array<PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(
- std::array<const PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ std::array<const PodType, N>& data) noexcept
{
return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
}
@@ -1257,8 +1145,9 @@ inline ASIO_CONST_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(std::array<const PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ std::array<const PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.data(),
data.size() * sizeof(PodType) < max_size_in_bytes
@@ -1273,8 +1162,8 @@ inline ASIO_CONST_BUFFER buffer(std::array<const PodType, N>& data,
* data.size() * sizeof(PodType)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(
- const std::array<PodType, N>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const std::array<PodType, N>& data) noexcept
{
return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
}
@@ -1287,16 +1176,15 @@ inline ASIO_CONST_BUFFER buffer(
* min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
*/
template <typename PodType, std::size_t N>
-inline ASIO_CONST_BUFFER buffer(const std::array<PodType, N>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const std::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.data(),
data.size() * sizeof(PodType) < max_size_in_bytes
? data.size() * sizeof(PodType) : max_size_in_bytes);
}
-#endif // defined(ASIO_HAS_STD_ARRAY) || defined(GENERATING_DOCUMENTATION)
-
/// Create a new modifiable buffer that represents the given POD vector.
/**
* @returns A mutable_buffer value equivalent to:
@@ -1308,8 +1196,8 @@ inline ASIO_CONST_BUFFER buffer(const std::array<PodType, N>& data,
* invalidate iterators.
*/
template <typename PodType, typename Allocator>
-inline ASIO_MUTABLE_BUFFER buffer(
- std::vector<PodType, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ std::vector<PodType, Allocator>& data) noexcept
{
return ASIO_MUTABLE_BUFFER(
data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
@@ -1332,8 +1220,9 @@ inline ASIO_MUTABLE_BUFFER buffer(
* invalidate iterators.
*/
template <typename PodType, typename Allocator>
-inline ASIO_MUTABLE_BUFFER buffer(std::vector<PodType, Allocator>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ std::vector<PodType, Allocator>& data,
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(PodType) < max_size_in_bytes
@@ -1357,8 +1246,8 @@ inline ASIO_MUTABLE_BUFFER buffer(std::vector<PodType, Allocator>& data,
* invalidate iterators.
*/
template <typename PodType, typename Allocator>
-inline ASIO_CONST_BUFFER buffer(
- const std::vector<PodType, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const std::vector<PodType, Allocator>& data) noexcept
{
return ASIO_CONST_BUFFER(
data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
@@ -1381,9 +1270,9 @@ inline ASIO_CONST_BUFFER buffer(
* invalidate iterators.
*/
template <typename PodType, typename Allocator>
-inline ASIO_CONST_BUFFER buffer(
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
const std::vector<PodType, Allocator>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(PodType) < max_size_in_bytes
@@ -1405,8 +1294,8 @@ inline ASIO_CONST_BUFFER buffer(
* given string object.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline ASIO_MUTABLE_BUFFER buffer(
- std::basic_string<Elem, Traits, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ std::basic_string<Elem, Traits, Allocator>& data) noexcept
{
return ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(Elem)
@@ -1429,9 +1318,9 @@ inline ASIO_MUTABLE_BUFFER buffer(
* given string object.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline ASIO_MUTABLE_BUFFER buffer(
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
std::basic_string<Elem, Traits, Allocator>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(Elem) < max_size_in_bytes
@@ -1452,8 +1341,8 @@ inline ASIO_MUTABLE_BUFFER buffer(
* given string object.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline ASIO_CONST_BUFFER buffer(
- const std::basic_string<Elem, Traits, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const std::basic_string<Elem, Traits, Allocator>& data) noexcept
{
return ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(Elem)
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
@@ -1475,9 +1364,9 @@ inline ASIO_CONST_BUFFER buffer(
* given string object.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline ASIO_CONST_BUFFER buffer(
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
const std::basic_string<Elem, Traits, Allocator>& data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.data(),
data.size() * sizeof(Elem) < max_size_in_bytes
@@ -1493,14 +1382,14 @@ inline ASIO_CONST_BUFFER buffer(
#if defined(ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
-/// Create a new modifiable buffer that represents the given string_view.
+/// Create a new non-modifiable buffer that represents the given string_view.
/**
* @returns <tt>mutable_buffer(data.size() ? &data[0] : 0,
* data.size() * sizeof(Elem))</tt>.
*/
template <typename Elem, typename Traits>
-inline ASIO_CONST_BUFFER buffer(
- basic_string_view<Elem, Traits> data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ basic_string_view<Elem, Traits> data) noexcept
{
return ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(Elem)
@@ -1520,9 +1409,9 @@ inline ASIO_CONST_BUFFER buffer(
* min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
*/
template <typename Elem, typename Traits>
-inline ASIO_CONST_BUFFER buffer(
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
basic_string_view<Elem, Traits> data,
- std::size_t max_size_in_bytes) ASIO_NOEXCEPT
+ std::size_t max_size_in_bytes) noexcept
{
return ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
data.size() * sizeof(Elem) < max_size_in_bytes
@@ -1538,6 +1427,215 @@ inline ASIO_CONST_BUFFER buffer(
#endif // defined(ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
+/// Create a new modifiable buffer from a contiguous container.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.size() ? &data[0] : 0,
+ * data.size() * sizeof(typename T::value_type)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ T& data,
+ constraint_t<
+ is_contiguous_iterator<typename T::iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_const<
+ remove_reference_t<
+ typename std::iterator_traits<typename T::iterator>::reference
+ >
+ >::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_MUTABLE_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type));
+}
+
+/// Create a new modifiable buffer from a contiguous container.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.size() ? &data[0] : 0,
+ * min(
+ * data.size() * sizeof(typename T::value_type),
+ * max_size_in_bytes)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_MUTABLE_BUFFER buffer(
+ T& data, std::size_t max_size_in_bytes,
+ constraint_t<
+ is_contiguous_iterator<typename T::iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_const<
+ remove_reference_t<
+ typename std::iterator_traits<typename T::iterator>::reference
+ >
+ >::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_MUTABLE_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type) < max_size_in_bytes
+ ? data.size() * sizeof(typename T::value_type) : max_size_in_bytes);
+}
+
+/// Create a new non-modifiable buffer from a contiguous container.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.size() ? &data[0] : 0,
+ * data.size() * sizeof(typename T::value_type)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ T& data,
+ constraint_t<
+ is_contiguous_iterator<typename T::iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ is_const<
+ remove_reference_t<
+ typename std::iterator_traits<typename T::iterator>::reference
+ >
+ >::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_CONST_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type));
+}
+
+/// Create a new non-modifiable buffer from a contiguous container.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.size() ? &data[0] : 0,
+ * min(
+ * data.size() * sizeof(typename T::value_type),
+ * max_size_in_bytes)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ T& data, std::size_t max_size_in_bytes,
+ constraint_t<
+ is_contiguous_iterator<typename T::iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ is_const<
+ remove_reference_t<
+ typename std::iterator_traits<typename T::iterator>::reference
+ >
+ >::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_CONST_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type) < max_size_in_bytes
+ ? data.size() * sizeof(typename T::value_type) : max_size_in_bytes);
+}
+
+/// Create a new non-modifiable buffer from a contiguous container.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.size() ? &data[0] : 0,
+ * data.size() * sizeof(typename T::value_type)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const T& data,
+ constraint_t<
+ is_contiguous_iterator<typename T::const_iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_CONST_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type));
+}
+
+/// Create a new non-modifiable buffer from a contiguous container.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.size() ? &data[0] : 0,
+ * min(
+ * data.size() * sizeof(typename T::value_type),
+ * max_size_in_bytes)); @endcode
+ */
+template <typename T>
+ASIO_NODISCARD inline ASIO_CONST_BUFFER buffer(
+ const T& data, std::size_t max_size_in_bytes,
+ constraint_t<
+ is_contiguous_iterator<typename T::const_iterator>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, const_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint(),
+ constraint_t<
+ !is_convertible<T, mutable_buffer>::value,
+ defaulted_constraint
+ > = defaulted_constraint()) noexcept
+{
+ return ASIO_CONST_BUFFER(
+ data.size() ? detail::to_address(data.begin()) : 0,
+ data.size() * sizeof(typename T::value_type) < max_size_in_bytes
+ ? data.size() * sizeof(typename T::value_type) : max_size_in_bytes);
+}
+
/*@}*/
/// Adapt a basic_string to the DynamicBuffer requirements.
@@ -1570,7 +1668,7 @@ public:
*/
explicit dynamic_string_buffer(std::basic_string<Elem, Traits, Allocator>& s,
std::size_t maximum_size =
- (std::numeric_limits<std::size_t>::max)()) ASIO_NOEXCEPT
+ (std::numeric_limits<std::size_t>::max)()) noexcept
: string_(s),
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
size_((std::numeric_limits<std::size_t>::max)()),
@@ -1580,7 +1678,7 @@ public:
}
/// @b DynamicBuffer_v2: Copy construct a dynamic buffer.
- dynamic_string_buffer(const dynamic_string_buffer& other) ASIO_NOEXCEPT
+ dynamic_string_buffer(const dynamic_string_buffer& other) noexcept
: string_(other.string_),
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
size_(other.size_),
@@ -1589,9 +1687,8 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move construct a dynamic buffer.
- dynamic_string_buffer(dynamic_string_buffer&& other) ASIO_NOEXCEPT
+ dynamic_string_buffer(dynamic_string_buffer&& other) noexcept
: string_(other.string_),
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
size_(other.size_),
@@ -1599,7 +1696,6 @@ public:
max_size_(other.max_size_)
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// @b DynamicBuffer_v1: Get the size of the input sequence.
/// @b DynamicBuffer_v2: Get the current size of the underlying memory.
@@ -1608,7 +1704,7 @@ public:
* @b DynamicBuffer_v2: The current size of the underlying string if less than
* max_size(). Otherwise returns max_size().
*/
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
if (size_ != (std::numeric_limits<std::size_t>::max)())
@@ -1621,7 +1717,7 @@ public:
/**
* @returns The allowed maximum size of the underlying memory.
*/
- std::size_t max_size() const ASIO_NOEXCEPT
+ std::size_t max_size() const noexcept
{
return max_size_;
}
@@ -1632,7 +1728,7 @@ public:
* @returns The current capacity of the underlying string if less than
* max_size(). Otherwise returns max_size().
*/
- std::size_t capacity() const ASIO_NOEXCEPT
+ std::size_t capacity() const noexcept
{
return (std::min)(string_.capacity(), max_size());
}
@@ -1648,7 +1744,7 @@ public:
* @note The returned object is invalidated by any @c dynamic_string_buffer
* or @c basic_string member function that resizes or erases the string.
*/
- const_buffers_type data() const ASIO_NOEXCEPT
+ const_buffers_type data() const noexcept
{
return const_buffers_type(asio::buffer(string_, size_));
}
@@ -1669,7 +1765,7 @@ public:
* @note The returned object is invalidated by any @c dynamic_string_buffer
* or @c basic_string member function that resizes or erases the string.
*/
- mutable_buffers_type data(std::size_t pos, std::size_t n) ASIO_NOEXCEPT
+ mutable_buffers_type data(std::size_t pos, std::size_t n) noexcept
{
return mutable_buffers_type(asio::buffer(
asio::buffer(string_, max_size_) + pos, n));
@@ -1688,7 +1784,7 @@ public:
* or @c basic_string member function that resizes or erases the string.
*/
const_buffers_type data(std::size_t pos,
- std::size_t n) const ASIO_NOEXCEPT
+ std::size_t n) const noexcept
{
return const_buffers_type(asio::buffer(
asio::buffer(string_, max_size_) + pos, n));
@@ -1838,7 +1934,7 @@ public:
*/
explicit dynamic_vector_buffer(std::vector<Elem, Allocator>& v,
std::size_t maximum_size =
- (std::numeric_limits<std::size_t>::max)()) ASIO_NOEXCEPT
+ (std::numeric_limits<std::size_t>::max)()) noexcept
: vector_(v),
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
size_((std::numeric_limits<std::size_t>::max)()),
@@ -1848,7 +1944,7 @@ public:
}
/// @b DynamicBuffer_v2: Copy construct a dynamic buffer.
- dynamic_vector_buffer(const dynamic_vector_buffer& other) ASIO_NOEXCEPT
+ dynamic_vector_buffer(const dynamic_vector_buffer& other) noexcept
: vector_(other.vector_),
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
size_(other.size_),
@@ -1857,9 +1953,8 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move construct a dynamic buffer.
- dynamic_vector_buffer(dynamic_vector_buffer&& other) ASIO_NOEXCEPT
+ dynamic_vector_buffer(dynamic_vector_buffer&& other) noexcept
: vector_(other.vector_),
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
size_(other.size_),
@@ -1867,7 +1962,6 @@ public:
max_size_(other.max_size_)
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// @b DynamicBuffer_v1: Get the size of the input sequence.
/// @b DynamicBuffer_v2: Get the current size of the underlying memory.
@@ -1876,7 +1970,7 @@ public:
* @b DynamicBuffer_v2: The current size of the underlying vector if less than
* max_size(). Otherwise returns max_size().
*/
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
if (size_ != (std::numeric_limits<std::size_t>::max)())
@@ -1891,7 +1985,7 @@ public:
* of the input sequence and output sequence. @b DynamicBuffer_v2: The allowed
* maximum size of the underlying memory.
*/
- std::size_t max_size() const ASIO_NOEXCEPT
+ std::size_t max_size() const noexcept
{
return max_size_;
}
@@ -1904,7 +1998,7 @@ public:
* The current capacity of the underlying vector if less than max_size().
* Otherwise returns max_size().
*/
- std::size_t capacity() const ASIO_NOEXCEPT
+ std::size_t capacity() const noexcept
{
return (std::min)(vector_.capacity(), max_size());
}
@@ -1921,7 +2015,7 @@ public:
* or @c vector member function that modifies the input sequence or output
* sequence.
*/
- const_buffers_type data() const ASIO_NOEXCEPT
+ const_buffers_type data() const noexcept
{
return const_buffers_type(asio::buffer(vector_, size_));
}
@@ -1942,7 +2036,7 @@ public:
* @note The returned object is invalidated by any @c dynamic_vector_buffer
* or @c vector member function that resizes or erases the vector.
*/
- mutable_buffers_type data(std::size_t pos, std::size_t n) ASIO_NOEXCEPT
+ mutable_buffers_type data(std::size_t pos, std::size_t n) noexcept
{
return mutable_buffers_type(asio::buffer(
asio::buffer(vector_, max_size_) + pos, n));
@@ -1961,7 +2055,7 @@ public:
* or @c vector member function that resizes or erases the vector.
*/
const_buffers_type data(std::size_t pos,
- std::size_t n) const ASIO_NOEXCEPT
+ std::size_t n) const noexcept
{
return const_buffers_type(asio::buffer(
asio::buffer(vector_, max_size_) + pos, n));
@@ -2096,8 +2190,9 @@ private:
* @returns <tt>dynamic_string_buffer<Elem, Traits, Allocator>(data)</tt>.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
- std::basic_string<Elem, Traits, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline
+dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
+ std::basic_string<Elem, Traits, Allocator>& data) noexcept
{
return dynamic_string_buffer<Elem, Traits, Allocator>(data);
}
@@ -2108,9 +2203,10 @@ inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
* max_size)</tt>.
*/
template <typename Elem, typename Traits, typename Allocator>
-inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
+ASIO_NODISCARD inline
+dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
std::basic_string<Elem, Traits, Allocator>& data,
- std::size_t max_size) ASIO_NOEXCEPT
+ std::size_t max_size) noexcept
{
return dynamic_string_buffer<Elem, Traits, Allocator>(data, max_size);
}
@@ -2120,8 +2216,9 @@ inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
* @returns <tt>dynamic_vector_buffer<Elem, Allocator>(data)</tt>.
*/
template <typename Elem, typename Allocator>
-inline dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
- std::vector<Elem, Allocator>& data) ASIO_NOEXCEPT
+ASIO_NODISCARD inline
+dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
+ std::vector<Elem, Allocator>& data) noexcept
{
return dynamic_vector_buffer<Elem, Allocator>(data);
}
@@ -2131,9 +2228,10 @@ inline dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
* @returns <tt>dynamic_vector_buffer<Elem, Allocator>(data, max_size)</tt>.
*/
template <typename Elem, typename Allocator>
-inline dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
+ASIO_NODISCARD inline
+dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
std::vector<Elem, Allocator>& data,
- std::size_t max_size) ASIO_NOEXCEPT
+ std::size_t max_size) noexcept
{
return dynamic_vector_buffer<Elem, Allocator>(data, max_size);
}
@@ -2185,7 +2283,7 @@ inline std::size_t buffer_copy_1(const mutable_buffer& target,
template <typename TargetIterator, typename SourceIterator>
inline std::size_t buffer_copy(one_buffer, one_buffer,
TargetIterator target_begin, TargetIterator,
- SourceIterator source_begin, SourceIterator) ASIO_NOEXCEPT
+ SourceIterator source_begin, SourceIterator) noexcept
{
return (buffer_copy_1)(*target_begin, *source_begin);
}
@@ -2194,7 +2292,7 @@ template <typename TargetIterator, typename SourceIterator>
inline std::size_t buffer_copy(one_buffer, one_buffer,
TargetIterator target_begin, TargetIterator,
SourceIterator source_begin, SourceIterator,
- std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
+ std::size_t max_bytes_to_copy) noexcept
{
return (buffer_copy_1)(*target_begin,
asio::buffer(*source_begin, max_bytes_to_copy));
@@ -2205,7 +2303,7 @@ std::size_t buffer_copy(one_buffer, multiple_buffers,
TargetIterator target_begin, TargetIterator,
SourceIterator source_begin, SourceIterator source_end,
std::size_t max_bytes_to_copy
- = (std::numeric_limits<std::size_t>::max)()) ASIO_NOEXCEPT
+ = (std::numeric_limits<std::size_t>::max)()) noexcept
{
std::size_t total_bytes_copied = 0;
SourceIterator source_iter = source_begin;
@@ -2228,7 +2326,7 @@ std::size_t buffer_copy(multiple_buffers, one_buffer,
TargetIterator target_begin, TargetIterator target_end,
SourceIterator source_begin, SourceIterator,
std::size_t max_bytes_to_copy
- = (std::numeric_limits<std::size_t>::max)()) ASIO_NOEXCEPT
+ = (std::numeric_limits<std::size_t>::max)()) noexcept
{
std::size_t total_bytes_copied = 0;
TargetIterator target_iter = target_begin;
@@ -2249,7 +2347,7 @@ std::size_t buffer_copy(multiple_buffers, one_buffer,
template <typename TargetIterator, typename SourceIterator>
std::size_t buffer_copy(multiple_buffers, multiple_buffers,
TargetIterator target_begin, TargetIterator target_end,
- SourceIterator source_begin, SourceIterator source_end) ASIO_NOEXCEPT
+ SourceIterator source_begin, SourceIterator source_end) noexcept
{
std::size_t total_bytes_copied = 0;
@@ -2294,7 +2392,7 @@ template <typename TargetIterator, typename SourceIterator>
std::size_t buffer_copy(multiple_buffers, multiple_buffers,
TargetIterator target_begin, TargetIterator target_end,
SourceIterator source_begin, SourceIterator source_end,
- std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
+ std::size_t max_bytes_to_copy) noexcept
{
std::size_t total_bytes_copied = 0;
@@ -2361,7 +2459,7 @@ std::size_t buffer_copy(multiple_buffers, multiple_buffers,
*/
template <typename MutableBufferSequence, typename ConstBufferSequence>
inline std::size_t buffer_copy(const MutableBufferSequence& target,
- const ConstBufferSequence& source) ASIO_NOEXCEPT
+ const ConstBufferSequence& source) noexcept
{
return detail::buffer_copy(
detail::buffer_sequence_cardinality<MutableBufferSequence>(),
@@ -2399,7 +2497,7 @@ inline std::size_t buffer_copy(const MutableBufferSequence& target,
template <typename MutableBufferSequence, typename ConstBufferSequence>
inline std::size_t buffer_copy(const MutableBufferSequence& target,
const ConstBufferSequence& source,
- std::size_t max_bytes_to_copy) ASIO_NOEXCEPT
+ std::size_t max_bytes_to_copy) noexcept
{
return detail::buffer_copy(
detail::buffer_sequence_cardinality<MutableBufferSequence>(),
@@ -2489,6 +2587,163 @@ struct is_dynamic_buffer
{
};
+namespace buffer_literals {
+namespace detail {
+
+template <char... Chars>
+struct chars {};
+
+template <unsigned char... Bytes>
+struct bytes {};
+
+// Literal processor that converts binary literals to an array of bytes.
+
+template <typename Bytes, char... Chars>
+struct bin_literal;
+
+template <unsigned char... Bytes>
+struct bin_literal<bytes<Bytes...>>
+{
+ static const std::size_t size = sizeof...(Bytes);
+ static const unsigned char data[sizeof...(Bytes)];
+};
+
+template <unsigned char... Bytes>
+const unsigned char bin_literal<bytes<Bytes...>>::data[sizeof...(Bytes)]
+ = { Bytes... };
+
+template <unsigned char... Bytes, char Bit7, char Bit6, char Bit5,
+ char Bit4, char Bit3, char Bit2, char Bit1, char Bit0, char... Chars>
+struct bin_literal<bytes<Bytes...>, Bit7, Bit6,
+ Bit5, Bit4, Bit3, Bit2, Bit1, Bit0, Chars...> :
+ bin_literal<
+ bytes<Bytes...,
+ static_cast<unsigned char>(
+ (Bit7 == '1' ? 0x80 : 0) |
+ (Bit6 == '1' ? 0x40 : 0) |
+ (Bit5 == '1' ? 0x20 : 0) |
+ (Bit4 == '1' ? 0x10 : 0) |
+ (Bit3 == '1' ? 0x08 : 0) |
+ (Bit2 == '1' ? 0x04 : 0) |
+ (Bit1 == '1' ? 0x02 : 0) |
+ (Bit0 == '1' ? 0x01 : 0))
+ >, Chars...> {};
+
+template <unsigned char... Bytes, char... Chars>
+struct bin_literal<bytes<Bytes...>, Chars...>
+{
+ static_assert(sizeof...(Chars) == 0,
+ "number of digits in a binary buffer literal must be a multiple of 8");
+
+ static const std::size_t size = 0;
+ static const unsigned char data[1];
+};
+
+template <unsigned char... Bytes, char... Chars>
+const unsigned char bin_literal<bytes<Bytes...>, Chars...>::data[1] = {};
+
+// Literal processor that converts hexadecimal literals to an array of bytes.
+
+template <typename Bytes, char... Chars>
+struct hex_literal;
+
+template <unsigned char... Bytes>
+struct hex_literal<bytes<Bytes...>>
+{
+ static const std::size_t size = sizeof...(Bytes);
+ static const unsigned char data[sizeof...(Bytes)];
+};
+
+template <unsigned char... Bytes>
+const unsigned char hex_literal<bytes<Bytes...>>::data[sizeof...(Bytes)]
+ = { Bytes... };
+
+template <unsigned char... Bytes, char Hi, char Lo, char... Chars>
+struct hex_literal<bytes<Bytes...>, Hi, Lo, Chars...> :
+ hex_literal<
+ bytes<Bytes...,
+ static_cast<unsigned char>(
+ Lo >= 'A' && Lo <= 'F' ? Lo - 'A' + 10 :
+ (Lo >= 'a' && Lo <= 'f' ? Lo - 'a' + 10 : Lo - '0')) |
+ ((static_cast<unsigned char>(
+ Hi >= 'A' && Hi <= 'F' ? Hi - 'A' + 10 :
+ (Hi >= 'a' && Hi <= 'f' ? Hi - 'a' + 10 : Hi - '0'))) << 4)
+ >, Chars...> {};
+
+template <unsigned char... Bytes, char Char>
+struct hex_literal<bytes<Bytes...>, Char>
+{
+ static_assert(!Char,
+ "a hexadecimal buffer literal must have an even number of digits");
+
+ static const std::size_t size = 0;
+ static const unsigned char data[1];
+};
+
+template <unsigned char... Bytes, char Char>
+const unsigned char hex_literal<bytes<Bytes...>, Char>::data[1] = {};
+
+// Helper template that removes digit separators and then passes the cleaned
+// variadic pack of characters to the literal processor.
+
+template <template <typename, char...> class Literal,
+ typename Clean, char... Raw>
+struct remove_separators;
+
+template <template <typename, char...> class Literal,
+ char... Clean, char... Raw>
+struct remove_separators<Literal, chars<Clean...>, '\'', Raw...> :
+ remove_separators<Literal, chars<Clean...>, Raw...> {};
+
+template <template <typename, char...> class Literal,
+ char... Clean, char C, char... Raw>
+struct remove_separators<Literal, chars<Clean...>, C, Raw...> :
+ remove_separators<Literal, chars<Clean..., C>, Raw...> {};
+
+template <template <typename, char...> class Literal, char... Clean>
+struct remove_separators<Literal, chars<Clean...>> :
+ Literal<bytes<>, Clean...> {};
+
+// Helper template to determine the literal type based on the prefix.
+
+template <char... Chars>
+struct literal;
+
+template <char... Chars>
+struct literal<'0', 'b', Chars...> :
+ remove_separators<bin_literal, chars<>, Chars...>{};
+
+template <char... Chars>
+struct literal<'0', 'B', Chars...> :
+ remove_separators<bin_literal, chars<>, Chars...>{};
+
+template <char... Chars>
+struct literal<'0', 'x', Chars...> :
+ remove_separators<hex_literal, chars<>, Chars...>{};
+
+template <char... Chars>
+struct literal<'0', 'X', Chars...> :
+ remove_separators<hex_literal, chars<>, Chars...>{};
+
+} // namespace detail
+
+/// Literal operator for creating const_buffer objects from string literals.
+inline ASIO_CONST_BUFFER operator ""_buf(const char* data, std::size_t n)
+{
+ return ASIO_CONST_BUFFER(data, n);
+}
+
+/// Literal operator for creating const_buffer objects from unbounded binary or
+/// hexadecimal integer literals.
+template <char... Chars>
+inline ASIO_CONST_BUFFER operator ""_buf()
+{
+ return ASIO_CONST_BUFFER(
+ +detail::literal<Chars...>::data,
+ detail::literal<Chars...>::size);
+}
+
+} // namespace buffer_literals
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/buffer_registration.hpp b/3rdparty/asio/include/asio/buffer_registration.hpp
new file mode 100644
index 00000000000..39897ba2450
--- /dev/null
+++ b/3rdparty/asio/include/asio/buffer_registration.hpp
@@ -0,0 +1,318 @@
+//
+// buffer_registration.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 ASIO_BUFFER_REGISTRATION_HPP
+#define ASIO_BUFFER_REGISTRATION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <iterator>
+#include <utility>
+#include <vector>
+#include "asio/detail/memory.hpp"
+#include "asio/execution/context.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/is_executor.hpp"
+#include "asio/query.hpp"
+#include "asio/registered_buffer.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+# include "asio/detail/scheduler.hpp"
+# include "asio/detail/io_uring_service.hpp"
+#endif // defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class buffer_registration_base
+{
+protected:
+ static mutable_registered_buffer make_buffer(const mutable_buffer& b,
+ const void* scope, int index) noexcept
+ {
+ return mutable_registered_buffer(b, registered_buffer_id(scope, index));
+ }
+};
+
+} // namespace detail
+
+/// Automatically registers and unregistered buffers with an execution context.
+/**
+ * For portability, applications should assume that only one registration is
+ * permitted per execution context.
+ */
+template <typename MutableBufferSequence,
+ typename Allocator = std::allocator<void>>
+class buffer_registration
+ : detail::buffer_registration_base
+{
+public:
+ /// The allocator type used for allocating storage for the buffers container.
+ typedef Allocator allocator_type;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// The type of an iterator over the registered buffers.
+ typedef unspecified iterator;
+
+ /// The type of a const iterator over the registered buffers.
+ typedef unspecified const_iterator;
+#else // defined(GENERATING_DOCUMENTATION)
+ typedef std::vector<mutable_registered_buffer>::const_iterator iterator;
+ typedef std::vector<mutable_registered_buffer>::const_iterator const_iterator;
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Register buffers with an executor's execution context.
+ template <typename Executor>
+ buffer_registration(const Executor& ex,
+ const MutableBufferSequence& buffer_sequence,
+ const allocator_type& alloc = allocator_type(),
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+ : buffer_sequence_(buffer_sequence),
+ buffers_(
+ ASIO_REBIND_ALLOC(allocator_type,
+ mutable_registered_buffer)(alloc))
+ {
+ init_buffers(buffer_registration::get_context(ex),
+ asio::buffer_sequence_begin(buffer_sequence_),
+ asio::buffer_sequence_end(buffer_sequence_));
+ }
+
+ /// Register buffers with an execution context.
+ template <typename ExecutionContext>
+ buffer_registration(ExecutionContext& ctx,
+ const MutableBufferSequence& buffer_sequence,
+ const allocator_type& alloc = allocator_type(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ : buffer_sequence_(buffer_sequence),
+ buffers_(
+ ASIO_REBIND_ALLOC(allocator_type,
+ mutable_registered_buffer)(alloc))
+ {
+ init_buffers(ctx,
+ asio::buffer_sequence_begin(buffer_sequence_),
+ asio::buffer_sequence_end(buffer_sequence_));
+ }
+
+ /// Move constructor.
+ buffer_registration(buffer_registration&& other) noexcept
+ : buffer_sequence_(std::move(other.buffer_sequence_)),
+ buffers_(std::move(other.buffers_))
+ {
+#if defined(ASIO_HAS_IO_URING)
+ service_ = other.service_;
+ other.service_ = 0;
+#endif // defined(ASIO_HAS_IO_URING)
+ }
+
+ /// Unregisters the buffers.
+ ~buffer_registration()
+ {
+#if defined(ASIO_HAS_IO_URING)
+ if (service_)
+ service_->unregister_buffers();
+#endif // defined(ASIO_HAS_IO_URING)
+ }
+
+ /// Move assignment.
+ buffer_registration& operator=(buffer_registration&& other) noexcept
+ {
+ if (this != &other)
+ {
+ buffer_sequence_ = std::move(other.buffer_sequence_);
+ buffers_ = std::move(other.buffers_);
+#if defined(ASIO_HAS_IO_URING)
+ if (service_)
+ service_->unregister_buffers();
+ service_ = other.service_;
+ other.service_ = 0;
+#endif // defined(ASIO_HAS_IO_URING)
+ }
+ return *this;
+ }
+
+ /// Get the number of registered buffers.
+ std::size_t size() const noexcept
+ {
+ return buffers_.size();
+ }
+
+ /// Get the begin iterator for the sequence of registered buffers.
+ const_iterator begin() const noexcept
+ {
+ return buffers_.begin();
+ }
+
+ /// Get the begin iterator for the sequence of registered buffers.
+ const_iterator cbegin() const noexcept
+ {
+ return buffers_.cbegin();
+ }
+
+ /// Get the end iterator for the sequence of registered buffers.
+ const_iterator end() const noexcept
+ {
+ return buffers_.end();
+ }
+
+ /// Get the end iterator for the sequence of registered buffers.
+ const_iterator cend() const noexcept
+ {
+ return buffers_.cend();
+ }
+
+ /// Get the buffer at the specified index.
+ const mutable_registered_buffer& operator[](std::size_t i) noexcept
+ {
+ return buffers_[i];
+ }
+
+ /// Get the buffer at the specified index.
+ const mutable_registered_buffer& at(std::size_t i) noexcept
+ {
+ return buffers_.at(i);
+ }
+
+private:
+ // Disallow copying and assignment.
+ buffer_registration(const buffer_registration&) = delete;
+ buffer_registration& operator=(const buffer_registration&) = delete;
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<execution::is_executor<T>::value>* = 0)
+ {
+ return asio::query(t, execution::context);
+ }
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<!execution::is_executor<T>::value>* = 0)
+ {
+ return t.context();
+ }
+
+ // Helper function to initialise the container of buffers.
+ template <typename Iterator>
+ void init_buffers(execution_context& ctx, Iterator begin, Iterator end)
+ {
+ std::size_t n = std::distance(begin, end);
+ buffers_.resize(n);
+
+#if defined(ASIO_HAS_IO_URING)
+ service_ = &use_service<detail::io_uring_service>(ctx);
+ std::vector<iovec,
+ ASIO_REBIND_ALLOC(allocator_type, iovec)> iovecs(n,
+ ASIO_REBIND_ALLOC(allocator_type, iovec)(
+ buffers_.get_allocator()));
+#endif // defined(ASIO_HAS_IO_URING)
+
+ Iterator iter = begin;
+ for (int index = 0; iter != end; ++index, ++iter)
+ {
+ mutable_buffer b(*iter);
+ std::size_t i = static_cast<std::size_t>(index);
+ buffers_[i] = this->make_buffer(b, &ctx, index);
+
+#if defined(ASIO_HAS_IO_URING)
+ iovecs[i].iov_base = buffers_[i].data();
+ iovecs[i].iov_len = buffers_[i].size();
+#endif // defined(ASIO_HAS_IO_URING)
+ }
+
+#if defined(ASIO_HAS_IO_URING)
+ if (n > 0)
+ {
+ service_->register_buffers(&iovecs[0],
+ static_cast<unsigned>(iovecs.size()));
+ }
+#endif // defined(ASIO_HAS_IO_URING)
+ }
+
+ MutableBufferSequence buffer_sequence_;
+ std::vector<mutable_registered_buffer,
+ ASIO_REBIND_ALLOC(allocator_type,
+ mutable_registered_buffer)> buffers_;
+#if defined(ASIO_HAS_IO_URING)
+ detail::io_uring_service* service_;
+#endif // defined(ASIO_HAS_IO_URING)
+};
+
+/// Register buffers with an execution context.
+template <typename Executor, typename MutableBufferSequence>
+ASIO_NODISCARD inline
+buffer_registration<MutableBufferSequence>
+register_buffers(const Executor& ex,
+ const MutableBufferSequence& buffer_sequence,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+{
+ return buffer_registration<MutableBufferSequence>(ex, buffer_sequence);
+}
+
+/// Register buffers with an execution context.
+template <typename Executor, typename MutableBufferSequence, typename Allocator>
+ASIO_NODISCARD inline
+buffer_registration<MutableBufferSequence, Allocator>
+register_buffers(const Executor& ex,
+ const MutableBufferSequence& buffer_sequence, const Allocator& alloc,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+{
+ return buffer_registration<MutableBufferSequence, Allocator>(
+ ex, buffer_sequence, alloc);
+}
+
+/// Register buffers with an execution context.
+template <typename ExecutionContext, typename MutableBufferSequence>
+ASIO_NODISCARD inline
+buffer_registration<MutableBufferSequence>
+register_buffers(ExecutionContext& ctx,
+ const MutableBufferSequence& buffer_sequence,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+{
+ return buffer_registration<MutableBufferSequence>(ctx, buffer_sequence);
+}
+
+/// Register buffers with an execution context.
+template <typename ExecutionContext,
+ typename MutableBufferSequence, typename Allocator>
+ASIO_NODISCARD inline
+buffer_registration<MutableBufferSequence, Allocator>
+register_buffers(ExecutionContext& ctx,
+ const MutableBufferSequence& buffer_sequence, const Allocator& alloc,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+{
+ return buffer_registration<MutableBufferSequence, Allocator>(
+ ctx, buffer_sequence, alloc);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_BUFFER_REGISTRATION_HPP
diff --git a/3rdparty/asio/include/asio/buffered_read_stream.hpp b/3rdparty/asio/include/asio/buffered_read_stream.hpp
index 7ed91dc2e24..264f66c55d8 100644
--- a/3rdparty/asio/include/asio/buffered_read_stream.hpp
+++ b/3rdparty/asio/include/asio/buffered_read_stream.hpp
@@ -2,7 +2,7 @@
// buffered_read_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -30,6 +30,12 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_buffered_fill;
+template <typename> class initiate_async_buffered_read_some;
+
+} // namespace detail
/// Adds buffering to the read-related operations of a stream.
/**
@@ -49,7 +55,7 @@ class buffered_read_stream
{
public:
/// The type of the next layer.
- typedef typename remove_reference<Stream>::type next_layer_type;
+ typedef remove_reference_t<Stream> next_layer_type;
/// The type of the lowest layer.
typedef typename next_layer_type::lowest_layer_type lowest_layer_type;
@@ -66,16 +72,17 @@ public:
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- explicit buffered_read_stream(Arg& a)
- : next_layer_(a),
+ explicit buffered_read_stream(Arg&& a)
+ : next_layer_(static_cast<Arg&&>(a)),
storage_(default_buffer_size)
{
}
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- buffered_read_stream(Arg& a, std::size_t buffer_size)
- : next_layer_(a),
+ buffered_read_stream(Arg&& a,
+ std::size_t buffer_size)
+ : next_layer_(static_cast<Arg&&>(a)),
storage_(buffer_size)
{
}
@@ -99,7 +106,7 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return next_layer_.lowest_layer().get_executor();
}
@@ -136,18 +143,21 @@ public:
/// Start an asynchronous write. The data being written must be valid for the
/// lifetime of the asynchronous operation.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) WriteHandler = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<conditional_t<true, Stream&, WriteHandler>>().async_write_some(
+ buffers, static_cast<WriteHandler&&>(handler)))
{
return next_layer_.async_write_some(buffers,
- ASIO_MOVE_CAST(WriteHandler)(handler));
+ static_cast<WriteHandler&&>(handler));
}
/// Fill the buffer with some data. Returns the number of bytes placed in the
@@ -159,15 +169,20 @@ public:
std::size_t fill(asio::error_code& ec);
/// Start an asynchronous fill.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_fill(
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type));
+ std::size_t)) ReadHandler = default_completion_token_t<executor_type>>
+ auto async_fill(
+ ReadHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_fill<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>()));
/// Read some data from the stream. Returns the number of bytes read. Throws
/// an exception on failure.
@@ -182,15 +197,20 @@ public:
/// Start an asynchronous read. The buffer into which the data will be read
/// must be valid for the lifetime of the asynchronous operation.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type));
+ std::size_t)) ReadHandler = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_read_some<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>(), buffers));
/// Peek at the incoming data on the stream. Returns the number of bytes read.
/// Throws an exception on failure.
diff --git a/3rdparty/asio/include/asio/buffered_read_stream_fwd.hpp b/3rdparty/asio/include/asio/buffered_read_stream_fwd.hpp
index f189b27aadf..d98aa70483a 100644
--- a/3rdparty/asio/include/asio/buffered_read_stream_fwd.hpp
+++ b/3rdparty/asio/include/asio/buffered_read_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_read_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/buffered_stream.hpp b/3rdparty/asio/include/asio/buffered_stream.hpp
index 5d71bf66105..e0e1b47b792 100644
--- a/3rdparty/asio/include/asio/buffered_stream.hpp
+++ b/3rdparty/asio/include/asio/buffered_stream.hpp
@@ -2,7 +2,7 @@
// buffered_stream.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -46,7 +46,7 @@ class buffered_stream
{
public:
/// The type of the next layer.
- typedef typename remove_reference<Stream>::type next_layer_type;
+ typedef remove_reference_t<Stream> next_layer_type;
/// The type of the lowest layer.
typedef typename next_layer_type::lowest_layer_type lowest_layer_type;
@@ -56,17 +56,17 @@ public:
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- explicit buffered_stream(Arg& a)
- : inner_stream_impl_(a),
+ explicit buffered_stream(Arg&& a)
+ : inner_stream_impl_(static_cast<Arg&&>(a)),
stream_impl_(inner_stream_impl_)
{
}
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- explicit buffered_stream(Arg& a, std::size_t read_buffer_size,
- std::size_t write_buffer_size)
- : inner_stream_impl_(a, write_buffer_size),
+ explicit buffered_stream(Arg&& a,
+ std::size_t read_buffer_size, std::size_t write_buffer_size)
+ : inner_stream_impl_(static_cast<Arg&&>(a), write_buffer_size),
stream_impl_(inner_stream_impl_, read_buffer_size)
{
}
@@ -90,7 +90,7 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return stream_impl_.lowest_layer().get_executor();
}
@@ -125,18 +125,21 @@ public:
}
/// Start an asynchronous flush.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_flush(
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) WriteHandler = default_completion_token_t<executor_type>>
+ auto async_flush(
+ WriteHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<buffered_write_stream<Stream>&>().async_flush(
+ static_cast<WriteHandler&&>(handler)))
{
return stream_impl_.next_layer().async_flush(
- ASIO_MOVE_CAST(WriteHandler)(handler));
+ static_cast<WriteHandler&&>(handler));
}
/// Write the given data to the stream. Returns the number of bytes written.
@@ -158,18 +161,21 @@ public:
/// Start an asynchronous write. The data being written must be valid for the
/// lifetime of the asynchronous operation.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) WriteHandler = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<Stream&>().async_write_some(buffers,
+ static_cast<WriteHandler&&>(handler)))
{
return stream_impl_.async_write_some(buffers,
- ASIO_MOVE_CAST(WriteHandler)(handler));
+ static_cast<WriteHandler&&>(handler));
}
/// Fill the buffer with some data. Returns the number of bytes placed in the
@@ -187,17 +193,21 @@ public:
}
/// Start an asynchronous fill.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_fill(
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) ReadHandler = default_completion_token_t<executor_type>>
+ auto async_fill(
+ ReadHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<buffered_read_stream<
+ buffered_write_stream<Stream>>&>().async_fill(
+ static_cast<ReadHandler&&>(handler)))
{
- return stream_impl_.async_fill(ASIO_MOVE_CAST(ReadHandler)(handler));
+ return stream_impl_.async_fill(static_cast<ReadHandler&&>(handler));
}
/// Read some data from the stream. Returns the number of bytes read. Throws
@@ -219,18 +229,21 @@ public:
/// Start an asynchronous read. The buffer into which the data will be read
/// must be valid for the lifetime of the asynchronous operation.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) ReadHandler = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<Stream&>().async_read_some(buffers,
+ static_cast<ReadHandler&&>(handler)))
{
return stream_impl_.async_read_some(buffers,
- ASIO_MOVE_CAST(ReadHandler)(handler));
+ static_cast<ReadHandler&&>(handler));
}
/// Peek at the incoming data on the stream. Returns the number of bytes read.
diff --git a/3rdparty/asio/include/asio/buffered_stream_fwd.hpp b/3rdparty/asio/include/asio/buffered_stream_fwd.hpp
index d970cbba7a0..790c76269f9 100644
--- a/3rdparty/asio/include/asio/buffered_stream_fwd.hpp
+++ b/3rdparty/asio/include/asio/buffered_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/buffered_write_stream.hpp b/3rdparty/asio/include/asio/buffered_write_stream.hpp
index 526cd602916..f8f0538dcea 100644
--- a/3rdparty/asio/include/asio/buffered_write_stream.hpp
+++ b/3rdparty/asio/include/asio/buffered_write_stream.hpp
@@ -2,7 +2,7 @@
// buffered_write_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -30,6 +30,12 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_buffered_flush;
+template <typename> class initiate_async_buffered_write_some;
+
+} // namespace detail
/// Adds buffering to the write-related operations of a stream.
/**
@@ -49,7 +55,7 @@ class buffered_write_stream
{
public:
/// The type of the next layer.
- typedef typename remove_reference<Stream>::type next_layer_type;
+ typedef remove_reference_t<Stream> next_layer_type;
/// The type of the lowest layer.
typedef typename next_layer_type::lowest_layer_type lowest_layer_type;
@@ -66,16 +72,17 @@ public:
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- explicit buffered_write_stream(Arg& a)
- : next_layer_(a),
+ explicit buffered_write_stream(Arg&& a)
+ : next_layer_(static_cast<Arg&&>(a)),
storage_(default_buffer_size)
{
}
/// Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
- buffered_write_stream(Arg& a, std::size_t buffer_size)
- : next_layer_(a),
+ buffered_write_stream(Arg&& a,
+ std::size_t buffer_size)
+ : next_layer_(static_cast<Arg&&>(a)),
storage_(buffer_size)
{
}
@@ -99,7 +106,7 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return next_layer_.lowest_layer().get_executor();
}
@@ -128,15 +135,20 @@ public:
std::size_t flush(asio::error_code& ec);
/// Start an asynchronous flush.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_flush(
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type));
+ std::size_t)) WriteHandler = default_completion_token_t<executor_type>>
+ auto async_flush(
+ WriteHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_flush<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>()));
/// Write the given data to the stream. Returns the number of bytes written.
/// Throws an exception on failure.
@@ -151,15 +163,20 @@ public:
/// Start an asynchronous write. The data being written must be valid for the
/// lifetime of the asynchronous operation.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type));
+ std::size_t)) WriteHandler = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_write_some<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>(), buffers));
/// Read some data from the stream. Returns the number of bytes read. Throws
/// an exception on failure.
@@ -180,18 +197,21 @@ public:
/// Start an asynchronous read. The buffer into which the data will be read
/// must be valid for the lifetime of the asynchronous operation.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ */
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) ReadHandler = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadHandler&& handler = default_completion_token_t<executor_type>())
+ -> decltype(
+ declval<conditional_t<true, Stream&, ReadHandler>>().async_read_some(
+ buffers, static_cast<ReadHandler&&>(handler)))
{
return next_layer_.async_read_some(buffers,
- ASIO_MOVE_CAST(ReadHandler)(handler));
+ static_cast<ReadHandler&&>(handler));
}
/// Peek at the incoming data on the stream. Returns the number of bytes read.
diff --git a/3rdparty/asio/include/asio/buffered_write_stream_fwd.hpp b/3rdparty/asio/include/asio/buffered_write_stream_fwd.hpp
index 8999d9e4c21..809f44af03d 100644
--- a/3rdparty/asio/include/asio/buffered_write_stream_fwd.hpp
+++ b/3rdparty/asio/include/asio/buffered_write_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_write_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/buffers_iterator.hpp b/3rdparty/asio/include/asio/buffers_iterator.hpp
index 76b734a6448..2c6d720787c 100644
--- a/3rdparty/asio/include/asio/buffers_iterator.hpp
+++ b/3rdparty/asio/include/asio/buffers_iterator.hpp
@@ -2,7 +2,7 @@
// buffers_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -38,7 +38,7 @@ namespace detail
template <typename ByteType>
struct byte_type
{
- typedef typename add_const<ByteType>::type type;
+ typedef add_const_t<ByteType> type;
};
};
@@ -80,7 +80,7 @@ namespace detail
struct buffers_iterator_types<const_buffer, ByteType>
{
typedef const_buffer buffer_type;
- typedef typename add_const<ByteType>::type byte_type;
+ typedef add_const_t<ByteType> byte_type;
typedef const const_buffer* const_iterator;
};
@@ -98,7 +98,7 @@ namespace detail
struct buffers_iterator_types<const_buffers_1, ByteType>
{
typedef const_buffer buffer_type;
- typedef typename add_const<ByteType>::type byte_type;
+ typedef add_const_t<ByteType> byte_type;
typedef const const_buffer* const_iterator;
};
diff --git a/3rdparty/asio/include/asio/cancellation_signal.hpp b/3rdparty/asio/include/asio/cancellation_signal.hpp
index afbaecdaf40..43540ac3b08 100644
--- a/3rdparty/asio/include/asio/cancellation_signal.hpp
+++ b/3rdparty/asio/include/asio/cancellation_signal.hpp
@@ -2,7 +2,7 @@
// cancellation_signal.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -21,10 +21,7 @@
#include <utility>
#include "asio/cancellation_type.hpp"
#include "asio/detail/cstddef.hpp"
-#include "asio/detail/thread_context.hpp"
-#include "asio/detail/thread_info_base.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/detail/push_options.hpp"
@@ -35,7 +32,7 @@ class cancellation_handler_base
{
public:
virtual void call(cancellation_type_t) = 0;
- virtual std::pair<void*, std::size_t> destroy() ASIO_NOEXCEPT = 0;
+ virtual std::pair<void*, std::size_t> destroy() noexcept = 0;
protected:
~cancellation_handler_base() {}
@@ -46,45 +43,26 @@ class cancellation_handler
: public cancellation_handler_base
{
public:
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename... Args>
- cancellation_handler(std::size_t size, ASIO_MOVE_ARG(Args)... args)
- : handler_(ASIO_MOVE_CAST(Args)(args)...),
+ cancellation_handler(std::size_t size, Args&&... args)
+ : handler_(static_cast<Args&&>(args)...),
size_(size)
{
}
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- cancellation_handler(std::size_t size)
- : handler_(),
- size_(size)
- {
- }
-
-#define ASIO_PRIVATE_HANDLER_CTOR_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- cancellation_handler(std::size_t size, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- : handler_(ASIO_VARIADIC_MOVE_ARGS(n)), \
- size_(size) \
- { \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_HANDLER_CTOR_DEF)
-#undef ASIO_PRIVATE_HANDLER_CTOR_DEF
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
void call(cancellation_type_t type)
{
handler_(type);
}
- std::pair<void*, std::size_t> destroy() ASIO_NOEXCEPT
+ std::pair<void*, std::size_t> destroy() noexcept
{
std::pair<void*, std::size_t> mem(this, size_);
this->cancellation_handler::~cancellation_handler();
return mem;
}
- Handler& handler() ASIO_NOEXCEPT
+ Handler& handler() noexcept
{
return handler_;
}
@@ -106,22 +84,12 @@ class cancellation_slot;
class cancellation_signal
{
public:
- ASIO_CONSTEXPR cancellation_signal()
+ constexpr cancellation_signal()
: handler_(0)
{
}
- ~cancellation_signal()
- {
- if (handler_)
- {
- std::pair<void*, std::size_t> mem = handler_->destroy();
- detail::thread_info_base::deallocate(
- detail::thread_info_base::cancellation_signal_tag(),
- detail::thread_context::top_of_thread_call_stack(),
- mem.first, mem.second);
- }
- }
+ ASIO_DECL ~cancellation_signal();
/// Emits the signal and causes invocation of the slot's handler, if any.
void emit(cancellation_type_t type)
@@ -135,11 +103,11 @@ public:
* The signal object must remain valid for as long the slot may be used.
* Destruction of the signal invalidates the slot.
*/
- cancellation_slot slot() ASIO_NOEXCEPT;
+ cancellation_slot slot() noexcept;
private:
- cancellation_signal(const cancellation_signal&) ASIO_DELETED;
- cancellation_signal& operator=(const cancellation_signal&) ASIO_DELETED;
+ cancellation_signal(const cancellation_signal&) = delete;
+ cancellation_signal& operator=(const cancellation_signal&) = delete;
detail::cancellation_handler_base* handler_;
};
@@ -149,13 +117,11 @@ class cancellation_slot
{
public:
/// Creates a slot that is not connected to any cancellation signal.
- ASIO_CONSTEXPR cancellation_slot()
+ constexpr cancellation_slot()
: handler_(0)
{
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
/// Installs a handler into the slot, constructing the new object directly.
/**
* Destroys any existing handler in the slot, then installs the new handler,
@@ -174,58 +140,21 @@ public:
* be copy constructible or move constructible.
*/
template <typename CancellationHandler, typename... Args>
- CancellationHandler& emplace(ASIO_MOVE_ARG(Args)... args)
+ CancellationHandler& emplace(Args&&... args)
{
typedef detail::cancellation_handler<CancellationHandler>
cancellation_handler_type;
auto_delete_helper del = { prepare_memory(
sizeof(cancellation_handler_type),
- ASIO_ALIGNOF(CancellationHandler)) };
+ alignof(CancellationHandler)) };
cancellation_handler_type* handler_obj =
new (del.mem.first) cancellation_handler_type(
- del.mem.second, ASIO_MOVE_CAST(Args)(args)...);
- del.mem.first = 0;
- *handler_ = handler_obj;
- return handler_obj->handler();
- }
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
- template <typename CancellationHandler>
- CancellationHandler& emplace()
- {
- typedef detail::cancellation_handler<CancellationHandler>
- cancellation_handler_type;
- auto_delete_helper del = { prepare_memory(
- sizeof(cancellation_handler_type),
- ASIO_ALIGNOF(CancellationHandler)) };
- cancellation_handler_type* handler_obj =
- new (del.mem.first) cancellation_handler_type(del.mem.second);
+ del.mem.second, static_cast<Args&&>(args)...);
del.mem.first = 0;
*handler_ = handler_obj;
return handler_obj->handler();
}
-#define ASIO_PRIVATE_HANDLER_EMPLACE_DEF(n) \
- template <typename CancellationHandler, ASIO_VARIADIC_TPARAMS(n)> \
- CancellationHandler& emplace(ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- typedef detail::cancellation_handler<CancellationHandler> \
- cancellation_handler_type; \
- auto_delete_helper del = { prepare_memory( \
- sizeof(cancellation_handler_type), \
- ASIO_ALIGNOF(CancellationHandler)) }; \
- cancellation_handler_type* handler_obj = \
- new (del.mem.first) cancellation_handler_type( \
- del.mem.second, ASIO_VARIADIC_MOVE_ARGS(n)); \
- del.mem.first = 0; \
- *handler_ = handler_obj; \
- return handler_obj->handler(); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_HANDLER_EMPLACE_DEF)
-#undef ASIO_PRIVATE_HANDLER_EMPLACE_DEF
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
/// Installs a handler into the slot.
/**
* Destroys any existing handler in the slot, then installs the new handler,
@@ -240,52 +169,40 @@ public:
* @returns A reference to the newly installed handler.
*/
template <typename CancellationHandler>
- typename decay<CancellationHandler>::type& assign(
- ASIO_MOVE_ARG(CancellationHandler) handler)
+ decay_t<CancellationHandler>& assign(CancellationHandler&& handler)
{
- return this->emplace<typename decay<CancellationHandler>::type>(
- ASIO_MOVE_CAST(CancellationHandler)(handler));
+ return this->emplace<decay_t<CancellationHandler>>(
+ static_cast<CancellationHandler&&>(handler));
}
/// Clears the slot.
/**
* Destroys any existing handler in the slot.
*/
- void clear()
- {
- if (handler_ != 0 && *handler_ != 0)
- {
- std::pair<void*, std::size_t> mem = (*handler_)->destroy();
- detail::thread_info_base::deallocate(
- detail::thread_info_base::cancellation_signal_tag(),
- detail::thread_context::top_of_thread_call_stack(),
- mem.first, mem.second);
- *handler_ = 0;
- }
- }
+ ASIO_DECL void clear();
/// Returns whether the slot is connected to a signal.
- ASIO_CONSTEXPR bool is_connected() const ASIO_NOEXCEPT
+ constexpr bool is_connected() const noexcept
{
return handler_ != 0;
}
/// Returns whether the slot is connected and has an installed handler.
- ASIO_CONSTEXPR bool has_handler() const ASIO_NOEXCEPT
+ constexpr bool has_handler() const noexcept
{
return handler_ != 0 && *handler_ != 0;
}
/// Compare two slots for equality.
- friend ASIO_CONSTEXPR bool operator==(const cancellation_slot& lhs,
- const cancellation_slot& rhs) ASIO_NOEXCEPT
+ friend constexpr bool operator==(const cancellation_slot& lhs,
+ const cancellation_slot& rhs) noexcept
{
return lhs.handler_ == rhs.handler_;
}
/// Compare two slots for inequality.
- friend ASIO_CONSTEXPR bool operator!=(const cancellation_slot& lhs,
- const cancellation_slot& rhs) ASIO_NOEXCEPT
+ friend constexpr bool operator!=(const cancellation_slot& lhs,
+ const cancellation_slot& rhs) noexcept
{
return lhs.handler_ != rhs.handler_;
}
@@ -293,61 +210,26 @@ public:
private:
friend class cancellation_signal;
- ASIO_CONSTEXPR cancellation_slot(int,
+ constexpr cancellation_slot(int,
detail::cancellation_handler_base** handler)
: handler_(handler)
{
}
- std::pair<void*, std::size_t> prepare_memory(
- std::size_t size, std::size_t align)
- {
- assert(handler_);
- std::pair<void*, std::size_t> mem;
- if (*handler_)
- {
- mem = (*handler_)->destroy();
- *handler_ = 0;
- }
- if (size > mem.second
- || reinterpret_cast<std::size_t>(mem.first) % align != 0)
- {
- if (mem.first)
- {
- detail::thread_info_base::deallocate(
- detail::thread_info_base::cancellation_signal_tag(),
- detail::thread_context::top_of_thread_call_stack(),
- mem.first, mem.second);
- }
- mem.first = detail::thread_info_base::allocate(
- detail::thread_info_base::cancellation_signal_tag(),
- detail::thread_context::top_of_thread_call_stack(),
- size, align);
- mem.second = size;
- }
- return mem;
- }
+ ASIO_DECL std::pair<void*, std::size_t> prepare_memory(
+ std::size_t size, std::size_t align);
struct auto_delete_helper
{
std::pair<void*, std::size_t> mem;
- ~auto_delete_helper()
- {
- if (mem.first)
- {
- detail::thread_info_base::deallocate(
- detail::thread_info_base::cancellation_signal_tag(),
- detail::thread_context::top_of_thread_call_stack(),
- mem.first, mem.second);
- }
- }
+ ASIO_DECL ~auto_delete_helper();
};
detail::cancellation_handler_base** handler_;
};
-inline cancellation_slot cancellation_signal::slot() ASIO_NOEXCEPT
+inline cancellation_slot cancellation_signal::slot() noexcept
{
return cancellation_slot(0, &handler_);
}
@@ -356,4 +238,8 @@ inline cancellation_slot cancellation_signal::slot() ASIO_NOEXCEPT
#include "asio/detail/pop_options.hpp"
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/impl/cancellation_signal.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
#endif // ASIO_CANCELLATION_SIGNAL_HPP
diff --git a/3rdparty/asio/include/asio/cancellation_state.hpp b/3rdparty/asio/include/asio/cancellation_state.hpp
index 868d8d678cc..3c13edcab94 100644
--- a/3rdparty/asio/include/asio/cancellation_state.hpp
+++ b/3rdparty/asio/include/asio/cancellation_state.hpp
@@ -2,7 +2,7 @@
// cancellation_state.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -32,7 +32,7 @@ struct cancellation_filter
{
/// Returns <tt>type & Mask</tt>.
cancellation_type_t operator()(
- cancellation_type_t type) const ASIO_NOEXCEPT
+ cancellation_type_t type) const noexcept
{
return type & Mask;
}
@@ -80,7 +80,7 @@ class cancellation_state
{
public:
/// Construct a disconnected cancellation state.
- ASIO_CONSTEXPR cancellation_state() ASIO_NOEXCEPT
+ constexpr cancellation_state() noexcept
: impl_(0)
{
}
@@ -95,8 +95,8 @@ public:
* attached.
*/
template <typename CancellationSlot>
- ASIO_CONSTEXPR explicit cancellation_state(CancellationSlot slot)
- : impl_(slot.is_connected() ? &slot.template emplace<impl<> >() : 0)
+ constexpr explicit cancellation_state(CancellationSlot slot)
+ : impl_(slot.is_connected() ? &slot.template emplace<impl<>>() : 0)
{
}
@@ -119,9 +119,9 @@ public:
* @li asio::enable_total_cancellation
*/
template <typename CancellationSlot, typename Filter>
- ASIO_CONSTEXPR cancellation_state(CancellationSlot slot, Filter filter)
+ constexpr cancellation_state(CancellationSlot slot, Filter filter)
: impl_(slot.is_connected()
- ? &slot.template emplace<impl<Filter, Filter> >(filter, filter)
+ ? &slot.template emplace<impl<Filter, Filter>>(filter, filter)
: 0)
{
}
@@ -151,12 +151,12 @@ public:
* @li asio::enable_total_cancellation
*/
template <typename CancellationSlot, typename InFilter, typename OutFilter>
- ASIO_CONSTEXPR cancellation_state(CancellationSlot slot,
+ constexpr cancellation_state(CancellationSlot slot,
InFilter in_filter, OutFilter out_filter)
: impl_(slot.is_connected()
- ? &slot.template emplace<impl<InFilter, OutFilter> >(
- ASIO_MOVE_CAST(InFilter)(in_filter),
- ASIO_MOVE_CAST(OutFilter)(out_filter))
+ ? &slot.template emplace<impl<InFilter, OutFilter>>(
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter))
: 0)
{
}
@@ -165,20 +165,20 @@ public:
/**
* This sub-slot is used with the operations that are being composed.
*/
- ASIO_CONSTEXPR cancellation_slot slot() const ASIO_NOEXCEPT
+ constexpr cancellation_slot slot() const noexcept
{
return impl_ ? impl_->signal_.slot() : cancellation_slot();
}
/// Returns the cancellation types that have been triggered.
- cancellation_type_t cancelled() const ASIO_NOEXCEPT
+ cancellation_type_t cancelled() const noexcept
{
return impl_ ? impl_->cancelled_ : cancellation_type_t();
}
/// Clears the specified cancellation types, if they have been triggered.
void clear(cancellation_type_t mask = cancellation_type::all)
- ASIO_NOEXCEPT
+ noexcept
{
if (impl_)
impl_->cancelled_ &= ~mask;
@@ -208,8 +208,8 @@ private:
}
impl(InFilter in_filter, OutFilter out_filter)
- : in_filter_(ASIO_MOVE_CAST(InFilter)(in_filter)),
- out_filter_(ASIO_MOVE_CAST(OutFilter)(out_filter))
+ : in_filter_(static_cast<InFilter&&>(in_filter)),
+ out_filter_(static_cast<OutFilter&&>(out_filter))
{
}
diff --git a/3rdparty/asio/include/asio/cancellation_type.hpp b/3rdparty/asio/include/asio/cancellation_type.hpp
index 9eff047b63d..ec4a4d2458a 100644
--- a/3rdparty/asio/include/asio/cancellation_type.hpp
+++ b/3rdparty/asio/include/asio/cancellation_type.hpp
@@ -2,7 +2,7 @@
// cancellation_type.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -51,7 +51,7 @@ enum cancellation_type
/// Portability typedef.
typedef cancellation_type cancellation_type_t;
-#elif defined(ASIO_HAS_ENUM_CLASS)
+#else // defined(GENERATING_DOCUMENTATION)
enum class cancellation_type : unsigned int
{
@@ -64,30 +64,13 @@ enum class cancellation_type : unsigned int
typedef cancellation_type cancellation_type_t;
-#else // defined(ASIO_HAS_ENUM_CLASS)
-
-namespace cancellation_type {
-
-enum cancellation_type_t
-{
- none = 0,
- terminal = 1,
- partial = 2,
- total = 4,
- all = 0xFFFFFFFF
-};
-
-} // namespace cancellation_type
-
-typedef cancellation_type::cancellation_type_t cancellation_type_t;
-
-#endif // defined(ASIO_HAS_ENUM_CLASS)
+#endif // defined(GENERATING_DOCUMENTATION)
/// Negation operator.
/**
* @relates cancellation_type
*/
-inline ASIO_CONSTEXPR bool operator!(cancellation_type_t x)
+inline constexpr bool operator!(cancellation_type_t x)
{
return static_cast<unsigned int>(x) == 0;
}
@@ -96,7 +79,7 @@ inline ASIO_CONSTEXPR bool operator!(cancellation_type_t x)
/**
* @relates cancellation_type
*/
-inline ASIO_CONSTEXPR cancellation_type_t operator&(
+inline constexpr cancellation_type_t operator&(
cancellation_type_t x, cancellation_type_t y)
{
return static_cast<cancellation_type_t>(
@@ -107,7 +90,7 @@ inline ASIO_CONSTEXPR cancellation_type_t operator&(
/**
* @relates cancellation_type
*/
-inline ASIO_CONSTEXPR cancellation_type_t operator|(
+inline constexpr cancellation_type_t operator|(
cancellation_type_t x, cancellation_type_t y)
{
return static_cast<cancellation_type_t>(
@@ -118,7 +101,7 @@ inline ASIO_CONSTEXPR cancellation_type_t operator|(
/**
* @relates cancellation_type
*/
-inline ASIO_CONSTEXPR cancellation_type_t operator^(
+inline constexpr cancellation_type_t operator^(
cancellation_type_t x, cancellation_type_t y)
{
return static_cast<cancellation_type_t>(
@@ -129,7 +112,7 @@ inline ASIO_CONSTEXPR cancellation_type_t operator^(
/**
* @relates cancellation_type
*/
-inline ASIO_CONSTEXPR cancellation_type_t operator~(cancellation_type_t x)
+inline constexpr cancellation_type_t operator~(cancellation_type_t x)
{
return static_cast<cancellation_type_t>(~static_cast<unsigned int>(x));
}
diff --git a/3rdparty/asio/include/asio/co_spawn.hpp b/3rdparty/asio/include/asio/co_spawn.hpp
index d65593d69f4..26988f47da0 100644
--- a/3rdparty/asio/include/asio/co_spawn.hpp
+++ b/3rdparty/asio/include/asio/co_spawn.hpp
@@ -2,7 +2,7 @@
// co_spawn.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -54,11 +54,14 @@ struct awaitable_signature<awaitable<void, Executor>>
* @param a The asio::awaitable object that is the result of calling the
* coroutine's entry point function.
*
- * @param token The completion token that will handle the notification that
+ * @param token The @ref completion_token that will handle the notification that
* the thread of execution has completed. The function signature of the
* completion handler must be:
* @code void handler(std::exception_ptr, T); @endcode
*
+ * @par Completion Signature
+ * @code void(std::exception_ptr, T) @endcode
+ *
* @par Example
* @code
* asio::awaitable<std::size_t> echo(tcp::socket socket)
@@ -110,10 +113,10 @@ inline ASIO_INITFN_AUTO_RESULT_TYPE(
co_spawn(const Executor& ex, awaitable<T, AwaitableExecutor> a,
CompletionToken&& token
ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<
+ constraint_t<
(is_executor<Executor>::value || execution::is_executor<Executor>::value)
&& is_convertible<Executor, AwaitableExecutor>::value
- >::type = 0);
+ > = 0);
/// Spawn a new coroutined-based thread of execution.
/**
@@ -123,11 +126,14 @@ co_spawn(const Executor& ex, awaitable<T, AwaitableExecutor> a,
* @param a The asio::awaitable object that is the result of calling the
* coroutine's entry point function.
*
- * @param token The completion token that will handle the notification that
+ * @param token The @ref completion_token that will handle the notification that
* the thread of execution has completed. The function signature of the
* completion handler must be:
* @code void handler(std::exception_ptr); @endcode
*
+ * @par Completion Signature
+ * @code void(std::exception_ptr) @endcode
+ *
* @par Example
* @code
* asio::awaitable<void> echo(tcp::socket socket)
@@ -171,10 +177,10 @@ inline ASIO_INITFN_AUTO_RESULT_TYPE(
co_spawn(const Executor& ex, awaitable<void, AwaitableExecutor> a,
CompletionToken&& token
ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<
+ constraint_t<
(is_executor<Executor>::value || execution::is_executor<Executor>::value)
&& is_convertible<Executor, AwaitableExecutor>::value
- >::type = 0);
+ > = 0);
/// Spawn a new coroutined-based thread of execution.
/**
@@ -184,11 +190,14 @@ co_spawn(const Executor& ex, awaitable<void, AwaitableExecutor> a,
* @param a The asio::awaitable object that is the result of calling the
* coroutine's entry point function.
*
- * @param token The completion token that will handle the notification that
+ * @param token The @ref completion_token that will handle the notification that
* the thread of execution has completed. The function signature of the
* completion handler must be:
* @code void handler(std::exception_ptr); @endcode
*
+ * @par Completion Signature
+ * @code void(std::exception_ptr, T) @endcode
+ *
* @par Example
* @code
* asio::awaitable<std::size_t> echo(tcp::socket socket)
@@ -242,11 +251,11 @@ co_spawn(ExecutionContext& ctx, awaitable<T, AwaitableExecutor> a,
CompletionToken&& token
ASIO_DEFAULT_COMPLETION_TOKEN(
typename ExecutionContext::executor_type),
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
&& is_convertible<typename ExecutionContext::executor_type,
AwaitableExecutor>::value
- >::type = 0);
+ > = 0);
/// Spawn a new coroutined-based thread of execution.
/**
@@ -256,11 +265,14 @@ co_spawn(ExecutionContext& ctx, awaitable<T, AwaitableExecutor> a,
* @param a The asio::awaitable object that is the result of calling the
* coroutine's entry point function.
*
- * @param token The completion token that will handle the notification that
+ * @param token The @ref completion_token that will handle the notification that
* the thread of execution has completed. The function signature of the
* completion handler must be:
* @code void handler(std::exception_ptr); @endcode
*
+ * @par Completion Signature
+ * @code void(std::exception_ptr) @endcode
+ *
* @par Example
* @code
* asio::awaitable<void> echo(tcp::socket socket)
@@ -306,11 +318,11 @@ co_spawn(ExecutionContext& ctx, awaitable<void, AwaitableExecutor> a,
CompletionToken&& token
ASIO_DEFAULT_COMPLETION_TOKEN(
typename ExecutionContext::executor_type),
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
&& is_convertible<typename ExecutionContext::executor_type,
AwaitableExecutor>::value
- >::type = 0);
+ > = 0);
/// Spawn a new coroutined-based thread of execution.
/**
@@ -321,14 +333,20 @@ co_spawn(ExecutionContext& ctx, awaitable<void, AwaitableExecutor> a,
* @c asio::awaitable<R,E> that will be used as the coroutine's entry
* point.
*
- * @param token The completion token that will handle the notification that the
- * thread of execution has completed. If @c R is @c void, the function
+ * @param token The @ref completion_token that will handle the notification
+ * that the thread of execution has completed. If @c R is @c void, the function
* signature of the completion handler must be:
*
* @code void handler(std::exception_ptr); @endcode
* Otherwise, the function signature of the completion handler must be:
* @code void handler(std::exception_ptr, R); @endcode
*
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the first template argument to the @c awaitable returned by the
+ * supplied function object @c F:
+ * @code asio::awaitable<R, AwaitableExecutor> F() @endcode
+ *
* @par Example
* @code
* asio::awaitable<std::size_t> echo(tcp::socket socket)
@@ -388,16 +406,16 @@ co_spawn(ExecutionContext& ctx, awaitable<void, AwaitableExecutor> a,
*/
template <typename Executor, typename F,
ASIO_COMPLETION_TOKEN_FOR(typename detail::awaitable_signature<
- typename result_of<F()>::type>::type) CompletionToken
+ result_of_t<F()>>::type) CompletionToken
ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
- typename detail::awaitable_signature<typename result_of<F()>::type>::type)
+ typename detail::awaitable_signature<result_of_t<F()>>::type)
co_spawn(const Executor& ex, F&& f,
CompletionToken&& token
ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<
+ constraint_t<
is_executor<Executor>::value || execution::is_executor<Executor>::value
- >::type = 0);
+ > = 0);
/// Spawn a new coroutined-based thread of execution.
/**
@@ -408,14 +426,20 @@ co_spawn(const Executor& ex, F&& f,
* @c asio::awaitable<R,E> that will be used as the coroutine's entry
* point.
*
- * @param token The completion token that will handle the notification that the
- * thread of execution has completed. If @c R is @c void, the function
+ * @param token The @ref completion_token that will handle the notification
+ * that the thread of execution has completed. If @c R is @c void, the function
* signature of the completion handler must be:
*
* @code void handler(std::exception_ptr); @endcode
* Otherwise, the function signature of the completion handler must be:
* @code void handler(std::exception_ptr, R); @endcode
*
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the first template argument to the @c awaitable returned by the
+ * supplied function object @c F:
+ * @code asio::awaitable<R, AwaitableExecutor> F() @endcode
+ *
* @par Example
* @code
* asio::awaitable<std::size_t> echo(tcp::socket socket)
@@ -475,18 +499,18 @@ co_spawn(const Executor& ex, F&& f,
*/
template <typename ExecutionContext, typename F,
ASIO_COMPLETION_TOKEN_FOR(typename detail::awaitable_signature<
- typename result_of<F()>::type>::type) CompletionToken
+ result_of_t<F()>>::type) CompletionToken
ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
typename ExecutionContext::executor_type)>
ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
- typename detail::awaitable_signature<typename result_of<F()>::type>::type)
+ typename detail::awaitable_signature<result_of_t<F()>>::type)
co_spawn(ExecutionContext& ctx, F&& f,
CompletionToken&& token
ASIO_DEFAULT_COMPLETION_TOKEN(
typename ExecutionContext::executor_type),
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0);
+ > = 0);
} // namespace asio
diff --git a/3rdparty/asio/include/asio/completion_condition.hpp b/3rdparty/asio/include/asio/completion_condition.hpp
index cf8c7c2bc92..3fe774f1ef1 100644
--- a/3rdparty/asio/include/asio/completion_condition.hpp
+++ b/3rdparty/asio/include/asio/completion_condition.hpp
@@ -2,7 +2,7 @@
// completion_condition.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/compose.hpp b/3rdparty/asio/include/asio/compose.hpp
index 3f6f1b88978..abb438e3da7 100644
--- a/3rdparty/asio/include/asio/compose.hpp
+++ b/3rdparty/asio/include/asio/compose.hpp
@@ -2,7 +2,7 @@
// compose.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,14 +16,196 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/associated_executor.hpp"
#include "asio/async_result.hpp"
+#include "asio/detail/base_from_cancellation_state.hpp"
+#include "asio/detail/composed_work.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
+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
+ : 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.
/**
@@ -37,12 +219,19 @@ namespace asio {
* handler. The remaining arguments are any arguments that originate from the
* completion handlers of any asynchronous operations performed by the
* implementation.
-
+ *
* @param token 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.
*
+ * @par Per-Operation Cancellation
+ * By default, terminal per-operation cancellation is enabled for
+ * composed operations that are implemented using @c async_compose. 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
@@ -87,9 +276,11 @@ namespace asio {
* auto async_echo(tcp::socket& socket,
* asio::mutable_buffer buffer,
* CompletionToken&& token) ->
- * typename asio::async_result<
- * typename std::decay<CompletionToken>::type,
- * void(asio::error_code, std::size_t)>::return_type
+ * decltype(
+ * asio::async_compose<CompletionToken,
+ * void(asio::error_code, std::size_t)>(
+ * std::declval<async_echo_implementation>(),
+ * token, socket))
* {
* return asio::async_compose<CompletionToken,
* void(asio::error_code, std::size_t)>(
@@ -100,37 +291,29 @@ namespace asio {
*/
template <typename CompletionToken, typename Signature,
typename Implementation, typename... IoObjectsOrExecutors>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, Signature)
-async_compose(ASIO_MOVE_ARG(Implementation) implementation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token,
- ASIO_MOVE_ARG(IoObjectsOrExecutors)... io_objects_or_executors);
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
-template <typename CompletionToken, typename Signature, typename Implementation>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, Signature)
-async_compose(ASIO_MOVE_ARG(Implementation) implementation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token);
-
-#define ASIO_PRIVATE_ASYNC_COMPOSE_DEF(n) \
- template <typename CompletionToken, typename Signature, \
- typename Implementation, ASIO_VARIADIC_TPARAMS(n)> \
- ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, Signature) \
- async_compose(ASIO_MOVE_ARG(Implementation) implementation, \
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n));
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ASYNC_COMPOSE_DEF)
-#undef ASIO_PRIVATE_ASYNC_COMPOSE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
+auto async_compose(Implementation&& implementation,
+ type_identity_t<CompletionToken>& token,
+ IoObjectsOrExecutors&&... io_objects_or_executors)
+ -> decltype(
+ async_initiate<CompletionToken, Signature>(
+ 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>(
+ 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
#include "asio/detail/pop_options.hpp"
-#include "asio/impl/compose.hpp"
-
#endif // ASIO_COMPOSE_HPP
diff --git a/3rdparty/asio/include/asio/connect.hpp b/3rdparty/asio/include/asio/connect.hpp
index ff22a670b17..d2916675455 100644
--- a/3rdparty/asio/include/asio/connect.hpp
+++ b/3rdparty/asio/include/asio/connect.hpp
@@ -2,7 +2,7 @@
// connect.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -27,6 +27,10 @@ namespace asio {
namespace detail
{
+ struct default_connect_condition;
+ template <typename, typename> class initiate_async_range_connect;
+ template <typename, typename> class initiate_async_iterator_connect;
+
char (&has_iterator_helper(...))[2];
template <typename T>
@@ -90,8 +94,7 @@ struct is_endpoint_sequence
template <typename Protocol, typename Executor, typename EndpointSequence>
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints,
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
/// Establishes a socket connection by trying each endpoint in a sequence.
/**
@@ -126,8 +129,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, asio::error_code& ec,
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: Use range overload.) Establishes a socket connection by trying
@@ -156,7 +158,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,
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type = 0);
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
/// (Deprecated: Use range overload.) Establishes a socket connection by trying
/// each endpoint in a sequence.
@@ -185,7 +187,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, asio::error_code& ec,
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type = 0);
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
#endif // !defined(ASIO_NO_DEPRECATED)
/// Establishes a socket connection by trying each endpoint in a sequence.
@@ -311,8 +313,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,
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
/// Establishes a socket connection by trying each endpoint in a sequence.
/**
@@ -379,8 +380,7 @@ template <typename Protocol, typename Executor,
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
asio::error_code& ec,
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type = 0);
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0);
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: Use range overload.) Establishes a socket connection by trying
@@ -422,7 +422,7 @@ template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, ConnectCondition connect_condition,
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type = 0);
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
/// (Deprecated: Use range overload.) Establishes a socket connection by trying
/// each endpoint in a sequence.
@@ -463,7 +463,7 @@ template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
ConnectCondition connect_condition, asio::error_code& ec,
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type = 0);
+ constraint_t<!is_endpoint_sequence<Iterator>::value> = 0);
#endif // !defined(ASIO_NO_DEPRECATED)
/// Establishes a socket connection by trying each endpoint in a sequence.
@@ -610,16 +610,19 @@ Iterator connect(basic_socket<Protocol, Executor>& s,
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
*
* @param endpoints A sequence of endpoints.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -631,10 +634,13 @@ Iterator connect(basic_socket<Protocol, Executor>& s,
* const typename Protocol::endpoint& endpoint
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, typename Protocol::endpoint) @endcode
+ *
* @par Example
* @code tcp::resolver r(my_context);
* tcp::resolver::query q("host", "service");
@@ -677,16 +683,17 @@ Iterator connect(basic_socket<Protocol, Executor>& s,
*/
template <typename Protocol, typename Executor, typename EndpointSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- typename Protocol::endpoint)) RangeConnectHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
-ASIO_INITFN_AUTO_RESULT_TYPE(RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol, Executor>& s,
+ typename Protocol::endpoint)) RangeConnectToken
+ = default_completion_token_t<Executor>>
+auto async_connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints,
- ASIO_MOVE_ARG(RangeConnectHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type = 0);
+ RangeConnectToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0)
+ -> decltype(
+ async_initiate<RangeConnectToken,
+ void (asio::error_code, typename Protocol::endpoint)>(
+ declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
+ token, endpoints, declval<detail::default_connect_condition>()));
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: Use range overload.) Asynchronously establishes a socket
@@ -695,16 +702,19 @@ async_connect(basic_socket<Protocol, Executor>& s,
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
*
* @param begin An iterator pointing to the start of a sequence of endpoints.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -716,10 +726,13 @@ async_connect(basic_socket<Protocol, Executor>& s,
* Iterator iterator
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, Iterator) @endcode
+ *
* @note This overload assumes that a default constructed object of type @c
* Iterator represents the end of the sequence. This is a valid assumption for
* iterator types such as @c asio::ip::tcp::resolver::iterator.
@@ -736,14 +749,16 @@ async_connect(basic_socket<Protocol, Executor>& s,
*/
template <typename Protocol, typename Executor, typename Iterator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- Iterator)) IteratorConnectHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
-ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type = 0);
+ Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
+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)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, Iterator(),
+ declval<detail::default_connect_condition>()));
#endif // !defined(ASIO_NO_DEPRECATED)
/// Asynchronously establishes a socket connection by trying each endpoint in a
@@ -752,7 +767,8 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
@@ -761,9 +777,11 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
*
* @param end An iterator pointing to the end of a sequence of endpoints.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -775,10 +793,13 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
* Iterator iterator
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, Iterator) @endcode
+ *
* @par Example
* @code std::vector<tcp::endpoint> endpoints = ...;
* tcp::socket s(my_context);
@@ -807,13 +828,15 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
*/
template <typename Protocol, typename Executor, typename Iterator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- Iterator)) IteratorConnectHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
-ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, Executor>& s, Iterator begin, Iterator end,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(Executor));
+ Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
+auto async_connect(
+ basic_socket<Protocol, Executor>& s, Iterator begin, Iterator end,
+ IteratorConnectToken&& token = default_completion_token_t<Executor>())
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, end, declval<detail::default_connect_condition>()));
/// Asynchronously establishes a socket connection by trying each endpoint in a
/// sequence.
@@ -821,7 +844,8 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin, Iterator end,
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
@@ -839,9 +863,11 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin, Iterator end,
* The function object should return true if the next endpoint should be tried,
* and false if it should be skipped.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -853,10 +879,13 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin, Iterator end,
* Iterator iterator
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, typename Protocol::endpoint) @endcode
+ *
* @par Example
* The following connect condition function object can be used to output
* information about the individual connection attempts:
@@ -923,16 +952,17 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin, Iterator end,
template <typename Protocol, typename Executor,
typename EndpointSequence, typename ConnectCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- typename Protocol::endpoint)) RangeConnectHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
-ASIO_INITFN_AUTO_RESULT_TYPE(RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol, Executor>& s,
+ typename Protocol::endpoint)) RangeConnectToken
+ = default_completion_token_t<Executor>>
+auto async_connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
- ASIO_MOVE_ARG(RangeConnectHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type = 0);
+ RangeConnectToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value> = 0)
+ -> decltype(
+ async_initiate<RangeConnectToken,
+ void (asio::error_code, typename Protocol::endpoint)>(
+ declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
+ token, endpoints, connect_condition));
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: Use range overload.) Asynchronously establishes a socket
@@ -941,7 +971,8 @@ async_connect(basic_socket<Protocol, Executor>& s,
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
@@ -959,9 +990,11 @@ async_connect(basic_socket<Protocol, Executor>& s,
* The function object should return true if the next endpoint should be tried,
* and false if it should be skipped.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -973,10 +1006,13 @@ async_connect(basic_socket<Protocol, Executor>& s,
* Iterator iterator
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, Iterator) @endcode
+ *
* @note This overload assumes that a default constructed object of type @c
* Iterator represents the end of the sequence. This is a valid assumption for
* iterator types such as @c asio::ip::tcp::resolver::iterator.
@@ -994,15 +1030,16 @@ async_connect(basic_socket<Protocol, Executor>& s,
template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- Iterator)) IteratorConnectHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
-ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
- ConnectCondition connect_condition,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type = 0);
+ Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
+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)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, Iterator(), connect_condition));
#endif // !defined(ASIO_NO_DEPRECATED)
/// Asynchronously establishes a socket connection by trying each endpoint in a
@@ -1011,7 +1048,8 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
* This function attempts to connect a socket to one of a sequence of
* endpoints. It does this by repeated calls to the socket's @c async_connect
* member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
+ * is successfully established. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param s The socket to be connected. If the socket is already open, it will
* be closed.
@@ -1031,9 +1069,11 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
* The function object should return true if the next endpoint should be tried,
* and false if it should be skipped.
*
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the connect completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation. if the sequence is empty, set to
* // asio::error::not_found. Otherwise, contains the
@@ -1045,10 +1085,13 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
* Iterator iterator
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, Iterator) @endcode
+ *
* @par Example
* The following connect condition function object can be used to output
* information about the individual connection attempts:
@@ -1116,14 +1159,15 @@ async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- Iterator)) IteratorConnectHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
-ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
- Iterator end, ConnectCondition connect_condition,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(Executor));
+ Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
+auto async_connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, Iterator end, ConnectCondition connect_condition,
+ IteratorConnectToken&& token = default_completion_token_t<Executor>())
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, end, connect_condition));
/*@}*/
diff --git a/3rdparty/asio/include/asio/connect_pipe.hpp b/3rdparty/asio/include/asio/connect_pipe.hpp
new file mode 100644
index 00000000000..1c9eb79383f
--- /dev/null
+++ b/3rdparty/asio/include/asio/connect_pipe.hpp
@@ -0,0 +1,83 @@
+//
+// connect_pipe.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 ASIO_CONNECT_PIPE_HPP
+#define ASIO_CONNECT_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_readable_pipe.hpp"
+#include "asio/basic_writable_pipe.hpp"
+#include "asio/error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+#if defined(ASIO_HAS_IOCP)
+typedef HANDLE native_pipe_handle;
+#else // defined(ASIO_HAS_IOCP)
+typedef int native_pipe_handle;
+#endif // defined(ASIO_HAS_IOCP)
+
+ASIO_DECL void create_pipe(native_pipe_handle p[2],
+ asio::error_code& ec);
+
+ASIO_DECL void close_pipe(native_pipe_handle p);
+
+} // namespace detail
+
+/// Connect two pipe ends using an anonymous pipe.
+/**
+ * @param read_end The read end of the pipe.
+ *
+ * @param write_end The write end of the pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ */
+template <typename Executor1, typename Executor2>
+void connect_pipe(basic_readable_pipe<Executor1>& read_end,
+ basic_writable_pipe<Executor2>& write_end);
+
+/// Connect two pipe ends using an anonymous pipe.
+/**
+ * @param read_end The read end of the pipe.
+ *
+ * @param write_end The write end of the pipe.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+template <typename Executor1, typename Executor2>
+ASIO_SYNC_OP_VOID connect_pipe(basic_readable_pipe<Executor1>& read_end,
+ basic_writable_pipe<Executor2>& write_end, asio::error_code& ec);
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/connect_pipe.hpp"
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/impl/connect_pipe.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_PIPE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_CONNECT_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/consign.hpp b/3rdparty/asio/include/asio/consign.hpp
new file mode 100644
index 00000000000..4b0bc431309
--- /dev/null
+++ b/3rdparty/asio/include/asio/consign.hpp
@@ -0,0 +1,75 @@
+//
+// consign.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 ASIO_CONSIGN_HPP
+#define ASIO_CONSIGN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Completion token type used to specify that the completion handler should
+/// carry additional values along with it.
+/**
+ * This completion token adapter is typically used to keep at least one copy of
+ * an object, such as a smart pointer, alive until the completion handler is
+ * called.
+ */
+template <typename CompletionToken, typename... Values>
+class consign_t
+{
+public:
+ /// Constructor.
+ template <typename T, typename... V>
+ constexpr explicit consign_t(T&& completion_token, V&&... values)
+ : token_(static_cast<T&&>(completion_token)),
+ values_(static_cast<V&&>(values)...)
+ {
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+private:
+#endif // defined(GENERATING_DOCUMENTATION)
+ CompletionToken token_;
+ std::tuple<Values...> values_;
+};
+
+/// Completion token adapter used to specify that the completion handler should
+/// carry additional values along with it.
+/**
+ * This completion token adapter is typically used to keep at least one copy of
+ * an object, such as a smart pointer, alive until the completion handler is
+ * called.
+ */
+template <typename CompletionToken, typename... Values>
+ASIO_NODISCARD inline constexpr
+consign_t<decay_t<CompletionToken>, decay_t<Values>...>
+consign(CompletionToken&& completion_token, Values&&... values)
+{
+ return consign_t<decay_t<CompletionToken>, decay_t<Values>...>(
+ static_cast<CompletionToken&&>(completion_token),
+ static_cast<Values&&>(values)...);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/consign.hpp"
+
+#endif // ASIO_CONSIGN_HPP
diff --git a/3rdparty/asio/include/asio/coroutine.hpp b/3rdparty/asio/include/asio/coroutine.hpp
index bb0bdba8451..036e5148ad0 100644
--- a/3rdparty/asio/include/asio/coroutine.hpp
+++ b/3rdparty/asio/include/asio/coroutine.hpp
@@ -2,7 +2,7 @@
// coroutine.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -266,6 +266,7 @@ class coroutine_ref
public:
coroutine_ref(coroutine& c) : value_(c.value_), modified_(false) {}
coroutine_ref(coroutine* c) : value_(c->value_), modified_(false) {}
+ coroutine_ref(const coroutine_ref&) = default;
~coroutine_ref() { if (!modified_) value_ = -1; }
operator int() const { return value_; }
int& operator=(int v) { modified_ = true; return value_ = v; }
diff --git a/3rdparty/asio/include/asio/deadline_timer.hpp b/3rdparty/asio/include/asio/deadline_timer.hpp
index 73872c8d357..dfa0b9ca169 100644
--- a/3rdparty/asio/include/asio/deadline_timer.hpp
+++ b/3rdparty/asio/include/asio/deadline_timer.hpp
@@ -2,7 +2,7 @@
// deadline_timer.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/defer.hpp b/3rdparty/asio/include/asio/defer.hpp
index b0829e83848..608debe4d91 100644
--- a/3rdparty/asio/include/asio/defer.hpp
+++ b/3rdparty/asio/include/asio/defer.hpp
@@ -2,7 +2,7 @@
// defer.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,10 +17,13 @@
#include "asio/detail/config.hpp"
#include "asio/async_result.hpp"
+#include "asio/detail/initiate_defer.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution_context.hpp"
+#include "asio/execution/blocking.hpp"
#include "asio/execution/executor.hpp"
#include "asio/is_executor.hpp"
+#include "asio/require.hpp"
#include "asio/detail/push_options.hpp"
@@ -37,27 +40,53 @@ namespace asio {
* may allow the executor to optimise queueing for cases when the function
* object represents a continuation of the current call context.
*
- * This function has the following effects:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{}, token)</tt>, where @c Init is a function object type defined
+ * as:
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * }; @endcode
*
- * @li Obtains the handler's associated executor object @c ex by performing
- * <tt>get_associated_executor(handler)</tt>.
+ * The function call operator of @c Init:
*
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
- *
- * @li Performs <tt>ex.defer(std::move(handler), alloc)</tt>.
+ * @li Obtains the handler's associated executor object @c ex of type @c Ex by
+ * performing @code auto ex = get_associated_executor(handler); @endcode
*
- * @li Returns <tt>result.get()</tt>.
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(
+ * require(ex, execution::blocking.never),
+ * execution::relationship.continuation,
+ * execution::allocator(alloc)
+ * ).execute(std::forward<CompletionHandler>(completion_handler)); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.defer(
+ * std::forward<CompletionHandler>(completion_handler),
+ * alloc); @endcode
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) defer(
- ASIO_MOVE_ARG(CompletionToken) token);
+template <ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken>
+auto defer(NullaryToken&& token)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_defer>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_defer(), token);
+}
/// Submits a completion token or function object for execution.
/**
@@ -70,61 +99,120 @@ ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) defer(
* may allow the executor to optimise queueing for cases when the function
* object represents a continuation of the current call context.
*
- * This function has the following effects:
+ * @param ex The target executor.
*
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{ex}, token)</tt>, where @c Init is a function object type
+ * defined as:
*
- * @li Obtains the handler's associated executor object @c ex1 by performing
- * <tt>get_associated_executor(handler)</tt>.
- *
- * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
- *
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * using executor_type = Executor;
+ * explicit Init(const Executor& ex) : ex_(ex) {}
+ * executor_type get_executor() const noexcept { return ex_; }
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * private:
+ * Executor ex_; // exposition only
+ * }; @endcode
*
- * @li Constructs a function object @c f with a function call operator that
- * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
- * <tt>w.reset()</tt>.
+ * The function call operator of @c Init:
*
- * @li Performs <tt>Executor(ex).defer(std::move(f), alloc)</tt>.
+ * @li Obtains the handler's associated executor object @c ex1 of type @c Ex1 by
+ * performing @code auto ex1 = get_associated_executor(handler, ex); @endcode
*
- * @li Returns <tt>result.get()</tt>.
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is true, constructs a
+ * function object @c f with a member @c executor_ that is initialised with
+ * <tt>prefer(ex1, execution::outstanding_work.tracked)</tt>, a member @c
+ * handler_ that is a decay-copy of @c completion_handler, and a function call
+ * operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * prefer(executor_, execution::allocator(a)).execute(std::move(handler_));
+ * @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is false, constructs a
+ * function object @c f with a member @c work_ that is initialised with
+ * <tt>make_work_guard(ex1)</tt>, a member @c handler_ that is a decay-copy of
+ * @c completion_handler, and a function call operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * work_.get_executor().dispatch(std::move(handler_), a);
+ * work_.reset(); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(
+ * require(ex, execution::blocking.never),
+ * execution::relationship.continuation,
+ * execution::allocator(alloc)
+ * ).execute(std::move(f)); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.defer(std::move(f), alloc); @endcode
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
template <typename Executor,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) defer(
- const Executor& ex,
- ASIO_MOVE_ARG(CompletionToken) token
- ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<
- execution::is_executor<Executor>::value || is_executor<Executor>::value
- >::type = 0);
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<Executor>>
+auto defer(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_defer_with_executor<Executor>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_defer_with_executor<Executor>(ex), token);
+}
/// Submits a completion token or function object for execution.
/**
- * @returns <tt>defer(ctx.get_executor(), forward<CompletionToken>(token))</tt>.
+ * @param ctx An execution context, from which the target executor is obtained.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
+ *
+ * @returns <tt>defer(ctx.get_executor(), forward<NullaryToken>(token))</tt>.
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
template <typename ExecutionContext,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename ExecutionContext::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) defer(
- ExecutionContext& ctx,
- ASIO_MOVE_ARG(CompletionToken) token
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename ExecutionContext::executor_type),
- typename constraint<is_convertible<
- ExecutionContext&, execution_context&>::value>::type = 0);
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<typename ExecutionContext::executor_type>>
+auto defer(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_defer_with_executor<
+ typename ExecutionContext::executor_type>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_defer_with_executor<
+ typename ExecutionContext::executor_type>(
+ ctx.get_executor()), token);
+}
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#include "asio/impl/defer.hpp"
-
#endif // ASIO_DEFER_HPP
diff --git a/3rdparty/asio/include/asio/deferred.hpp b/3rdparty/asio/include/asio/deferred.hpp
new file mode 100644
index 00000000000..b919f249553
--- /dev/null
+++ b/3rdparty/asio/include/asio/deferred.hpp
@@ -0,0 +1,715 @@
+//
+// deferred.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 ASIO_DEFERRED_HPP
+#define ASIO_DEFERRED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Trait for detecting objects that are usable as deferred operations.
+template <typename T>
+struct is_deferred : false_type
+{
+};
+
+/// Helper type to wrap multiple completion signatures.
+template <typename... Signatures>
+struct deferred_signatures
+{
+};
+
+namespace detail {
+
+// Helper trait for getting the completion signatures of the tail in a sequence
+// when invoked with the specified arguments.
+
+template <typename Tail, typename... Signatures>
+struct deferred_sequence_signatures;
+
+template <typename Tail, typename R, typename... Args, typename... Signatures>
+struct deferred_sequence_signatures<Tail, R(Args...), Signatures...>
+ : completion_signature_of<decltype(declval<Tail>()(declval<Args>()...))>
+{
+ static_assert(
+ !is_same<decltype(declval<Tail>()(declval<Args>()...)), void>::value,
+ "deferred functions must produce a deferred return type");
+};
+
+// Completion handler for the head component of a deferred sequence.
+template <typename Handler, typename Tail>
+class deferred_sequence_handler
+{
+public:
+ template <typename H, typename T>
+ explicit deferred_sequence_handler(H&& handler, T&& tail)
+ : handler_(static_cast<H&&>(handler)),
+ tail_(static_cast<T&&>(tail))
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ static_cast<Tail&&>(tail_)(
+ static_cast<Args&&>(args)...)(
+ static_cast<Handler&&>(handler_));
+ }
+
+//private:
+ Handler handler_;
+ Tail tail_;
+};
+
+template <typename Head, typename Tail, typename... Signatures>
+class deferred_sequence_base
+{
+private:
+ struct initiate
+ {
+ template <typename Handler>
+ void operator()(Handler&& handler, Head head, Tail&& tail)
+ {
+ static_cast<Head&&>(head)(
+ deferred_sequence_handler<decay_t<Handler>, decay_t<Tail>>(
+ static_cast<Handler&&>(handler), static_cast<Tail&&>(tail)));
+ }
+ };
+
+ Head head_;
+ Tail tail_;
+
+public:
+ template <typename H, typename T>
+ constexpr explicit deferred_sequence_base(H&& head, T&& tail)
+ : head_(static_cast<H&&>(head)),
+ tail_(static_cast<T&&>(tail))
+ {
+ }
+
+ template <ASIO_COMPLETION_TOKEN_FOR(Signatures...) CompletionToken>
+ auto operator()(CompletionToken&& token) &&
+ -> decltype(
+ async_initiate<CompletionToken, Signatures...>(
+ initiate(), token, static_cast<Head&&>(this->head_),
+ static_cast<Tail&&>(this->tail_)))
+ {
+ return async_initiate<CompletionToken, Signatures...>(initiate(),
+ token, static_cast<Head&&>(head_), static_cast<Tail&&>(tail_));
+ }
+
+ template <ASIO_COMPLETION_TOKEN_FOR(Signatures...) CompletionToken>
+ auto operator()(CompletionToken&& token) const &
+ -> decltype(
+ async_initiate<CompletionToken, Signatures...>(
+ initiate(), token, this->head_, this->tail_))
+ {
+ return async_initiate<CompletionToken, Signatures...>(
+ initiate(), token, head_, tail_);
+ }
+};
+
+// Two-step application of variadic Signatures to determine correct base type.
+
+template <typename Head, typename Tail>
+struct deferred_sequence_types
+{
+ template <typename... Signatures>
+ struct op1
+ {
+ typedef deferred_sequence_base<Head, Tail, Signatures...> type;
+ };
+
+ template <typename... Signatures>
+ struct op2
+ {
+ typedef typename deferred_sequence_signatures<Tail, Signatures...>::template
+ apply<op1>::type::type type;
+ };
+
+ typedef typename completion_signature_of<Head>::template
+ apply<op2>::type::type base;
+};
+
+} // namespace detail
+
+/// Used to represent an empty deferred action.
+struct deferred_noop
+{
+ /// No effect.
+ template <typename... Args>
+ void operator()(Args&&...) &&
+ {
+ }
+
+ /// No effect.
+ template <typename... Args>
+ void operator()(Args&&...) const &
+ {
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <>
+struct is_deferred<deferred_noop> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Tag type to disambiguate deferred constructors.
+struct deferred_init_tag {};
+
+/// Wraps a function object so that it may be used as an element in a deferred
+/// composition.
+template <typename Function>
+class deferred_function
+{
+public:
+ /// Constructor.
+ template <typename F>
+ constexpr explicit deferred_function(deferred_init_tag, F&& function)
+ : function_(static_cast<F&&>(function))
+ {
+ }
+
+//private:
+ Function function_;
+
+public:
+ template <typename... Args>
+ auto operator()(Args&&... args) &&
+ -> decltype(
+ static_cast<Function&&>(this->function_)(static_cast<Args&&>(args)...))
+ {
+ return static_cast<Function&&>(function_)(static_cast<Args&&>(args)...);
+ }
+
+ template <typename... Args>
+ auto operator()(Args&&... args) const &
+ -> decltype(Function(function_)(static_cast<Args&&>(args)...))
+ {
+ return Function(function_)(static_cast<Args&&>(args)...);
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <typename Function>
+struct is_deferred<deferred_function<Function>> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Encapsulates deferred values.
+template <typename... Values>
+class ASIO_NODISCARD deferred_values
+{
+private:
+ std::tuple<Values...> values_;
+
+ struct initiate
+ {
+ template <typename Handler, typename... V>
+ void operator()(Handler handler, V&&... values)
+ {
+ static_cast<Handler&&>(handler)(static_cast<V&&>(values)...);
+ }
+ };
+
+ template <typename CompletionToken, std::size_t... I>
+ auto invoke_helper(CompletionToken&& token, detail::index_sequence<I...>)
+ -> decltype(
+ async_initiate<CompletionToken, void(Values...)>(initiate(), token,
+ std::get<I>(static_cast<std::tuple<Values...>&&>(this->values_))...))
+ {
+ return async_initiate<CompletionToken, void(Values...)>(initiate(), token,
+ std::get<I>(static_cast<std::tuple<Values...>&&>(values_))...);
+ }
+
+ template <typename CompletionToken, std::size_t... I>
+ auto const_invoke_helper(CompletionToken&& token,
+ detail::index_sequence<I...>)
+ -> decltype(
+ async_initiate<CompletionToken, void(Values...)>(
+ initiate(), token, std::get<I>(values_)...))
+ {
+ return async_initiate<CompletionToken, void(Values...)>(
+ initiate(), token, std::get<I>(values_)...);
+ }
+
+public:
+ /// Construct a deferred asynchronous operation from the arguments to an
+ /// initiation function object.
+ template <typename... V>
+ constexpr explicit deferred_values(
+ deferred_init_tag, V&&... values)
+ : values_(static_cast<V&&>(values)...)
+ {
+ }
+
+ /// Initiate the deferred operation using the supplied completion token.
+ template <ASIO_COMPLETION_TOKEN_FOR(void(Values...)) CompletionToken>
+ auto operator()(CompletionToken&& token) &&
+ -> decltype(
+ this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<Values...>()))
+ {
+ return this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<Values...>());
+ }
+
+ template <ASIO_COMPLETION_TOKEN_FOR(void(Values...)) CompletionToken>
+ auto operator()(CompletionToken&& token) const &
+ -> decltype(
+ this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<Values...>()))
+ {
+ return this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<Values...>());
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <typename... Values>
+struct is_deferred<deferred_values<Values...>> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Encapsulates a deferred asynchronous operation.
+template <typename Signature, typename Initiation, typename... InitArgs>
+class ASIO_NODISCARD deferred_async_operation
+{
+private:
+ typedef decay_t<Initiation> initiation_t;
+ initiation_t initiation_;
+ typedef std::tuple<decay_t<InitArgs>...> init_args_t;
+ init_args_t init_args_;
+
+ template <typename CompletionToken, std::size_t... I>
+ auto invoke_helper(CompletionToken&& token, detail::index_sequence<I...>)
+ -> decltype(
+ async_initiate<CompletionToken, Signature>(
+ static_cast<initiation_t&&>(initiation_), token,
+ std::get<I>(static_cast<init_args_t&&>(init_args_))...))
+ {
+ return async_initiate<CompletionToken, Signature>(
+ static_cast<initiation_t&&>(initiation_), token,
+ std::get<I>(static_cast<init_args_t&&>(init_args_))...);
+ }
+
+ template <typename CompletionToken, std::size_t... I>
+ auto const_invoke_helper(CompletionToken&& token,
+ detail::index_sequence<I...>) const &
+ -> decltype(
+ async_initiate<CompletionToken, Signature>(
+ initiation_t(initiation_), token, std::get<I>(init_args_)...))
+ {
+ return async_initiate<CompletionToken, Signature>(
+ initiation_t(initiation_), token, std::get<I>(init_args_)...);
+ }
+
+public:
+ /// Construct a deferred asynchronous operation from the arguments to an
+ /// initiation function object.
+ template <typename I, typename... A>
+ constexpr explicit deferred_async_operation(
+ deferred_init_tag, I&& initiation, A&&... init_args)
+ : initiation_(static_cast<I&&>(initiation)),
+ init_args_(static_cast<A&&>(init_args)...)
+ {
+ }
+
+ /// Initiate the asynchronous operation using the supplied completion token.
+ template <ASIO_COMPLETION_TOKEN_FOR(Signature) CompletionToken>
+ auto operator()(CompletionToken&& token) &&
+ -> decltype(
+ this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>()))
+ {
+ return this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>());
+ }
+
+ template <ASIO_COMPLETION_TOKEN_FOR(Signature) CompletionToken>
+ auto operator()(CompletionToken&& token) const &
+ -> decltype(
+ this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>()))
+ {
+ return this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>());
+ }
+};
+
+/// Encapsulates a deferred asynchronous operation thas has multiple completion
+/// signatures.
+template <typename... Signatures, typename Initiation, typename... InitArgs>
+class ASIO_NODISCARD deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>
+{
+private:
+ typedef decay_t<Initiation> initiation_t;
+ initiation_t initiation_;
+ typedef std::tuple<decay_t<InitArgs>...> init_args_t;
+ init_args_t init_args_;
+
+ template <typename CompletionToken, std::size_t... I>
+ auto invoke_helper(CompletionToken&& token, detail::index_sequence<I...>)
+ -> decltype(
+ async_initiate<CompletionToken, Signatures...>(
+ static_cast<initiation_t&&>(initiation_), token,
+ std::get<I>(static_cast<init_args_t&&>(init_args_))...))
+ {
+ return async_initiate<CompletionToken, Signatures...>(
+ static_cast<initiation_t&&>(initiation_), token,
+ std::get<I>(static_cast<init_args_t&&>(init_args_))...);
+ }
+
+ template <typename CompletionToken, std::size_t... I>
+ auto const_invoke_helper(CompletionToken&& token,
+ detail::index_sequence<I...>) const &
+ -> decltype(
+ async_initiate<CompletionToken, Signatures...>(
+ initiation_t(initiation_), token, std::get<I>(init_args_)...))
+ {
+ return async_initiate<CompletionToken, Signatures...>(
+ initiation_t(initiation_), token, std::get<I>(init_args_)...);
+ }
+
+public:
+ /// Construct a deferred asynchronous operation from the arguments to an
+ /// initiation function object.
+ template <typename I, typename... A>
+ constexpr explicit deferred_async_operation(
+ deferred_init_tag, I&& initiation, A&&... init_args)
+ : initiation_(static_cast<I&&>(initiation)),
+ init_args_(static_cast<A&&>(init_args)...)
+ {
+ }
+
+ /// Initiate the asynchronous operation using the supplied completion token.
+ template <ASIO_COMPLETION_TOKEN_FOR(Signatures...) CompletionToken>
+ auto operator()(CompletionToken&& token) &&
+ -> decltype(
+ this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>()))
+ {
+ return this->invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>());
+ }
+
+ template <ASIO_COMPLETION_TOKEN_FOR(Signatures...) CompletionToken>
+ auto operator()(CompletionToken&& token) const &
+ -> decltype(
+ this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>()))
+ {
+ return this->const_invoke_helper(
+ static_cast<CompletionToken&&>(token),
+ detail::index_sequence_for<InitArgs...>());
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <typename Signature, typename Initiation, typename... InitArgs>
+struct is_deferred<
+ deferred_async_operation<Signature, Initiation, InitArgs...>> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Defines a link between two consecutive operations in a sequence.
+template <typename Head, typename Tail>
+class ASIO_NODISCARD deferred_sequence :
+ public detail::deferred_sequence_types<Head, Tail>::base
+{
+public:
+ template <typename H, typename T>
+ constexpr explicit deferred_sequence(deferred_init_tag, H&& head, T&& tail)
+ : detail::deferred_sequence_types<Head, Tail>::base(
+ static_cast<H&&>(head), static_cast<T&&>(tail))
+ {
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+ template <typename CompletionToken>
+ auto operator()(CompletionToken&& token) &&;
+
+ template <typename CompletionToken>
+ auto operator()(CompletionToken&& token) const &;
+#endif // defined(GENERATING_DOCUMENTATION)
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <typename Head, typename Tail>
+struct is_deferred<deferred_sequence<Head, Tail>> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Used to represent a deferred conditional branch.
+template <typename OnTrue = deferred_noop, typename OnFalse = deferred_noop>
+class ASIO_NODISCARD deferred_conditional
+{
+private:
+ template <typename T, typename F> friend class deferred_conditional;
+
+ // Helper constructor.
+ template <typename T, typename F>
+ explicit deferred_conditional(bool b, T&& on_true, F&& on_false)
+ : on_true_(static_cast<T&&>(on_true)),
+ on_false_(static_cast<F&&>(on_false)),
+ bool_(b)
+ {
+ }
+
+ OnTrue on_true_;
+ OnFalse on_false_;
+ bool bool_;
+
+public:
+ /// Construct a deferred conditional with the value to determine which branch
+ /// will be executed.
+ constexpr explicit deferred_conditional(bool b)
+ : on_true_(),
+ on_false_(),
+ bool_(b)
+ {
+ }
+
+ /// Invoke the conditional branch bsaed on the stored value.
+ template <typename... Args>
+ auto operator()(Args&&... args) &&
+ -> decltype(static_cast<OnTrue&&>(on_true_)(static_cast<Args&&>(args)...))
+ {
+ if (bool_)
+ {
+ return static_cast<OnTrue&&>(on_true_)(static_cast<Args&&>(args)...);
+ }
+ else
+ {
+ return static_cast<OnFalse&&>(on_false_)(static_cast<Args&&>(args)...);
+ }
+ }
+
+ template <typename... Args>
+ auto operator()(Args&&... args) const &
+ -> decltype(on_true_(static_cast<Args&&>(args)...))
+ {
+ if (bool_)
+ {
+ return on_true_(static_cast<Args&&>(args)...);
+ }
+ else
+ {
+ return on_false_(static_cast<Args&&>(args)...);
+ }
+ }
+
+ /// Set the true branch of the conditional.
+ template <typename T>
+ deferred_conditional<T, OnFalse> then(T on_true,
+ constraint_t<
+ is_deferred<T>::value
+ >* = 0,
+ constraint_t<
+ is_same<
+ conditional_t<true, OnTrue, T>,
+ deferred_noop
+ >::value
+ >* = 0) &&
+ {
+ return deferred_conditional<T, OnFalse>(
+ bool_, static_cast<T&&>(on_true),
+ static_cast<OnFalse&&>(on_false_));
+ }
+
+ /// Set the false branch of the conditional.
+ template <typename T>
+ deferred_conditional<OnTrue, T> otherwise(T on_false,
+ constraint_t<
+ is_deferred<T>::value
+ >* = 0,
+ constraint_t<
+ !is_same<
+ conditional_t<true, OnTrue, T>,
+ deferred_noop
+ >::value
+ >* = 0,
+ constraint_t<
+ is_same<
+ conditional_t<true, OnFalse, T>,
+ deferred_noop
+ >::value
+ >* = 0) &&
+ {
+ return deferred_conditional<OnTrue, T>(
+ bool_, static_cast<OnTrue&&>(on_true_),
+ static_cast<T&&>(on_false));
+ }
+};
+
+#if !defined(GENERATING_DOCUMENTATION)
+template <typename OnTrue, typename OnFalse>
+struct is_deferred<deferred_conditional<OnTrue, OnFalse>> : true_type
+{
+};
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+/// Class used to specify that an asynchronous operation should return a
+/// function object to lazily launch the operation.
+/**
+ * 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 using the special value @c asio::deferred. For
+ * example:
+ *
+ * @code auto my_deferred_op
+ * = my_socket.async_read_some(my_buffer,
+ * asio::deferred); @endcode
+ *
+ * The initiating function (async_read_some in the above example) returns a
+ * function object that will lazily initiate the operation.
+ */
+class deferred_t
+{
+public:
+ /// Default constructor.
+ constexpr deferred_t()
+ {
+ }
+
+ /// Adapts an executor to add the @c deferred_t completion token as the
+ /// default.
+ template <typename InnerExecutor>
+ struct executor_with_default : InnerExecutor
+ {
+ /// Specify @c deferred_t as the default completion token type.
+ typedef deferred_t default_completion_token_type;
+
+ /// Construct the adapted executor from the inner executor type.
+ template <typename InnerExecutor1>
+ executor_with_default(const InnerExecutor1& ex,
+ constraint_t<
+ conditional_t<
+ !is_same<InnerExecutor1, executor_with_default>::value,
+ is_convertible<InnerExecutor1, InnerExecutor>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+ };
+
+ /// Type alias to adapt an I/O object to use @c deferred_t as its
+ /// default completion token type.
+ template <typename T>
+ using as_default_on_t = typename T::template rebind_executor<
+ executor_with_default<typename T::executor_type>>::other;
+
+ /// Function helper to adapt an I/O object to use @c deferred_t as its
+ /// default completion token type.
+ template <typename T>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other
+ as_default_on(T&& object)
+ {
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
+ }
+
+ /// Creates a new deferred from a function.
+ template <typename Function>
+ constraint_t<
+ !is_deferred<decay_t<Function>>::value,
+ deferred_function<decay_t<Function>>
+ > operator()(Function&& function) const
+ {
+ return deferred_function<decay_t<Function>>(
+ deferred_init_tag{}, static_cast<Function&&>(function));
+ }
+
+ /// Passes through anything that is already deferred.
+ template <typename T>
+ constraint_t<
+ is_deferred<decay_t<T>>::value,
+ decay_t<T>
+ > operator()(T&& t) const
+ {
+ return static_cast<T&&>(t);
+ }
+
+ /// Returns a deferred operation that returns the provided values.
+ template <typename... Args>
+ static constexpr deferred_values<decay_t<Args>...> values(Args&&... args)
+ {
+ return deferred_values<decay_t<Args>...>(
+ deferred_init_tag{}, static_cast<Args&&>(args)...);
+ }
+
+ /// Creates a conditional object for branching deferred operations.
+ static constexpr deferred_conditional<> when(bool b)
+ {
+ return deferred_conditional<>(b);
+ }
+};
+
+/// Pipe operator used to chain deferred operations.
+template <typename Head, typename Tail>
+inline auto operator|(Head head, Tail&& tail)
+ -> constraint_t<
+ is_deferred<Head>::value,
+ decltype(static_cast<Head&&>(head)(static_cast<Tail&&>(tail)))
+ >
+{
+ return static_cast<Head&&>(head)(static_cast<Tail&&>(tail));
+}
+
+/// A @ref completion_token object used to specify that an asynchronous
+/// operation should return a function object to lazily launch the operation.
+/**
+ * See the documentation for asio::deferred_t for a usage example.
+ */
+constexpr deferred_t deferred;
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/deferred.hpp"
+
+#endif // ASIO_DEFERRED_HPP
diff --git a/3rdparty/asio/include/asio/detached.hpp b/3rdparty/asio/include/asio/detached.hpp
index e99875e36d7..b71bd9d978b 100644
--- a/3rdparty/asio/include/asio/detached.hpp
+++ b/3rdparty/asio/include/asio/detached.hpp
@@ -2,7 +2,7 @@
// detached.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,15 +23,15 @@
namespace asio {
-/// Class used to specify that an asynchronous operation is detached.
+/// A @ref completion_token type used to specify that an asynchronous operation
+/// is detached.
/**
-
* The detached_t class is used to indicate that an asynchronous operation is
* detached. That is, there is no completion handler waiting for the
* operation's result. A detached_t object may be passed as a handler to an
* asynchronous operation, typically using the special value
* @c asio::detached. For example:
-
+ *
* @code my_socket.async_send(my_buffer, asio::detached);
* @endcode
*/
@@ -39,7 +39,7 @@ class detached_t
{
public:
/// Constructor.
- ASIO_CONSTEXPR detached_t()
+ constexpr detached_t()
{
}
@@ -52,7 +52,7 @@ public:
typedef detached_t default_completion_token_type;
/// Construct the adapted executor from the inner executor type.
- executor_with_default(const InnerExecutor& ex) ASIO_NOEXCEPT
+ executor_with_default(const InnerExecutor& ex) noexcept
: InnerExecutor(ex)
{
}
@@ -61,9 +61,9 @@ public:
/// that to construct the adapted executor.
template <typename OtherExecutor>
executor_with_default(const OtherExecutor& ex,
- typename constraint<
+ constraint_t<
is_convertible<OtherExecutor, InnerExecutor>::value
- >::type = 0) ASIO_NOEXCEPT
+ > = 0) noexcept
: InnerExecutor(ex)
{
}
@@ -71,37 +71,30 @@ public:
/// Type alias to adapt an I/O object to use @c detached_t as its
/// default completion token type.
-#if defined(ASIO_HAS_ALIAS_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
template <typename T>
using as_default_on_t = typename T::template rebind_executor<
- executor_with_default<typename T::executor_type> >::other;
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
+ executor_with_default<typename T::executor_type>>::other;
/// Function helper to adapt an I/O object to use @c detached_t as its
/// default completion token type.
template <typename T>
- static typename decay<T>::type::template rebind_executor<
- executor_with_default<typename decay<T>::type::executor_type>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
>::other
- as_default_on(ASIO_MOVE_ARG(T) object)
+ as_default_on(T&& object)
{
- return typename decay<T>::type::template rebind_executor<
- executor_with_default<typename decay<T>::type::executor_type>
- >::other(ASIO_MOVE_CAST(T)(object));
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
}
};
-/// A special value, similar to std::nothrow.
+/// A @ref completion_token object used to specify that an asynchronous
+/// operation is detached.
/**
* See the documentation for asio::detached_t for a usage example.
*/
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr detached_t detached;
-#elif defined(ASIO_MSVC)
-__declspec(selectany) detached_t detached;
-#endif
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/array.hpp b/3rdparty/asio/include/asio/detail/array.hpp
index ef230c321ca..f2015c7919b 100644
--- a/3rdparty/asio/include/asio/detail/array.hpp
+++ b/3rdparty/asio/include/asio/detail/array.hpp
@@ -2,7 +2,7 @@
// detail/array.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,20 +17,12 @@
#include "asio/detail/config.hpp"
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#else // defined(ASIO_HAS_STD_ARRAY)
-# include <boost/array.hpp>
-#endif // defined(ASIO_HAS_STD_ARRAY)
+#include <array>
namespace asio {
namespace detail {
-#if defined(ASIO_HAS_STD_ARRAY)
using std::array;
-#else // defined(ASIO_HAS_STD_ARRAY)
-using boost::array;
-#endif // defined(ASIO_HAS_STD_ARRAY)
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/array_fwd.hpp b/3rdparty/asio/include/asio/detail/array_fwd.hpp
index fb81dba5ce2..79491348a69 100644
--- a/3rdparty/asio/include/asio/detail/array_fwd.hpp
+++ b/3rdparty/asio/include/asio/detail/array_fwd.hpp
@@ -2,7 +2,7 @@
// detail/array_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -27,8 +27,6 @@ class array;
// Standard library components can't be forward declared, so we'll have to
// include the array header. Fortunately, it's fairly lightweight and doesn't
// add significantly to the compile time.
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
+#include <array>
#endif // ASIO_DETAIL_ARRAY_FWD_HPP
diff --git a/3rdparty/asio/include/asio/detail/assert.hpp b/3rdparty/asio/include/asio/detail/assert.hpp
index 8eaf59530bc..b53774d9aff 100644
--- a/3rdparty/asio/include/asio/detail/assert.hpp
+++ b/3rdparty/asio/include/asio/detail/assert.hpp
@@ -2,7 +2,7 @@
// detail/assert.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/atomic_count.hpp b/3rdparty/asio/include/asio/detail/atomic_count.hpp
index 8409298a9af..6116279c89e 100644
--- a/3rdparty/asio/include/asio/detail/atomic_count.hpp
+++ b/3rdparty/asio/include/asio/detail/atomic_count.hpp
@@ -2,7 +2,7 @@
// detail/atomic_count.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,11 +19,9 @@
#if !defined(ASIO_HAS_THREADS)
// Nothing to include.
-#elif defined(ASIO_HAS_STD_ATOMIC)
+#else // !defined(ASIO_HAS_THREADS)
# include <atomic>
-#else // defined(ASIO_HAS_STD_ATOMIC)
-# include <boost/detail/atomic_count.hpp>
-#endif // defined(ASIO_HAS_STD_ATOMIC)
+#endif // !defined(ASIO_HAS_THREADS)
namespace asio {
namespace detail {
@@ -31,11 +29,13 @@ namespace detail {
#if !defined(ASIO_HAS_THREADS)
typedef long atomic_count;
inline void increment(atomic_count& a, long b) { a += b; }
+inline void decrement(atomic_count& a, long b) { a -= b; }
inline void ref_count_up(atomic_count& a) { ++a; }
inline bool ref_count_down(atomic_count& a) { return --a == 0; }
-#elif defined(ASIO_HAS_STD_ATOMIC)
+#else // !defined(ASIO_HAS_THREADS)
typedef std::atomic<long> atomic_count;
inline void increment(atomic_count& a, long b) { a += b; }
+inline void decrement(atomic_count& a, long b) { a -= b; }
inline void ref_count_up(atomic_count& a)
{
@@ -51,12 +51,7 @@ inline bool ref_count_down(atomic_count& a)
}
return false;
}
-#else // defined(ASIO_HAS_STD_ATOMIC)
-typedef boost::detail::atomic_count atomic_count;
-inline void increment(atomic_count& a, long b) { while (b > 0) ++a, --b; }
-inline void ref_count_up(atomic_count& a) { ++a; }
-inline bool ref_count_down(atomic_count& a) { return --a == 0; }
-#endif // defined(ASIO_HAS_STD_ATOMIC)
+#endif // !defined(ASIO_HAS_THREADS)
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/base_from_cancellation_state.hpp b/3rdparty/asio/include/asio/detail/base_from_cancellation_state.hpp
index ae8db1764b1..3ce7dcf0b7f 100644
--- a/3rdparty/asio/include/asio/detail/base_from_cancellation_state.hpp
+++ b/3rdparty/asio/include/asio/detail/base_from_cancellation_state.hpp
@@ -2,7 +2,7 @@
// detail/base_from_cancellation_state.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -31,12 +31,12 @@ class base_from_cancellation_state
public:
typedef cancellation_slot cancellation_slot_type;
- cancellation_slot_type get_cancellation_slot() const ASIO_NOEXCEPT
+ cancellation_slot_type get_cancellation_slot() const noexcept
{
return cancellation_state_.slot();
}
- cancellation_state get_cancellation_state() const ASIO_NOEXCEPT
+ cancellation_state get_cancellation_state() const noexcept
{
return cancellation_state_;
}
@@ -57,12 +57,12 @@ protected:
template <typename InFilter, typename OutFilter>
base_from_cancellation_state(const Handler& handler,
- ASIO_MOVE_ARG(InFilter) in_filter,
- ASIO_MOVE_ARG(OutFilter) out_filter)
+ InFilter&& in_filter,
+ OutFilter&& out_filter)
: cancellation_state_(
asio::get_associated_cancellation_slot(handler),
- ASIO_MOVE_CAST(InFilter)(in_filter),
- ASIO_MOVE_CAST(OutFilter)(out_filter))
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter))
{
}
@@ -81,16 +81,16 @@ protected:
template <typename InFilter, typename OutFilter>
void reset_cancellation_state(const Handler& handler,
- ASIO_MOVE_ARG(InFilter) in_filter,
- ASIO_MOVE_ARG(OutFilter) out_filter)
+ InFilter&& in_filter,
+ OutFilter&& out_filter)
{
cancellation_state_ = cancellation_state(
asio::get_associated_cancellation_slot(handler),
- ASIO_MOVE_CAST(InFilter)(in_filter),
- ASIO_MOVE_CAST(OutFilter)(out_filter));
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
}
- cancellation_type_t cancelled() const ASIO_NOEXCEPT
+ cancellation_type_t cancelled() const noexcept
{
return cancellation_state_.cancelled();
}
@@ -101,17 +101,18 @@ private:
template <typename Handler>
class base_from_cancellation_state<Handler,
- typename enable_if<
+ enable_if_t<
is_same<
typename associated_cancellation_slot<
Handler, cancellation_slot
>::asio_associated_cancellation_slot_is_unspecialised,
void
>::value
- >::type>
+ >
+ >
{
public:
- cancellation_state get_cancellation_state() const ASIO_NOEXCEPT
+ cancellation_state get_cancellation_state() const noexcept
{
return cancellation_state();
}
@@ -128,8 +129,8 @@ protected:
template <typename InFilter, typename OutFilter>
base_from_cancellation_state(const Handler&,
- ASIO_MOVE_ARG(InFilter),
- ASIO_MOVE_ARG(OutFilter))
+ InFilter&&,
+ OutFilter&&)
{
}
@@ -144,12 +145,12 @@ protected:
template <typename InFilter, typename OutFilter>
void reset_cancellation_state(const Handler&,
- ASIO_MOVE_ARG(InFilter),
- ASIO_MOVE_ARG(OutFilter))
+ InFilter&&,
+ OutFilter&&)
{
}
- ASIO_CONSTEXPR cancellation_type_t cancelled() const ASIO_NOEXCEPT
+ constexpr cancellation_type_t cancelled() const noexcept
{
return cancellation_type::none;
}
diff --git a/3rdparty/asio/include/asio/detail/base_from_completion_cond.hpp b/3rdparty/asio/include/asio/detail/base_from_completion_cond.hpp
index 0139d261237..ba0cc879602 100644
--- a/3rdparty/asio/include/asio/detail/base_from_completion_cond.hpp
+++ b/3rdparty/asio/include/asio/detail/base_from_completion_cond.hpp
@@ -2,7 +2,7 @@
// detail/base_from_completion_cond.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -29,7 +29,7 @@ class base_from_completion_cond
protected:
explicit base_from_completion_cond(CompletionCondition& completion_condition)
: completion_condition_(
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition))
+ static_cast<CompletionCondition&&>(completion_condition))
{
}
diff --git a/3rdparty/asio/include/asio/detail/bind_handler.hpp b/3rdparty/asio/include/asio/detail/bind_handler.hpp
index 40f30f14ff4..3c16b13a458 100644
--- a/3rdparty/asio/include/asio/detail/bind_handler.hpp
+++ b/3rdparty/asio/include/asio/detail/bind_handler.hpp
@@ -2,7 +2,7 @@
// detail/bind_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,9 +17,7 @@
#include "asio/detail/config.hpp"
#include "asio/associator.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/detail/push_options.hpp"
@@ -32,31 +30,29 @@ class binder0
{
public:
template <typename T>
- binder0(int, ASIO_MOVE_ARG(T) handler)
- : handler_(ASIO_MOVE_CAST(T)(handler))
+ binder0(int, T&& handler)
+ : handler_(static_cast<T&&>(handler))
{
}
binder0(Handler& handler)
- : handler_(ASIO_MOVE_CAST(Handler)(handler))
+ : handler_(static_cast<Handler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
binder0(const binder0& other)
: handler_(other.handler_)
{
}
binder0(binder0&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_))
+ : handler_(static_cast<Handler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)();
+ static_cast<Handler&&>(handler_)();
}
void operator()() const
@@ -69,32 +65,6 @@ public:
};
template <typename Handler>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- binder0<Handler>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- binder0<Handler>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
inline bool asio_handler_is_continuation(
binder0<Handler>* this_handler)
{
@@ -102,36 +72,12 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- binder0<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- binder0<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
template <typename Handler>
-inline binder0<typename decay<Handler>::type> bind_handler(
- ASIO_MOVE_ARG(Handler) handler)
+inline binder0<decay_t<Handler>> bind_handler(
+ Handler&& handler)
{
- return binder0<typename decay<Handler>::type>(
- 0, ASIO_MOVE_CAST(Handler)(handler));
+ return binder0<decay_t<Handler>>(
+ 0, static_cast<Handler&&>(handler));
}
template <typename Handler, typename Arg1>
@@ -139,19 +85,18 @@ class binder1
{
public:
template <typename T>
- binder1(int, ASIO_MOVE_ARG(T) handler, const Arg1& arg1)
- : handler_(ASIO_MOVE_CAST(T)(handler)),
+ binder1(int, T&& handler, const Arg1& arg1)
+ : handler_(static_cast<T&&>(handler)),
arg1_(arg1)
{
}
binder1(Handler& handler, const Arg1& arg1)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ : handler_(static_cast<Handler&&>(handler)),
arg1_(arg1)
{
}
-#if defined(ASIO_HAS_MOVE)
binder1(const binder1& other)
: handler_(other.handler_),
arg1_(other.arg1_)
@@ -159,15 +104,14 @@ public:
}
binder1(binder1&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_))
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
+ static_cast<Handler&&>(handler_)(
static_cast<const Arg1&>(arg1_));
}
@@ -182,32 +126,6 @@ public:
};
template <typename Handler, typename Arg1>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- binder1<Handler, Arg1>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- binder1<Handler, Arg1>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1>
inline bool asio_handler_is_continuation(
binder1<Handler, Arg1>* this_handler)
{
@@ -215,36 +133,12 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler, typename Arg1>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- binder1<Handler, Arg1>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler, typename Arg1>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- binder1<Handler, Arg1>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
template <typename Handler, typename Arg1>
-inline binder1<typename decay<Handler>::type, Arg1> bind_handler(
- ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1)
+inline binder1<decay_t<Handler>, Arg1> bind_handler(
+ Handler&& handler, const Arg1& arg1)
{
- return binder1<typename decay<Handler>::type, Arg1>(0,
- ASIO_MOVE_CAST(Handler)(handler), arg1);
+ return binder1<decay_t<Handler>, Arg1>(0,
+ static_cast<Handler&&>(handler), arg1);
}
template <typename Handler, typename Arg1, typename Arg2>
@@ -252,22 +146,21 @@ class binder2
{
public:
template <typename T>
- binder2(int, ASIO_MOVE_ARG(T) handler,
+ binder2(int, T&& handler,
const Arg1& arg1, const Arg2& arg2)
- : handler_(ASIO_MOVE_CAST(T)(handler)),
+ : handler_(static_cast<T&&>(handler)),
arg1_(arg1),
arg2_(arg2)
{
}
binder2(Handler& handler, const Arg1& arg1, const Arg2& arg2)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ : handler_(static_cast<Handler&&>(handler)),
arg1_(arg1),
arg2_(arg2)
{
}
-#if defined(ASIO_HAS_MOVE)
binder2(const binder2& other)
: handler_(other.handler_),
arg1_(other.arg1_),
@@ -276,16 +169,15 @@ public:
}
binder2(binder2&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_))
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_)),
+ arg2_(static_cast<Arg2&&>(other.arg2_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
+ static_cast<Handler&&>(handler_)(
static_cast<const Arg1&>(arg1_),
static_cast<const Arg2&>(arg2_));
}
@@ -302,32 +194,6 @@ public:
};
template <typename Handler, typename Arg1, typename Arg2>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- binder2<Handler, Arg1, Arg2>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- binder2<Handler, Arg1, Arg2>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
inline bool asio_handler_is_continuation(
binder2<Handler, Arg1, Arg2>* this_handler)
{
@@ -335,36 +201,12 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler, typename Arg1, typename Arg2>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- binder2<Handler, Arg1, Arg2>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler, typename Arg1, typename Arg2>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- binder2<Handler, Arg1, Arg2>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
template <typename Handler, typename Arg1, typename Arg2>
-inline binder2<typename decay<Handler>::type, Arg1, Arg2> bind_handler(
- ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1, const Arg2& arg2)
+inline binder2<decay_t<Handler>, Arg1, Arg2> bind_handler(
+ Handler&& handler, const Arg1& arg1, const Arg2& arg2)
{
- return binder2<typename decay<Handler>::type, Arg1, Arg2>(0,
- ASIO_MOVE_CAST(Handler)(handler), arg1, arg2);
+ return binder2<decay_t<Handler>, Arg1, Arg2>(0,
+ static_cast<Handler&&>(handler), arg1, arg2);
}
template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
@@ -372,9 +214,9 @@ class binder3
{
public:
template <typename T>
- binder3(int, ASIO_MOVE_ARG(T) handler, const Arg1& arg1,
+ binder3(int, T&& handler, const Arg1& arg1,
const Arg2& arg2, const Arg3& arg3)
- : handler_(ASIO_MOVE_CAST(T)(handler)),
+ : handler_(static_cast<T&&>(handler)),
arg1_(arg1),
arg2_(arg2),
arg3_(arg3)
@@ -383,14 +225,13 @@ public:
binder3(Handler& handler, const Arg1& arg1,
const Arg2& arg2, const Arg3& arg3)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ : handler_(static_cast<Handler&&>(handler)),
arg1_(arg1),
arg2_(arg2),
arg3_(arg3)
{
}
-#if defined(ASIO_HAS_MOVE)
binder3(const binder3& other)
: handler_(other.handler_),
arg1_(other.arg1_),
@@ -400,17 +241,16 @@ public:
}
binder3(binder3&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_)),
- arg3_(ASIO_MOVE_CAST(Arg3)(other.arg3_))
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_)),
+ arg2_(static_cast<Arg2&&>(other.arg2_)),
+ arg3_(static_cast<Arg3&&>(other.arg3_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
+ static_cast<Handler&&>(handler_)(
static_cast<const Arg1&>(arg1_),
static_cast<const Arg2&>(arg2_),
static_cast<const Arg3&>(arg3_));
@@ -429,32 +269,6 @@ public:
};
template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
inline bool asio_handler_is_continuation(
binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
{
@@ -462,39 +276,13 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler,
- typename Arg1, typename Arg2, typename Arg3>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler,
- typename Arg1, typename Arg2, typename Arg3>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- binder3<Handler, Arg1, Arg2, Arg3>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
template <typename Handler, typename Arg1, typename Arg2, typename Arg3>
-inline binder3<typename decay<Handler>::type, Arg1, Arg2, Arg3> bind_handler(
- ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1, const Arg2& arg2,
+inline binder3<decay_t<Handler>, Arg1, Arg2, Arg3> bind_handler(
+ Handler&& handler, const Arg1& arg1, const Arg2& arg2,
const Arg3& arg3)
{
- return binder3<typename decay<Handler>::type, Arg1, Arg2, Arg3>(0,
- ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3);
+ return binder3<decay_t<Handler>, Arg1, Arg2, Arg3>(0,
+ static_cast<Handler&&>(handler), arg1, arg2, arg3);
}
template <typename Handler, typename Arg1,
@@ -503,9 +291,9 @@ class binder4
{
public:
template <typename T>
- binder4(int, ASIO_MOVE_ARG(T) handler, const Arg1& arg1,
+ binder4(int, T&& handler, const Arg1& arg1,
const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
- : handler_(ASIO_MOVE_CAST(T)(handler)),
+ : handler_(static_cast<T&&>(handler)),
arg1_(arg1),
arg2_(arg2),
arg3_(arg3),
@@ -515,7 +303,7 @@ public:
binder4(Handler& handler, const Arg1& arg1,
const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ : handler_(static_cast<Handler&&>(handler)),
arg1_(arg1),
arg2_(arg2),
arg3_(arg3),
@@ -523,7 +311,6 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE)
binder4(const binder4& other)
: handler_(other.handler_),
arg1_(other.arg1_),
@@ -534,18 +321,17 @@ public:
}
binder4(binder4&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_)),
- arg3_(ASIO_MOVE_CAST(Arg3)(other.arg3_)),
- arg4_(ASIO_MOVE_CAST(Arg4)(other.arg4_))
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_)),
+ arg2_(static_cast<Arg2&&>(other.arg2_)),
+ arg3_(static_cast<Arg3&&>(other.arg3_)),
+ arg4_(static_cast<Arg4&&>(other.arg4_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
+ static_cast<Handler&&>(handler_)(
static_cast<const Arg1&>(arg1_),
static_cast<const Arg2&>(arg2_),
static_cast<const Arg3&>(arg3_),
@@ -567,34 +353,6 @@ public:
template <typename Handler, typename Arg1,
typename Arg2, typename Arg3, typename Arg4>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4>
inline bool asio_handler_is_continuation(
binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
{
@@ -602,40 +360,14 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- binder4<Handler, Arg1, Arg2, Arg3, Arg4>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
template <typename Handler, typename Arg1,
typename Arg2, typename Arg3, typename Arg4>
-inline binder4<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4>
-bind_handler(ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1,
+inline binder4<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4>
+bind_handler(Handler&& handler, const Arg1& arg1,
const Arg2& arg2, const Arg3& arg3, const Arg4& arg4)
{
- return binder4<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4>(0,
- ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3, arg4);
+ return binder4<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4>(0,
+ static_cast<Handler&&>(handler), arg1, arg2, arg3, arg4);
}
template <typename Handler, typename Arg1, typename Arg2,
@@ -644,9 +376,9 @@ class binder5
{
public:
template <typename T>
- binder5(int, ASIO_MOVE_ARG(T) handler, const Arg1& arg1,
+ binder5(int, T&& handler, const Arg1& arg1,
const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
- : handler_(ASIO_MOVE_CAST(T)(handler)),
+ : handler_(static_cast<T&&>(handler)),
arg1_(arg1),
arg2_(arg2),
arg3_(arg3),
@@ -657,7 +389,7 @@ public:
binder5(Handler& handler, const Arg1& arg1, const Arg2& arg2,
const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ : handler_(static_cast<Handler&&>(handler)),
arg1_(arg1),
arg2_(arg2),
arg3_(arg3),
@@ -666,7 +398,6 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE)
binder5(const binder5& other)
: handler_(other.handler_),
arg1_(other.arg1_),
@@ -678,19 +409,18 @@ public:
}
binder5(binder5&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_)),
- arg3_(ASIO_MOVE_CAST(Arg3)(other.arg3_)),
- arg4_(ASIO_MOVE_CAST(Arg4)(other.arg4_)),
- arg5_(ASIO_MOVE_CAST(Arg5)(other.arg5_))
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_)),
+ arg2_(static_cast<Arg2&&>(other.arg2_)),
+ arg3_(static_cast<Arg3&&>(other.arg3_)),
+ arg4_(static_cast<Arg4&&>(other.arg4_)),
+ arg5_(static_cast<Arg5&&>(other.arg5_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
+ static_cast<Handler&&>(handler_)(
static_cast<const Arg1&>(arg1_),
static_cast<const Arg2&>(arg2_),
static_cast<const Arg3&>(arg3_),
@@ -714,34 +444,6 @@ public:
template <typename Handler, typename Arg1, typename Arg2,
typename Arg3, typename Arg4, typename Arg5>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1, typename Arg2,
- typename Arg3, typename Arg4, typename Arg5>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1, typename Arg2,
- typename Arg3, typename Arg4, typename Arg5>
inline bool asio_handler_is_continuation(
binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
{
@@ -749,65 +451,37 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4, typename Arg5>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler, typename Arg1,
- typename Arg2, typename Arg3, typename Arg4, typename Arg5>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
template <typename Handler, typename Arg1, typename Arg2,
typename Arg3, typename Arg4, typename Arg5>
-inline binder5<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4, Arg5>
-bind_handler(ASIO_MOVE_ARG(Handler) handler, const Arg1& arg1,
+inline binder5<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4, Arg5>
+bind_handler(Handler&& handler, const Arg1& arg1,
const Arg2& arg2, const Arg3& arg3, const Arg4& arg4, const Arg5& arg5)
{
- return binder5<typename decay<Handler>::type, Arg1, Arg2, Arg3, Arg4, Arg5>(0,
- ASIO_MOVE_CAST(Handler)(handler), arg1, arg2, arg3, arg4, arg5);
+ return binder5<decay_t<Handler>, Arg1, Arg2, Arg3, Arg4, Arg5>(0,
+ static_cast<Handler&&>(handler), arg1, arg2, arg3, arg4, arg5);
}
-#if defined(ASIO_HAS_MOVE)
-
template <typename Handler, typename Arg1>
class move_binder1
{
public:
- move_binder1(int, ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Arg1) arg1)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
- arg1_(ASIO_MOVE_CAST(Arg1)(arg1))
+ move_binder1(int, Handler&& handler,
+ Arg1&& arg1)
+ : handler_(static_cast<Handler&&>(handler)),
+ arg1_(static_cast<Arg1&&>(arg1))
{
}
move_binder1(move_binder1&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_))
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_))
{
}
void operator()()
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
- ASIO_MOVE_CAST(Arg1)(arg1_));
+ static_cast<Handler&&>(handler_)(
+ static_cast<Arg1&&>(arg1_));
}
//private:
@@ -816,32 +490,6 @@ public:
};
template <typename Handler, typename Arg1>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- move_binder1<Handler, Arg1>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- move_binder1<Handler, Arg1>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1>
inline bool asio_handler_is_continuation(
move_binder1<Handler, Arg1>* this_handler)
{
@@ -849,42 +497,30 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler, typename Arg1>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(ASIO_MOVE_ARG(Function) function,
- move_binder1<Handler, Arg1>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- ASIO_MOVE_CAST(Function)(function), this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
template <typename Handler, typename Arg1, typename Arg2>
class move_binder2
{
public:
- move_binder2(int, ASIO_MOVE_ARG(Handler) handler,
- const Arg1& arg1, ASIO_MOVE_ARG(Arg2) arg2)
- : handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ move_binder2(int, Handler&& handler,
+ const Arg1& arg1, Arg2&& arg2)
+ : handler_(static_cast<Handler&&>(handler)),
arg1_(arg1),
- arg2_(ASIO_MOVE_CAST(Arg2)(arg2))
+ arg2_(static_cast<Arg2&&>(arg2))
{
}
move_binder2(move_binder2&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- arg1_(ASIO_MOVE_CAST(Arg1)(other.arg1_)),
- arg2_(ASIO_MOVE_CAST(Arg2)(other.arg2_))
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ arg1_(static_cast<Arg1&&>(other.arg1_)),
+ arg2_(static_cast<Arg2&&>(other.arg2_))
{
}
void operator()()
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
+ static_cast<Handler&&>(handler_)(
static_cast<const Arg1&>(arg1_),
- ASIO_MOVE_CAST(Arg2)(arg2_));
+ static_cast<Arg2&&>(arg2_));
}
//private:
@@ -894,32 +530,6 @@ public:
};
template <typename Handler, typename Arg1, typename Arg2>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- move_binder2<Handler, Arg1, Arg2>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- move_binder2<Handler, Arg1, Arg2>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Arg1, typename Arg2>
inline bool asio_handler_is_continuation(
move_binder2<Handler, Arg1, Arg2>* this_handler)
{
@@ -927,20 +537,6 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler, typename Arg1, typename Arg2>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(ASIO_MOVE_ARG(Function) function,
- move_binder2<Handler, Arg1, Arg2>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- ASIO_MOVE_CAST(Function)(function), this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-#endif // defined(ASIO_HAS_MOVE)
-
} // namespace detail
template <template <typename, typename> class Associator,
@@ -950,8 +546,14 @@ struct associator<Associator,
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::binder0<Handler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::binder0<Handler>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::binder0<Handler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
@@ -964,8 +566,14 @@ struct associator<Associator,
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::binder1<Handler, Arg1>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::binder1<Handler, Arg1>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::binder1<Handler, Arg1>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
@@ -979,8 +587,14 @@ struct associator<Associator,
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::binder2<Handler, Arg1, Arg2>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::binder2<Handler, Arg1, Arg2>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::binder2<Handler, Arg1, Arg2>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
@@ -994,8 +608,14 @@ struct associator<Associator,
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::binder3<Handler, Arg1, Arg2, Arg3>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::binder3<Handler, Arg1, Arg2, Arg3>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::binder3<Handler, Arg1, Arg2, Arg3>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
@@ -1009,8 +629,14 @@ struct associator<Associator,
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::binder4<Handler, Arg1, Arg2, Arg3, Arg4>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::binder4<Handler, Arg1, Arg2, Arg3, Arg4>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::binder4<Handler, Arg1, Arg2, Arg3, Arg4>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
@@ -1024,15 +650,20 @@ struct associator<Associator,
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
const detail::binder5<Handler, Arg1, Arg2, Arg3, Arg4, Arg5>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
-#if defined(ASIO_HAS_MOVE)
-
template <template <typename, typename> class Associator,
typename Handler, typename Arg1, typename DefaultCandidate>
struct associator<Associator,
@@ -1040,30 +671,39 @@ struct associator<Associator,
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::move_binder1<Handler, Arg1>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::move_binder1<Handler, Arg1>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::move_binder1<Handler, Arg1>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
template <template <typename, typename> class Associator,
- typename Handler, typename Arg1, typename Arg2,
- typename DefaultCandidate>
+ typename Handler, typename Arg1, typename Arg2, typename DefaultCandidate>
struct associator<Associator,
detail::move_binder2<Handler, Arg1, Arg2>, DefaultCandidate>
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::move_binder2<Handler, Arg1, Arg2>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::move_binder2<Handler, Arg1, Arg2>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::move_binder2<Handler, Arg1, Arg2>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
};
-#endif // defined(ASIO_HAS_MOVE)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/detail/blocking_executor_op.hpp b/3rdparty/asio/include/asio/detail/blocking_executor_op.hpp
index d58df20d787..c70e562f403 100644
--- a/3rdparty/asio/include/asio/detail/blocking_executor_op.hpp
+++ b/3rdparty/asio/include/asio/detail/blocking_executor_op.hpp
@@ -2,7 +2,7 @@
// detail/blocking_executor_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,7 +18,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/event.hpp"
#include "asio/detail/fenced_block.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/mutex.hpp"
#include "asio/detail/scheduler_operation.hpp"
@@ -77,6 +76,7 @@ public:
const asio::error_code& /*ec*/,
std::size_t /*bytes_transferred*/)
{
+ ASIO_ASSUME(base != 0);
blocking_executor_op* o(static_cast<blocking_executor_op*>(base));
typename blocking_executor_op_base<Operation>::do_complete_cleanup
@@ -90,7 +90,7 @@ public:
{
fenced_block b(fenced_block::half);
ASIO_HANDLER_INVOCATION_BEGIN(());
- asio_handler_invoke_helpers::invoke(o->handler_, o->handler_);
+ static_cast<Handler&&>(o->handler_)();
ASIO_HANDLER_INVOCATION_END;
}
}
diff --git a/3rdparty/asio/include/asio/detail/buffer_resize_guard.hpp b/3rdparty/asio/include/asio/detail/buffer_resize_guard.hpp
index 00f4aa34c1c..1a78307aaae 100644
--- a/3rdparty/asio/include/asio/detail/buffer_resize_guard.hpp
+++ b/3rdparty/asio/include/asio/detail/buffer_resize_guard.hpp
@@ -2,7 +2,7 @@
// detail/buffer_resize_guard.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/buffer_sequence_adapter.hpp b/3rdparty/asio/include/asio/detail/buffer_sequence_adapter.hpp
index 89b05ce37ed..8ea904e7023 100644
--- a/3rdparty/asio/include/asio/detail/buffer_sequence_adapter.hpp
+++ b/3rdparty/asio/include/asio/detail/buffer_sequence_adapter.hpp
@@ -2,7 +2,7 @@
// detail/buffer_sequence_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,6 +19,7 @@
#include "asio/buffer.hpp"
#include "asio/detail/array_fwd.hpp"
#include "asio/detail/socket_types.hpp"
+#include "asio/registered_buffer.hpp"
#include "asio/detail/push_options.hpp"
@@ -105,6 +106,7 @@ class buffer_sequence_adapter
{
public:
enum { is_single_buffer = false };
+ enum { is_registered_buffer = false };
explicit buffer_sequence_adapter(const Buffers& buffer_sequence)
: count_(0), total_buffer_size_(0)
@@ -129,6 +131,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -248,6 +255,7 @@ class buffer_sequence_adapter<Buffer, asio::mutable_buffer>
{
public:
enum { is_single_buffer = true };
+ enum { is_registered_buffer = false };
explicit buffer_sequence_adapter(
const asio::mutable_buffer& buffer_sequence)
@@ -271,6 +279,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -310,6 +323,7 @@ class buffer_sequence_adapter<Buffer, asio::const_buffer>
{
public:
enum { is_single_buffer = true };
+ enum { is_registered_buffer = false };
explicit buffer_sequence_adapter(
const asio::const_buffer& buffer_sequence)
@@ -333,6 +347,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -374,6 +393,7 @@ class buffer_sequence_adapter<Buffer, asio::mutable_buffers_1>
{
public:
enum { is_single_buffer = true };
+ enum { is_registered_buffer = false };
explicit buffer_sequence_adapter(
const asio::mutable_buffers_1& buffer_sequence)
@@ -397,6 +417,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -436,6 +461,7 @@ class buffer_sequence_adapter<Buffer, asio::const_buffers_1>
{
public:
enum { is_single_buffer = true };
+ enum { is_registered_buffer = false };
explicit buffer_sequence_adapter(
const asio::const_buffers_1& buffer_sequence)
@@ -459,6 +485,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -494,12 +525,161 @@ private:
#endif // !defined(ASIO_NO_DEPRECATED)
+template <typename Buffer>
+class buffer_sequence_adapter<Buffer, asio::mutable_registered_buffer>
+ : buffer_sequence_adapter_base
+{
+public:
+ enum { is_single_buffer = true };
+ enum { is_registered_buffer = true };
+
+ explicit buffer_sequence_adapter(
+ const asio::mutable_registered_buffer& buffer_sequence)
+ {
+ init_native_buffer(buffer_, buffer_sequence.buffer());
+ total_buffer_size_ = buffer_sequence.size();
+ registered_id_ = buffer_sequence.id();
+ }
+
+ native_buffer_type* buffers()
+ {
+ return &buffer_;
+ }
+
+ std::size_t count() const
+ {
+ return 1;
+ }
+
+ std::size_t total_size() const
+ {
+ return total_buffer_size_;
+ }
+
+ registered_buffer_id registered_id() const
+ {
+ return registered_id_;
+ }
+
+ bool all_empty() const
+ {
+ return total_buffer_size_ == 0;
+ }
+
+ static bool all_empty(
+ const asio::mutable_registered_buffer& buffer_sequence)
+ {
+ return buffer_sequence.size() == 0;
+ }
+
+ static void validate(
+ const asio::mutable_registered_buffer& buffer_sequence)
+ {
+ buffer_sequence.data();
+ }
+
+ static Buffer first(
+ const asio::mutable_registered_buffer& buffer_sequence)
+ {
+ return Buffer(buffer_sequence.buffer());
+ }
+
+ enum { linearisation_storage_size = 1 };
+
+ static Buffer linearise(
+ const asio::mutable_registered_buffer& buffer_sequence,
+ const Buffer&)
+ {
+ return Buffer(buffer_sequence.buffer());
+ }
+
+private:
+ native_buffer_type buffer_;
+ std::size_t total_buffer_size_;
+ registered_buffer_id registered_id_;
+};
+
+template <typename Buffer>
+class buffer_sequence_adapter<Buffer, asio::const_registered_buffer>
+ : buffer_sequence_adapter_base
+{
+public:
+ enum { is_single_buffer = true };
+ enum { is_registered_buffer = true };
+
+ explicit buffer_sequence_adapter(
+ const asio::const_registered_buffer& buffer_sequence)
+ {
+ init_native_buffer(buffer_, buffer_sequence.buffer());
+ total_buffer_size_ = buffer_sequence.size();
+ registered_id_ = buffer_sequence.id();
+ }
+
+ native_buffer_type* buffers()
+ {
+ return &buffer_;
+ }
+
+ std::size_t count() const
+ {
+ return 1;
+ }
+
+ std::size_t total_size() const
+ {
+ return total_buffer_size_;
+ }
+
+ registered_buffer_id registered_id() const
+ {
+ return registered_id_;
+ }
+
+ bool all_empty() const
+ {
+ return total_buffer_size_ == 0;
+ }
+
+ static bool all_empty(
+ const asio::const_registered_buffer& buffer_sequence)
+ {
+ return buffer_sequence.size() == 0;
+ }
+
+ static void validate(
+ const asio::const_registered_buffer& buffer_sequence)
+ {
+ buffer_sequence.data();
+ }
+
+ static Buffer first(
+ const asio::const_registered_buffer& buffer_sequence)
+ {
+ return Buffer(buffer_sequence.buffer());
+ }
+
+ enum { linearisation_storage_size = 1 };
+
+ static Buffer linearise(
+ const asio::const_registered_buffer& buffer_sequence,
+ const Buffer&)
+ {
+ return Buffer(buffer_sequence.buffer());
+ }
+
+private:
+ native_buffer_type buffer_;
+ std::size_t total_buffer_size_;
+ registered_buffer_id registered_id_;
+};
+
template <typename Buffer, typename Elem>
-class buffer_sequence_adapter<Buffer, boost::array<Elem, 2> >
+class buffer_sequence_adapter<Buffer, boost::array<Elem, 2>>
: buffer_sequence_adapter_base
{
public:
enum { is_single_buffer = false };
+ enum { is_registered_buffer = false };
explicit buffer_sequence_adapter(
const boost::array<Elem, 2>& buffer_sequence)
@@ -524,6 +704,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -564,14 +749,13 @@ private:
std::size_t total_buffer_size_;
};
-#if defined(ASIO_HAS_STD_ARRAY)
-
template <typename Buffer, typename Elem>
-class buffer_sequence_adapter<Buffer, std::array<Elem, 2> >
+class buffer_sequence_adapter<Buffer, std::array<Elem, 2>>
: buffer_sequence_adapter_base
{
public:
enum { is_single_buffer = false };
+ enum { is_registered_buffer = false };
explicit buffer_sequence_adapter(
const std::array<Elem, 2>& buffer_sequence)
@@ -596,6 +780,11 @@ public:
return total_buffer_size_;
}
+ registered_buffer_id registered_id() const
+ {
+ return registered_buffer_id();
+ }
+
bool all_empty() const
{
return total_buffer_size_ == 0;
@@ -636,8 +825,6 @@ private:
std::size_t total_buffer_size_;
};
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/buffered_stream_storage.hpp b/3rdparty/asio/include/asio/detail/buffered_stream_storage.hpp
index 04cef8250d9..afe5cadffda 100644
--- a/3rdparty/asio/include/asio/detail/buffered_stream_storage.hpp
+++ b/3rdparty/asio/include/asio/detail/buffered_stream_storage.hpp
@@ -2,7 +2,7 @@
// detail/buffered_stream_storage.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/bulk_executor_op.hpp b/3rdparty/asio/include/asio/detail/bulk_executor_op.hpp
deleted file mode 100644
index 8f6921b9f80..00000000000
--- a/3rdparty/asio/include/asio/detail/bulk_executor_op.hpp
+++ /dev/null
@@ -1,88 +0,0 @@
-//
-// detail/bulk_executor_op.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_DETAIL_BULK_EXECUTOR_OP_HPP
-#define ASIO_DETAIL_BULK_EXECUTOR_OP_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/fenced_block.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
-#include "asio/detail/scheduler_operation.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-template <typename Handler, typename Alloc,
- typename Operation = scheduler_operation>
-class bulk_executor_op : public Operation
-{
-public:
- ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(bulk_executor_op);
-
- template <typename H>
- bulk_executor_op(ASIO_MOVE_ARG(H) h,
- const Alloc& allocator, std::size_t i)
- : Operation(&bulk_executor_op::do_complete),
- handler_(ASIO_MOVE_CAST(H)(h)),
- allocator_(allocator),
- index_(i)
- {
- }
-
- static void do_complete(void* owner, Operation* base,
- const asio::error_code& /*ec*/,
- std::size_t /*bytes_transferred*/)
- {
- // Take ownership of the handler object.
- bulk_executor_op* o(static_cast<bulk_executor_op*>(base));
- Alloc allocator(o->allocator_);
- ptr p = { detail::addressof(allocator), o, o };
-
- ASIO_HANDLER_COMPLETION((*o));
-
- // Make a copy of the handler so that the memory can be deallocated before
- // the upcall is made. Even if we're not about to make an upcall, a
- // sub-object of the handler may be the true owner of the memory associated
- // with the handler. Consequently, a local copy of the handler is required
- // to ensure that any owning sub-object remains valid until after we have
- // deallocated the memory here.
- detail::binder1<Handler, std::size_t> handler(o->handler_, o->index_);
- p.reset();
-
- // Make the upcall if required.
- if (owner)
- {
- fenced_block b(fenced_block::half);
- ASIO_HANDLER_INVOCATION_BEGIN(());
- asio_handler_invoke_helpers::invoke(handler, handler.handler_);
- ASIO_HANDLER_INVOCATION_END;
- }
- }
-
-private:
- Handler handler_;
- Alloc allocator_;
- std::size_t index_;
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_DETAIL_BULK_EXECUTOR_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/call_stack.hpp b/3rdparty/asio/include/asio/detail/call_stack.hpp
index 40f762d4406..c287c57e2c6 100644
--- a/3rdparty/asio/include/asio/detail/call_stack.hpp
+++ b/3rdparty/asio/include/asio/detail/call_stack.hpp
@@ -2,7 +2,7 @@
// detail/call_stack.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/chrono.hpp b/3rdparty/asio/include/asio/detail/chrono.hpp
index 0abae1cd96b..45490dde02e 100644
--- a/3rdparty/asio/include/asio/detail/chrono.hpp
+++ b/3rdparty/asio/include/asio/detail/chrono.hpp
@@ -2,7 +2,7 @@
// detail/chrono.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,17 +16,11 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_CHRONO)
-# include <chrono>
-#elif defined(ASIO_HAS_BOOST_CHRONO)
-# include <boost/chrono/system_clocks.hpp>
-#endif // defined(ASIO_HAS_BOOST_CHRONO)
+#include <chrono>
namespace asio {
namespace chrono {
-#if defined(ASIO_HAS_STD_CHRONO)
using std::chrono::duration;
using std::chrono::time_point;
using std::chrono::duration_cast;
@@ -44,21 +38,6 @@ using std::chrono::steady_clock;
#endif // defined(ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
using std::chrono::system_clock;
using std::chrono::high_resolution_clock;
-#elif defined(ASIO_HAS_BOOST_CHRONO)
-using boost::chrono::duration;
-using boost::chrono::time_point;
-using boost::chrono::duration_cast;
-using boost::chrono::nanoseconds;
-using boost::chrono::microseconds;
-using boost::chrono::milliseconds;
-using boost::chrono::seconds;
-using boost::chrono::minutes;
-using boost::chrono::hours;
-using boost::chrono::time_point_cast;
-using boost::chrono::system_clock;
-using boost::chrono::steady_clock;
-using boost::chrono::high_resolution_clock;
-#endif // defined(ASIO_HAS_BOOST_CHRONO)
} // namespace chrono
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/chrono_time_traits.hpp b/3rdparty/asio/include/asio/detail/chrono_time_traits.hpp
index 17b9645cc0d..de7b7d69929 100644
--- a/3rdparty/asio/include/asio/detail/chrono_time_traits.hpp
+++ b/3rdparty/asio/include/asio/detail/chrono_time_traits.hpp
@@ -2,7 +2,7 @@
// detail/chrono_time_traits.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/completion_handler.hpp b/3rdparty/asio/include/asio/detail/completion_handler.hpp
index 5c24fa42a8b..c6f98b36c38 100644
--- a/3rdparty/asio/include/asio/detail/completion_handler.hpp
+++ b/3rdparty/asio/include/asio/detail/completion_handler.hpp
@@ -2,7 +2,7 @@
// detail/completion_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -35,7 +35,7 @@ public:
completion_handler(Handler& h, const IoExecutor& io_ex)
: operation(&completion_handler::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(h)),
+ handler_(static_cast<Handler&&>(h)),
work_(handler_, io_ex)
{
}
@@ -52,7 +52,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
h->work_));
// Make a copy of the handler so that the memory can be deallocated before
@@ -61,7 +61,7 @@ public:
// with the handler. Consequently, a local copy of the handler is required
// to ensure that any owning sub-object remains valid until after we have
// deallocated the memory here.
- Handler handler(ASIO_MOVE_CAST(Handler)(h->handler_));
+ Handler handler(static_cast<Handler&&>(h->handler_));
p.h = asio::detail::addressof(handler);
p.reset();
diff --git a/3rdparty/asio/include/asio/detail/composed_work.hpp b/3rdparty/asio/include/asio/detail/composed_work.hpp
new file mode 100644
index 00000000000..8076f8508d6
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/composed_work.hpp
@@ -0,0 +1,252 @@
+//
+// detail/composed_work.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 ASIO_DETAIL_COMPOSED_WORK_HPP
+#define ASIO_DETAIL_COMPOSED_WORK_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution/outstanding_work.hpp"
+#include "asio/executor_work_guard.hpp"
+#include "asio/is_executor.hpp"
+#include "asio/system_executor.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Executor, typename = void>
+class composed_work_guard
+{
+public:
+ typedef decay_t<
+ prefer_result_t<Executor, execution::outstanding_work_t::tracked_t>
+ > executor_type;
+
+ composed_work_guard(const Executor& ex)
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ void reset()
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+private:
+ executor_type executor_;
+};
+
+template <>
+struct composed_work_guard<system_executor>
+{
+public:
+ typedef system_executor executor_type;
+
+ composed_work_guard(const system_executor&)
+ {
+ }
+
+ void reset()
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return system_executor();
+ }
+};
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Executor>
+struct composed_work_guard<Executor,
+ enable_if_t<
+ !execution::is_executor<Executor>::value
+ >
+ > : executor_work_guard<Executor>
+{
+ composed_work_guard(const Executor& ex)
+ : executor_work_guard<Executor>(ex)
+ {
+ }
+};
+
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename>
+struct composed_io_executors;
+
+template <>
+struct composed_io_executors<void()>
+{
+ composed_io_executors() noexcept
+ : head_(system_executor())
+ {
+ }
+
+ typedef system_executor head_type;
+ system_executor head_;
+};
+
+inline composed_io_executors<void()> make_composed_io_executors()
+{
+ return composed_io_executors<void()>();
+}
+
+template <typename Head>
+struct composed_io_executors<void(Head)>
+{
+ explicit composed_io_executors(const Head& ex) noexcept
+ : head_(ex)
+ {
+ }
+
+ typedef Head head_type;
+ Head head_;
+};
+
+template <typename Head>
+inline composed_io_executors<void(Head)>
+make_composed_io_executors(const Head& head)
+{
+ return composed_io_executors<void(Head)>(head);
+}
+
+template <typename Head, typename... Tail>
+struct composed_io_executors<void(Head, Tail...)>
+{
+ explicit composed_io_executors(const Head& head,
+ const Tail&... tail) noexcept
+ : head_(head),
+ tail_(tail...)
+ {
+ }
+
+ void reset()
+ {
+ head_.reset();
+ tail_.reset();
+ }
+
+ typedef Head head_type;
+ Head head_;
+ composed_io_executors<void(Tail...)> tail_;
+};
+
+template <typename Head, typename... Tail>
+inline composed_io_executors<void(Head, Tail...)>
+make_composed_io_executors(const Head& head, const Tail&... tail)
+{
+ return composed_io_executors<void(Head, Tail...)>(head, tail...);
+}
+
+template <typename>
+struct composed_work;
+
+template <>
+struct composed_work<void()>
+{
+ typedef composed_io_executors<void()> executors_type;
+
+ composed_work(const executors_type&) noexcept
+ : head_(system_executor())
+ {
+ }
+
+ void reset()
+ {
+ head_.reset();
+ }
+
+ typedef system_executor head_type;
+ composed_work_guard<system_executor> head_;
+};
+
+template <typename Head>
+struct composed_work<void(Head)>
+{
+ typedef composed_io_executors<void(Head)> executors_type;
+
+ explicit composed_work(const executors_type& ex) noexcept
+ : head_(ex.head_)
+ {
+ }
+
+ void reset()
+ {
+ head_.reset();
+ }
+
+ typedef Head head_type;
+ composed_work_guard<Head> head_;
+};
+
+template <typename Head, typename... Tail>
+struct composed_work<void(Head, Tail...)>
+{
+ typedef composed_io_executors<void(Head, Tail...)> executors_type;
+
+ explicit composed_work(const executors_type& ex) noexcept
+ : head_(ex.head_),
+ tail_(ex.tail_)
+ {
+ }
+
+ void reset()
+ {
+ head_.reset();
+ tail_.reset();
+ }
+
+ typedef Head head_type;
+ composed_work_guard<Head> head_;
+ composed_work<void(Tail...)> tail_;
+};
+
+template <typename IoObject>
+inline typename IoObject::executor_type
+get_composed_io_executor(IoObject& io_object,
+ enable_if_t<
+ !is_executor<IoObject>::value
+ >* = 0,
+ enable_if_t<
+ !execution::is_executor<IoObject>::value
+ >* = 0)
+{
+ return io_object.get_executor();
+}
+
+template <typename Executor>
+inline const Executor& get_composed_io_executor(const Executor& ex,
+ enable_if_t<
+ is_executor<Executor>::value
+ || execution::is_executor<Executor>::value
+ >* = 0)
+{
+ return ex;
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_COMPOSED_WORK_HPP
diff --git a/3rdparty/asio/include/asio/detail/concurrency_hint.hpp b/3rdparty/asio/include/asio/detail/concurrency_hint.hpp
index 60ab2a8cd3f..43e81a4c22d 100644
--- a/3rdparty/asio/include/asio/detail/concurrency_hint.hpp
+++ b/3rdparty/asio/include/asio/detail/concurrency_hint.hpp
@@ -2,7 +2,7 @@
// detail/concurrency_hint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp b/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp
index bb5c524b0c7..af68dde32c0 100644
--- a/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp
+++ b/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp
@@ -2,7 +2,7 @@
// detail/conditionally_enabled_event.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/conditionally_enabled_mutex.hpp b/3rdparty/asio/include/asio/detail/conditionally_enabled_mutex.hpp
index 4f354ea5b8d..27fc30ecbb2 100644
--- a/3rdparty/asio/include/asio/detail/conditionally_enabled_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/conditionally_enabled_mutex.hpp
@@ -2,7 +2,7 @@
// detail/conditionally_enabled_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/config.hpp b/3rdparty/asio/include/asio/detail/config.hpp
index be350c4e6d0..cd345eac2cd 100644
--- a/3rdparty/asio/include/asio/detail/config.hpp
+++ b/3rdparty/asio/include/asio/detail/config.hpp
@@ -2,7 +2,7 @@
// detail/config.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -24,6 +24,17 @@
# endif // !defined(ASIO_ENABLE_BOOST)
#endif // !defined(ASIO_STANDALONE)
+// Make standard library feature macros available.
+#if defined(__has_include)
+# if __has_include(<version>)
+# include <version>
+# else // __has_include(<version>)
+# include <cstddef>
+# endif // __has_include(<version>)
+#else // defined(__has_include)
+# include <cstddef>
+#endif // defined(__has_include)
+
// boostify: non-boost code ends here
#if defined(ASIO_STANDALONE)
# define ASIO_DISABLE_BOOST_ALIGN 1
@@ -38,6 +49,7 @@
# define ASIO_DISABLE_BOOST_THROW_EXCEPTION 1
# define ASIO_DISABLE_BOOST_WORKAROUND 1
#else // defined(ASIO_STANDALONE)
+// Boost.Config library is available.
# include <boost/config.hpp>
# include <boost/version.hpp>
# define ASIO_HAS_BOOST_CONFIG 1
@@ -106,244 +118,85 @@
# include <android/api-level.h>
#endif // defined(__ANDROID__)
-// Support move construction and assignment on compilers known to allow it.
-#if !defined(ASIO_HAS_MOVE)
-# if !defined(ASIO_DISABLE_MOVE)
-# if defined(__clang__)
-# if __has_feature(__cxx_rvalue_references__)
-# define ASIO_HAS_MOVE 1
-# endif // __has_feature(__cxx_rvalue_references__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_MOVE 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_MOVE 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# if defined(__INTEL_CXX11_MODE__)
-# if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500)
-# define ASIO_HAS_MOVE 1
-# endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500)
-# if defined(__ICL) && (__ICL >= 1500)
-# define ASIO_HAS_MOVE 1
-# endif // defined(__ICL) && (__ICL >= 1500)
-# endif // defined(__INTEL_CXX11_MODE__)
-# endif // !defined(ASIO_DISABLE_MOVE)
-#endif // !defined(ASIO_HAS_MOVE)
-
-// If ASIO_MOVE_CAST isn't defined, and move support is available, define
-// * ASIO_MOVE_ARG,
-// * ASIO_NONDEDUCED_MOVE_ARG, and
-// * ASIO_MOVE_CAST
-// to take advantage of rvalue references and perfect forwarding.
-#if defined(ASIO_HAS_MOVE) && !defined(ASIO_MOVE_CAST)
+// Always enabled. Retained for backwards compatibility in user code.
+#if !defined(ASIO_DISABLE_CXX11_MACROS)
+# define ASIO_HAS_MOVE 1
# define ASIO_MOVE_ARG(type) type&&
# define ASIO_MOVE_ARG2(type1, type2) type1, type2&&
# define ASIO_NONDEDUCED_MOVE_ARG(type) type&
# define ASIO_MOVE_CAST(type) static_cast<type&&>
# define ASIO_MOVE_CAST2(type1, type2) static_cast<type1, type2&&>
# define ASIO_MOVE_OR_LVALUE(type) static_cast<type&&>
+# define ASIO_MOVE_OR_LVALUE_ARG(type) type&&
# define ASIO_MOVE_OR_LVALUE_TYPE(type) type
-#endif // defined(ASIO_HAS_MOVE) && !defined(ASIO_MOVE_CAST)
-
-// If ASIO_MOVE_CAST still isn't defined, default to a C++03-compatible
-// implementation. Note that older g++ and MSVC versions don't like it when you
-// pass a non-member function through a const reference, so for most compilers
-// we'll play it safe and stick with the old approach of passing the handler by
-// value.
-#if !defined(ASIO_MOVE_CAST)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
-# define ASIO_MOVE_ARG(type) const type&
-# else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
-# define ASIO_MOVE_ARG(type) type
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
-# elif defined(ASIO_MSVC)
-# if (_MSC_VER >= 1400)
-# define ASIO_MOVE_ARG(type) const type&
-# else // (_MSC_VER >= 1400)
-# define ASIO_MOVE_ARG(type) type
-# endif // (_MSC_VER >= 1400)
-# else
-# define ASIO_MOVE_ARG(type) type
-# endif
-# define ASIO_NONDEDUCED_MOVE_ARG(type) const type&
-# define ASIO_MOVE_CAST(type) static_cast<const type&>
-# define ASIO_MOVE_CAST2(type1, type2) static_cast<const type1, type2&>
-# define ASIO_MOVE_OR_LVALUE(type)
-# define ASIO_MOVE_OR_LVALUE_TYPE(type) type&
-#endif // !defined(ASIO_MOVE_CAST)
-
-// Support variadic templates on compilers known to allow it.
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-# if !defined(ASIO_DISABLE_VARIADIC_TEMPLATES)
-# if defined(__clang__)
-# if __has_feature(__cxx_variadic_templates__)
-# define ASIO_HAS_VARIADIC_TEMPLATES 1
-# endif // __has_feature(__cxx_variadic_templates__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_VARIADIC_TEMPLATES 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define ASIO_HAS_VARIADIC_TEMPLATES 1
-# endif // (_MSC_VER >= 1900)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_VARIADIC_TEMPLATES)
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-#if !defined(ASIO_ELLIPSIS)
-# if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-# define ASIO_ELLIPSIS ...
-# else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-# define ASIO_ELLIPSIS
-# endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-#endif // !defined(ASIO_ELLIPSIS)
-
-// Support deleted functions on compilers known to allow it.
-#if !defined(ASIO_DELETED)
-# if defined(__clang__)
-# if __has_feature(__cxx_deleted_functions__)
-# define ASIO_DELETED = delete
-# endif // __has_feature(__cxx_deleted_functions__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_DELETED = delete
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define ASIO_DELETED = delete
-# endif // (_MSC_VER >= 1900)
-# endif // defined(ASIO_MSVC)
-# if !defined(ASIO_DELETED)
-# define ASIO_DELETED
-# endif // !defined(ASIO_DELETED)
-#endif // !defined(ASIO_DELETED)
-
-// Support constexpr on compilers known to allow it.
-#if !defined(ASIO_HAS_CONSTEXPR)
-# if !defined(ASIO_DISABLE_CONSTEXPR)
-# if defined(__clang__)
-# if __has_feature(__cxx_constexpr__)
-# define ASIO_HAS_CONSTEXPR 1
-# endif // __has_feature(__cxx_constexpr__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_CONSTEXPR 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define ASIO_HAS_CONSTEXPR 1
-# endif // (_MSC_VER >= 1900)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_CONSTEXPR)
-#endif // !defined(ASIO_HAS_CONSTEXPR)
-#if !defined(ASIO_CONSTEXPR)
-# if defined(ASIO_HAS_CONSTEXPR)
-# define ASIO_CONSTEXPR constexpr
-# else // defined(ASIO_HAS_CONSTEXPR)
-# define ASIO_CONSTEXPR
-# endif // defined(ASIO_HAS_CONSTEXPR)
-#endif // !defined(ASIO_CONSTEXPR)
-#if !defined(ASIO_STATIC_CONSTEXPR)
-# if defined(ASIO_HAS_CONSTEXPR)
-# define ASIO_STATIC_CONSTEXPR(type, assignment) \
- static constexpr type assignment
-# else // defined(ASIO_HAS_CONSTEXPR)
-# define ASIO_STATIC_CONSTEXPR(type, assignment) \
- static const type assignment
-# endif // defined(ASIO_HAS_CONSTEXPR)
-#endif // !defined(ASIO_STATIC_CONSTEXPR)
+# define ASIO_DELETED = delete
+# define ASIO_HAS_VARIADIC_TEMPLATES 1
+# define ASIO_HAS_CONSTEXPR 1
+# define ASIO_STATIC_CONSTEXPR(type, assignment) \
+ static constexpr type assignment
+# define ASIO_HAS_NOEXCEPT 1
+# define ASIO_NOEXCEPT noexcept(true)
+# define ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
+# define ASIO_NOEXCEPT_IF(c) noexcept(c)
+# define ASIO_HAS_DECLTYPE 1
+# define ASIO_AUTO_RETURN_TYPE_PREFIX(t) auto
+# define ASIO_AUTO_RETURN_TYPE_PREFIX2(t0, t1) auto
+# define ASIO_AUTO_RETURN_TYPE_PREFIX3(t0, t1, t2) auto
+# define ASIO_AUTO_RETURN_TYPE_SUFFIX(expr) -> decltype expr
+# define ASIO_HAS_ALIAS_TEMPLATES 1
+# define ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS 1
+# define ASIO_HAS_ENUM_CLASS 1
+# define ASIO_HAS_REF_QUALIFIED_FUNCTIONS 1
+# define ASIO_LVALUE_REF_QUAL &
+# define ASIO_RVALUE_REF_QUAL &&
+# define ASIO_HAS_USER_DEFINED_LITERALS 1
+# define ASIO_HAS_ALIGNOF 1
+# define ASIO_ALIGNOF(T) alignof(T)
+# define ASIO_HAS_STD_ALIGN 1
+# define ASIO_HAS_STD_SYSTEM_ERROR 1
+# define ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
+# define ASIO_HAS_STD_ARRAY 1
+# define ASIO_HAS_STD_SHARED_PTR 1
+# define ASIO_HAS_STD_ALLOCATOR_ARG 1
+# define ASIO_HAS_STD_ATOMIC 1
+# define ASIO_HAS_STD_CHRONO 1
+# define ASIO_HAS_STD_ADDRESSOF 1
+# define ASIO_HAS_STD_FUNCTION 1
+# define ASIO_HAS_STD_REFERENCE_WRAPPER 1
+# define ASIO_HAS_STD_TYPE_TRAITS 1
+# define ASIO_HAS_NULLPTR 1
+# define ASIO_HAS_CXX11_ALLOCATORS 1
+# define ASIO_HAS_CSTDINT 1
+# define ASIO_HAS_STD_THREAD 1
+# define ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
+# define ASIO_HAS_STD_CALL_ONCE 1
+# define ASIO_HAS_STD_FUTURE 1
+# define ASIO_HAS_STD_TUPLE 1
+# define ASIO_HAS_STD_IOSTREAM_MOVE 1
+# define ASIO_HAS_STD_EXCEPTION_PTR 1
+# define ASIO_HAS_STD_NESTED_EXCEPTION 1
+# define ASIO_HAS_STD_HASH 1
+#endif // !defined(ASIO_DISABLE_CXX11_MACROS)
+
+// Support for static constexpr with default initialisation.
#if !defined(ASIO_STATIC_CONSTEXPR_DEFAULT_INIT)
-# if defined(ASIO_HAS_CONSTEXPR)
-# if defined(__GNUC__)
-# if (__GNUC__ >= 8)
-# define ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
- static constexpr const type name{}
-# else // (__GNUC__ >= 8)
-# define ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
- static const type name
-# endif // (__GNUC__ >= 8)
-# elif defined(ASIO_MSVC)
-# define ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
- static const type name
-# else // defined(ASIO_MSVC)
+# if defined(__GNUC__)
+# if (__GNUC__ >= 8)
# define ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
static constexpr const type name{}
-# endif // defined(ASIO_MSVC)
-# else // defined(ASIO_HAS_CONSTEXPR)
+# else // (__GNUC__ >= 8)
+# define ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
+ static const type name
+# endif // (__GNUC__ >= 8)
+# elif defined(ASIO_MSVC)
# define ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
static const type name
-# endif // defined(ASIO_HAS_CONSTEXPR)
+# else // defined(ASIO_MSVC)
+# define ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(type, name) \
+ static constexpr const type name{}
+# endif // defined(ASIO_MSVC)
#endif // !defined(ASIO_STATIC_CONSTEXPR_DEFAULT_INIT)
-// Support noexcept on compilers known to allow it.
-#if !defined(ASIO_HAS_NOEXCEPT)
-# if !defined(ASIO_DISABLE_NOEXCEPT)
-# if defined(ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105300)
-# if !defined(BOOST_NO_NOEXCEPT)
-# define ASIO_HAS_NOEXCEPT 1
-# endif // !defined(BOOST_NO_NOEXCEPT)
-# define ASIO_NOEXCEPT BOOST_NOEXCEPT
-# define ASIO_NOEXCEPT_OR_NOTHROW BOOST_NOEXCEPT_OR_NOTHROW
-# define ASIO_NOEXCEPT_IF(c) BOOST_NOEXCEPT_IF(c)
-# elif defined(__clang__)
-# if __has_feature(__cxx_noexcept__)
-# define ASIO_HAS_NOEXCEPT 1
-# endif // __has_feature(__cxx_noexcept__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_NOEXCEPT 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# elif defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define ASIO_HAS_NOEXCEPT 1
-# endif // (_MSC_VER >= 1900)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_NOEXCEPT)
-# if !defined(ASIO_NOEXCEPT)
-# endif // !defined(ASIO_NOEXCEPT)
-# if !defined(ASIO_NOEXCEPT_OR_NOTHROW)
-# endif // !defined(ASIO_NOEXCEPT_OR_NOTHROW)
-#endif // !defined(ASIO_HAS_NOEXCEPT)
-#if !defined(ASIO_NOEXCEPT)
-# if defined(ASIO_HAS_NOEXCEPT)
-# define ASIO_NOEXCEPT noexcept(true)
-# else // defined(ASIO_HAS_NOEXCEPT)
-# define ASIO_NOEXCEPT
-# endif // defined(ASIO_HAS_NOEXCEPT)
-#endif // !defined(ASIO_NOEXCEPT)
-#if !defined(ASIO_NOEXCEPT_OR_NOTHROW)
-# if defined(ASIO_HAS_NOEXCEPT)
-# define ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
-# else // defined(ASIO_HAS_NOEXCEPT)
-# define ASIO_NOEXCEPT_OR_NOTHROW throw()
-# endif // defined(ASIO_HAS_NOEXCEPT)
-#endif // !defined(ASIO_NOEXCEPT_OR_NOTHROW)
-#if !defined(ASIO_NOEXCEPT_IF)
-# if defined(ASIO_HAS_NOEXCEPT)
-# define ASIO_NOEXCEPT_IF(c) noexcept(c)
-# else // defined(ASIO_HAS_NOEXCEPT)
-# define ASIO_NOEXCEPT_IF(c)
-# endif // defined(ASIO_HAS_NOEXCEPT)
-#endif // !defined(ASIO_NOEXCEPT_IF)
-
// Support noexcept on function types on compilers known to allow it.
#if !defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
# if !defined(ASIO_DISABLE_NOEXCEPT_FUNCTION_TYPE)
@@ -363,50 +216,6 @@
# endif // !defined(ASIO_DISABLE_NOEXCEPT_FUNCTION_TYPE)
#endif // !defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-// Support automatic type deduction on compilers known to support it.
-#if !defined(ASIO_HAS_DECLTYPE)
-# if !defined(ASIO_DISABLE_DECLTYPE)
-# if defined(__clang__)
-# if __has_feature(__cxx_decltype__)
-# define ASIO_HAS_DECLTYPE 1
-# endif // __has_feature(__cxx_decltype__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_DECLTYPE 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1800)
-# define ASIO_HAS_DECLTYPE 1
-# endif // (_MSC_VER >= 1800)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_DECLTYPE)
-#endif // !defined(ASIO_HAS_DECLTYPE)
-
-// Support alias templates on compilers known to allow it.
-#if !defined(ASIO_HAS_ALIAS_TEMPLATES)
-# if !defined(ASIO_DISABLE_ALIAS_TEMPLATES)
-# if defined(__clang__)
-# if __has_feature(__cxx_alias_templates__)
-# define ASIO_HAS_ALIAS_TEMPLATES 1
-# endif // __has_feature(__cxx_alias_templates__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_ALIAS_TEMPLATES 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define ASIO_HAS_ALIAS_TEMPLATES 1
-# endif // (_MSC_VER >= 1900)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_ALIAS_TEMPLATES)
-#endif // !defined(ASIO_HAS_ALIAS_TEMPLATES)
-
// Support return type deduction on compilers known to allow it.
#if !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
# if !defined(ASIO_DISABLE_RETURN_TYPE_DEDUCTION)
@@ -420,35 +229,13 @@
# if (__cpp_return_type_deduction >= 201304)
# define ASIO_HAS_RETURN_TYPE_DEDUCTION 1
# endif // (__cpp_return_type_deduction >= 201304)
-# endif // defined(__cpp_return_type_deduction)
-# endif // !defined(ASIO_DISABLE_RETURN_TYPE_DEDUCTION)
-#endif // !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
-
-// Support default function template arguments on compilers known to allow it.
-#if !defined(ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
-# if !defined(ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
-# if (__cplusplus >= 201103)
-# define ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS 1
-# elif defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900 && _MSVC_LANG >= 201103)
-# define ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS 1
-# endif // (_MSC_VER >= 1900 && _MSVC_LANG >= 201103)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
-#endif // !defined(ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
-
-// Support enum classes on compilers known to allow them.
-#if !defined(ASIO_HAS_ENUM_CLASS)
-# if !defined(ASIO_DISABLE_ENUM_CLASS)
-# if (__cplusplus >= 201103)
-# define ASIO_HAS_ENUM_CLASS 1
# elif defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900 && _MSVC_LANG >= 201103)
-# define ASIO_HAS_ENUM_CLASS 1
-# endif // (_MSC_VER >= 1900 && _MSVC_LANG >= 201103)
+# if (_MSC_VER >= 1900 && _MSVC_LANG >= 201402)
+# define ASIO_HAS_RETURN_TYPE_DEDUCTION 1
+# endif // (_MSC_VER >= 1900 && _MSVC_LANG >= 201402)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_ENUM_CLASS)
-#endif // !defined(ASIO_HAS_ENUM_CLASS)
+# endif // !defined(ASIO_DISABLE_RETURN_TYPE_DEDUCTION)
+#endif // !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
// Support concepts on compilers known to allow them.
#if !defined(ASIO_HAS_CONCEPTS)
@@ -464,6 +251,17 @@
# endif // !defined(ASIO_DISABLE_CONCEPTS)
#endif // !defined(ASIO_HAS_CONCEPTS)
+// Support concepts on compilers known to allow them.
+#if !defined(ASIO_HAS_STD_CONCEPTS)
+# if !defined(ASIO_DISABLE_STD_CONCEPTS)
+# if defined(ASIO_HAS_CONCEPTS)
+# if (__cpp_lib_concepts >= 202002L)
+# define ASIO_HAS_STD_CONCEPTS 1
+# endif // (__cpp_concepts >= 202002L)
+# endif // defined(ASIO_HAS_CONCEPTS)
+# endif // !defined(ASIO_DISABLE_STD_CONCEPTS)
+#endif // !defined(ASIO_HAS_STD_CONCEPTS)
+
// Support template variables on compilers known to allow it.
#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
# if !defined(ASIO_DISABLE_VARIABLE_TEMPLATES)
@@ -549,67 +347,37 @@
# endif // !defined(ASIO_DISABLE_WORKING_EXPRESSION_SFINAE)
#endif // !defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-// Support ref-qualified functions on compilers known to allow it.
-#if !defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-# if !defined(ASIO_DISABLE_REF_QUALIFIED_FUNCTIONS)
-# if defined(__clang__)
-# if __has_feature(__cxx_reference_qualified_functions__)
-# define ASIO_HAS_REF_QUALIFIED_FUNCTIONS 1
-# endif // __has_feature(__cxx_reference_qualified_functions__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_REF_QUALIFIED_FUNCTIONS 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define ASIO_HAS_REF_QUALIFIED_FUNCTIONS 1
-# endif // (_MSC_VER >= 1900)
+// Support for capturing parameter packs in lambdas.
+#if !defined(ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
+# if !defined(ASIO_DISABLE_VARIADIC_LAMBDA_CAPTURES)
+# if defined(__GNUC__)
+# if (__GNUC__ >= 6)
+# define ASIO_HAS_VARIADIC_LAMBDA_CAPTURES 1
+# endif // (__GNUC__ >= 6)
+# elif defined(ASIO_MSVC)
+# if (_MSVC_LANG >= 201103)
+# define ASIO_HAS_VARIADIC_LAMBDA_CAPTURES 1
+# endif // (_MSC_LANG >= 201103)
+# else // defined(ASIO_MSVC)
+# if (__cplusplus >= 201103)
+# define ASIO_HAS_VARIADIC_LAMBDA_CAPTURES 1
+# endif // (__cplusplus >= 201103)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_REF_QUALIFIED_FUNCTIONS)
-#endif // !defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-# if !defined(ASIO_LVALUE_REF_QUAL)
-# define ASIO_LVALUE_REF_QUAL &
-# endif // !defined(ASIO_LVALUE_REF_QUAL)
-# if !defined(ASIO_RVALUE_REF_QUAL)
-# define ASIO_RVALUE_REF_QUAL &&
-# endif // !defined(ASIO_RVALUE_REF_QUAL)
-#else // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-# if !defined(ASIO_LVALUE_REF_QUAL)
-# define ASIO_LVALUE_REF_QUAL
-# endif // !defined(ASIO_LVALUE_REF_QUAL)
-# if !defined(ASIO_RVALUE_REF_QUAL)
-# define ASIO_RVALUE_REF_QUAL
-# endif // !defined(ASIO_RVALUE_REF_QUAL)
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-// Support for the alignof operator.
-#if !defined(ASIO_HAS_ALIGNOF)
-# if !defined(ASIO_DISABLE_ALIGNOF)
-# if (__cplusplus >= 201103)
-# define ASIO_HAS_ALIGNOF 1
-# endif // (__cplusplus >= 201103)
-# endif // !defined(ASIO_DISABLE_ALIGNOF)
-#endif // !defined(ASIO_HAS_ALIGNOF)
+# endif // !defined(ASIO_DISABLE_VARIADIC_LAMBDA_CAPTURES)
+#endif // !defined(ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
-#if defined(ASIO_HAS_ALIGNOF)
-# define ASIO_ALIGNOF(T) alignof(T)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
-# define ASIO_DEFAULT_ALIGN alignof(std::max_align_t)
-# else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
-# define ASIO_DEFAULT_ALIGN alignof(max_align_t)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
-# else // defined(__GNUC__)
+// Default alignment.
+#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
+# define ASIO_DEFAULT_ALIGN __STDCPP_DEFAULT_NEW_ALIGNMENT__
+#elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
# define ASIO_DEFAULT_ALIGN alignof(std::max_align_t)
-# endif // defined(__GNUC__)
-#else // defined(ASIO_HAS_ALIGNOF)
-# define ASIO_ALIGNOF(T) 1
-# define ASIO_DEFAULT_ALIGN 1
-#endif // defined(ASIO_HAS_ALIGNOF)
+# else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
+# define ASIO_DEFAULT_ALIGN alignof(max_align_t)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
+#else // defined(__GNUC__)
+# define ASIO_DEFAULT_ALIGN alignof(std::max_align_t)
+#endif // defined(__GNUC__)
// Standard library support for aligned allocation.
#if !defined(ASIO_HAS_STD_ALIGNED_ALLOC)
@@ -617,208 +385,45 @@
# if (__cplusplus >= 201703)
# if defined(__clang__)
# if defined(ASIO_HAS_CLANG_LIBCXX)
-# if (_LIBCPP_STD_VER > 14) && defined(_LIBCPP_HAS_ALIGNED_ALLOC)
-# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# if (_LIBCPP_STD_VER > 14) && defined(_LIBCPP_HAS_ALIGNED_ALLOC) \
+ && !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__)
+# if defined(__APPLE__)
+# if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+# if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
+# elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
+# if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // (__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
+# elif defined(__TV_OS_VERSION_MIN_REQUIRED)
+# if (__TV_OS_VERSION_MIN_REQUIRED >= 130000)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // (__TV_OS_VERSION_MIN_REQUIRED >= 130000)
+# elif defined(__WATCH_OS_VERSION_MIN_REQUIRED)
+# if (__WATCH_OS_VERSION_MIN_REQUIRED >= 60000)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // (__WATCH_OS_VERSION_MIN_REQUIRED >= 60000)
+# endif // defined(__WATCH_OS_X_VERSION_MIN_REQUIRED)
+# else // defined(__APPLE__)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // defined(__APPLE__)
# endif // (_LIBCPP_STD_VER > 14) && defined(_LIBCPP_HAS_ALIGNED_ALLOC)
+ // && !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__)
# elif defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
# define ASIO_HAS_STD_ALIGNED_ALLOC 1
# endif // defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
# elif defined(__GNUC__)
-# if defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
-# define ASIO_HAS_STD_ALIGNED_ALLOC 1
-# endif // defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
+# if ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 7)
+# if defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
+# define ASIO_HAS_STD_ALIGNED_ALLOC 1
+# endif // defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)
+# endif // ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 7)
# endif // defined(__GNUC__)
# endif // (__cplusplus >= 201703)
# endif // !defined(ASIO_DISABLE_STD_ALIGNED_ALLOC)
#endif // !defined(ASIO_HAS_STD_ALIGNED_ALLOC)
-// Standard library support for system errors.
-#if !defined(ASIO_HAS_STD_SYSTEM_ERROR)
-# if !defined(ASIO_DISABLE_STD_SYSTEM_ERROR)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_SYSTEM_ERROR 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<system_error>)
-# define ASIO_HAS_STD_SYSTEM_ERROR 1
-# endif // __has_include(<system_error>)
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_SYSTEM_ERROR 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_SYSTEM_ERROR 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_SYSTEM_ERROR)
-#endif // !defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
-// Compliant C++11 compilers put noexcept specifiers on error_category members.
-#if !defined(ASIO_ERROR_CATEGORY_NOEXCEPT)
-# if defined(ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105300)
-# define ASIO_ERROR_CATEGORY_NOEXCEPT BOOST_NOEXCEPT
-# elif defined(__clang__)
-# if __has_feature(__cxx_noexcept__)
-# define ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
-# endif // __has_feature(__cxx_noexcept__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# elif defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
-# endif // (_MSC_VER >= 1900)
-# endif // defined(ASIO_MSVC)
-# if !defined(ASIO_ERROR_CATEGORY_NOEXCEPT)
-# define ASIO_ERROR_CATEGORY_NOEXCEPT
-# endif // !defined(ASIO_ERROR_CATEGORY_NOEXCEPT)
-#endif // !defined(ASIO_ERROR_CATEGORY_NOEXCEPT)
-
-// Standard library support for arrays.
-#if !defined(ASIO_HAS_STD_ARRAY)
-# if !defined(ASIO_DISABLE_STD_ARRAY)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_ARRAY 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<array>)
-# define ASIO_HAS_STD_ARRAY 1
-# endif // __has_include(<array>)
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_ARRAY 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1600)
-# define ASIO_HAS_STD_ARRAY 1
-# endif // (_MSC_VER >= 1600)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_ARRAY)
-#endif // !defined(ASIO_HAS_STD_ARRAY)
-
-// Standard library support for shared_ptr and weak_ptr.
-#if !defined(ASIO_HAS_STD_SHARED_PTR)
-# if !defined(ASIO_DISABLE_STD_SHARED_PTR)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_SHARED_PTR 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_SHARED_PTR 1
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_SHARED_PTR 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1600)
-# define ASIO_HAS_STD_SHARED_PTR 1
-# endif // (_MSC_VER >= 1600)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_SHARED_PTR)
-#endif // !defined(ASIO_HAS_STD_SHARED_PTR)
-
-// Standard library support for allocator_arg_t.
-#if !defined(ASIO_HAS_STD_ALLOCATOR_ARG)
-# if !defined(ASIO_DISABLE_STD_ALLOCATOR_ARG)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_ALLOCATOR_ARG 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_ALLOCATOR_ARG 1
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_ALLOCATOR_ARG 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1600)
-# define ASIO_HAS_STD_ALLOCATOR_ARG 1
-# endif // (_MSC_VER >= 1600)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_ALLOCATOR_ARG)
-#endif // !defined(ASIO_HAS_STD_ALLOCATOR_ARG)
-
-// Standard library support for atomic operations.
-#if !defined(ASIO_HAS_STD_ATOMIC)
-# if !defined(ASIO_DISABLE_STD_ATOMIC)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_ATOMIC 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<atomic>)
-# define ASIO_HAS_STD_ATOMIC 1
-# endif // __has_include(<atomic>)
-# elif defined(__apple_build_version__) && defined(_LIBCPP_VERSION)
-# if (__clang_major__ >= 10)
-# if __has_include(<atomic>)
-# define ASIO_HAS_STD_ATOMIC 1
-# endif // __has_include(<atomic>)
-# endif // (__clang_major__ >= 10)
-# endif // defined(__apple_build_version__) && defined(_LIBCPP_VERSION)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_ATOMIC 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_ATOMIC 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_ATOMIC)
-#endif // !defined(ASIO_HAS_STD_ATOMIC)
-
-// Standard library support for chrono. Some standard libraries (such as the
-// libstdc++ shipped with gcc 4.6) provide monotonic_clock as per early C++0x
-// drafts, rather than the eventually standardised name of steady_clock.
-#if !defined(ASIO_HAS_STD_CHRONO)
-# if !defined(ASIO_DISABLE_STD_CHRONO)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_CHRONO 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<chrono>)
-# define ASIO_HAS_STD_CHRONO 1
-# endif // __has_include(<chrono>)
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_CHRONO 1
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
-# define ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK 1
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_CHRONO 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_CHRONO)
-#endif // !defined(ASIO_HAS_STD_CHRONO)
-
// Boost support for chrono.
#if !defined(ASIO_HAS_BOOST_CHRONO)
# if !defined(ASIO_DISABLE_BOOST_CHRONO)
@@ -844,277 +449,34 @@
# endif // !defined(ASIO_DISABLE_BOOST_DATE_TIME)
#endif // !defined(ASIO_HAS_BOOST_DATE_TIME)
-// Standard library support for addressof.
-#if !defined(ASIO_HAS_STD_ADDRESSOF)
-# if !defined(ASIO_DISABLE_STD_ADDRESSOF)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_ADDRESSOF 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_ADDRESSOF 1
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_ADDRESSOF 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_ADDRESSOF 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_ADDRESSOF)
-#endif // !defined(ASIO_HAS_STD_ADDRESSOF)
+// Boost support for the Coroutine library.
+#if !defined(ASIO_HAS_BOOST_COROUTINE)
+# if !defined(ASIO_DISABLE_BOOST_COROUTINE)
+# define ASIO_HAS_BOOST_COROUTINE 1
+# endif // !defined(ASIO_DISABLE_BOOST_COROUTINE)
+#endif // !defined(ASIO_HAS_BOOST_COROUTINE)
-// Standard library support for the function class.
-#if !defined(ASIO_HAS_STD_FUNCTION)
-# if !defined(ASIO_DISABLE_STD_FUNCTION)
+// Boost support for the Context library's fibers.
+#if !defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+# if !defined(ASIO_DISABLE_BOOST_CONTEXT_FIBER)
# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_FUNCTION 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_FUNCTION 1
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_FUNCTION 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_FUNCTION 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_FUNCTION)
-#endif // !defined(ASIO_HAS_STD_FUNCTION)
-
-// Standard library support for the reference_wrapper class.
-#if !defined(ASIO_HAS_STD_REFERENCE_WRAPPER)
-# if !defined(ASIO_DISABLE_STD_REFERENCE_WRAPPER)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_REFERENCE_WRAPPER 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_REFERENCE_WRAPPER 1
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_REFERENCE_WRAPPER 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_REFERENCE_WRAPPER 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_REFERENCE_WRAPPER)
-#endif // !defined(ASIO_HAS_STD_REFERENCE_WRAPPER)
-
-// Standard library support for type traits.
-#if !defined(ASIO_HAS_STD_TYPE_TRAITS)
-# if !defined(ASIO_DISABLE_STD_TYPE_TRAITS)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_TYPE_TRAITS 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<type_traits>)
-# define ASIO_HAS_STD_TYPE_TRAITS 1
-# endif // __has_include(<type_traits>)
+# if (__cplusplus >= 201103)
+# define ASIO_HAS_BOOST_CONTEXT_FIBER 1
# endif // (__cplusplus >= 201103)
# elif defined(__GNUC__)
# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_TYPE_TRAITS 1
+# define ASIO_HAS_BOOST_CONTEXT_FIBER 1
# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
# endif // defined(__GNUC__)
# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_TYPE_TRAITS 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_TYPE_TRAITS)
-#endif // !defined(ASIO_HAS_STD_TYPE_TRAITS)
-
-// Standard library support for the nullptr_t type.
-#if !defined(ASIO_HAS_NULLPTR)
-# if !defined(ASIO_DISABLE_NULLPTR)
-# if defined(__clang__)
-# if __has_feature(__cxx_nullptr__)
-# define ASIO_HAS_NULLPTR 1
-# endif // __has_feature(__cxx_nullptr__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_NULLPTR 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_NULLPTR 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_NULLPTR)
-#endif // !defined(ASIO_HAS_NULLPTR)
-
-// Standard library support for the C++11 allocator additions.
-#if !defined(ASIO_HAS_CXX11_ALLOCATORS)
-# if !defined(ASIO_DISABLE_CXX11_ALLOCATORS)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_CXX11_ALLOCATORS 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_CXX11_ALLOCATORS 1
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_CXX11_ALLOCATORS 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1800)
-# define ASIO_HAS_CXX11_ALLOCATORS 1
-# endif // (_MSC_VER >= 1800)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_CXX11_ALLOCATORS)
-#endif // !defined(ASIO_HAS_CXX11_ALLOCATORS)
-
-// Standard library support for the cstdint header.
-#if !defined(ASIO_HAS_CSTDINT)
-# if !defined(ASIO_DISABLE_CSTDINT)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_CSTDINT 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_CSTDINT 1
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_CSTDINT 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_CSTDINT 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_CSTDINT)
-#endif // !defined(ASIO_HAS_CSTDINT)
-
-// Standard library support for the thread class.
-#if !defined(ASIO_HAS_STD_THREAD)
-# if !defined(ASIO_DISABLE_STD_THREAD)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_THREAD 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<thread>)
-# define ASIO_HAS_STD_THREAD 1
-# endif // __has_include(<thread>)
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_THREAD 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_THREAD 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_THREAD)
-#endif // !defined(ASIO_HAS_STD_THREAD)
-
-// Standard library support for the mutex and condition variable classes.
-#if !defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# if !defined(ASIO_DISABLE_STD_MUTEX_AND_CONDVAR)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<mutex>)
-# define ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# endif // __has_include(<mutex>)
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_MUTEX_AND_CONDVAR)
-#endif // !defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
-// Standard library support for the call_once function.
-#if !defined(ASIO_HAS_STD_CALL_ONCE)
-# if !defined(ASIO_DISABLE_STD_CALL_ONCE)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_CALL_ONCE 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<mutex>)
-# define ASIO_HAS_STD_CALL_ONCE 1
-# endif // __has_include(<mutex>)
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_CALL_ONCE 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_CALL_ONCE 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_CALL_ONCE)
-#endif // !defined(ASIO_HAS_STD_CALL_ONCE)
-
-// Standard library support for futures.
-#if !defined(ASIO_HAS_STD_FUTURE)
-# if !defined(ASIO_DISABLE_STD_FUTURE)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_FUTURE 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<future>)
-# define ASIO_HAS_STD_FUTURE 1
-# endif // __has_include(<future>)
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_FUTURE 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_FUTURE 1
-# endif // (_MSC_VER >= 1700)
+# if (_MSVC_LANG >= 201103)
+# define ASIO_HAS_BOOST_CONTEXT_FIBER 1
+# endif // (_MSC_LANG >= 201103)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_FUTURE)
-#endif // !defined(ASIO_HAS_STD_FUTURE)
+# endif // !defined(ASIO_DISABLE_BOOST_CONTEXT_FIBER)
+#endif // !defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
// Standard library support for std::string_view.
#if !defined(ASIO_HAS_STD_STRING_VIEW)
@@ -1187,24 +549,6 @@
# endif // !defined(ASIO_DISABLE_STRING_VIEW)
#endif // !defined(ASIO_HAS_STRING_VIEW)
-// Standard library support for iostream move construction and assignment.
-#if !defined(ASIO_HAS_STD_IOSTREAM_MOVE)
-# if !defined(ASIO_DISABLE_STD_IOSTREAM_MOVE)
-# if defined(__GNUC__)
-# if (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_IOSTREAM_MOVE 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_IOSTREAM_MOVE 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_IOSTREAM_MOVE)
-#endif // !defined(ASIO_HAS_STD_IOSTREAM_MOVE)
-
// Standard library has invoke_result (which supersedes result_of).
#if !defined(ASIO_HAS_STD_INVOKE_RESULT)
# if !defined(ASIO_DISABLE_STD_INVOKE_RESULT)
@@ -1212,58 +556,14 @@
# if (_MSC_VER >= 1911 && _MSVC_LANG >= 201703)
# define ASIO_HAS_STD_INVOKE_RESULT 1
# endif // (_MSC_VER >= 1911 && _MSVC_LANG >= 201703)
+# else // defined(ASIO_MSVC)
+# if (__cplusplus >= 201703)
+# define ASIO_HAS_STD_INVOKE_RESULT 1
+# endif // (__cplusplus >= 201703)
# endif // defined(ASIO_MSVC)
# endif // !defined(ASIO_DISABLE_STD_INVOKE_RESULT)
#endif // !defined(ASIO_HAS_STD_INVOKE_RESULT)
-// Standard library support for std::exception_ptr and std::current_exception.
-#if !defined(ASIO_HAS_STD_EXCEPTION_PTR)
-# if !defined(ASIO_DISABLE_STD_EXCEPTION_PTR)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_EXCEPTION_PTR 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_EXCEPTION_PTR 1
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_EXCEPTION_PTR 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1800)
-# define ASIO_HAS_STD_EXCEPTION_PTR 1
-# endif // (_MSC_VER >= 1800)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_EXCEPTION_PTR)
-#endif // !defined(ASIO_HAS_STD_EXCEPTION_PTR)
-
-// Standard library support for std::nested_exception.
-#if !defined(ASIO_HAS_STD_NESTED_EXCEPTION)
-# if !defined(ASIO_DISABLE_STD_NESTED_EXCEPTION)
-# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_NESTED_EXCEPTION 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_NESTED_EXCEPTION 1
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_NESTED_EXCEPTION 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define ASIO_HAS_STD_NESTED_EXCEPTION 1
-# endif // (_MSC_VER >= 1900)
-# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_NESTED_EXCEPTION)
-#endif // !defined(ASIO_HAS_STD_NESTED_EXCEPTION)
-
// Standard library support for std::any.
#if !defined(ASIO_HAS_STD_ANY)
# if !defined(ASIO_DISABLE_STD_ANY)
@@ -1288,6 +588,30 @@
# endif // !defined(ASIO_DISABLE_STD_ANY)
#endif // !defined(ASIO_HAS_STD_ANY)
+// Standard library support for std::variant.
+#if !defined(ASIO_HAS_STD_VARIANT)
+# if !defined(ASIO_DISABLE_STD_VARIANT)
+# if defined(__clang__)
+# if (__cplusplus >= 201703)
+# if __has_include(<variant>)
+# define ASIO_HAS_STD_VARIANT 1
+# endif // __has_include(<variant>)
+# endif // (__cplusplus >= 201703)
+# elif defined(__GNUC__)
+# if (__GNUC__ >= 7)
+# if (__cplusplus >= 201703)
+# define ASIO_HAS_STD_VARIANT 1
+# endif // (__cplusplus >= 201703)
+# endif // (__GNUC__ >= 7)
+# endif // defined(__GNUC__)
+# if defined(ASIO_MSVC)
+# if (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
+# define ASIO_HAS_STD_VARIANT 1
+# endif // (_MSC_VER >= 1910) && (_MSVC_LANG >= 201703)
+# endif // defined(ASIO_MSVC)
+# endif // !defined(ASIO_DISABLE_STD_VARIANT)
+#endif // !defined(ASIO_HAS_STD_VARIANT)
+
// Standard library support for std::source_location.
#if !defined(ASIO_HAS_STD_SOURCE_LOCATION)
# if !defined(ASIO_DISABLE_STD_SOURCE_LOCATION)
@@ -1319,6 +643,50 @@
# endif // !defined(ASIO_DISABLE_SOURCE_LOCATION)
#endif // !defined(ASIO_HAS_SOURCE_LOCATION)
+// Boost support for source_location and system errors.
+#if !defined(ASIO_HAS_BOOST_SOURCE_LOCATION)
+# if !defined(ASIO_DISABLE_BOOST_SOURCE_LOCATION)
+# if defined(ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 107900)
+# define ASIO_HAS_BOOST_SOURCE_LOCATION 1
+# endif // defined(ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 107900)
+# endif // !defined(ASIO_DISABLE_BOOST_SOURCE_LOCATION)
+#endif // !defined(ASIO_HAS_BOOST_SOURCE_LOCATION)
+
+// Helper macros for working with Boost source locations.
+#if defined(ASIO_HAS_BOOST_SOURCE_LOCATION)
+# define ASIO_SOURCE_LOCATION_PARAM \
+ , const boost::source_location& loc
+# define ASIO_SOURCE_LOCATION_DEFAULTED_PARAM \
+ , const boost::source_location& loc = BOOST_CURRENT_LOCATION
+# define ASIO_SOURCE_LOCATION_ARG , loc
+#else // if defined(ASIO_HAS_BOOST_SOURCE_LOCATION)
+# define ASIO_SOURCE_LOCATION_PARAM
+# define ASIO_SOURCE_LOCATION_DEFAULTED_PARAM
+# define ASIO_SOURCE_LOCATION_ARG
+#endif // if defined(ASIO_HAS_BOOST_SOURCE_LOCATION)
+
+// Standard library support for std::index_sequence.
+#if !defined(ASIO_HAS_STD_INDEX_SEQUENCE)
+# if !defined(ASIO_DISABLE_STD_INDEX_SEQUENCE)
+# if defined(__clang__)
+# if (__cplusplus >= 201402)
+# define ASIO_HAS_STD_INDEX_SEQUENCE 1
+# endif // (__cplusplus >= 201402)
+# elif defined(__GNUC__)
+# if (__GNUC__ >= 7)
+# if (__cplusplus >= 201402)
+# define ASIO_HAS_STD_INDEX_SEQUENCE 1
+# endif // (__cplusplus >= 201402)
+# endif // (__GNUC__ >= 7)
+# endif // defined(__GNUC__)
+# if defined(ASIO_MSVC)
+# if (_MSC_VER >= 1910) && (_MSVC_LANG >= 201402)
+# define ASIO_HAS_STD_INDEX_SEQUENCE 1
+# endif // (_MSC_VER >= 1910) && (_MSVC_LANG >= 201402)
+# endif // defined(ASIO_MSVC)
+# endif // !defined(ASIO_DISABLE_STD_INDEX_SEQUENCE)
+#endif // !defined(ASIO_HAS_STD_INDEX_SEQUENCE)
+
// Windows App target. Windows but with a limited API.
#if !defined(ASIO_WINDOWS_APP)
# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603)
@@ -1454,7 +822,7 @@
# include <unistd.h>
#endif // defined(ASIO_HAS_UNISTD_H)
-// Linux: epoll, eventfd and timerfd.
+// Linux: epoll, eventfd, timerfd and io_uring.
#if defined(__linux__)
# include <linux/version.h>
# if !defined(ASIO_HAS_EPOLL)
@@ -1478,8 +846,20 @@
# endif // (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
# endif // defined(ASIO_HAS_EPOLL)
# endif // !defined(ASIO_HAS_TIMERFD)
+# if defined(ASIO_HAS_IO_URING)
+# if LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
+# error Linux kernel 5.10 or later is required to support io_uring
+# endif // LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
+# endif // defined(ASIO_HAS_IO_URING)
#endif // defined(__linux__)
+// Linux: io_uring is used instead of epoll.
+#if !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# if !defined(ASIO_HAS_EPOLL) && defined(ASIO_HAS_IO_URING)
+# define ASIO_HAS_IO_URING_AS_DEFAULT 1
+# endif // !defined(ASIO_HAS_EPOLL) && defined(ASIO_HAS_IO_URING)
+#endif // !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
// Mac OS X, FreeBSD, NetBSD, OpenBSD: kqueue.
#if (defined(__MACH__) && defined(__APPLE__)) \
|| defined(__FreeBSD__) \
@@ -1581,6 +961,34 @@
# endif // !defined(ASIO_DISABLE_LOCAL_SOCKETS)
#endif // !defined(ASIO_HAS_LOCAL_SOCKETS)
+// Files.
+#if !defined(ASIO_HAS_FILE)
+# if !defined(ASIO_DISABLE_FILE)
+# if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+# define ASIO_HAS_FILE 1
+# elif defined(ASIO_HAS_IO_URING)
+# define ASIO_HAS_FILE 1
+# endif // defined(ASIO_HAS_IO_URING)
+# endif // !defined(ASIO_DISABLE_FILE)
+#endif // !defined(ASIO_HAS_FILE)
+
+// Pipes.
+#if !defined(ASIO_HAS_PIPE)
+# if defined(ASIO_HAS_IOCP) \
+ || !defined(ASIO_WINDOWS) \
+ && !defined(ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+# if !defined(__SYMBIAN32__)
+# if !defined(ASIO_DISABLE_PIPE)
+# define ASIO_HAS_PIPE 1
+# endif // !defined(ASIO_DISABLE_PIPE)
+# endif // !defined(__SYMBIAN32__)
+# endif // defined(ASIO_HAS_IOCP)
+ // || !defined(ASIO_WINDOWS)
+ // && !defined(ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+#endif // !defined(ASIO_HAS_PIPE)
+
// Can use sigaction() instead of signal().
#if !defined(ASIO_HAS_SIGACTION)
# if !defined(ASIO_DISABLE_SIGACTION)
@@ -1782,7 +1190,7 @@
# endif // !defined(ASIO_DISABLE_HANDLER_HOOKS)
#endif // !defined(ASIO_HAS_HANDLER_HOOKS)
-// Support for the __thread keyword extension.
+// Support for the __thread keyword extension, or equivalent.
#if !defined(ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
# if defined(__linux__)
# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
@@ -1804,6 +1212,22 @@
# define ASIO_THREAD_KEYWORD __declspec(thread)
# endif // (_MSC_VER >= 1700)
# endif // defined(ASIO_MSVC) && defined(ASIO_WINDOWS_RUNTIME)
+# if defined(__APPLE__)
+# if defined(__clang__)
+# if defined(__apple_build_version__)
+# define ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
+# define ASIO_THREAD_KEYWORD __thread
+# endif // defined(__apple_build_version__)
+# endif // defined(__clang__)
+# endif // defined(__APPLE__)
+# if !defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION)
+# if defined(ASIO_HAS_BOOST_CONFIG)
+# if !defined(BOOST_NO_CXX11_THREAD_LOCAL)
+# define ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
+# define ASIO_THREAD_KEYWORD thread_local
+# endif // !defined(BOOST_NO_CXX11_THREAD_LOCAL)
+# endif // defined(ASIO_HAS_BOOST_CONFIG)
+# endif // !defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION)
#endif // !defined(ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
#if !defined(ASIO_THREAD_KEYWORD)
# define ASIO_THREAD_KEYWORD __thread
@@ -1857,6 +1281,22 @@
# define ASIO_UNUSED_VARIABLE
#endif // !defined(ASIO_UNUSED_VARIABLE)
+// Helper macro to tell the optimiser what may be assumed to be true.
+#if defined(ASIO_MSVC)
+# define ASIO_ASSUME(expr) __assume(expr)
+#elif defined(__clang__)
+# if __has_builtin(__builtin_assume)
+# define ASIO_ASSUME(expr) __builtin_assume(expr)
+# endif // __has_builtin(__builtin_assume)
+#elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# define ASIO_ASSUME(expr) if (expr) {} else { __builtin_unreachable(); }
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+#endif // defined(__GNUC__)
+#if !defined(ASIO_ASSUME)
+# define ASIO_ASSUME(expr) (void)0
+#endif // !defined(ASIO_ASSUME)
+
// Support the co_await keyword on compilers known to allow it.
#if !defined(ASIO_HAS_CO_AWAIT)
# if !defined(ASIO_DISABLE_CO_AWAIT)
@@ -1869,11 +1309,23 @@
# endif // defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
# endif // (_MSC_FULL_VER >= 190023506)
# elif defined(__clang__)
-# if (__cplusplus >= 201703) && defined(__cpp_coroutines) && (__cpp_coroutines >= 201703)
-# if __has_include(<experimental/coroutine>)
-# define ASIO_HAS_CO_AWAIT 1
-# endif // __has_include(<experimental/coroutine>)
-# endif // (__cplusplus >= 201703) && (__cpp_coroutines >= 201703)
+# if (__clang_major__ >= 14)
+# if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)
+# if __has_include(<coroutine>)
+# define ASIO_HAS_CO_AWAIT 1
+# endif // __has_include(<coroutine>)
+# elif (__cplusplus >= 201703) && defined(__cpp_coroutines) && (__cpp_coroutines >= 201703)
+# if __has_include(<experimental/coroutine>)
+# define ASIO_HAS_CO_AWAIT 1
+# endif // __has_include(<experimental/coroutine>)
+# endif // (__cplusplus >= 201703) && defined(__cpp_coroutines) && (__cpp_coroutines >= 201703)
+# else // (__clang_major__ >= 14)
+# if (__cplusplus >= 201703) && defined(__cpp_coroutines) && (__cpp_coroutines >= 201703)
+# if __has_include(<experimental/coroutine>)
+# define ASIO_HAS_CO_AWAIT 1
+# endif // __has_include(<experimental/coroutine>)
+# endif // (__cplusplus >= 201703) && defined(__cpp_coroutines) && (__cpp_coroutines >= 201703)
+# endif // (__clang_major__ >= 14)
# elif defined(__GNUC__)
# if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)
# if __has_include(<coroutine>)
@@ -1891,8 +1343,15 @@
# if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705)
# define ASIO_HAS_STD_COROUTINE 1
# endif // (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705)
-# endif // defined(ASIO_MSVC)
-# if defined(__GNUC__)
+# elif defined(__clang__)
+# if (__clang_major__ >= 14)
+# if (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)
+# if __has_include(<coroutine>)
+# define ASIO_HAS_STD_COROUTINE 1
+# endif // __has_include(<coroutine>)
+# endif // (__cplusplus >= 202002) && (__cpp_impl_coroutine >= 201902)
+# endif // (__clang_major__ >= 14)
+# elif defined(__GNUC__)
# if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902)
# if __has_include(<coroutine>)
# define ASIO_HAS_STD_COROUTINE 1
@@ -1927,28 +1386,37 @@
# endif // defined(_POSIX_VERSION)
#endif // !defined(ASIO_HAS_MSG_NOSIGNAL)
-// Standard library support for std::hash.
-#if !defined(ASIO_HAS_STD_HASH)
-# if !defined(ASIO_DISABLE_STD_HASH)
+// Standard library support for std::to_address.
+#if !defined(ASIO_HAS_STD_TO_ADDRESS)
+# if !defined(ASIO_DISABLE_STD_TO_ADDRESS)
# if defined(__clang__)
-# if defined(ASIO_HAS_CLANG_LIBCXX)
-# define ASIO_HAS_STD_HASH 1
-# elif (__cplusplus >= 201103)
-# define ASIO_HAS_STD_HASH 1
-# endif // (__cplusplus >= 201103)
+# if (__cplusplus >= 202002)
+# define ASIO_HAS_STD_TO_ADDRESS 1
+# endif // (__cplusplus >= 202002)
# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define ASIO_HAS_STD_HASH 1
-# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if (__GNUC__ >= 8)
+# if (__cplusplus >= 202002)
+# define ASIO_HAS_STD_TO_ADDRESS 1
+# endif // (__cplusplus >= 202002)
+# endif // (__GNUC__ >= 8)
# endif // defined(__GNUC__)
# if defined(ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define ASIO_HAS_STD_HASH 1
-# endif // (_MSC_VER >= 1700)
+# if (_MSC_VER >= 1922) && (_MSVC_LANG >= 202002)
+# define ASIO_HAS_STD_TO_ADDRESS 1
+# endif // (_MSC_VER >= 1922) && (_MSVC_LANG >= 202002)
# endif // defined(ASIO_MSVC)
-# endif // !defined(ASIO_DISABLE_STD_HASH)
-#endif // !defined(ASIO_HAS_STD_HASH)
+# endif // !defined(ASIO_DISABLE_STD_TO_ADDRESS)
+#endif // !defined(ASIO_HAS_STD_TO_ADDRESS)
+
+// Standard library support for snprintf.
+#if !defined(ASIO_HAS_SNPRINTF)
+# if !defined(ASIO_DISABLE_SNPRINTF)
+# if defined(__apple_build_version__)
+# if (__clang_major__ >= 14)
+# define ASIO_HAS_SNPRINTF 1
+# endif // (__clang_major__ >= 14)
+# endif // defined(__apple_build_version__)
+# endif // !defined(ASIO_DISABLE_SNPRINTF)
+#endif // !defined(ASIO_HAS_SNPRINTF)
#endif // ASIO_DETAIL_CONFIG_HPP
diff --git a/3rdparty/asio/include/asio/detail/consuming_buffers.hpp b/3rdparty/asio/include/asio/detail/consuming_buffers.hpp
index 0d99093a4dd..8af95aab769 100644
--- a/3rdparty/asio/include/asio/detail/consuming_buffers.hpp
+++ b/3rdparty/asio/include/asio/detail/consuming_buffers.hpp
@@ -2,7 +2,7 @@
// detail/consuming_buffers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,6 +20,7 @@
#include "asio/buffer.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/limits.hpp"
+#include "asio/registered_buffer.hpp"
#include "asio/detail/push_options.hpp"
@@ -34,21 +35,17 @@ struct prepared_buffers_max
};
template <typename Elem, std::size_t N>
-struct prepared_buffers_max<boost::array<Elem, N> >
+struct prepared_buffers_max<boost::array<Elem, N>>
{
enum { value = N };
};
-#if defined(ASIO_HAS_STD_ARRAY)
-
template <typename Elem, std::size_t N>
-struct prepared_buffers_max<std::array<Elem, N> >
+struct prepared_buffers_max<std::array<Elem, N>>
{
enum { value = N };
};
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
// A buffer sequence used to represent a subsequence of the buffers.
template <typename Buffer, std::size_t MaxBuffers>
struct prepared_buffers
@@ -269,6 +266,42 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
+template <>
+class consuming_buffers<mutable_buffer,
+ mutable_registered_buffer, const mutable_buffer*>
+ : public consuming_single_buffer<mutable_registered_buffer>
+{
+public:
+ explicit consuming_buffers(const mutable_registered_buffer& buffer)
+ : consuming_single_buffer<mutable_registered_buffer>(buffer)
+ {
+ }
+};
+
+template <>
+class consuming_buffers<const_buffer,
+ mutable_registered_buffer, const mutable_buffer*>
+ : public consuming_single_buffer<mutable_registered_buffer>
+{
+public:
+ explicit consuming_buffers(const mutable_registered_buffer& buffer)
+ : consuming_single_buffer<mutable_registered_buffer>(buffer)
+ {
+ }
+};
+
+template <>
+class consuming_buffers<const_buffer,
+ const_registered_buffer, const const_buffer*>
+ : public consuming_single_buffer<const_registered_buffer>
+{
+public:
+ explicit consuming_buffers(const const_registered_buffer& buffer)
+ : consuming_single_buffer<const_registered_buffer>(buffer)
+ {
+ }
+};
+
template <typename Buffer, typename Elem>
class consuming_buffers<Buffer, boost::array<Elem, 2>,
typename boost::array<Elem, 2>::const_iterator>
@@ -319,8 +352,6 @@ private:
std::size_t total_consumed_;
};
-#if defined(ASIO_HAS_STD_ARRAY)
-
template <typename Buffer, typename Elem>
class consuming_buffers<Buffer, std::array<Elem, 2>,
typename std::array<Elem, 2>::const_iterator>
@@ -371,8 +402,6 @@ private:
std::size_t total_consumed_;
};
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
// Specialisation for null_buffers to ensure that the null_buffers type is
// always passed through to the underlying read or write operation.
template <typename Buffer>
diff --git a/3rdparty/asio/include/asio/detail/cstddef.hpp b/3rdparty/asio/include/asio/detail/cstddef.hpp
index e9fd2d23b83..15ec42df5f3 100644
--- a/3rdparty/asio/include/asio/detail/cstddef.hpp
+++ b/3rdparty/asio/include/asio/detail/cstddef.hpp
@@ -2,7 +2,7 @@
// detail/cstddef.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,11 +20,7 @@
namespace asio {
-#if defined(ASIO_HAS_NULLPTR)
using std::nullptr_t;
-#else // defined(ASIO_HAS_NULLPTR)
-struct nullptr_t {};
-#endif // defined(ASIO_HAS_NULLPTR)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/cstdint.hpp b/3rdparty/asio/include/asio/detail/cstdint.hpp
index d29929b711c..a696e34c8ae 100644
--- a/3rdparty/asio/include/asio/detail/cstdint.hpp
+++ b/3rdparty/asio/include/asio/detail/cstdint.hpp
@@ -2,7 +2,7 @@
// detail/cstdint.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,16 +16,10 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_CSTDINT)
-# include <cstdint>
-#else // defined(ASIO_HAS_CSTDINT)
-# include <boost/cstdint.hpp>
-#endif // defined(ASIO_HAS_CSTDINT)
+#include <cstdint>
namespace asio {
-#if defined(ASIO_HAS_CSTDINT)
using std::int16_t;
using std::int_least16_t;
using std::uint16_t;
@@ -38,22 +32,8 @@ using std::int64_t;
using std::int_least64_t;
using std::uint64_t;
using std::uint_least64_t;
+using std::uintptr_t;
using std::uintmax_t;
-#else // defined(ASIO_HAS_CSTDINT)
-using boost::int16_t;
-using boost::int_least16_t;
-using boost::uint16_t;
-using boost::uint_least16_t;
-using boost::int32_t;
-using boost::int_least32_t;
-using boost::uint32_t;
-using boost::uint_least32_t;
-using boost::int64_t;
-using boost::int_least64_t;
-using boost::uint64_t;
-using boost::uint_least64_t;
-using boost::uintmax_t;
-#endif // defined(ASIO_HAS_CSTDINT)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/date_time_fwd.hpp b/3rdparty/asio/include/asio/detail/date_time_fwd.hpp
index 1b210228de8..a586fbea713 100644
--- a/3rdparty/asio/include/asio/detail/date_time_fwd.hpp
+++ b/3rdparty/asio/include/asio/detail/date_time_fwd.hpp
@@ -2,7 +2,7 @@
// detail/date_time_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/deadline_timer_service.hpp b/3rdparty/asio/include/asio/detail/deadline_timer_service.hpp
index a46e5653ef2..bd99a6e910c 100644
--- a/3rdparty/asio/include/asio/detail/deadline_timer_service.hpp
+++ b/3rdparty/asio/include/asio/detail/deadline_timer_service.hpp
@@ -2,7 +2,7 @@
// detail/deadline_timer_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -45,7 +45,7 @@ namespace detail {
template <typename Time_Traits>
class deadline_timer_service
- : public execution_context_service_base<deadline_timer_service<Time_Traits> >
+ : public execution_context_service_base<deadline_timer_service<Time_Traits>>
{
public:
// The time type.
@@ -67,7 +67,7 @@ public:
// Constructor.
deadline_timer_service(execution_context& context)
: execution_context_service_base<
- deadline_timer_service<Time_Traits> >(context),
+ deadline_timer_service<Time_Traits>>(context),
scheduler_(asio::use_service<timer_scheduler>(context))
{
scheduler_.init_task();
@@ -247,7 +247,7 @@ public:
void async_wait(implementation_type& impl,
Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
diff --git a/3rdparty/asio/include/asio/detail/dependent_type.hpp b/3rdparty/asio/include/asio/detail/dependent_type.hpp
index bcdfff3c1d3..fde0e4a6eb5 100644
--- a/3rdparty/asio/include/asio/detail/dependent_type.hpp
+++ b/3rdparty/asio/include/asio/detail/dependent_type.hpp
@@ -2,7 +2,7 @@
// detail/dependent_type.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/descriptor_ops.hpp b/3rdparty/asio/include/asio/detail/descriptor_ops.hpp
index 384aa8d1d13..c001696a9fd 100644
--- a/3rdparty/asio/include/asio/detail/descriptor_ops.hpp
+++ b/3rdparty/asio/include/asio/detail/descriptor_ops.hpp
@@ -2,7 +2,7 @@
// detail/descriptor_ops.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -24,6 +24,7 @@
#include <cstddef>
#include "asio/error.hpp"
#include "asio/error_code.hpp"
+#include "asio/detail/cstdint.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/push_options.hpp"
@@ -55,7 +56,7 @@ inline void get_last_error(
{
if (!is_error_condition)
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
}
else
{
@@ -67,6 +68,9 @@ inline void get_last_error(
ASIO_DECL int open(const char* path, int flags,
asio::error_code& ec);
+ASIO_DECL int open(const char* path, int flags, unsigned mode,
+ asio::error_code& ec);
+
ASIO_DECL int close(int d, state_type& state,
asio::error_code& ec);
@@ -105,6 +109,42 @@ ASIO_DECL bool non_blocking_write1(int d,
const void* data, std::size_t size,
asio::error_code& ec, std::size_t& bytes_transferred);
+#if defined(ASIO_HAS_FILE)
+
+ASIO_DECL std::size_t sync_read_at(int d, state_type state,
+ uint64_t offset, buf* bufs, std::size_t count, bool all_empty,
+ asio::error_code& ec);
+
+ASIO_DECL std::size_t sync_read_at1(int d, state_type state,
+ uint64_t offset, void* data, std::size_t size,
+ asio::error_code& ec);
+
+ASIO_DECL bool non_blocking_read_at(int d, uint64_t offset,
+ buf* bufs, std::size_t count, asio::error_code& ec,
+ std::size_t& bytes_transferred);
+
+ASIO_DECL bool non_blocking_read_at1(int d, uint64_t offset,
+ void* data, std::size_t size, asio::error_code& ec,
+ std::size_t& bytes_transferred);
+
+ASIO_DECL std::size_t sync_write_at(int d, state_type state,
+ uint64_t offset, const buf* bufs, std::size_t count, bool all_empty,
+ asio::error_code& ec);
+
+ASIO_DECL std::size_t sync_write_at1(int d, state_type state,
+ uint64_t offset, const void* data, std::size_t size,
+ asio::error_code& ec);
+
+ASIO_DECL bool non_blocking_write_at(int d,
+ uint64_t offset, const buf* bufs, std::size_t count,
+ asio::error_code& ec, std::size_t& bytes_transferred);
+
+ASIO_DECL bool non_blocking_write_at1(int d,
+ uint64_t offset, const void* data, std::size_t size,
+ asio::error_code& ec, std::size_t& bytes_transferred);
+
+#endif // defined(ASIO_HAS_FILE)
+
ASIO_DECL int ioctl(int d, state_type& state, long cmd,
ioctl_arg_type* arg, asio::error_code& ec);
diff --git a/3rdparty/asio/include/asio/detail/descriptor_read_op.hpp b/3rdparty/asio/include/asio/detail/descriptor_read_op.hpp
index edc8d34022e..415490cb8a5 100644
--- a/3rdparty/asio/include/asio/detail/descriptor_read_op.hpp
+++ b/3rdparty/asio/include/asio/detail/descriptor_read_op.hpp
@@ -2,7 +2,7 @@
// detail/descriptor_read_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -26,6 +26,7 @@
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
+#include "asio/dispatch.hpp"
#include "asio/detail/push_options.hpp"
@@ -48,6 +49,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
descriptor_read_op_base* o(static_cast<descriptor_read_op_base*>(base));
typedef buffer_sequence_adapter<asio::mutable_buffer,
@@ -85,6 +87,9 @@ class descriptor_read_op
: public descriptor_read_op_base<MutableBufferSequence>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(descriptor_read_op);
descriptor_read_op(const asio::error_code& success_ec,
@@ -92,7 +97,7 @@ public:
Handler& handler, const IoExecutor& io_ex)
: descriptor_read_op_base<MutableBufferSequence>(success_ec,
descriptor, buffers, &descriptor_read_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -102,6 +107,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
descriptor_read_op* o(static_cast<descriptor_read_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -109,9 +115,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -133,6 +141,38 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ descriptor_read_op* o(static_cast<descriptor_read_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
diff --git a/3rdparty/asio/include/asio/detail/descriptor_write_op.hpp b/3rdparty/asio/include/asio/detail/descriptor_write_op.hpp
index c2bc8675f58..ed1814e7e39 100644
--- a/3rdparty/asio/include/asio/detail/descriptor_write_op.hpp
+++ b/3rdparty/asio/include/asio/detail/descriptor_write_op.hpp
@@ -2,7 +2,7 @@
// detail/descriptor_write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -48,6 +48,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
descriptor_write_op_base* o(static_cast<descriptor_write_op_base*>(base));
typedef buffer_sequence_adapter<asio::const_buffer,
@@ -85,6 +86,9 @@ class descriptor_write_op
: public descriptor_write_op_base<ConstBufferSequence>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(descriptor_write_op);
descriptor_write_op(const asio::error_code& success_ec,
@@ -92,7 +96,7 @@ public:
Handler& handler, const IoExecutor& io_ex)
: descriptor_write_op_base<ConstBufferSequence>(success_ec,
descriptor, buffers, &descriptor_write_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -102,6 +106,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
descriptor_write_op* o(static_cast<descriptor_write_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -109,9 +114,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -133,6 +140,38 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ descriptor_write_op* o(static_cast<descriptor_write_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
diff --git a/3rdparty/asio/include/asio/detail/dev_poll_reactor.hpp b/3rdparty/asio/include/asio/detail/dev_poll_reactor.hpp
index 92930bba5b9..720fd6b54e8 100644
--- a/3rdparty/asio/include/asio/detail/dev_poll_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/dev_poll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/dev_poll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -28,6 +28,7 @@
#include "asio/detail/op_queue.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/reactor_op_queue.hpp"
+#include "asio/detail/scheduler_task.hpp"
#include "asio/detail/select_interrupter.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/timer_queue_base.hpp"
@@ -41,7 +42,8 @@ namespace asio {
namespace detail {
class dev_poll_reactor
- : public execution_context_service_base<dev_poll_reactor>
+ : public execution_context_service_base<dev_poll_reactor>,
+ public scheduler_task
{
public:
enum op_types { read_op = 0, write_op = 1,
@@ -84,13 +86,30 @@ public:
per_descriptor_data& source_descriptor_data);
// Post a reactor operation for immediate completion.
- void post_immediate_completion(reactor_op* op, bool is_continuation);
+ void post_immediate_completion(operation* op, bool is_continuation) const;
+
+ // Post a reactor operation for immediate completion.
+ ASIO_DECL static void call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self);
// Start a new operation. The reactor operation will be performed when the
// given descriptor is flagged as ready, or an error has occurred.
ASIO_DECL void start_op(int op_type, socket_type descriptor,
per_descriptor_data&, reactor_op* op,
- bool is_continuation, bool allow_speculative);
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg);
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+ {
+ start_op(op_type, descriptor, descriptor_data,
+ op, is_continuation, allow_speculative,
+ &dev_poll_reactor::call_post_immediate_completion, this);
+ }
// Cancel all operations associated with the given descriptor. The
// handlers associated with the descriptor will be invoked with the
@@ -142,6 +161,12 @@ public:
typename timer_queue<Time_Traits>::per_timer_data& timer,
std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
+ // Cancel the timer operations associated with the given key.
+ template <typename Time_Traits>
+ void cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key);
+
// Move the timer operations associated with the given timer.
template <typename Time_Traits>
void move_timer(timer_queue<Time_Traits>& queue,
diff --git a/3rdparty/asio/include/asio/detail/epoll_reactor.hpp b/3rdparty/asio/include/asio/detail/epoll_reactor.hpp
index 15cb384d5a7..212767a760f 100644
--- a/3rdparty/asio/include/asio/detail/epoll_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/epoll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/epoll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -25,6 +25,7 @@
#include "asio/detail/object_pool.hpp"
#include "asio/detail/op_queue.hpp"
#include "asio/detail/reactor_op.hpp"
+#include "asio/detail/scheduler_task.hpp"
#include "asio/detail/select_interrupter.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/timer_queue_base.hpp"
@@ -42,7 +43,8 @@ namespace asio {
namespace detail {
class epoll_reactor
- : public execution_context_service_base<epoll_reactor>
+ : public execution_context_service_base<epoll_reactor>,
+ public scheduler_task
{
private:
// The mutex type used by this reactor.
@@ -114,13 +116,30 @@ public:
per_descriptor_data& source_descriptor_data);
// Post a reactor operation for immediate completion.
- void post_immediate_completion(operation* op, bool is_continuation);
+ void post_immediate_completion(operation* op, bool is_continuation) const;
+
+ // Post a reactor operation for immediate completion.
+ ASIO_DECL static void call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self);
// Start a new operation. The reactor operation will be performed when the
// given descriptor is flagged as ready, or an error has occurred.
ASIO_DECL void start_op(int op_type, socket_type descriptor,
per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative);
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg);
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+ {
+ start_op(op_type, descriptor, descriptor_data,
+ op, is_continuation, allow_speculative,
+ &epoll_reactor::call_post_immediate_completion, this);
+ }
// Cancel all operations associated with the given descriptor. The
// handlers associated with the descriptor will be invoked with the
diff --git a/3rdparty/asio/include/asio/detail/event.hpp b/3rdparty/asio/include/asio/detail/event.hpp
index d2b850af187..19e458cdf05 100644
--- a/3rdparty/asio/include/asio/detail/event.hpp
+++ b/3rdparty/asio/include/asio/detail/event.hpp
@@ -2,7 +2,7 @@
// detail/event.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,10 +23,8 @@
# include "asio/detail/win_event.hpp"
#elif defined(ASIO_HAS_PTHREADS)
# include "asio/detail/posix_event.hpp"
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# include "asio/detail/std_event.hpp"
#else
-# error Only Windows, POSIX and std::condition_variable are supported!
+# include "asio/detail/std_event.hpp"
#endif
namespace asio {
@@ -38,7 +36,7 @@ typedef null_event event;
typedef win_event event;
#elif defined(ASIO_HAS_PTHREADS)
typedef posix_event event;
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+#else
typedef std_event event;
#endif
diff --git a/3rdparty/asio/include/asio/detail/eventfd_select_interrupter.hpp b/3rdparty/asio/include/asio/detail/eventfd_select_interrupter.hpp
index 964e90c7439..0eb8843dd56 100644
--- a/3rdparty/asio/include/asio/detail/eventfd_select_interrupter.hpp
+++ b/3rdparty/asio/include/asio/detail/eventfd_select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/eventfd_select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/detail/exception.hpp b/3rdparty/asio/include/asio/detail/exception.hpp
new file mode 100644
index 00000000000..28c7cffb5d8
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/exception.hpp
@@ -0,0 +1,29 @@
+//
+// detail/exception.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 ASIO_DETAIL_EXCEPTION_HPP
+#define ASIO_DETAIL_EXCEPTION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <exception>
+
+namespace asio {
+
+using std::exception_ptr;
+using std::current_exception;
+using std::rethrow_exception;
+
+} // namespace asio
+
+#endif // ASIO_DETAIL_EXCEPTION_HPP
diff --git a/3rdparty/asio/include/asio/detail/executor_function.hpp b/3rdparty/asio/include/asio/detail/executor_function.hpp
index 6b24f3aa130..cccf31bf3af 100644
--- a/3rdparty/asio/include/asio/detail/executor_function.hpp
+++ b/3rdparty/asio/include/asio/detail/executor_function.hpp
@@ -2,7 +2,7 @@
// detail/executor_function.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,7 +17,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/push_options.hpp"
@@ -25,8 +24,6 @@
namespace asio {
namespace detail {
-#if defined(ASIO_HAS_MOVE)
-
// Lightweight, move-only function object wrapper.
class executor_function
{
@@ -38,11 +35,11 @@ public:
typedef impl<F, Alloc> impl_type;
typename impl_type::ptr p = {
detail::addressof(a), impl_type::ptr::allocate(a), 0 };
- impl_ = new (p.v) impl_type(ASIO_MOVE_CAST(F)(f), a);
+ impl_ = new (p.v) impl_type(static_cast<F&&>(f), a);
p.v = 0;
}
- executor_function(executor_function&& other) ASIO_NOEXCEPT
+ executor_function(executor_function&& other) noexcept
: impl_(other.impl_)
{
other.impl_ = 0;
@@ -79,8 +76,8 @@ private:
thread_info_base::executor_function_tag, impl);
template <typename F>
- impl(ASIO_MOVE_ARG(F) f, const Alloc& a)
- : function_(ASIO_MOVE_CAST(F)(f)),
+ impl(F&& f, const Alloc& a)
+ : function_(static_cast<F&&>(f)),
allocator_(a)
{
complete_ = &executor_function::complete<Function, Alloc>;
@@ -106,74 +103,25 @@ private:
// associated with the function. Consequently, a local copy of the function
// is required to ensure that any owning sub-object remains valid until
// after we have deallocated the memory here.
- Function function(ASIO_MOVE_CAST(Function)(i->function_));
+ Function function(static_cast<Function&&>(i->function_));
p.reset();
// Make the upcall if required.
if (call)
{
- asio_handler_invoke_helpers::invoke(function, function);
+ static_cast<Function&&>(function)();
}
}
impl_base* impl_;
};
-#else // defined(ASIO_HAS_MOVE)
-
-// Not so lightweight, copyable function object wrapper.
-class executor_function
-{
-public:
- template <typename F, typename Alloc>
- explicit executor_function(const F& f, const Alloc&)
- : impl_(new impl<typename decay<F>::type>(f))
- {
- }
-
- void operator()()
- {
- impl_->complete_(impl_.get());
- }
-
-private:
- // Base class for polymorphic function implementations.
- struct impl_base
- {
- void (*complete_)(impl_base*);
- };
-
- // Polymorphic function implementation.
- template <typename F>
- struct impl : impl_base
- {
- impl(const F& f)
- : function_(f)
- {
- complete_ = &executor_function::complete<F>;
- }
-
- F function_;
- };
-
- // Helper to complete function invocation.
- template <typename F>
- static void complete(impl_base* i)
- {
- static_cast<impl<F>*>(i)->function_();
- }
-
- shared_ptr<impl_base> impl_;
-};
-
-#endif // defined(ASIO_HAS_MOVE)
-
// Lightweight, non-owning, copyable function object wrapper.
class executor_function_view
{
public:
template <typename F>
- explicit executor_function_view(F& f) ASIO_NOEXCEPT
+ explicit executor_function_view(F& f) noexcept
: complete_(&executor_function_view::complete<F>),
function_(&f)
{
diff --git a/3rdparty/asio/include/asio/detail/executor_op.hpp b/3rdparty/asio/include/asio/detail/executor_op.hpp
index f97618c378a..78e781e217b 100644
--- a/3rdparty/asio/include/asio/detail/executor_op.hpp
+++ b/3rdparty/asio/include/asio/detail/executor_op.hpp
@@ -2,7 +2,7 @@
// detail/executor_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,7 +18,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/scheduler_operation.hpp"
#include "asio/detail/push_options.hpp"
@@ -34,9 +33,9 @@ public:
ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(executor_op);
template <typename H>
- executor_op(ASIO_MOVE_ARG(H) h, const Alloc& allocator)
+ executor_op(H&& h, const Alloc& allocator)
: Operation(&executor_op::do_complete),
- handler_(ASIO_MOVE_CAST(H)(h)),
+ handler_(static_cast<H&&>(h)),
allocator_(allocator)
{
}
@@ -46,6 +45,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
executor_op* o(static_cast<executor_op*>(base));
Alloc allocator(o->allocator_);
ptr p = { detail::addressof(allocator), o, o };
@@ -58,7 +58,7 @@ public:
// with the handler. Consequently, a local copy of the handler is required
// to ensure that any owning sub-object remains valid until after we have
// deallocated the memory here.
- Handler handler(ASIO_MOVE_CAST(Handler)(o->handler_));
+ Handler handler(static_cast<Handler&&>(o->handler_));
p.reset();
// Make the upcall if required.
@@ -66,7 +66,7 @@ public:
{
fenced_block b(fenced_block::half);
ASIO_HANDLER_INVOCATION_BEGIN(());
- asio_handler_invoke_helpers::invoke(handler, handler);
+ static_cast<Handler&&>(handler)();
ASIO_HANDLER_INVOCATION_END;
}
}
diff --git a/3rdparty/asio/include/asio/detail/fd_set_adapter.hpp b/3rdparty/asio/include/asio/detail/fd_set_adapter.hpp
index ade20ca56b3..80b8974a417 100644
--- a/3rdparty/asio/include/asio/detail/fd_set_adapter.hpp
+++ b/3rdparty/asio/include/asio/detail/fd_set_adapter.hpp
@@ -2,7 +2,7 @@
// detail/fd_set_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/fenced_block.hpp b/3rdparty/asio/include/asio/detail/fenced_block.hpp
index 08e47d67169..ff096dc8486 100644
--- a/3rdparty/asio/include/asio/detail/fenced_block.hpp
+++ b/3rdparty/asio/include/asio/detail/fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,28 +20,8 @@
#if !defined(ASIO_HAS_THREADS) \
|| defined(ASIO_DISABLE_FENCED_BLOCK)
# include "asio/detail/null_fenced_block.hpp"
-#elif defined(ASIO_HAS_STD_ATOMIC)
-# include "asio/detail/std_fenced_block.hpp"
-#elif defined(__MACH__) && defined(__APPLE__)
-# include "asio/detail/macos_fenced_block.hpp"
-#elif defined(__sun)
-# include "asio/detail/solaris_fenced_block.hpp"
-#elif defined(__GNUC__) && defined(__arm__) \
- && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
-# include "asio/detail/gcc_arm_fenced_block.hpp"
-#elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-# include "asio/detail/gcc_hppa_fenced_block.hpp"
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-# include "asio/detail/gcc_x86_fenced_block.hpp"
-#elif defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
- && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-# include "asio/detail/gcc_sync_fenced_block.hpp"
-#elif defined(ASIO_WINDOWS) && !defined(UNDER_CE)
-# include "asio/detail/win_fenced_block.hpp"
#else
-# include "asio/detail/null_fenced_block.hpp"
+# include "asio/detail/std_fenced_block.hpp"
#endif
namespace asio {
@@ -50,28 +30,8 @@ namespace detail {
#if !defined(ASIO_HAS_THREADS) \
|| defined(ASIO_DISABLE_FENCED_BLOCK)
typedef null_fenced_block fenced_block;
-#elif defined(ASIO_HAS_STD_ATOMIC)
-typedef std_fenced_block fenced_block;
-#elif defined(__MACH__) && defined(__APPLE__)
-typedef macos_fenced_block fenced_block;
-#elif defined(__sun)
-typedef solaris_fenced_block fenced_block;
-#elif defined(__GNUC__) && defined(__arm__) \
- && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
-typedef gcc_arm_fenced_block fenced_block;
-#elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-typedef gcc_hppa_fenced_block fenced_block;
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-typedef gcc_x86_fenced_block fenced_block;
-#elif defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
- && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-typedef gcc_sync_fenced_block fenced_block;
-#elif defined(ASIO_WINDOWS) && !defined(UNDER_CE)
-typedef win_fenced_block fenced_block;
#else
-typedef null_fenced_block fenced_block;
+typedef std_fenced_block fenced_block;
#endif
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/functional.hpp b/3rdparty/asio/include/asio/detail/functional.hpp
index 54256c130b0..145f9d2a9e1 100644
--- a/3rdparty/asio/include/asio/detail/functional.hpp
+++ b/3rdparty/asio/include/asio/detail/functional.hpp
@@ -2,7 +2,7 @@
// detail/functional.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,28 +16,17 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
#include <functional>
-#if !defined(ASIO_HAS_STD_FUNCTION)
-# include <boost/function.hpp>
-#endif // !defined(ASIO_HAS_STD_FUNCTION)
-
namespace asio {
namespace detail {
-#if defined(ASIO_HAS_STD_FUNCTION)
using std::function;
-#else // defined(ASIO_HAS_STD_FUNCTION)
-using boost::function;
-#endif // defined(ASIO_HAS_STD_FUNCTION)
} // namespace detail
-#if defined(ASIO_HAS_STD_REFERENCE_WRAPPER)
using std::ref;
using std::reference_wrapper;
-#endif // defined(ASIO_HAS_STD_REFERENCE_WRAPPER)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/future.hpp b/3rdparty/asio/include/asio/detail/future.hpp
index 9fe828e78ee..f33136cbef2 100644
--- a/3rdparty/asio/include/asio/detail/future.hpp
+++ b/3rdparty/asio/include/asio/detail/future.hpp
@@ -2,7 +2,7 @@
// detail/future.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,18 +16,17 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#if defined(ASIO_HAS_STD_FUTURE)
-# include <future>
+#include <future>
+
// Even though the future header is available, libstdc++ may not implement the
// std::future class itself. However, we need to have already included the
// future header to reliably test for _GLIBCXX_HAS_GTHREADS.
-# if defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX)
-# if defined(_GLIBCXX_HAS_GTHREADS)
-# define ASIO_HAS_STD_FUTURE_CLASS 1
-# endif // defined(_GLIBCXX_HAS_GTHREADS)
-# else // defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX)
+#if defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX)
+# if defined(_GLIBCXX_HAS_GTHREADS)
# define ASIO_HAS_STD_FUTURE_CLASS 1
-# endif // defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX)
-#endif // defined(ASIO_HAS_STD_FUTURE)
+# endif // defined(_GLIBCXX_HAS_GTHREADS)
+#else // defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX)
+# define ASIO_HAS_STD_FUTURE_CLASS 1
+#endif // defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX)
#endif // ASIO_DETAIL_FUTURE_HPP
diff --git a/3rdparty/asio/include/asio/detail/gcc_arm_fenced_block.hpp b/3rdparty/asio/include/asio/detail/gcc_arm_fenced_block.hpp
deleted file mode 100644
index c879c22d6bf..00000000000
--- a/3rdparty/asio/include/asio/detail/gcc_arm_fenced_block.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// detail/gcc_arm_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_DETAIL_GCC_ARM_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_GCC_ARM_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(__GNUC__) && defined(__arm__)
-
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class gcc_arm_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit gcc_arm_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit gcc_arm_fenced_block(full_t)
- {
- barrier();
- }
-
- // Destructor.
- ~gcc_arm_fenced_block()
- {
- barrier();
- }
-
-private:
- static void barrier()
- {
-#if defined(__ARM_ARCH_4__) \
- || defined(__ARM_ARCH_4T__) \
- || defined(__ARM_ARCH_5__) \
- || defined(__ARM_ARCH_5E__) \
- || defined(__ARM_ARCH_5T__) \
- || defined(__ARM_ARCH_5TE__) \
- || defined(__ARM_ARCH_5TEJ__) \
- || defined(__ARM_ARCH_6__) \
- || defined(__ARM_ARCH_6J__) \
- || defined(__ARM_ARCH_6K__) \
- || defined(__ARM_ARCH_6Z__) \
- || defined(__ARM_ARCH_6ZK__) \
- || defined(__ARM_ARCH_6T2__)
-# if defined(__thumb__)
- // This is just a placeholder and almost certainly not sufficient.
- __asm__ __volatile__ ("" : : : "memory");
-# else // defined(__thumb__)
- int a = 0, b = 0;
- __asm__ __volatile__ ("swp %0, %1, [%2]"
- : "=&r"(a) : "r"(1), "r"(&b) : "memory", "cc");
-# endif // defined(__thumb__)
-#else
- // ARMv7 and later.
- __asm__ __volatile__ ("dmb" : : : "memory");
-#endif
- }
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(__GNUC__) && defined(__arm__)
-
-#endif // ASIO_DETAIL_GCC_ARM_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/gcc_hppa_fenced_block.hpp b/3rdparty/asio/include/asio/detail/gcc_hppa_fenced_block.hpp
deleted file mode 100644
index 38caa4b01c6..00000000000
--- a/3rdparty/asio/include/asio/detail/gcc_hppa_fenced_block.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// detail/gcc_hppa_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class gcc_hppa_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit gcc_hppa_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit gcc_hppa_fenced_block(full_t)
- {
- barrier();
- }
-
- // Destructor.
- ~gcc_hppa_fenced_block()
- {
- barrier();
- }
-
-private:
- static void barrier()
- {
- // This is just a placeholder and almost certainly not sufficient.
- __asm__ __volatile__ ("" : : : "memory");
- }
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
-
-#endif // ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/gcc_sync_fenced_block.hpp b/3rdparty/asio/include/asio/detail/gcc_sync_fenced_block.hpp
deleted file mode 100644
index 68fdcf722dd..00000000000
--- a/3rdparty/asio/include/asio/detail/gcc_sync_fenced_block.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// detail/gcc_sync_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
- && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class gcc_sync_fenced_block
- : private noncopyable
-{
-public:
- enum half_or_full_t { half, full };
-
- // Constructor.
- explicit gcc_sync_fenced_block(half_or_full_t)
- : value_(0)
- {
- __sync_lock_test_and_set(&value_, 1);
- }
-
- // Destructor.
- ~gcc_sync_fenced_block()
- {
- __sync_lock_release(&value_);
- }
-
-private:
- int value_;
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(__GNUC__)
- // && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4))
- // && !defined(__INTEL_COMPILER) && !defined(__ICL)
- // && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
-
-#endif // ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/gcc_x86_fenced_block.hpp b/3rdparty/asio/include/asio/detail/gcc_x86_fenced_block.hpp
deleted file mode 100644
index c21b2bad5af..00000000000
--- a/3rdparty/asio/include/asio/detail/gcc_x86_fenced_block.hpp
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// detail/gcc_x86_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_DETAIL_GCC_X86_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_GCC_X86_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class gcc_x86_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit gcc_x86_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit gcc_x86_fenced_block(full_t)
- {
- lbarrier();
- }
-
- // Destructor.
- ~gcc_x86_fenced_block()
- {
- sbarrier();
- }
-
-private:
- static int barrier()
- {
- int r = 0, m = 1;
- __asm__ __volatile__ (
- "xchgl %0, %1" :
- "=r"(r), "=m"(m) :
- "0"(1), "m"(m) :
- "memory", "cc");
- return r;
- }
-
- static void lbarrier()
- {
-#if defined(__SSE2__)
-# if (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __builtin_ia32_lfence();
-# else // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __asm__ __volatile__ ("lfence" ::: "memory");
-# endif // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
-#else // defined(__SSE2__)
- barrier();
-#endif // defined(__SSE2__)
- }
-
- static void sbarrier()
- {
-#if defined(__SSE2__)
-# if (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __builtin_ia32_sfence();
-# else // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
- __asm__ __volatile__ ("sfence" ::: "memory");
-# endif // (__GNUC__ >= 4) && !defined(__INTEL_COMPILER) && !defined(__ICL)
-#else // defined(__SSE2__)
- barrier();
-#endif // defined(__SSE2__)
- }
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-
-#endif // ASIO_DETAIL_GCC_X86_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/global.hpp b/3rdparty/asio/include/asio/detail/global.hpp
index 685cf90f2cf..59de23a4884 100644
--- a/3rdparty/asio/include/asio/detail/global.hpp
+++ b/3rdparty/asio/include/asio/detail/global.hpp
@@ -2,7 +2,7 @@
// detail/global.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,10 +23,8 @@
# include "asio/detail/win_global.hpp"
#elif defined(ASIO_HAS_PTHREADS)
# include "asio/detail/posix_global.hpp"
-#elif defined(ASIO_HAS_STD_CALL_ONCE)
-# include "asio/detail/std_global.hpp"
#else
-# error Only Windows, POSIX and std::call_once are supported!
+# include "asio/detail/std_global.hpp"
#endif
namespace asio {
@@ -41,7 +39,7 @@ inline T& global()
return win_global<T>();
#elif defined(ASIO_HAS_PTHREADS)
return posix_global<T>();
-#elif defined(ASIO_HAS_STD_CALL_ONCE)
+#else
return std_global<T>();
#endif
}
diff --git a/3rdparty/asio/include/asio/detail/handler_alloc_helpers.hpp b/3rdparty/asio/include/asio/detail/handler_alloc_helpers.hpp
index 14033a49a16..c14d542e48c 100644
--- a/3rdparty/asio/include/asio/detail/handler_alloc_helpers.hpp
+++ b/3rdparty/asio/include/asio/detail/handler_alloc_helpers.hpp
@@ -2,7 +2,7 @@
// detail/handler_alloc_helpers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -21,88 +21,37 @@
#include "asio/detail/recycling_allocator.hpp"
#include "asio/detail/thread_info_base.hpp"
#include "asio/associated_allocator.hpp"
-#include "asio/handler_alloc_hook.hpp"
#include "asio/detail/push_options.hpp"
-// Calls to asio_handler_allocate and asio_handler_deallocate must be made from
-// a namespace that does not contain any overloads of these functions. The
-// asio_handler_alloc_helpers namespace is defined here for that purpose.
-namespace asio_handler_alloc_helpers {
-
-#if defined(ASIO_NO_DEPRECATED)
-template <typename Handler>
-inline void error_if_hooks_are_defined(Handler& h)
-{
- using asio::asio_handler_allocate;
- // If you get an error here it is because some of your handlers still
- // overload asio_handler_allocate, but this hook is no longer used.
- (void)static_cast<asio::asio_handler_allocate_is_no_longer_used>(
- asio_handler_allocate(static_cast<std::size_t>(0),
- asio::detail::addressof(h)));
-
- using asio::asio_handler_deallocate;
- // If you get an error here it is because some of your handlers still
- // overload asio_handler_deallocate, but this hook is no longer used.
- (void)static_cast<asio::asio_handler_deallocate_is_no_longer_used>(
- asio_handler_deallocate(static_cast<void*>(0),
- static_cast<std::size_t>(0), asio::detail::addressof(h)));
-}
-#endif // defined(ASIO_NO_DEPRECATED)
+namespace asio {
+namespace detail {
-template <typename Handler>
-inline void* allocate(std::size_t s, Handler& h,
+inline void* default_allocate(std::size_t s,
std::size_t align = ASIO_DEFAULT_ALIGN)
{
-#if !defined(ASIO_HAS_HANDLER_HOOKS)
- return aligned_new(align, s);
-#elif defined(ASIO_NO_DEPRECATED)
- // The asio_handler_allocate hook is no longer used to obtain memory.
- (void)&error_if_hooks_are_defined<Handler>;
- (void)h;
-# if !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+#if !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
return asio::detail::thread_info_base::allocate(
asio::detail::thread_context::top_of_thread_call_stack(),
s, align);
-# else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- return aligned_new(align, s);
-# endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
-#else
- (void)align;
- using asio::asio_handler_allocate;
- return asio_handler_allocate(s, asio::detail::addressof(h));
-#endif
+#else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
+ return asio::aligned_new(align, s);
+#endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
}
-template <typename Handler>
-inline void deallocate(void* p, std::size_t s, Handler& h)
+inline void default_deallocate(void* p, std::size_t s)
{
-#if !defined(ASIO_HAS_HANDLER_HOOKS)
- aligned_delete(p);
-#elif defined(ASIO_NO_DEPRECATED)
- // The asio_handler_allocate hook is no longer used to obtain memory.
- (void)&error_if_hooks_are_defined<Handler>;
- (void)h;
#if !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
asio::detail::thread_info_base::deallocate(
asio::detail::thread_context::top_of_thread_call_stack(), p, s);
#else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
(void)s;
- aligned_delete(p);
+ asio::aligned_delete(p);
#endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
-#else
- using asio::asio_handler_deallocate;
- asio_handler_deallocate(p, s, asio::detail::addressof(h));
-#endif
}
-} // namespace asio_handler_alloc_helpers
-
-namespace asio {
-namespace detail {
-
-template <typename Handler, typename T>
-class hook_allocator
+template <typename T>
+class default_allocator
{
public:
typedef T value_type;
@@ -110,38 +59,31 @@ public:
template <typename U>
struct rebind
{
- typedef hook_allocator<Handler, U> other;
+ typedef default_allocator<U> other;
};
- explicit hook_allocator(Handler& h)
- : handler_(h)
+ default_allocator() noexcept
{
}
template <typename U>
- hook_allocator(const hook_allocator<Handler, U>& a)
- : handler_(a.handler_)
+ default_allocator(const default_allocator<U>&) noexcept
{
}
T* allocate(std::size_t n)
{
- return static_cast<T*>(
- asio_handler_alloc_helpers::allocate(
- sizeof(T) * n, handler_, ASIO_ALIGNOF(T)));
+ return static_cast<T*>(default_allocate(sizeof(T) * n, alignof(T)));
}
void deallocate(T* p, std::size_t n)
{
- asio_handler_alloc_helpers::deallocate(p, sizeof(T) * n, handler_);
+ default_deallocate(p, sizeof(T) * n);
}
-
-//private:
- Handler& handler_;
};
-template <typename Handler>
-class hook_allocator<Handler, void>
+template <>
+class default_allocator<void>
{
public:
typedef void value_type;
@@ -149,43 +91,38 @@ public:
template <typename U>
struct rebind
{
- typedef hook_allocator<Handler, U> other;
+ typedef default_allocator<U> other;
};
- explicit hook_allocator(Handler& h)
- : handler_(h)
+ default_allocator() noexcept
{
}
template <typename U>
- hook_allocator(const hook_allocator<Handler, U>& a)
- : handler_(a.handler_)
+ default_allocator(const default_allocator<U>&) noexcept
{
}
-
-//private:
- Handler& handler_;
};
-template <typename Handler, typename Allocator>
-struct get_hook_allocator
+template <typename Allocator>
+struct get_default_allocator
{
typedef Allocator type;
- static type get(Handler&, const Allocator& a)
+ static type get(const Allocator& a)
{
return a;
}
};
-template <typename Handler, typename T>
-struct get_hook_allocator<Handler, std::allocator<T> >
+template <typename T>
+struct get_default_allocator<std::allocator<T>>
{
- typedef hook_allocator<Handler, T> type;
+ typedef default_allocator<T> type;
- static type get(Handler& handler, const std::allocator<T>&)
+ static type get(const std::allocator<T>&)
{
- return type(handler);
+ return type();
}
};
@@ -206,12 +143,12 @@ struct get_hook_allocator<Handler, std::allocator<T> >
{ \
typedef typename ::asio::associated_allocator< \
Handler>::type associated_allocator_type; \
- typedef typename ::asio::detail::get_hook_allocator< \
- Handler, associated_allocator_type>::type hook_allocator_type; \
- ASIO_REBIND_ALLOC(hook_allocator_type, op) a( \
- ::asio::detail::get_hook_allocator< \
- Handler, associated_allocator_type>::get( \
- handler, ::asio::get_associated_allocator(handler))); \
+ typedef typename ::asio::detail::get_default_allocator< \
+ associated_allocator_type>::type default_allocator_type; \
+ ASIO_REBIND_ALLOC(default_allocator_type, op) a( \
+ ::asio::detail::get_default_allocator< \
+ associated_allocator_type>::get( \
+ ::asio::get_associated_allocator(handler))); \
return a.allocate(1); \
} \
void reset() \
@@ -225,12 +162,12 @@ struct get_hook_allocator<Handler, std::allocator<T> >
{ \
typedef typename ::asio::associated_allocator< \
Handler>::type associated_allocator_type; \
- typedef typename ::asio::detail::get_hook_allocator< \
- Handler, associated_allocator_type>::type hook_allocator_type; \
- ASIO_REBIND_ALLOC(hook_allocator_type, op) a( \
- ::asio::detail::get_hook_allocator< \
- Handler, associated_allocator_type>::get( \
- *h, ::asio::get_associated_allocator(*h))); \
+ typedef typename ::asio::detail::get_default_allocator< \
+ associated_allocator_type>::type default_allocator_type; \
+ ASIO_REBIND_ALLOC(default_allocator_type, op) a( \
+ ::asio::detail::get_default_allocator< \
+ associated_allocator_type>::get( \
+ ::asio::get_associated_allocator(*h))); \
a.deallocate(static_cast<op*>(v), 1); \
v = 0; \
} \
diff --git a/3rdparty/asio/include/asio/detail/handler_cont_helpers.hpp b/3rdparty/asio/include/asio/detail/handler_cont_helpers.hpp
index 5d47465bdd4..9f8f971984f 100644
--- a/3rdparty/asio/include/asio/detail/handler_cont_helpers.hpp
+++ b/3rdparty/asio/include/asio/detail/handler_cont_helpers.hpp
@@ -2,7 +2,7 @@
// detail/handler_cont_helpers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/handler_invoke_helpers.hpp b/3rdparty/asio/include/asio/detail/handler_invoke_helpers.hpp
deleted file mode 100644
index 86b8bf2b4b3..00000000000
--- a/3rdparty/asio/include/asio/detail/handler_invoke_helpers.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// detail/handler_invoke_helpers.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP
-#define ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/memory.hpp"
-#include "asio/handler_invoke_hook.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-// Calls to asio_handler_invoke must be made from a namespace that does not
-// contain overloads of this function. The asio_handler_invoke_helpers
-// namespace is defined here for that purpose.
-namespace asio_handler_invoke_helpers {
-
-#if defined(ASIO_NO_DEPRECATED)
-template <typename Function, typename Context>
-inline void error_if_hook_is_defined(Function& function, Context& context)
-{
- using asio::asio_handler_invoke;
- // If you get an error here it is because some of your handlers still
- // overload asio_handler_invoke, but this hook is no longer used.
- (void)static_cast<asio::asio_handler_invoke_is_no_longer_used>(
- asio_handler_invoke(function, asio::detail::addressof(context)));
-}
-#endif // defined(ASIO_NO_DEPRECATED)
-
-template <typename Function, typename Context>
-inline void invoke(Function& function, Context& context)
-{
-#if !defined(ASIO_HAS_HANDLER_HOOKS)
- Function tmp(function);
- tmp();
-#elif defined(ASIO_NO_DEPRECATED)
- // The asio_handler_invoke hook is no longer used to invoke the function.
- (void)&error_if_hook_is_defined<Function, Context>;
- (void)context;
- function();
-#else
- using asio::asio_handler_invoke;
- asio_handler_invoke(function, asio::detail::addressof(context));
-#endif
-}
-
-template <typename Function, typename Context>
-inline void invoke(const Function& function, Context& context)
-{
-#if !defined(ASIO_HAS_HANDLER_HOOKS)
- Function tmp(function);
- tmp();
-#elif defined(ASIO_NO_DEPRECATED)
- // The asio_handler_invoke hook is no longer used to invoke the function.
- (void)&error_if_hook_is_defined<const Function, Context>;
- (void)context;
- Function tmp(function);
- tmp();
-#else
- using asio::asio_handler_invoke;
- asio_handler_invoke(function, asio::detail::addressof(context));
-#endif
-}
-
-} // namespace asio_handler_invoke_helpers
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP
diff --git a/3rdparty/asio/include/asio/detail/handler_tracking.hpp b/3rdparty/asio/include/asio/detail/handler_tracking.hpp
index 14195cd4389..f47c777a2d6 100644
--- a/3rdparty/asio/include/asio/detail/handler_tracking.hpp
+++ b/3rdparty/asio/include/asio/detail/handler_tracking.hpp
@@ -2,7 +2,7 @@
// detail/handler_tracking.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -99,8 +99,8 @@ public:
private:
// Disallow copying and assignment.
- location(const location&) ASIO_DELETED;
- location& operator=(const location&) ASIO_DELETED;
+ location(const location&) = delete;
+ location& operator=(const location&) = delete;
friend class handler_tracking;
const char* file_;
diff --git a/3rdparty/asio/include/asio/detail/handler_type_requirements.hpp b/3rdparty/asio/include/asio/detail/handler_type_requirements.hpp
index ced34e8e014..54c53b9b6e3 100644
--- a/3rdparty/asio/include/asio/detail/handler_type_requirements.hpp
+++ b/3rdparty/asio/include/asio/detail/handler_type_requirements.hpp
@@ -2,7 +2,7 @@
// detail/handler_type_requirements.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -64,7 +64,7 @@ template <typename Handler>
auto zero_arg_copyable_handler_test(Handler h, void*)
-> decltype(
sizeof(Handler(static_cast<const Handler&>(h))),
- (ASIO_MOVE_OR_LVALUE(Handler)(h)()),
+ (static_cast<Handler&&>(h)()),
char(0));
template <typename Handler>
@@ -73,8 +73,8 @@ char (&zero_arg_copyable_handler_test(Handler, ...))[2];
template <typename Handler, typename Arg1>
auto one_arg_handler_test(Handler h, Arg1* a1)
-> decltype(
- sizeof(Handler(ASIO_MOVE_CAST(Handler)(h))),
- (ASIO_MOVE_OR_LVALUE(Handler)(h)(*a1)),
+ sizeof(Handler(static_cast<Handler&&>(h))),
+ (static_cast<Handler&&>(h)(*a1)),
char(0));
template <typename Handler>
@@ -83,8 +83,8 @@ char (&one_arg_handler_test(Handler h, ...))[2];
template <typename Handler, typename Arg1, typename Arg2>
auto two_arg_handler_test(Handler h, Arg1* a1, Arg2* a2)
-> decltype(
- sizeof(Handler(ASIO_MOVE_CAST(Handler)(h))),
- (ASIO_MOVE_OR_LVALUE(Handler)(h)(*a1, *a2)),
+ sizeof(Handler(static_cast<Handler&&>(h))),
+ (static_cast<Handler&&>(h)(*a1, *a2)),
char(0));
template <typename Handler>
@@ -93,9 +93,9 @@ char (&two_arg_handler_test(Handler, ...))[2];
template <typename Handler, typename Arg1, typename Arg2>
auto two_arg_move_handler_test(Handler h, Arg1* a1, Arg2* a2)
-> decltype(
- sizeof(Handler(ASIO_MOVE_CAST(Handler)(h))),
- (ASIO_MOVE_OR_LVALUE(Handler)(h)(
- *a1, ASIO_MOVE_CAST(Arg2)(*a2))),
+ sizeof(Handler(static_cast<Handler&&>(h))),
+ (static_cast<Handler&&>(h)(
+ *a1, static_cast<Arg2&&>(*a2))),
char(0));
template <typename Handler>
@@ -114,15 +114,9 @@ template <typename T> T& lvref();
template <typename T> T& lvref(T);
template <typename T> const T& clvref();
template <typename T> const T& clvref(T);
-#if defined(ASIO_HAS_MOVE)
template <typename T> T rvref();
template <typename T> T rvref(T);
template <typename T> T rorlvref();
-#else // defined(ASIO_HAS_MOVE)
-template <typename T> const T& rvref();
-template <typename T> const T& rvref(T);
-template <typename T> T& rorlvref();
-#endif // defined(ASIO_HAS_MOVE)
template <typename T> char argbyv(T);
template <int>
diff --git a/3rdparty/asio/include/asio/detail/handler_work.hpp b/3rdparty/asio/include/asio/detail/handler_work.hpp
index c564eb944c3..596d076327a 100644
--- a/3rdparty/asio/include/asio/detail/handler_work.hpp
+++ b/3rdparty/asio/include/asio/detail/handler_work.hpp
@@ -2,7 +2,7 @@
// detail/handler_work.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,12 +16,14 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/associated_allocator.hpp"
#include "asio/associated_executor.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
+#include "asio/associated_immediate_executor.hpp"
+#include "asio/detail/initiate_dispatch.hpp"
#include "asio/detail/type_traits.hpp"
+#include "asio/detail/work_dispatcher.hpp"
#include "asio/execution/allocator.hpp"
#include "asio/execution/blocking.hpp"
-#include "asio/execution/execute.hpp"
#include "asio/execution/executor.hpp"
#include "asio/execution/outstanding_work.hpp"
#include "asio/executor_work_guard.hpp"
@@ -36,23 +38,15 @@ class io_context;
#if !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+class any_completion_executor;
class any_io_executor;
#endif // !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
namespace execution {
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename...> class any_executor;
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename, typename, typename, typename, typename,
- typename, typename, typename, typename> class any_executor;
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
} // namespace execution
namespace detail {
@@ -62,31 +56,29 @@ template <typename Executor, typename CandidateExecutor = void,
class handler_work_base
{
public:
- explicit handler_work_base(int, int, const Executor& ex) ASIO_NOEXCEPT
+ explicit handler_work_base(int, int, const Executor& ex) noexcept
: executor_(asio::prefer(ex, execution::outstanding_work.tracked))
{
}
template <typename OtherExecutor>
handler_work_base(bool /*base1_owns_work*/, const Executor& ex,
- const OtherExecutor& /*candidate*/) ASIO_NOEXCEPT
+ const OtherExecutor& /*candidate*/) noexcept
: executor_(asio::prefer(ex, execution::outstanding_work.tracked))
{
}
- handler_work_base(const handler_work_base& other) ASIO_NOEXCEPT
+ handler_work_base(const handler_work_base& other) noexcept
: executor_(other.executor_)
{
}
-#if defined(ASIO_HAS_MOVE)
- handler_work_base(handler_work_base&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(executor_type)(other.executor_))
+ handler_work_base(handler_work_base&& other) noexcept
+ : executor_(static_cast<executor_type&&>(other.executor_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- bool owns_work() const ASIO_NOEXCEPT
+ bool owns_work() const noexcept
{
return true;
}
@@ -94,19 +86,15 @@ public:
template <typename Function, typename Handler>
void dispatch(Function& function, Handler& handler)
{
- execution::execute(
- asio::prefer(executor_,
- execution::blocking.possibly,
- execution::allocator((get_associated_allocator)(handler))),
- ASIO_MOVE_CAST(Function)(function));
+ asio::prefer(executor_,
+ execution::allocator((get_associated_allocator)(handler))
+ ).execute(static_cast<Function&&>(function));
}
private:
- typedef typename decay<
- typename prefer_result<Executor,
- execution::outstanding_work_t::tracked_t
- >::type
- >::type executor_type;
+ typedef decay_t<
+ prefer_result_t<Executor, execution::outstanding_work_t::tracked_t>
+ > executor_type;
executor_type executor_;
};
@@ -115,14 +103,15 @@ template <typename Executor, typename CandidateExecutor,
typename IoContext, typename PolymorphicExecutor>
class handler_work_base<Executor, CandidateExecutor,
IoContext, PolymorphicExecutor,
- typename enable_if<
+ enable_if_t<
!execution::is_executor<Executor>::value
&& (!is_same<Executor, PolymorphicExecutor>::value
|| !is_same<CandidateExecutor, void>::value)
- >::type>
+ >
+ >
{
public:
- explicit handler_work_base(int, int, const Executor& ex) ASIO_NOEXCEPT
+ explicit handler_work_base(int, int, const Executor& ex) noexcept
: executor_(ex),
owns_work_(true)
{
@@ -130,7 +119,7 @@ public:
}
handler_work_base(bool /*base1_owns_work*/, const Executor& ex,
- const Executor& candidate) ASIO_NOEXCEPT
+ const Executor& candidate) noexcept
: executor_(ex),
owns_work_(ex != candidate)
{
@@ -140,14 +129,14 @@ public:
template <typename OtherExecutor>
handler_work_base(bool /*base1_owns_work*/, const Executor& ex,
- const OtherExecutor& /*candidate*/) ASIO_NOEXCEPT
+ const OtherExecutor& /*candidate*/) noexcept
: executor_(ex),
owns_work_(true)
{
executor_.on_work_started();
}
- handler_work_base(const handler_work_base& other) ASIO_NOEXCEPT
+ handler_work_base(const handler_work_base& other) noexcept
: executor_(other.executor_),
owns_work_(other.owns_work_)
{
@@ -155,14 +144,12 @@ public:
executor_.on_work_started();
}
-#if defined(ASIO_HAS_MOVE)
- handler_work_base(handler_work_base&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(Executor)(other.executor_)),
+ handler_work_base(handler_work_base&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_)),
owns_work_(other.owns_work_)
{
other.owns_work_ = false;
}
-#endif // defined(ASIO_HAS_MOVE)
~handler_work_base()
{
@@ -170,7 +157,7 @@ public:
executor_.on_work_finished();
}
- bool owns_work() const ASIO_NOEXCEPT
+ bool owns_work() const noexcept
{
return owns_work_;
}
@@ -178,7 +165,7 @@ public:
template <typename Function, typename Handler>
void dispatch(Function& function, Handler& handler)
{
- executor_.dispatch(ASIO_MOVE_CAST(Function)(function),
+ executor_.dispatch(static_cast<Function&&>(function),
asio::get_associated_allocator(handler));
}
@@ -189,30 +176,31 @@ private:
template <typename Executor, typename IoContext, typename PolymorphicExecutor>
class handler_work_base<Executor, void, IoContext, PolymorphicExecutor,
- typename enable_if<
+ enable_if_t<
is_same<
Executor,
typename IoContext::executor_type
>::value
- >::type>
+ >
+ >
{
public:
explicit handler_work_base(int, int, const Executor&)
{
}
- bool owns_work() const ASIO_NOEXCEPT
+ bool owns_work() const noexcept
{
return false;
}
template <typename Function, typename Handler>
- void dispatch(Function& function, Handler& handler)
+ void dispatch(Function& function, Handler&)
{
// When using a native implementation, I/O completion handlers are
// already dispatched according to the execution context's executor's
// rules. We can call the function directly.
- asio_handler_invoke_helpers::invoke(function, handler);
+ static_cast<Function&&>(function)();
}
};
@@ -220,7 +208,7 @@ template <typename Executor, typename IoContext>
class handler_work_base<Executor, void, IoContext, Executor>
{
public:
- explicit handler_work_base(int, int, const Executor& ex) ASIO_NOEXCEPT
+ explicit handler_work_base(int, int, const Executor& ex) noexcept
#if !defined(ASIO_NO_TYPEID)
: executor_(
ex.target_type() == typeid(typename IoContext::executor_type)
@@ -234,7 +222,7 @@ public:
}
handler_work_base(bool /*base1_owns_work*/, const Executor& ex,
- const Executor& candidate) ASIO_NOEXCEPT
+ const Executor& candidate) noexcept
: executor_(ex != candidate ? ex : Executor())
{
if (executor_)
@@ -243,25 +231,23 @@ public:
template <typename OtherExecutor>
handler_work_base(const Executor& ex,
- const OtherExecutor&) ASIO_NOEXCEPT
+ const OtherExecutor&) noexcept
: executor_(ex)
{
executor_.on_work_started();
}
- handler_work_base(const handler_work_base& other) ASIO_NOEXCEPT
+ handler_work_base(const handler_work_base& other) noexcept
: executor_(other.executor_)
{
if (executor_)
executor_.on_work_started();
}
-#if defined(ASIO_HAS_MOVE)
- handler_work_base(handler_work_base&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(Executor)(other.executor_))
+ handler_work_base(handler_work_base&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
~handler_work_base()
{
@@ -269,7 +255,7 @@ public:
executor_.on_work_finished();
}
- bool owns_work() const ASIO_NOEXCEPT
+ bool owns_work() const noexcept
{
return !!executor_;
}
@@ -277,7 +263,7 @@ public:
template <typename Function, typename Handler>
void dispatch(Function& function, Handler& handler)
{
- executor_.dispatch(ASIO_MOVE_CAST(Function)(function),
+ executor_.dispatch(static_cast<Function&&>(function),
asio::get_associated_allocator(handler));
}
@@ -285,34 +271,15 @@ private:
Executor executor_;
};
-template <
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
- typename... SupportableProperties,
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9,
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- typename CandidateExecutor, typename IoContext,
- typename PolymorphicExecutor>
-class handler_work_base<
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
- execution::any_executor<SupportableProperties...>,
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- execution::any_executor<T1, T2, T3, T4, T5, T6, T7, T8, T9>,
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+template <typename... SupportableProperties, typename CandidateExecutor,
+ typename IoContext, typename PolymorphicExecutor>
+class handler_work_base<execution::any_executor<SupportableProperties...>,
CandidateExecutor, IoContext, PolymorphicExecutor>
{
public:
- typedef
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
- execution::any_executor<SupportableProperties...>
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- execution::any_executor<T1, T2, T3, T4, T5, T6, T7, T8, T9>
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- executor_type;
+ typedef execution::any_executor<SupportableProperties...> executor_type;
- explicit handler_work_base(int, int,
- const executor_type& ex) ASIO_NOEXCEPT
+ explicit handler_work_base(int, int, const executor_type& ex) noexcept
#if !defined(ASIO_NO_TYPEID)
: executor_(
ex.target_type() == typeid(typename IoContext::executor_type)
@@ -325,7 +292,7 @@ public:
}
handler_work_base(bool base1_owns_work, const executor_type& ex,
- const executor_type& candidate) ASIO_NOEXCEPT
+ const executor_type& candidate) noexcept
: executor_(
!base1_owns_work && ex == candidate
? executor_type()
@@ -335,24 +302,22 @@ public:
template <typename OtherExecutor>
handler_work_base(bool /*base1_owns_work*/, const executor_type& ex,
- const OtherExecutor& /*candidate*/) ASIO_NOEXCEPT
+ const OtherExecutor& /*candidate*/) noexcept
: executor_(asio::prefer(ex, execution::outstanding_work.tracked))
{
}
- handler_work_base(const handler_work_base& other) ASIO_NOEXCEPT
+ handler_work_base(const handler_work_base& other) noexcept
: executor_(other.executor_)
{
}
-#if defined(ASIO_HAS_MOVE)
- handler_work_base(handler_work_base&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(executor_type)(other.executor_))
+ handler_work_base(handler_work_base&& other) noexcept
+ : executor_(static_cast<executor_type&&>(other.executor_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- bool owns_work() const ASIO_NOEXCEPT
+ bool owns_work() const noexcept
{
return !!executor_;
}
@@ -360,9 +325,7 @@ public:
template <typename Function, typename Handler>
void dispatch(Function& function, Handler&)
{
- execution::execute(
- asio::prefer(executor_, execution::blocking.possibly),
- ASIO_MOVE_CAST(Function)(function));
+ executor_.execute(static_cast<Function&&>(function));
}
private:
@@ -376,18 +339,17 @@ template <typename Executor, typename CandidateExecutor,
class handler_work_base<
Executor, CandidateExecutor,
IoContext, PolymorphicExecutor,
- typename enable_if<
- is_same<
- Executor,
- any_io_executor
- >::value
- >::type>
+ enable_if_t<
+ is_same<Executor, any_completion_executor>::value
+ || is_same<Executor, any_io_executor>::value
+ >
+ >
{
public:
typedef Executor executor_type;
explicit handler_work_base(int, int,
- const executor_type& ex) ASIO_NOEXCEPT
+ const executor_type& ex) noexcept
#if !defined(ASIO_NO_TYPEID)
: executor_(
ex.target_type() == typeid(typename IoContext::executor_type)
@@ -400,7 +362,7 @@ public:
}
handler_work_base(bool base1_owns_work, const executor_type& ex,
- const executor_type& candidate) ASIO_NOEXCEPT
+ const executor_type& candidate) noexcept
: executor_(
!base1_owns_work && ex == candidate
? executor_type()
@@ -410,24 +372,22 @@ public:
template <typename OtherExecutor>
handler_work_base(bool /*base1_owns_work*/, const executor_type& ex,
- const OtherExecutor& /*candidate*/) ASIO_NOEXCEPT
+ const OtherExecutor& /*candidate*/) noexcept
: executor_(asio::prefer(ex, execution::outstanding_work.tracked))
{
}
- handler_work_base(const handler_work_base& other) ASIO_NOEXCEPT
+ handler_work_base(const handler_work_base& other) noexcept
: executor_(other.executor_)
{
}
-#if defined(ASIO_HAS_MOVE)
- handler_work_base(handler_work_base&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(executor_type)(other.executor_))
+ handler_work_base(handler_work_base&& other) noexcept
+ : executor_(static_cast<executor_type&&>(other.executor_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- bool owns_work() const ASIO_NOEXCEPT
+ bool owns_work() const noexcept
{
return !!executor_;
}
@@ -435,9 +395,7 @@ public:
template <typename Function, typename Handler>
void dispatch(Function& function, Handler&)
{
- execution::execute(
- asio::prefer(executor_, execution::blocking.possibly),
- ASIO_MOVE_CAST(Function)(function));
+ executor_.execute(static_cast<Function&&>(function));
}
private:
@@ -449,15 +407,14 @@ private:
template <typename Handler, typename IoExecutor, typename = void>
class handler_work :
handler_work_base<IoExecutor>,
- handler_work_base<typename associated_executor<
- Handler, IoExecutor>::type, IoExecutor>
+ handler_work_base<associated_executor_t<Handler, IoExecutor>, IoExecutor>
{
public:
typedef handler_work_base<IoExecutor> base1_type;
- typedef handler_work_base<typename associated_executor<
- Handler, IoExecutor>::type, IoExecutor> base2_type;
+ typedef handler_work_base<associated_executor_t<Handler, IoExecutor>,
+ IoExecutor> base2_type;
- handler_work(Handler& handler, const IoExecutor& io_ex) ASIO_NOEXCEPT
+ handler_work(Handler& handler, const IoExecutor& io_ex) noexcept
: base1_type(0, 0, io_ex),
base2_type(base1_type::owns_work(),
asio::get_associated_executor(handler, io_ex), io_ex)
@@ -472,7 +429,7 @@ public:
// When using a native implementation, I/O completion handlers are
// already dispatched according to the execution context's executor's
// rules. We can call the function directly.
- asio_handler_invoke_helpers::invoke(function, handler);
+ static_cast<Function&&>(function)();
}
else
{
@@ -484,18 +441,19 @@ public:
template <typename Handler, typename IoExecutor>
class handler_work<
Handler, IoExecutor,
- typename enable_if<
+ enable_if_t<
is_same<
typename associated_executor<Handler,
IoExecutor>::asio_associated_executor_is_unspecialised,
void
>::value
- >::type> : handler_work_base<IoExecutor>
+ >
+ > : handler_work_base<IoExecutor>
{
public:
typedef handler_work_base<IoExecutor> base1_type;
- handler_work(Handler&, const IoExecutor& io_ex) ASIO_NOEXCEPT
+ handler_work(Handler&, const IoExecutor& io_ex) noexcept
: base1_type(0, 0, io_ex)
{
}
@@ -508,7 +466,7 @@ public:
// When using a native implementation, I/O completion handlers are
// already dispatched according to the execution context's executor's
// rules. We can call the function directly.
- asio_handler_invoke_helpers::invoke(function, handler);
+ static_cast<Function&&>(function)();
}
else
{
@@ -517,6 +475,34 @@ public:
}
};
+template <typename Handler, typename IoExecutor>
+class immediate_handler_work
+{
+public:
+ typedef handler_work<Handler, IoExecutor> handler_work_type;
+
+ explicit immediate_handler_work(handler_work_type&& w)
+ : handler_work_(static_cast<handler_work_type&&>(w))
+ {
+ }
+
+ template <typename Function>
+ void complete(Function& function, Handler& handler, const void* io_ex)
+ {
+ typedef associated_immediate_executor_t<Handler, IoExecutor>
+ immediate_ex_type;
+
+ immediate_ex_type immediate_ex = (get_associated_immediate_executor)(
+ handler, *static_cast<const IoExecutor*>(io_ex));
+
+ (initiate_dispatch_with_executor<immediate_ex_type>(immediate_ex))(
+ static_cast<Function&&>(function));
+ }
+
+private:
+ handler_work_type handler_work_;
+};
+
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/hash_map.hpp b/3rdparty/asio/include/asio/detail/hash_map.hpp
index 78edec8bdd1..e23de914a18 100644
--- a/3rdparty/asio/include/asio/detail/hash_map.hpp
+++ b/3rdparty/asio/include/asio/detail/hash_map.hpp
@@ -2,7 +2,7 @@
// detail/hash_map.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp b/3rdparty/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp
index d7c5e35ba84..372ce426e57 100644
--- a/3rdparty/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp
@@ -2,7 +2,7 @@
// detail/impl/buffer_sequence_adapter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/descriptor_ops.ipp b/3rdparty/asio/include/asio/detail/impl/descriptor_ops.ipp
index 9abf204a828..c56a512e462 100644
--- a/3rdparty/asio/include/asio/detail/impl/descriptor_ops.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/descriptor_ops.ipp
@@ -2,7 +2,7 @@
// detail/impl/descriptor_ops.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -37,6 +37,14 @@ int open(const char* path, int flags, asio::error_code& ec)
return result;
}
+int open(const char* path, int flags,
+ unsigned mode, asio::error_code& ec)
+{
+ int result = ::open(path, flags, mode);
+ get_last_error(ec, result < 0);
+ return result;
+}
+
int close(int d, state_type& state, asio::error_code& ec)
{
int result = 0;
@@ -61,7 +69,25 @@ int close(int d, state_type& state, asio::error_code& ec)
::fcntl(d, F_SETFL, flags & ~O_NONBLOCK);
#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = 0;
+# 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)
+ || ec.value() == 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;
@@ -95,6 +121,26 @@ bool set_user_non_blocking(int d, state_type& state,
ioctl_arg_type arg = (value ? 1 : 0);
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)
+ || ec.value() == ENOTCAPABLE
+# endif // defined(ENOTCAPABLE)
+ )
+ {
+ result = ::fcntl(d, F_GETFL, 0);
+ get_last_error(ec, result < 0);
+ if (result >= 0)
+ {
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ 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)
@@ -145,6 +191,26 @@ bool set_internal_non_blocking(int d, state_type& state,
ioctl_arg_type arg = (value ? 1 : 0);
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)
+ || ec.value() == ENOTCAPABLE
+# endif // defined(ENOTCAPABLE)
+ )
+ {
+ result = ::fcntl(d, F_GETFL, 0);
+ get_last_error(ec, result < 0);
+ if (result >= 0)
+ {
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ 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)
@@ -171,7 +237,7 @@ std::size_t sync_read(int d, state_type state, buf* bufs,
// A request to read 0 bytes on a stream is a no-op.
if (all_empty)
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
@@ -217,7 +283,7 @@ std::size_t sync_read1(int d, state_type state, void* data,
// A request to read 0 bytes on a stream is a no-op.
if (size == 0)
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
@@ -339,7 +405,7 @@ std::size_t sync_write(int d, state_type state, const buf* bufs,
// A request to write 0 bytes on a stream is a no-op.
if (all_empty)
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
@@ -378,7 +444,7 @@ std::size_t sync_write1(int d, state_type state, const void* data,
// A request to write 0 bytes on a stream is a no-op.
if (size == 0)
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
@@ -467,6 +533,323 @@ bool non_blocking_write1(int d, const void* data, std::size_t size,
}
}
+#if defined(ASIO_HAS_FILE)
+
+std::size_t sync_read_at(int d, state_type state, uint64_t offset,
+ buf* bufs, std::size_t count, bool all_empty, asio::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to read 0 bytes on a stream is a no-op.
+ if (all_empty)
+ {
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = ::preadv(d, bufs, static_cast<int>(count), offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Check for EOF.
+ if (bytes == 0)
+ {
+ ec = asio::error::eof;
+ return 0;
+ }
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for descriptor to become ready.
+ if (descriptor_ops::poll_read(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+std::size_t sync_read_at1(int d, state_type state, uint64_t offset,
+ void* data, std::size_t size, asio::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to read 0 bytes on a stream is a no-op.
+ if (size == 0)
+ {
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = ::pread(d, data, size, offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Check for EOF.
+ if (bytes == 0)
+ {
+ ec = asio::error::eof;
+ return 0;
+ }
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for descriptor to become ready.
+ if (descriptor_ops::poll_read(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+bool non_blocking_read_at(int d, uint64_t offset, buf* bufs, std::size_t count,
+ asio::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Read some data.
+ signed_size_type bytes = ::preadv(d, bufs, static_cast<int>(count), offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check for EOF.
+ if (bytes == 0)
+ {
+ ec = asio::error::eof;
+ return true;
+ }
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+bool non_blocking_read_at1(int d, uint64_t offset, void* data, std::size_t size,
+ asio::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Read some data.
+ signed_size_type bytes = ::pread(d, data, size, offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check for EOF.
+ if (bytes == 0)
+ {
+ ec = asio::error::eof;
+ return true;
+ }
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+std::size_t sync_write_at(int d, state_type state, uint64_t offset,
+ const buf* bufs, std::size_t count, bool all_empty,
+ asio::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to write 0 bytes on a stream is a no-op.
+ if (all_empty)
+ {
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Write some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = ::pwritev(d,
+ bufs, static_cast<int>(count), offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for descriptor to become ready.
+ if (descriptor_ops::poll_write(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+std::size_t sync_write_at1(int d, state_type state, uint64_t offset,
+ const void* data, std::size_t size, asio::error_code& ec)
+{
+ if (d == -1)
+ {
+ ec = asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to write 0 bytes on a stream is a no-op.
+ if (size == 0)
+ {
+ asio::error::clear(ec);
+ return 0;
+ }
+
+ // Write some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = ::pwrite(d, data, size, offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != asio::error::would_block
+ && ec != asio::error::try_again))
+ return 0;
+
+ // Wait for descriptor to become ready.
+ if (descriptor_ops::poll_write(d, 0, ec) < 0)
+ return 0;
+ }
+}
+
+bool non_blocking_write_at(int d, uint64_t offset,
+ const buf* bufs, std::size_t count,
+ asio::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Write some data.
+ signed_size_type bytes = ::pwritev(d,
+ bufs, static_cast<int>(count), offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+bool non_blocking_write_at1(int d, uint64_t offset,
+ const void* data, std::size_t size,
+ asio::error_code& ec, std::size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Write some data.
+ signed_size_type bytes = ::pwrite(d, data, size, offset);
+ get_last_error(ec, bytes < 0);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ {
+ bytes_transferred = bytes;
+ return true;
+ }
+
+ // Retry operation if interrupted by signal.
+ if (ec == asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == asio::error::would_block
+ || ec == asio::error::try_again)
+ return false;
+
+ // Operation failed.
+ bytes_transferred = 0;
+ return true;
+ }
+}
+
+#endif // defined(ASIO_HAS_FILE)
+
int ioctl(int d, state_type& state, long cmd,
ioctl_arg_type* arg, asio::error_code& ec)
{
diff --git a/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.hpp b/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.hpp
index f9babbb53a6..b483e44fd1c 100644
--- a/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/dev_poll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -27,7 +27,7 @@ namespace asio {
namespace detail {
inline void dev_poll_reactor::post_immediate_completion(
- reactor_op* op, bool is_continuation)
+ operation* op, bool is_continuation) const
{
scheduler_.post_immediate_completion(op, is_continuation);
}
@@ -77,6 +77,18 @@ std::size_t dev_poll_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
}
template <typename Time_Traits>
+void dev_poll_reactor::cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key)
+{
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer_by_key(timer, ops, cancellation_key);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+template <typename Time_Traits>
void dev_poll_reactor::move_timer(timer_queue<Time_Traits>& queue,
typename timer_queue<Time_Traits>::per_timer_data& target,
typename timer_queue<Time_Traits>::per_timer_data& source)
diff --git a/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.ipp b/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.ipp
index 42efcd624aa..c9c53fbeafd 100644
--- a/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/dev_poll_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/dev_poll_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -148,15 +148,24 @@ void dev_poll_reactor::move_descriptor(socket_type,
{
}
+void dev_poll_reactor::call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self)
+{
+ static_cast<const dev_poll_reactor*>(self)->post_immediate_completion(
+ op, is_continuation);
+}
+
void dev_poll_reactor::start_op(int op_type, socket_type descriptor,
dev_poll_reactor::per_descriptor_data&, reactor_op* op,
- bool is_continuation, bool allow_speculative)
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg)
{
asio::detail::mutex::scoped_lock lock(mutex_);
if (shutdown_)
{
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -169,7 +178,7 @@ void dev_poll_reactor::start_op(int op_type, socket_type descriptor,
if (op->perform())
{
lock.unlock();
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
}
diff --git a/3rdparty/asio/include/asio/detail/impl/epoll_reactor.hpp b/3rdparty/asio/include/asio/detail/impl/epoll_reactor.hpp
index 3055085f4a3..4fffeb75924 100644
--- a/3rdparty/asio/include/asio/detail/impl/epoll_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/epoll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/epoll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -25,7 +25,7 @@ namespace asio {
namespace detail {
inline void epoll_reactor::post_immediate_completion(
- operation* op, bool is_continuation)
+ operation* op, bool is_continuation) const
{
scheduler_.post_immediate_completion(op, is_continuation);
}
diff --git a/3rdparty/asio/include/asio/detail/impl/epoll_reactor.ipp b/3rdparty/asio/include/asio/detail/impl/epoll_reactor.ipp
index 79ec5410767..51795bda40c 100644
--- a/3rdparty/asio/include/asio/detail/impl/epoll_reactor.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/epoll_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/epoll_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -229,14 +229,23 @@ void epoll_reactor::move_descriptor(socket_type,
source_descriptor_data = 0;
}
+void epoll_reactor::call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self)
+{
+ static_cast<const epoll_reactor*>(self)->post_immediate_completion(
+ op, is_continuation);
+}
+
void epoll_reactor::start_op(int op_type, socket_type descriptor,
epoll_reactor::per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative)
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg)
{
if (!descriptor_data)
{
op->ec_ = asio::error::bad_descriptor;
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -244,7 +253,7 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor,
if (descriptor_data->shutdown_)
{
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -262,7 +271,7 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor,
if (descriptor_data->registered_events_ != 0)
descriptor_data->try_speculative_[op_type] = false;
descriptor_lock.unlock();
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
}
@@ -270,7 +279,7 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor,
if (descriptor_data->registered_events_ == 0)
{
op->ec_ = asio::error::operation_not_supported;
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -289,7 +298,7 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor,
{
op->ec_ = asio::error_code(errno,
asio::error::get_system_category());
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
}
@@ -298,7 +307,7 @@ void epoll_reactor::start_op(int op_type, socket_type descriptor,
else if (descriptor_data->registered_events_ == 0)
{
op->ec_ = asio::error::operation_not_supported;
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
else
diff --git a/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp b/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
index 8ed61f8b7c9..2e970d8850b 100644
--- a/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp
@@ -2,7 +2,7 @@
// detail/impl/eventfd_select_interrupter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/detail/impl/handler_tracking.ipp b/3rdparty/asio/include/asio/detail/impl/handler_tracking.ipp
index 79a87df09b5..f4e3e3b501a 100644
--- a/3rdparty/asio/include/asio/detail/impl/handler_tracking.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/handler_tracking.ipp
@@ -2,7 +2,7 @@
// detail/impl/handler_tracking.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -29,7 +29,7 @@
#if defined(ASIO_HAS_BOOST_DATE_TIME)
# include "asio/time_traits.hpp"
-#elif defined(ASIO_HAS_CHRONO)
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
# include "asio/detail/chrono.hpp"
# include "asio/detail/chrono_time_traits.hpp"
# include "asio/wait_traits.hpp"
@@ -57,12 +57,12 @@ struct handler_tracking_timestamp
boost::posix_time::ptime epoch(boost::gregorian::date(1970, 1, 1));
boost::posix_time::time_duration now =
boost::posix_time::microsec_clock::universal_time() - epoch;
-#elif defined(ASIO_HAS_CHRONO)
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
typedef chrono_time_traits<chrono::system_clock,
- asio::wait_traits<chrono::system_clock> > traits_helper;
+ asio::wait_traits<chrono::system_clock>> traits_helper;
traits_helper::posix_time_duration now(
chrono::system_clock::now().time_since_epoch());
-#endif
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
seconds = static_cast<uint64_t>(now.total_seconds());
microseconds = static_cast<uint64_t>(now.total_microseconds() % 1000000);
}
@@ -365,7 +365,9 @@ void handler_tracking::write_line(const char* format, ...)
va_start(args, format);
char line[256] = "";
-#if defined(ASIO_HAS_SECURE_RTL)
+#if defined(ASIO_HAS_SNPRINTF)
+ int length = vsnprintf(line, sizeof(line), format, args);
+#elif defined(ASIO_HAS_SECURE_RTL)
int length = vsprintf_s(line, sizeof(line), format, args);
#else // defined(ASIO_HAS_SECURE_RTL)
int length = vsprintf(line, format, args);
diff --git a/3rdparty/asio/include/asio/detail/impl/io_uring_descriptor_service.ipp b/3rdparty/asio/include/asio/detail/impl/io_uring_descriptor_service.ipp
new file mode 100644
index 00000000000..21b9e232cfb
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/io_uring_descriptor_service.ipp
@@ -0,0 +1,205 @@
+//
+// detail/impl/io_uring_descriptor_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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 ASIO_DETAIL_IMPL_IO_URING_DESCRIPTOR_SERVICE_IPP
+#define ASIO_DETAIL_IMPL_IO_URING_DESCRIPTOR_SERVICE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/error.hpp"
+#include "asio/detail/io_uring_descriptor_service.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+io_uring_descriptor_service::io_uring_descriptor_service(
+ execution_context& context)
+ : execution_context_service_base<io_uring_descriptor_service>(context),
+ io_uring_service_(asio::use_service<io_uring_service>(context))
+{
+ io_uring_service_.init_task();
+}
+
+void io_uring_descriptor_service::shutdown()
+{
+}
+
+void io_uring_descriptor_service::construct(
+ io_uring_descriptor_service::implementation_type& impl)
+{
+ impl.descriptor_ = -1;
+ impl.state_ = 0;
+ impl.io_object_data_ = 0;
+}
+
+void io_uring_descriptor_service::move_construct(
+ io_uring_descriptor_service::implementation_type& impl,
+ io_uring_descriptor_service::implementation_type& other_impl)
+ noexcept
+{
+ impl.descriptor_ = other_impl.descriptor_;
+ other_impl.descriptor_ = -1;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ impl.io_object_data_ = other_impl.io_object_data_;
+ other_impl.io_object_data_ = 0;
+}
+
+void io_uring_descriptor_service::move_assign(
+ io_uring_descriptor_service::implementation_type& impl,
+ io_uring_descriptor_service& /*other_service*/,
+ io_uring_descriptor_service::implementation_type& other_impl)
+{
+ destroy(impl);
+
+ impl.descriptor_ = other_impl.descriptor_;
+ other_impl.descriptor_ = -1;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ impl.io_object_data_ = other_impl.io_object_data_;
+ other_impl.io_object_data_ = 0;
+}
+
+void io_uring_descriptor_service::destroy(
+ io_uring_descriptor_service::implementation_type& impl)
+{
+ if (is_open(impl))
+ {
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "descriptor", &impl, impl.descriptor_, "close"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ asio::error_code ignored_ec;
+ descriptor_ops::close(impl.descriptor_, impl.state_, ignored_ec);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ }
+}
+
+asio::error_code io_uring_descriptor_service::assign(
+ io_uring_descriptor_service::implementation_type& impl,
+ const native_handle_type& native_descriptor, asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ io_uring_service_.register_io_object(impl.io_object_data_);
+
+ impl.descriptor_ = native_descriptor;
+ impl.state_ = descriptor_ops::possible_dup;
+ ec = success_ec_;
+ return ec;
+}
+
+asio::error_code io_uring_descriptor_service::close(
+ io_uring_descriptor_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "descriptor", &impl, impl.descriptor_, "close"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ descriptor_ops::close(impl.descriptor_, impl.state_, ec);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ }
+ else
+ {
+ ec = success_ec_;
+ }
+
+ // The descriptor is closed by the OS even if close() returns an error.
+ //
+ // (Actually, POSIX says the state of the descriptor is unspecified. On
+ // Linux the descriptor is apparently closed anyway; e.g. see
+ // http://lkml.org/lkml/2005/9/10/129
+ construct(impl);
+
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+}
+
+io_uring_descriptor_service::native_handle_type
+io_uring_descriptor_service::release(
+ io_uring_descriptor_service::implementation_type& impl)
+{
+ native_handle_type descriptor = impl.descriptor_;
+
+ if (is_open(impl))
+ {
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "descriptor", &impl, impl.descriptor_, "release"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ construct(impl);
+ }
+
+ return descriptor;
+}
+
+asio::error_code io_uring_descriptor_service::cancel(
+ io_uring_descriptor_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = asio::error::bad_descriptor;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "descriptor", &impl, impl.descriptor_, "cancel"));
+
+ io_uring_service_.cancel_ops(impl.io_object_data_);
+ ec = success_ec_;
+ return ec;
+}
+
+void io_uring_descriptor_service::start_op(
+ io_uring_descriptor_service::implementation_type& impl,
+ int op_type, io_uring_operation* op, bool is_continuation, bool noop)
+{
+ if (!noop)
+ {
+ io_uring_service_.start_op(op_type,
+ impl.io_object_data_, op, is_continuation);
+ }
+ else
+ {
+ io_uring_service_.post_immediate_completion(op, is_continuation);
+ }
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IMPL_IO_URING_DESCRIPTOR_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/io_uring_file_service.ipp b/3rdparty/asio/include/asio/detail/impl/io_uring_file_service.ipp
new file mode 100644
index 00000000000..4742a7190d3
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/io_uring_file_service.ipp
@@ -0,0 +1,140 @@
+//
+// detail/impl/io_uring_file_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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 ASIO_DETAIL_IMPL_IO_URING_FILE_SERVICE_IPP
+#define ASIO_DETAIL_IMPL_IO_URING_FILE_SERVICE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ && defined(ASIO_HAS_IO_URING)
+
+#include <cstring>
+#include <sys/stat.h>
+#include "asio/detail/io_uring_file_service.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+io_uring_file_service::io_uring_file_service(
+ execution_context& context)
+ : execution_context_service_base<io_uring_file_service>(context),
+ descriptor_service_(context)
+{
+}
+
+void io_uring_file_service::shutdown()
+{
+ descriptor_service_.shutdown();
+}
+
+asio::error_code io_uring_file_service::open(
+ io_uring_file_service::implementation_type& impl,
+ const char* path, file_base::flags open_flags,
+ asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ descriptor_ops::state_type state = 0;
+ int fd = descriptor_ops::open(path, static_cast<int>(open_flags), 0777, ec);
+ if (fd < 0)
+ {
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // We're done. Take ownership of the serial port descriptor.
+ if (descriptor_service_.assign(impl, fd, ec))
+ {
+ asio::error_code ignored_ec;
+ descriptor_ops::close(fd, state, ignored_ec);
+ }
+
+ (void)::posix_fadvise(native_handle(impl), 0, 0,
+ impl.is_stream_ ? POSIX_FADV_SEQUENTIAL : POSIX_FADV_RANDOM);
+
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+}
+
+uint64_t io_uring_file_service::size(
+ const io_uring_file_service::implementation_type& impl,
+ asio::error_code& ec) const
+{
+ struct stat s;
+ int result = ::fstat(native_handle(impl), &s);
+ descriptor_ops::get_last_error(ec, result != 0);
+ ASIO_ERROR_LOCATION(ec);
+ return !ec ? s.st_size : 0;
+}
+
+asio::error_code io_uring_file_service::resize(
+ io_uring_file_service::implementation_type& impl,
+ uint64_t n, asio::error_code& ec)
+{
+ int result = ::ftruncate(native_handle(impl), n);
+ descriptor_ops::get_last_error(ec, result != 0);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+}
+
+asio::error_code io_uring_file_service::sync_all(
+ io_uring_file_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ int result = ::fsync(native_handle(impl));
+ descriptor_ops::get_last_error(ec, result != 0);
+ return ec;
+}
+
+asio::error_code io_uring_file_service::sync_data(
+ io_uring_file_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+#if defined(_POSIX_SYNCHRONIZED_IO)
+ int result = ::fdatasync(native_handle(impl));
+#else // defined(_POSIX_SYNCHRONIZED_IO)
+ int result = ::fsync(native_handle(impl));
+#endif // defined(_POSIX_SYNCHRONIZED_IO)
+ descriptor_ops::get_last_error(ec, result != 0);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+}
+
+uint64_t io_uring_file_service::seek(
+ io_uring_file_service::implementation_type& impl, int64_t offset,
+ file_base::seek_basis whence, asio::error_code& ec)
+{
+ int64_t result = ::lseek(native_handle(impl), offset, whence);
+ descriptor_ops::get_last_error(ec, result < 0);
+ ASIO_ERROR_LOCATION(ec);
+ return !ec ? static_cast<uint64_t>(result) : 0;
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // && defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IMPL_IO_URING_FILE_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/io_uring_service.hpp b/3rdparty/asio/include/asio/detail/impl/io_uring_service.hpp
new file mode 100644
index 00000000000..8dfab1e6d1d
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/io_uring_service.hpp
@@ -0,0 +1,112 @@
+//
+// detail/impl/io_uring_service.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 ASIO_DETAIL_IMPL_IO_URING_SERVICE_HPP
+#define ASIO_DETAIL_IMPL_IO_URING_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/scheduler.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+inline void io_uring_service::post_immediate_completion(
+ operation* op, bool is_continuation)
+{
+ scheduler_.post_immediate_completion(op, is_continuation);
+}
+
+template <typename Time_Traits>
+void io_uring_service::add_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_add_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void io_uring_service::remove_timer_queue(timer_queue<Time_Traits>& queue)
+{
+ do_remove_timer_queue(queue);
+}
+
+template <typename Time_Traits>
+void io_uring_service::schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
+{
+ mutex::scoped_lock lock(mutex_);
+
+ if (shutdown_)
+ {
+ scheduler_.post_immediate_completion(op, false);
+ return;
+ }
+
+ bool earliest = queue.enqueue_timer(time, timer, op);
+ scheduler_.work_started();
+ if (earliest)
+ {
+ update_timeout();
+ post_submit_sqes_op(lock);
+ }
+}
+
+template <typename Time_Traits>
+std::size_t io_uring_service::cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+ return n;
+}
+
+template <typename Time_Traits>
+void io_uring_service::cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer_by_key(timer, ops, cancellation_key);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+template <typename Time_Traits>
+void io_uring_service::move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer(target, ops);
+ queue.move_timer(target, source);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IMPL_IO_URING_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/impl/io_uring_service.ipp b/3rdparty/asio/include/asio/detail/impl/io_uring_service.ipp
new file mode 100644
index 00000000000..740010cda11
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/io_uring_service.ipp
@@ -0,0 +1,914 @@
+//
+// detail/impl/io_uring_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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 ASIO_DETAIL_IMPL_IO_URING_SERVICE_IPP
+#define ASIO_DETAIL_IMPL_IO_URING_SERVICE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include <cstddef>
+#include <sys/eventfd.h>
+#include "asio/detail/io_uring_service.hpp"
+#include "asio/detail/reactor_op.hpp"
+#include "asio/detail/scheduler.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+io_uring_service::io_uring_service(asio::execution_context& ctx)
+ : execution_context_service_base<io_uring_service>(ctx),
+ scheduler_(use_service<scheduler>(ctx)),
+ mutex_(ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_REGISTRATION, scheduler_.concurrency_hint())),
+ outstanding_work_(0),
+ submit_sqes_op_(this),
+ pending_sqes_(0),
+ pending_submit_sqes_op_(false),
+ shutdown_(false),
+ timeout_(),
+ registration_mutex_(mutex_.enabled()),
+ reactor_(use_service<reactor>(ctx)),
+ reactor_data_(),
+ event_fd_(-1)
+{
+ reactor_.init_task();
+ init_ring();
+ register_with_reactor();
+}
+
+io_uring_service::~io_uring_service()
+{
+ if (ring_.ring_fd != -1)
+ ::io_uring_queue_exit(&ring_);
+ if (event_fd_ != -1)
+ ::close(event_fd_);
+}
+
+void io_uring_service::shutdown()
+{
+ mutex::scoped_lock lock(mutex_);
+ shutdown_ = true;
+ lock.unlock();
+
+ op_queue<operation> ops;
+
+ // Cancel all outstanding operations.
+ while (io_object* io_obj = registered_io_objects_.first())
+ {
+ for (int i = 0; i < max_ops; ++i)
+ {
+ if (!io_obj->queues_[i].op_queue_.empty())
+ {
+ ops.push(io_obj->queues_[i].op_queue_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ ::io_uring_prep_cancel(sqe, &io_obj->queues_[i], 0);
+ }
+ }
+ io_obj->shutdown_ = true;
+ registered_io_objects_.free(io_obj);
+ }
+
+ // Cancel the timeout operation.
+ if (::io_uring_sqe* sqe = get_sqe())
+ ::io_uring_prep_cancel(sqe, &timeout_, IOSQE_IO_DRAIN);
+ submit_sqes();
+
+ // Wait for all completions to come back.
+ for (; outstanding_work_ > 0; --outstanding_work_)
+ {
+ ::io_uring_cqe* cqe = 0;
+ if (::io_uring_wait_cqe(&ring_, &cqe) != 0)
+ break;
+ }
+
+ timer_queues_.get_all_timers(ops);
+
+ scheduler_.abandon_operations(ops);
+}
+
+void io_uring_service::notify_fork(
+ asio::execution_context::fork_event fork_ev)
+{
+ switch (fork_ev)
+ {
+ case asio::execution_context::fork_prepare:
+ {
+ // Cancel all outstanding operations. They will be restarted
+ // after the fork completes.
+ mutex::scoped_lock registration_lock(registration_mutex_);
+ for (io_object* io_obj = registered_io_objects_.first();
+ io_obj != 0; io_obj = io_obj->next_)
+ {
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+ for (int i = 0; i < max_ops; ++i)
+ {
+ if (!io_obj->queues_[i].op_queue_.empty()
+ && !io_obj->queues_[i].cancel_requested_)
+ {
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ ::io_uring_prep_cancel(sqe, &io_obj->queues_[i], 0);
+ }
+ }
+ }
+
+ // Cancel the timeout operation.
+ {
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ ::io_uring_prep_cancel(sqe, &timeout_, IOSQE_IO_DRAIN);
+ submit_sqes();
+ }
+
+ // Wait for all completions to come back, and post all completed I/O
+ // queues to the scheduler. Note that some operations may have already
+ // completed, or were explicitly cancelled. All others will be
+ // automatically restarted.
+ op_queue<operation> ops;
+ for (; outstanding_work_ > 0; --outstanding_work_)
+ {
+ ::io_uring_cqe* cqe = 0;
+ if (::io_uring_wait_cqe(&ring_, &cqe) != 0)
+ break;
+ if (void* ptr = ::io_uring_cqe_get_data(cqe))
+ {
+ if (ptr != this && ptr != &timer_queues_ && ptr != &timeout_)
+ {
+ io_queue* io_q = static_cast<io_queue*>(ptr);
+ io_q->set_result(cqe->res);
+ ops.push(io_q);
+ }
+ }
+ }
+ scheduler_.post_deferred_completions(ops);
+
+ // Restart and eventfd operation.
+ register_with_reactor();
+ }
+ break;
+
+ case asio::execution_context::fork_parent:
+ // Restart the timeout and eventfd operations.
+ update_timeout();
+ register_with_reactor();
+ break;
+
+ case asio::execution_context::fork_child:
+ {
+ // The child process gets a new io_uring instance.
+ ::io_uring_queue_exit(&ring_);
+ init_ring();
+ register_with_reactor();
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void io_uring_service::init_task()
+{
+ scheduler_.init_task();
+}
+
+void io_uring_service::register_io_object(
+ io_uring_service::per_io_object_data& io_obj)
+{
+ io_obj = allocate_io_object();
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+
+ io_obj->service_ = this;
+ io_obj->shutdown_ = false;
+ for (int i = 0; i < max_ops; ++i)
+ {
+ io_obj->queues_[i].io_object_ = io_obj;
+ io_obj->queues_[i].cancel_requested_ = false;
+ }
+}
+
+void io_uring_service::register_internal_io_object(
+ io_uring_service::per_io_object_data& io_obj,
+ int op_type, io_uring_operation* op)
+{
+ io_obj = allocate_io_object();
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+
+ io_obj->service_ = this;
+ io_obj->shutdown_ = false;
+ for (int i = 0; i < max_ops; ++i)
+ {
+ io_obj->queues_[i].io_object_ = io_obj;
+ io_obj->queues_[i].cancel_requested_ = false;
+ }
+
+ io_obj->queues_[op_type].op_queue_.push(op);
+ io_object_lock.unlock();
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ op->prepare(sqe);
+ ::io_uring_sqe_set_data(sqe, &io_obj->queues_[op_type]);
+ post_submit_sqes_op(lock);
+ }
+ else
+ {
+ asio::error_code ec(ENOBUFS,
+ asio::error::get_system_category());
+ asio::detail::throw_error(ec, "io_uring_get_sqe");
+ }
+}
+
+void io_uring_service::register_buffers(const ::iovec* v, unsigned n)
+{
+ int result = ::io_uring_register_buffers(&ring_, v, n);
+ if (result < 0)
+ {
+ asio::error_code ec(-result,
+ asio::error::get_system_category());
+ asio::detail::throw_error(ec, "io_uring_register_buffers");
+ }
+}
+
+void io_uring_service::unregister_buffers()
+{
+ (void)::io_uring_unregister_buffers(&ring_);
+}
+
+void io_uring_service::start_op(int op_type,
+ io_uring_service::per_io_object_data& io_obj,
+ io_uring_operation* op, bool is_continuation)
+{
+ if (!io_obj)
+ {
+ op->ec_ = asio::error::bad_descriptor;
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+
+ if (io_obj->shutdown_)
+ {
+ io_object_lock.unlock();
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ if (io_obj->queues_[op_type].op_queue_.empty())
+ {
+ if (op->perform(false))
+ {
+ io_object_lock.unlock();
+ scheduler_.post_immediate_completion(op, is_continuation);
+ }
+ else
+ {
+ io_obj->queues_[op_type].op_queue_.push(op);
+ io_object_lock.unlock();
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ op->prepare(sqe);
+ ::io_uring_sqe_set_data(sqe, &io_obj->queues_[op_type]);
+ scheduler_.work_started();
+ post_submit_sqes_op(lock);
+ }
+ else
+ {
+ lock.unlock();
+ io_obj->queues_[op_type].set_result(-ENOBUFS);
+ post_immediate_completion(&io_obj->queues_[op_type], is_continuation);
+ }
+ }
+ }
+ else
+ {
+ io_obj->queues_[op_type].op_queue_.push(op);
+ scheduler_.work_started();
+ }
+}
+
+void io_uring_service::cancel_ops(io_uring_service::per_io_object_data& io_obj)
+{
+ if (!io_obj)
+ return;
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+ op_queue<operation> ops;
+ do_cancel_ops(io_obj, ops);
+ io_object_lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
+void io_uring_service::cancel_ops_by_key(
+ io_uring_service::per_io_object_data& io_obj,
+ int op_type, void* cancellation_key)
+{
+ if (!io_obj)
+ return;
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+
+ bool first = true;
+ op_queue<operation> ops;
+ op_queue<io_uring_operation> other_ops;
+ while (io_uring_operation* op = io_obj->queues_[op_type].op_queue_.front())
+ {
+ io_obj->queues_[op_type].op_queue_.pop();
+ if (op->cancellation_key_ == cancellation_key)
+ {
+ if (first)
+ {
+ other_ops.push(op);
+ if (!io_obj->queues_[op_type].cancel_requested_)
+ {
+ io_obj->queues_[op_type].cancel_requested_ = true;
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ::io_uring_prep_cancel(sqe, &io_obj->queues_[op_type], 0);
+ submit_sqes();
+ }
+ }
+ }
+ else
+ {
+ op->ec_ = asio::error::operation_aborted;
+ ops.push(op);
+ }
+ }
+ else
+ other_ops.push(op);
+ first = false;
+ }
+ io_obj->queues_[op_type].op_queue_.push(other_ops);
+
+ io_object_lock.unlock();
+
+ scheduler_.post_deferred_completions(ops);
+}
+
+void io_uring_service::deregister_io_object(
+ io_uring_service::per_io_object_data& io_obj)
+{
+ if (!io_obj)
+ return;
+
+ mutex::scoped_lock io_object_lock(io_obj->mutex_);
+ if (!io_obj->shutdown_)
+ {
+ op_queue<operation> ops;
+ bool pending_cancelled_ops = do_cancel_ops(io_obj, ops);
+ io_obj->shutdown_ = true;
+ io_object_lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+ if (pending_cancelled_ops)
+ {
+ // There are still pending operations. Prevent cleanup_io_object from
+ // freeing the I/O object and let the last operation to complete free it.
+ io_obj = 0;
+ }
+ else
+ {
+ // Leave io_obj set so that it will be freed by the subsequent call to
+ // cleanup_io_object.
+ }
+ }
+ else
+ {
+ // We are shutting down, so prevent cleanup_io_object from freeing
+ // the I/O object and let the destructor free it instead.
+ io_obj = 0;
+ }
+}
+
+void io_uring_service::cleanup_io_object(
+ io_uring_service::per_io_object_data& io_obj)
+{
+ if (io_obj)
+ {
+ free_io_object(io_obj);
+ io_obj = 0;
+ }
+}
+
+void io_uring_service::run(long usec, op_queue<operation>& ops)
+{
+ __kernel_timespec ts;
+ int local_ops = 0;
+
+ if (usec > 0)
+ {
+ ts.tv_sec = usec / 1000000;
+ ts.tv_nsec = (usec % 1000000) * 1000;
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ++local_ops;
+ ::io_uring_prep_timeout(sqe, &ts, 0, 0);
+ ::io_uring_sqe_set_data(sqe, &ts);
+ submit_sqes();
+ }
+ }
+
+ ::io_uring_cqe* cqe = 0;
+ int result = (usec == 0)
+ ? ::io_uring_peek_cqe(&ring_, &cqe)
+ : ::io_uring_wait_cqe(&ring_, &cqe);
+
+ if (local_ops > 0)
+ {
+ if (result != 0 || ::io_uring_cqe_get_data(cqe) != &ts)
+ {
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ++local_ops;
+ ::io_uring_prep_timeout_remove(sqe, reinterpret_cast<__u64>(&ts), 0);
+ ::io_uring_sqe_set_data(sqe, &ts);
+ submit_sqes();
+ }
+ }
+ }
+
+ bool check_timers = false;
+ int count = 0;
+ while (result == 0 || local_ops > 0)
+ {
+ if (result == 0)
+ {
+ if (void* ptr = ::io_uring_cqe_get_data(cqe))
+ {
+ if (ptr == this)
+ {
+ // The io_uring service was interrupted.
+ }
+ else if (ptr == &timer_queues_)
+ {
+ check_timers = true;
+ }
+ else if (ptr == &timeout_)
+ {
+ check_timers = true;
+ timeout_.tv_sec = 0;
+ timeout_.tv_nsec = 0;
+ }
+ else if (ptr == &ts)
+ {
+ --local_ops;
+ }
+ else
+ {
+ io_queue* io_q = static_cast<io_queue*>(ptr);
+ io_q->set_result(cqe->res);
+ ops.push(io_q);
+ }
+ }
+ ::io_uring_cqe_seen(&ring_, cqe);
+ ++count;
+ }
+ result = (count < complete_batch_size || local_ops > 0)
+ ? ::io_uring_peek_cqe(&ring_, &cqe) : -EAGAIN;
+ }
+
+ decrement(outstanding_work_, count);
+
+ if (check_timers)
+ {
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.get_ready_timers(ops);
+ if (timeout_.tv_sec == 0 && timeout_.tv_nsec == 0)
+ {
+ timeout_ = get_timeout();
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ::io_uring_prep_timeout(sqe, &timeout_, 0, 0);
+ ::io_uring_sqe_set_data(sqe, &timeout_);
+ push_submit_sqes_op(ops);
+ }
+ }
+ }
+}
+
+void io_uring_service::interrupt()
+{
+ mutex::scoped_lock lock(mutex_);
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ::io_uring_prep_nop(sqe);
+ ::io_uring_sqe_set_data(sqe, this);
+ }
+ submit_sqes();
+}
+
+void io_uring_service::init_ring()
+{
+ int result = ::io_uring_queue_init(ring_size, &ring_, 0);
+ if (result < 0)
+ {
+ ring_.ring_fd = -1;
+ asio::error_code ec(-result,
+ asio::error::get_system_category());
+ asio::detail::throw_error(ec, "io_uring_queue_init");
+ }
+
+#if !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ event_fd_ = ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+ if (event_fd_ < 0)
+ {
+ asio::error_code ec(-result,
+ asio::error::get_system_category());
+ ::io_uring_queue_exit(&ring_);
+ asio::detail::throw_error(ec, "eventfd");
+ }
+
+ result = ::io_uring_register_eventfd(&ring_, event_fd_);
+ if (result < 0)
+ {
+ ::close(event_fd_);
+ ::io_uring_queue_exit(&ring_);
+ asio::error_code ec(-result,
+ asio::error::get_system_category());
+ asio::detail::throw_error(ec, "io_uring_queue_init");
+ }
+#endif // !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+}
+
+#if !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+class io_uring_service::event_fd_read_op :
+ public reactor_op
+{
+public:
+ event_fd_read_op(io_uring_service* s)
+ : reactor_op(asio::error_code(),
+ &event_fd_read_op::do_perform, event_fd_read_op::do_complete),
+ service_(s)
+ {
+ }
+
+ static status do_perform(reactor_op* base)
+ {
+ event_fd_read_op* o(static_cast<event_fd_read_op*>(base));
+
+ for (;;)
+ {
+ // Only perform one read. The kernel maintains an atomic counter.
+ uint64_t counter(0);
+ errno = 0;
+ int bytes_read = ::read(o->service_->event_fd_,
+ &counter, sizeof(uint64_t));
+ if (bytes_read < 0 && errno == EINTR)
+ continue;
+ break;
+ }
+
+ op_queue<operation> ops;
+ o->service_->run(0, ops);
+ o->service_->scheduler_.post_deferred_completions(ops);
+
+ return not_done;
+ }
+
+ static void do_complete(void* /*owner*/, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ event_fd_read_op* o(static_cast<event_fd_read_op*>(base));
+ delete o;
+ }
+
+private:
+ io_uring_service* service_;
+};
+#endif // !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
+void io_uring_service::register_with_reactor()
+{
+#if !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ reactor_.register_internal_descriptor(reactor::read_op,
+ event_fd_, reactor_data_, new event_fd_read_op(this));
+#endif // !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+}
+
+io_uring_service::io_object* io_uring_service::allocate_io_object()
+{
+ mutex::scoped_lock registration_lock(registration_mutex_);
+ return registered_io_objects_.alloc(
+ ASIO_CONCURRENCY_HINT_IS_LOCKING(
+ REACTOR_IO, scheduler_.concurrency_hint()));
+}
+
+void io_uring_service::free_io_object(io_uring_service::io_object* io_obj)
+{
+ mutex::scoped_lock registration_lock(registration_mutex_);
+ registered_io_objects_.free(io_obj);
+}
+
+bool io_uring_service::do_cancel_ops(
+ per_io_object_data& io_obj, op_queue<operation>& ops)
+{
+ bool cancel_op = false;
+
+ for (int i = 0; i < max_ops; ++i)
+ {
+ if (io_uring_operation* first_op = io_obj->queues_[i].op_queue_.front())
+ {
+ cancel_op = true;
+ io_obj->queues_[i].op_queue_.pop();
+ while (io_uring_operation* op = io_obj->queues_[i].op_queue_.front())
+ {
+ op->ec_ = asio::error::operation_aborted;
+ io_obj->queues_[i].op_queue_.pop();
+ ops.push(op);
+ }
+ io_obj->queues_[i].op_queue_.push(first_op);
+ }
+ }
+
+ if (cancel_op)
+ {
+ mutex::scoped_lock lock(mutex_);
+ for (int i = 0; i < max_ops; ++i)
+ {
+ if (!io_obj->queues_[i].op_queue_.empty()
+ && !io_obj->queues_[i].cancel_requested_)
+ {
+ io_obj->queues_[i].cancel_requested_ = true;
+ if (::io_uring_sqe* sqe = get_sqe())
+ ::io_uring_prep_cancel(sqe, &io_obj->queues_[i], 0);
+ }
+ }
+ submit_sqes();
+ }
+
+ return cancel_op;
+}
+
+void io_uring_service::do_add_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.insert(&queue);
+}
+
+void io_uring_service::do_remove_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.erase(&queue);
+}
+
+void io_uring_service::update_timeout()
+{
+ if (::io_uring_sqe* sqe = get_sqe())
+ {
+ ::io_uring_prep_timeout_remove(sqe, reinterpret_cast<__u64>(&timeout_), 0);
+ ::io_uring_sqe_set_data(sqe, &timer_queues_);
+ }
+}
+
+__kernel_timespec io_uring_service::get_timeout() const
+{
+ __kernel_timespec ts;
+ long usec = timer_queues_.wait_duration_usec(5 * 60 * 1000 * 1000);
+ ts.tv_sec = usec / 1000000;
+ ts.tv_nsec = usec ? (usec % 1000000) * 1000 : 1;
+ return ts;
+}
+
+::io_uring_sqe* io_uring_service::get_sqe()
+{
+ ::io_uring_sqe* sqe = ::io_uring_get_sqe(&ring_);
+ if (!sqe)
+ {
+ submit_sqes();
+ sqe = ::io_uring_get_sqe(&ring_);
+ }
+ if (sqe)
+ {
+ ::io_uring_sqe_set_data(sqe, 0);
+ ++pending_sqes_;
+ }
+ return sqe;
+}
+
+void io_uring_service::submit_sqes()
+{
+ if (pending_sqes_ != 0)
+ {
+ int result = ::io_uring_submit(&ring_);
+ if (result > 0)
+ {
+ pending_sqes_ -= result;
+ increment(outstanding_work_, result);
+ }
+ }
+}
+
+void io_uring_service::post_submit_sqes_op(mutex::scoped_lock& lock)
+{
+ if (pending_sqes_ >= submit_batch_size)
+ {
+ submit_sqes();
+ }
+ else if (pending_sqes_ != 0 && !pending_submit_sqes_op_)
+ {
+ pending_submit_sqes_op_ = true;
+ lock.unlock();
+ scheduler_.post_immediate_completion(&submit_sqes_op_, false);
+ }
+}
+
+void io_uring_service::push_submit_sqes_op(op_queue<operation>& ops)
+{
+ if (pending_sqes_ != 0 && !pending_submit_sqes_op_)
+ {
+ pending_submit_sqes_op_ = true;
+ ops.push(&submit_sqes_op_);
+ scheduler_.compensating_work_started();
+ }
+}
+
+io_uring_service::submit_sqes_op::submit_sqes_op(io_uring_service* s)
+ : operation(&io_uring_service::submit_sqes_op::do_complete),
+ service_(s)
+{
+}
+
+void io_uring_service::submit_sqes_op::do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/, std::size_t /*bytes_transferred*/)
+{
+ if (owner)
+ {
+ submit_sqes_op* o = static_cast<submit_sqes_op*>(base);
+ mutex::scoped_lock lock(o->service_->mutex_);
+ o->service_->submit_sqes();
+ if (o->service_->pending_sqes_ != 0)
+ o->service_->scheduler_.post_immediate_completion(o, true);
+ else
+ o->service_->pending_submit_sqes_op_ = false;
+ }
+}
+
+io_uring_service::io_queue::io_queue()
+ : operation(&io_uring_service::io_queue::do_complete)
+{
+}
+
+struct io_uring_service::perform_io_cleanup_on_block_exit
+{
+ explicit perform_io_cleanup_on_block_exit(io_uring_service* s)
+ : service_(s), io_object_to_free_(0), first_op_(0)
+ {
+ }
+
+ ~perform_io_cleanup_on_block_exit()
+ {
+ if (io_object_to_free_)
+ {
+ mutex::scoped_lock lock(service_->mutex_);
+ service_->free_io_object(io_object_to_free_);
+ }
+
+ if (first_op_)
+ {
+ // Post the remaining completed operations for invocation.
+ if (!ops_.empty())
+ service_->scheduler_.post_deferred_completions(ops_);
+
+ // A user-initiated operation has completed, but there's no need to
+ // explicitly call work_finished() here. Instead, we'll take advantage of
+ // the fact that the scheduler will call work_finished() once we return.
+ }
+ else
+ {
+ // No user-initiated operations have completed, so we need to compensate
+ // for the work_finished() call that the scheduler will make once this
+ // operation returns.
+ service_->scheduler_.compensating_work_started();
+ }
+ }
+
+ io_uring_service* service_;
+ io_object* io_object_to_free_;
+ op_queue<operation> ops_;
+ operation* first_op_;
+};
+
+operation* io_uring_service::io_queue::perform_io(int result)
+{
+ perform_io_cleanup_on_block_exit io_cleanup(io_object_->service_);
+ mutex::scoped_lock io_object_lock(io_object_->mutex_);
+
+ if (result != -ECANCELED || cancel_requested_)
+ {
+ if (io_uring_operation* op = op_queue_.front())
+ {
+ if (result < 0)
+ {
+ op->ec_.assign(-result, asio::error::get_system_category());
+ op->bytes_transferred_ = 0;
+ }
+ else
+ {
+ op->ec_.assign(0, op->ec_.category());
+ op->bytes_transferred_ = static_cast<std::size_t>(result);
+ }
+ }
+
+ while (io_uring_operation* op = op_queue_.front())
+ {
+ if (op->perform(io_cleanup.ops_.empty()))
+ {
+ op_queue_.pop();
+ io_cleanup.ops_.push(op);
+ }
+ else
+ break;
+ }
+ }
+
+ cancel_requested_ = false;
+
+ if (!op_queue_.empty())
+ {
+ io_uring_service* service = io_object_->service_;
+ mutex::scoped_lock lock(service->mutex_);
+ if (::io_uring_sqe* sqe = service->get_sqe())
+ {
+ op_queue_.front()->prepare(sqe);
+ ::io_uring_sqe_set_data(sqe, this);
+ service->post_submit_sqes_op(lock);
+ }
+ else
+ {
+ lock.unlock();
+ while (io_uring_operation* op = op_queue_.front())
+ {
+ op->ec_ = asio::error::no_buffer_space;
+ op_queue_.pop();
+ io_cleanup.ops_.push(op);
+ }
+ }
+ }
+
+ // The last operation to complete on a shut down object must free it.
+ if (io_object_->shutdown_)
+ {
+ io_cleanup.io_object_to_free_ = io_object_;
+ for (int i = 0; i < max_ops; ++i)
+ if (!io_object_->queues_[i].op_queue_.empty())
+ io_cleanup.io_object_to_free_ = 0;
+ }
+
+ // The first operation will be returned for completion now. The others will
+ // be posted for later by the io_cleanup object's destructor.
+ io_cleanup.first_op_ = io_cleanup.ops_.front();
+ io_cleanup.ops_.pop();
+ return io_cleanup.first_op_;
+}
+
+void io_uring_service::io_queue::do_complete(void* owner, operation* base,
+ const asio::error_code& ec, std::size_t bytes_transferred)
+{
+ if (owner)
+ {
+ io_queue* io_q = static_cast<io_queue*>(base);
+ int result = static_cast<int>(bytes_transferred);
+ if (operation* op = io_q->perform_io(result))
+ {
+ op->complete(owner, ec, 0);
+ }
+ }
+}
+
+io_uring_service::io_object::io_object(bool locking)
+ : mutex_(locking)
+{
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IMPL_IO_URING_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/io_uring_socket_service_base.ipp b/3rdparty/asio/include/asio/detail/impl/io_uring_socket_service_base.ipp
new file mode 100644
index 00000000000..79302fdc6f6
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/io_uring_socket_service_base.ipp
@@ -0,0 +1,249 @@
+//
+// detail/io_uring_socket_service_base.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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 ASIO_DETAIL_IMPL_IO_URING_SOCKET_SERVICE_BASE_IPP
+#define ASIO_DETAIL_IMPL_IO_URING_SOCKET_SERVICE_BASE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/io_uring_socket_service_base.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+io_uring_socket_service_base::io_uring_socket_service_base(
+ execution_context& context)
+ : io_uring_service_(asio::use_service<io_uring_service>(context))
+{
+ io_uring_service_.init_task();
+}
+
+void io_uring_socket_service_base::base_shutdown()
+{
+}
+
+void io_uring_socket_service_base::construct(
+ io_uring_socket_service_base::base_implementation_type& impl)
+{
+ impl.socket_ = invalid_socket;
+ impl.state_ = 0;
+ impl.io_object_data_ = 0;
+}
+
+void io_uring_socket_service_base::base_move_construct(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ io_uring_socket_service_base::base_implementation_type& other_impl)
+ noexcept
+{
+ impl.socket_ = other_impl.socket_;
+ other_impl.socket_ = invalid_socket;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ impl.io_object_data_ = other_impl.io_object_data_;
+ other_impl.io_object_data_ = 0;
+}
+
+void io_uring_socket_service_base::base_move_assign(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ io_uring_socket_service_base& /*other_service*/,
+ io_uring_socket_service_base::base_implementation_type& other_impl)
+{
+ destroy(impl);
+
+ impl.socket_ = other_impl.socket_;
+ other_impl.socket_ = invalid_socket;
+
+ impl.state_ = other_impl.state_;
+ other_impl.state_ = 0;
+
+ impl.io_object_data_ = other_impl.io_object_data_;
+ other_impl.io_object_data_ = 0;
+}
+
+void io_uring_socket_service_base::destroy(
+ io_uring_socket_service_base::base_implementation_type& impl)
+{
+ if (impl.socket_ != invalid_socket)
+ {
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "socket", &impl, impl.socket_, "close"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ asio::error_code ignored_ec;
+ socket_ops::close(impl.socket_, impl.state_, true, ignored_ec);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ }
+}
+
+asio::error_code io_uring_socket_service_base::close(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "socket", &impl, impl.socket_, "close"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ socket_ops::close(impl.socket_, impl.state_, false, ec);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ }
+ else
+ {
+ ec = success_ec_;
+ }
+
+ // The descriptor is closed by the OS even if close() returns an error.
+ //
+ // (Actually, POSIX says the state of the descriptor is unspecified. On
+ // Linux the descriptor is apparently closed anyway; e.g. see
+ // http://lkml.org/lkml/2005/9/10/129
+ construct(impl);
+
+ return ec;
+}
+
+socket_type io_uring_socket_service_base::release(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = asio::error::bad_descriptor;
+ return invalid_socket;
+ }
+
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "socket", &impl, impl.socket_, "release"));
+
+ io_uring_service_.deregister_io_object(impl.io_object_data_);
+ io_uring_service_.cleanup_io_object(impl.io_object_data_);
+ socket_type sock = impl.socket_;
+ construct(impl);
+ ec = success_ec_;
+ return sock;
+}
+
+asio::error_code io_uring_socket_service_base::cancel(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (!is_open(impl))
+ {
+ ec = asio::error::bad_descriptor;
+ return ec;
+ }
+
+ ASIO_HANDLER_OPERATION((io_uring_service_.context(),
+ "socket", &impl, impl.socket_, "cancel"));
+
+ io_uring_service_.cancel_ops(impl.io_object_data_);
+ ec = success_ec_;
+ return ec;
+}
+
+asio::error_code io_uring_socket_service_base::do_open(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ int af, int type, int protocol, asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = asio::error::already_open;
+ return ec;
+ }
+
+ socket_holder sock(socket_ops::socket(af, type, protocol, ec));
+ if (sock.get() == invalid_socket)
+ return ec;
+
+ io_uring_service_.register_io_object(impl.io_object_data_);
+
+ impl.socket_ = sock.release();
+ switch (type)
+ {
+ case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
+ case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
+ default: impl.state_ = 0; break;
+ }
+ ec = success_ec_;
+ return ec;
+}
+
+asio::error_code io_uring_socket_service_base::do_assign(
+ io_uring_socket_service_base::base_implementation_type& impl, int type,
+ const io_uring_socket_service_base::native_handle_type& native_socket,
+ asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = asio::error::already_open;
+ return ec;
+ }
+
+ io_uring_service_.register_io_object(impl.io_object_data_);
+
+ impl.socket_ = native_socket;
+ switch (type)
+ {
+ case SOCK_STREAM: impl.state_ = socket_ops::stream_oriented; break;
+ case SOCK_DGRAM: impl.state_ = socket_ops::datagram_oriented; break;
+ default: impl.state_ = 0; break;
+ }
+ impl.state_ |= socket_ops::possible_dup;
+ ec = success_ec_;
+ return ec;
+}
+
+void io_uring_socket_service_base::start_op(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ int op_type, io_uring_operation* op, bool is_continuation, bool noop)
+{
+ if (!noop)
+ {
+ io_uring_service_.start_op(op_type,
+ impl.io_object_data_, op, is_continuation);
+ }
+ else
+ {
+ io_uring_service_.post_immediate_completion(op, is_continuation);
+ }
+}
+
+void io_uring_socket_service_base::start_accept_op(
+ io_uring_socket_service_base::base_implementation_type& impl,
+ io_uring_operation* op, bool is_continuation, bool peer_is_open)
+{
+ if (!peer_is_open)
+ start_op(impl, io_uring_service::read_op, op, is_continuation, false);
+ else
+ {
+ op->ec_ = asio::error::already_open;
+ io_uring_service_.post_immediate_completion(op, is_continuation);
+ }
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IMPL_IO_URING_SOCKET_SERVICE_BASE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.hpp b/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.hpp
index 82584ae7914..3f79e9f7217 100644
--- a/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/kqueue_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2005 Stefan Arentz (stefan at soze dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -28,7 +28,7 @@ namespace asio {
namespace detail {
inline void kqueue_reactor::post_immediate_completion(
- operation* op, bool is_continuation)
+ operation* op, bool is_continuation) const
{
scheduler_.post_immediate_completion(op, is_continuation);
}
diff --git a/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.ipp b/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.ipp
index 60b5ca861ee..210a89dd49e 100644
--- a/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/kqueue_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/kqueue_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2005 Stefan Arentz (stefan at soze dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -190,14 +190,23 @@ void kqueue_reactor::move_descriptor(socket_type,
source_descriptor_data = 0;
}
+void kqueue_reactor::call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self)
+{
+ static_cast<const kqueue_reactor*>(self)->post_immediate_completion(
+ op, is_continuation);
+}
+
void kqueue_reactor::start_op(int op_type, socket_type descriptor,
kqueue_reactor::per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative)
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg)
{
if (!descriptor_data)
{
op->ec_ = asio::error::bad_descriptor;
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -205,7 +214,7 @@ void kqueue_reactor::start_op(int op_type, socket_type descriptor,
if (descriptor_data->shutdown_)
{
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -220,7 +229,7 @@ void kqueue_reactor::start_op(int op_type, socket_type descriptor,
if (op->perform())
{
descriptor_lock.unlock();
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -239,7 +248,7 @@ void kqueue_reactor::start_op(int op_type, socket_type descriptor,
{
op->ec_ = asio::error_code(errno,
asio::error::get_system_category());
- scheduler_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
}
diff --git a/3rdparty/asio/include/asio/detail/impl/null_event.ipp b/3rdparty/asio/include/asio/detail/impl/null_event.ipp
index 7b8f968fa0f..1c9f5684298 100644
--- a/3rdparty/asio/include/asio/detail/impl/null_event.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/null_event.ipp
@@ -2,7 +2,7 @@
// detail/impl/null_event.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/pipe_select_interrupter.ipp b/3rdparty/asio/include/asio/detail/impl/pipe_select_interrupter.ipp
index 31c1b5c9b30..75138312d9d 100644
--- a/3rdparty/asio/include/asio/detail/impl/pipe_select_interrupter.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/pipe_select_interrupter.ipp
@@ -2,7 +2,7 @@
// detail/impl/pipe_select_interrupter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/posix_event.ipp b/3rdparty/asio/include/asio/detail/impl/posix_event.ipp
index a823d8fbee8..76d5c468cbf 100644
--- a/3rdparty/asio/include/asio/detail/impl/posix_event.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/posix_event.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_event.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/posix_mutex.ipp b/3rdparty/asio/include/asio/detail/impl/posix_mutex.ipp
index c553ab4eef8..5fd832f9821 100644
--- a/3rdparty/asio/include/asio/detail/impl/posix_mutex.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/posix_mutex.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_mutex.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/reactive_serial_port_service.ipp b/3rdparty/asio/include/asio/detail/impl/posix_serial_port_service.ipp
index 23515a96c18..98ed5822877 100644
--- a/3rdparty/asio/include/asio/detail/impl/reactive_serial_port_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/posix_serial_port_service.ipp
@@ -1,16 +1,16 @@
//
-// detail/impl/reactive_serial_port_service.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// detail/impl/posix_serial_port_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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 ASIO_DETAIL_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
-#define ASIO_DETAIL_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
+#ifndef ASIO_DETAIL_IMPL_POSIX_SERIAL_PORT_SERVICE_IPP
+#define ASIO_DETAIL_IMPL_POSIX_SERIAL_PORT_SERVICE_IPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
@@ -22,32 +22,33 @@
#if !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
#include <cstring>
-#include "asio/detail/reactive_serial_port_service.hpp"
+#include "asio/detail/posix_serial_port_service.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
-reactive_serial_port_service::reactive_serial_port_service(
+posix_serial_port_service::posix_serial_port_service(
execution_context& context)
- : execution_context_service_base<reactive_serial_port_service>(context),
+ : execution_context_service_base<posix_serial_port_service>(context),
descriptor_service_(context)
{
}
-void reactive_serial_port_service::shutdown()
+void posix_serial_port_service::shutdown()
{
descriptor_service_.shutdown();
}
-asio::error_code reactive_serial_port_service::open(
- reactive_serial_port_service::implementation_type& impl,
+asio::error_code posix_serial_port_service::open(
+ posix_serial_port_service::implementation_type& impl,
const std::string& device, asio::error_code& ec)
{
if (is_open(impl))
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -55,7 +56,10 @@ asio::error_code reactive_serial_port_service::open(
int fd = descriptor_ops::open(device.c_str(),
O_RDWR | O_NONBLOCK | O_NOCTTY, ec);
if (fd < 0)
+ {
+ ASIO_ERROR_LOCATION(ec);
return ec;
+ }
int s = descriptor_ops::fcntl(fd, F_GETFL, ec);
if (s >= 0)
@@ -64,6 +68,7 @@ asio::error_code reactive_serial_port_service::open(
{
asio::error_code ignored_ec;
descriptor_ops::close(fd, state, ignored_ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -92,6 +97,7 @@ asio::error_code reactive_serial_port_service::open(
{
asio::error_code ignored_ec;
descriptor_ops::close(fd, state, ignored_ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -102,40 +108,53 @@ asio::error_code reactive_serial_port_service::open(
descriptor_ops::close(fd, state, ignored_ec);
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
-asio::error_code reactive_serial_port_service::do_set_option(
- reactive_serial_port_service::implementation_type& impl,
- reactive_serial_port_service::store_function_type store,
+asio::error_code posix_serial_port_service::do_set_option(
+ posix_serial_port_service::implementation_type& impl,
+ posix_serial_port_service::store_function_type store,
const void* option, asio::error_code& ec)
{
termios ios;
int s = ::tcgetattr(descriptor_service_.native_handle(impl), &ios);
descriptor_ops::get_last_error(ec, s < 0);
if (s < 0)
+ {
+ ASIO_ERROR_LOCATION(ec);
return ec;
+ }
if (store(option, ios, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return ec;
+ }
s = ::tcsetattr(descriptor_service_.native_handle(impl), TCSANOW, &ios);
descriptor_ops::get_last_error(ec, s < 0);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
-asio::error_code reactive_serial_port_service::do_get_option(
- const reactive_serial_port_service::implementation_type& impl,
- reactive_serial_port_service::load_function_type load,
+asio::error_code posix_serial_port_service::do_get_option(
+ const posix_serial_port_service::implementation_type& impl,
+ posix_serial_port_service::load_function_type load,
void* option, asio::error_code& ec) const
{
termios ios;
int s = ::tcgetattr(descriptor_service_.native_handle(impl), &ios);
descriptor_ops::get_last_error(ec, s < 0);
if (s < 0)
+ {
+ ASIO_ERROR_LOCATION(ec);
return ec;
+ }
- return load(option, ios, ec);
+ load(option, ios, ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
}
} // namespace detail
@@ -146,4 +165,4 @@ asio::error_code reactive_serial_port_service::do_get_option(
#endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
#endif // defined(ASIO_HAS_SERIAL_PORT)
-#endif // ASIO_DETAIL_IMPL_REACTIVE_SERIAL_PORT_SERVICE_IPP
+#endif // ASIO_DETAIL_IMPL_POSIX_SERIAL_PORT_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/posix_thread.ipp b/3rdparty/asio/include/asio/detail/impl/posix_thread.ipp
index 94373ee0287..7602377336e 100644
--- a/3rdparty/asio/include/asio/detail/impl/posix_thread.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/posix_thread.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_thread.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/posix_tss_ptr.ipp b/3rdparty/asio/include/asio/detail/impl/posix_tss_ptr.ipp
index 6a368e0ffd1..099274b2779 100644
--- a/3rdparty/asio/include/asio/detail/impl/posix_tss_ptr.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/posix_tss_ptr.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_tss_ptr.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/reactive_descriptor_service.ipp b/3rdparty/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
index 9caf06877d7..829aefb01bf 100644
--- a/3rdparty/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/reactive_descriptor_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,7 +19,8 @@
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
+ && !defined(__CYGWIN__) \
+ && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/error.hpp"
#include "asio/detail/reactive_descriptor_service.hpp"
@@ -46,12 +47,13 @@ void reactive_descriptor_service::construct(
{
impl.descriptor_ = -1;
impl.state_ = 0;
+ impl.reactor_data_ = reactor::per_descriptor_data();
}
void reactive_descriptor_service::move_construct(
reactive_descriptor_service::implementation_type& impl,
reactive_descriptor_service::implementation_type& other_impl)
- ASIO_NOEXCEPT
+ noexcept
{
impl.descriptor_ = other_impl.descriptor_;
other_impl.descriptor_ = -1;
@@ -105,6 +107,7 @@ asio::error_code reactive_descriptor_service::assign(
if (is_open(impl))
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -113,6 +116,7 @@ asio::error_code reactive_descriptor_service::assign(
{
ec = asio::error_code(err,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -151,6 +155,7 @@ asio::error_code reactive_descriptor_service::close(
// We'll just have to assume that other OSes follow the same behaviour.)
construct(impl);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -180,6 +185,7 @@ asio::error_code reactive_descriptor_service::cancel(
if (!is_open(impl))
{
ec = asio::error::bad_descriptor;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -191,10 +197,10 @@ asio::error_code reactive_descriptor_service::cancel(
return ec;
}
-void reactive_descriptor_service::start_op(
- reactive_descriptor_service::implementation_type& impl,
- int op_type, reactor_op* op, bool is_continuation,
- bool is_non_blocking, bool noop)
+void reactive_descriptor_service::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)
{
if (!noop)
{
@@ -202,13 +208,13 @@ void reactive_descriptor_service::start_op(
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, is_non_blocking);
+ reactor_.start_op(op_type, impl.descriptor_, impl.reactor_data_, op,
+ is_continuation, is_non_blocking, on_immediate, immediate_arg);
return;
}
}
- reactor_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
}
} // namespace detail
@@ -219,5 +225,6 @@ void reactive_descriptor_service::start_op(
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
+ // && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_IMPL_REACTIVE_DESCRIPTOR_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/reactive_socket_service_base.ipp b/3rdparty/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
index afda16f3520..a02001b421f 100644
--- a/3rdparty/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
@@ -2,7 +2,7 @@
// detail/reactive_socket_service_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,7 +18,8 @@
#include "asio/detail/config.hpp"
#if !defined(ASIO_HAS_IOCP) \
- && !defined(ASIO_WINDOWS_RUNTIME)
+ && !defined(ASIO_WINDOWS_RUNTIME) \
+ && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/detail/reactive_socket_service_base.hpp"
@@ -43,12 +44,13 @@ void reactive_socket_service_base::construct(
{
impl.socket_ = invalid_socket;
impl.state_ = 0;
+ impl.reactor_data_ = reactor::per_descriptor_data();
}
void reactive_socket_service_base::base_move_construct(
reactive_socket_service_base::base_implementation_type& impl,
reactive_socket_service_base::base_implementation_type& other_impl)
- ASIO_NOEXCEPT
+ noexcept
{
impl.socket_ = other_impl.socket_;
other_impl.socket_ = invalid_socket;
@@ -231,10 +233,11 @@ asio::error_code reactive_socket_service_base::do_assign(
return ec;
}
-void reactive_socket_service_base::start_op(
- reactive_socket_service_base::base_implementation_type& impl,
- int op_type, reactor_op* op, bool is_continuation,
- bool is_non_blocking, bool noop)
+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 is_non_blocking, bool noop,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg)
{
if (!noop)
{
@@ -242,32 +245,38 @@ void reactive_socket_service_base::start_op(
|| 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, is_non_blocking);
+ reactor_.start_op(op_type, impl.socket_, impl.reactor_data_, op,
+ is_continuation, is_non_blocking, on_immediate, immediate_arg);
return;
}
}
- reactor_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
}
-void reactive_socket_service_base::start_accept_op(
+void reactive_socket_service_base::do_start_accept_op(
reactive_socket_service_base::base_implementation_type& impl,
- reactor_op* op, bool is_continuation, bool peer_is_open)
+ reactor_op* op, bool is_continuation, bool peer_is_open,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg)
{
if (!peer_is_open)
- start_op(impl, reactor::read_op, op, is_continuation, true, false);
+ {
+ do_start_op(impl, reactor::read_op, op, is_continuation,
+ true, false, on_immediate, immediate_arg);
+ }
else
{
op->ec_ = asio::error::already_open;
- reactor_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
}
}
-void reactive_socket_service_base::start_connect_op(
+void reactive_socket_service_base::do_start_connect_op(
reactive_socket_service_base::base_implementation_type& impl,
- reactor_op* op, bool is_continuation,
- const socket_addr_type* addr, size_t addrlen)
+ reactor_op* op, bool is_continuation, const void* addr, size_t addrlen,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg)
{
if ((impl.state_ & socket_ops::non_blocking)
|| socket_ops::set_internal_non_blocking(
@@ -279,14 +288,14 @@ void reactive_socket_service_base::start_connect_op(
|| op->ec_ == asio::error::would_block)
{
op->ec_ = asio::error_code();
- reactor_.start_op(reactor::connect_op, impl.socket_,
- impl.reactor_data_, op, is_continuation, false);
+ reactor_.start_op(reactor::connect_op, impl.socket_, impl.reactor_data_,
+ op, is_continuation, false, on_immediate, immediate_arg);
return;
}
}
}
- reactor_.post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
}
} // namespace detail
@@ -296,5 +305,6 @@ void reactive_socket_service_base::start_connect_op(
#endif // !defined(ASIO_HAS_IOCP)
// && !defined(ASIO_WINDOWS_RUNTIME)
+ // && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_IMPL_REACTIVE_SOCKET_SERVICE_BASE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/resolver_service_base.ipp b/3rdparty/asio/include/asio/detail/impl/resolver_service_base.ipp
index bd1b0bc0296..8d9e944ddde 100644
--- a/3rdparty/asio/include/asio/detail/impl/resolver_service_base.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/resolver_service_base.ipp
@@ -2,7 +2,7 @@
// detail/impl/resolver_service_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -105,14 +105,14 @@ void resolver_service_base::destroy(
void resolver_service_base::move_construct(implementation_type& impl,
implementation_type& other_impl)
{
- impl = ASIO_MOVE_CAST(implementation_type)(other_impl);
+ impl = static_cast<implementation_type&&>(other_impl);
}
void resolver_service_base::move_assign(implementation_type& impl,
resolver_service_base&, implementation_type& other_impl)
{
destroy(impl);
- impl = ASIO_MOVE_CAST(implementation_type)(other_impl);
+ impl = static_cast<implementation_type&&>(other_impl);
}
void resolver_service_base::cancel(
diff --git a/3rdparty/asio/include/asio/detail/impl/scheduler.ipp b/3rdparty/asio/include/asio/detail/impl/scheduler.ipp
index 0734fc8e832..eccc80322d1 100644
--- a/3rdparty/asio/include/asio/detail/impl/scheduler.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/scheduler.ipp
@@ -2,7 +2,7 @@
// detail/impl/scheduler.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,11 +20,16 @@
#include "asio/detail/concurrency_hint.hpp"
#include "asio/detail/event.hpp"
#include "asio/detail/limits.hpp"
-#include "asio/detail/reactor.hpp"
#include "asio/detail/scheduler.hpp"
#include "asio/detail/scheduler_thread_info.hpp"
#include "asio/detail/signal_blocker.hpp"
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_service.hpp"
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/reactor.hpp"
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -104,7 +109,7 @@ struct scheduler::work_cleanup
};
scheduler::scheduler(asio::execution_context& ctx,
- int concurrency_hint, bool own_thread)
+ int concurrency_hint, bool own_thread, get_task_func_type get_task)
: asio::detail::execution_context_service_base<scheduler>(ctx),
one_thread_(concurrency_hint == 1
|| !ASIO_CONCURRENCY_HINT_IS_LOCKING(
@@ -114,6 +119,7 @@ scheduler::scheduler(asio::execution_context& ctx,
mutex_(ASIO_CONCURRENCY_HINT_IS_LOCKING(
SCHEDULER, concurrency_hint)),
task_(0),
+ get_task_(get_task),
task_interrupted_(true),
outstanding_work_(0),
stopped_(false),
@@ -178,7 +184,7 @@ void scheduler::init_task()
mutex::scoped_lock lock(mutex_);
if (!shutdown_ && !task_)
{
- task_ = &use_service<reactor>(this->context());
+ task_ = get_task_(this->context());
op_queue_.push(&task_operation_);
wake_one_thread_and_unlock(lock);
}
@@ -321,6 +327,7 @@ void scheduler::restart()
void scheduler::compensating_work_started()
{
thread_info_base* this_thread = thread_call_stack::contains(this);
+ ASIO_ASSUME(this_thread != 0); // Only called from inside scheduler.
++static_cast<thread_info*>(this_thread)->private_outstanding_work;
}
@@ -651,6 +658,15 @@ void scheduler::wake_one_thread_and_unlock(
}
}
+scheduler_task* scheduler::get_default_task(asio::execution_context& ctx)
+{
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ return &use_service<io_uring_service>(ctx);
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ return &use_service<reactor>(ctx);
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+}
+
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/impl/select_reactor.hpp b/3rdparty/asio/include/asio/detail/impl/select_reactor.hpp
index c0499618bb6..933b02cddc5 100644
--- a/3rdparty/asio/include/asio/detail/impl/select_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/select_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/select_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -35,7 +35,7 @@ namespace asio {
namespace detail {
inline void select_reactor::post_immediate_completion(
- reactor_op* op, bool is_continuation)
+ operation* op, bool is_continuation) const
{
scheduler_.post_immediate_completion(op, is_continuation);
}
diff --git a/3rdparty/asio/include/asio/detail/impl/select_reactor.ipp b/3rdparty/asio/include/asio/detail/impl/select_reactor.ipp
index f7d64731de7..5e5946bb84b 100644
--- a/3rdparty/asio/include/asio/detail/impl/select_reactor.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/select_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/select_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -66,6 +66,7 @@ select_reactor::select_reactor(asio::execution_context& ctx)
#if defined(ASIO_HAS_IOCP)
stop_thread_(false),
thread_(0),
+ restart_reactor_(this),
#endif // defined(ASIO_HAS_IOCP)
shutdown_(false)
{
@@ -113,8 +114,12 @@ void select_reactor::shutdown()
void select_reactor::notify_fork(
asio::execution_context::fork_event fork_ev)
{
+#if defined(ASIO_HAS_IOCP)
+ (void)fork_ev;
+#else // defined(ASIO_HAS_IOCP)
if (fork_ev == asio::execution_context::fork_child)
interrupter_.recreate();
+#endif // defined(ASIO_HAS_IOCP)
}
void select_reactor::init_task()
@@ -146,15 +151,23 @@ void select_reactor::move_descriptor(socket_type,
{
}
+void select_reactor::call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self)
+{
+ static_cast<const select_reactor*>(self)->post_immediate_completion(
+ op, is_continuation);
+}
+
void select_reactor::start_op(int op_type, socket_type descriptor,
- select_reactor::per_descriptor_data&, reactor_op* op,
- bool is_continuation, bool)
+ select_reactor::per_descriptor_data&, reactor_op* op, bool is_continuation,
+ bool, void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg)
{
asio::detail::mutex::scoped_lock lock(mutex_);
if (shutdown_)
{
- post_immediate_completion(op, is_continuation);
+ on_immediate(op, is_continuation, immediate_arg);
return;
}
@@ -262,7 +275,12 @@ void select_reactor::run(long usec, op_queue<operation>& ops)
if (!interrupter_.reset())
{
lock.lock();
+#if defined(ASIO_HAS_IOCP)
+ stop_thread_ = true;
+ scheduler_.post_immediate_completion(&restart_reactor_, false);
+#else // defined(ASIO_HAS_IOCP)
interrupter_.recreate();
+#endif // defined(ASIO_HAS_IOCP)
}
--retval;
}
@@ -299,11 +317,36 @@ void select_reactor::run_thread()
{
lock.unlock();
op_queue<operation> ops;
- run(true, ops);
+ run(-1, ops);
scheduler_.post_deferred_completions(ops);
lock.lock();
}
}
+
+void select_reactor::restart_reactor::do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/, std::size_t /*bytes_transferred*/)
+{
+ if (owner)
+ {
+ select_reactor* reactor = static_cast<restart_reactor*>(base)->reactor_;
+
+ if (reactor->thread_)
+ {
+ reactor->thread_->join();
+ delete reactor->thread_;
+ reactor->thread_ = 0;
+ }
+
+ asio::detail::mutex::scoped_lock lock(reactor->mutex_);
+ reactor->interrupter_.recreate();
+ reactor->stop_thread_ = false;
+ lock.unlock();
+
+ asio::detail::signal_blocker sb;
+ reactor->thread_ =
+ new asio::detail::thread(thread_function(reactor));
+ }
+}
#endif // defined(ASIO_HAS_IOCP)
void select_reactor::do_add_timer_queue(timer_queue_base& queue)
diff --git a/3rdparty/asio/include/asio/detail/impl/service_registry.hpp b/3rdparty/asio/include/asio/detail/impl/service_registry.hpp
index 8b9566e103a..2490636c0ad 100644
--- a/3rdparty/asio/include/asio/detail/impl/service_registry.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/service_registry.hpp
@@ -2,7 +2,7 @@
// detail/impl/service_registry.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -64,8 +64,7 @@ inline void service_registry::init_key(
#if !defined(ASIO_NO_TYPEID)
template <typename Service>
void service_registry::init_key(execution_context::service::key& key,
- typename enable_if<
- is_base_of<typename Service::key_type, Service>::value>::type*)
+ enable_if_t<is_base_of<typename Service::key_type, Service>::value>*)
{
key.type_info_ = &typeid(typeid_wrapper<Service>);
key.id_ = 0;
diff --git a/3rdparty/asio/include/asio/detail/impl/service_registry.ipp b/3rdparty/asio/include/asio/detail/impl/service_registry.ipp
index 363a56fb82f..b0133421d25 100644
--- a/3rdparty/asio/include/asio/detail/impl/service_registry.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/service_registry.ipp
@@ -2,7 +2,7 @@
// detail/impl/service_registry.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/signal_set_service.ipp b/3rdparty/asio/include/asio/detail/impl/signal_set_service.ipp
index b657d0e580f..7f6be8b71a9 100644
--- a/3rdparty/asio/include/asio/detail/impl/signal_set_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/signal_set_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/signal_set_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,12 +19,17 @@
#include <cstring>
#include <stdexcept>
-#include "asio/detail/reactor.hpp"
#include "asio/detail/signal_blocker.hpp"
#include "asio/detail/signal_set_service.hpp"
#include "asio/detail/static_mutex.hpp"
#include "asio/detail/throw_exception.hpp"
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_service.hpp"
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/reactor.hpp"
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -49,12 +54,16 @@ struct signal_state
// A count of the number of objects that are registered for each signal.
std::size_t registration_count_[max_signal_number];
+
+ // The flags used for each registered signal.
+ signal_set_base::flags_t flags_[max_signal_number];
};
signal_state* get_signal_state()
{
static signal_state state = {
- ASIO_STATIC_MUTEX_INIT, -1, -1, false, 0, { 0 } };
+ ASIO_STATIC_MUTEX_INIT, -1, -1, false, 0,
+ { 0 }, { signal_set_base::flags_t() } };
return &state;
}
@@ -85,9 +94,42 @@ void asio_signal_handler(int signal_number)
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
&& !defined(__CYGWIN__)
-class signal_set_service::pipe_read_op : public reactor_op
+class signal_set_service::pipe_read_op :
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ public io_uring_operation
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ public reactor_op
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
{
public:
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ pipe_read_op()
+ : io_uring_operation(asio::error_code(), &pipe_read_op::do_prepare,
+ &pipe_read_op::do_perform, pipe_read_op::do_complete)
+ {
+ }
+
+ static void do_prepare(io_uring_operation*, ::io_uring_sqe* sqe)
+ {
+ signal_state* state = get_signal_state();
+
+ int fd = state->read_descriptor_;
+ ::io_uring_prep_poll_add(sqe, fd, POLLIN);
+ }
+
+ static bool do_perform(io_uring_operation*, bool)
+ {
+ signal_state* state = get_signal_state();
+
+ int fd = state->read_descriptor_;
+ int signal_number = 0;
+ while (::read(fd, &signal_number, sizeof(int)) == sizeof(int))
+ if (signal_number >= 0 && signal_number < max_signal_number)
+ signal_set_service::deliver_signal(signal_number);
+
+ return false;
+ }
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
pipe_read_op()
: reactor_op(asio::error_code(),
&pipe_read_op::do_perform, pipe_read_op::do_complete)
@@ -106,6 +148,7 @@ public:
return not_done;
}
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
static void do_complete(void* /*owner*/, operation* base,
const asio::error_code& /*ec*/,
@@ -125,7 +168,11 @@ signal_set_service::signal_set_service(execution_context& context)
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
&& !defined(__CYGWIN__)
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ io_uring_service_(asio::use_service<io_uring_service>(context)),
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
reactor_(asio::use_service<reactor>(context)),
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
@@ -137,7 +184,11 @@ signal_set_service::signal_set_service(execution_context& context)
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
&& !defined(__CYGWIN__)
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ io_uring_service_.init_task();
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
reactor_.init_task();
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
@@ -187,8 +238,14 @@ void signal_set_service::notify_fork(execution_context::fork_event fork_ev)
int read_descriptor = state->read_descriptor_;
state->fork_prepared_ = true;
lock.unlock();
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ (void)read_descriptor;
+ io_uring_service_.deregister_io_object(io_object_data_);
+ io_uring_service_.cleanup_io_object(io_object_data_);
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
reactor_.deregister_internal_descriptor(read_descriptor, reactor_data_);
reactor_.cleanup_descriptor_data(reactor_data_);
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
}
break;
case execution_context::fork_parent:
@@ -197,8 +254,14 @@ void signal_set_service::notify_fork(execution_context::fork_event fork_ev)
int read_descriptor = state->read_descriptor_;
state->fork_prepared_ = false;
lock.unlock();
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ (void)read_descriptor;
+ io_uring_service_.register_internal_io_object(io_object_data_,
+ io_uring_service::read_op, new pipe_read_op);
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
reactor_.register_internal_descriptor(reactor::read_op,
read_descriptor, reactor_data_, new pipe_read_op);
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
}
break;
case execution_context::fork_child:
@@ -210,8 +273,14 @@ void signal_set_service::notify_fork(execution_context::fork_event fork_ev)
int read_descriptor = state->read_descriptor_;
state->fork_prepared_ = false;
lock.unlock();
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ (void)read_descriptor;
+ io_uring_service_.register_internal_io_object(io_object_data_,
+ io_uring_service::read_op, new pipe_read_op);
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
reactor_.register_internal_descriptor(reactor::read_op,
read_descriptor, reactor_data_, new pipe_read_op);
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
}
break;
default:
@@ -241,8 +310,8 @@ void signal_set_service::destroy(
}
asio::error_code signal_set_service::add(
- signal_set_service::implementation_type& impl,
- int signal_number, asio::error_code& ec)
+ signal_set_service::implementation_type& impl, int signal_number,
+ signal_set_base::flags_t f, asio::error_code& ec)
{
// Check that the signal number is valid.
if (signal_number < 0 || signal_number >= max_signal_number)
@@ -251,6 +320,15 @@ asio::error_code signal_set_service::add(
return ec;
}
+ // Check that the specified flags are supported.
+#if !defined(ASIO_HAS_SIGACTION)
+ if (f != signal_set_base::flags::dont_care)
+ {
+ ec = asio::error::operation_not_supported;
+ return ec;
+ }
+#endif // !defined(ASIO_HAS_SIGACTION)
+
signal_state* state = get_signal_state();
static_mutex::scoped_lock lock(state->mutex_);
@@ -278,6 +356,8 @@ asio::error_code signal_set_service::add(
memset(&sa, 0, sizeof(sa));
sa.sa_handler = asio_signal_handler;
sigfillset(&sa.sa_mask);
+ if (f != signal_set_base::flags::dont_care)
+ sa.sa_flags = static_cast<int>(f);
if (::sigaction(signal_number, &sa, 0) == -1)
# else // defined(ASIO_HAS_SIGACTION)
if (::signal(signal_number, asio_signal_handler) == SIG_ERR)
@@ -292,7 +372,39 @@ asio::error_code signal_set_service::add(
delete new_registration;
return ec;
}
+# if defined(ASIO_HAS_SIGACTION)
+ state->flags_[signal_number] = f;
+# endif // defined(ASIO_HAS_SIGACTION)
}
+# if defined(ASIO_HAS_SIGACTION)
+ // Otherwise check to see if the flags have changed.
+ else if (f != signal_set_base::flags::dont_care)
+ {
+ if (f != state->flags_[signal_number])
+ {
+ using namespace std; // For memset.
+ if (state->flags_[signal_number] != signal_set_base::flags::dont_care)
+ {
+ ec = asio::error::invalid_argument;
+ delete new_registration;
+ return ec;
+ }
+ struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = asio_signal_handler;
+ sigfillset(&sa.sa_mask);
+ sa.sa_flags = static_cast<int>(f);
+ if (::sigaction(signal_number, &sa, 0) == -1)
+ {
+ ec = asio::error_code(errno,
+ asio::error::get_system_category());
+ delete new_registration;
+ return ec;
+ }
+ state->flags_[signal_number] = f;
+ }
+ }
+# endif // defined(ASIO_HAS_SIGACTION)
#endif // defined(ASIO_HAS_SIGNAL) || defined(ASIO_HAS_SIGACTION)
// Record the new registration in the set.
@@ -361,6 +473,9 @@ asio::error_code signal_set_service::remove(
# endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
return ec;
}
+# if defined(ASIO_HAS_SIGACTION)
+ state->flags_[signal_number] = signal_set_base::flags_t();
+# endif // defined(ASIO_HAS_SIGACTION)
}
#endif // defined(ASIO_HAS_SIGNAL) || defined(ASIO_HAS_SIGACTION)
@@ -415,6 +530,9 @@ asio::error_code signal_set_service::clear(
# endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
return ec;
}
+# if defined(ASIO_HAS_SIGACTION)
+ state->flags_[reg->signal_number_] = signal_set_base::flags_t();
+# endif // defined(ASIO_HAS_SIGACTION)
}
#endif // defined(ASIO_HAS_SIGNAL) || defined(ASIO_HAS_SIGACTION)
@@ -462,6 +580,33 @@ asio::error_code signal_set_service::cancel(
return ec;
}
+void signal_set_service::cancel_ops_by_key(
+ signal_set_service::implementation_type& impl, void* cancellation_key)
+{
+ op_queue<operation> ops;
+ {
+ op_queue<signal_op> other_ops;
+ signal_state* state = get_signal_state();
+ static_mutex::scoped_lock lock(state->mutex_);
+
+ while (signal_op* op = impl.queue_.front())
+ {
+ impl.queue_.pop();
+ if (op->cancellation_key_ == cancellation_key)
+ {
+ op->ec_ = asio::error::operation_aborted;
+ ops.push(op);
+ }
+ else
+ other_ops.push(op);
+ }
+
+ impl.queue_.push(other_ops);
+ }
+
+ scheduler_.post_deferred_completions(ops);
+}
+
void signal_set_service::deliver_signal(int signal_number)
{
signal_state* state = get_signal_state();
@@ -538,8 +683,14 @@ void signal_set_service::add_service(signal_set_service* service)
// Register for pipe readiness notifications.
int read_descriptor = state->read_descriptor_;
lock.unlock();
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ (void)read_descriptor;
+ service->io_uring_service_.register_internal_io_object(
+ service->io_object_data_, io_uring_service::read_op, new pipe_read_op);
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
service->reactor_.register_internal_descriptor(reactor::read_op,
read_descriptor, service->reactor_data_, new pipe_read_op);
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
@@ -558,10 +709,17 @@ void signal_set_service::remove_service(signal_set_service* service)
// Disable the pipe readiness notifications.
int read_descriptor = state->read_descriptor_;
lock.unlock();
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ (void)read_descriptor;
+ service->io_uring_service_.deregister_io_object(service->io_object_data_);
+ service->io_uring_service_.cleanup_io_object(service->io_object_data_);
+ lock.lock();
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
service->reactor_.deregister_internal_descriptor(
read_descriptor, service->reactor_data_);
service->reactor_.cleanup_descriptor_data(service->reactor_data_);
lock.lock();
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
diff --git a/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp b/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp
index 3403f1c0a85..7feb7ca02df 100644
--- a/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp
@@ -2,7 +2,7 @@
// detail/impl/socket_ops.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -78,7 +78,7 @@ inline void get_last_error(
{
if (!is_error_condition)
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
}
else
{
@@ -94,16 +94,18 @@ inline void get_last_error(
template <typename SockLenType>
inline socket_type call_accept(SockLenType msghdr::*,
- socket_type s, socket_addr_type* addr, std::size_t* addrlen)
+ socket_type s, void* addr, std::size_t* addrlen)
{
SockLenType tmp_addrlen = addrlen ? (SockLenType)*addrlen : 0;
- socket_type result = ::accept(s, addr, addrlen ? &tmp_addrlen : 0);
+ socket_type result = ::accept(s,
+ static_cast<socket_addr_type*>(addr),
+ addrlen ? &tmp_addrlen : 0);
if (addrlen)
*addrlen = (std::size_t)tmp_addrlen;
return result;
}
-socket_type accept(socket_type s, socket_addr_type* addr,
+socket_type accept(socket_type s, void* addr,
std::size_t* addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
@@ -129,12 +131,12 @@ socket_type accept(socket_type s, socket_addr_type* addr,
}
#endif
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return new_s;
}
socket_type sync_accept(socket_type s, state_type state,
- socket_addr_type* addr, std::size_t* addrlen, asio::error_code& ec)
+ void* addr, std::size_t* addrlen, asio::error_code& ec)
{
// Accept a socket.
for (;;)
@@ -179,9 +181,8 @@ socket_type sync_accept(socket_type s, state_type state,
#if defined(ASIO_HAS_IOCP)
-void complete_iocp_accept(socket_type s,
- void* output_buffer, DWORD address_length,
- socket_addr_type* addr, std::size_t* addrlen,
+void complete_iocp_accept(socket_type s, void* output_buffer,
+ DWORD address_length, void* addr, std::size_t* addrlen,
socket_type new_socket, asio::error_code& ec)
{
// Map non-portable errors to their portable counterparts.
@@ -225,7 +226,7 @@ void complete_iocp_accept(socket_type s,
#else // defined(ASIO_HAS_IOCP)
bool non_blocking_accept(socket_type s,
- state_type state, socket_addr_type* addr, std::size_t* addrlen,
+ state_type state, void* addr, std::size_t* addrlen,
asio::error_code& ec, socket_type& new_socket)
{
for (;;)
@@ -272,12 +273,13 @@ bool non_blocking_accept(socket_type s,
template <typename SockLenType>
inline int call_bind(SockLenType msghdr::*,
- socket_type s, const socket_addr_type* addr, std::size_t addrlen)
+ socket_type s, const void* addr, std::size_t addrlen)
{
- return ::bind(s, addr, (SockLenType)addrlen);
+ return ::bind(s, static_cast<const socket_addr_type*>(addr),
+ (SockLenType)addrlen);
}
-int bind(socket_type s, const socket_addr_type* addr,
+int bind(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
@@ -337,7 +339,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 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)
+ || ec.value() == 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(ASIO_WINDOWS) || defined(__CYGWIN__)
state &= ~non_blocking;
@@ -376,11 +396,31 @@ bool set_user_non_blocking(socket_type s,
result = ::fcntl(s, F_SETFL, flag);
get_last_error(ec, result < 0);
}
-#else
+#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = (value ? 1 : 0);
int result = ::ioctl(s, FIONBIO, &arg);
get_last_error(ec, result < 0);
-#endif
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ if (false
+# if defined(ENOTTY)
+ || ec.value() == ENOTTY
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
+ || ec.value() == ENOTCAPABLE
+# endif // defined(ENOTCAPABLE)
+ )
+ {
+ result = ::fcntl(s, F_GETFL, 0);
+ get_last_error(ec, result < 0);
+ if (result >= 0)
+ {
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ 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)
{
@@ -430,11 +470,31 @@ bool set_internal_non_blocking(socket_type s,
result = ::fcntl(s, F_SETFL, flag);
get_last_error(ec, result < 0);
}
-#else
+#else // defined(__SYMBIAN32__) || defined(__EMSCRIPTEN__)
ioctl_arg_type arg = (value ? 1 : 0);
int result = ::ioctl(s, FIONBIO, &arg);
get_last_error(ec, result < 0);
-#endif
+# if defined(ENOTTY) || defined(ENOTCAPABLE)
+ if (false
+# if defined(ENOTTY)
+ || ec.value() == ENOTTY
+# endif // defined(ENOTTY)
+# if defined(ENOTCAPABLE)
+ || ec.value() == ENOTCAPABLE
+# endif // defined(ENOTCAPABLE)
+ )
+ {
+ result = ::fcntl(s, F_GETFL, 0);
+ get_last_error(ec, result < 0);
+ if (result >= 0)
+ {
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ 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)
{
@@ -463,12 +523,13 @@ int shutdown(socket_type s, int what, asio::error_code& ec)
template <typename SockLenType>
inline int call_connect(SockLenType msghdr::*,
- socket_type s, const socket_addr_type* addr, std::size_t addrlen)
+ socket_type s, const void* addr, std::size_t addrlen)
{
- return ::connect(s, addr, (SockLenType)addrlen);
+ return ::connect(s, static_cast<const socket_addr_type*>(addr),
+ (SockLenType)addrlen);
}
-int connect(socket_type s, const socket_addr_type* addr,
+int connect(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
@@ -481,12 +542,17 @@ int connect(socket_type s, const socket_addr_type* addr,
get_last_error(ec, result != 0);
#if defined(__linux__)
if (result != 0 && ec == asio::error::try_again)
- ec = asio::error::no_buffer_space;
+ {
+ if (static_cast<const socket_addr_type*>(addr)->sa_family == AF_UNIX)
+ ec = asio::error::in_progress;
+ else
+ ec = asio::error::no_buffer_space;
+ }
#endif // defined(__linux__)
return result;
}
-void sync_connect(socket_type s, const socket_addr_type* addr,
+void sync_connect(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec)
{
// Perform the connect operation.
@@ -596,7 +662,7 @@ bool non_blocking_connect(socket_type s, asio::error_code& ec)
asio::error::get_system_category());
}
else
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
}
return true;
@@ -722,9 +788,9 @@ void init_buf(buf& b, const void* data, size_t size)
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
}
-inline void init_msghdr_msg_name(void*& name, socket_addr_type* addr)
+inline void init_msghdr_msg_name(void*& name, void* addr)
{
- name = addr;
+ name = static_cast<socket_addr_type*>(addr);
}
inline void init_msghdr_msg_name(void*& name, const socket_addr_type* addr)
@@ -733,15 +799,15 @@ inline void init_msghdr_msg_name(void*& name, const socket_addr_type* addr)
}
template <typename T>
-inline void init_msghdr_msg_name(T& name, socket_addr_type* addr)
+inline void init_msghdr_msg_name(T& name, void* addr)
{
- name = reinterpret_cast<T>(addr);
+ name = static_cast<T>(addr);
}
template <typename T>
-inline void init_msghdr_msg_name(T& name, const socket_addr_type* addr)
+inline void init_msghdr_msg_name(T& name, const void* addr)
{
- name = reinterpret_cast<T>(const_cast<socket_addr_type*>(addr));
+ name = static_cast<T>(const_cast<void*>(addr));
}
signed_size_type recv(socket_type s, buf* bufs, size_t count,
@@ -763,7 +829,7 @@ signed_size_type recv(socket_type s, buf* bufs, size_t count,
result = 0;
if (result != 0)
return socket_error_retval;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
msghdr msg = msghdr();
@@ -796,7 +862,7 @@ signed_size_type recv1(socket_type s, void* data, size_t size,
result = 0;
if (result != 0)
return socket_error_retval;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
signed_size_type result = ::recv(s, static_cast<char*>(data), size, flags);
@@ -817,7 +883,7 @@ size_t sync_recv(socket_type s, state_type state, buf* bufs,
// A request to read 0 bytes on a stream is a no-op.
if (all_empty && (state & stream_oriented))
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
@@ -862,7 +928,7 @@ size_t sync_recv1(socket_type s, state_type state, void* data,
// A request to read 0 bytes on a stream is a no-op.
if (size == 0 && (state & stream_oriented))
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
@@ -915,7 +981,7 @@ void complete_iocp_recv(state_type state,
}
else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
}
// Check for connection closed.
@@ -1008,8 +1074,7 @@ bool non_blocking_recv1(socket_type s,
#endif // defined(ASIO_HAS_IOCP)
signed_size_type recvfrom(socket_type s, buf* bufs, size_t count,
- int flags, socket_addr_type* addr, std::size_t* addrlen,
- asio::error_code& ec)
+ int flags, void* addr, std::size_t* addrlen, asio::error_code& ec)
{
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
// Receive some data.
@@ -1017,8 +1082,8 @@ signed_size_type recvfrom(socket_type s, buf* bufs, size_t count,
DWORD bytes_transferred = 0;
DWORD recv_flags = flags;
int tmp_addrlen = (int)*addrlen;
- int result = ::WSARecvFrom(s, bufs, recv_buf_count,
- &bytes_transferred, &recv_flags, addr, &tmp_addrlen, 0, 0);
+ int result = ::WSARecvFrom(s, bufs, recv_buf_count, &bytes_transferred,
+ &recv_flags, static_cast<socket_addr_type*>(addr), &tmp_addrlen, 0, 0);
get_last_error(ec, true);
*addrlen = (std::size_t)tmp_addrlen;
if (ec.value() == ERROR_NETNAME_DELETED)
@@ -1029,7 +1094,7 @@ signed_size_type recvfrom(socket_type s, buf* bufs, size_t count,
result = 0;
if (result != 0)
return socket_error_retval;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
msghdr msg = msghdr();
@@ -1045,21 +1110,19 @@ signed_size_type recvfrom(socket_type s, buf* bufs, size_t count,
}
template <typename SockLenType>
-inline signed_size_type call_recvfrom(SockLenType msghdr::*,
- socket_type s, void* data, size_t size, int flags,
- socket_addr_type* addr, std::size_t* addrlen)
+inline signed_size_type call_recvfrom(SockLenType msghdr::*, socket_type s,
+ void* data, size_t size, int flags, void* addr, std::size_t* addrlen)
{
SockLenType tmp_addrlen = addrlen ? (SockLenType)*addrlen : 0;
- signed_size_type result = ::recvfrom(s, static_cast<char*>(data),
- size, flags, addr, addrlen ? &tmp_addrlen : 0);
+ signed_size_type result = ::recvfrom(s, static_cast<char*>(data), size,
+ flags, static_cast<socket_addr_type*>(addr), addrlen ? &tmp_addrlen : 0);
if (addrlen)
*addrlen = (std::size_t)tmp_addrlen;
return result;
}
signed_size_type recvfrom1(socket_type s, void* data, size_t size,
- int flags, socket_addr_type* addr, std::size_t* addrlen,
- asio::error_code& ec)
+ int flags, void* addr, std::size_t* addrlen, asio::error_code& ec)
{
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
// Receive some data.
@@ -1069,8 +1132,8 @@ signed_size_type recvfrom1(socket_type s, void* data, size_t size,
DWORD bytes_transferred = 0;
DWORD recv_flags = flags;
int tmp_addrlen = (int)*addrlen;
- int result = ::WSARecvFrom(s, &buf, 1, &bytes_transferred,
- &recv_flags, addr, &tmp_addrlen, 0, 0);
+ int result = ::WSARecvFrom(s, &buf, 1, &bytes_transferred, &recv_flags,
+ static_cast<socket_addr_type*>(addr), &tmp_addrlen, 0, 0);
get_last_error(ec, true);
*addrlen = (std::size_t)tmp_addrlen;
if (ec.value() == ERROR_NETNAME_DELETED)
@@ -1081,7 +1144,7 @@ signed_size_type recvfrom1(socket_type s, void* data, size_t size,
result = 0;
if (result != 0)
return socket_error_retval;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
signed_size_type result = call_recvfrom(&msghdr::msg_namelen,
@@ -1091,9 +1154,8 @@ signed_size_type recvfrom1(socket_type s, void* data, size_t size,
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
}
-size_t sync_recvfrom(socket_type s, state_type state, buf* bufs,
- size_t count, int flags, socket_addr_type* addr,
- std::size_t* addrlen, asio::error_code& ec)
+size_t sync_recvfrom(socket_type s, state_type state, buf* bufs, size_t count,
+ int flags, void* addr, std::size_t* addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
{
@@ -1124,9 +1186,8 @@ size_t sync_recvfrom(socket_type s, state_type state, buf* bufs,
}
}
-size_t sync_recvfrom1(socket_type s, state_type state, void* data,
- size_t size, int flags, socket_addr_type* addr,
- std::size_t* addrlen, asio::error_code& ec)
+size_t sync_recvfrom1(socket_type s, state_type state, void* data, size_t size,
+ int flags, void* addr, std::size_t* addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
{
@@ -1177,15 +1238,14 @@ void complete_iocp_recvfrom(
}
else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
}
}
#else // defined(ASIO_HAS_IOCP)
-bool non_blocking_recvfrom(socket_type s,
- buf* bufs, size_t count, int flags,
- socket_addr_type* addr, std::size_t* addrlen,
+bool non_blocking_recvfrom(socket_type s, buf* bufs,
+ size_t count, int flags, void* addr, std::size_t* addrlen,
asio::error_code& ec, size_t& bytes_transferred)
{
for (;;)
@@ -1216,9 +1276,8 @@ bool non_blocking_recvfrom(socket_type s,
}
}
-bool non_blocking_recvfrom1(socket_type s,
- void* data, size_t size, int flags,
- socket_addr_type* addr, std::size_t* addrlen,
+bool non_blocking_recvfrom1(socket_type s, void* data,
+ size_t size, int flags, void* addr, std::size_t* addrlen,
asio::error_code& ec, size_t& bytes_transferred)
{
for (;;)
@@ -1324,7 +1383,7 @@ void complete_iocp_recvmsg(
}
else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
}
}
@@ -1381,7 +1440,7 @@ signed_size_type send(socket_type s, const buf* bufs, size_t count,
ec = asio::error::connection_refused;
if (result != 0)
return socket_error_retval;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
msghdr msg = msghdr();
@@ -1415,7 +1474,7 @@ signed_size_type send1(socket_type s, const void* data, size_t size,
ec = asio::error::connection_refused;
if (result != 0)
return socket_error_retval;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
#if defined(ASIO_HAS_MSG_NOSIGNAL)
@@ -1440,7 +1499,7 @@ size_t sync_send(socket_type s, state_type state, const buf* bufs,
// A request to write 0 bytes to a stream is a no-op.
if (all_empty && (state & stream_oriented))
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
@@ -1478,7 +1537,7 @@ size_t sync_send1(socket_type s, state_type state, const void* data,
// A request to write 0 bytes to a stream is a no-op.
if (size == 0 && (state & stream_oriented))
{
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
@@ -1590,16 +1649,17 @@ bool non_blocking_send1(socket_type s,
#endif // defined(ASIO_HAS_IOCP)
-signed_size_type sendto(socket_type s, const buf* bufs, size_t count,
- int flags, const socket_addr_type* addr, std::size_t addrlen,
- asio::error_code& ec)
+signed_size_type sendto(socket_type s, const buf* bufs,
+ size_t count, int flags, const void* addr,
+ std::size_t addrlen, asio::error_code& ec)
{
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
// Send the data.
DWORD send_buf_count = static_cast<DWORD>(count);
DWORD bytes_transferred = 0;
int result = ::WSASendTo(s, const_cast<buf*>(bufs),
- send_buf_count, &bytes_transferred, flags, addr,
+ send_buf_count, &bytes_transferred, flags,
+ static_cast<const socket_addr_type*>(addr),
static_cast<int>(addrlen), 0, 0);
get_last_error(ec, true);
if (ec.value() == ERROR_NETNAME_DELETED)
@@ -1608,7 +1668,7 @@ signed_size_type sendto(socket_type s, const buf* bufs, size_t count,
ec = asio::error::connection_refused;
if (result != 0)
return socket_error_retval;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
msghdr msg = msghdr();
@@ -1628,15 +1688,15 @@ signed_size_type sendto(socket_type s, const buf* bufs, size_t count,
template <typename SockLenType>
inline signed_size_type call_sendto(SockLenType msghdr::*,
socket_type s, const void* data, size_t size, int flags,
- const socket_addr_type* addr, std::size_t addrlen)
+ const void* addr, std::size_t addrlen)
{
- return ::sendto(s, static_cast<char*>(const_cast<void*>(data)),
- size, flags, addr, (SockLenType)addrlen);
+ return ::sendto(s, static_cast<char*>(const_cast<void*>(data)), size, flags,
+ static_cast<const socket_addr_type*>(addr), (SockLenType)addrlen);
}
-signed_size_type sendto1(socket_type s, const void* data, size_t size,
- int flags, const socket_addr_type* addr, std::size_t addrlen,
- asio::error_code& ec)
+signed_size_type sendto1(socket_type s, const void* data,
+ size_t size, int flags, const void* addr,
+ std::size_t addrlen, asio::error_code& ec)
{
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
// Send the data.
@@ -1644,8 +1704,9 @@ signed_size_type sendto1(socket_type s, const void* data, size_t size,
buf.buf = const_cast<char*>(static_cast<const char*>(data));
buf.len = static_cast<ULONG>(size);
DWORD bytes_transferred = 0;
- int result = ::WSASendTo(s, &buf, 1, &bytes_transferred,
- flags, addr, static_cast<int>(addrlen), 0, 0);
+ int result = ::WSASendTo(s, &buf, 1, &bytes_transferred, flags,
+ static_cast<const socket_addr_type*>(addr),
+ static_cast<int>(addrlen), 0, 0);
get_last_error(ec, true);
if (ec.value() == ERROR_NETNAME_DELETED)
ec = asio::error::connection_reset;
@@ -1653,7 +1714,7 @@ signed_size_type sendto1(socket_type s, const void* data, size_t size,
ec = asio::error::connection_refused;
if (result != 0)
return socket_error_retval;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return bytes_transferred;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
#if defined(ASIO_HAS_MSG_NOSIGNAL)
@@ -1666,8 +1727,8 @@ signed_size_type sendto1(socket_type s, const void* data, size_t size,
#endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
}
-size_t sync_sendto(socket_type s, state_type state, const buf* bufs,
- size_t count, int flags, const socket_addr_type* addr,
+size_t sync_sendto(socket_type s, state_type state,
+ const buf* bufs, size_t count, int flags, const void* addr,
std::size_t addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
@@ -1699,8 +1760,8 @@ size_t sync_sendto(socket_type s, state_type state, const buf* bufs,
}
}
-size_t sync_sendto1(socket_type s, state_type state, const void* data,
- size_t size, int flags, const socket_addr_type* addr,
+size_t sync_sendto1(socket_type s, state_type state,
+ const void* data, size_t size, int flags, const void* addr,
std::size_t addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
@@ -1736,7 +1797,7 @@ size_t sync_sendto1(socket_type s, state_type state, const void* data,
bool non_blocking_sendto(socket_type s,
const buf* bufs, size_t count, int flags,
- const socket_addr_type* addr, std::size_t addrlen,
+ const void* addr, std::size_t addrlen,
asio::error_code& ec, size_t& bytes_transferred)
{
for (;;)
@@ -1769,7 +1830,7 @@ bool non_blocking_sendto(socket_type s,
bool non_blocking_sendto1(socket_type s,
const void* data, size_t size, int flags,
- const socket_addr_type* addr, std::size_t addrlen,
+ const void* addr, std::size_t addrlen,
asio::error_code& ec, size_t& bytes_transferred)
{
for (;;)
@@ -1883,7 +1944,7 @@ int setsockopt(socket_type s, state_type& state, int level, int optname,
state |= enable_connection_aborted;
else
state &= ~enable_connection_aborted;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
@@ -1968,7 +2029,7 @@ int getsockopt(socket_type s, state_type state, int level, int optname,
}
*static_cast<int*>(optval) = (state & enable_connection_aborted) ? 1 : 0;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
@@ -1995,7 +2056,7 @@ int getsockopt(socket_type s, state_type state, int level, int optname,
// value is non-zero (i.e. true). This corresponds to the behavior of
// IPv6 sockets on Windows platforms pre-Vista.
*static_cast<DWORD*>(optval) = 1;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
}
return result;
}
@@ -2015,7 +2076,7 @@ int getsockopt(socket_type s, state_type state, int level, int optname,
// non-zero (i.e. true). This corresponds to the behavior of IPv6 sockets
// on Windows platforms pre-Vista.
*static_cast<DWORD*>(optval) = 1;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
}
return result;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -2040,16 +2101,17 @@ int getsockopt(socket_type s, state_type state, int level, int optname,
template <typename SockLenType>
inline int call_getpeername(SockLenType msghdr::*,
- socket_type s, socket_addr_type* addr, std::size_t* addrlen)
+ socket_type s, void* addr, std::size_t* addrlen)
{
SockLenType tmp_addrlen = (SockLenType)*addrlen;
- int result = ::getpeername(s, addr, &tmp_addrlen);
+ int result = ::getpeername(s,
+ static_cast<socket_addr_type*>(addr), &tmp_addrlen);
*addrlen = (std::size_t)tmp_addrlen;
return result;
}
-int getpeername(socket_type s, socket_addr_type* addr,
- std::size_t* addrlen, bool cached, asio::error_code& ec)
+int getpeername(socket_type s, void* addr, std::size_t* addrlen,
+ bool cached, asio::error_code& ec)
{
if (s == invalid_socket)
{
@@ -2076,7 +2138,7 @@ int getpeername(socket_type s, socket_addr_type* addr,
}
// The cached value is still valid.
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
#else // defined(ASIO_WINDOWS) && !defined(ASIO_WINDOWS_APP)
@@ -2092,15 +2154,16 @@ int getpeername(socket_type s, socket_addr_type* addr,
template <typename SockLenType>
inline int call_getsockname(SockLenType msghdr::*,
- socket_type s, socket_addr_type* addr, std::size_t* addrlen)
+ socket_type s, void* addr, std::size_t* addrlen)
{
SockLenType tmp_addrlen = (SockLenType)*addrlen;
- int result = ::getsockname(s, addr, &tmp_addrlen);
+ int result = ::getsockname(s,
+ static_cast<socket_addr_type*>(addr), &tmp_addrlen);
*addrlen = (std::size_t)tmp_addrlen;
return result;
}
-int getsockname(socket_type s, socket_addr_type* addr,
+int getsockname(socket_type s, void* addr,
std::size_t* addrlen, asio::error_code& ec)
{
if (s == invalid_socket)
@@ -2171,7 +2234,7 @@ int select(int nfds, fd_set* readfds, fd_set* writefds,
if (milliseconds == 0)
milliseconds = 1; // Force context switch.
::Sleep(milliseconds);
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 0;
}
@@ -2491,7 +2554,7 @@ const char* inet_ntop(int af, const void* src, char* dest, size_t length,
// Windows may set error code on success.
if (result != socket_error_retval)
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
// Windows may not set an error code on failure.
else if (result == socket_error_retval && !ec)
@@ -2514,7 +2577,11 @@ const char* inet_ntop(int af, const void* src, char* dest, size_t length,
&& ((ipv6_address->s6_addr[1] & 0x0f) == 0x02));
if ((!is_link_local && !is_multicast_link_local)
|| if_indextoname(static_cast<unsigned>(scope_id), if_name + 1) == 0)
+#if defined(ASIO_HAS_SNPRINTF)
+ snprintf(if_name + 1, sizeof(if_name) - 1, "%lu", scope_id);
+#else // defined(ASIO_HAS_SNPRINTF)
sprintf(if_name + 1, "%lu", scope_id);
+#endif // defined(ASIO_HAS_SNPRINTF)
strcat(dest, if_name);
}
return result;
@@ -2545,7 +2612,7 @@ int inet_pton(int af, const char* src, void* dest,
bytes[1] = static_cast<unsigned char>(b1);
bytes[2] = static_cast<unsigned char>(b2);
bytes[3] = static_cast<unsigned char>(b3);
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 1;
}
else if (af == ASIO_OS_DEF(AF_INET6))
@@ -2661,7 +2728,7 @@ int inet_pton(int af, const char* src, void* dest,
for (int i = 0; i < num_back_bytes; ++i)
bytes[16 - num_back_bytes + i] = back_bytes[i];
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return 1;
}
else
@@ -2704,12 +2771,12 @@ int inet_pton(int af, const char* src, void* dest,
if (result != socket_error_retval)
{
memcpy(dest, &address.v4.sin_addr, sizeof(in4_addr_type));
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
}
else if (strcmp(src, "255.255.255.255") == 0)
{
static_cast<in4_addr_type*>(dest)->s_addr = INADDR_NONE;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
}
}
else // AF_INET6
@@ -2719,7 +2786,7 @@ int inet_pton(int af, const char* src, void* dest,
memcpy(dest, &address.v6.sin6_addr, sizeof(in6_addr_type));
if (scope_id)
*scope_id = address.v6.sin6_scope_id;
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
}
}
@@ -2728,7 +2795,7 @@ int inet_pton(int af, const char* src, void* dest,
ec = asio::error::invalid_argument;
if (result != socket_error_retval)
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return result == socket_error_retval ? -1 : 1;
#else // defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -3622,7 +3689,9 @@ inline asio::error_code getnameinfo_emulation(
{
return ec = asio::error::no_buffer_space;
}
-#if defined(ASIO_HAS_SECURE_RTL)
+#if defined(ASIO_HAS_SNPRINTF)
+ snprintf(serv, servlen, "%u", ntohs(port));
+#elif defined(ASIO_HAS_SECURE_RTL)
sprintf_s(serv, servlen, "%u", ntohs(port));
#else // defined(ASIO_HAS_SECURE_RTL)
sprintf(serv, "%u", ntohs(port));
@@ -3645,7 +3714,9 @@ inline asio::error_code getnameinfo_emulation(
{
return ec = asio::error::no_buffer_space;
}
-#if defined(ASIO_HAS_SECURE_RTL)
+#if defined(ASIO_HAS_SNPRINTF)
+ snprintf(serv, servlen, "%u", ntohs(port));
+#elif defined(ASIO_HAS_SECURE_RTL)
sprintf_s(serv, servlen, "%u", ntohs(port));
#else // defined(ASIO_HAS_SECURE_RTL)
sprintf(serv, "%u", ntohs(port));
@@ -3657,7 +3728,7 @@ inline asio::error_code getnameinfo_emulation(
}
}
- ec.assign(0, ec.category());
+ asio::error::clear(ec);
return ec;
}
@@ -3807,7 +3878,7 @@ void freeaddrinfo(addrinfo_type* ai)
#endif
}
-asio::error_code getnameinfo(const socket_addr_type* addr,
+asio::error_code getnameinfo(const void* addr,
std::size_t addrlen, char* host, std::size_t hostlen,
char* serv, std::size_t servlen, int flags, asio::error_code& ec)
{
@@ -3815,8 +3886,8 @@ asio::error_code getnameinfo(const socket_addr_type* addr,
# if defined(ASIO_HAS_GETADDRINFO)
// Building for Windows XP, Windows Server 2003, or later.
clear_last_error();
- int error = ::getnameinfo(addr, static_cast<socklen_t>(addrlen),
- host, static_cast<DWORD>(hostlen),
+ int error = ::getnameinfo(static_cast<const socket_addr_type*>(addr),
+ static_cast<socklen_t>(addrlen), host, static_cast<DWORD>(hostlen),
serv, static_cast<DWORD>(servlen), flags);
return ec = translate_addrinfo_error(error);
# else
@@ -3828,34 +3899,34 @@ asio::error_code getnameinfo(const socket_addr_type* addr,
if (gni_t gni = (gni_t)::GetProcAddress(winsock_module, "getnameinfo"))
{
clear_last_error();
- int error = gni(addr, static_cast<int>(addrlen),
- host, static_cast<DWORD>(hostlen),
+ int error = gni(static_cast<const socket_addr_type*>(addr),
+ static_cast<int>(addrlen), host, static_cast<DWORD>(hostlen),
serv, static_cast<DWORD>(servlen), flags);
return ec = translate_addrinfo_error(error);
}
}
clear_last_error();
- return getnameinfo_emulation(addr, addrlen,
- host, hostlen, serv, servlen, flags, ec);
+ return getnameinfo_emulation(static_cast<const socket_addr_type*>(addr),
+ addrlen, host, hostlen, serv, servlen, flags, ec);
# endif
#elif !defined(ASIO_HAS_GETADDRINFO)
using namespace std; // For memcpy.
sockaddr_storage_type tmp_addr;
memcpy(&tmp_addr, addr, addrlen);
- addr = reinterpret_cast<socket_addr_type*>(&tmp_addr);
+ addr = &tmp_addr;
clear_last_error();
- return getnameinfo_emulation(addr, addrlen,
- host, hostlen, serv, servlen, flags, ec);
+ return getnameinfo_emulation(static_cast<const socket_addr_type*>(addr),
+ addrlen, host, hostlen, serv, servlen, flags, ec);
#else
clear_last_error();
- int error = ::getnameinfo(addr, addrlen, host, hostlen, serv, servlen, flags);
+ int error = ::getnameinfo(static_cast<const socket_addr_type*>(addr),
+ addrlen, host, hostlen, serv, servlen, flags);
return ec = translate_addrinfo_error(error);
#endif
}
-asio::error_code sync_getnameinfo(
- const socket_addr_type* addr, std::size_t addrlen,
- char* host, std::size_t hostlen, char* serv,
+asio::error_code sync_getnameinfo(const void* addr,
+ std::size_t addrlen, char* host, std::size_t hostlen, char* serv,
std::size_t servlen, int sock_type, asio::error_code& ec)
{
// First try resolving with the service name. If that fails try resolving
@@ -3874,7 +3945,7 @@ asio::error_code sync_getnameinfo(
asio::error_code background_getnameinfo(
const weak_cancel_token_type& cancel_token,
- const socket_addr_type* addr, std::size_t addrlen,
+ const void* addr, std::size_t addrlen,
char* host, std::size_t hostlen, char* serv,
std::size_t servlen, int sock_type, asio::error_code& ec)
{
diff --git a/3rdparty/asio/include/asio/detail/impl/socket_select_interrupter.ipp b/3rdparty/asio/include/asio/detail/impl/socket_select_interrupter.ipp
index 81813db0b7a..a5b29581eb0 100644
--- a/3rdparty/asio/include/asio/detail/impl/socket_select_interrupter.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/socket_select_interrupter.ipp
@@ -2,7 +2,7 @@
// detail/impl/socket_select_interrupter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -60,11 +60,11 @@ void socket_select_interrupter::open_descriptors()
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = socket_ops::host_to_network_long(INADDR_LOOPBACK);
addr.sin_port = 0;
- if (socket_ops::bind(acceptor.get(), (const socket_addr_type*)&addr,
+ if (socket_ops::bind(acceptor.get(), &addr,
addr_len, ec) == socket_error_retval)
asio::detail::throw_error(ec, "socket_select_interrupter");
- if (socket_ops::getsockname(acceptor.get(), (socket_addr_type*)&addr,
+ if (socket_ops::getsockname(acceptor.get(), &addr,
&addr_len, ec) == socket_error_retval)
asio::detail::throw_error(ec, "socket_select_interrupter");
@@ -83,7 +83,7 @@ void socket_select_interrupter::open_descriptors()
if (client.get() == invalid_socket)
asio::detail::throw_error(ec, "socket_select_interrupter");
- if (socket_ops::connect(client.get(), (const socket_addr_type*)&addr,
+ if (socket_ops::connect(client.get(), &addr,
addr_len, ec) == socket_error_retval)
asio::detail::throw_error(ec, "socket_select_interrupter");
diff --git a/3rdparty/asio/include/asio/detail/impl/strand_executor_service.hpp b/3rdparty/asio/include/asio/detail/impl/strand_executor_service.hpp
index b66b6747f01..3ffb398dcf6 100644
--- a/3rdparty/asio/include/asio/detail/impl/strand_executor_service.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/strand_executor_service.hpp
@@ -2,7 +2,7 @@
// detail/impl/strand_executor_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,7 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/fenced_block.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/recycling_allocator.hpp"
#include "asio/executor_work_guard.hpp"
#include "asio/defer.hpp"
@@ -34,8 +33,8 @@ class strand_executor_service::allocator_binder
public:
typedef Allocator allocator_type;
- allocator_binder(ASIO_MOVE_ARG(F) f, const Allocator& a)
- : f_(ASIO_MOVE_CAST(F)(f)),
+ allocator_binder(F&& f, const Allocator& a)
+ : f_(static_cast<F&&>(f)),
allocator_(a)
{
}
@@ -46,15 +45,13 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE)
allocator_binder(allocator_binder&& other)
- : f_(ASIO_MOVE_CAST(F)(other.f_)),
- allocator_(ASIO_MOVE_CAST(allocator_type)(other.allocator_))
+ : f_(static_cast<F&&>(other.f_)),
+ allocator_(static_cast<allocator_type&&>(other.allocator_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
- allocator_type get_allocator() const ASIO_NOEXCEPT
+ allocator_type get_allocator() const noexcept
{
return allocator_;
}
@@ -71,9 +68,9 @@ private:
template <typename Executor>
class strand_executor_service::invoker<Executor,
- typename enable_if<
+ enable_if_t<
execution::is_executor<Executor>::value
- >::type>
+ >>
{
public:
invoker(const implementation_type& impl, Executor& ex)
@@ -88,13 +85,11 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE)
invoker(invoker&& other)
- : impl_(ASIO_MOVE_CAST(implementation_type)(other.impl_)),
- executor_(ASIO_MOVE_CAST(executor_type)(other.executor_))
+ : impl_(static_cast<implementation_type&&>(other.impl_)),
+ executor_(static_cast<executor_type&&>(other.executor_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
struct on_invoker_exit
{
@@ -106,13 +101,12 @@ public:
{
recycling_allocator<void> allocator;
executor_type ex = this_->executor_;
- execution::execute(
- asio::prefer(
- asio::require(
- ASIO_MOVE_CAST(executor_type)(ex),
- execution::blocking.never),
- execution::allocator(allocator)),
- ASIO_MOVE_CAST(invoker)(*this_));
+ asio::prefer(
+ asio::require(
+ static_cast<executor_type&&>(ex),
+ execution::blocking.never),
+ execution::allocator(allocator)
+ ).execute(static_cast<invoker&&>(*this_));
}
}
};
@@ -127,12 +121,12 @@ public:
}
private:
- typedef typename decay<
- typename prefer_result<
+ typedef decay_t<
+ prefer_result_t<
Executor,
execution::outstanding_work_t::tracked_t
- >::type
- >::type executor_type;
+ >
+ > executor_type;
implementation_type impl_;
executor_type executor_;
@@ -142,9 +136,9 @@ private:
template <typename Executor>
class strand_executor_service::invoker<Executor,
- typename enable_if<
+ enable_if_t<
!execution::is_executor<Executor>::value
- >::type>
+ >>
{
public:
invoker(const implementation_type& impl, Executor& ex)
@@ -159,13 +153,11 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE)
invoker(invoker&& other)
- : impl_(ASIO_MOVE_CAST(implementation_type)(other.impl_)),
- work_(ASIO_MOVE_CAST(executor_work_guard<Executor>)(other.work_))
+ : impl_(static_cast<implementation_type&&>(other.impl_)),
+ work_(static_cast<executor_work_guard<Executor>&&>(other.work_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
struct on_invoker_exit
{
@@ -177,7 +169,7 @@ public:
{
Executor ex(this_->work_.get_executor());
recycling_allocator<void> allocator;
- ex.post(ASIO_MOVE_CAST(invoker)(*this_), allocator);
+ ex.post(static_cast<invoker&&>(*this_), allocator);
}
}
};
@@ -200,33 +192,33 @@ private:
template <typename Executor, typename Function>
inline void strand_executor_service::execute(const implementation_type& impl,
- Executor& ex, ASIO_MOVE_ARG(Function) function,
- typename enable_if<
- can_query<Executor, execution::allocator_t<void> >::value
- >::type*)
+ Executor& ex, Function&& function,
+ enable_if_t<
+ can_query<Executor, execution::allocator_t<void>>::value
+ >*)
{
return strand_executor_service::do_execute(impl, ex,
- ASIO_MOVE_CAST(Function)(function),
+ static_cast<Function&&>(function),
asio::query(ex, execution::allocator));
}
template <typename Executor, typename Function>
inline void strand_executor_service::execute(const implementation_type& impl,
- Executor& ex, ASIO_MOVE_ARG(Function) function,
- typename enable_if<
- !can_query<Executor, execution::allocator_t<void> >::value
- >::type*)
+ Executor& ex, Function&& function,
+ enable_if_t<
+ !can_query<Executor, execution::allocator_t<void>>::value
+ >*)
{
return strand_executor_service::do_execute(impl, ex,
- ASIO_MOVE_CAST(Function)(function),
+ static_cast<Function&&>(function),
std::allocator<void>());
}
template <typename Executor, typename Function, typename Allocator>
void strand_executor_service::do_execute(const implementation_type& impl,
- Executor& ex, ASIO_MOVE_ARG(Function) function, const Allocator& a)
+ Executor& ex, Function&& function, const Allocator& a)
{
- typedef typename decay<Function>::type function_type;
+ typedef decay_t<Function> function_type;
// If the executor is not never-blocking, and we are already in the strand,
// then the function can run immediately.
@@ -234,17 +226,17 @@ void strand_executor_service::do_execute(const implementation_type& impl,
&& running_in_this_thread(impl))
{
// Make a local, non-const copy of the function.
- function_type tmp(ASIO_MOVE_CAST(Function)(function));
+ function_type tmp(static_cast<Function&&>(function));
fenced_block b(fenced_block::full);
- asio_handler_invoke_helpers::invoke(tmp, tmp);
+ static_cast<function_type&&>(tmp)();
return;
}
// Allocate and construct an operation to wrap the function.
typedef executor_op<function_type, Allocator> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(function), a);
+ p.p = new (p.v) op(static_cast<Function&&>(function), a);
ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
"strand_executor", impl.get(), 0, "execute"));
@@ -254,31 +246,31 @@ void strand_executor_service::do_execute(const implementation_type& impl,
p.v = p.p = 0;
if (first)
{
- execution::execute(ex, invoker<Executor>(impl, ex));
+ ex.execute(invoker<Executor>(impl, ex));
}
}
template <typename Executor, typename Function, typename Allocator>
void strand_executor_service::dispatch(const implementation_type& impl,
- Executor& ex, ASIO_MOVE_ARG(Function) function, const Allocator& a)
+ Executor& ex, Function&& function, const Allocator& a)
{
- typedef typename decay<Function>::type function_type;
+ typedef decay_t<Function> function_type;
// If we are already in the strand then the function can run immediately.
if (running_in_this_thread(impl))
{
// Make a local, non-const copy of the function.
- function_type tmp(ASIO_MOVE_CAST(Function)(function));
+ function_type tmp(static_cast<Function&&>(function));
fenced_block b(fenced_block::full);
- asio_handler_invoke_helpers::invoke(tmp, tmp);
+ static_cast<function_type&&>(tmp)();
return;
}
// Allocate and construct an operation to wrap the function.
typedef executor_op<function_type, Allocator> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(function), a);
+ p.p = new (p.v) op(static_cast<Function&&>(function), a);
ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
"strand_executor", impl.get(), 0, "dispatch"));
@@ -297,14 +289,14 @@ void strand_executor_service::dispatch(const implementation_type& impl,
// Request invocation of the given function and return immediately.
template <typename Executor, typename Function, typename Allocator>
void strand_executor_service::post(const implementation_type& impl,
- Executor& ex, ASIO_MOVE_ARG(Function) function, const Allocator& a)
+ Executor& ex, Function&& function, const Allocator& a)
{
- typedef typename decay<Function>::type function_type;
+ typedef decay_t<Function> function_type;
// Allocate and construct an operation to wrap the function.
typedef executor_op<function_type, Allocator> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(function), a);
+ p.p = new (p.v) op(static_cast<Function&&>(function), a);
ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
"strand_executor", impl.get(), 0, "post"));
@@ -323,14 +315,14 @@ void strand_executor_service::post(const implementation_type& impl,
// Request invocation of the given function and return immediately.
template <typename Executor, typename Function, typename Allocator>
void strand_executor_service::defer(const implementation_type& impl,
- Executor& ex, ASIO_MOVE_ARG(Function) function, const Allocator& a)
+ Executor& ex, Function&& function, const Allocator& a)
{
- typedef typename decay<Function>::type function_type;
+ typedef decay_t<Function> function_type;
// Allocate and construct an operation to wrap the function.
typedef executor_op<function_type, Allocator> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(function), a);
+ p.p = new (p.v) op(static_cast<Function&&>(function), a);
ASIO_HANDLER_CREATION((impl->service_->context(), *p.p,
"strand_executor", impl.get(), 0, "defer"));
diff --git a/3rdparty/asio/include/asio/detail/impl/strand_executor_service.ipp b/3rdparty/asio/include/asio/detail/impl/strand_executor_service.ipp
index c97b6df5a69..a2dff894cca 100644
--- a/3rdparty/asio/include/asio/detail/impl/strand_executor_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/strand_executor_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/strand_executor_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/strand_service.hpp b/3rdparty/asio/include/asio/detail/impl/strand_service.hpp
index 3e395d6c9d6..8249c9eb8d5 100644
--- a/3rdparty/asio/include/asio/detail/impl/strand_service.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/strand_service.hpp
@@ -2,7 +2,7 @@
// detail/impl/strand_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,7 +18,6 @@
#include "asio/detail/completion_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/push_options.hpp"
@@ -40,7 +39,7 @@ void strand_service::dispatch(strand_service::implementation_type& impl,
if (running_in_this_thread(impl))
{
fenced_block b(fenced_block::full);
- asio_handler_invoke_helpers::invoke(handler, handler);
+ static_cast<Handler&&>(handler)();
return;
}
diff --git a/3rdparty/asio/include/asio/detail/impl/strand_service.ipp b/3rdparty/asio/include/asio/detail/impl/strand_service.ipp
index 58d657c9853..af8929a00c6 100644
--- a/3rdparty/asio/include/asio/detail/impl/strand_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/strand_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/strand_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/thread_context.ipp b/3rdparty/asio/include/asio/detail/impl/thread_context.ipp
index 65cc275df24..8e729776362 100644
--- a/3rdparty/asio/include/asio/detail/impl/thread_context.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/thread_context.ipp
@@ -2,7 +2,7 @@
// detail/impl/thread_context.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/throw_error.ipp b/3rdparty/asio/include/asio/detail/impl/throw_error.ipp
index 9553add22e4..7baf3e729e5 100644
--- a/3rdparty/asio/include/asio/detail/impl/throw_error.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/throw_error.ipp
@@ -2,7 +2,7 @@
// detail/impl/throw_error.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,7 +17,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/throw_error.hpp"
-#include "asio/detail/throw_exception.hpp"
#include "asio/system_error.hpp"
#include "asio/detail/push_options.hpp"
@@ -25,37 +24,21 @@
namespace asio {
namespace detail {
-void do_throw_error(const asio::error_code& err)
+void do_throw_error(
+ const asio::error_code& err
+ ASIO_SOURCE_LOCATION_PARAM)
{
asio::system_error e(err);
- asio::detail::throw_exception(e);
+ asio::detail::throw_exception(e ASIO_SOURCE_LOCATION_ARG);
}
-void do_throw_error(const asio::error_code& err, const char* location)
+void do_throw_error(
+ const asio::error_code& err,
+ const char* location
+ ASIO_SOURCE_LOCATION_PARAM)
{
- // boostify: non-boost code starts here
-#if defined(ASIO_MSVC) \
- && defined(ASIO_HAS_STD_SYSTEM_ERROR) \
- && (_MSC_VER < 1928)
- // Microsoft's implementation of std::system_error is non-conformant in that
- // it ignores the error code's message when a "what" string is supplied. We'll
- // work around this by explicitly formatting the "what" string.
- std::string what_msg = location;
- what_msg += ": ";
- what_msg += err.message();
- asio::system_error e(err, what_msg);
- asio::detail::throw_exception(e);
-#else // defined(ASIO_MSVC)
- // && defined(ASIO_HAS_STD_SYSTEM_ERROR)
- // && (_MSC_VER < 1928)
- // boostify: non-boost code ends here
asio::system_error e(err, location);
- asio::detail::throw_exception(e);
- // boostify: non-boost code starts here
-#endif // defined(ASIO_MSVC)
- // && defined(ASIO_HAS_STD_SYSTEM_ERROR)
- // && (_MSC_VER < 1928)
- // boostify: non-boost code ends here
+ asio::detail::throw_exception(e ASIO_SOURCE_LOCATION_ARG);
}
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/impl/timer_queue_ptime.ipp b/3rdparty/asio/include/asio/detail/impl/timer_queue_ptime.ipp
index 8d39edbc1a6..bdf994e3a41 100644
--- a/3rdparty/asio/include/asio/detail/impl/timer_queue_ptime.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/timer_queue_ptime.ipp
@@ -2,7 +2,7 @@
// detail/impl/timer_queue_ptime.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -26,62 +26,62 @@
namespace asio {
namespace detail {
-timer_queue<time_traits<boost::posix_time::ptime> >::timer_queue()
+timer_queue<time_traits<boost::posix_time::ptime>>::timer_queue()
{
}
-timer_queue<time_traits<boost::posix_time::ptime> >::~timer_queue()
+timer_queue<time_traits<boost::posix_time::ptime>>::~timer_queue()
{
}
-bool timer_queue<time_traits<boost::posix_time::ptime> >::enqueue_timer(
+bool timer_queue<time_traits<boost::posix_time::ptime>>::enqueue_timer(
const time_type& time, per_timer_data& timer, wait_op* op)
{
return impl_.enqueue_timer(time, timer, op);
}
-bool timer_queue<time_traits<boost::posix_time::ptime> >::empty() const
+bool timer_queue<time_traits<boost::posix_time::ptime>>::empty() const
{
return impl_.empty();
}
-long timer_queue<time_traits<boost::posix_time::ptime> >::wait_duration_msec(
+long timer_queue<time_traits<boost::posix_time::ptime>>::wait_duration_msec(
long max_duration) const
{
return impl_.wait_duration_msec(max_duration);
}
-long timer_queue<time_traits<boost::posix_time::ptime> >::wait_duration_usec(
+long timer_queue<time_traits<boost::posix_time::ptime>>::wait_duration_usec(
long max_duration) const
{
return impl_.wait_duration_usec(max_duration);
}
-void timer_queue<time_traits<boost::posix_time::ptime> >::get_ready_timers(
+void timer_queue<time_traits<boost::posix_time::ptime>>::get_ready_timers(
op_queue<operation>& ops)
{
impl_.get_ready_timers(ops);
}
-void timer_queue<time_traits<boost::posix_time::ptime> >::get_all_timers(
+void timer_queue<time_traits<boost::posix_time::ptime>>::get_all_timers(
op_queue<operation>& ops)
{
impl_.get_all_timers(ops);
}
-std::size_t timer_queue<time_traits<boost::posix_time::ptime> >::cancel_timer(
+std::size_t timer_queue<time_traits<boost::posix_time::ptime>>::cancel_timer(
per_timer_data& timer, op_queue<operation>& ops, std::size_t max_cancelled)
{
return impl_.cancel_timer(timer, ops, max_cancelled);
}
-void timer_queue<time_traits<boost::posix_time::ptime> >::cancel_timer_by_key(
+void timer_queue<time_traits<boost::posix_time::ptime>>::cancel_timer_by_key(
per_timer_data* timer, op_queue<operation>& ops, void* cancellation_key)
{
impl_.cancel_timer_by_key(timer, ops, cancellation_key);
}
-void timer_queue<time_traits<boost::posix_time::ptime> >::move_timer(
+void timer_queue<time_traits<boost::posix_time::ptime>>::move_timer(
per_timer_data& target, per_timer_data& source)
{
impl_.move_timer(target, source);
diff --git a/3rdparty/asio/include/asio/detail/impl/timer_queue_set.ipp b/3rdparty/asio/include/asio/detail/impl/timer_queue_set.ipp
index 04c62c3b5a7..66420e98a7c 100644
--- a/3rdparty/asio/include/asio/detail/impl/timer_queue_set.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/timer_queue_set.ipp
@@ -2,7 +2,7 @@
// detail/impl/timer_queue_set.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/win_event.ipp b/3rdparty/asio/include/asio/detail/impl/win_event.ipp
index d442c4d0ec7..9827e339769 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_event.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_event.ipp
@@ -2,7 +2,7 @@
// detail/win_event.ipp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_file_service.ipp b/3rdparty/asio/include/asio/detail/impl/win_iocp_file_service.ipp
new file mode 100644
index 00000000000..faaab48ad52
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_file_service.ipp
@@ -0,0 +1,280 @@
+//
+// detail/impl/win_iocp_file_service.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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 ASIO_DETAIL_IMPL_WIN_IOCP_FILE_SERVICE_IPP
+#define ASIO_DETAIL_IMPL_WIN_IOCP_FILE_SERVICE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ && defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+
+#include <cstring>
+#include <sys/stat.h>
+#include "asio/detail/win_iocp_file_service.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+win_iocp_file_service::win_iocp_file_service(
+ execution_context& context)
+ : execution_context_service_base<win_iocp_file_service>(context),
+ handle_service_(context),
+ nt_flush_buffers_file_ex_(0)
+{
+ if (FARPROC nt_flush_buffers_file_ex_ptr = ::GetProcAddress(
+ ::GetModuleHandleA("NTDLL"), "NtFlushBuffersFileEx"))
+ {
+ nt_flush_buffers_file_ex_ = reinterpret_cast<nt_flush_buffers_file_ex_fn>(
+ reinterpret_cast<void*>(nt_flush_buffers_file_ex_ptr));
+ }
+}
+
+void win_iocp_file_service::shutdown()
+{
+ handle_service_.shutdown();
+}
+
+asio::error_code win_iocp_file_service::open(
+ win_iocp_file_service::implementation_type& impl,
+ const char* path, file_base::flags open_flags,
+ asio::error_code& ec)
+{
+ if (is_open(impl))
+ {
+ ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ DWORD access = 0;
+ if ((open_flags & file_base::read_only) != 0)
+ access = GENERIC_READ;
+ else if ((open_flags & file_base::write_only) != 0)
+ access = GENERIC_WRITE;
+ else if ((open_flags & file_base::read_write) != 0)
+ access = GENERIC_READ | GENERIC_WRITE;
+
+ DWORD share = FILE_SHARE_READ | FILE_SHARE_WRITE;
+
+ DWORD disposition = 0;
+ if ((open_flags & file_base::create) != 0)
+ {
+ if ((open_flags & file_base::exclusive) != 0)
+ disposition = CREATE_NEW;
+ else
+ disposition = OPEN_ALWAYS;
+ }
+ else
+ {
+ if ((open_flags & file_base::truncate) != 0)
+ disposition = TRUNCATE_EXISTING;
+ else
+ disposition = OPEN_EXISTING;
+ }
+
+ DWORD flags = FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED;
+ if (impl.is_stream_)
+ flags |= FILE_FLAG_SEQUENTIAL_SCAN;
+ else
+ flags |= FILE_FLAG_RANDOM_ACCESS;
+ if ((open_flags & file_base::sync_all_on_write) != 0)
+ flags |= FILE_FLAG_WRITE_THROUGH;
+
+ HANDLE handle = ::CreateFileA(path, access, share, 0, disposition, flags, 0);
+ if (handle != INVALID_HANDLE_VALUE)
+ {
+ if (disposition == OPEN_ALWAYS)
+ {
+ if ((open_flags & file_base::truncate) != 0)
+ {
+ if (!::SetEndOfFile(handle))
+ {
+ DWORD last_error = ::GetLastError();
+ ::CloseHandle(handle);
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+ }
+ else if ((open_flags & file_base::append) != 0)
+ {
+ if (::SetFilePointer(handle, 0, 0, FILE_END)
+ == INVALID_SET_FILE_POINTER)
+ {
+ DWORD last_error = ::GetLastError();
+ ::CloseHandle(handle);
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+ }
+ }
+
+ handle_service_.assign(impl, handle, ec);
+ if (ec)
+ ::CloseHandle(handle);
+ impl.offset_ = 0;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+}
+
+uint64_t win_iocp_file_service::size(
+ const win_iocp_file_service::implementation_type& impl,
+ asio::error_code& ec) const
+{
+ LARGE_INTEGER result;
+ if (::GetFileSizeEx(native_handle(impl), &result))
+ {
+ asio::error::clear(ec);
+ return static_cast<uint64_t>(result.QuadPart);
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+}
+
+asio::error_code win_iocp_file_service::resize(
+ win_iocp_file_service::implementation_type& impl,
+ uint64_t n, asio::error_code& ec)
+{
+ LARGE_INTEGER distance;
+ distance.QuadPart = n;
+ if (::SetFilePointerEx(native_handle(impl), distance, 0, FILE_BEGIN))
+ {
+ BOOL result = ::SetEndOfFile(native_handle(impl));
+ DWORD last_error = ::GetLastError();
+
+ distance.QuadPart = static_cast<LONGLONG>(impl.offset_);
+ if (!::SetFilePointerEx(native_handle(impl), distance, 0, FILE_BEGIN))
+ {
+ result = FALSE;
+ last_error = ::GetLastError();
+ }
+
+ if (result)
+ asio::error::clear(ec);
+ else
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+}
+
+asio::error_code win_iocp_file_service::sync_all(
+ win_iocp_file_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ BOOL result = ::FlushFileBuffers(native_handle(impl));
+ if (result)
+ {
+ asio::error::clear(ec);
+ return ec;
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+}
+
+asio::error_code win_iocp_file_service::sync_data(
+ win_iocp_file_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (nt_flush_buffers_file_ex_)
+ {
+ io_status_block status = {};
+ if (!nt_flush_buffers_file_ex_(native_handle(impl),
+ flush_flags_file_data_sync_only, 0, 0, &status))
+ {
+ asio::error::clear(ec);
+ return ec;
+ }
+ }
+ return sync_all(impl, ec);
+}
+
+uint64_t win_iocp_file_service::seek(
+ win_iocp_file_service::implementation_type& impl, int64_t offset,
+ file_base::seek_basis whence, asio::error_code& ec)
+{
+ DWORD method;
+ switch (whence)
+ {
+ case file_base::seek_set:
+ method = FILE_BEGIN;
+ break;
+ case file_base::seek_cur:
+ method = FILE_BEGIN;
+ offset = static_cast<int64_t>(impl.offset_) + offset;
+ break;
+ case file_base::seek_end:
+ method = FILE_END;
+ break;
+ default:
+ ec = asio::error::invalid_argument;
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+
+ LARGE_INTEGER distance, new_offset;
+ distance.QuadPart = offset;
+ if (::SetFilePointerEx(native_handle(impl), distance, &new_offset, method))
+ {
+ impl.offset_ = new_offset.QuadPart;
+ asio::error::clear(ec);
+ return impl.offset_;
+ }
+ else
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // && defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+
+#endif // ASIO_DETAIL_IMPL_WIN_IOCP_FILE_SERVICE_IPP
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_handle_service.ipp b/3rdparty/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
index 7cefc156337..6136e27fb32 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_handle_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -68,6 +68,7 @@ public:
win_iocp_handle_service::win_iocp_handle_service(execution_context& context)
: execution_context_service_base<win_iocp_handle_service>(context),
iocp_service_(asio::use_service<win_iocp_io_context>(context)),
+ nt_set_info_(0),
mutex_(),
impl_list_(0)
{
@@ -182,11 +183,15 @@ asio::error_code win_iocp_handle_service::assign(
if (is_open(impl))
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
if (iocp_service_.register_handle(handle, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return ec;
+ }
impl.handle_ = handle;
ec = asio::error_code();
@@ -221,9 +226,47 @@ asio::error_code win_iocp_handle_service::close(
ec = asio::error_code();
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
+win_iocp_handle_service::native_handle_type win_iocp_handle_service::release(
+ win_iocp_handle_service::implementation_type& impl,
+ asio::error_code& ec)
+{
+ if (!is_open(impl))
+ return INVALID_HANDLE_VALUE;
+
+ cancel(impl, ec);
+ if (ec)
+ {
+ ASIO_ERROR_LOCATION(ec);
+ return INVALID_HANDLE_VALUE;
+ }
+
+ nt_set_info_fn fn = get_nt_set_info();
+ if (fn == 0)
+ {
+ ec = asio::error::operation_not_supported;
+ ASIO_ERROR_LOCATION(ec);
+ return INVALID_HANDLE_VALUE;
+ }
+
+ ULONG_PTR iosb[2] = { 0, 0 };
+ void* info[2] = { 0, 0 };
+ if (fn(impl.handle_, iosb, &info, sizeof(info),
+ 61 /* FileReplaceCompletionInformation */))
+ {
+ ec = asio::error::operation_not_supported;
+ ASIO_ERROR_LOCATION(ec);
+ return INVALID_HANDLE_VALUE;
+ }
+
+ native_handle_type tmp = impl.handle_;
+ impl.handle_ = INVALID_HANDLE_VALUE;
+ return tmp;
+}
+
asio::error_code win_iocp_handle_service::cancel(
win_iocp_handle_service::implementation_type& impl,
asio::error_code& ec)
@@ -231,6 +274,7 @@ asio::error_code win_iocp_handle_service::cancel(
if (!is_open(impl))
{
ec = asio::error::bad_descriptor;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -292,6 +336,7 @@ asio::error_code win_iocp_handle_service::cancel(
ec = asio::error::operation_not_supported;
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -302,6 +347,7 @@ size_t win_iocp_handle_service::do_write(
if (!is_open(impl))
{
ec = asio::error::bad_descriptor;
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -315,6 +361,7 @@ size_t win_iocp_handle_service::do_write(
overlapped_wrapper overlapped(ec);
if (ec)
{
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -330,6 +377,7 @@ size_t win_iocp_handle_service::do_write(
{
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
}
@@ -343,6 +391,7 @@ size_t win_iocp_handle_service::do_write(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -394,6 +443,7 @@ size_t win_iocp_handle_service::do_read(
if (!is_open(impl))
{
ec = asio::error::bad_descriptor;
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -407,6 +457,7 @@ size_t win_iocp_handle_service::do_read(
overlapped_wrapper overlapped(ec);
if (ec)
{
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -429,6 +480,7 @@ size_t win_iocp_handle_service::do_read(
ec = asio::error_code(last_error,
asio::error::get_system_category());
}
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
}
@@ -449,6 +501,7 @@ size_t win_iocp_handle_service::do_read(
ec = asio::error_code(last_error,
asio::error::get_system_category());
}
+ ASIO_ERROR_LOCATION(ec);
return (last_error == ERROR_MORE_DATA) ? bytes_transferred : 0;
}
@@ -515,6 +568,47 @@ void win_iocp_handle_service::close_for_destruction(implementation_type& impl)
}
}
+win_iocp_handle_service::nt_set_info_fn
+win_iocp_handle_service::get_nt_set_info()
+{
+ void* ptr = interlocked_compare_exchange_pointer(&nt_set_info_, 0, 0);
+ if (!ptr)
+ {
+ if (HMODULE h = ::GetModuleHandleA("NTDLL.DLL"))
+ ptr = reinterpret_cast<void*>(GetProcAddress(h, "NtSetInformationFile"));
+
+ // On failure, set nt_set_info_ to a special value to indicate that the
+ // NtSetInformationFile function is unavailable. That way we won't bother
+ // trying to look it up again.
+ interlocked_exchange_pointer(&nt_set_info_, ptr ? ptr : this);
+ }
+
+ return reinterpret_cast<nt_set_info_fn>(ptr == this ? 0 : ptr);
+}
+
+void* win_iocp_handle_service::interlocked_compare_exchange_pointer(
+ void** dest, void* exch, void* cmp)
+{
+#if defined(_M_IX86)
+ return reinterpret_cast<void*>(InterlockedCompareExchange(
+ reinterpret_cast<PLONG>(dest), reinterpret_cast<LONG>(exch),
+ reinterpret_cast<LONG>(cmp)));
+#else
+ return InterlockedCompareExchangePointer(dest, exch, cmp);
+#endif
+}
+
+void* win_iocp_handle_service::interlocked_exchange_pointer(
+ void** dest, void* val)
+{
+#if defined(_M_IX86)
+ return reinterpret_cast<void*>(InterlockedExchange(
+ reinterpret_cast<PLONG>(dest), reinterpret_cast<LONG>(val)));
+#else
+ return InterlockedExchangePointer(dest, val);
+#endif
+}
+
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.hpp b/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.hpp
index 224e3c2acd0..6479500184a 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.hpp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_io_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,7 +22,6 @@
#include "asio/detail/completion_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/push_options.hpp"
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.ipp b/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.ipp
index 37e32507288..1c7fb28b2d6 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_io_context.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_io_context.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,7 +22,6 @@
#include "asio/error.hpp"
#include "asio/detail/cstdint.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/limits.hpp"
#include "asio/detail/thread.hpp"
#include "asio/detail/throw_error.hpp"
@@ -51,7 +50,7 @@ struct win_iocp_io_context::thread_function
struct win_iocp_io_context::work_finished_on_block_exit
{
- ~work_finished_on_block_exit()
+ ~work_finished_on_block_exit() noexcept(false)
{
io_context_->work_finished();
}
@@ -168,7 +167,10 @@ void win_iocp_io_context::shutdown()
}
if (timer_thread_.get())
+ {
timer_thread_->join();
+ timer_thread_.reset();
+ }
}
asio::error_code win_iocp_io_context::register_handle(
@@ -527,6 +529,7 @@ size_t win_iocp_io_context::do_one(DWORD msec,
DWORD win_iocp_io_context::get_gqcs_timeout()
{
+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0600)
OSVERSIONINFOEX osvi;
ZeroMemory(&osvi, sizeof(osvi));
osvi.dwOSVersionInfoSize = sizeof(osvi);
@@ -539,6 +542,9 @@ DWORD win_iocp_io_context::get_gqcs_timeout()
return INFINITE;
return default_gqcs_timeout;
+#else // !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0600)
+ return INFINITE;
+#endif // !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0600)
}
void win_iocp_io_context::do_add_timer_queue(timer_queue_base& queue)
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp b/3rdparty/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp
index 8b47920e654..abeb3cecb0a 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_serial_port_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -46,6 +46,7 @@ asio::error_code win_iocp_serial_port_service::open(
if (is_open(impl))
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -61,6 +62,7 @@ asio::error_code win_iocp_serial_port_service::open(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -75,6 +77,7 @@ asio::error_code win_iocp_serial_port_service::open(
::CloseHandle(handle);
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -101,6 +104,7 @@ asio::error_code win_iocp_serial_port_service::open(
::CloseHandle(handle);
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -119,6 +123,7 @@ asio::error_code win_iocp_serial_port_service::open(
::CloseHandle(handle);
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -143,6 +148,7 @@ asio::error_code win_iocp_serial_port_service::do_set_option(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -154,6 +160,7 @@ asio::error_code win_iocp_serial_port_service::do_set_option(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -176,6 +183,7 @@ asio::error_code win_iocp_serial_port_service::do_get_option(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
diff --git a/3rdparty/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp b/3rdparty/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
index 6adcf7e558b..af28718c905 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_socket_service_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -72,7 +72,7 @@ void win_iocp_socket_service_base::construct(
void win_iocp_socket_service_base::base_move_construct(
win_iocp_socket_service_base::base_implementation_type& impl,
win_iocp_socket_service_base::base_implementation_type& other_impl)
- ASIO_NOEXCEPT
+ noexcept
{
impl.socket_ = other_impl.socket_;
other_impl.socket_ = invalid_socket;
@@ -410,9 +410,8 @@ void win_iocp_socket_service_base::start_send_op(
void win_iocp_socket_service_base::start_send_to_op(
win_iocp_socket_service_base::base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count,
- const socket_addr_type* addr, int addrlen,
- socket_base::message_flags flags, operation* op)
+ WSABUF* buffers, std::size_t buffer_count, const void* addr,
+ int addrlen, socket_base::message_flags flags, operation* op)
{
update_cancellation_thread_id(impl);
iocp_service_.work_started();
@@ -423,8 +422,8 @@ void win_iocp_socket_service_base::start_send_to_op(
{
DWORD bytes_transferred = 0;
int result = ::WSASendTo(impl.socket_, buffers,
- static_cast<DWORD>(buffer_count),
- &bytes_transferred, flags, addr, addrlen, op, 0);
+ static_cast<DWORD>(buffer_count), &bytes_transferred, flags,
+ static_cast<const socket_addr_type*>(addr), addrlen, op, 0);
DWORD last_error = ::WSAGetLastError();
if (last_error == ERROR_PORT_UNREACHABLE)
last_error = WSAECONNREFUSED;
@@ -489,7 +488,7 @@ int win_iocp_socket_service_base::start_null_buffers_receive_op(
void win_iocp_socket_service_base::start_receive_from_op(
win_iocp_socket_service_base::base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count, socket_addr_type* addr,
+ WSABUF* buffers, std::size_t buffer_count, void* addr,
socket_base::message_flags flags, int* addrlen, operation* op)
{
update_cancellation_thread_id(impl);
@@ -502,8 +501,8 @@ void win_iocp_socket_service_base::start_receive_from_op(
DWORD bytes_transferred = 0;
DWORD recv_flags = flags;
int result = ::WSARecvFrom(impl.socket_, buffers,
- static_cast<DWORD>(buffer_count),
- &bytes_transferred, &recv_flags, addr, addrlen, op, 0);
+ static_cast<DWORD>(buffer_count), &bytes_transferred, &recv_flags,
+ static_cast<socket_addr_type*>(addr), addrlen, op, 0);
DWORD last_error = ::WSAGetLastError();
if (last_error == ERROR_PORT_UNREACHABLE)
last_error = WSAECONNREFUSED;
@@ -608,7 +607,7 @@ void win_iocp_socket_service_base::start_reactor_op(
int win_iocp_socket_service_base::start_connect_op(
win_iocp_socket_service_base::base_implementation_type& impl,
- int family, int type, const socket_addr_type* addr, std::size_t addrlen,
+ int family, int type, const void* addr, std::size_t addrlen,
win_iocp_socket_connect_op_base* op, operation* iocp_op)
{
// If ConnectEx is available, use that.
@@ -642,7 +641,8 @@ int win_iocp_socket_service_base::start_connect_op(
iocp_service_.work_started();
BOOL result = connect_ex(impl.socket_,
- addr, static_cast<int>(addrlen), 0, 0, 0, iocp_op);
+ static_cast<const socket_addr_type*>(addr),
+ static_cast<int>(addrlen), 0, 0, 0, iocp_op);
DWORD last_error = ::WSAGetLastError();
if (!result && last_error != WSA_IO_PENDING)
iocp_service_.on_completion(iocp_op, last_error);
diff --git a/3rdparty/asio/include/asio/detail/impl/win_mutex.ipp b/3rdparty/asio/include/asio/detail/impl/win_mutex.ipp
index 8a2db6f38c1..6340b6e1256 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_mutex.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_mutex.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_mutex.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp b/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp
index 0c44a41236b..d7db3e3f3a1 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_object_handle_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -213,6 +213,7 @@ asio::error_code win_object_handle_service::assign(
if (is_open(impl))
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -270,6 +271,7 @@ asio::error_code win_object_handle_service::close(
ec = asio::error_code();
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -312,6 +314,7 @@ asio::error_code win_object_handle_service::cancel(
ec = asio::error::bad_descriptor;
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -326,6 +329,7 @@ void win_object_handle_service::wait(
DWORD last_error = ::GetLastError();
ec = asio::error_code(last_error,
asio::error::get_system_category());
+ ASIO_ERROR_LOCATION(ec);
break;
}
case WAIT_OBJECT_0:
diff --git a/3rdparty/asio/include/asio/detail/impl/win_static_mutex.ipp b/3rdparty/asio/include/asio/detail/impl/win_static_mutex.ipp
index 070eb5951b5..5b459843338 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_static_mutex.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_static_mutex.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_static_mutex.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/win_thread.ipp b/3rdparty/asio/include/asio/detail/impl/win_thread.ipp
index 142ba67fc56..0ebc5db86b4 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_thread.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_thread.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_thread.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/win_tss_ptr.ipp b/3rdparty/asio/include/asio/detail/impl/win_tss_ptr.ipp
index c6ece2e20bf..5bc9de2c308 100644
--- a/3rdparty/asio/include/asio/detail/impl/win_tss_ptr.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/win_tss_ptr.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_tss_ptr.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp b/3rdparty/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp
index 92a29f06460..90a03542a9c 100644
--- a/3rdparty/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp
@@ -2,7 +2,7 @@
// detail/impl/winrt_ssocket_service_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -66,7 +66,7 @@ void winrt_ssocket_service_base::construct(
void winrt_ssocket_service_base::base_move_construct(
winrt_ssocket_service_base::base_implementation_type& impl,
winrt_ssocket_service_base::base_implementation_type& other_impl)
- ASIO_NOEXCEPT
+ noexcept
{
impl.socket_ = other_impl.socket_;
other_impl.socket_ = nullptr;
@@ -182,7 +182,7 @@ std::size_t winrt_ssocket_service_base::do_get_endpoint(
: impl.socket_->Information->RemotePort);
unsigned long scope = 0;
- switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
+ switch (static_cast<const socket_addr_type*>(addr)->sa_family)
{
case ASIO_OS_DEF(AF_INET):
if (addr_len < sizeof(sockaddr_in4_type))
@@ -351,7 +351,7 @@ asio::error_code winrt_ssocket_service_base::do_connect(
char addr_string[max_addr_v6_str_len];
unsigned short port;
- switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
+ switch (static_cast<const socket_addr_type*>(addr)->sa_family)
{
case ASIO_OS_DEF(AF_INET):
socket_ops::inet_ntop(ASIO_OS_DEF(AF_INET),
@@ -401,7 +401,7 @@ void winrt_ssocket_service_base::start_connect_op(
char addr_string[max_addr_v6_str_len];
unsigned short port = 0;
- switch (reinterpret_cast<const socket_addr_type*>(addr)->sa_family)
+ switch (static_cast<const socket_addr_type*>(addr)->sa_family)
{
case ASIO_OS_DEF(AF_INET):
socket_ops::inet_ntop(ASIO_OS_DEF(AF_INET),
diff --git a/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp b/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp
index 7c7da52bb15..9c967508e4f 100644
--- a/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp
+++ b/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp
@@ -2,7 +2,7 @@
// detail/impl/winrt_timer_scheduler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp b/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp
index d3d6103a644..028b5f9f3cb 100644
--- a/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp
@@ -2,7 +2,7 @@
// detail/impl/winrt_timer_scheduler.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/impl/winsock_init.ipp b/3rdparty/asio/include/asio/detail/impl/winsock_init.ipp
index f2e8cb51a3f..5b5f56037ea 100644
--- a/3rdparty/asio/include/asio/detail/impl/winsock_init.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/winsock_init.ipp
@@ -2,7 +2,7 @@
// detail/impl/winsock_init.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/initiate_defer.hpp b/3rdparty/asio/include/asio/detail/initiate_defer.hpp
new file mode 100644
index 00000000000..92abb0aa2f0
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/initiate_defer.hpp
@@ -0,0 +1,207 @@
+//
+// detail/initiate_defer.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 ASIO_DETAIL_INITIATE_DEFER_HPP
+#define ASIO_DETAIL_INITIATE_DEFER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/detail/work_dispatcher.hpp"
+#include "asio/execution/allocator.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/relationship.hpp"
+#include "asio/prefer.hpp"
+#include "asio/require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class initiate_defer
+{
+public:
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex, execution::blocking.never),
+ execution::relationship.continuation,
+ execution::allocator(alloc)
+ ).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex.defer(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+};
+
+template <typename Executor>
+class initiate_defer_with_executor
+{
+public:
+ typedef Executor executor_type;
+
+ explicit initiate_defer_with_executor(const Executor& ex)
+ : ex_(ex)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return ex_;
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex_, execution::blocking.never),
+ execution::relationship.continuation,
+ execution::allocator(alloc)
+ ).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex_, execution::blocking.never),
+ execution::relationship.continuation,
+ execution::allocator(alloc)
+ ).execute(
+ detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.defer(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.defer(detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex), alloc);
+ }
+
+private:
+ Executor ex_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_INITIATE_DEFER_HPP
diff --git a/3rdparty/asio/include/asio/detail/initiate_dispatch.hpp b/3rdparty/asio/include/asio/detail/initiate_dispatch.hpp
new file mode 100644
index 00000000000..ba2f68f0579
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/initiate_dispatch.hpp
@@ -0,0 +1,193 @@
+//
+// detail/initiate_dispatch.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 ASIO_DETAIL_INITIATE_DISPATCH_HPP
+#define ASIO_DETAIL_INITIATE_DISPATCH_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/detail/work_dispatcher.hpp"
+#include "asio/execution/allocator.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/prefer.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class initiate_dispatch
+{
+public:
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(ex, execution::allocator(alloc)).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex.dispatch(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+};
+
+template <typename Executor>
+class initiate_dispatch_with_executor
+{
+public:
+ typedef Executor executor_type;
+
+ explicit initiate_dispatch_with_executor(const Executor& ex)
+ : ex_(ex)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return ex_;
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(ex_, execution::allocator(alloc)).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(ex_, execution::allocator(alloc)).execute(
+ detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.dispatch(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.dispatch(detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex), alloc);
+ }
+
+private:
+ Executor ex_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_INITIATE_DISPATCH_HPP
diff --git a/3rdparty/asio/include/asio/detail/initiate_post.hpp b/3rdparty/asio/include/asio/detail/initiate_post.hpp
new file mode 100644
index 00000000000..f73c8ee0b81
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/initiate_post.hpp
@@ -0,0 +1,207 @@
+//
+// detail/initiate_post.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 ASIO_DETAIL_INITIATE_POST_HPP
+#define ASIO_DETAIL_INITIATE_POST_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/detail/work_dispatcher.hpp"
+#include "asio/execution/allocator.hpp"
+#include "asio/execution/blocking.hpp"
+#include "asio/execution/relationship.hpp"
+#include "asio/prefer.hpp"
+#include "asio/require.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class initiate_post
+{
+public:
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex, execution::blocking.never),
+ execution::relationship.fork,
+ execution::allocator(alloc)
+ ).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ associated_executor_t<decay_t<CompletionHandler>>
+ >::value
+ >* = 0) const
+ {
+ associated_executor_t<decay_t<CompletionHandler>> ex(
+ (get_associated_executor)(handler));
+
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex.post(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+};
+
+template <typename Executor>
+class initiate_post_with_executor
+{
+public:
+ typedef Executor executor_type;
+
+ explicit initiate_post_with_executor(const Executor& ex)
+ : ex_(ex)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return ex_;
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex_, execution::blocking.never),
+ execution::relationship.fork,
+ execution::allocator(alloc)
+ ).execute(
+ asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ asio::prefer(
+ asio::require(ex_, execution::blocking.never),
+ execution::relationship.fork,
+ execution::allocator(alloc)
+ ).execute(
+ detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex));
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ !detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ associated_allocator_t<decay_t<CompletionHandler>> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.post(asio::detail::bind_handler(
+ static_cast<CompletionHandler&&>(handler)), alloc);
+ }
+
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& handler,
+ enable_if_t<
+ !execution::is_executor<
+ conditional_t<true, executor_type, CompletionHandler>
+ >::value
+ >* = 0,
+ enable_if_t<
+ detail::is_work_dispatcher_required<
+ decay_t<CompletionHandler>,
+ Executor
+ >::value
+ >* = 0) const
+ {
+ typedef decay_t<CompletionHandler> handler_t;
+
+ typedef associated_executor_t<handler_t, Executor> handler_ex_t;
+ handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
+
+ associated_allocator_t<handler_t> alloc(
+ (get_associated_allocator)(handler));
+
+ ex_.post(detail::work_dispatcher<handler_t, handler_ex_t>(
+ static_cast<CompletionHandler&&>(handler), handler_ex), alloc);
+ }
+
+private:
+ Executor ex_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_INITIATE_POST_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_control.hpp b/3rdparty/asio/include/asio/detail/io_control.hpp
index 2b6d593891f..14daf85730a 100644
--- a/3rdparty/asio/include/asio/detail/io_control.hpp
+++ b/3rdparty/asio/include/asio/detail/io_control.hpp
@@ -2,7 +2,7 @@
// detail/io_control.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/io_object_impl.hpp b/3rdparty/asio/include/asio/detail/io_object_impl.hpp
index 9efd0d62047..bd7312b8491 100644
--- a/3rdparty/asio/include/asio/detail/io_object_impl.hpp
+++ b/3rdparty/asio/include/asio/detail/io_object_impl.hpp
@@ -1,8 +1,8 @@
//
-// io_object_impl.hpp
-// ~~~~~~~~~~~~~~~~~~
+// detail/io_object_impl.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -60,7 +60,6 @@ public:
service_->construct(implementation_);
}
-#if defined(ASIO_HAS_MOVE)
// Move-construct an I/O object.
io_object_impl(io_object_impl&& other)
: service_(&other.get_service()),
@@ -69,7 +68,16 @@ public:
service_->move_construct(implementation_, other.implementation_);
}
- // Perform a converting move-construction of an I/O object.
+ // Perform converting move-construction of an I/O object on the same service.
+ template <typename Executor1>
+ io_object_impl(io_object_impl<IoObjectService, Executor1>&& other)
+ : service_(&other.get_service()),
+ executor_(other.get_executor())
+ {
+ service_->move_construct(implementation_, other.get_implementation());
+ }
+
+ // Perform converting move-construction of an I/O object on another service.
template <typename IoObjectService1, typename Executor1>
io_object_impl(io_object_impl<IoObjectService1, Executor1>&& other)
: service_(&asio::use_service<IoObjectService>(
@@ -79,7 +87,6 @@ public:
service_->converting_move_construct(implementation_,
other.get_service(), other.get_implementation());
}
-#endif // defined(ASIO_HAS_MOVE)
// Destructor.
~io_object_impl()
@@ -87,7 +94,6 @@ public:
service_->destroy(implementation_);
}
-#if defined(ASIO_HAS_MOVE)
// Move-assign an I/O object.
io_object_impl& operator=(io_object_impl&& other)
{
@@ -101,10 +107,9 @@ public:
}
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
// Get the executor associated with the object.
- const executor_type& get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
return executor_;
}
@@ -137,7 +142,7 @@ private:
// Helper function to get an executor's context.
template <typename T>
static execution_context& get_context(const T& t,
- typename enable_if<execution::is_executor<T>::value>::type* = 0)
+ enable_if_t<execution::is_executor<T>::value>* = 0)
{
return asio::query(t, execution::context);
}
@@ -145,7 +150,7 @@ private:
// Helper function to get an executor's context.
template <typename T>
static execution_context& get_context(const T& t,
- typename enable_if<!execution::is_executor<T>::value>::type* = 0)
+ enable_if_t<!execution::is_executor<T>::value>* = 0)
{
return t.context();
}
diff --git a/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_at_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_at_op.hpp
new file mode 100644
index 00000000000..114bdb54297
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_at_op.hpp
@@ -0,0 +1,195 @@
+//
+// detail/io_uring_descriptor_read_at_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 ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_AT_OP_HPP
+#define ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_AT_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/cstdint.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class io_uring_descriptor_read_at_op_base : public io_uring_operation
+{
+public:
+ io_uring_descriptor_read_at_op_base(
+ const asio::error_code& success_ec, int descriptor,
+ descriptor_ops::state_type state, uint64_t offset,
+ const MutableBufferSequence& buffers, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_descriptor_read_at_op_base::do_prepare,
+ &io_uring_descriptor_read_at_op_base::do_perform, complete_func),
+ descriptor_(descriptor),
+ state_(state),
+ offset_(offset),
+ buffers_(buffers),
+ bufs_(buffers)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_at_op_base* o(
+ static_cast<io_uring_descriptor_read_at_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, POLLIN);
+ }
+ else if (o->bufs_.is_single_buffer && o->bufs_.is_registered_buffer)
+ {
+ ::io_uring_prep_read_fixed(sqe, o->descriptor_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ o->offset_, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_readv(sqe, o->descriptor_,
+ o->bufs_.buffers(), o->bufs_.count(), o->offset_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_at_op_base* o(
+ static_cast<io_uring_descriptor_read_at_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return descriptor_ops::non_blocking_read_at1(o->descriptor_,
+ o->offset_, o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->ec_,
+ o->bytes_transferred_);
+ }
+ else
+ {
+ return descriptor_ops::non_blocking_read_at(o->descriptor_,
+ o->offset_, o->bufs_.buffers(), o->bufs_.count(),
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+ else if (after_completion)
+ {
+ if (!o->ec_ && o->bytes_transferred_ == 0)
+ o->ec_ = asio::error::eof;
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= descriptor_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ int descriptor_;
+ descriptor_ops::state_type state_;
+ uint64_t offset_;
+ MutableBufferSequence buffers_;
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_;
+};
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_descriptor_read_at_op
+ : public io_uring_descriptor_read_at_op_base<MutableBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_descriptor_read_at_op);
+
+ io_uring_descriptor_read_at_op(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state, uint64_t offset,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_descriptor_read_at_op_base<MutableBufferSequence>(
+ success_ec, descriptor, state, offset, buffers,
+ &io_uring_descriptor_read_at_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_at_op* o
+ (static_cast<io_uring_descriptor_read_at_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_AT_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_op.hpp
new file mode 100644
index 00000000000..9f8cf70bca3
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_descriptor_read_op.hpp
@@ -0,0 +1,190 @@
+//
+// detail/io_uring_descriptor_read_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 ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_OP_HPP
+#define ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class io_uring_descriptor_read_op_base : public io_uring_operation
+{
+public:
+ io_uring_descriptor_read_op_base(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state,
+ const MutableBufferSequence& buffers, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_descriptor_read_op_base::do_prepare,
+ &io_uring_descriptor_read_op_base::do_perform, complete_func),
+ descriptor_(descriptor),
+ state_(state),
+ buffers_(buffers),
+ bufs_(buffers)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_op_base* o(
+ static_cast<io_uring_descriptor_read_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, POLLIN);
+ }
+ else if (o->bufs_.is_single_buffer && o->bufs_.is_registered_buffer)
+ {
+ ::io_uring_prep_read_fixed(sqe, o->descriptor_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ 0, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_readv(sqe, o->descriptor_,
+ o->bufs_.buffers(), o->bufs_.count(), -1);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_op_base* o(
+ static_cast<io_uring_descriptor_read_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return descriptor_ops::non_blocking_read1(
+ o->descriptor_, o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->ec_,
+ o->bytes_transferred_);
+ }
+ else
+ {
+ return descriptor_ops::non_blocking_read(
+ o->descriptor_, o->bufs_.buffers(), o->bufs_.count(),
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+ else if (after_completion)
+ {
+ if (!o->ec_ && o->bytes_transferred_ == 0)
+ o->ec_ = asio::error::eof;
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= descriptor_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ int descriptor_;
+ descriptor_ops::state_type state_;
+ MutableBufferSequence buffers_;
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_;
+};
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_descriptor_read_op
+ : public io_uring_descriptor_read_op_base<MutableBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_descriptor_read_op);
+
+ io_uring_descriptor_read_op(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_descriptor_read_op_base<MutableBufferSequence>(success_ec,
+ descriptor, state, buffers, &io_uring_descriptor_read_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_read_op* o
+ (static_cast<io_uring_descriptor_read_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_DESCRIPTOR_READ_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_descriptor_service.hpp b/3rdparty/asio/include/asio/detail/io_uring_descriptor_service.hpp
new file mode 100644
index 00000000000..04d1e36edd8
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_descriptor_service.hpp
@@ -0,0 +1,687 @@
+//
+// detail/io_uring_descriptor_service.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 ASIO_DETAIL_IO_URING_DESCRIPTOR_SERVICE_HPP
+#define ASIO_DETAIL_IO_URING_DESCRIPTOR_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/buffer.hpp"
+#include "asio/cancellation_type.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/io_uring_descriptor_read_at_op.hpp"
+#include "asio/detail/io_uring_descriptor_read_op.hpp"
+#include "asio/detail/io_uring_descriptor_write_at_op.hpp"
+#include "asio/detail/io_uring_descriptor_write_op.hpp"
+#include "asio/detail/io_uring_null_buffers_op.hpp"
+#include "asio/detail/io_uring_service.hpp"
+#include "asio/detail/io_uring_wait_op.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/noncopyable.hpp"
+#include "asio/posix/descriptor_base.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class io_uring_descriptor_service :
+ public execution_context_service_base<io_uring_descriptor_service>
+{
+public:
+ // The native type of a descriptor.
+ typedef int native_handle_type;
+
+ // The implementation type of the descriptor.
+ class implementation_type
+ : private asio::detail::noncopyable
+ {
+ public:
+ // Default constructor.
+ implementation_type()
+ : descriptor_(-1),
+ state_(0)
+ {
+ }
+
+ private:
+ // Only this service will have access to the internal values.
+ friend class io_uring_descriptor_service;
+
+ // The native descriptor representation.
+ int descriptor_;
+
+ // The current state of the descriptor.
+ descriptor_ops::state_type state_;
+
+ // Per I/O object data used by the io_uring_service.
+ io_uring_service::per_io_object_data io_object_data_;
+ };
+
+ // Constructor.
+ ASIO_DECL io_uring_descriptor_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ ASIO_DECL void shutdown();
+
+ // Construct a new descriptor implementation.
+ ASIO_DECL void construct(implementation_type& impl);
+
+ // Move-construct a new descriptor implementation.
+ ASIO_DECL void move_construct(implementation_type& impl,
+ implementation_type& other_impl) noexcept;
+
+ // Move-assign from another descriptor implementation.
+ ASIO_DECL void move_assign(implementation_type& impl,
+ io_uring_descriptor_service& other_service,
+ implementation_type& other_impl);
+
+ // Destroy a descriptor implementation.
+ ASIO_DECL void destroy(implementation_type& impl);
+
+ // Assign a native descriptor to a descriptor implementation.
+ ASIO_DECL asio::error_code assign(implementation_type& impl,
+ const native_handle_type& native_descriptor,
+ asio::error_code& ec);
+
+ // Determine whether the descriptor is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return impl.descriptor_ != -1;
+ }
+
+ // Destroy a descriptor implementation.
+ ASIO_DECL asio::error_code close(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Get the native descriptor representation.
+ native_handle_type native_handle(const implementation_type& impl) const
+ {
+ return impl.descriptor_;
+ }
+
+ // Release ownership of the native descriptor representation.
+ ASIO_DECL native_handle_type release(implementation_type& impl);
+
+ // Release ownership of the native descriptor representation.
+ native_handle_type release(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ ec = success_ec_;
+ return release(impl);
+ }
+
+ // Cancel all operations associated with the descriptor.
+ ASIO_DECL asio::error_code cancel(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Perform an IO control command on the descriptor.
+ template <typename IO_Control_Command>
+ asio::error_code io_control(implementation_type& impl,
+ IO_Control_Command& command, asio::error_code& ec)
+ {
+ descriptor_ops::ioctl(impl.descriptor_, impl.state_,
+ command.name(), static_cast<ioctl_arg_type*>(command.data()), ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the descriptor.
+ bool non_blocking(const implementation_type& impl) const
+ {
+ return (impl.state_ & descriptor_ops::user_set_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the descriptor.
+ asio::error_code non_blocking(implementation_type& impl,
+ bool mode, asio::error_code& ec)
+ {
+ descriptor_ops::set_user_non_blocking(
+ impl.descriptor_, impl.state_, mode, ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the native descriptor implementation.
+ bool native_non_blocking(const implementation_type& impl) const
+ {
+ return (impl.state_ & descriptor_ops::internal_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the native descriptor implementation.
+ asio::error_code native_non_blocking(implementation_type& impl,
+ bool mode, asio::error_code& ec)
+ {
+ descriptor_ops::set_internal_non_blocking(
+ impl.descriptor_, impl.state_, mode, ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Wait for the descriptor to become ready to read, ready to write, or to have
+ // pending error conditions.
+ asio::error_code wait(implementation_type& impl,
+ posix::descriptor_base::wait_type w, asio::error_code& ec)
+ {
+ switch (w)
+ {
+ case posix::descriptor_base::wait_read:
+ descriptor_ops::poll_read(impl.descriptor_, impl.state_, ec);
+ break;
+ case posix::descriptor_base::wait_write:
+ descriptor_ops::poll_write(impl.descriptor_, impl.state_, ec);
+ break;
+ case posix::descriptor_base::wait_error:
+ descriptor_ops::poll_error(impl.descriptor_, impl.state_, ec);
+ break;
+ default:
+ ec = asio::error::invalid_argument;
+ break;
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Asynchronously wait for the descriptor to become ready to read, ready to
+ // write, or to have pending error conditions.
+ template <typename Handler, typename IoExecutor>
+ void async_wait(implementation_type& impl,
+ posix::descriptor_base::wait_type w,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ int op_type;
+ int poll_flags;
+ switch (w)
+ {
+ case posix::descriptor_base::wait_read:
+ op_type = io_uring_service::read_op;
+ poll_flags = POLLIN;
+ break;
+ case posix::descriptor_base::wait_write:
+ op_type = io_uring_service::write_op;
+ poll_flags = POLLOUT;
+ break;
+ case posix::descriptor_base::wait_error:
+ op_type = io_uring_service::except_op;
+ poll_flags = POLLPRI | POLLERR | POLLHUP;
+ break;
+ default:
+ op_type = -1;
+ poll_flags = -1;
+ return;
+ }
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_wait_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_,
+ poll_flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected() && op_type != -1)
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "descriptor", &impl, impl.descriptor_, "async_wait"));
+
+ start_op(impl, op_type, p.p, is_continuation, op_type == -1);
+ p.v = p.p = 0;
+ }
+
+ // Write some data to the descriptor.
+ template <typename ConstBufferSequence>
+ size_t write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
+
+ size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = descriptor_ops::sync_write1(impl.descriptor_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+
+ n = descriptor_ops::sync_write(impl.descriptor_, impl.state_,
+ bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
+ }
+
+ // Wait until data can be written without blocking.
+ size_t write_some(implementation_type& impl,
+ const null_buffers&, asio::error_code& ec)
+ {
+ // Wait for descriptor to become ready.
+ descriptor_ops::poll_write(impl.descriptor_, impl.state_, ec);
+
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+
+ // Start an asynchronous write. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_descriptor_write_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_,
+ impl.state_, buffers, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "descriptor", &impl, impl.descriptor_, "async_write_some"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation,
+ buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence>::all_empty(buffers));
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be written without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const null_buffers&, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_, POLLOUT, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(),
+ *p.p, "descriptor", &impl, impl.descriptor_,
+ "async_write_some(null_buffers)"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Write some data to the descriptor at the specified offset.
+ template <typename ConstBufferSequence>
+ size_t write_some_at(implementation_type& impl, uint64_t offset,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
+
+ size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = descriptor_ops::sync_write_at1(impl.descriptor_,
+ impl.state_, offset, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+
+ n = descriptor_ops::sync_write_at(impl.descriptor_, impl.state_,
+ offset, bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
+ }
+
+ // Wait until data can be written without blocking.
+ size_t write_some_at(implementation_type& impl, uint64_t,
+ const null_buffers& buffers, asio::error_code& ec)
+ {
+ return write_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous write at the specified offset. The data being sent
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some_at(implementation_type& impl, uint64_t offset,
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_descriptor_write_at_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_,
+ impl.state_, offset, buffers, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "descriptor", &impl, impl.descriptor_, "async_write_some"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation,
+ buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence>::all_empty(buffers));
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be written without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_write_some_at(implementation_type& impl,
+ const null_buffers& buffers, Handler& handler, const IoExecutor& io_ex)
+ {
+ return async_write_some(impl, buffers, handler, io_ex);
+ }
+
+ // Read some data from the stream. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
+
+ size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = descriptor_ops::sync_read1(impl.descriptor_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+
+ n = descriptor_ops::sync_read(impl.descriptor_, impl.state_,
+ bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
+ }
+
+ // Wait until data can be read without blocking.
+ size_t read_some(implementation_type& impl,
+ const null_buffers&, asio::error_code& ec)
+ {
+ // Wait for descriptor to become ready.
+ descriptor_ops::poll_read(impl.descriptor_, impl.state_, ec);
+
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_descriptor_read_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_,
+ impl.state_, buffers, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::read_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "descriptor", &impl, impl.descriptor_, "async_read_some"));
+
+ start_op(impl, io_uring_service::read_op, p.p, is_continuation,
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence>::all_empty(buffers));
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be read without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const null_buffers&, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_, POLLIN, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::read_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(),
+ *p.p, "descriptor", &impl, impl.descriptor_,
+ "async_read_some(null_buffers)"));
+
+ start_op(impl, io_uring_service::read_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Read some data at the specified offset. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some_at(implementation_type& impl, uint64_t offset,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
+
+ if (bufs_type::is_single_buffer)
+ {
+ return descriptor_ops::sync_read_at1(impl.descriptor_,
+ impl.state_, offset, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+
+ return descriptor_ops::sync_read_at(impl.descriptor_, impl.state_,
+ offset, bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
+ }
+ }
+
+ // Wait until data can be read without blocking.
+ size_t read_some_at(implementation_type& impl, uint64_t,
+ const null_buffers& buffers, asio::error_code& ec)
+ {
+ return read_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some_at(implementation_type& impl,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_descriptor_read_at_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.descriptor_,
+ impl.state_, offset, buffers, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::read_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "descriptor", &impl, impl.descriptor_, "async_read_some"));
+
+ start_op(impl, io_uring_service::read_op, p.p, is_continuation,
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence>::all_empty(buffers));
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be read without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_read_some_at(implementation_type& impl, uint64_t,
+ const null_buffers& buffers, Handler& handler, const IoExecutor& io_ex)
+ {
+ return async_read_some(impl, buffers, handler, io_ex);
+ }
+
+private:
+ // Start the asynchronous operation.
+ ASIO_DECL void start_op(implementation_type& impl, int op_type,
+ io_uring_operation* op, bool is_continuation, bool noop);
+
+ // Helper class used to implement per-operation cancellation
+ class io_uring_op_cancellation
+ {
+ public:
+ io_uring_op_cancellation(io_uring_service* s,
+ io_uring_service::per_io_object_data* p, int o)
+ : io_uring_service_(s),
+ io_object_data_(p),
+ op_type_(o)
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ io_uring_service_->cancel_ops_by_key(*io_object_data_, op_type_, this);
+ }
+ }
+
+ private:
+ io_uring_service* io_uring_service_;
+ io_uring_service::per_io_object_data* io_object_data_;
+ int op_type_;
+ };
+
+ // The io_uring_service that performs event demultiplexing for the service.
+ io_uring_service& io_uring_service_;
+
+ // Cached success value to avoid accessing category singleton.
+ const asio::error_code success_ec_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/io_uring_descriptor_service.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_DESCRIPTOR_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_at_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_at_op.hpp
new file mode 100644
index 00000000000..10a3f7a6c3d
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_at_op.hpp
@@ -0,0 +1,189 @@
+//
+// detail/io_uring_descriptor_write_at_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 ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_AT_OP_HPP
+#define ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_AT_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence>
+class io_uring_descriptor_write_at_op_base : public io_uring_operation
+{
+public:
+ io_uring_descriptor_write_at_op_base(
+ const asio::error_code& success_ec, int descriptor,
+ descriptor_ops::state_type state, uint64_t offset,
+ const ConstBufferSequence& buffers, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_descriptor_write_at_op_base::do_prepare,
+ &io_uring_descriptor_write_at_op_base::do_perform, complete_func),
+ descriptor_(descriptor),
+ state_(state),
+ offset_(offset),
+ buffers_(buffers),
+ bufs_(buffers)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_at_op_base* o(
+ static_cast<io_uring_descriptor_write_at_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, POLLOUT);
+ }
+ else if (o->bufs_.is_single_buffer && o->bufs_.is_registered_buffer)
+ {
+ ::io_uring_prep_write_fixed(sqe, o->descriptor_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ o->offset_, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_writev(sqe, o->descriptor_,
+ o->bufs_.buffers(), o->bufs_.count(), o->offset_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_at_op_base* o(
+ static_cast<io_uring_descriptor_write_at_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return descriptor_ops::non_blocking_write_at1(o->descriptor_,
+ o->offset_, o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->ec_,
+ o->bytes_transferred_);
+ }
+ else
+ {
+ return descriptor_ops::non_blocking_write_at(o->descriptor_,
+ o->offset_, o->bufs_.buffers(), o->bufs_.count(),
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= descriptor_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ int descriptor_;
+ descriptor_ops::state_type state_;
+ uint64_t offset_;
+ ConstBufferSequence buffers_;
+ buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_;
+};
+
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_descriptor_write_at_op
+ : public io_uring_descriptor_write_at_op_base<ConstBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_descriptor_write_at_op);
+
+ io_uring_descriptor_write_at_op(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state, uint64_t offset,
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ : io_uring_descriptor_write_at_op_base<ConstBufferSequence>(
+ success_ec, descriptor, state, offset, buffers,
+ &io_uring_descriptor_write_at_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_at_op* o
+ (static_cast<io_uring_descriptor_write_at_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_AT_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_op.hpp
new file mode 100644
index 00000000000..090d644c7c8
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_descriptor_write_op.hpp
@@ -0,0 +1,185 @@
+//
+// detail/io_uring_descriptor_write_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 ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_OP_HPP
+#define ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence>
+class io_uring_descriptor_write_op_base : public io_uring_operation
+{
+public:
+ io_uring_descriptor_write_op_base(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state,
+ const ConstBufferSequence& buffers, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_descriptor_write_op_base::do_prepare,
+ &io_uring_descriptor_write_op_base::do_perform, complete_func),
+ descriptor_(descriptor),
+ state_(state),
+ buffers_(buffers),
+ bufs_(buffers)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_op_base* o(
+ static_cast<io_uring_descriptor_write_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, POLLOUT);
+ }
+ else if (o->bufs_.is_single_buffer && o->bufs_.is_registered_buffer)
+ {
+ ::io_uring_prep_write_fixed(sqe, o->descriptor_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ 0, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_writev(sqe, o->descriptor_,
+ o->bufs_.buffers(), o->bufs_.count(), -1);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_op_base* o(
+ static_cast<io_uring_descriptor_write_op_base*>(base));
+
+ if ((o->state_ & descriptor_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return descriptor_ops::non_blocking_write1(
+ o->descriptor_, o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->ec_,
+ o->bytes_transferred_);
+ }
+ else
+ {
+ return descriptor_ops::non_blocking_write(
+ o->descriptor_, o->bufs_.buffers(), o->bufs_.count(),
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= descriptor_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ int descriptor_;
+ descriptor_ops::state_type state_;
+ ConstBufferSequence buffers_;
+ buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_;
+};
+
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_descriptor_write_op
+ : public io_uring_descriptor_write_op_base<ConstBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_descriptor_write_op);
+
+ io_uring_descriptor_write_op(const asio::error_code& success_ec,
+ int descriptor, descriptor_ops::state_type state,
+ const ConstBufferSequence& buffers, Handler& handler,
+ const IoExecutor& io_ex)
+ : io_uring_descriptor_write_op_base<ConstBufferSequence>(success_ec,
+ descriptor, state, buffers, &io_uring_descriptor_write_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_descriptor_write_op* o
+ (static_cast<io_uring_descriptor_write_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_DESCRIPTOR_WRITE_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_file_service.hpp b/3rdparty/asio/include/asio/detail/io_uring_file_service.hpp
new file mode 100644
index 00000000000..3a0a4538623
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_file_service.hpp
@@ -0,0 +1,261 @@
+//
+// detail/io_uring_file_service.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 ASIO_DETAIL_IO_URING_FILE_SERVICE_HPP
+#define ASIO_DETAIL_IO_URING_FILE_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ && defined(ASIO_HAS_IO_URING)
+
+#include <string>
+#include "asio/detail/cstdint.hpp"
+#include "asio/detail/descriptor_ops.hpp"
+#include "asio/detail/io_uring_descriptor_service.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/file_base.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Extend the io_uring_descriptor_service to provide file support.
+class io_uring_file_service :
+ public execution_context_service_base<io_uring_file_service>
+{
+public:
+ typedef io_uring_descriptor_service descriptor_service;
+
+ // The native type of a file.
+ typedef descriptor_service::native_handle_type native_handle_type;
+
+ // The implementation type of the file.
+ class implementation_type : descriptor_service::implementation_type
+ {
+ private:
+ // Only this service will have access to the internal values.
+ friend class io_uring_file_service;
+
+ bool is_stream_;
+ };
+
+ ASIO_DECL io_uring_file_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ ASIO_DECL void shutdown();
+
+ // Construct a new file implementation.
+ void construct(implementation_type& impl)
+ {
+ descriptor_service_.construct(impl);
+ impl.is_stream_ = false;
+ }
+
+ // Move-construct a new file implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ descriptor_service_.move_construct(impl, other_impl);
+ impl.is_stream_ = other_impl.is_stream_;
+ }
+
+ // Move-assign from another file implementation.
+ void move_assign(implementation_type& impl,
+ io_uring_file_service& other_service,
+ implementation_type& other_impl)
+ {
+ descriptor_service_.move_assign(impl,
+ other_service.descriptor_service_, other_impl);
+ impl.is_stream_ = other_impl.is_stream_;
+ }
+
+ // Destroy a file implementation.
+ void destroy(implementation_type& impl)
+ {
+ descriptor_service_.destroy(impl);
+ }
+
+ // Open the file using the specified path name.
+ ASIO_DECL asio::error_code open(implementation_type& impl,
+ const char* path, file_base::flags open_flags,
+ asio::error_code& ec);
+
+ // Assign a native descriptor to a file implementation.
+ asio::error_code assign(implementation_type& impl,
+ const native_handle_type& native_descriptor,
+ asio::error_code& ec)
+ {
+ return descriptor_service_.assign(impl, native_descriptor, ec);
+ }
+
+ // Set whether the implementation is stream-oriented.
+ void set_is_stream(implementation_type& impl, bool is_stream)
+ {
+ impl.is_stream_ = is_stream;
+ }
+
+ // Determine whether the file is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return descriptor_service_.is_open(impl);
+ }
+
+ // Destroy a file implementation.
+ asio::error_code close(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return descriptor_service_.close(impl, ec);
+ }
+
+ // Get the native file representation.
+ native_handle_type native_handle(const implementation_type& impl) const
+ {
+ return descriptor_service_.native_handle(impl);
+ }
+
+ // Release ownership of the native descriptor representation.
+ native_handle_type release(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return descriptor_service_.release(impl, ec);
+ }
+
+ // Cancel all operations associated with the file.
+ asio::error_code cancel(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return descriptor_service_.cancel(impl, ec);
+ }
+
+ // Get the size of the file.
+ ASIO_DECL uint64_t size(const implementation_type& impl,
+ asio::error_code& ec) const;
+
+ // Alter the size of the file.
+ ASIO_DECL asio::error_code resize(implementation_type& impl,
+ uint64_t n, asio::error_code& ec);
+
+ // Synchronise the file to disk.
+ ASIO_DECL asio::error_code sync_all(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Synchronise the file data to disk.
+ ASIO_DECL asio::error_code sync_data(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Seek to a position in the file.
+ ASIO_DECL uint64_t seek(implementation_type& impl, int64_t offset,
+ file_base::seek_basis whence, asio::error_code& ec);
+
+ // Write the given data. Returns the number of bytes written.
+ template <typename ConstBufferSequence>
+ size_t write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ return descriptor_service_.write_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous write. The data being written must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ descriptor_service_.async_write_some(impl, buffers, handler, io_ex);
+ }
+
+ // Write the given data at the specified location. Returns the number of
+ // bytes written.
+ template <typename ConstBufferSequence>
+ size_t write_some_at(implementation_type& impl, uint64_t offset,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ return descriptor_service_.write_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous write at the specified location. The data being
+ // written must be valid for the lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some_at(implementation_type& impl,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ descriptor_service_.async_write_some_at(
+ impl, offset, buffers, handler, io_ex);
+ }
+
+ // Read some data. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ return descriptor_service_.read_some(impl, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ descriptor_service_.async_read_some(impl, buffers, handler, io_ex);
+ }
+
+ // Read some data. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some_at(implementation_type& impl, uint64_t offset,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ return descriptor_service_.read_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some_at(implementation_type& impl,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ descriptor_service_.async_read_some_at(
+ impl, offset, buffers, handler, io_ex);
+ }
+
+private:
+ // The implementation used for initiating asynchronous operations.
+ descriptor_service descriptor_service_;
+
+ // Cached success value to avoid accessing category singleton.
+ const asio::error_code success_ec_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/io_uring_file_service.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_FILE)
+ // && defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_FILE_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_null_buffers_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_null_buffers_op.hpp
new file mode 100644
index 00000000000..61fe6a6aafb
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_null_buffers_op.hpp
@@ -0,0 +1,114 @@
+//
+// detail/io_uring_null_buffers_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 ASIO_DETAIL_IO_URING_NULL_BUFFERS_OP_HPP
+#define ASIO_DETAIL_IO_URING_NULL_BUFFERS_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class io_uring_null_buffers_op : public io_uring_operation
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_null_buffers_op);
+
+ io_uring_null_buffers_op(const asio::error_code& success_ec,
+ int descriptor, int poll_flags, Handler& handler, const IoExecutor& io_ex)
+ : io_uring_operation(success_ec,
+ &io_uring_null_buffers_op::do_prepare,
+ &io_uring_null_buffers_op::do_perform,
+ &io_uring_null_buffers_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex),
+ descriptor_(descriptor),
+ poll_flags_(poll_flags)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_null_buffers_op* o(static_cast<io_uring_null_buffers_op*>(base));
+
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, o->poll_flags_);
+ }
+
+ static bool do_perform(io_uring_operation*, bool after_completion)
+ {
+ return after_completion;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_null_buffers_op* o(static_cast<io_uring_null_buffers_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+ int descriptor_;
+ int poll_flags_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_IO_URING_NULL_BUFFERS_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_operation.hpp b/3rdparty/asio/include/asio/detail/io_uring_operation.hpp
new file mode 100644
index 00000000000..f2635cc4074
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_operation.hpp
@@ -0,0 +1,84 @@
+//
+// detail/io_uring_operation.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 ASIO_DETAIL_IO_URING_OPERATION_HPP
+#define ASIO_DETAIL_IO_URING_OPERATION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include <liburing.h>
+#include "asio/detail/cstdint.hpp"
+#include "asio/detail/operation.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class io_uring_operation
+ : public operation
+{
+public:
+ // The error code to be passed to the completion handler.
+ asio::error_code ec_;
+
+ // The number of bytes transferred, to be passed to the completion handler.
+ std::size_t bytes_transferred_;
+
+ // The operation key used for targeted cancellation.
+ void* cancellation_key_;
+
+ // Prepare the operation.
+ void prepare(::io_uring_sqe* sqe)
+ {
+ return prepare_func_(this, sqe);
+ }
+
+ // Perform actions associated with the operation. Returns true when complete.
+ bool perform(bool after_completion)
+ {
+ return perform_func_(this, after_completion);
+ }
+
+protected:
+ typedef void (*prepare_func_type)(io_uring_operation*, ::io_uring_sqe*);
+ typedef bool (*perform_func_type)(io_uring_operation*, bool);
+
+ io_uring_operation(const asio::error_code& success_ec,
+ prepare_func_type prepare_func, perform_func_type perform_func,
+ func_type complete_func)
+ : operation(complete_func),
+ ec_(success_ec),
+ bytes_transferred_(0),
+ cancellation_key_(0),
+ prepare_func_(prepare_func),
+ perform_func_(perform_func)
+ {
+ }
+
+private:
+ prepare_func_type prepare_func_;
+ perform_func_type perform_func_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_OPERATION_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_service.hpp b/3rdparty/asio/include/asio/detail/io_uring_service.hpp
new file mode 100644
index 00000000000..2dd3c0bf14d
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_service.hpp
@@ -0,0 +1,319 @@
+//
+// detail/io_uring_service.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 ASIO_DETAIL_IO_URING_SERVICE_HPP
+#define ASIO_DETAIL_IO_URING_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include <liburing.h>
+#include "asio/detail/atomic_count.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/conditionally_enabled_mutex.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/limits.hpp"
+#include "asio/detail/object_pool.hpp"
+#include "asio/detail/op_queue.hpp"
+#include "asio/detail/reactor.hpp"
+#include "asio/detail/scheduler_task.hpp"
+#include "asio/detail/timer_queue_base.hpp"
+#include "asio/detail/timer_queue_set.hpp"
+#include "asio/detail/wait_op.hpp"
+#include "asio/execution_context.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class io_uring_service
+ : public execution_context_service_base<io_uring_service>,
+ public scheduler_task
+{
+private:
+ // The mutex type used by this reactor.
+ typedef conditionally_enabled_mutex mutex;
+
+public:
+ enum op_types { read_op = 0, write_op = 1, except_op = 2, max_ops = 3 };
+
+ class io_object;
+
+ // An I/O queue stores operations that must run serially.
+ class io_queue : operation
+ {
+ friend class io_uring_service;
+
+ io_object* io_object_;
+ op_queue<io_uring_operation> op_queue_;
+ bool cancel_requested_;
+
+ ASIO_DECL io_queue();
+ void set_result(int r) { task_result_ = static_cast<unsigned>(r); }
+ ASIO_DECL operation* perform_io(int result);
+ ASIO_DECL static void do_complete(void* owner, operation* base,
+ const asio::error_code& ec, std::size_t bytes_transferred);
+ };
+
+ // Per I/O object state.
+ class io_object
+ {
+ friend class io_uring_service;
+ friend class object_pool_access;
+
+ io_object* next_;
+ io_object* prev_;
+
+ mutex mutex_;
+ io_uring_service* service_;
+ io_queue queues_[max_ops];
+ bool shutdown_;
+
+ ASIO_DECL io_object(bool locking);
+ };
+
+ // Per I/O object data.
+ typedef io_object* per_io_object_data;
+
+ // Constructor.
+ ASIO_DECL io_uring_service(asio::execution_context& ctx);
+
+ // Destructor.
+ ASIO_DECL ~io_uring_service();
+
+ // Destroy all user-defined handler objects owned by the service.
+ ASIO_DECL void shutdown();
+
+ // Recreate internal state following a fork.
+ ASIO_DECL void notify_fork(
+ asio::execution_context::fork_event fork_ev);
+
+ // Initialise the task.
+ ASIO_DECL void init_task();
+
+ // Register an I/O object with io_uring.
+ ASIO_DECL void register_io_object(io_object*& io_obj);
+
+ // Register an internal I/O object with io_uring.
+ ASIO_DECL void register_internal_io_object(
+ io_object*& io_obj, int op_type, io_uring_operation* op);
+
+ // Register buffers with io_uring.
+ ASIO_DECL void register_buffers(const ::iovec* v, unsigned n);
+
+ // Unregister buffers from io_uring.
+ ASIO_DECL void unregister_buffers();
+
+ // Post an operation for immediate completion.
+ void post_immediate_completion(operation* op, bool is_continuation);
+
+ // Start a new operation. The operation will be prepared and submitted to the
+ // io_uring when it is at the head of its I/O operation queue.
+ ASIO_DECL void start_op(int op_type, per_io_object_data& io_obj,
+ io_uring_operation* op, bool is_continuation);
+
+ // Cancel all operations associated with the given I/O object. The handlers
+ // associated with the I/O object will be invoked with the operation_aborted
+ // error.
+ ASIO_DECL void cancel_ops(per_io_object_data& io_obj);
+
+ // Cancel all operations associated with the given I/O object and key. The
+ // handlers associated with the object and key will be invoked with the
+ // operation_aborted error.
+ ASIO_DECL void cancel_ops_by_key(per_io_object_data& io_obj,
+ int op_type, void* cancellation_key);
+
+ // Cancel any operations that are running against the I/O object and remove
+ // its registration from the service. The service resources associated with
+ // the I/O object must be released by calling cleanup_io_object.
+ ASIO_DECL void deregister_io_object(per_io_object_data& io_obj);
+
+ // Perform any post-deregistration cleanup tasks associated with the I/O
+ // object.
+ ASIO_DECL void cleanup_io_object(per_io_object_data& io_obj);
+
+ // Add a new timer queue to the reactor.
+ template <typename Time_Traits>
+ void add_timer_queue(timer_queue<Time_Traits>& timer_queue);
+
+ // Remove a timer queue from the reactor.
+ template <typename Time_Traits>
+ void remove_timer_queue(timer_queue<Time_Traits>& timer_queue);
+
+ // Schedule a new operation in the given timer queue to expire at the
+ // specified absolute time.
+ template <typename Time_Traits>
+ void schedule_timer(timer_queue<Time_Traits>& queue,
+ const typename Time_Traits::time_type& time,
+ typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op);
+
+ // Cancel the timer operations associated with the given token. Returns the
+ // number of operations that have been posted or dispatched.
+ template <typename Time_Traits>
+ std::size_t cancel_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& timer,
+ std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
+
+ // Cancel the timer operations associated with the given key.
+ template <typename Time_Traits>
+ void cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key);
+
+ // Move the timer operations associated with the given timer.
+ template <typename Time_Traits>
+ void move_timer(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data& target,
+ typename timer_queue<Time_Traits>::per_timer_data& source);
+
+ // Wait on io_uring once until interrupted or events are ready to be
+ // dispatched.
+ ASIO_DECL void run(long usec, op_queue<operation>& ops);
+
+ // Interrupt the io_uring wait.
+ ASIO_DECL void interrupt();
+
+private:
+ // The hint to pass to io_uring_queue_init to size its data structures.
+ enum { ring_size = 16384 };
+
+ // The number of operations to submit in a batch.
+ enum { submit_batch_size = 128 };
+
+ // The number of operations to complete in a batch.
+ enum { complete_batch_size = 128 };
+
+ // The type used for processing eventfd readiness notifications.
+ class event_fd_read_op;
+
+ // Initialise the ring.
+ ASIO_DECL void init_ring();
+
+ // Register the eventfd descriptor for readiness notifications.
+ ASIO_DECL void register_with_reactor();
+
+ // Allocate a new I/O object.
+ ASIO_DECL io_object* allocate_io_object();
+
+ // Free an existing I/O object.
+ ASIO_DECL void free_io_object(io_object* s);
+
+ // Helper function to cancel all operations associated with the given I/O
+ // object. This function must be called while the I/O object's mutex is held.
+ // Returns true if there are operations for which cancellation is pending.
+ ASIO_DECL bool do_cancel_ops(
+ per_io_object_data& io_obj, op_queue<operation>& ops);
+
+ // Helper function to add a new timer queue.
+ ASIO_DECL void do_add_timer_queue(timer_queue_base& queue);
+
+ // Helper function to remove a timer queue.
+ ASIO_DECL void do_remove_timer_queue(timer_queue_base& queue);
+
+ // Called to recalculate and update the timeout.
+ ASIO_DECL void update_timeout();
+
+ // Get the current timeout value.
+ ASIO_DECL __kernel_timespec get_timeout() const;
+
+ // Get a new submission queue entry, flushing the queue if necessary.
+ ASIO_DECL ::io_uring_sqe* get_sqe();
+
+ // Submit pending submission queue entries.
+ ASIO_DECL void submit_sqes();
+
+ // Post an operation to submit the pending submission queue entries.
+ ASIO_DECL void post_submit_sqes_op(mutex::scoped_lock& lock);
+
+ // Push an operation to submit the pending submission queue entries.
+ ASIO_DECL void push_submit_sqes_op(op_queue<operation>& ops);
+
+ // Helper operation to submit pending submission queue entries.
+ class submit_sqes_op : operation
+ {
+ friend class io_uring_service;
+
+ io_uring_service* service_;
+
+ ASIO_DECL submit_sqes_op(io_uring_service* s);
+ ASIO_DECL static void do_complete(void* owner, operation* base,
+ const asio::error_code& ec, std::size_t bytes_transferred);
+ };
+
+ // The scheduler implementation used to post completions.
+ scheduler& scheduler_;
+
+ // Mutex to protect access to internal data.
+ mutex mutex_;
+
+ // The ring.
+ ::io_uring ring_;
+
+ // The count of unfinished work.
+ atomic_count outstanding_work_;
+
+ // The operation used to submit the pending submission queue entries.
+ submit_sqes_op submit_sqes_op_;
+
+ // The number of pending submission queue entries_.
+ int pending_sqes_;
+
+ // Whether there is a pending submission operation.
+ bool pending_submit_sqes_op_;
+
+ // Whether the service has been shut down.
+ bool shutdown_;
+
+ // The timer queues.
+ timer_queue_set timer_queues_;
+
+ // The timespec for the pending timeout operation. Must remain valid while the
+ // operation is outstanding.
+ __kernel_timespec timeout_;
+
+ // Mutex to protect access to the registered I/O objects.
+ mutex registration_mutex_;
+
+ // Keep track of all registered I/O objects.
+ object_pool<io_object> registered_io_objects_;
+
+ // Helper class to do post-perform_io cleanup.
+ struct perform_io_cleanup_on_block_exit;
+ friend struct perform_io_cleanup_on_block_exit;
+
+ // The reactor used to register for eventfd readiness.
+ reactor& reactor_;
+
+ // The per-descriptor reactor data used for the eventfd.
+ reactor::per_descriptor_data reactor_data_;
+
+ // The eventfd descriptor used to wait for readiness.
+ int event_fd_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/detail/impl/io_uring_service.hpp"
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/io_uring_service.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_accept_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_accept_op.hpp
new file mode 100644
index 00000000000..dbf1a98b536
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_accept_op.hpp
@@ -0,0 +1,280 @@
+//
+// detail/io_uring_socket_accept_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 ASIO_DETAIL_IO_URING_SOCKET_ACCEPT_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_ACCEPT_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/socket_holder.hpp"
+#include "asio/detail/socket_ops.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Socket, typename Protocol>
+class io_uring_socket_accept_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_accept_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state, Socket& peer,
+ const Protocol& protocol, typename Protocol::endpoint* peer_endpoint,
+ func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_accept_op_base::do_prepare,
+ &io_uring_socket_accept_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ peer_(peer),
+ protocol_(protocol),
+ peer_endpoint_(peer_endpoint),
+ addrlen_(peer_endpoint ? peer_endpoint->capacity() : 0)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_accept_op_base* o(
+ static_cast<io_uring_socket_accept_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->socket_, POLLIN);
+ }
+ else
+ {
+ ::io_uring_prep_accept(sqe, o->socket_,
+ o->peer_endpoint_ ? o->peer_endpoint_->data() : 0,
+ o->peer_endpoint_ ? &o->addrlen_ : 0, 0);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_accept_op_base* o(
+ static_cast<io_uring_socket_accept_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ socket_type new_socket = invalid_socket;
+ std::size_t addrlen = static_cast<std::size_t>(o->addrlen_);
+ bool result = socket_ops::non_blocking_accept(o->socket_,
+ o->state_, o->peer_endpoint_ ? o->peer_endpoint_->data() : 0,
+ o->peer_endpoint_ ? &addrlen : 0, o->ec_, new_socket);
+ o->new_socket_.reset(new_socket);
+ o->addrlen_ = static_cast<socklen_t>(addrlen);
+ return result;
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ if (after_completion && !o->ec_)
+ o->new_socket_.reset(static_cast<int>(o->bytes_transferred_));
+
+ return after_completion;
+ }
+
+ void do_assign()
+ {
+ if (new_socket_.get() != invalid_socket)
+ {
+ if (peer_endpoint_)
+ peer_endpoint_->resize(addrlen_);
+ peer_.assign(protocol_, new_socket_.get(), ec_);
+ if (!ec_)
+ new_socket_.release();
+ }
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ socket_holder new_socket_;
+ Socket& peer_;
+ Protocol protocol_;
+ typename Protocol::endpoint* peer_endpoint_;
+ socklen_t addrlen_;
+};
+
+template <typename Socket, typename Protocol,
+ typename Handler, typename IoExecutor>
+class io_uring_socket_accept_op :
+ public io_uring_socket_accept_op_base<Socket, Protocol>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_accept_op);
+
+ io_uring_socket_accept_op(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state, Socket& peer,
+ const Protocol& protocol, typename Protocol::endpoint* peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_accept_op_base<Socket, Protocol>(
+ success_ec, socket, state, peer, protocol, peer_endpoint,
+ &io_uring_socket_accept_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_accept_op* o(static_cast<io_uring_socket_accept_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ // On success, assign new connection to peer socket object.
+ if (owner)
+ o->do_assign();
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+template <typename Protocol, typename PeerIoExecutor,
+ typename Handler, typename IoExecutor>
+class io_uring_socket_move_accept_op :
+ private Protocol::socket::template rebind_executor<PeerIoExecutor>::other,
+ public io_uring_socket_accept_op_base<
+ typename Protocol::socket::template rebind_executor<PeerIoExecutor>::other,
+ Protocol>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_move_accept_op);
+
+ io_uring_socket_move_accept_op(const asio::error_code& success_ec,
+ const PeerIoExecutor& peer_io_ex, socket_type socket,
+ socket_ops::state_type state, const Protocol& protocol,
+ typename Protocol::endpoint* peer_endpoint, Handler& handler,
+ const IoExecutor& io_ex)
+ : peer_socket_type(peer_io_ex),
+ io_uring_socket_accept_op_base<peer_socket_type, Protocol>(
+ success_ec, socket, state, *this, protocol, peer_endpoint,
+ &io_uring_socket_move_accept_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_move_accept_op* o(
+ static_cast<io_uring_socket_move_accept_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ // On success, assign new connection to peer socket object.
+ if (owner)
+ o->do_assign();
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::move_binder2<Handler,
+ asio::error_code, peer_socket_type>
+ handler(0, static_cast<Handler&&>(o->handler_), o->ec_,
+ static_cast<peer_socket_type&&>(*o));
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ typedef typename Protocol::socket::template
+ rebind_executor<PeerIoExecutor>::other peer_socket_type;
+
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_ACCEPT_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_connect_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_connect_op.hpp
new file mode 100644
index 00000000000..45d30c6bb0a
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_connect_op.hpp
@@ -0,0 +1,140 @@
+//
+// detail/io_uring_socket_connect_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 ASIO_DETAIL_IO_URING_SOCKET_CONNECT_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_CONNECT_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/socket_ops.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Protocol>
+class io_uring_socket_connect_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_connect_op_base(const asio::error_code& success_ec,
+ socket_type socket, const typename Protocol::endpoint& endpoint,
+ func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_connect_op_base::do_prepare,
+ &io_uring_socket_connect_op_base::do_perform, complete_func),
+ socket_(socket),
+ endpoint_(endpoint)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_connect_op_base* o(
+ static_cast<io_uring_socket_connect_op_base*>(base));
+
+ ::io_uring_prep_connect(sqe, o->socket_,
+ static_cast<sockaddr*>(o->endpoint_.data()),
+ static_cast<socklen_t>(o->endpoint_.size()));
+ }
+
+ static bool do_perform(io_uring_operation*, bool after_completion)
+ {
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ typename Protocol::endpoint endpoint_;
+};
+
+template <typename Protocol, typename Handler, typename IoExecutor>
+class io_uring_socket_connect_op :
+ public io_uring_socket_connect_op_base<Protocol>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_connect_op);
+
+ io_uring_socket_connect_op(const asio::error_code& success_ec,
+ socket_type socket, const typename Protocol::endpoint& endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_connect_op_base<Protocol>(success_ec, socket,
+ endpoint, &io_uring_socket_connect_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_connect_op* o
+ (static_cast<io_uring_socket_connect_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_CONNECT_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_recv_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_recv_op.hpp
new file mode 100644
index 00000000000..b1936c1ab93
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_recv_op.hpp
@@ -0,0 +1,205 @@
+//
+// detail/io_uring_socket_recv_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 ASIO_DETAIL_IO_URING_SOCKET_RECV_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_RECV_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class io_uring_socket_recv_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_recv_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_recv_op_base::do_prepare,
+ &io_uring_socket_recv_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ flags_(flags),
+ bufs_(buffers),
+ msghdr_()
+ {
+ msghdr_.msg_iov = bufs_.buffers();
+ msghdr_.msg_iovlen = static_cast<int>(bufs_.count());
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recv_op_base* o(
+ static_cast<io_uring_socket_recv_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->flags_ & socket_base::message_out_of_band) != 0;
+ ::io_uring_prep_poll_add(sqe, o->socket_, except_op ? POLLPRI : POLLIN);
+ }
+ else if (o->bufs_.is_single_buffer
+ && o->bufs_.is_registered_buffer && o->flags_ == 0)
+ {
+ ::io_uring_prep_read_fixed(sqe, o->socket_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ 0, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_recvmsg(sqe, o->socket_, &o->msghdr_, o->flags_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recv_op_base* o(
+ static_cast<io_uring_socket_recv_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->flags_ & socket_base::message_out_of_band) != 0;
+ if (after_completion || !except_op)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return socket_ops::non_blocking_recv1(o->socket_,
+ o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->flags_,
+ (o->state_ & socket_ops::stream_oriented) != 0,
+ o->ec_, o->bytes_transferred_);
+ }
+ else
+ {
+ return socket_ops::non_blocking_recv(o->socket_,
+ o->bufs_.buffers(), o->bufs_.count(), o->flags_,
+ (o->state_ & socket_ops::stream_oriented) != 0,
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+ }
+ else if (after_completion)
+ {
+ if (!o->ec_ && o->bytes_transferred_ == 0)
+ if ((o->state_ & socket_ops::stream_oriented) != 0)
+ o->ec_ = asio::error::eof;
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ MutableBufferSequence buffers_;
+ socket_base::message_flags flags_;
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_;
+ msghdr msghdr_;
+};
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_socket_recv_op
+ : public io_uring_socket_recv_op_base<MutableBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_recv_op);
+
+ io_uring_socket_recv_op(const asio::error_code& success_ec,
+ int socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_recv_op_base<MutableBufferSequence>(success_ec,
+ socket, state, buffers, flags, &io_uring_socket_recv_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recv_op* o
+ (static_cast<io_uring_socket_recv_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_RECV_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_recvfrom_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_recvfrom_op.hpp
new file mode 100644
index 00000000000..dfd30e4f2a1
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_recvfrom_op.hpp
@@ -0,0 +1,206 @@
+//
+// detail/io_uring_socket_recvfrom_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 ASIO_DETAIL_IO_URING_SOCKET_RECVFROM_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_RECVFROM_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence, typename Endpoint>
+class io_uring_socket_recvfrom_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_recvfrom_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers, Endpoint& endpoint,
+ socket_base::message_flags flags, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_recvfrom_op_base::do_prepare,
+ &io_uring_socket_recvfrom_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ sender_endpoint_(endpoint),
+ flags_(flags),
+ bufs_(buffers),
+ msghdr_()
+ {
+ msghdr_.msg_iov = bufs_.buffers();
+ msghdr_.msg_iovlen = static_cast<int>(bufs_.count());
+ msghdr_.msg_name = static_cast<sockaddr*>(
+ static_cast<void*>(sender_endpoint_.data()));
+ msghdr_.msg_namelen = sender_endpoint_.capacity();
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvfrom_op_base* o(
+ static_cast<io_uring_socket_recvfrom_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->flags_ & socket_base::message_out_of_band) != 0;
+ ::io_uring_prep_poll_add(sqe, o->socket_, except_op ? POLLPRI : POLLIN);
+ }
+ else
+ {
+ ::io_uring_prep_recvmsg(sqe, o->socket_, &o->msghdr_, o->flags_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvfrom_op_base* o(
+ static_cast<io_uring_socket_recvfrom_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->flags_ & socket_base::message_out_of_band) != 0;
+ if (after_completion || !except_op)
+ {
+ std::size_t addr_len = o->sender_endpoint_.capacity();
+ bool result;
+ if (o->bufs_.is_single_buffer)
+ {
+ result = socket_ops::non_blocking_recvfrom1(o->socket_,
+ o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->flags_,
+ o->sender_endpoint_.data(), &addr_len,
+ o->ec_, o->bytes_transferred_);
+ }
+ else
+ {
+ result = socket_ops::non_blocking_recvfrom(o->socket_,
+ o->bufs_.buffers(), o->bufs_.count(), o->flags_,
+ o->sender_endpoint_.data(), &addr_len,
+ o->ec_, o->bytes_transferred_);
+ }
+ if (result && !o->ec_)
+ o->sender_endpoint_.resize(addr_len);
+ }
+ }
+ else if (after_completion && !o->ec_)
+ o->sender_endpoint_.resize(o->msghdr_.msg_namelen);
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ MutableBufferSequence buffers_;
+ Endpoint& sender_endpoint_;
+ socket_base::message_flags flags_;
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_;
+ msghdr msghdr_;
+};
+
+template <typename MutableBufferSequence, typename Endpoint,
+ typename Handler, typename IoExecutor>
+class io_uring_socket_recvfrom_op
+ : public io_uring_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_recvfrom_op);
+
+ io_uring_socket_recvfrom_op(const asio::error_code& success_ec,
+ int socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers, Endpoint& endpoint,
+ socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>(
+ success_ec, socket, state, buffers, endpoint, flags,
+ &io_uring_socket_recvfrom_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvfrom_op* o
+ (static_cast<io_uring_socket_recvfrom_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_RECVFROM_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_recvmsg_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_recvmsg_op.hpp
new file mode 100644
index 00000000000..778d0fa3acf
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_recvmsg_op.hpp
@@ -0,0 +1,192 @@
+//
+// detail/io_uring_socket_recvmsg_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 ASIO_DETAIL_IO_URING_SOCKET_RECVMSG_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_RECVMSG_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename MutableBufferSequence>
+class io_uring_socket_recvmsg_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_recvmsg_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_recvmsg_op_base::do_prepare,
+ &io_uring_socket_recvmsg_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ in_flags_(in_flags),
+ out_flags_(out_flags),
+ bufs_(buffers),
+ msghdr_()
+ {
+ msghdr_.msg_iov = bufs_.buffers();
+ msghdr_.msg_iovlen = static_cast<int>(bufs_.count());
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvmsg_op_base* o(
+ static_cast<io_uring_socket_recvmsg_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->in_flags_ & socket_base::message_out_of_band) != 0;
+ ::io_uring_prep_poll_add(sqe, o->socket_, except_op ? POLLPRI : POLLIN);
+ }
+ else
+ {
+ ::io_uring_prep_recvmsg(sqe, o->socket_, &o->msghdr_, o->in_flags_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvmsg_op_base* o(
+ static_cast<io_uring_socket_recvmsg_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ bool except_op = (o->in_flags_ & socket_base::message_out_of_band) != 0;
+ if (after_completion || !except_op)
+ {
+ return socket_ops::non_blocking_recvmsg(o->socket_,
+ o->bufs_.buffers(), o->bufs_.count(), o->in_flags_,
+ o->out_flags_, o->ec_, o->bytes_transferred_);
+ }
+ }
+ else if (after_completion)
+ {
+ if (!o->ec_)
+ o->out_flags_ = o->msghdr_.msg_flags;
+ else
+ o->out_flags_ = 0;
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ MutableBufferSequence buffers_;
+ socket_base::message_flags in_flags_;
+ socket_base::message_flags& out_flags_;
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_;
+ msghdr msghdr_;
+};
+
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_socket_recvmsg_op
+ : public io_uring_socket_recvmsg_op_base<MutableBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_recvmsg_op);
+
+ io_uring_socket_recvmsg_op(const asio::error_code& success_ec,
+ int socket, socket_ops::state_type state,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_recvmsg_op_base<MutableBufferSequence>(success_ec,
+ socket, state, buffers, in_flags, out_flags,
+ &io_uring_socket_recvmsg_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_recvmsg_op* o
+ (static_cast<io_uring_socket_recvmsg_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_RECVMSG_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_send_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_send_op.hpp
new file mode 100644
index 00000000000..2f57dae920d
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_send_op.hpp
@@ -0,0 +1,191 @@
+//
+// detail/io_uring_socket_send_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 ASIO_DETAIL_IO_URING_SOCKET_SEND_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_SEND_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence>
+class io_uring_socket_send_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_send_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_send_op_base::do_prepare,
+ &io_uring_socket_send_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ flags_(flags),
+ bufs_(buffers),
+ msghdr_()
+ {
+ msghdr_.msg_iov = bufs_.buffers();
+ msghdr_.msg_iovlen = static_cast<int>(bufs_.count());
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_send_op_base* o(
+ static_cast<io_uring_socket_send_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->socket_, POLLOUT);
+ }
+ else if (o->bufs_.is_single_buffer
+ && o->bufs_.is_registered_buffer && o->flags_ == 0)
+ {
+ ::io_uring_prep_write_fixed(sqe, o->socket_,
+ o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len,
+ 0, o->bufs_.registered_id().native_handle());
+ }
+ else
+ {
+ ::io_uring_prep_sendmsg(sqe, o->socket_, &o->msghdr_, o->flags_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_send_op_base* o(
+ static_cast<io_uring_socket_send_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return socket_ops::non_blocking_send1(o->socket_,
+ o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->flags_,
+ o->ec_, o->bytes_transferred_);
+ }
+ else
+ {
+ return socket_ops::non_blocking_send(o->socket_,
+ o->bufs_.buffers(), o->bufs_.count(), o->flags_,
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ ConstBufferSequence buffers_;
+ socket_base::message_flags flags_;
+ buffer_sequence_adapter<asio::const_buffer, ConstBufferSequence> bufs_;
+ msghdr msghdr_;
+};
+
+template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+class io_uring_socket_send_op
+ : public io_uring_socket_send_op_base<ConstBufferSequence>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_send_op);
+
+ io_uring_socket_send_op(const asio::error_code& success_ec,
+ int socket, socket_ops::state_type state,
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_send_op_base<ConstBufferSequence>(success_ec,
+ socket, state, buffers, flags, &io_uring_socket_send_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_send_op* o
+ (static_cast<io_uring_socket_send_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_SEND_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_sendto_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_sendto_op.hpp
new file mode 100644
index 00000000000..1866938a4b4
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_sendto_op.hpp
@@ -0,0 +1,194 @@
+//
+// detail/io_uring_socket_sendto_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 ASIO_DETAIL_IO_URING_SOCKET_SENDTO_OP_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_SENDTO_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename ConstBufferSequence, typename Endpoint>
+class io_uring_socket_sendto_op_base : public io_uring_operation
+{
+public:
+ io_uring_socket_sendto_op_base(const asio::error_code& success_ec,
+ socket_type socket, socket_ops::state_type state,
+ const ConstBufferSequence& buffers, const Endpoint& endpoint,
+ socket_base::message_flags flags, func_type complete_func)
+ : io_uring_operation(success_ec,
+ &io_uring_socket_sendto_op_base::do_prepare,
+ &io_uring_socket_sendto_op_base::do_perform, complete_func),
+ socket_(socket),
+ state_(state),
+ buffers_(buffers),
+ destination_(endpoint),
+ flags_(flags),
+ bufs_(buffers),
+ msghdr_()
+ {
+ msghdr_.msg_iov = bufs_.buffers();
+ msghdr_.msg_iovlen = static_cast<int>(bufs_.count());
+ msghdr_.msg_name = static_cast<sockaddr*>(
+ static_cast<void*>(destination_.data()));
+ msghdr_.msg_namelen = destination_.size();
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_sendto_op_base* o(
+ static_cast<io_uring_socket_sendto_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ ::io_uring_prep_poll_add(sqe, o->socket_, POLLOUT);
+ }
+ else
+ {
+ ::io_uring_prep_sendmsg(sqe, o->socket_, &o->msghdr_, o->flags_);
+ }
+ }
+
+ static bool do_perform(io_uring_operation* base, bool after_completion)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_sendto_op_base* o(
+ static_cast<io_uring_socket_sendto_op_base*>(base));
+
+ if ((o->state_ & socket_ops::internal_non_blocking) != 0)
+ {
+ if (o->bufs_.is_single_buffer)
+ {
+ return socket_ops::non_blocking_sendto1(o->socket_,
+ o->bufs_.first(o->buffers_).data(),
+ o->bufs_.first(o->buffers_).size(), o->flags_,
+ o->destination_.data(), o->destination_.size(),
+ o->ec_, o->bytes_transferred_);
+ }
+ else
+ {
+ return socket_ops::non_blocking_sendto(o->socket_,
+ o->bufs_.buffers(), o->bufs_.count(), o->flags_,
+ o->destination_.data(), o->destination_.size(),
+ o->ec_, o->bytes_transferred_);
+ }
+ }
+
+ if (o->ec_ && o->ec_ == asio::error::would_block)
+ {
+ o->state_ |= socket_ops::internal_non_blocking;
+ return false;
+ }
+
+ return after_completion;
+ }
+
+private:
+ socket_type socket_;
+ socket_ops::state_type state_;
+ ConstBufferSequence buffers_;
+ Endpoint destination_;
+ socket_base::message_flags flags_;
+ buffer_sequence_adapter<asio::const_buffer, ConstBufferSequence> bufs_;
+ msghdr msghdr_;
+};
+
+template <typename ConstBufferSequence, typename Endpoint,
+ typename Handler, typename IoExecutor>
+class io_uring_socket_sendto_op
+ : public io_uring_socket_sendto_op_base<ConstBufferSequence, Endpoint>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_socket_sendto_op);
+
+ io_uring_socket_sendto_op(const asio::error_code& success_ec,
+ int socket, socket_ops::state_type state,
+ const ConstBufferSequence& buffers, const Endpoint& endpoint,
+ socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ : io_uring_socket_sendto_op_base<ConstBufferSequence, Endpoint>(
+ success_ec, socket, state, buffers, endpoint, flags,
+ &io_uring_socket_sendto_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_socket_sendto_op* o
+ (static_cast<io_uring_socket_sendto_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_SENDTO_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_service.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_service.hpp
new file mode 100644
index 00000000000..3daa22ef797
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_service.hpp
@@ -0,0 +1,629 @@
+//
+// detail/io_uring_socket_service.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 ASIO_DETAIL_IO_URING_SOCKET_SERVICE_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/buffer.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/socket_base.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/noncopyable.hpp"
+#include "asio/detail/io_uring_null_buffers_op.hpp"
+#include "asio/detail/io_uring_service.hpp"
+#include "asio/detail/io_uring_socket_accept_op.hpp"
+#include "asio/detail/io_uring_socket_connect_op.hpp"
+#include "asio/detail/io_uring_socket_recvfrom_op.hpp"
+#include "asio/detail/io_uring_socket_sendto_op.hpp"
+#include "asio/detail/io_uring_socket_service_base.hpp"
+#include "asio/detail/socket_holder.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/socket_types.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Protocol>
+class io_uring_socket_service :
+ public execution_context_service_base<io_uring_socket_service<Protocol>>,
+ public io_uring_socket_service_base
+{
+public:
+ // The protocol type.
+ typedef Protocol protocol_type;
+
+ // The endpoint type.
+ typedef typename Protocol::endpoint endpoint_type;
+
+ // The native type of a socket.
+ typedef socket_type native_handle_type;
+
+ // The implementation type of the socket.
+ struct implementation_type :
+ io_uring_socket_service_base::base_implementation_type
+ {
+ // Default constructor.
+ implementation_type()
+ : protocol_(endpoint_type().protocol())
+ {
+ }
+
+ // The protocol associated with the socket.
+ protocol_type protocol_;
+ };
+
+ // Constructor.
+ io_uring_socket_service(execution_context& context)
+ : execution_context_service_base<
+ io_uring_socket_service<Protocol>>(context),
+ io_uring_socket_service_base(context)
+ {
+ }
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown()
+ {
+ this->base_shutdown();
+ }
+
+ // Move-construct a new socket implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl) noexcept
+ {
+ this->base_move_construct(impl, other_impl);
+
+ impl.protocol_ = other_impl.protocol_;
+ other_impl.protocol_ = endpoint_type().protocol();
+ }
+
+ // Move-assign from another socket implementation.
+ void move_assign(implementation_type& impl,
+ io_uring_socket_service_base& other_service,
+ implementation_type& other_impl)
+ {
+ this->base_move_assign(impl, other_service, other_impl);
+
+ impl.protocol_ = other_impl.protocol_;
+ other_impl.protocol_ = endpoint_type().protocol();
+ }
+
+ // Move-construct a new socket implementation from another protocol type.
+ template <typename Protocol1>
+ void converting_move_construct(implementation_type& impl,
+ io_uring_socket_service<Protocol1>&,
+ typename io_uring_socket_service<
+ Protocol1>::implementation_type& other_impl)
+ {
+ this->base_move_construct(impl, other_impl);
+
+ impl.protocol_ = protocol_type(other_impl.protocol_);
+ other_impl.protocol_ = typename Protocol1::endpoint().protocol();
+ }
+
+ // Open a new socket implementation.
+ asio::error_code open(implementation_type& impl,
+ const protocol_type& protocol, asio::error_code& ec)
+ {
+ if (!do_open(impl, protocol.family(),
+ protocol.type(), protocol.protocol(), ec))
+ impl.protocol_ = protocol;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Assign a native socket to a socket implementation.
+ asio::error_code assign(implementation_type& impl,
+ const protocol_type& protocol, const native_handle_type& native_socket,
+ asio::error_code& ec)
+ {
+ if (!do_assign(impl, protocol.type(), native_socket, ec))
+ impl.protocol_ = protocol;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Get the native socket representation.
+ native_handle_type native_handle(implementation_type& impl)
+ {
+ return impl.socket_;
+ }
+
+ // Bind the socket to the specified local endpoint.
+ asio::error_code bind(implementation_type& impl,
+ const endpoint_type& endpoint, asio::error_code& ec)
+ {
+ socket_ops::bind(impl.socket_, endpoint.data(), endpoint.size(), ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Set a socket option.
+ template <typename Option>
+ asio::error_code set_option(implementation_type& impl,
+ const Option& option, asio::error_code& ec)
+ {
+ socket_ops::setsockopt(impl.socket_, impl.state_,
+ option.level(impl.protocol_), option.name(impl.protocol_),
+ option.data(impl.protocol_), option.size(impl.protocol_), ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Set a socket option.
+ template <typename Option>
+ asio::error_code get_option(const implementation_type& impl,
+ Option& option, asio::error_code& ec) const
+ {
+ std::size_t size = option.size(impl.protocol_);
+ socket_ops::getsockopt(impl.socket_, impl.state_,
+ option.level(impl.protocol_), option.name(impl.protocol_),
+ option.data(impl.protocol_), &size, ec);
+ if (!ec)
+ option.resize(impl.protocol_, size);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Get the local endpoint.
+ endpoint_type local_endpoint(const implementation_type& impl,
+ asio::error_code& ec) const
+ {
+ endpoint_type endpoint;
+ std::size_t addr_len = endpoint.capacity();
+ if (socket_ops::getsockname(impl.socket_, endpoint.data(), &addr_len, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
+ return endpoint_type();
+ }
+ endpoint.resize(addr_len);
+ return endpoint;
+ }
+
+ // Get the remote endpoint.
+ endpoint_type remote_endpoint(const implementation_type& impl,
+ asio::error_code& ec) const
+ {
+ endpoint_type endpoint;
+ std::size_t addr_len = endpoint.capacity();
+ if (socket_ops::getpeername(impl.socket_,
+ endpoint.data(), &addr_len, false, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
+ return endpoint_type();
+ }
+ endpoint.resize(addr_len);
+ return endpoint;
+ }
+
+ // Disable sends or receives on the socket.
+ asio::error_code shutdown(base_implementation_type& impl,
+ socket_base::shutdown_type what, asio::error_code& ec)
+ {
+ socket_ops::shutdown(impl.socket_, what, ec);
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Send a datagram to the specified endpoint. Returns the number of bytes
+ // sent.
+ template <typename ConstBufferSequence>
+ size_t send_to(implementation_type& impl, const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags,
+ asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
+
+ size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = socket_ops::sync_sendto1(impl.socket_, impl.state_,
+ bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), flags,
+ destination.data(), destination.size(), ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ n = socket_ops::sync_sendto(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags,
+ destination.data(), destination.size(), ec);
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
+ }
+
+ // Wait until data can be sent without blocking.
+ size_t send_to(implementation_type& impl, const null_buffers&,
+ const endpoint_type&, socket_base::message_flags,
+ asio::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+
+ // Start an asynchronous send. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_send_to(implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ const endpoint_type& destination, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_sendto_op<ConstBufferSequence,
+ endpoint_type, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, impl.state_,
+ buffers, destination, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_send_to"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_send_to(implementation_type& impl, const null_buffers&,
+ const endpoint_type&, socket_base::message_flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, POLLOUT, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_send_to(null_buffers)"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Receive a datagram with the endpoint of the sender. Returns the number of
+ // bytes received.
+ template <typename MutableBufferSequence>
+ size_t receive_from(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
+
+ std::size_t addr_len = sender_endpoint.capacity();
+ std::size_t n;
+ if (bufs_type::is_single_buffer)
+ {
+ n = socket_ops::sync_recvfrom1(impl.socket_, impl.state_,
+ bufs_type::first(buffers).data(), bufs_type::first(buffers).size(),
+ flags, sender_endpoint.data(), &addr_len, ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ n = socket_ops::sync_recvfrom(impl.socket_, impl.state_, bufs.buffers(),
+ bufs.count(), flags, sender_endpoint.data(), &addr_len, ec);
+ }
+
+ if (!ec)
+ sender_endpoint.resize(addr_len);
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive_from(implementation_type& impl, const null_buffers&,
+ endpoint_type& sender_endpoint, socket_base::message_flags,
+ asio::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ ASIO_ERROR_LOCATION(ec);
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received and
+ // the sender_endpoint object must both be valid for the lifetime of the
+ // asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type& impl,
+ const MutableBufferSequence& buffers, endpoint_type& sender_endpoint,
+ socket_base::message_flags flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type = (flags & socket_base::message_out_of_band)
+ ? io_uring_service::except_op : io_uring_service::read_op;
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_recvfrom_op<MutableBufferSequence,
+ endpoint_type, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, impl.state_,
+ buffers, sender_endpoint, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_receive_from"));
+
+ start_op(impl, op_type, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive_from(implementation_type& impl, const null_buffers&,
+ endpoint_type& sender_endpoint, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type;
+ int poll_flags;
+ if ((flags & socket_base::message_out_of_band) != 0)
+ {
+ op_type = io_uring_service::except_op;
+ poll_flags = POLLPRI;
+ }
+ else
+ {
+ op_type = io_uring_service::read_op;
+ poll_flags = POLLIN;
+ }
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, poll_flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_receive_from(null_buffers)"));
+
+ // Reset endpoint since it can be given no sensible value at this time.
+ sender_endpoint = endpoint_type();
+
+ start_op(impl, op_type, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Accept a new connection.
+ template <typename Socket>
+ asio::error_code accept(implementation_type& impl,
+ Socket& peer, endpoint_type* peer_endpoint, asio::error_code& ec)
+ {
+ // We cannot accept a socket that is already open.
+ if (peer.is_open())
+ {
+ ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ std::size_t addr_len = peer_endpoint ? peer_endpoint->capacity() : 0;
+ socket_holder new_socket(socket_ops::sync_accept(impl.socket_,
+ impl.state_, peer_endpoint ? peer_endpoint->data() : 0,
+ peer_endpoint ? &addr_len : 0, ec));
+
+ // On success, assign new connection to peer socket object.
+ if (new_socket.get() != invalid_socket)
+ {
+ if (peer_endpoint)
+ peer_endpoint->resize(addr_len);
+ peer.assign(impl.protocol_, new_socket.get(), ec);
+ if (!ec)
+ new_socket.release();
+ }
+
+ ASIO_ERROR_LOCATION(ec);
+ return ec;
+ }
+
+ // Start an asynchronous accept. The peer and peer_endpoint objects must be
+ // valid until the accept's handler is invoked.
+ template <typename Socket, typename Handler, typename IoExecutor>
+ void async_accept(implementation_type& impl, Socket& peer,
+ endpoint_type* peer_endpoint, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_accept_op<Socket, Protocol, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, impl.state_,
+ peer, impl.protocol_, peer_endpoint, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected() && !peer.is_open())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::read_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_accept"));
+
+ start_accept_op(impl, p.p, is_continuation, peer.is_open());
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous accept. The peer_endpoint object must be valid until
+ // the accept's handler is invoked.
+ template <typename PeerIoExecutor, typename Handler, typename IoExecutor>
+ void async_move_accept(implementation_type& impl,
+ const PeerIoExecutor& peer_io_ex, endpoint_type* peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_move_accept_op<Protocol,
+ PeerIoExecutor, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, peer_io_ex, impl.socket_,
+ impl.state_, impl.protocol_, peer_endpoint, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::read_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_accept"));
+
+ start_accept_op(impl, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Connect the socket to the specified endpoint.
+ asio::error_code connect(implementation_type& impl,
+ const endpoint_type& peer_endpoint, asio::error_code& ec)
+ {
+ socket_ops::sync_connect(impl.socket_,
+ peer_endpoint.data(), peer_endpoint.size(), ec);
+ return ec;
+ }
+
+ // Start an asynchronous connect.
+ template <typename Handler, typename IoExecutor>
+ void async_connect(implementation_type& impl,
+ const endpoint_type& peer_endpoint,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_connect_op<Protocol, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ peer_endpoint, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_connect"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_socket_service_base.hpp b/3rdparty/asio/include/asio/detail/io_uring_socket_service_base.hpp
new file mode 100644
index 00000000000..99b075c9fe5
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_socket_service_base.hpp
@@ -0,0 +1,663 @@
+//
+// detail/io_uring_socket_service_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 ASIO_DETAIL_IO_URING_SOCKET_SERVICE_BASE_HPP
+#define ASIO_DETAIL_IO_URING_SOCKET_SERVICE_BASE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IO_URING)
+
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/buffer.hpp"
+#include "asio/cancellation_type.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/socket_base.hpp"
+#include "asio/detail/buffer_sequence_adapter.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/io_uring_null_buffers_op.hpp"
+#include "asio/detail/io_uring_service.hpp"
+#include "asio/detail/io_uring_socket_recv_op.hpp"
+#include "asio/detail/io_uring_socket_recvmsg_op.hpp"
+#include "asio/detail/io_uring_socket_send_op.hpp"
+#include "asio/detail/io_uring_wait_op.hpp"
+#include "asio/detail/socket_holder.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/socket_types.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class io_uring_socket_service_base
+{
+public:
+ // The native type of a socket.
+ typedef socket_type native_handle_type;
+
+ // The implementation type of the socket.
+ struct base_implementation_type
+ {
+ // The native socket representation.
+ socket_type socket_;
+
+ // The current state of the socket.
+ socket_ops::state_type state_;
+
+ // Per I/O object data used by the io_uring_service.
+ io_uring_service::per_io_object_data io_object_data_;
+ };
+
+ // Constructor.
+ ASIO_DECL io_uring_socket_service_base(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ ASIO_DECL void base_shutdown();
+
+ // Construct a new socket implementation.
+ ASIO_DECL void construct(base_implementation_type& impl);
+
+ // Move-construct a new socket implementation.
+ ASIO_DECL void base_move_construct(base_implementation_type& impl,
+ base_implementation_type& other_impl) noexcept;
+
+ // Move-assign from another socket implementation.
+ ASIO_DECL void base_move_assign(base_implementation_type& impl,
+ io_uring_socket_service_base& other_service,
+ base_implementation_type& other_impl);
+
+ // Destroy a socket implementation.
+ ASIO_DECL void destroy(base_implementation_type& impl);
+
+ // Determine whether the socket is open.
+ bool is_open(const base_implementation_type& impl) const
+ {
+ return impl.socket_ != invalid_socket;
+ }
+
+ // Destroy a socket implementation.
+ ASIO_DECL asio::error_code close(
+ base_implementation_type& impl, asio::error_code& ec);
+
+ // Release ownership of the socket.
+ ASIO_DECL socket_type release(
+ base_implementation_type& impl, asio::error_code& ec);
+
+ // Get the native socket representation.
+ native_handle_type native_handle(base_implementation_type& impl)
+ {
+ return impl.socket_;
+ }
+
+ // Cancel all operations associated with the socket.
+ ASIO_DECL asio::error_code cancel(
+ base_implementation_type& impl, asio::error_code& ec);
+
+ // Determine whether the socket is at the out-of-band data mark.
+ bool at_mark(const base_implementation_type& impl,
+ asio::error_code& ec) const
+ {
+ return socket_ops::sockatmark(impl.socket_, ec);
+ }
+
+ // Determine the number of bytes available for reading.
+ std::size_t available(const base_implementation_type& impl,
+ asio::error_code& ec) const
+ {
+ return socket_ops::available(impl.socket_, ec);
+ }
+
+ // Place the socket into the state where it will listen for new connections.
+ asio::error_code listen(base_implementation_type& impl,
+ int backlog, asio::error_code& ec)
+ {
+ socket_ops::listen(impl.socket_, backlog, ec);
+ return ec;
+ }
+
+ // Perform an IO control command on the socket.
+ template <typename IO_Control_Command>
+ asio::error_code io_control(base_implementation_type& impl,
+ IO_Control_Command& command, asio::error_code& ec)
+ {
+ socket_ops::ioctl(impl.socket_, impl.state_, command.name(),
+ static_cast<ioctl_arg_type*>(command.data()), ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the socket.
+ bool non_blocking(const base_implementation_type& impl) const
+ {
+ return (impl.state_ & socket_ops::user_set_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the socket.
+ asio::error_code non_blocking(base_implementation_type& impl,
+ bool mode, asio::error_code& ec)
+ {
+ socket_ops::set_user_non_blocking(impl.socket_, impl.state_, mode, ec);
+ return ec;
+ }
+
+ // Gets the non-blocking mode of the native socket implementation.
+ bool native_non_blocking(const base_implementation_type& impl) const
+ {
+ return (impl.state_ & socket_ops::internal_non_blocking) != 0;
+ }
+
+ // Sets the non-blocking mode of the native socket implementation.
+ asio::error_code native_non_blocking(base_implementation_type& impl,
+ bool mode, asio::error_code& ec)
+ {
+ socket_ops::set_internal_non_blocking(impl.socket_, impl.state_, mode, ec);
+ return ec;
+ }
+
+ // Wait for the socket to become ready to read, ready to write, or to have
+ // pending error conditions.
+ asio::error_code wait(base_implementation_type& impl,
+ socket_base::wait_type w, asio::error_code& ec)
+ {
+ switch (w)
+ {
+ case socket_base::wait_read:
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+ break;
+ case socket_base::wait_write:
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+ break;
+ case socket_base::wait_error:
+ socket_ops::poll_error(impl.socket_, impl.state_, -1, ec);
+ break;
+ default:
+ ec = asio::error::invalid_argument;
+ break;
+ }
+
+ return ec;
+ }
+
+ // Asynchronously wait for the socket to become ready to read, ready to
+ // write, or to have pending error conditions.
+ template <typename Handler, typename IoExecutor>
+ void async_wait(base_implementation_type& impl,
+ socket_base::wait_type w, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ int op_type;
+ int poll_flags;
+ switch (w)
+ {
+ case socket_base::wait_read:
+ op_type = io_uring_service::read_op;
+ poll_flags = POLLIN;
+ break;
+ case socket_base::wait_write:
+ op_type = io_uring_service::write_op;
+ poll_flags = POLLOUT;
+ break;
+ case socket_base::wait_error:
+ op_type = io_uring_service::except_op;
+ poll_flags = POLLPRI | POLLERR | POLLHUP;
+ break;
+ default:
+ op_type = -1;
+ poll_flags = -1;
+ return;
+ }
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_wait_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ poll_flags, handler, io_ex);
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_wait"));
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ start_op(impl, op_type, p.p, is_continuation, op_type == -1);
+ p.v = p.p = 0;
+ }
+
+ // Send the given data to the peer.
+ template <typename ConstBufferSequence>
+ size_t send(base_implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ socket_base::message_flags flags, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence> bufs_type;
+
+ if (bufs_type::is_single_buffer)
+ {
+ return socket_ops::sync_send1(impl.socket_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), flags, ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ return socket_ops::sync_send(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ }
+ }
+
+ // Wait until data can be sent without blocking.
+ size_t send(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, asio::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous send. The data being sent must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_send(base_implementation_type& impl,
+ const ConstBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_send_op<
+ ConstBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ impl.state_, buffers, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_send"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation,
+ ((impl.state_ & socket_ops::stream_oriented)
+ && buffer_sequence_adapter<asio::const_buffer,
+ ConstBufferSequence>::all_empty(buffers)));
+ p.v = p.p = 0;
+ }
+
+ // Start an asynchronous wait until data can be sent without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_send(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, POLLOUT, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(&io_uring_service_,
+ &impl.io_object_data_, io_uring_service::write_op);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_send(null_buffers)"));
+
+ start_op(impl, io_uring_service::write_op, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Receive some data from the peer. Returns the number of bytes received.
+ template <typename MutableBufferSequence>
+ size_t receive(base_implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags flags, asio::error_code& ec)
+ {
+ typedef buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs_type;
+
+ if (bufs_type::is_single_buffer)
+ {
+ return socket_ops::sync_recv1(impl.socket_,
+ impl.state_, bufs_type::first(buffers).data(),
+ bufs_type::first(buffers).size(), flags, ec);
+ }
+ else
+ {
+ bufs_type bufs(buffers);
+ return socket_ops::sync_recv(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), flags, bufs.all_empty(), ec);
+ }
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive(base_implementation_type& impl, const null_buffers&,
+ socket_base::message_flags, asio::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type& impl,
+ const MutableBufferSequence& buffers, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type = (flags & socket_base::message_out_of_band)
+ ? io_uring_service::except_op : io_uring_service::read_op;
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_recv_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_,
+ impl.state_, buffers, flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_receive"));
+
+ start_op(impl, op_type, p.p, is_continuation,
+ ((impl.state_ & socket_ops::stream_oriented)
+ && buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence>::all_empty(buffers)));
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags flags,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type;
+ int poll_flags;
+ if ((flags & socket_base::message_out_of_band) != 0)
+ {
+ op_type = io_uring_service::except_op;
+ poll_flags = POLLPRI;
+ }
+ else
+ {
+ op_type = io_uring_service::read_op;
+ poll_flags = POLLIN;
+ }
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, poll_flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_receive(null_buffers)"));
+
+ start_op(impl, op_type, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Receive some data with associated flags. Returns the number of bytes
+ // received.
+ template <typename MutableBufferSequence>
+ size_t receive_with_flags(base_implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, asio::error_code& ec)
+ {
+ buffer_sequence_adapter<asio::mutable_buffer,
+ MutableBufferSequence> bufs(buffers);
+
+ return socket_ops::sync_recvmsg(impl.socket_, impl.state_,
+ bufs.buffers(), bufs.count(), in_flags, out_flags, ec);
+ }
+
+ // Wait until data can be received without blocking.
+ size_t receive_with_flags(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags,
+ socket_base::message_flags& out_flags, asio::error_code& ec)
+ {
+ // Wait for socket to become ready.
+ socket_ops::poll_read(impl.socket_, impl.state_, -1, ec);
+
+ // Clear out_flags, since we cannot give it any other sensible value when
+ // performing a null_buffers operation.
+ out_flags = 0;
+
+ return 0;
+ }
+
+ // Start an asynchronous receive. The buffer for the data being received
+ // must be valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_receive_with_flags(base_implementation_type& impl,
+ const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type = (in_flags & socket_base::message_out_of_band)
+ ? io_uring_service::except_op : io_uring_service::read_op;
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_socket_recvmsg_op<
+ MutableBufferSequence, Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, impl.state_,
+ buffers, in_flags, out_flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p,
+ "socket", &impl, impl.socket_, "async_receive_with_flags"));
+
+ start_op(impl, op_type, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+ // Wait until data can be received without blocking.
+ template <typename Handler, typename IoExecutor>
+ void async_receive_with_flags(base_implementation_type& impl,
+ const null_buffers&, socket_base::message_flags in_flags,
+ socket_base::message_flags& out_flags, Handler& handler,
+ const IoExecutor& io_ex)
+ {
+ bool is_continuation =
+ asio_handler_cont_helpers::is_continuation(handler);
+
+ int op_type;
+ int poll_flags;
+ if ((in_flags & socket_base::message_out_of_band) != 0)
+ {
+ op_type = io_uring_service::except_op;
+ poll_flags = POLLPRI;
+ }
+ else
+ {
+ op_type = io_uring_service::read_op;
+ poll_flags = POLLIN;
+ }
+
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef io_uring_null_buffers_op<Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(success_ec_, impl.socket_, poll_flags, handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<io_uring_op_cancellation>(
+ &io_uring_service_, &impl.io_object_data_, op_type);
+ }
+
+ ASIO_HANDLER_CREATION((io_uring_service_.context(), *p.p, "socket",
+ &impl, impl.socket_, "async_receive_with_flags(null_buffers)"));
+
+ // Clear out_flags, since we cannot give it any other sensible value when
+ // performing a null_buffers operation.
+ out_flags = 0;
+
+ start_op(impl, op_type, p.p, is_continuation, false);
+ p.v = p.p = 0;
+ }
+
+protected:
+ // Open a new socket implementation.
+ ASIO_DECL asio::error_code do_open(
+ base_implementation_type& impl, int af,
+ int type, int protocol, asio::error_code& ec);
+
+ // Assign a native socket to a socket implementation.
+ ASIO_DECL asio::error_code do_assign(
+ base_implementation_type& impl, int type,
+ const native_handle_type& native_socket, asio::error_code& ec);
+
+ // Start the asynchronous read or write operation.
+ ASIO_DECL void start_op(base_implementation_type& impl, int op_type,
+ io_uring_operation* op, bool is_continuation, bool noop);
+
+ // Start the asynchronous accept operation.
+ ASIO_DECL void start_accept_op(base_implementation_type& impl,
+ io_uring_operation* op, bool is_continuation, bool peer_is_open);
+
+ // Helper class used to implement per-operation cancellation
+ class io_uring_op_cancellation
+ {
+ public:
+ io_uring_op_cancellation(io_uring_service* s,
+ io_uring_service::per_io_object_data* p, int o)
+ : io_uring_service_(s),
+ io_object_data_(p),
+ op_type_(o)
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ io_uring_service_->cancel_ops_by_key(*io_object_data_, op_type_, this);
+ }
+ }
+
+ private:
+ io_uring_service* io_uring_service_;
+ io_uring_service::per_io_object_data* io_object_data_;
+ int op_type_;
+ };
+
+ // The io_uring_service that performs event demultiplexing for the service.
+ io_uring_service& io_uring_service_;
+
+ // Cached success value to avoid accessing category singleton.
+ const asio::error_code success_ec_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/io_uring_socket_service_base.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_IO_URING)
+
+#endif // ASIO_DETAIL_IO_URING_SOCKET_SERVICE_BASE_HPP
diff --git a/3rdparty/asio/include/asio/detail/io_uring_wait_op.hpp b/3rdparty/asio/include/asio/detail/io_uring_wait_op.hpp
new file mode 100644
index 00000000000..4dec72ce42c
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/io_uring_wait_op.hpp
@@ -0,0 +1,112 @@
+//
+// detail/io_uring_wait_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 ASIO_DETAIL_IO_URING_WAIT_OP_HPP
+#define ASIO_DETAIL_IO_URING_WAIT_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/fenced_block.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/handler_work.hpp"
+#include "asio/detail/io_uring_operation.hpp"
+#include "asio/detail/memory.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+template <typename Handler, typename IoExecutor>
+class io_uring_wait_op : public io_uring_operation
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(io_uring_wait_op);
+
+ io_uring_wait_op(const asio::error_code& success_ec, int descriptor,
+ int poll_flags, Handler& handler, const IoExecutor& io_ex)
+ : io_uring_operation(success_ec, &io_uring_wait_op::do_prepare,
+ &io_uring_wait_op::do_perform, &io_uring_wait_op::do_complete),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex),
+ descriptor_(descriptor),
+ poll_flags_(poll_flags)
+ {
+ }
+
+ static void do_prepare(io_uring_operation* base, ::io_uring_sqe* sqe)
+ {
+ ASIO_ASSUME(base != 0);
+ io_uring_wait_op* o(static_cast<io_uring_wait_op*>(base));
+
+ ::io_uring_prep_poll_add(sqe, o->descriptor_, o->poll_flags_);
+ }
+
+ static bool do_perform(io_uring_operation*, bool after_completion)
+ {
+ return after_completion;
+ }
+
+ static void do_complete(void* owner, operation* base,
+ const asio::error_code& /*ec*/,
+ std::size_t /*bytes_transferred*/)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ io_uring_wait_op* o(static_cast<io_uring_wait_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Make the upcall if required.
+ if (owner)
+ {
+ fenced_block b(fenced_block::half);
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ handler_work<Handler, IoExecutor> work_;
+ int descriptor_;
+ int poll_flags_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_IO_URING_WAIT_OP_HPP
diff --git a/3rdparty/asio/include/asio/detail/is_buffer_sequence.hpp b/3rdparty/asio/include/asio/detail/is_buffer_sequence.hpp
index e3d8de3d8f6..c64e7b16824 100644
--- a/3rdparty/asio/include/asio/detail/is_buffer_sequence.hpp
+++ b/3rdparty/asio/include/asio/detail/is_buffer_sequence.hpp
@@ -2,7 +2,7 @@
// detail/is_buffer_sequence.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -24,6 +24,8 @@ namespace asio {
class mutable_buffer;
class const_buffer;
+class mutable_registered_buffer;
+class const_registered_buffer;
namespace detail {
@@ -53,53 +55,23 @@ struct buffer_sequence_memfns_check
{
};
-#if defined(ASIO_HAS_DECLTYPE)
-
template <typename>
char buffer_sequence_begin_helper(...);
template <typename T>
char (&buffer_sequence_begin_helper(T* t,
- typename enable_if<!is_same<
+ enable_if_t<!is_same<
decltype(asio::buffer_sequence_begin(*t)),
- void>::value>::type*))[2];
-
-#else // defined(ASIO_HAS_DECLTYPE)
-
-template <typename>
-char (&buffer_sequence_begin_helper(...))[2];
-
-template <typename T>
-char buffer_sequence_begin_helper(T* t,
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::begin>*);
-
-#endif // defined(ASIO_HAS_DECLTYPE)
-
-#if defined(ASIO_HAS_DECLTYPE)
+ void>::value>*))[2];
template <typename>
char buffer_sequence_end_helper(...);
template <typename T>
char (&buffer_sequence_end_helper(T* t,
- typename enable_if<!is_same<
+ enable_if_t<!is_same<
decltype(asio::buffer_sequence_end(*t)),
- void>::value>::type*))[2];
-
-#else // defined(ASIO_HAS_DECLTYPE)
-
-template <typename>
-char (&buffer_sequence_end_helper(...))[2];
-
-template <typename T>
-char buffer_sequence_end_helper(T* t,
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::end>*);
-
-#endif // defined(ASIO_HAS_DECLTYPE)
+ void>::value>*))[2];
template <typename>
char (&size_memfn_helper(...))[2];
@@ -185,23 +157,11 @@ char shrink_memfn_helper(
template <typename, typename>
char (&buffer_sequence_element_type_helper(...))[2];
-#if defined(ASIO_HAS_DECLTYPE)
-
template <typename T, typename Buffer>
char buffer_sequence_element_type_helper(T* t,
- typename enable_if<is_convertible<
+ enable_if_t<is_convertible<
decltype(*asio::buffer_sequence_begin(*t)),
- Buffer>::value>::type*);
-
-#else // defined(ASIO_HAS_DECLTYPE)
-
-template <typename T, typename Buffer>
-char buffer_sequence_element_type_helper(
- typename T::const_iterator*,
- typename enable_if<is_convertible<
- typename T::value_type, Buffer>::value>::type*);
-
-#endif // defined(ASIO_HAS_DECLTYPE)
+ Buffer>::value>*);
template <typename>
char (&const_buffers_type_typedef_helper(...))[2];
@@ -258,6 +218,30 @@ struct is_buffer_sequence<const_buffer, mutable_buffer>
{
};
+template <>
+struct is_buffer_sequence<mutable_registered_buffer, mutable_buffer>
+ : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<mutable_registered_buffer, const_buffer>
+ : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<const_registered_buffer, const_buffer>
+ : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<const_registered_buffer, mutable_buffer>
+ : false_type
+{
+};
+
template <typename T>
struct is_dynamic_buffer_class_v1
: integral_constant<bool,
diff --git a/3rdparty/asio/include/asio/detail/is_executor.hpp b/3rdparty/asio/include/asio/detail/is_executor.hpp
index a099eecff90..2636f9c66f3 100644
--- a/3rdparty/asio/include/asio/detail/is_executor.hpp
+++ b/3rdparty/asio/include/asio/detail/is_executor.hpp
@@ -2,7 +2,7 @@
// detail/is_executor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/keyword_tss_ptr.hpp b/3rdparty/asio/include/asio/detail/keyword_tss_ptr.hpp
index 9378af3d45c..2e42df8b358 100644
--- a/3rdparty/asio/include/asio/detail/keyword_tss_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/keyword_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/keyword_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/kqueue_reactor.hpp b/3rdparty/asio/include/asio/detail/kqueue_reactor.hpp
index 645f1221cd8..f034410d6d5 100644
--- a/3rdparty/asio/include/asio/detail/kqueue_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/kqueue_reactor.hpp
@@ -2,7 +2,7 @@
// detail/kqueue_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2005 Stefan Arentz (stefan at soze dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -29,6 +29,7 @@
#include "asio/detail/object_pool.hpp"
#include "asio/detail/op_queue.hpp"
#include "asio/detail/reactor_op.hpp"
+#include "asio/detail/scheduler_task.hpp"
#include "asio/detail/select_interrupter.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/timer_queue_base.hpp"
@@ -50,7 +51,8 @@ namespace detail {
class scheduler;
class kqueue_reactor
- : public execution_context_service_base<kqueue_reactor>
+ : public execution_context_service_base<kqueue_reactor>,
+ public scheduler_task
{
private:
// The mutex type used by this reactor.
@@ -114,13 +116,30 @@ public:
per_descriptor_data& source_descriptor_data);
// Post a reactor operation for immediate completion.
- void post_immediate_completion(operation* op, bool is_continuation);
+ void post_immediate_completion(operation* op, bool is_continuation) const;
+
+ // Post a reactor operation for immediate completion.
+ ASIO_DECL static void call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self);
// Start a new operation. The reactor operation will be performed when the
// given descriptor is flagged as ready, or an error has occurred.
ASIO_DECL void start_op(int op_type, socket_type descriptor,
per_descriptor_data& descriptor_data, reactor_op* op,
- bool is_continuation, bool allow_speculative);
+ bool is_continuation, bool allow_speculative,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg);
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+ {
+ start_op(op_type, descriptor, descriptor_data,
+ op, is_continuation, allow_speculative,
+ &kqueue_reactor::call_post_immediate_completion, this);
+ }
// Cancel all operations associated with the given descriptor. The
// handlers associated with the descriptor will be invoked with the
diff --git a/3rdparty/asio/include/asio/detail/limits.hpp b/3rdparty/asio/include/asio/detail/limits.hpp
index d32470d2d35..323af22b300 100644
--- a/3rdparty/asio/include/asio/detail/limits.hpp
+++ b/3rdparty/asio/include/asio/detail/limits.hpp
@@ -16,11 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_BOOST_LIMITS)
-# include <boost/limits.hpp>
-#else // defined(ASIO_HAS_BOOST_LIMITS)
-# include <limits>
-#endif // defined(ASIO_HAS_BOOST_LIMITS)
+#include <limits>
#endif // ASIO_DETAIL_LIMITS_HPP
diff --git a/3rdparty/asio/include/asio/detail/local_free_on_block_exit.hpp b/3rdparty/asio/include/asio/detail/local_free_on_block_exit.hpp
index 9ca4b3f68ab..212f9c1bcd2 100644
--- a/3rdparty/asio/include/asio/detail/local_free_on_block_exit.hpp
+++ b/3rdparty/asio/include/asio/detail/local_free_on_block_exit.hpp
@@ -2,7 +2,7 @@
// detail/local_free_on_block_exit.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/macos_fenced_block.hpp b/3rdparty/asio/include/asio/detail/macos_fenced_block.hpp
deleted file mode 100644
index 54768e51f51..00000000000
--- a/3rdparty/asio/include/asio/detail/macos_fenced_block.hpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// detail/macos_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(__MACH__) && defined(__APPLE__)
-
-#include <libkern/OSAtomic.h>
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class macos_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit macos_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit macos_fenced_block(full_t)
- {
- OSMemoryBarrier();
- }
-
- // Destructor.
- ~macos_fenced_block()
- {
- OSMemoryBarrier();
- }
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(__MACH__) && defined(__APPLE__)
-
-#endif // ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/memory.hpp b/3rdparty/asio/include/asio/detail/memory.hpp
index d61dfa5788c..173e49fe065 100644
--- a/3rdparty/asio/include/asio/detail/memory.hpp
+++ b/3rdparty/asio/include/asio/detail/memory.hpp
@@ -2,7 +2,7 @@
// detail/memory.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,48 +20,45 @@
#include <cstdlib>
#include <memory>
#include <new>
+#include "asio/detail/cstdint.hpp"
#include "asio/detail/throw_exception.hpp"
-#if !defined(ASIO_HAS_STD_SHARED_PTR)
-# include <boost/make_shared.hpp>
-# include <boost/shared_ptr.hpp>
-# include <boost/weak_ptr.hpp>
-#endif // !defined(ASIO_HAS_STD_SHARED_PTR)
-
-#if !defined(ASIO_HAS_STD_ADDRESSOF)
-# include <boost/utility/addressof.hpp>
-#endif // !defined(ASIO_HAS_STD_ADDRESSOF)
-
#if !defined(ASIO_HAS_STD_ALIGNED_ALLOC) \
- && defined(ASIO_HAS_BOOST_ALIGN) \
- && defined(ASIO_HAS_ALIGNOF)
+ && defined(ASIO_HAS_BOOST_ALIGN)
# include <boost/align/aligned_alloc.hpp>
#endif // !defined(ASIO_HAS_STD_ALIGNED_ALLOC)
// && defined(ASIO_HAS_BOOST_ALIGN)
- // && defined(ASIO_HAS_ALIGNOF)
namespace asio {
namespace detail {
-#if defined(ASIO_HAS_STD_SHARED_PTR)
+using std::allocate_shared;
using std::make_shared;
using std::shared_ptr;
using std::weak_ptr;
-#else // defined(ASIO_HAS_STD_SHARED_PTR)
-using boost::make_shared;
-using boost::shared_ptr;
-using boost::weak_ptr;
-#endif // defined(ASIO_HAS_STD_SHARED_PTR)
-
-#if defined(ASIO_HAS_STD_ADDRESSOF)
using std::addressof;
-#else // defined(ASIO_HAS_STD_ADDRESSOF)
-using boost::addressof;
-#endif // defined(ASIO_HAS_STD_ADDRESSOF)
+
+#if defined(ASIO_HAS_STD_TO_ADDRESS)
+using std::to_address;
+#else // defined(ASIO_HAS_STD_TO_ADDRESS)
+template <typename T>
+inline T* to_address(T* p) { return p; }
+template <typename T>
+inline const T* to_address(const T* p) { return p; }
+template <typename T>
+inline volatile T* to_address(volatile T* p) { return p; }
+template <typename T>
+inline const volatile T* to_address(const volatile T* p) { return p; }
+#endif // defined(ASIO_HAS_STD_TO_ADDRESS)
+
+inline void* align(std::size_t alignment,
+ std::size_t size, void*& ptr, std::size_t& space)
+{
+ return std::align(alignment, size, ptr, space);
+}
} // namespace detail
-#if defined(ASIO_HAS_CXX11_ALLOCATORS)
using std::allocator_arg_t;
# define ASIO_USES_ALLOCATOR(t) \
namespace std { \
@@ -72,17 +69,11 @@ using std::allocator_arg_t;
# define ASIO_REBIND_ALLOC(alloc, t) \
typename std::allocator_traits<alloc>::template rebind_alloc<t>
/**/
-#else // defined(ASIO_HAS_CXX11_ALLOCATORS)
-struct allocator_arg_t {};
-# define ASIO_USES_ALLOCATOR(t)
-# define ASIO_REBIND_ALLOC(alloc, t) \
- typename alloc::template rebind<t>::other
- /**/
-#endif // defined(ASIO_HAS_CXX11_ALLOCATORS)
inline void* aligned_new(std::size_t align, std::size_t size)
{
-#if defined(ASIO_HAS_STD_ALIGNED_ALLOC) && defined(ASIO_HAS_ALIGNOF)
+#if defined(ASIO_HAS_STD_ALIGNED_ALLOC)
+ align = (align < ASIO_DEFAULT_ALIGN) ? ASIO_DEFAULT_ALIGN : align;
size = (size % align == 0) ? size : size + (align - size % align);
void* ptr = std::aligned_alloc(align, size);
if (!ptr)
@@ -91,7 +82,8 @@ inline void* aligned_new(std::size_t align, std::size_t size)
asio::detail::throw_exception(ex);
}
return ptr;
-#elif defined(ASIO_HAS_BOOST_ALIGN) && defined(ASIO_HAS_ALIGNOF)
+#elif defined(ASIO_HAS_BOOST_ALIGN)
+ align = (align < ASIO_DEFAULT_ALIGN) ? ASIO_DEFAULT_ALIGN : align;
size = (size % align == 0) ? size : size + (align - size % align);
void* ptr = boost::alignment::aligned_alloc(align, size);
if (!ptr)
@@ -100,7 +92,8 @@ inline void* aligned_new(std::size_t align, std::size_t size)
asio::detail::throw_exception(ex);
}
return ptr;
-#elif defined(ASIO_MSVC) && defined(ASIO_HAS_ALIGNOF)
+#elif defined(ASIO_MSVC)
+ align = (align < ASIO_DEFAULT_ALIGN) ? ASIO_DEFAULT_ALIGN : align;
size = (size % align == 0) ? size : size + (align - size % align);
void* ptr = _aligned_malloc(size, align);
if (!ptr)
@@ -109,23 +102,23 @@ inline void* aligned_new(std::size_t align, std::size_t size)
asio::detail::throw_exception(ex);
}
return ptr;
-#else // defined(ASIO_MSVC) && defined(ASIO_HAS_ALIGNOF)
+#else // defined(ASIO_MSVC)
(void)align;
return ::operator new(size);
-#endif // defined(ASIO_MSVC) && defined(ASIO_HAS_ALIGNOF)
+#endif // defined(ASIO_MSVC)
}
inline void aligned_delete(void* ptr)
{
-#if defined(ASIO_HAS_STD_ALIGNED_ALLOC) && defined(ASIO_HAS_ALIGNOF)
+#if defined(ASIO_HAS_STD_ALIGNED_ALLOC)
std::free(ptr);
-#elif defined(ASIO_HAS_BOOST_ALIGN) && defined(ASIO_HAS_ALIGNOF)
+#elif defined(ASIO_HAS_BOOST_ALIGN)
boost::alignment::aligned_free(ptr);
-#elif defined(ASIO_MSVC) && defined(ASIO_HAS_ALIGNOF)
+#elif defined(ASIO_MSVC)
_aligned_free(ptr);
-#else // defined(ASIO_MSVC) && defined(ASIO_HAS_ALIGNOF)
+#else // defined(ASIO_MSVC)
::operator delete(ptr);
-#endif // defined(ASIO_MSVC) && defined(ASIO_HAS_ALIGNOF)
+#endif // defined(ASIO_MSVC)
}
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/mutex.hpp b/3rdparty/asio/include/asio/detail/mutex.hpp
index 283fade654d..e701c238296 100644
--- a/3rdparty/asio/include/asio/detail/mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/mutex.hpp
@@ -2,7 +2,7 @@
// detail/mutex.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,10 +23,8 @@
# include "asio/detail/win_mutex.hpp"
#elif defined(ASIO_HAS_PTHREADS)
# include "asio/detail/posix_mutex.hpp"
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# include "asio/detail/std_mutex.hpp"
#else
-# error Only Windows, POSIX and std::mutex are supported!
+# include "asio/detail/std_mutex.hpp"
#endif
namespace asio {
@@ -38,7 +36,7 @@ typedef null_mutex mutex;
typedef win_mutex mutex;
#elif defined(ASIO_HAS_PTHREADS)
typedef posix_mutex mutex;
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+#else
typedef std_mutex mutex;
#endif
diff --git a/3rdparty/asio/include/asio/detail/non_const_lvalue.hpp b/3rdparty/asio/include/asio/detail/non_const_lvalue.hpp
index 49603656850..940bf251b71 100644
--- a/3rdparty/asio/include/asio/detail/non_const_lvalue.hpp
+++ b/3rdparty/asio/include/asio/detail/non_const_lvalue.hpp
@@ -2,7 +2,7 @@
// detail/non_const_lvalue.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -26,24 +26,13 @@ namespace detail {
template <typename T>
struct non_const_lvalue
{
-#if defined(ASIO_HAS_MOVE)
explicit non_const_lvalue(T& t)
- : value(static_cast<typename conditional<
- is_same<T, typename decay<T>::type>::value,
- typename decay<T>::type&, T&&>::type>(t))
+ : value(static_cast<conditional_t<
+ is_same<T, decay_t<T>>::value, decay_t<T>&, T&&>>(t))
{
}
- typename conditional<is_same<T, typename decay<T>::type>::value,
- typename decay<T>::type&, typename decay<T>::type>::type value;
-#else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- explicit non_const_lvalue(const typename decay<T>::type& t)
- : value(t)
- {
- }
-
- typename decay<T>::type value;
-#endif // defined(ASIO_HAS_MOVE)
+ conditional_t<is_same<T, decay_t<T>>::value, decay_t<T>&, decay_t<T>> value;
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/noncopyable.hpp b/3rdparty/asio/include/asio/detail/noncopyable.hpp
index a148e031cf1..7b80a89457a 100644
--- a/3rdparty/asio/include/asio/detail/noncopyable.hpp
+++ b/3rdparty/asio/include/asio/detail/noncopyable.hpp
@@ -2,7 +2,7 @@
// detail/noncopyable.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/null_event.hpp b/3rdparty/asio/include/asio/detail/null_event.hpp
index 5bff3c46afe..d50724c9e5b 100644
--- a/3rdparty/asio/include/asio/detail/null_event.hpp
+++ b/3rdparty/asio/include/asio/detail/null_event.hpp
@@ -2,7 +2,7 @@
// detail/null_event.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/null_fenced_block.hpp b/3rdparty/asio/include/asio/detail/null_fenced_block.hpp
index 265b3bffd5b..ccf65c3ca78 100644
--- a/3rdparty/asio/include/asio/detail/null_fenced_block.hpp
+++ b/3rdparty/asio/include/asio/detail/null_fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/null_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/null_global.hpp b/3rdparty/asio/include/asio/detail/null_global.hpp
index 7bd12502eb3..ab8b9c87e61 100644
--- a/3rdparty/asio/include/asio/detail/null_global.hpp
+++ b/3rdparty/asio/include/asio/detail/null_global.hpp
@@ -2,7 +2,7 @@
// detail/null_global.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/null_mutex.hpp b/3rdparty/asio/include/asio/detail/null_mutex.hpp
index b5457339843..77e759473f5 100644
--- a/3rdparty/asio/include/asio/detail/null_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/null_mutex.hpp
@@ -2,7 +2,7 @@
// detail/null_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,8 +17,6 @@
#include "asio/detail/config.hpp"
-#if !defined(ASIO_HAS_THREADS)
-
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/scoped_lock.hpp"
@@ -59,6 +57,4 @@ public:
#include "asio/detail/pop_options.hpp"
-#endif // !defined(ASIO_HAS_THREADS)
-
#endif // ASIO_DETAIL_NULL_MUTEX_HPP
diff --git a/3rdparty/asio/include/asio/detail/null_reactor.hpp b/3rdparty/asio/include/asio/detail/null_reactor.hpp
index f05c6ee15d2..128f2b45329 100644
--- a/3rdparty/asio/include/asio/detail/null_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/null_reactor.hpp
@@ -2,7 +2,7 @@
// detail/null_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,9 +17,12 @@
#include "asio/detail/config.hpp"
-#if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
+#if defined(ASIO_HAS_IOCP) \
+ || defined(ASIO_WINDOWS_RUNTIME) \
+ || defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/detail/scheduler_operation.hpp"
+#include "asio/detail/scheduler_task.hpp"
#include "asio/execution_context.hpp"
#include "asio/detail/push_options.hpp"
@@ -28,9 +31,14 @@ namespace asio {
namespace detail {
class null_reactor
- : public execution_context_service_base<null_reactor>
+ : public execution_context_service_base<null_reactor>,
+ public scheduler_task
{
public:
+ struct per_descriptor_data
+ {
+ };
+
// Constructor.
null_reactor(asio::execution_context& ctx)
: execution_context_service_base<null_reactor>(ctx)
@@ -42,6 +50,11 @@ public:
{
}
+ // Initialise the task.
+ void init_task()
+ {
+ }
+
// Destroy all user-defined handler objects owned by the service.
void shutdown()
{
@@ -63,6 +76,8 @@ public:
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
+#endif // defined(ASIO_HAS_IOCP)
+ // || defined(ASIO_WINDOWS_RUNTIME)
+ // || defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_NULL_REACTOR_HPP
diff --git a/3rdparty/asio/include/asio/detail/null_signal_blocker.hpp b/3rdparty/asio/include/asio/detail/null_signal_blocker.hpp
index 8a9bf367a00..1c4030799fa 100644
--- a/3rdparty/asio/include/asio/detail/null_signal_blocker.hpp
+++ b/3rdparty/asio/include/asio/detail/null_signal_blocker.hpp
@@ -2,7 +2,7 @@
// detail/null_signal_blocker.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/null_socket_service.hpp b/3rdparty/asio/include/asio/detail/null_socket_service.hpp
index e6525465c4e..84e21295f63 100644
--- a/3rdparty/asio/include/asio/detail/null_socket_service.hpp
+++ b/3rdparty/asio/include/asio/detail/null_socket_service.hpp
@@ -2,7 +2,7 @@
// detail/null_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -33,7 +33,7 @@ namespace detail {
template <typename Protocol>
class null_socket_service :
- public execution_context_service_base<null_socket_service<Protocol> >
+ public execution_context_service_base<null_socket_service<Protocol>>
{
public:
// The protocol type.
@@ -52,7 +52,7 @@ public:
// Constructor.
null_socket_service(execution_context& context)
- : execution_context_service_base<null_socket_service<Protocol> >(context)
+ : execution_context_service_base<null_socket_service<Protocol>>(context)
{
}
diff --git a/3rdparty/asio/include/asio/detail/null_static_mutex.hpp b/3rdparty/asio/include/asio/detail/null_static_mutex.hpp
index 4053056aa2f..15d649bb0da 100644
--- a/3rdparty/asio/include/asio/detail/null_static_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/null_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/null_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/null_thread.hpp b/3rdparty/asio/include/asio/detail/null_thread.hpp
index bbdba55622f..aca261671c5 100644
--- a/3rdparty/asio/include/asio/detail/null_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/null_thread.hpp
@@ -2,7 +2,7 @@
// detail/null_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/null_tss_ptr.hpp b/3rdparty/asio/include/asio/detail/null_tss_ptr.hpp
index e2b4cf3d607..cf64a2bcdda 100644
--- a/3rdparty/asio/include/asio/detail/null_tss_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/null_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/null_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/object_pool.hpp b/3rdparty/asio/include/asio/detail/object_pool.hpp
index 45524d35501..41254ce52ee 100644
--- a/3rdparty/asio/include/asio/detail/object_pool.hpp
+++ b/3rdparty/asio/include/asio/detail/object_pool.hpp
@@ -2,7 +2,7 @@
// detail/object_pool.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/old_win_sdk_compat.hpp b/3rdparty/asio/include/asio/detail/old_win_sdk_compat.hpp
index 734d72e7833..2c43c1dab80 100644
--- a/3rdparty/asio/include/asio/detail/old_win_sdk_compat.hpp
+++ b/3rdparty/asio/include/asio/detail/old_win_sdk_compat.hpp
@@ -2,7 +2,7 @@
// detail/old_win_sdk_compat.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/op_queue.hpp b/3rdparty/asio/include/asio/detail/op_queue.hpp
index 1261339921f..db6335f40f6 100644
--- a/3rdparty/asio/include/asio/detail/op_queue.hpp
+++ b/3rdparty/asio/include/asio/detail/op_queue.hpp
@@ -2,7 +2,7 @@
// detail/op_queue.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/operation.hpp b/3rdparty/asio/include/asio/detail/operation.hpp
index 6e58117ff0d..8721f397a5c 100644
--- a/3rdparty/asio/include/asio/detail/operation.hpp
+++ b/3rdparty/asio/include/asio/detail/operation.hpp
@@ -2,7 +2,7 @@
// detail/operation.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/pipe_select_interrupter.hpp b/3rdparty/asio/include/asio/detail/pipe_select_interrupter.hpp
index 09b3f3bdb67..f7b219644e4 100644
--- a/3rdparty/asio/include/asio/detail/pipe_select_interrupter.hpp
+++ b/3rdparty/asio/include/asio/detail/pipe_select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/pipe_select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/pop_options.hpp b/3rdparty/asio/include/asio/detail/pop_options.hpp
index 9b14085bd49..93cdb5abb4d 100644
--- a/3rdparty/asio/include/asio/detail/pop_options.hpp
+++ b/3rdparty/asio/include/asio/detail/pop_options.hpp
@@ -2,7 +2,7 @@
// detail/pop_options.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -29,6 +29,10 @@
# endif // !defined(ASIO_DISABLE_VISIBILITY)
# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma pop_macro ("emit")
+# pragma pop_macro ("signal")
+# pragma pop_macro ("slot")
+
#elif defined(__clang__)
// Clang
@@ -146,4 +150,8 @@
# endif
# endif
+# pragma pop_macro ("emit")
+# pragma pop_macro ("signal")
+# pragma pop_macro ("slot")
+
#endif
diff --git a/3rdparty/asio/include/asio/detail/posix_event.hpp b/3rdparty/asio/include/asio/detail/posix_event.hpp
index 8a06b422466..0c83bd31a30 100644
--- a/3rdparty/asio/include/asio/detail/posix_event.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_event.hpp
@@ -2,7 +2,7 @@
// detail/posix_event.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/posix_fd_set_adapter.hpp b/3rdparty/asio/include/asio/detail/posix_fd_set_adapter.hpp
index 230160b8e27..bd28a13fb2c 100644
--- a/3rdparty/asio/include/asio/detail/posix_fd_set_adapter.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_fd_set_adapter.hpp
@@ -2,7 +2,7 @@
// detail/posix_fd_set_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/posix_global.hpp b/3rdparty/asio/include/asio/detail/posix_global.hpp
index b7b113a4726..aea71e15c82 100644
--- a/3rdparty/asio/include/asio/detail/posix_global.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_global.hpp
@@ -2,7 +2,7 @@
// detail/posix_global.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/posix_mutex.hpp b/3rdparty/asio/include/asio/detail/posix_mutex.hpp
index ee0e8b20242..38ce2867ff5 100644
--- a/3rdparty/asio/include/asio/detail/posix_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_mutex.hpp
@@ -2,7 +2,7 @@
// detail/posix_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/reactive_serial_port_service.hpp b/3rdparty/asio/include/asio/detail/posix_serial_port_service.hpp
index e5a605c943d..79309549845 100644
--- a/3rdparty/asio/include/asio/detail/reactive_serial_port_service.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_serial_port_service.hpp
@@ -1,16 +1,16 @@
//
-// detail/reactive_serial_port_service.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// detail/posix_serial_port_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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 ASIO_DETAIL_REACTIVE_SERIAL_PORT_SERVICE_HPP
-#define ASIO_DETAIL_REACTIVE_SERIAL_PORT_SERVICE_HPP
+#ifndef ASIO_DETAIL_POSIX_SERIAL_PORT_SERVICE_HPP
+#define ASIO_DETAIL_POSIX_SERIAL_PORT_SERVICE_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
@@ -26,25 +26,36 @@
#include "asio/execution_context.hpp"
#include "asio/serial_port_base.hpp"
#include "asio/detail/descriptor_ops.hpp"
-#include "asio/detail/reactive_descriptor_service.hpp"
+
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_descriptor_service.hpp"
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/reactive_descriptor_service.hpp"
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
-// Extend reactive_descriptor_service to provide serial port support.
-class reactive_serial_port_service :
- public execution_context_service_base<reactive_serial_port_service>
+// Extend a descriptor_service to provide serial port support.
+class posix_serial_port_service :
+ public execution_context_service_base<posix_serial_port_service>
{
public:
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef io_uring_descriptor_service descriptor_service;
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef reactive_descriptor_service descriptor_service;
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+
// The native type of a serial port.
- typedef reactive_descriptor_service::native_handle_type native_handle_type;
+ typedef descriptor_service::native_handle_type native_handle_type;
// The implementation type of the serial port.
- typedef reactive_descriptor_service::implementation_type implementation_type;
+ typedef descriptor_service::implementation_type implementation_type;
- ASIO_DECL reactive_serial_port_service(execution_context& context);
+ ASIO_DECL posix_serial_port_service(execution_context& context);
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void shutdown();
@@ -64,7 +75,7 @@ public:
// Move-assign from another serial port implementation.
void move_assign(implementation_type& impl,
- reactive_serial_port_service& other_service,
+ posix_serial_port_service& other_service,
implementation_type& other_impl)
{
descriptor_service_.move_assign(impl,
@@ -121,7 +132,7 @@ public:
const SettableSerialPortOption& option, asio::error_code& ec)
{
return do_set_option(impl,
- &reactive_serial_port_service::store_option<SettableSerialPortOption>,
+ &posix_serial_port_service::store_option<SettableSerialPortOption>,
&option, ec);
}
@@ -131,7 +142,7 @@ public:
GettableSerialPortOption& option, asio::error_code& ec) const
{
return do_get_option(impl,
- &reactive_serial_port_service::load_option<GettableSerialPortOption>,
+ &posix_serial_port_service::load_option<GettableSerialPortOption>,
&option, ec);
}
@@ -141,6 +152,7 @@ public:
{
int result = ::tcsendbreak(descriptor_service_.native_handle(impl), 0);
descriptor_ops::get_last_error(ec, result < 0);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -219,7 +231,7 @@ private:
void* option, asio::error_code& ec) const;
// The implementation used for initiating asynchronous operations.
- reactive_descriptor_service descriptor_service_;
+ descriptor_service descriptor_service_;
};
} // namespace detail
@@ -228,10 +240,10 @@ private:
#include "asio/detail/pop_options.hpp"
#if defined(ASIO_HEADER_ONLY)
-# include "asio/detail/impl/reactive_serial_port_service.ipp"
+# include "asio/detail/impl/posix_serial_port_service.ipp"
#endif // defined(ASIO_HEADER_ONLY)
#endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
#endif // defined(ASIO_HAS_SERIAL_PORT)
-#endif // ASIO_DETAIL_REACTIVE_SERIAL_PORT_SERVICE_HPP
+#endif // ASIO_DETAIL_POSIX_SERIAL_PORT_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/posix_signal_blocker.hpp b/3rdparty/asio/include/asio/detail/posix_signal_blocker.hpp
index e0a4420bfb8..a57c09687b8 100644
--- a/3rdparty/asio/include/asio/detail/posix_signal_blocker.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_signal_blocker.hpp
@@ -2,7 +2,7 @@
// detail/posix_signal_blocker.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/posix_static_mutex.hpp b/3rdparty/asio/include/asio/detail/posix_static_mutex.hpp
index b9fdd481ae7..38a44c0327a 100644
--- a/3rdparty/asio/include/asio/detail/posix_static_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/posix_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/posix_thread.hpp b/3rdparty/asio/include/asio/detail/posix_thread.hpp
index cd80af10f1f..9085a0b4a7b 100644
--- a/3rdparty/asio/include/asio/detail/posix_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_thread.hpp
@@ -2,7 +2,7 @@
// detail/posix_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/posix_tss_ptr.hpp b/3rdparty/asio/include/asio/detail/posix_tss_ptr.hpp
index 6d8b29f6581..b0d0653bed5 100644
--- a/3rdparty/asio/include/asio/detail/posix_tss_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/posix_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/posix_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/push_options.hpp b/3rdparty/asio/include/asio/detail/push_options.hpp
index 9786ff90098..d270e9ae13c 100644
--- a/3rdparty/asio/include/asio/detail/push_options.hpp
+++ b/3rdparty/asio/include/asio/detail/push_options.hpp
@@ -2,7 +2,7 @@
// detail/push_options.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -29,6 +29,15 @@
# endif // !defined(ASIO_DISABLE_VISIBILITY)
# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma push_macro ("emit")
+# undef emit
+
+# pragma push_macro ("signal")
+# undef signal
+
+# pragma push_macro ("slot")
+# undef slot
+
#elif defined(__clang__)
// Clang
@@ -163,12 +172,13 @@
//
// Must remain the last #elif since some other vendors (Metrowerks, for example)
// also #define _MSC_VER
-
# pragma warning (disable:4103)
# pragma warning (push)
+# pragma warning (disable:4619) // suppress 'there is no warning number XXXX'
# pragma warning (disable:4127)
# pragma warning (disable:4180)
# pragma warning (disable:4244)
+# pragma warning (disable:4265)
# pragma warning (disable:4355)
# pragma warning (disable:4510)
# pragma warning (disable:4512)
diff --git a/3rdparty/asio/include/asio/detail/reactive_descriptor_service.hpp b/3rdparty/asio/include/asio/detail/reactive_descriptor_service.hpp
index 2c557e8b4c7..f7c7e86916d 100644
--- a/3rdparty/asio/include/asio/detail/reactive_descriptor_service.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_descriptor_service.hpp
@@ -2,7 +2,7 @@
// detail/reactive_descriptor_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,9 +19,11 @@
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
+ && !defined(__CYGWIN__) \
+ && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/associated_cancellation_slot.hpp"
+#include "asio/associated_immediate_executor.hpp"
#include "asio/buffer.hpp"
#include "asio/cancellation_type.hpp"
#include "asio/execution_context.hpp"
@@ -87,7 +89,7 @@ public:
// Move-construct a new descriptor implementation.
ASIO_DECL void move_construct(implementation_type& impl,
- implementation_type& other_impl) ASIO_NOEXCEPT;
+ implementation_type& other_impl) noexcept;
// Move-assign from another descriptor implementation.
ASIO_DECL void move_assign(implementation_type& impl,
@@ -121,6 +123,14 @@ public:
// Release ownership of the native descriptor representation.
ASIO_DECL native_handle_type release(implementation_type& impl);
+ // Release ownership of the native descriptor representation.
+ native_handle_type release(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ ec = success_ec_;
+ return release(impl);
+ }
+
// Cancel all operations associated with the descriptor.
ASIO_DECL asio::error_code cancel(implementation_type& impl,
asio::error_code& ec);
@@ -132,6 +142,7 @@ public:
{
descriptor_ops::ioctl(impl.descriptor_, impl.state_,
command.name(), static_cast<ioctl_arg_type*>(command.data()), ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -147,6 +158,7 @@ public:
{
descriptor_ops::set_user_non_blocking(
impl.descriptor_, impl.state_, mode, ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -186,6 +198,7 @@ public:
break;
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -199,7 +212,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -215,19 +228,20 @@ public:
switch (w)
{
case posix::descriptor_base::wait_read:
- op_type = reactor::read_op;
- break;
+ op_type = reactor::read_op;
+ break;
case posix::descriptor_base::wait_write:
- op_type = reactor::write_op;
- break;
+ op_type = reactor::write_op;
+ break;
case posix::descriptor_base::wait_error:
- op_type = reactor::except_op;
- break;
- default:
- p.p->ec_ = asio::error::invalid_argument;
- reactor_.post_immediate_completion(p.p, is_continuation);
- p.v = p.p = 0;
- return;
+ op_type = reactor::except_op;
+ break;
+ default:
+ p.p->ec_ = asio::error::invalid_argument;
+ start_op(impl, reactor::read_op, p.p,
+ is_continuation, false, true, &io_ex, 0);
+ p.v = p.p = 0;
+ return;
}
// Optionally register for per-operation cancellation.
@@ -238,7 +252,7 @@ public:
&reactor_, &impl.reactor_data_, impl.descriptor_, op_type);
}
- start_op(impl, op_type, p.p, is_continuation, false, false);
+ start_op(impl, op_type, p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -250,9 +264,10 @@ public:
typedef buffer_sequence_adapter<asio::const_buffer,
ConstBufferSequence> bufs_type;
+ size_t n;
if (bufs_type::is_single_buffer)
{
- return descriptor_ops::sync_write1(impl.descriptor_,
+ n = descriptor_ops::sync_write1(impl.descriptor_,
impl.state_, bufs_type::first(buffers).data(),
bufs_type::first(buffers).size(), ec);
}
@@ -260,9 +275,12 @@ public:
{
bufs_type bufs(buffers);
- return descriptor_ops::sync_write(impl.descriptor_, impl.state_,
+ n = descriptor_ops::sync_write(impl.descriptor_, impl.state_,
bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
}
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be written without blocking.
@@ -271,7 +289,7 @@ public:
{
// Wait for descriptor to become ready.
descriptor_ops::poll_write(impl.descriptor_, impl.state_, ec);
-
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -285,7 +303,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -308,7 +326,7 @@ public:
start_op(impl, reactor::write_op, p.p, is_continuation, true,
buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence>::all_empty(buffers));
+ ConstBufferSequence>::all_empty(buffers), &io_ex, 0);
p.v = p.p = 0;
}
@@ -320,7 +338,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -341,7 +359,8 @@ public:
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
&impl, impl.descriptor_, "async_write_some(null_buffers)"));
- start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
+ start_op(impl, reactor::write_op, p.p,
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -353,9 +372,10 @@ public:
typedef buffer_sequence_adapter<asio::mutable_buffer,
MutableBufferSequence> bufs_type;
+ size_t n;
if (bufs_type::is_single_buffer)
{
- return descriptor_ops::sync_read1(impl.descriptor_,
+ n = descriptor_ops::sync_read1(impl.descriptor_,
impl.state_, bufs_type::first(buffers).data(),
bufs_type::first(buffers).size(), ec);
}
@@ -363,9 +383,12 @@ public:
{
bufs_type bufs(buffers);
- return descriptor_ops::sync_read(impl.descriptor_, impl.state_,
+ n = descriptor_ops::sync_read(impl.descriptor_, impl.state_,
bufs.buffers(), bufs.count(), bufs.all_empty(), ec);
}
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be read without blocking.
@@ -374,7 +397,7 @@ public:
{
// Wait for descriptor to become ready.
descriptor_ops::poll_read(impl.descriptor_, impl.state_, ec);
-
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -389,7 +412,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -412,7 +435,7 @@ public:
start_op(impl, reactor::read_op, p.p, is_continuation, true,
buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence>::all_empty(buffers));
+ MutableBufferSequence>::all_empty(buffers), &io_ex, 0);
p.v = p.p = 0;
}
@@ -424,7 +447,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -445,14 +468,47 @@ public:
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "descriptor",
&impl, impl.descriptor_, "async_read_some(null_buffers)"));
- start_op(impl, reactor::read_op, p.p, is_continuation, false, false);
+ start_op(impl, reactor::read_op, p.p,
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
private:
// Start the asynchronous operation.
- ASIO_DECL void start_op(implementation_type& impl, int op_type,
- reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop);
+ 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);
+
+ // Start the asynchronous operation for handlers that are specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_op(implementation_type& impl, int op_type, Op* op,
+ bool is_continuation, bool is_non_blocking, bool noop,
+ const void* 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 is_non_blocking, bool noop, const void*,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ typename Op::handler_type,
+ typename Op::io_executor_type
+ >::asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ 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
class reactor_op_cancellation
@@ -505,5 +561,6 @@ private:
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
+ // && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_REACTIVE_DESCRIPTOR_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/reactive_null_buffers_op.hpp b/3rdparty/asio/include/asio/detail/reactive_null_buffers_op.hpp
index 48214dcba87..b9a32a91217 100644
--- a/3rdparty/asio/include/asio/detail/reactive_null_buffers_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_null_buffers_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_null_buffers_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,7 +19,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -33,13 +32,16 @@ template <typename Handler, typename IoExecutor>
class reactive_null_buffers_op : public reactor_op
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_null_buffers_op);
reactive_null_buffers_op(const asio::error_code& success_ec,
Handler& handler, const IoExecutor& io_ex)
: reactor_op(success_ec, &reactive_null_buffers_op::do_perform,
&reactive_null_buffers_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -54,6 +56,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_null_buffers_op* o(static_cast<reactive_null_buffers_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -61,7 +64,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
// Make a copy of the handler so that the memory can be deallocated before
@@ -85,6 +88,36 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_null_buffers_op* o(static_cast<reactive_null_buffers_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_accept_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_accept_op.hpp
index ac036717e8d..5ae84fd9966 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_accept_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_accept_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_accept_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,7 +19,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -52,6 +51,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_accept_op_base* o(
static_cast<reactive_socket_accept_op_base*>(base));
@@ -95,6 +95,9 @@ class reactive_socket_accept_op :
public reactive_socket_accept_op_base<Socket, Protocol>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_accept_op);
reactive_socket_accept_op(const asio::error_code& success_ec,
@@ -104,7 +107,7 @@ public:
: reactive_socket_accept_op_base<Socket, Protocol>(
success_ec, socket, state, peer, protocol, peer_endpoint,
&reactive_socket_accept_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -114,6 +117,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_accept_op* o(static_cast<reactive_socket_accept_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -125,9 +129,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -149,13 +155,46 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_accept_op* o(static_cast<reactive_socket_accept_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ // On success, assign new connection to peer socket object.
+ o->do_assign();
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
};
-#if defined(ASIO_HAS_MOVE)
-
template <typename Protocol, typename PeerIoExecutor,
typename Handler, typename IoExecutor>
class reactive_socket_move_accept_op :
@@ -165,6 +204,9 @@ class reactive_socket_move_accept_op :
Protocol>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_move_accept_op);
reactive_socket_move_accept_op(const asio::error_code& success_ec,
@@ -176,7 +218,7 @@ public:
reactive_socket_accept_op_base<peer_socket_type, Protocol>(
success_ec, socket, state, *this, protocol, peer_endpoint,
&reactive_socket_move_accept_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -186,6 +228,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_move_accept_op* o(
static_cast<reactive_socket_move_accept_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -198,9 +241,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -209,8 +254,8 @@ public:
// deallocated the memory here.
detail::move_binder2<Handler,
asio::error_code, peer_socket_type>
- handler(0, ASIO_MOVE_CAST(Handler)(o->handler_), o->ec_,
- ASIO_MOVE_CAST(peer_socket_type)(*o));
+ handler(0, static_cast<Handler&&>(o->handler_), o->ec_,
+ static_cast<peer_socket_type&&>(*o));
p.h = asio::detail::addressof(handler.handler_);
p.reset();
@@ -224,6 +269,44 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_move_accept_op* o(
+ static_cast<reactive_socket_move_accept_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ // On success, assign new connection to peer socket object.
+ o->do_assign();
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::move_binder2<Handler,
+ asio::error_code, peer_socket_type>
+ handler(0, static_cast<Handler&&>(o->handler_), o->ec_,
+ static_cast<peer_socket_type&&>(*o));
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
typedef typename Protocol::socket::template
rebind_executor<PeerIoExecutor>::other peer_socket_type;
@@ -232,8 +315,6 @@ private:
handler_work<Handler, IoExecutor> work_;
};
-#endif // defined(ASIO_HAS_MOVE)
-
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_connect_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_connect_op.hpp
index 956bc522d10..03c0db2e7dd 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_connect_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_connect_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_connect_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,7 +19,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -43,6 +42,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_connect_op_base* o(
static_cast<reactive_socket_connect_op_base*>(base));
@@ -62,13 +62,16 @@ template <typename Handler, typename IoExecutor>
class reactive_socket_connect_op : public reactive_socket_connect_op_base
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_connect_op);
reactive_socket_connect_op(const asio::error_code& success_ec,
socket_type socket, Handler& handler, const IoExecutor& io_ex)
: reactive_socket_connect_op_base(success_ec, socket,
&reactive_socket_connect_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -78,6 +81,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_connect_op* o
(static_cast<reactive_socket_connect_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -86,9 +90,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -110,6 +116,39 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_connect_op* o
+ (static_cast<reactive_socket_connect_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_recv_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_recv_op.hpp
index d30f4ab315a..b6533655674 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_recv_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_recv_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_recv_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,7 +20,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -50,6 +49,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_recv_op_base* o(
static_cast<reactive_socket_recv_op_base*>(base));
@@ -97,6 +97,9 @@ class reactive_socket_recv_op :
public reactive_socket_recv_op_base<MutableBufferSequence>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_recv_op);
reactive_socket_recv_op(const asio::error_code& success_ec,
@@ -105,7 +108,7 @@ public:
Handler& handler, const IoExecutor& io_ex)
: reactive_socket_recv_op_base<MutableBufferSequence>(success_ec, socket,
state, buffers, flags, &reactive_socket_recv_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -115,6 +118,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_recv_op* o(static_cast<reactive_socket_recv_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -122,9 +126,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -146,6 +152,38 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_recv_op* o(static_cast<reactive_socket_recv_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
index 0d7673a1120..b84ea61794f 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_recvfrom_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,7 +20,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -51,6 +50,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_recvfrom_op_base* o(
static_cast<reactive_socket_recvfrom_op_base*>(base));
@@ -99,6 +99,9 @@ class reactive_socket_recvfrom_op :
public reactive_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_recvfrom_op);
reactive_socket_recvfrom_op(const asio::error_code& success_ec,
@@ -109,7 +112,7 @@ public:
: reactive_socket_recvfrom_op_base<MutableBufferSequence, Endpoint>(
success_ec, socket, protocol_type, buffers, endpoint, flags,
&reactive_socket_recvfrom_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -119,6 +122,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_recvfrom_op* o(
static_cast<reactive_socket_recvfrom_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -127,9 +131,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -151,6 +157,39 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_recvfrom_op* o(
+ static_cast<reactive_socket_recvfrom_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
index b387f048f0c..e4c8117b675 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_recvmsg_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,7 +20,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -51,6 +50,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_recvmsg_op_base* o(
static_cast<reactive_socket_recvmsg_op_base*>(base));
@@ -80,6 +80,9 @@ class reactive_socket_recvmsg_op :
public reactive_socket_recvmsg_op_base<MutableBufferSequence>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_recvmsg_op);
reactive_socket_recvmsg_op(const asio::error_code& success_ec,
@@ -90,7 +93,7 @@ public:
: reactive_socket_recvmsg_op_base<MutableBufferSequence>(
success_ec, socket, buffers, in_flags, out_flags,
&reactive_socket_recvmsg_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -100,6 +103,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_recvmsg_op* o(
static_cast<reactive_socket_recvmsg_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -108,9 +112,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -132,6 +138,39 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_recvmsg_op* o(
+ static_cast<reactive_socket_recvmsg_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_send_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_send_op.hpp
index 5a778566ad8..ef7ec69933b 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_send_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_send_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_send_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,7 +20,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -50,6 +49,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_send_op_base* o(
static_cast<reactive_socket_send_op_base*>(base));
@@ -100,6 +100,9 @@ class reactive_socket_send_op :
public reactive_socket_send_op_base<ConstBufferSequence>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_send_op);
reactive_socket_send_op(const asio::error_code& success_ec,
@@ -108,7 +111,7 @@ public:
Handler& handler, const IoExecutor& io_ex)
: reactive_socket_send_op_base<ConstBufferSequence>(success_ec, socket,
state, buffers, flags, &reactive_socket_send_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -118,6 +121,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_send_op* o(static_cast<reactive_socket_send_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -125,9 +129,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -149,6 +155,39 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_send_op* o(static_cast<reactive_socket_send_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_sendto_op.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_sendto_op.hpp
index 28bff66980d..e1bbb70389c 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_sendto_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_sendto_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_sendto_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,7 +20,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -50,6 +49,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
reactive_socket_sendto_op_base* o(
static_cast<reactive_socket_sendto_op_base*>(base));
@@ -93,6 +93,9 @@ class reactive_socket_sendto_op :
public reactive_socket_sendto_op_base<ConstBufferSequence, Endpoint>
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_socket_sendto_op);
reactive_socket_sendto_op(const asio::error_code& success_ec,
@@ -102,7 +105,7 @@ public:
: reactive_socket_sendto_op_base<ConstBufferSequence, Endpoint>(
success_ec, socket, buffers, endpoint, flags,
&reactive_socket_sendto_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -112,6 +115,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_socket_sendto_op* o(static_cast<reactive_socket_sendto_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -119,9 +123,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(o->ec_);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -143,6 +149,38 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_socket_sendto_op* o(static_cast<reactive_socket_sendto_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ ASIO_ERROR_LOCATION(o->ec_);
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder2<Handler, asio::error_code, std::size_t>
+ handler(o->handler_, o->ec_, o->bytes_transferred_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_service.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_service.hpp
index 2124eaf9a9d..c828e7f1f2a 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_service.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_service.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,7 +17,8 @@
#include "asio/detail/config.hpp"
-#if !defined(ASIO_HAS_IOCP)
+#if !defined(ASIO_HAS_IOCP) \
+ && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/buffer.hpp"
#include "asio/error.hpp"
@@ -45,7 +46,7 @@ namespace detail {
template <typename Protocol>
class reactive_socket_service :
- public execution_context_service_base<reactive_socket_service<Protocol> >,
+ public execution_context_service_base<reactive_socket_service<Protocol>>,
public reactive_socket_service_base
{
public:
@@ -75,7 +76,7 @@ public:
// Constructor.
reactive_socket_service(execution_context& context)
: execution_context_service_base<
- reactive_socket_service<Protocol> >(context),
+ reactive_socket_service<Protocol>>(context),
reactive_socket_service_base(context)
{
}
@@ -88,7 +89,7 @@ public:
// Move-construct a new socket implementation.
void move_construct(implementation_type& impl,
- implementation_type& other_impl) ASIO_NOEXCEPT
+ implementation_type& other_impl) noexcept
{
this->base_move_construct(impl, other_impl);
@@ -127,6 +128,8 @@ public:
if (!do_open(impl, protocol.family(),
protocol.type(), protocol.protocol(), ec))
impl.protocol_ = protocol;
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -137,6 +140,8 @@ public:
{
if (!do_assign(impl, protocol.type(), native_socket, ec))
impl.protocol_ = protocol;
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -151,6 +156,8 @@ public:
const endpoint_type& endpoint, asio::error_code& ec)
{
socket_ops::bind(impl.socket_, endpoint.data(), endpoint.size(), ec);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -162,6 +169,8 @@ public:
socket_ops::setsockopt(impl.socket_, impl.state_,
option.level(impl.protocol_), option.name(impl.protocol_),
option.data(impl.protocol_), option.size(impl.protocol_), ec);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -176,6 +185,8 @@ public:
option.data(impl.protocol_), &size, ec);
if (!ec)
option.resize(impl.protocol_, size);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -186,7 +197,10 @@ public:
endpoint_type endpoint;
std::size_t addr_len = endpoint.capacity();
if (socket_ops::getsockname(impl.socket_, endpoint.data(), &addr_len, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return endpoint_type();
+ }
endpoint.resize(addr_len);
return endpoint;
}
@@ -199,7 +213,10 @@ public:
std::size_t addr_len = endpoint.capacity();
if (socket_ops::getpeername(impl.socket_,
endpoint.data(), &addr_len, false, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return endpoint_type();
+ }
endpoint.resize(addr_len);
return endpoint;
}
@@ -209,6 +226,8 @@ public:
socket_base::shutdown_type what, asio::error_code& ec)
{
socket_ops::shutdown(impl.socket_, what, ec);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -222,9 +241,10 @@ public:
typedef buffer_sequence_adapter<asio::const_buffer,
ConstBufferSequence> bufs_type;
+ size_t n;
if (bufs_type::is_single_buffer)
{
- return socket_ops::sync_sendto1(impl.socket_, impl.state_,
+ n = socket_ops::sync_sendto1(impl.socket_, impl.state_,
bufs_type::first(buffers).data(),
bufs_type::first(buffers).size(), flags,
destination.data(), destination.size(), ec);
@@ -232,10 +252,13 @@ public:
else
{
bufs_type bufs(buffers);
- return socket_ops::sync_sendto(impl.socket_, impl.state_,
+ n = socket_ops::sync_sendto(impl.socket_, impl.state_,
bufs.buffers(), bufs.count(), flags,
destination.data(), destination.size(), ec);
}
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be sent without blocking.
@@ -246,6 +269,7 @@ public:
// Wait for socket to become ready.
socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -260,7 +284,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -282,7 +306,8 @@ public:
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_send_to"));
- start_op(impl, reactor::write_op, p.p, is_continuation, true, false);
+ start_op(impl, reactor::write_op, p.p,
+ is_continuation, true, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -295,7 +320,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -315,7 +340,8 @@ public:
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_send_to(null_buffers)"));
- start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
+ start_op(impl, reactor::write_op, p.p,
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -331,26 +357,25 @@ public:
MutableBufferSequence> bufs_type;
std::size_t addr_len = sender_endpoint.capacity();
- std::size_t bytes_recvd;
+ std::size_t n;
if (bufs_type::is_single_buffer)
{
- bytes_recvd = socket_ops::sync_recvfrom1(impl.socket_,
- impl.state_, bufs_type::first(buffers).data(),
- bufs_type::first(buffers).size(), flags,
- sender_endpoint.data(), &addr_len, ec);
+ n = socket_ops::sync_recvfrom1(impl.socket_, impl.state_,
+ bufs_type::first(buffers).data(), bufs_type::first(buffers).size(),
+ flags, sender_endpoint.data(), &addr_len, ec);
}
else
{
bufs_type bufs(buffers);
- bytes_recvd = socket_ops::sync_recvfrom(
- impl.socket_, impl.state_, bufs.buffers(), bufs.count(),
- flags, sender_endpoint.data(), &addr_len, ec);
+ n = socket_ops::sync_recvfrom(impl.socket_, impl.state_, bufs.buffers(),
+ bufs.count(), flags, sender_endpoint.data(), &addr_len, ec);
}
if (!ec)
sender_endpoint.resize(addr_len);
- return bytes_recvd;
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be received without blocking.
@@ -364,6 +389,7 @@ public:
// Reset endpoint since it can be given no sensible value at this time.
sender_endpoint = endpoint_type();
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -380,7 +406,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -406,7 +432,7 @@ public:
start_op(impl,
(flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
- p.p, is_continuation, true, false);
+ p.p, is_continuation, true, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -419,7 +445,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -445,7 +471,7 @@ public:
start_op(impl,
(flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
- p.p, is_continuation, false, false);
+ p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -458,6 +484,7 @@ public:
if (peer.is_open())
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -476,6 +503,7 @@ public:
new_socket.release();
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -488,7 +516,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -509,11 +537,10 @@ public:
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_accept"));
- start_accept_op(impl, p.p, is_continuation, peer.is_open());
+ start_accept_op(impl, p.p, is_continuation, peer.is_open(), &io_ex, 0);
p.v = p.p = 0;
}
-#if defined(ASIO_HAS_MOVE)
// Start an asynchronous accept. The peer_endpoint object must be valid until
// the accept's handler is invoked.
template <typename PeerIoExecutor, typename Handler, typename IoExecutor>
@@ -524,7 +551,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -546,10 +573,9 @@ public:
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_accept"));
- start_accept_op(impl, p.p, is_continuation, false);
+ start_accept_op(impl, p.p, is_continuation, false, &io_ex, 0);
p.v = p.p = 0;
}
-#endif // defined(ASIO_HAS_MOVE)
// Connect the socket to the specified endpoint.
asio::error_code connect(implementation_type& impl,
@@ -557,6 +583,7 @@ public:
{
socket_ops::sync_connect(impl.socket_,
peer_endpoint.data(), peer_endpoint.size(), ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -569,7 +596,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -590,7 +617,7 @@ public:
&impl, impl.socket_, "async_connect"));
start_connect_op(impl, p.p, is_continuation,
- peer_endpoint.data(), peer_endpoint.size());
+ peer_endpoint.data(), peer_endpoint.size(), &io_ex, 0);
p.v = p.p = 0;
}
};
@@ -601,5 +628,6 @@ public:
#include "asio/detail/pop_options.hpp"
#endif // !defined(ASIO_HAS_IOCP)
+ // && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/reactive_socket_service_base.hpp b/3rdparty/asio/include/asio/detail/reactive_socket_service_base.hpp
index c36811b9a99..63dcacad582 100644
--- a/3rdparty/asio/include/asio/detail/reactive_socket_service_base.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_socket_service_base.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,7 +18,8 @@
#include "asio/detail/config.hpp"
#if !defined(ASIO_HAS_IOCP) \
- && !defined(ASIO_WINDOWS_RUNTIME)
+ && !defined(ASIO_WINDOWS_RUNTIME) \
+ && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/associated_cancellation_slot.hpp"
#include "asio/buffer.hpp"
@@ -74,7 +75,7 @@ public:
// Move-construct a new socket implementation.
ASIO_DECL void base_move_construct(base_implementation_type& impl,
- base_implementation_type& other_impl) ASIO_NOEXCEPT;
+ base_implementation_type& other_impl) noexcept;
// Move-assign from another socket implementation.
ASIO_DECL void base_move_assign(base_implementation_type& impl,
@@ -201,7 +202,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -216,20 +217,21 @@ public:
int op_type;
switch (w)
{
- case socket_base::wait_read:
- op_type = reactor::read_op;
- break;
- case socket_base::wait_write:
- op_type = reactor::write_op;
- break;
- case socket_base::wait_error:
- op_type = reactor::except_op;
- break;
- default:
- p.p->ec_ = asio::error::invalid_argument;
- reactor_.post_immediate_completion(p.p, is_continuation);
- p.v = p.p = 0;
- return;
+ case socket_base::wait_read:
+ op_type = reactor::read_op;
+ break;
+ case socket_base::wait_write:
+ op_type = reactor::write_op;
+ break;
+ case socket_base::wait_error:
+ op_type = reactor::except_op;
+ break;
+ default:
+ p.p->ec_ = asio::error::invalid_argument;
+ start_op(impl, reactor::read_op, p.p,
+ is_continuation, false, true, &io_ex, 0);
+ p.v = p.p = 0;
+ return;
}
// Optionally register for per-operation cancellation.
@@ -240,7 +242,7 @@ public:
&reactor_, &impl.reactor_data_, impl.socket_, op_type);
}
- start_op(impl, op_type, p.p, is_continuation, false, false);
+ start_op(impl, op_type, p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -287,7 +289,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -312,7 +314,7 @@ public:
start_op(impl, reactor::write_op, p.p, is_continuation, true,
((impl.state_ & socket_ops::stream_oriented)
&& buffer_sequence_adapter<asio::const_buffer,
- ConstBufferSequence>::all_empty(buffers)));
+ ConstBufferSequence>::all_empty(buffers)), &io_ex, 0);
p.v = p.p = 0;
}
@@ -324,7 +326,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -344,7 +346,8 @@ public:
ASIO_HANDLER_CREATION((reactor_.context(), *p.p, "socket",
&impl, impl.socket_, "async_send(null_buffers)"));
- start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
+ start_op(impl, reactor::write_op, p.p,
+ is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -392,7 +395,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -421,7 +424,7 @@ public:
(flags & socket_base::message_out_of_band) == 0,
((impl.state_ & socket_ops::stream_oriented)
&& buffer_sequence_adapter<asio::mutable_buffer,
- MutableBufferSequence>::all_empty(buffers)));
+ MutableBufferSequence>::all_empty(buffers)), &io_ex, 0);
p.v = p.p = 0;
}
@@ -434,7 +437,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -457,7 +460,7 @@ public:
start_op(impl,
(flags & socket_base::message_out_of_band)
? reactor::except_op : reactor::read_op,
- p.p, is_continuation, false, false);
+ p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -503,7 +506,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -529,7 +532,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);
+ (in_flags & socket_base::message_out_of_band) == 0, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -543,7 +546,7 @@ public:
bool is_continuation =
asio_handler_cont_helpers::is_continuation(handler);
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -570,7 +573,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);
+ p.p, is_continuation, false, false, &io_ex, 0);
p.v = p.p = 0;
}
@@ -586,24 +589,118 @@ protected:
const native_handle_type& native_socket, asio::error_code& ec);
// Start the asynchronous read or write operation.
- ASIO_DECL void start_op(base_implementation_type& impl, int op_type,
- reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop);
+ 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);
+
+ // Start the asynchronous operation for handlers that are specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_op(base_implementation_type& impl, int op_type, Op* op,
+ bool is_continuation, bool is_non_blocking, bool noop,
+ const void* 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 is_non_blocking, bool noop, const void*,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ typename Op::handler_type,
+ typename Op::io_executor_type
+ >::asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ 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.
- ASIO_DECL void start_accept_op(base_implementation_type& impl,
- reactor_op* op, bool is_continuation, bool peer_is_open);
+ ASIO_DECL void do_start_accept_op(base_implementation_type& impl,
+ reactor_op* op, bool is_continuation, bool peer_is_open,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg);
+
+ // Start the asynchronous accept operation for handlers that are specialised
+ // for immediate completion.
+ template <typename Op>
+ void start_accept_op(base_implementation_type& impl, Op* op,
+ bool is_continuation, bool peer_is_open, const void* io_ex, ...)
+ {
+ return do_start_accept_op(impl, op, is_continuation,
+ peer_is_open, &Op::do_immediate, io_ex);
+ }
+
+ // Start the asynchronous operation for handlers that are not specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_accept_op(base_implementation_type& impl, Op* op,
+ bool is_continuation, bool peer_is_open, const void*,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ typename Op::handler_type,
+ typename Op::io_executor_type
+ >::asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ return do_start_accept_op(impl, op, is_continuation, peer_is_open,
+ &reactor::call_post_immediate_completion, &reactor_);
+ }
// Start the asynchronous connect operation.
- ASIO_DECL void start_connect_op(base_implementation_type& impl,
- reactor_op* op, bool is_continuation,
- const socket_addr_type* addr, size_t addrlen);
+ ASIO_DECL void do_start_connect_op(base_implementation_type& impl,
+ reactor_op* op, bool is_continuation, const void* addr, size_t addrlen,
+ void (*on_immediate)(operation* op, bool, const void*),
+ const void* immediate_arg);
+
+ // Start the asynchronous operation for handlers that are specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_connect_op(base_implementation_type& impl,
+ Op* op, bool is_continuation, const void* addr,
+ size_t addrlen, const void* io_ex, ...)
+ {
+ return do_start_connect_op(impl, op, is_continuation,
+ addr, addrlen, &Op::do_immediate, io_ex);
+ }
+
+ // Start the asynchronous operation for handlers that are not specialised for
+ // immediate completion.
+ template <typename Op>
+ void start_connect_op(base_implementation_type& impl, Op* op,
+ bool is_continuation, const void* addr, size_t addrlen, const void*,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ typename Op::handler_type,
+ typename Op::io_executor_type
+ >::asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ return do_start_connect_op(impl, op, is_continuation, addr,
+ addrlen, &reactor::call_post_immediate_completion, &reactor_);
+ }
// Helper class used to implement per-operation cancellation
class reactor_op_cancellation
{
public:
reactor_op_cancellation(reactor* r,
- reactor::per_descriptor_data* p, int d, int o)
+ reactor::per_descriptor_data* p, socket_type d, int o)
: reactor_(r),
reactor_data_(p),
descriptor_(d),
@@ -626,7 +723,7 @@ protected:
private:
reactor* reactor_;
reactor::per_descriptor_data* reactor_data_;
- int descriptor_;
+ socket_type descriptor_;
int op_type_;
};
@@ -648,5 +745,6 @@ protected:
#endif // !defined(ASIO_HAS_IOCP)
// && !defined(ASIO_WINDOWS_RUNTIME)
+ // && !defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_BASE_HPP
diff --git a/3rdparty/asio/include/asio/detail/reactive_wait_op.hpp b/3rdparty/asio/include/asio/detail/reactive_wait_op.hpp
index c7e2eb8d376..62938e2d83e 100644
--- a/3rdparty/asio/include/asio/detail/reactive_wait_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactive_wait_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_wait_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,7 +19,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -33,13 +32,16 @@ template <typename Handler, typename IoExecutor>
class reactive_wait_op : public reactor_op
{
public:
+ typedef Handler handler_type;
+ typedef IoExecutor io_executor_type;
+
ASIO_DEFINE_HANDLER_PTR(reactive_wait_op);
reactive_wait_op(const asio::error_code& success_ec,
Handler& handler, const IoExecutor& io_ex)
: reactor_op(success_ec, &reactive_wait_op::do_perform,
&reactive_wait_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -54,6 +56,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
reactive_wait_op* o(static_cast<reactive_wait_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -61,7 +64,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
// Make a copy of the handler so that the memory can be deallocated before
@@ -85,6 +88,36 @@ public:
}
}
+ static void do_immediate(operation* base, bool, const void* io_ex)
+ {
+ // Take ownership of the handler object.
+ ASIO_ASSUME(base != 0);
+ reactive_wait_op* o(static_cast<reactive_wait_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ immediate_handler_work<Handler, IoExecutor> w(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the upcall is made. Even if we're not about to make an upcall, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, o->ec_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ w.complete(handler, handler.handler_, io_ex);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+
private:
Handler handler_;
handler_work<Handler, IoExecutor> work_;
diff --git a/3rdparty/asio/include/asio/detail/reactor.hpp b/3rdparty/asio/include/asio/detail/reactor.hpp
index 03a601c7d43..054acfdab00 100644
--- a/3rdparty/asio/include/asio/detail/reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/reactor.hpp
@@ -2,7 +2,7 @@
// detail/reactor.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -15,18 +15,40 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-#include "asio/detail/reactor_fwd.hpp"
+#include "asio/detail/config.hpp"
-#if defined(ASIO_HAS_EPOLL)
+#if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
+# include "asio/detail/null_reactor.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/null_reactor.hpp"
+#elif defined(ASIO_HAS_EPOLL)
# include "asio/detail/epoll_reactor.hpp"
#elif defined(ASIO_HAS_KQUEUE)
# include "asio/detail/kqueue_reactor.hpp"
#elif defined(ASIO_HAS_DEV_POLL)
# include "asio/detail/dev_poll_reactor.hpp"
-#elif defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
-# include "asio/detail/null_reactor.hpp"
#else
# include "asio/detail/select_reactor.hpp"
#endif
+namespace asio {
+namespace detail {
+
+#if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
+typedef null_reactor reactor;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+typedef null_reactor reactor;
+#elif defined(ASIO_HAS_EPOLL)
+typedef epoll_reactor reactor;
+#elif defined(ASIO_HAS_KQUEUE)
+typedef kqueue_reactor reactor;
+#elif defined(ASIO_HAS_DEV_POLL)
+typedef dev_poll_reactor reactor;
+#else
+typedef select_reactor reactor;
+#endif
+
+} // namespace detail
+} // namespace asio
+
#endif // ASIO_DETAIL_REACTOR_HPP
diff --git a/3rdparty/asio/include/asio/detail/reactor_fwd.hpp b/3rdparty/asio/include/asio/detail/reactor_fwd.hpp
deleted file mode 100644
index b9c084614ab..00000000000
--- a/3rdparty/asio/include/asio/detail/reactor_fwd.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// detail/reactor_fwd.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_DETAIL_REACTOR_FWD_HPP
-#define ASIO_DETAIL_REACTOR_FWD_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-namespace asio {
-namespace detail {
-
-#if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
-typedef class null_reactor reactor;
-#elif defined(ASIO_HAS_IOCP)
-typedef class select_reactor reactor;
-#elif defined(ASIO_HAS_EPOLL)
-typedef class epoll_reactor reactor;
-#elif defined(ASIO_HAS_KQUEUE)
-typedef class kqueue_reactor reactor;
-#elif defined(ASIO_HAS_DEV_POLL)
-typedef class dev_poll_reactor reactor;
-#else
-typedef class select_reactor reactor;
-#endif
-
-} // namespace detail
-} // namespace asio
-
-#endif // ASIO_DETAIL_REACTOR_FWD_HPP
diff --git a/3rdparty/asio/include/asio/detail/reactor_op.hpp b/3rdparty/asio/include/asio/detail/reactor_op.hpp
index d38aa7e111e..54d6cd964eb 100644
--- a/3rdparty/asio/include/asio/detail/reactor_op.hpp
+++ b/3rdparty/asio/include/asio/detail/reactor_op.hpp
@@ -2,7 +2,7 @@
// detail/reactor_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/reactor_op_queue.hpp b/3rdparty/asio/include/asio/detail/reactor_op_queue.hpp
index 0eb4ca3293a..fae1a52d9e7 100644
--- a/3rdparty/asio/include/asio/detail/reactor_op_queue.hpp
+++ b/3rdparty/asio/include/asio/detail/reactor_op_queue.hpp
@@ -2,7 +2,7 @@
// detail/reactor_op_queue.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/recycling_allocator.hpp b/3rdparty/asio/include/asio/detail/recycling_allocator.hpp
index 8ca2e2ba16b..d556f22a399 100644
--- a/3rdparty/asio/include/asio/detail/recycling_allocator.hpp
+++ b/3rdparty/asio/include/asio/detail/recycling_allocator.hpp
@@ -2,7 +2,7 @@
// detail/recycling_allocator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -50,7 +50,7 @@ public:
{
void* p = thread_info_base::allocate(Purpose(),
thread_context::top_of_thread_call_stack(),
- sizeof(T) * n, ASIO_ALIGNOF(T));
+ sizeof(T) * n, alignof(T));
return static_cast<T*>(p);
}
diff --git a/3rdparty/asio/include/asio/detail/regex_fwd.hpp b/3rdparty/asio/include/asio/detail/regex_fwd.hpp
index bde7402ee66..a5c6c0a9428 100644
--- a/3rdparty/asio/include/asio/detail/regex_fwd.hpp
+++ b/3rdparty/asio/include/asio/detail/regex_fwd.hpp
@@ -2,7 +2,7 @@
// detail/regex_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,18 +17,6 @@
#if defined(ASIO_HAS_BOOST_REGEX)
-#include <boost/regex_fwd.hpp>
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 107600
-# if defined(BOOST_REGEX_CXX03)
-# include <boost/regex/v4/match_flags.hpp>
-# else // defined(BOOST_REGEX_CXX03)
-# include <boost/regex/v5/match_flags.hpp>
-# endif // defined(BOOST_REGEX_CXX03)
-#else // BOOST_VERSION >= 107600
-# include <boost/regex/v4/match_flags.hpp>
-#endif // BOOST_VERSION >= 107600
-
namespace boost {
template <class BidiIterator>
@@ -37,6 +25,9 @@ struct sub_match;
template <class BidiIterator, class Allocator>
class match_results;
+template <class CharT, class Traits>
+class basic_regex;
+
} // namespace boost
#endif // defined(ASIO_HAS_BOOST_REGEX)
diff --git a/3rdparty/asio/include/asio/detail/resolve_endpoint_op.hpp b/3rdparty/asio/include/asio/detail/resolve_endpoint_op.hpp
index 998bbb8a8cf..c7cb2c4c101 100644
--- a/3rdparty/asio/include/asio/detail/resolve_endpoint_op.hpp
+++ b/3rdparty/asio/include/asio/detail/resolve_endpoint_op.hpp
@@ -2,7 +2,7 @@
// detail/resolve_endpoint_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,7 +19,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/resolve_op.hpp"
@@ -60,7 +59,7 @@ public:
cancel_token_(cancel_token),
endpoint_(endpoint),
scheduler_(sched),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -70,6 +69,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
resolve_endpoint_op* o(static_cast<resolve_endpoint_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -99,7 +99,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
// Make a copy of the handler so that the memory can be deallocated
diff --git a/3rdparty/asio/include/asio/detail/resolve_op.hpp b/3rdparty/asio/include/asio/detail/resolve_op.hpp
index e0ac00bd746..5b41ad2fe68 100644
--- a/3rdparty/asio/include/asio/detail/resolve_op.hpp
+++ b/3rdparty/asio/include/asio/detail/resolve_op.hpp
@@ -2,7 +2,7 @@
// detail/resolve_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/resolve_query_op.hpp b/3rdparty/asio/include/asio/detail/resolve_query_op.hpp
index 5a2ffa71a7b..b7f9e35cef0 100644
--- a/3rdparty/asio/include/asio/detail/resolve_query_op.hpp
+++ b/3rdparty/asio/include/asio/detail/resolve_query_op.hpp
@@ -2,7 +2,7 @@
// detail/resolve_query_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,7 +19,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/resolve_op.hpp"
@@ -61,7 +60,7 @@ public:
cancel_token_(cancel_token),
query_(qry),
scheduler_(sched),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex),
addrinfo_(0)
{
@@ -78,6 +77,7 @@ public:
std::size_t /*bytes_transferred*/)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
resolve_query_op* o(static_cast<resolve_query_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -104,7 +104,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
// Make a copy of the handler so that the memory can be deallocated
diff --git a/3rdparty/asio/include/asio/detail/resolver_service.hpp b/3rdparty/asio/include/asio/detail/resolver_service.hpp
index 006b35c7c5a..2d1fe22b62a 100644
--- a/3rdparty/asio/include/asio/detail/resolver_service.hpp
+++ b/3rdparty/asio/include/asio/detail/resolver_service.hpp
@@ -2,7 +2,7 @@
// detail/resolver_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -34,7 +34,7 @@ namespace detail {
template <typename Protocol>
class resolver_service :
- public execution_context_service_base<resolver_service<Protocol> >,
+ public execution_context_service_base<resolver_service<Protocol>>,
public resolver_service_base
{
public:
@@ -53,7 +53,7 @@ public:
// Constructor.
resolver_service(execution_context& context)
- : execution_context_service_base<resolver_service<Protocol> >(context),
+ : execution_context_service_base<resolver_service<Protocol>>(context),
resolver_service_base(context)
{
}
@@ -80,6 +80,7 @@ public:
qry.service_name().c_str(), qry.hints(), &address_info, ec);
auto_addrinfo auto_address_info(address_info);
+ ASIO_ERROR_LOCATION(ec);
return ec ? results_type() : results_type::create(
address_info, qry.host_name(), qry.service_name());
}
@@ -112,6 +113,7 @@ public:
host_name, NI_MAXHOST, service_name, NI_MAXSERV,
endpoint.protocol().type(), ec);
+ ASIO_ERROR_LOCATION(ec);
return ec ? results_type() : results_type::create(
endpoint, host_name, service_name);
}
diff --git a/3rdparty/asio/include/asio/detail/resolver_service_base.hpp b/3rdparty/asio/include/asio/detail/resolver_service_base.hpp
index 0df30f40607..160793c89cb 100644
--- a/3rdparty/asio/include/asio/detail/resolver_service_base.hpp
+++ b/3rdparty/asio/include/asio/detail/resolver_service_base.hpp
@@ -2,7 +2,7 @@
// detail/resolver_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/scheduler.hpp b/3rdparty/asio/include/asio/detail/scheduler.hpp
index ce8a7e17b9b..a73ec141ebc 100644
--- a/3rdparty/asio/include/asio/detail/scheduler.hpp
+++ b/3rdparty/asio/include/asio/detail/scheduler.hpp
@@ -2,7 +2,7 @@
// detail/scheduler.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,8 +23,8 @@
#include "asio/detail/conditionally_enabled_event.hpp"
#include "asio/detail/conditionally_enabled_mutex.hpp"
#include "asio/detail/op_queue.hpp"
-#include "asio/detail/reactor_fwd.hpp"
#include "asio/detail/scheduler_operation.hpp"
+#include "asio/detail/scheduler_task.hpp"
#include "asio/detail/thread.hpp"
#include "asio/detail/thread_context.hpp"
@@ -42,10 +42,15 @@ class scheduler
public:
typedef scheduler_operation operation;
+ // The type of a function used to obtain a task instance.
+ typedef scheduler_task* (*get_task_func_type)(
+ asio::execution_context&);
+
// Constructor. Specifies the number of concurrent threads that are likely to
// run the scheduler. If set to 1 certain optimisation are performed.
ASIO_DECL scheduler(asio::execution_context& ctx,
- int concurrency_hint = 0, bool own_thread = true);
+ int concurrency_hint = 0, bool own_thread = true,
+ get_task_func_type get_task = &scheduler::get_default_task);
// Destructor.
ASIO_DECL ~scheduler();
@@ -165,6 +170,10 @@ private:
ASIO_DECL void wake_one_thread_and_unlock(
mutex::scoped_lock& lock);
+ // Get the default task.
+ ASIO_DECL static scheduler_task* get_default_task(
+ asio::execution_context& ctx);
+
// Helper class to run the scheduler in its own thread.
class thread_function;
friend class thread_function;
@@ -187,7 +196,10 @@ private:
event wakeup_event_;
// The task to be run by this service.
- reactor* task_;
+ scheduler_task* task_;
+
+ // The function used to get the task.
+ get_task_func_type get_task_;
// Operation object to represent the position of the task in the queue.
struct task_operation : operation
diff --git a/3rdparty/asio/include/asio/detail/scheduler_operation.hpp b/3rdparty/asio/include/asio/detail/scheduler_operation.hpp
index 1ca4964f540..1b4ceb36f5c 100644
--- a/3rdparty/asio/include/asio/detail/scheduler_operation.hpp
+++ b/3rdparty/asio/include/asio/detail/scheduler_operation.hpp
@@ -2,7 +2,7 @@
// detail/scheduler_operation.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/scheduler_task.hpp b/3rdparty/asio/include/asio/detail/scheduler_task.hpp
new file mode 100644
index 00000000000..a1a4ec1c85f
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/scheduler_task.hpp
@@ -0,0 +1,49 @@
+//
+// detail/scheduler_task.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 ASIO_DETAIL_SCHEDULER_TASK_HPP
+#define ASIO_DETAIL_SCHEDULER_TASK_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/op_queue.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class scheduler_operation;
+
+// Base class for all tasks that may be run by a scheduler.
+class scheduler_task
+{
+public:
+ // Run the task once until interrupted or events are ready to be dispatched.
+ virtual void run(long usec, op_queue<scheduler_operation>& ops) = 0;
+
+ // Interrupt the task.
+ virtual void interrupt() = 0;
+
+protected:
+ // Prevent deletion through this type.
+ ~scheduler_task()
+ {
+ }
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_SCHEDULER_TASK_HPP
diff --git a/3rdparty/asio/include/asio/detail/scheduler_thread_info.hpp b/3rdparty/asio/include/asio/detail/scheduler_thread_info.hpp
index 3202e3c5792..410d2866b59 100644
--- a/3rdparty/asio/include/asio/detail/scheduler_thread_info.hpp
+++ b/3rdparty/asio/include/asio/detail/scheduler_thread_info.hpp
@@ -2,7 +2,7 @@
// detail/scheduler_thread_info.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/scoped_lock.hpp b/3rdparty/asio/include/asio/detail/scoped_lock.hpp
index 273d702375a..778832d6350 100644
--- a/3rdparty/asio/include/asio/detail/scoped_lock.hpp
+++ b/3rdparty/asio/include/asio/detail/scoped_lock.hpp
@@ -2,7 +2,7 @@
// detail/scoped_lock.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/scoped_ptr.hpp b/3rdparty/asio/include/asio/detail/scoped_ptr.hpp
index 2eab4c99a36..a517c2b947c 100644
--- a/3rdparty/asio/include/asio/detail/scoped_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/scoped_ptr.hpp
@@ -2,7 +2,7 @@
// detail/scoped_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/select_interrupter.hpp b/3rdparty/asio/include/asio/detail/select_interrupter.hpp
index a542373cc3b..57cb4ce8d71 100644
--- a/3rdparty/asio/include/asio/detail/select_interrupter.hpp
+++ b/3rdparty/asio/include/asio/detail/select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/select_reactor.hpp b/3rdparty/asio/include/asio/detail/select_reactor.hpp
index cb3e525a1d0..7fe647b7e63 100644
--- a/3rdparty/asio/include/asio/detail/select_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/select_reactor.hpp
@@ -2,7 +2,7 @@
// detail/select_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -30,6 +30,7 @@
#include "asio/detail/op_queue.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/reactor_op_queue.hpp"
+#include "asio/detail/scheduler_task.hpp"
#include "asio/detail/select_interrupter.hpp"
#include "asio/detail/socket_types.hpp"
#include "asio/detail/timer_queue_base.hpp"
@@ -48,6 +49,9 @@ namespace detail {
class select_reactor
: public execution_context_service_base<select_reactor>
+#if !defined(ASIO_HAS_IOCP)
+ , public scheduler_task
+#endif // !defined(ASIO_HAS_IOCP)
{
public:
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
@@ -90,12 +94,29 @@ public:
per_descriptor_data& descriptor_data, reactor_op* op);
// Post a reactor operation for immediate completion.
- void post_immediate_completion(reactor_op* op, bool is_continuation);
+ void post_immediate_completion(operation* op, bool is_continuation) const;
+
+ // Post a reactor operation for immediate completion.
+ ASIO_DECL static void call_post_immediate_completion(
+ operation* op, bool is_continuation, const void* self);
// Start a new operation. The reactor operation will be performed when the
// given descriptor is flagged as ready, or an error has occurred.
ASIO_DECL void start_op(int op_type, socket_type descriptor,
- per_descriptor_data&, reactor_op* op, bool is_continuation, bool);
+ per_descriptor_data&, reactor_op* op, bool is_continuation, bool,
+ void (*on_immediate)(operation*, bool, const void*),
+ const void* immediate_arg);
+
+ // Start a new operation. The reactor operation will be performed when the
+ // given descriptor is flagged as ready, or an error has occurred.
+ void start_op(int op_type, socket_type descriptor,
+ per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+ {
+ start_op(op_type, descriptor, descriptor_data,
+ op, is_continuation, allow_speculative,
+ &select_reactor::call_post_immediate_completion, this);
+ }
// Cancel all operations associated with the given descriptor. The
// handlers associated with the descriptor will be invoked with the
@@ -223,6 +244,28 @@ private:
// The thread that is running the reactor loop.
asio::detail::thread* thread_;
+
+ // Helper class to join and restart the reactor thread.
+ class restart_reactor : public operation
+ {
+ public:
+ restart_reactor(select_reactor* r)
+ : operation(&restart_reactor::do_complete),
+ reactor_(r)
+ {
+ }
+
+ ASIO_DECL static void do_complete(void* owner, operation* base,
+ const asio::error_code& ec, std::size_t bytes_transferred);
+
+ private:
+ select_reactor* reactor_;
+ };
+
+ friend class restart_reactor;
+
+ // Operation used to join and restart the reactor thread.
+ restart_reactor restart_reactor_;
#endif // defined(ASIO_HAS_IOCP)
// Whether the service has been shut down.
diff --git a/3rdparty/asio/include/asio/detail/service_registry.hpp b/3rdparty/asio/include/asio/detail/service_registry.hpp
index 2c7f4a52068..991b32a4980 100644
--- a/3rdparty/asio/include/asio/detail/service_registry.hpp
+++ b/3rdparty/asio/include/asio/detail/service_registry.hpp
@@ -2,7 +2,7 @@
// detail/service_registry.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -84,8 +84,7 @@ private:
// Initalise a service's key when the key_type typedef is available.
template <typename Service>
static void init_key(execution_context::service::key& key,
- typename enable_if<
- is_base_of<typename Service::key_type, Service>::value>::type*);
+ enable_if_t<is_base_of<typename Service::key_type, Service>::value>*);
#endif // !defined(ASIO_NO_TYPEID)
// Initialise a service's key based on its id.
diff --git a/3rdparty/asio/include/asio/detail/signal_blocker.hpp b/3rdparty/asio/include/asio/detail/signal_blocker.hpp
index bbe7b3fedd5..11d0b0e9633 100644
--- a/3rdparty/asio/include/asio/detail/signal_blocker.hpp
+++ b/3rdparty/asio/include/asio/detail/signal_blocker.hpp
@@ -2,7 +2,7 @@
// detail/signal_blocker.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/signal_handler.hpp b/3rdparty/asio/include/asio/detail/signal_handler.hpp
index 0153133f1de..6d43f578cb9 100644
--- a/3rdparty/asio/include/asio/detail/signal_handler.hpp
+++ b/3rdparty/asio/include/asio/detail/signal_handler.hpp
@@ -2,7 +2,7 @@
// detail/signal_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -36,7 +36,7 @@ public:
signal_handler(Handler& h, const IoExecutor& io_ex)
: signal_op(&signal_handler::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(h)),
+ handler_(static_cast<Handler&&>(h)),
work_(handler_, io_ex)
{
}
@@ -53,7 +53,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
h->work_));
// Make a copy of the handler so that the memory can be deallocated before
diff --git a/3rdparty/asio/include/asio/detail/signal_init.hpp b/3rdparty/asio/include/asio/detail/signal_init.hpp
index 80c7a7adc81..6f2c7c867e2 100644
--- a/3rdparty/asio/include/asio/detail/signal_init.hpp
+++ b/3rdparty/asio/include/asio/detail/signal_init.hpp
@@ -2,7 +2,7 @@
// detail/signal_init.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/signal_op.hpp b/3rdparty/asio/include/asio/detail/signal_op.hpp
index 297c0d9fa76..5e0071a5d62 100644
--- a/3rdparty/asio/include/asio/detail/signal_op.hpp
+++ b/3rdparty/asio/include/asio/detail/signal_op.hpp
@@ -2,7 +2,7 @@
// detail/signal_op.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -30,12 +30,16 @@ public:
// The error code to be passed to the completion handler.
asio::error_code ec_;
+ // The operation key used for targeted cancellation.
+ void* cancellation_key_;
+
// The signal number to be passed to the completion handler.
int signal_number_;
protected:
signal_op(func_type func)
: operation(func),
+ cancellation_key_(0),
signal_number_(0)
{
}
diff --git a/3rdparty/asio/include/asio/detail/signal_set_service.hpp b/3rdparty/asio/include/asio/detail/signal_set_service.hpp
index 7652fe20064..142ff43851a 100644
--- a/3rdparty/asio/include/asio/detail/signal_set_service.hpp
+++ b/3rdparty/asio/include/asio/detail/signal_set_service.hpp
@@ -2,7 +2,7 @@
// detail/signal_set_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,8 +19,11 @@
#include <cstddef>
#include <signal.h>
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/cancellation_type.hpp"
#include "asio/error.hpp"
#include "asio/execution_context.hpp"
+#include "asio/signal_set_base.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/op_queue.hpp"
@@ -35,7 +38,11 @@
#endif // defined(ASIO_HAS_IOCP)
#if !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
-# include "asio/detail/reactor.hpp"
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_service.hpp"
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/reactor.hpp"
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__)
#include "asio/detail/push_options.hpp"
@@ -134,8 +141,16 @@ public:
ASIO_DECL void destroy(implementation_type& impl);
// Add a signal to a signal_set.
+ asio::error_code add(implementation_type& impl,
+ int signal_number, asio::error_code& ec)
+ {
+ return add(impl, signal_number, signal_set_base::flags::dont_care, ec);
+ }
+
+ // Add a signal to a signal_set with the specified flags.
ASIO_DECL asio::error_code add(implementation_type& impl,
- int signal_number, asio::error_code& ec);
+ int signal_number, signal_set_base::flags_t f,
+ asio::error_code& ec);
// Remove a signal to a signal_set.
ASIO_DECL asio::error_code remove(implementation_type& impl,
@@ -149,17 +164,31 @@ public:
ASIO_DECL asio::error_code cancel(implementation_type& impl,
asio::error_code& ec);
+ // Cancel a specific operation associated with the signal set.
+ ASIO_DECL void cancel_ops_by_key(implementation_type& impl,
+ void* cancellation_key);
+
// Start an asynchronous operation to wait for a signal to be delivered.
template <typename Handler, typename IoExecutor>
void async_wait(implementation_type& impl,
Handler& handler, const IoExecutor& io_ex)
{
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
// Allocate and construct an operation to wrap the handler.
typedef signal_handler<Handler, IoExecutor> op;
typename op::ptr p = { asio::detail::addressof(handler),
op::ptr::allocate(handler), 0 };
p.p = new (p.v) op(handler, io_ex);
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<signal_op_cancellation>(this, &impl);
+ }
+
ASIO_HANDLER_CREATION((scheduler_.context(),
*p.p, "signal_set", &impl, 0, "async_wait"));
@@ -186,6 +215,32 @@ private:
// Helper function to start a wait operation.
ASIO_DECL void start_wait_op(implementation_type& impl, signal_op* op);
+ // Helper class used to implement per-operation cancellation
+ class signal_op_cancellation
+ {
+ public:
+ signal_op_cancellation(signal_set_service* s, implementation_type* i)
+ : service_(s),
+ implementation_(i)
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ service_->cancel_ops_by_key(*implementation_, this);
+ }
+ }
+
+ private:
+ signal_set_service* service_;
+ implementation_type* implementation_;
+ };
+
// The scheduler used for dispatching handlers.
#if defined(ASIO_HAS_IOCP)
typedef class win_iocp_io_context scheduler_impl;
@@ -197,14 +252,22 @@ private:
#if !defined(ASIO_WINDOWS) \
&& !defined(ASIO_WINDOWS_RUNTIME) \
&& !defined(__CYGWIN__)
- // The type used for registering for pipe reactor notifications.
+ // The type used for processing pipe readiness notifications.
class pipe_read_op;
+# if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ // The io_uring service used for waiting for pipe readiness.
+ io_uring_service& io_uring_service_;
+
+ // The per I/O object data used for the pipe.
+ io_uring_service::per_io_object_data io_object_data_;
+# else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
// The reactor used for waiting for pipe readiness.
reactor& reactor_;
// The per-descriptor reactor data used for the pipe.
reactor::per_descriptor_data reactor_data_;
+# endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#endif // !defined(ASIO_WINDOWS)
// && !defined(ASIO_WINDOWS_RUNTIME)
// && !defined(__CYGWIN__)
diff --git a/3rdparty/asio/include/asio/detail/socket_holder.hpp b/3rdparty/asio/include/asio/detail/socket_holder.hpp
index 571b9f67c27..300e3736636 100644
--- a/3rdparty/asio/include/asio/detail/socket_holder.hpp
+++ b/3rdparty/asio/include/asio/detail/socket_holder.hpp
@@ -2,7 +2,7 @@
// detail/socket_holder.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/socket_ops.hpp b/3rdparty/asio/include/asio/detail/socket_ops.hpp
index a37684e1c62..fd2dc09c094 100644
--- a/3rdparty/asio/include/asio/detail/socket_ops.hpp
+++ b/3rdparty/asio/include/asio/detail/socket_ops.hpp
@@ -2,7 +2,7 @@
// detail/socket_ops.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -63,29 +63,27 @@ typedef weak_ptr<void> weak_cancel_token_type;
#if !defined(ASIO_WINDOWS_RUNTIME)
-ASIO_DECL socket_type accept(socket_type s, socket_addr_type* addr,
+ASIO_DECL socket_type accept(socket_type s, void* addr,
std::size_t* addrlen, asio::error_code& ec);
-ASIO_DECL socket_type sync_accept(socket_type s,
- state_type state, socket_addr_type* addr,
- std::size_t* addrlen, asio::error_code& ec);
+ASIO_DECL socket_type sync_accept(socket_type s, state_type state,
+ void* addr, std::size_t* addrlen, asio::error_code& ec);
#if defined(ASIO_HAS_IOCP)
-ASIO_DECL void complete_iocp_accept(socket_type s,
- void* output_buffer, DWORD address_length,
- socket_addr_type* addr, std::size_t* addrlen,
+ASIO_DECL void complete_iocp_accept(socket_type s, void* output_buffer,
+ DWORD address_length, void* addr, std::size_t* addrlen,
socket_type new_socket, asio::error_code& ec);
#else // defined(ASIO_HAS_IOCP)
ASIO_DECL bool non_blocking_accept(socket_type s,
- state_type state, socket_addr_type* addr, std::size_t* addrlen,
+ state_type state, void* addr, std::size_t* addrlen,
asio::error_code& ec, socket_type& new_socket);
#endif // defined(ASIO_HAS_IOCP)
-ASIO_DECL int bind(socket_type s, const socket_addr_type* addr,
+ASIO_DECL int bind(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec);
ASIO_DECL int close(socket_type s, state_type& state,
@@ -100,10 +98,10 @@ ASIO_DECL bool set_internal_non_blocking(socket_type s,
ASIO_DECL int shutdown(socket_type s,
int what, asio::error_code& ec);
-ASIO_DECL int connect(socket_type s, const socket_addr_type* addr,
+ASIO_DECL int connect(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec);
-ASIO_DECL void sync_connect(socket_type s, const socket_addr_type* addr,
+ASIO_DECL void sync_connect(socket_type s, const void* addr,
std::size_t addrlen, asio::error_code& ec);
#if defined(ASIO_HAS_IOCP)
@@ -166,20 +164,20 @@ ASIO_DECL bool non_blocking_recv1(socket_type s,
#endif // defined(ASIO_HAS_IOCP)
-ASIO_DECL signed_size_type recvfrom(socket_type s, buf* bufs,
- size_t count, int flags, socket_addr_type* addr,
+ASIO_DECL signed_size_type recvfrom(socket_type s,
+ buf* bufs, size_t count, int flags, void* addr,
std::size_t* addrlen, asio::error_code& ec);
-ASIO_DECL signed_size_type recvfrom1(socket_type s, void* data,
- size_t size, int flags, socket_addr_type* addr,
+ASIO_DECL signed_size_type recvfrom1(socket_type s,
+ void* data, size_t size, int flags, void* addr,
std::size_t* addrlen, asio::error_code& ec);
ASIO_DECL size_t sync_recvfrom(socket_type s, state_type state,
- buf* bufs, size_t count, int flags, socket_addr_type* addr,
+ buf* bufs, size_t count, int flags, void* addr,
std::size_t* addrlen, asio::error_code& ec);
ASIO_DECL size_t sync_recvfrom1(socket_type s, state_type state,
- void* data, size_t size, int flags, socket_addr_type* addr,
+ void* data, size_t size, int flags, void* addr,
std::size_t* addrlen, asio::error_code& ec);
#if defined(ASIO_HAS_IOCP)
@@ -190,14 +188,12 @@ ASIO_DECL void complete_iocp_recvfrom(
#else // defined(ASIO_HAS_IOCP)
-ASIO_DECL bool non_blocking_recvfrom(socket_type s,
- buf* bufs, size_t count, int flags,
- socket_addr_type* addr, std::size_t* addrlen,
+ASIO_DECL bool non_blocking_recvfrom(socket_type s, buf* bufs,
+ size_t count, int flags, void* addr, std::size_t* addrlen,
asio::error_code& ec, size_t& bytes_transferred);
-ASIO_DECL bool non_blocking_recvfrom1(socket_type s,
- void* data, size_t size, int flags,
- socket_addr_type* addr, std::size_t* addrlen,
+ASIO_DECL bool non_blocking_recvfrom1(socket_type s, void* data,
+ size_t size, int flags, void* addr, std::size_t* addrlen,
asio::error_code& ec, size_t& bytes_transferred);
#endif // defined(ASIO_HAS_IOCP)
@@ -255,32 +251,30 @@ ASIO_DECL bool non_blocking_send1(socket_type s,
#endif // defined(ASIO_HAS_IOCP)
-ASIO_DECL signed_size_type sendto(socket_type s, const buf* bufs,
- size_t count, int flags, const socket_addr_type* addr,
+ASIO_DECL signed_size_type sendto(socket_type s,
+ const buf* bufs, size_t count, int flags, const void* addr,
std::size_t addrlen, asio::error_code& ec);
-ASIO_DECL signed_size_type sendto1(socket_type s, const void* data,
- size_t size, int flags, const socket_addr_type* addr,
+ASIO_DECL signed_size_type sendto1(socket_type s,
+ const void* data, size_t size, int flags, const void* addr,
std::size_t addrlen, asio::error_code& ec);
ASIO_DECL size_t sync_sendto(socket_type s, state_type state,
- const buf* bufs, size_t count, int flags, const socket_addr_type* addr,
+ const buf* bufs, size_t count, int flags, const void* addr,
std::size_t addrlen, asio::error_code& ec);
ASIO_DECL size_t sync_sendto1(socket_type s, state_type state,
- const void* data, size_t size, int flags, const socket_addr_type* addr,
+ const void* data, size_t size, int flags, const void* addr,
std::size_t addrlen, asio::error_code& ec);
#if !defined(ASIO_HAS_IOCP)
-ASIO_DECL bool non_blocking_sendto(socket_type s,
- const buf* bufs, size_t count, int flags,
- const socket_addr_type* addr, std::size_t addrlen,
+ASIO_DECL bool non_blocking_sendto(socket_type s, const buf* bufs,
+ size_t count, int flags, const void* addr, std::size_t addrlen,
asio::error_code& ec, size_t& bytes_transferred);
-ASIO_DECL bool non_blocking_sendto1(socket_type s,
- const void* data, size_t size, int flags,
- const socket_addr_type* addr, std::size_t addrlen,
+ASIO_DECL bool non_blocking_sendto1(socket_type s, const void* data,
+ size_t size, int flags, const void* addr, std::size_t addrlen,
asio::error_code& ec, size_t& bytes_transferred);
#endif // !defined(ASIO_HAS_IOCP)
@@ -296,10 +290,10 @@ ASIO_DECL int getsockopt(socket_type s, state_type state,
int level, int optname, void* optval,
size_t* optlen, asio::error_code& ec);
-ASIO_DECL int getpeername(socket_type s, socket_addr_type* addr,
+ASIO_DECL int getpeername(socket_type s, void* addr,
std::size_t* addrlen, bool cached, asio::error_code& ec);
-ASIO_DECL int getsockname(socket_type s, socket_addr_type* addr,
+ASIO_DECL int getsockname(socket_type s, void* addr,
std::size_t* addrlen, asio::error_code& ec);
ASIO_DECL int ioctl(socket_type s, state_type& state,
@@ -344,19 +338,17 @@ ASIO_DECL asio::error_code background_getaddrinfo(
ASIO_DECL void freeaddrinfo(addrinfo_type* ai);
-ASIO_DECL asio::error_code getnameinfo(
- const socket_addr_type* addr, std::size_t addrlen,
- char* host, std::size_t hostlen, char* serv,
+ASIO_DECL asio::error_code getnameinfo(const void* addr,
+ std::size_t addrlen, char* host, std::size_t hostlen, char* serv,
std::size_t servlen, int flags, asio::error_code& ec);
-ASIO_DECL asio::error_code sync_getnameinfo(
- const socket_addr_type* addr, std::size_t addrlen,
- char* host, std::size_t hostlen, char* serv,
+ASIO_DECL asio::error_code sync_getnameinfo(const void* addr,
+ std::size_t addrlen, char* host, std::size_t hostlen, char* serv,
std::size_t servlen, int sock_type, asio::error_code& ec);
ASIO_DECL asio::error_code background_getnameinfo(
const weak_cancel_token_type& cancel_token,
- const socket_addr_type* addr, std::size_t addrlen,
+ const void* addr, std::size_t addrlen,
char* host, std::size_t hostlen, char* serv,
std::size_t servlen, int sock_type, asio::error_code& ec);
diff --git a/3rdparty/asio/include/asio/detail/socket_option.hpp b/3rdparty/asio/include/asio/detail/socket_option.hpp
index 8d8c0d84f47..760713daad8 100644
--- a/3rdparty/asio/include/asio/detail/socket_option.hpp
+++ b/3rdparty/asio/include/asio/detail/socket_option.hpp
@@ -2,7 +2,7 @@
// detail/socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/socket_select_interrupter.hpp b/3rdparty/asio/include/asio/detail/socket_select_interrupter.hpp
index 2e971d2005e..e2432622e47 100644
--- a/3rdparty/asio/include/asio/detail/socket_select_interrupter.hpp
+++ b/3rdparty/asio/include/asio/detail/socket_select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/socket_select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/socket_types.hpp b/3rdparty/asio/include/asio/detail/socket_types.hpp
index 33ad63eec8e..cf4f746a44b 100644
--- a/3rdparty/asio/include/asio/detail/socket_types.hpp
+++ b/3rdparty/asio/include/asio/detail/socket_types.hpp
@@ -2,7 +2,7 @@
// detail/socket_types.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -89,6 +89,7 @@
# include <sys/filio.h>
# include <sys/sockio.h>
# endif
+# include <signal.h>
#endif
#include "asio/detail/push_options.hpp"
@@ -178,6 +179,9 @@ typedef int signed_size_type;
# define ASIO_OS_DEF_AI_V4MAPPED 0x800
# define ASIO_OS_DEF_AI_ALL 0x100
# define ASIO_OS_DEF_AI_ADDRCONFIG 0x400
+# define ASIO_OS_DEF_SA_RESTART 0x1
+# define ASIO_OS_DEF_SA_NOCLDSTOP 0x2
+# define ASIO_OS_DEF_SA_NOCLDWAIT 0x4
#elif defined(ASIO_WINDOWS) || defined(__CYGWIN__)
typedef SOCKET socket_type;
const SOCKET invalid_socket = INVALID_SOCKET;
@@ -285,6 +289,9 @@ const int max_iov_len = 64;
# else
const int max_iov_len = 16;
# endif
+# define ASIO_OS_DEF_SA_RESTART 0x1
+# define ASIO_OS_DEF_SA_NOCLDSTOP 0x2
+# define ASIO_OS_DEF_SA_NOCLDWAIT 0x4
#else
typedef int socket_type;
const int invalid_socket = -1;
@@ -404,6 +411,9 @@ const int max_iov_len = IOV_MAX;
// POSIX platforms are not required to define IOV_MAX.
const int max_iov_len = 16;
# endif
+# define ASIO_OS_DEF_SA_RESTART SA_RESTART
+# define ASIO_OS_DEF_SA_NOCLDSTOP SA_NOCLDSTOP
+# define ASIO_OS_DEF_SA_NOCLDWAIT SA_NOCLDWAIT
#endif
const int custom_socket_option_level = 0xA5100000;
const int enable_connection_aborted_option = 1;
diff --git a/3rdparty/asio/include/asio/detail/solaris_fenced_block.hpp b/3rdparty/asio/include/asio/detail/solaris_fenced_block.hpp
deleted file mode 100644
index 4f6640b3d04..00000000000
--- a/3rdparty/asio/include/asio/detail/solaris_fenced_block.hpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// detail/solaris_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(__sun)
-
-#include <atomic.h>
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class solaris_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit solaris_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit solaris_fenced_block(full_t)
- {
- membar_consumer();
- }
-
- // Destructor.
- ~solaris_fenced_block()
- {
- membar_producer();
- }
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(__sun)
-
-#endif // ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/source_location.hpp b/3rdparty/asio/include/asio/detail/source_location.hpp
index a9ac8e83514..14b74f91435 100644
--- a/3rdparty/asio/include/asio/detail/source_location.hpp
+++ b/3rdparty/asio/include/asio/detail/source_location.hpp
@@ -2,7 +2,7 @@
// detail/source_location.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/static_mutex.hpp b/3rdparty/asio/include/asio/detail/static_mutex.hpp
index 5876a99a800..b47d087bf4a 100644
--- a/3rdparty/asio/include/asio/detail/static_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,10 +23,8 @@
# include "asio/detail/win_static_mutex.hpp"
#elif defined(ASIO_HAS_PTHREADS)
# include "asio/detail/posix_static_mutex.hpp"
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# include "asio/detail/std_static_mutex.hpp"
#else
-# error Only Windows and POSIX are supported!
+# include "asio/detail/std_static_mutex.hpp"
#endif
namespace asio {
@@ -41,7 +39,7 @@ typedef win_static_mutex static_mutex;
#elif defined(ASIO_HAS_PTHREADS)
typedef posix_static_mutex static_mutex;
# define ASIO_STATIC_MUTEX_INIT ASIO_POSIX_STATIC_MUTEX_INIT
-#elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+#else
typedef std_static_mutex static_mutex;
# define ASIO_STATIC_MUTEX_INIT ASIO_STD_STATIC_MUTEX_INIT
#endif
diff --git a/3rdparty/asio/include/asio/detail/std_event.hpp b/3rdparty/asio/include/asio/detail/std_event.hpp
index 1fc5177ed8f..97a347ed725 100644
--- a/3rdparty/asio/include/asio/detail/std_event.hpp
+++ b/3rdparty/asio/include/asio/detail/std_event.hpp
@@ -2,7 +2,7 @@
// detail/std_event.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#include <chrono>
#include <condition_variable>
#include "asio/detail/assert.hpp"
@@ -183,6 +180,4 @@ private:
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#endif // ASIO_DETAIL_STD_EVENT_HPP
diff --git a/3rdparty/asio/include/asio/detail/std_fenced_block.hpp b/3rdparty/asio/include/asio/detail/std_fenced_block.hpp
index 2361b17fdfd..d1e0c603cbc 100644
--- a/3rdparty/asio/include/asio/detail/std_fenced_block.hpp
+++ b/3rdparty/asio/include/asio/detail/std_fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/std_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_ATOMIC)
-
#include <atomic>
#include "asio/detail/noncopyable.hpp"
@@ -57,6 +54,4 @@ public:
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_ATOMIC)
-
#endif // ASIO_DETAIL_STD_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/std_global.hpp b/3rdparty/asio/include/asio/detail/std_global.hpp
index cdb3062079b..49ae055ea7d 100644
--- a/3rdparty/asio/include/asio/detail/std_global.hpp
+++ b/3rdparty/asio/include/asio/detail/std_global.hpp
@@ -2,7 +2,7 @@
// detail/std_global.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_CALL_ONCE)
-
#include <exception>
#include <mutex>
@@ -65,6 +62,4 @@ T& std_global()
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_CALL_ONCE)
-
#endif // ASIO_DETAIL_STD_GLOBAL_HPP
diff --git a/3rdparty/asio/include/asio/detail/std_mutex.hpp b/3rdparty/asio/include/asio/detail/std_mutex.hpp
index 37471bebad5..06839d69ca3 100644
--- a/3rdparty/asio/include/asio/detail/std_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/std_mutex.hpp
@@ -2,7 +2,7 @@
// detail/std_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#include <mutex>
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/scoped_lock.hpp"
@@ -68,6 +65,4 @@ private:
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#endif // ASIO_DETAIL_STD_MUTEX_HPP
diff --git a/3rdparty/asio/include/asio/detail/std_static_mutex.hpp b/3rdparty/asio/include/asio/detail/std_static_mutex.hpp
index ce14133f5ee..302b729037d 100644
--- a/3rdparty/asio/include/asio/detail/std_static_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/std_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/std_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#include <mutex>
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/scoped_lock.hpp"
@@ -76,6 +73,4 @@ private:
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
#endif // ASIO_DETAIL_STD_STATIC_MUTEX_HPP
diff --git a/3rdparty/asio/include/asio/detail/std_thread.hpp b/3rdparty/asio/include/asio/detail/std_thread.hpp
index 00cd4c902a7..78bbab9ea10 100644
--- a/3rdparty/asio/include/asio/detail/std_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/std_thread.hpp
@@ -2,7 +2,7 @@
// detail/std_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_THREAD)
-
#include <thread>
#include "asio/detail/noncopyable.hpp"
@@ -66,6 +63,4 @@ private:
#include "asio/detail/pop_options.hpp"
-#endif // defined(ASIO_HAS_STD_THREAD)
-
#endif // ASIO_DETAIL_STD_THREAD_HPP
diff --git a/3rdparty/asio/include/asio/detail/strand_executor_service.hpp b/3rdparty/asio/include/asio/detail/strand_executor_service.hpp
index cdbea6ba55b..45536ed5368 100644
--- a/3rdparty/asio/include/asio/detail/strand_executor_service.hpp
+++ b/3rdparty/asio/include/asio/detail/strand_executor_service.hpp
@@ -2,7 +2,7 @@
// detail/strand_executor_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -90,33 +90,33 @@ public:
// Request invocation of the given function.
template <typename Executor, typename Function>
static void execute(const implementation_type& impl, Executor& ex,
- ASIO_MOVE_ARG(Function) function,
- typename enable_if<
- can_query<Executor, execution::allocator_t<void> >::value
- >::type* = 0);
+ Function&& function,
+ enable_if_t<
+ can_query<Executor, execution::allocator_t<void>>::value
+ >* = 0);
// Request invocation of the given function.
template <typename Executor, typename Function>
static void execute(const implementation_type& impl, Executor& ex,
- ASIO_MOVE_ARG(Function) function,
- typename enable_if<
- !can_query<Executor, execution::allocator_t<void> >::value
- >::type* = 0);
+ Function&& function,
+ enable_if_t<
+ !can_query<Executor, execution::allocator_t<void>>::value
+ >* = 0);
// Request invocation of the given function.
template <typename Executor, typename Function, typename Allocator>
static void dispatch(const implementation_type& impl, Executor& ex,
- ASIO_MOVE_ARG(Function) function, const Allocator& a);
+ Function&& function, const Allocator& a);
// Request invocation of the given function and return immediately.
template <typename Executor, typename Function, typename Allocator>
static void post(const implementation_type& impl, Executor& ex,
- ASIO_MOVE_ARG(Function) function, const Allocator& a);
+ Function&& function, const Allocator& a);
// Request invocation of the given function and return immediately.
template <typename Executor, typename Function, typename Allocator>
static void defer(const implementation_type& impl, Executor& ex,
- ASIO_MOVE_ARG(Function) function, const Allocator& a);
+ Function&& function, const Allocator& a);
// Determine whether the strand is running in the current thread.
ASIO_DECL static bool running_in_this_thread(
@@ -141,7 +141,7 @@ private:
// Helper function to request invocation of the given function.
template <typename Executor, typename Function, typename Allocator>
static void do_execute(const implementation_type& impl, Executor& ex,
- ASIO_MOVE_ARG(Function) function, const Allocator& a);
+ Function&& function, const Allocator& a);
// Mutex to protect access to the service-wide state.
mutex mutex_;
diff --git a/3rdparty/asio/include/asio/detail/strand_service.hpp b/3rdparty/asio/include/asio/detail/strand_service.hpp
index 2aec8e5d450..084eb0b3066 100644
--- a/3rdparty/asio/include/asio/detail/strand_service.hpp
+++ b/3rdparty/asio/include/asio/detail/strand_service.hpp
@@ -2,7 +2,7 @@
// detail/strand_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/string_view.hpp b/3rdparty/asio/include/asio/detail/string_view.hpp
index 488e9aa5a59..a4470f1e580 100644
--- a/3rdparty/asio/include/asio/detail/string_view.hpp
+++ b/3rdparty/asio/include/asio/detail/string_view.hpp
@@ -2,7 +2,7 @@
// detail/string_view.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/thread.hpp b/3rdparty/asio/include/asio/detail/thread.hpp
index 8d1b66283db..faa7fad2438 100644
--- a/3rdparty/asio/include/asio/detail/thread.hpp
+++ b/3rdparty/asio/include/asio/detail/thread.hpp
@@ -2,7 +2,7 @@
// detail/thread.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -29,10 +29,8 @@
# else
# include "asio/detail/win_thread.hpp"
# endif
-#elif defined(ASIO_HAS_STD_THREAD)
-# include "asio/detail/std_thread.hpp"
#else
-# error Only Windows, POSIX and std::thread are supported!
+# include "asio/detail/std_thread.hpp"
#endif
namespace asio {
@@ -50,7 +48,7 @@ typedef winapp_thread thread;
# else
typedef win_thread thread;
# endif
-#elif defined(ASIO_HAS_STD_THREAD)
+#else
typedef std_thread thread;
#endif
diff --git a/3rdparty/asio/include/asio/detail/thread_context.hpp b/3rdparty/asio/include/asio/detail/thread_context.hpp
index f17824182b4..bebfc4a43a2 100644
--- a/3rdparty/asio/include/asio/detail/thread_context.hpp
+++ b/3rdparty/asio/include/asio/detail/thread_context.hpp
@@ -2,7 +2,7 @@
// detail/thread_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/thread_group.hpp b/3rdparty/asio/include/asio/detail/thread_group.hpp
index 11965f5a7f2..5ebff5e185f 100644
--- a/3rdparty/asio/include/asio/detail/thread_group.hpp
+++ b/3rdparty/asio/include/asio/detail/thread_group.hpp
@@ -2,7 +2,7 @@
// detail/thread_group.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/thread_info_base.hpp b/3rdparty/asio/include/asio/detail/thread_info_base.hpp
index 2223e8b3faf..5a74cef776a 100644
--- a/3rdparty/asio/include/asio/detail/thread_info_base.hpp
+++ b/3rdparty/asio/include/asio/detail/thread_info_base.hpp
@@ -2,7 +2,7 @@
// detail/thread_info_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -21,12 +21,10 @@
#include "asio/detail/memory.hpp"
#include "asio/detail/noncopyable.hpp"
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR) \
- && !defined(ASIO_NO_EXCEPTIONS)
+#if !defined(ASIO_NO_EXCEPTIONS)
# include <exception>
# include "asio/multiple_exceptions.hpp"
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- // && !defined(ASIO_NO_EXCEPTIONS)
+#endif // !defined(ASIO_NO_EXCEPTIONS)
#include "asio/detail/push_options.hpp"
@@ -94,11 +92,9 @@ public:
enum { max_mem_index = parallel_group_tag::end_mem_index };
thread_info_base()
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR) \
- && !defined(ASIO_NO_EXCEPTIONS)
+#if !defined(ASIO_NO_EXCEPTIONS)
: has_pending_exception_(0)
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- // && !defined(ASIO_NO_EXCEPTIONS)
+#endif // !defined(ASIO_NO_EXCEPTIONS)
{
for (int i = 0; i < max_mem_index; ++i)
reusable_memory_[i] = 0;
@@ -199,8 +195,7 @@ public:
void capture_current_exception()
{
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR) \
- && !defined(ASIO_NO_EXCEPTIONS)
+#if !defined(ASIO_NO_EXCEPTIONS)
switch (has_pending_exception_)
{
case 0:
@@ -216,36 +211,35 @@ public:
default:
break;
}
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- // && !defined(ASIO_NO_EXCEPTIONS)
+#endif // !defined(ASIO_NO_EXCEPTIONS)
}
void rethrow_pending_exception()
{
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR) \
- && !defined(ASIO_NO_EXCEPTIONS)
+#if !defined(ASIO_NO_EXCEPTIONS)
if (has_pending_exception_ > 0)
{
has_pending_exception_ = 0;
std::exception_ptr ex(
- ASIO_MOVE_CAST(std::exception_ptr)(
+ static_cast<std::exception_ptr&&>(
pending_exception_));
std::rethrow_exception(ex);
}
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- // && !defined(ASIO_NO_EXCEPTIONS)
+#endif // !defined(ASIO_NO_EXCEPTIONS)
}
private:
+#if defined(ASIO_HAS_IO_URING)
+ enum { chunk_size = 8 };
+#else // defined(ASIO_HAS_IO_URING)
enum { chunk_size = 4 };
+#endif // defined(ASIO_HAS_IO_URING)
void* reusable_memory_[max_mem_index];
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR) \
- && !defined(ASIO_NO_EXCEPTIONS)
+#if !defined(ASIO_NO_EXCEPTIONS)
int has_pending_exception_;
std::exception_ptr pending_exception_;
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- // && !defined(ASIO_NO_EXCEPTIONS)
+#endif // !defined(ASIO_NO_EXCEPTIONS)
};
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/throw_error.hpp b/3rdparty/asio/include/asio/detail/throw_error.hpp
index d03cad54acd..881c3128576 100644
--- a/3rdparty/asio/include/asio/detail/throw_error.hpp
+++ b/3rdparty/asio/include/asio/detail/throw_error.hpp
@@ -2,7 +2,7 @@
// detail/throw_error.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,6 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include "asio/detail/throw_exception.hpp"
#include "asio/error_code.hpp"
#include "asio/detail/push_options.hpp"
@@ -23,22 +24,30 @@
namespace asio {
namespace detail {
-ASIO_DECL void do_throw_error(const asio::error_code& err);
+ASIO_DECL void do_throw_error(
+ const asio::error_code& err
+ ASIO_SOURCE_LOCATION_PARAM);
-ASIO_DECL void do_throw_error(const asio::error_code& err,
- const char* location);
+ASIO_DECL void do_throw_error(
+ const asio::error_code& err,
+ const char* location
+ ASIO_SOURCE_LOCATION_PARAM);
-inline void throw_error(const asio::error_code& err)
+inline void throw_error(
+ const asio::error_code& err
+ ASIO_SOURCE_LOCATION_DEFAULTED_PARAM)
{
if (err)
- do_throw_error(err);
+ do_throw_error(err ASIO_SOURCE_LOCATION_ARG);
}
-inline void throw_error(const asio::error_code& err,
- const char* location)
+inline void throw_error(
+ const asio::error_code& err,
+ const char* location
+ ASIO_SOURCE_LOCATION_DEFAULTED_PARAM)
{
if (err)
- do_throw_error(err, location);
+ do_throw_error(err, location ASIO_SOURCE_LOCATION_ARG);
}
} // namespace detail
diff --git a/3rdparty/asio/include/asio/detail/throw_exception.hpp b/3rdparty/asio/include/asio/detail/throw_exception.hpp
index bbee22ae963..e939c1093f6 100644
--- a/3rdparty/asio/include/asio/detail/throw_exception.hpp
+++ b/3rdparty/asio/include/asio/detail/throw_exception.hpp
@@ -2,7 +2,7 @@
// detail/throw_exception.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -30,14 +30,18 @@ using boost::throw_exception;
// Declare the throw_exception function for all targets.
template <typename Exception>
-void throw_exception(const Exception& e);
+void throw_exception(
+ const Exception& e
+ ASIO_SOURCE_LOCATION_DEFAULTED_PARAM);
// Only define the throw_exception function when exceptions are enabled.
// Otherwise, it is up to the application to provide a definition of this
// function.
# if !defined(ASIO_NO_EXCEPTIONS)
template <typename Exception>
-void throw_exception(const Exception& e)
+void throw_exception(
+ const Exception& e
+ ASIO_SOURCE_LOCATION_PARAM)
{
throw e;
}
diff --git a/3rdparty/asio/include/asio/detail/timer_queue.hpp b/3rdparty/asio/include/asio/detail/timer_queue.hpp
index cb5f4fc3caa..843f3614da0 100644
--- a/3rdparty/asio/include/asio/detail/timer_queue.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_queue.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/timer_queue_base.hpp b/3rdparty/asio/include/asio/detail/timer_queue_base.hpp
index 7ab2e6d40a5..ddcf41c1371 100644
--- a/3rdparty/asio/include/asio/detail/timer_queue_base.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_queue_base.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/timer_queue_ptime.hpp b/3rdparty/asio/include/asio/detail/timer_queue_ptime.hpp
index 0886ac96f85..937a4ad85fa 100644
--- a/3rdparty/asio/include/asio/detail/timer_queue_ptime.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_queue_ptime.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue_ptime.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -31,7 +31,7 @@ struct forwarding_posix_time_traits : time_traits<boost::posix_time::ptime> {};
// Template specialisation for the commonly used instantation.
template <>
-class timer_queue<time_traits<boost::posix_time::ptime> >
+class timer_queue<time_traits<boost::posix_time::ptime>>
: public timer_queue_base
{
public:
diff --git a/3rdparty/asio/include/asio/detail/timer_queue_set.hpp b/3rdparty/asio/include/asio/detail/timer_queue_set.hpp
index 2cd3826c7d8..7bf50747be1 100644
--- a/3rdparty/asio/include/asio/detail/timer_queue_set.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_queue_set.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue_set.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/timer_scheduler.hpp b/3rdparty/asio/include/asio/detail/timer_scheduler.hpp
index 8d9b4ed7c93..dd34d328c84 100644
--- a/3rdparty/asio/include/asio/detail/timer_scheduler.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_scheduler.hpp
@@ -2,7 +2,7 @@
// detail/timer_scheduler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,6 +22,8 @@
# include "asio/detail/winrt_timer_scheduler.hpp"
#elif defined(ASIO_HAS_IOCP)
# include "asio/detail/win_iocp_io_context.hpp"
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_service.hpp"
#elif defined(ASIO_HAS_EPOLL)
# include "asio/detail/epoll_reactor.hpp"
#elif defined(ASIO_HAS_KQUEUE)
diff --git a/3rdparty/asio/include/asio/detail/timer_scheduler_fwd.hpp b/3rdparty/asio/include/asio/detail/timer_scheduler_fwd.hpp
index 15b5fbdffa1..bbb8a4e8ded 100644
--- a/3rdparty/asio/include/asio/detail/timer_scheduler_fwd.hpp
+++ b/3rdparty/asio/include/asio/detail/timer_scheduler_fwd.hpp
@@ -2,7 +2,7 @@
// detail/timer_scheduler_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -24,6 +24,8 @@ namespace detail {
typedef class winrt_timer_scheduler timer_scheduler;
#elif defined(ASIO_HAS_IOCP)
typedef class win_iocp_io_context timer_scheduler;
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+typedef class io_uring_service timer_scheduler;
#elif defined(ASIO_HAS_EPOLL)
typedef class epoll_reactor timer_scheduler;
#elif defined(ASIO_HAS_KQUEUE)
diff --git a/3rdparty/asio/include/asio/detail/tss_ptr.hpp b/3rdparty/asio/include/asio/detail/tss_ptr.hpp
index 25e4d3d84d1..f7aaa2ec29c 100644
--- a/3rdparty/asio/include/asio/detail/tss_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/type_traits.hpp b/3rdparty/asio/include/asio/detail/type_traits.hpp
index 968f19a802e..a4706a5ff1c 100644
--- a/3rdparty/asio/include/asio/detail/type_traits.hpp
+++ b/3rdparty/asio/include/asio/detail/type_traits.hpp
@@ -2,7 +2,7 @@
// detail/type_traits.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,140 +16,162 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_TYPE_TRAITS)
-# include <type_traits>
-#else // defined(ASIO_HAS_STD_TYPE_TRAITS)
-# include <boost/type_traits/add_const.hpp>
-# include <boost/type_traits/add_lvalue_reference.hpp>
-# include <boost/type_traits/aligned_storage.hpp>
-# include <boost/type_traits/alignment_of.hpp>
-# include <boost/type_traits/conditional.hpp>
-# include <boost/type_traits/decay.hpp>
-# include <boost/type_traits/has_nothrow_copy.hpp>
-# include <boost/type_traits/has_nothrow_destructor.hpp>
-# include <boost/type_traits/integral_constant.hpp>
-# include <boost/type_traits/is_base_of.hpp>
-# include <boost/type_traits/is_class.hpp>
-# include <boost/type_traits/is_const.hpp>
-# include <boost/type_traits/is_convertible.hpp>
-# include <boost/type_traits/is_constructible.hpp>
-# include <boost/type_traits/is_copy_constructible.hpp>
-# include <boost/type_traits/is_destructible.hpp>
-# include <boost/type_traits/is_function.hpp>
-# include <boost/type_traits/is_object.hpp>
-# include <boost/type_traits/is_same.hpp>
-# include <boost/type_traits/remove_cv.hpp>
-# include <boost/type_traits/remove_pointer.hpp>
-# include <boost/type_traits/remove_reference.hpp>
-# include <boost/utility/declval.hpp>
-# include <boost/utility/enable_if.hpp>
-# include <boost/utility/result_of.hpp>
-#endif // defined(ASIO_HAS_STD_TYPE_TRAITS)
+#include <type_traits>
namespace asio {
-#if defined(ASIO_HAS_STD_TYPE_TRAITS)
using std::add_const;
+
+template <typename T>
+using add_const_t = typename std::add_const<T>::type;
+
using std::add_lvalue_reference;
-using std::aligned_storage;
+
+template <typename T>
+using add_lvalue_reference_t = typename std::add_lvalue_reference<T>::type;
+
+template <std::size_t N, std::size_t A>
+struct aligned_storage
+{
+ struct type
+ {
+ alignas(A) unsigned char data[N];
+ };
+};
+
+template <std::size_t N, std::size_t A>
+using aligned_storage_t = typename aligned_storage<N, A>::type;
+
using std::alignment_of;
+
using std::conditional;
+
+template <bool C, typename T, typename U>
+using conditional_t = typename std::conditional<C, T, U>::type;
+
using std::decay;
+
+template <typename T>
+using decay_t = typename std::decay<T>::type;
+
using std::declval;
+
using std::enable_if;
+
+template <bool C, typename T = void>
+using enable_if_t = typename std::enable_if<C, T>::type;
+
using std::false_type;
+
using std::integral_constant;
+
using std::is_base_of;
+
using std::is_class;
+
using std::is_const;
+
using std::is_constructible;
+
using std::is_convertible;
+
using std::is_copy_constructible;
+
using std::is_destructible;
+
using std::is_function;
+
using std::is_move_constructible;
+
using std::is_nothrow_copy_constructible;
+
using std::is_nothrow_destructible;
+
using std::is_object;
+
+using std::is_pointer;
+
using std::is_reference;
+
using std::is_same;
+
using std::is_scalar;
+
using std::remove_cv;
+
+template <typename T>
+using remove_cv_t = typename std::remove_cv<T>::type;
+
+template <typename T>
+struct remove_cvref :
+ std::remove_cv<typename std::remove_reference<T>::type> {};
+
template <typename T>
-struct remove_cvref : remove_cv<typename std::remove_reference<T>::type> {};
+using remove_cvref_t = typename remove_cvref<T>::type;
+
using std::remove_pointer;
+
+template <typename T>
+using remove_pointer_t = typename std::remove_pointer<T>::type;
+
using std::remove_reference;
+
+template <typename T>
+using remove_reference_t = typename std::remove_reference<T>::type;
+
#if defined(ASIO_HAS_STD_INVOKE_RESULT)
+
template <typename> struct result_of;
+
template <typename F, typename... Args>
struct result_of<F(Args...)> : std::invoke_result<F, Args...> {};
+
+template <typename T>
+using result_of_t = typename result_of<T>::type;
+
#else // defined(ASIO_HAS_STD_INVOKE_RESULT)
+
using std::result_of;
+
+template <typename T>
+using result_of_t = typename std::result_of<T>::type;
+
#endif // defined(ASIO_HAS_STD_INVOKE_RESULT)
+
using std::true_type;
-#else // defined(ASIO_HAS_STD_TYPE_TRAITS)
-using boost::add_const;
-using boost::add_lvalue_reference;
-using boost::aligned_storage;
-using boost::alignment_of;
-template <bool Condition, typename Type = void>
-struct enable_if : boost::enable_if_c<Condition, Type> {};
-using boost::conditional;
-using boost::decay;
-using boost::declval;
-using boost::false_type;
-using boost::integral_constant;
-using boost::is_base_of;
-using boost::is_class;
-using boost::is_const;
-using boost::is_constructible;
-using boost::is_convertible;
-using boost::is_copy_constructible;
-using boost::is_destructible;
-using boost::is_function;
-#if defined(ASIO_HAS_MOVE)
-template <typename T>
-struct is_move_constructible : false_type {};
-#else // defined(ASIO_HAS_MOVE)
-template <typename T>
-struct is_move_constructible : is_copy_constructible<T> {};
-#endif // defined(ASIO_HAS_MOVE)
-template <typename T>
-struct is_nothrow_copy_constructible : boost::has_nothrow_copy<T> {};
-template <typename T>
-struct is_nothrow_destructible : boost::has_nothrow_destructor<T> {};
-using boost::is_object;
-using boost::is_reference;
-using boost::is_same;
-using boost::is_scalar;
-using boost::remove_cv;
-template <typename T>
-struct remove_cvref : remove_cv<typename boost::remove_reference<T>::type> {};
-using boost::remove_pointer;
-using boost::remove_reference;
-using boost::result_of;
-using boost::true_type;
-#endif // defined(ASIO_HAS_STD_TYPE_TRAITS)
-template <typename> struct void_type { typedef void type; };
+template <typename> struct void_type
+{
+ typedef void type;
+};
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
+template <typename T>
+using void_t = typename void_type<T>::type;
template <typename...> struct conjunction : true_type {};
+
template <typename T> struct conjunction<T> : T {};
-template <typename Head, typename... Tail> struct conjunction<Head, Tail...> :
- conditional<Head::value, conjunction<Tail...>, Head>::type {};
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+template <typename Head, typename... Tail>
+struct conjunction<Head, Tail...> :
+ conditional_t<Head::value, conjunction<Tail...>, Head> {};
struct defaulted_constraint
{
- ASIO_CONSTEXPR defaulted_constraint() {}
+ constexpr defaulted_constraint() {}
};
template <bool Condition, typename Type = int>
-struct constraint : enable_if<Condition, Type> {};
+struct constraint : std::enable_if<Condition, Type> {};
+
+template <bool Condition, typename Type = int>
+using constraint_t = typename constraint<Condition, Type>::type;
+
+template <typename T>
+struct type_identity { typedef T type; };
+
+template <typename T>
+using type_identity_t = typename type_identity<T>::type;
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/utility.hpp b/3rdparty/asio/include/asio/detail/utility.hpp
new file mode 100644
index 00000000000..72dd4d43190
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/utility.hpp
@@ -0,0 +1,83 @@
+//
+// detail/utility.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 ASIO_DETAIL_UTILITY_HPP
+#define ASIO_DETAIL_UTILITY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <utility>
+
+namespace asio {
+namespace detail {
+
+#if defined(ASIO_HAS_STD_INDEX_SEQUENCE)
+
+using std::index_sequence;
+using std::index_sequence_for;
+using std::make_index_sequence;
+
+#else // defined(ASIO_HAS_STD_INDEX_SEQUENCE)
+
+template <std::size_t...>
+struct index_sequence
+{
+};
+
+template <typename T, typename U>
+struct join_index_sequences;
+
+template <std::size_t... I, std::size_t... J>
+struct join_index_sequences<index_sequence<I...>, index_sequence<J...>>
+{
+ using type = index_sequence<I..., J...>;
+};
+
+template <std::size_t First, std::size_t Last>
+struct index_pack :
+ join_index_sequences<
+ typename index_pack<First, First + (Last - First + 1) / 2 - 1>::type,
+ typename index_pack<First + (Last - First + 1) / 2, Last>::type
+ >
+{
+};
+
+template <std::size_t N>
+struct index_pack<N, N>
+{
+ using type = index_sequence<N>;
+};
+
+template <std::size_t Begin, std::size_t End>
+struct index_range : index_pack<Begin, End - 1>
+{
+};
+
+template <std::size_t N>
+struct index_range<N, N>
+{
+ using type = index_sequence<>;
+};
+
+template <typename... T>
+using index_sequence_for = typename index_range<0, sizeof...(T)>::type;
+
+template <std::size_t N>
+using make_index_sequence = typename index_range<0, N>::type;
+
+#endif // defined(ASIO_HAS_STD_INDEX_SEQUENCE)
+
+} // namespace detail
+} // namespace asio
+
+#endif // ASIO_DETAIL_UTILITY_HPP
diff --git a/3rdparty/asio/include/asio/detail/variadic_templates.hpp b/3rdparty/asio/include/asio/detail/variadic_templates.hpp
deleted file mode 100644
index 3bcc8d27605..00000000000
--- a/3rdparty/asio/include/asio/detail/variadic_templates.hpp
+++ /dev/null
@@ -1,294 +0,0 @@
-//
-// detail/variadic_templates.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_DETAIL_VARIADIC_TEMPLATES_HPP
-#define ASIO_DETAIL_VARIADIC_TEMPLATES_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-# define ASIO_VARIADIC_TPARAMS(n) ASIO_VARIADIC_TPARAMS_##n
-
-# define ASIO_VARIADIC_TPARAMS_1 \
- typename T1
-# define ASIO_VARIADIC_TPARAMS_2 \
- typename T1, typename T2
-# define ASIO_VARIADIC_TPARAMS_3 \
- typename T1, typename T2, typename T3
-# define ASIO_VARIADIC_TPARAMS_4 \
- typename T1, typename T2, typename T3, typename T4
-# define ASIO_VARIADIC_TPARAMS_5 \
- typename T1, typename T2, typename T3, typename T4, typename T5
-# define ASIO_VARIADIC_TPARAMS_6 \
- typename T1, typename T2, typename T3, typename T4, typename T5, \
- typename T6
-# define ASIO_VARIADIC_TPARAMS_7 \
- typename T1, typename T2, typename T3, typename T4, typename T5, \
- typename T6, typename T7
-# define ASIO_VARIADIC_TPARAMS_8 \
- typename T1, typename T2, typename T3, typename T4, typename T5, \
- typename T6, typename T7, typename T8
-
-# define ASIO_VARIADIC_TARGS(n) ASIO_VARIADIC_TARGS_##n
-
-# define ASIO_VARIADIC_TARGS_1 T1
-# define ASIO_VARIADIC_TARGS_2 T1, T2
-# define ASIO_VARIADIC_TARGS_3 T1, T2, T3
-# define ASIO_VARIADIC_TARGS_4 T1, T2, T3, T4
-# define ASIO_VARIADIC_TARGS_5 T1, T2, T3, T4, T5
-# define ASIO_VARIADIC_TARGS_6 T1, T2, T3, T4, T5, T6
-# define ASIO_VARIADIC_TARGS_7 T1, T2, T3, T4, T5, T6, T7
-# define ASIO_VARIADIC_TARGS_8 T1, T2, T3, T4, T5, T6, T7, T8
-
-# define ASIO_VARIADIC_BYVAL_PARAMS(n) \
- ASIO_VARIADIC_BYVAL_PARAMS_##n
-
-# define ASIO_VARIADIC_BYVAL_PARAMS_1 T1 x1
-# define ASIO_VARIADIC_BYVAL_PARAMS_2 T1 x1, T2 x2
-# define ASIO_VARIADIC_BYVAL_PARAMS_3 T1 x1, T2 x2, T3 x3
-# define ASIO_VARIADIC_BYVAL_PARAMS_4 T1 x1, T2 x2, T3 x3, T4 x4
-# define ASIO_VARIADIC_BYVAL_PARAMS_5 T1 x1, T2 x2, T3 x3, T4 x4, T5 x5
-# define ASIO_VARIADIC_BYVAL_PARAMS_6 T1 x1, T2 x2, T3 x3, T4 x4, T5 x5, \
- T6 x6
-# define ASIO_VARIADIC_BYVAL_PARAMS_7 T1 x1, T2 x2, T3 x3, T4 x4, T5 x5, \
- T6 x6, T7 x7
-# define ASIO_VARIADIC_BYVAL_PARAMS_8 T1 x1, T2 x2, T3 x3, T4 x4, T5 x5, \
- T6 x6, T7 x7, T8 x8
-
-# define ASIO_VARIADIC_BYVAL_ARGS(n) \
- ASIO_VARIADIC_BYVAL_ARGS_##n
-
-# define ASIO_VARIADIC_BYVAL_ARGS_1 x1
-# define ASIO_VARIADIC_BYVAL_ARGS_2 x1, x2
-# define ASIO_VARIADIC_BYVAL_ARGS_3 x1, x2, x3
-# define ASIO_VARIADIC_BYVAL_ARGS_4 x1, x2, x3, x4
-# define ASIO_VARIADIC_BYVAL_ARGS_5 x1, x2, x3, x4, x5
-# define ASIO_VARIADIC_BYVAL_ARGS_6 x1, x2, x3, x4, x5, x6
-# define ASIO_VARIADIC_BYVAL_ARGS_7 x1, x2, x3, x4, x5, x6, x7
-# define ASIO_VARIADIC_BYVAL_ARGS_8 x1, x2, x3, x4, x5, x6, x7, x8
-
-# define ASIO_VARIADIC_CONSTREF_PARAMS(n) \
- ASIO_VARIADIC_CONSTREF_PARAMS_##n
-
-# define ASIO_VARIADIC_CONSTREF_PARAMS_1 \
- const T1& x1
-# define ASIO_VARIADIC_CONSTREF_PARAMS_2 \
- const T1& x1, const T2& x2
-# define ASIO_VARIADIC_CONSTREF_PARAMS_3 \
- const T1& x1, const T2& x2, const T3& x3
-# define ASIO_VARIADIC_CONSTREF_PARAMS_4 \
- const T1& x1, const T2& x2, const T3& x3, const T4& x4
-# define ASIO_VARIADIC_CONSTREF_PARAMS_5 \
- const T1& x1, const T2& x2, const T3& x3, const T4& x4, const T5& x5
-# define ASIO_VARIADIC_CONSTREF_PARAMS_6 \
- const T1& x1, const T2& x2, const T3& x3, const T4& x4, const T5& x5, \
- const T6& x6
-# define ASIO_VARIADIC_CONSTREF_PARAMS_7 \
- const T1& x1, const T2& x2, const T3& x3, const T4& x4, const T5& x5, \
- const T6& x6, const T7& x7
-# define ASIO_VARIADIC_CONSTREF_PARAMS_8 \
- const T1& x1, const T2& x2, const T3& x3, const T4& x4, const T5& x5, \
- const T6& x6, const T7& x7, const T8& x8
-
-# define ASIO_VARIADIC_MOVE_PARAMS(n) \
- ASIO_VARIADIC_MOVE_PARAMS_##n
-
-# define ASIO_VARIADIC_MOVE_PARAMS_1 \
- ASIO_MOVE_ARG(T1) x1
-# define ASIO_VARIADIC_MOVE_PARAMS_2 \
- ASIO_MOVE_ARG(T1) x1, ASIO_MOVE_ARG(T2) x2
-# define ASIO_VARIADIC_MOVE_PARAMS_3 \
- ASIO_MOVE_ARG(T1) x1, ASIO_MOVE_ARG(T2) x2, \
- ASIO_MOVE_ARG(T3) x3
-# define ASIO_VARIADIC_MOVE_PARAMS_4 \
- ASIO_MOVE_ARG(T1) x1, ASIO_MOVE_ARG(T2) x2, \
- ASIO_MOVE_ARG(T3) x3, ASIO_MOVE_ARG(T4) x4
-# define ASIO_VARIADIC_MOVE_PARAMS_5 \
- ASIO_MOVE_ARG(T1) x1, ASIO_MOVE_ARG(T2) x2, \
- ASIO_MOVE_ARG(T3) x3, ASIO_MOVE_ARG(T4) x4, \
- ASIO_MOVE_ARG(T5) x5
-# define ASIO_VARIADIC_MOVE_PARAMS_6 \
- ASIO_MOVE_ARG(T1) x1, ASIO_MOVE_ARG(T2) x2, \
- ASIO_MOVE_ARG(T3) x3, ASIO_MOVE_ARG(T4) x4, \
- ASIO_MOVE_ARG(T5) x5, ASIO_MOVE_ARG(T6) x6
-# define ASIO_VARIADIC_MOVE_PARAMS_7 \
- ASIO_MOVE_ARG(T1) x1, ASIO_MOVE_ARG(T2) x2, \
- ASIO_MOVE_ARG(T3) x3, ASIO_MOVE_ARG(T4) x4, \
- ASIO_MOVE_ARG(T5) x5, ASIO_MOVE_ARG(T6) x6, \
- ASIO_MOVE_ARG(T7) x7
-# define ASIO_VARIADIC_MOVE_PARAMS_8 \
- ASIO_MOVE_ARG(T1) x1, ASIO_MOVE_ARG(T2) x2, \
- ASIO_MOVE_ARG(T3) x3, ASIO_MOVE_ARG(T4) x4, \
- ASIO_MOVE_ARG(T5) x5, ASIO_MOVE_ARG(T6) x6, \
- ASIO_MOVE_ARG(T7) x7, ASIO_MOVE_ARG(T8) x8
-
-# define ASIO_VARIADIC_UNNAMED_MOVE_PARAMS(n) \
- ASIO_VARIADIC_UNNAMED_MOVE_PARAMS_##n
-
-# define ASIO_VARIADIC_UNNAMED_MOVE_PARAMS_1 \
- ASIO_MOVE_ARG(T1)
-# define ASIO_VARIADIC_UNNAMED_MOVE_PARAMS_2 \
- ASIO_MOVE_ARG(T1), ASIO_MOVE_ARG(T2)
-# define ASIO_VARIADIC_UNNAMED_MOVE_PARAMS_3 \
- ASIO_MOVE_ARG(T1), ASIO_MOVE_ARG(T2), \
- ASIO_MOVE_ARG(T3)
-# define ASIO_VARIADIC_UNNAMED_MOVE_PARAMS_4 \
- ASIO_MOVE_ARG(T1), ASIO_MOVE_ARG(T2), \
- ASIO_MOVE_ARG(T3), ASIO_MOVE_ARG(T4)
-# define ASIO_VARIADIC_UNNAMED_MOVE_PARAMS_5 \
- ASIO_MOVE_ARG(T1), ASIO_MOVE_ARG(T2), \
- ASIO_MOVE_ARG(T3), ASIO_MOVE_ARG(T4), \
- ASIO_MOVE_ARG(T5)
-# define ASIO_VARIADIC_UNNAMED_MOVE_PARAMS_6 \
- ASIO_MOVE_ARG(T1), ASIO_MOVE_ARG(T2), \
- ASIO_MOVE_ARG(T3), ASIO_MOVE_ARG(T4), \
- ASIO_MOVE_ARG(T5), ASIO_MOVE_ARG(T6)
-# define ASIO_VARIADIC_UNNAMED_MOVE_PARAMS_7 \
- ASIO_MOVE_ARG(T1), ASIO_MOVE_ARG(T2), \
- ASIO_MOVE_ARG(T3), ASIO_MOVE_ARG(T4), \
- ASIO_MOVE_ARG(T5), ASIO_MOVE_ARG(T6), \
- ASIO_MOVE_ARG(T7)
-# define ASIO_VARIADIC_UNNAMED_MOVE_PARAMS_8 \
- ASIO_MOVE_ARG(T1), ASIO_MOVE_ARG(T2), \
- ASIO_MOVE_ARG(T3), ASIO_MOVE_ARG(T4), \
- ASIO_MOVE_ARG(T5), ASIO_MOVE_ARG(T6), \
- ASIO_MOVE_ARG(T7), ASIO_MOVE_ARG(T8)
-
-# define ASIO_VARIADIC_MOVE_ARGS(n) \
- ASIO_VARIADIC_MOVE_ARGS_##n
-
-# define ASIO_VARIADIC_MOVE_ARGS_1 \
- ASIO_MOVE_CAST(T1)(x1)
-# define ASIO_VARIADIC_MOVE_ARGS_2 \
- ASIO_MOVE_CAST(T1)(x1), ASIO_MOVE_CAST(T2)(x2)
-# define ASIO_VARIADIC_MOVE_ARGS_3 \
- ASIO_MOVE_CAST(T1)(x1), ASIO_MOVE_CAST(T2)(x2), \
- ASIO_MOVE_CAST(T3)(x3)
-# define ASIO_VARIADIC_MOVE_ARGS_4 \
- ASIO_MOVE_CAST(T1)(x1), ASIO_MOVE_CAST(T2)(x2), \
- ASIO_MOVE_CAST(T3)(x3), ASIO_MOVE_CAST(T4)(x4)
-# define ASIO_VARIADIC_MOVE_ARGS_5 \
- ASIO_MOVE_CAST(T1)(x1), ASIO_MOVE_CAST(T2)(x2), \
- ASIO_MOVE_CAST(T3)(x3), ASIO_MOVE_CAST(T4)(x4), \
- ASIO_MOVE_CAST(T5)(x5)
-# define ASIO_VARIADIC_MOVE_ARGS_6 \
- ASIO_MOVE_CAST(T1)(x1), ASIO_MOVE_CAST(T2)(x2), \
- ASIO_MOVE_CAST(T3)(x3), ASIO_MOVE_CAST(T4)(x4), \
- ASIO_MOVE_CAST(T5)(x5), ASIO_MOVE_CAST(T6)(x6)
-# define ASIO_VARIADIC_MOVE_ARGS_7 \
- ASIO_MOVE_CAST(T1)(x1), ASIO_MOVE_CAST(T2)(x2), \
- ASIO_MOVE_CAST(T3)(x3), ASIO_MOVE_CAST(T4)(x4), \
- ASIO_MOVE_CAST(T5)(x5), ASIO_MOVE_CAST(T6)(x6), \
- ASIO_MOVE_CAST(T7)(x7)
-# define ASIO_VARIADIC_MOVE_ARGS_8 \
- ASIO_MOVE_CAST(T1)(x1), ASIO_MOVE_CAST(T2)(x2), \
- ASIO_MOVE_CAST(T3)(x3), ASIO_MOVE_CAST(T4)(x4), \
- ASIO_MOVE_CAST(T5)(x5), ASIO_MOVE_CAST(T6)(x6), \
- ASIO_MOVE_CAST(T7)(x7), ASIO_MOVE_CAST(T8)(x8)
-
-# define ASIO_VARIADIC_DECLVAL(n) \
- ASIO_VARIADIC_DECLVAL_##n
-
-# define ASIO_VARIADIC_DECLVAL_1 \
- declval<T1>()
-# define ASIO_VARIADIC_DECLVAL_2 \
- declval<T1>(), declval<T2>()
-# define ASIO_VARIADIC_DECLVAL_3 \
- declval<T1>(), declval<T2>(), declval<T3>()
-# define ASIO_VARIADIC_DECLVAL_4 \
- declval<T1>(), declval<T2>(), declval<T3>(), declval<T4>()
-# define ASIO_VARIADIC_DECLVAL_5 \
- declval<T1>(), declval<T2>(), declval<T3>(), declval<T4>(), \
- declval<T5>()
-# define ASIO_VARIADIC_DECLVAL_6 \
- declval<T1>(), declval<T2>(), declval<T3>(), declval<T4>(), \
- declval<T5>(), declval<T6>()
-# define ASIO_VARIADIC_DECLVAL_7 \
- declval<T1>(), declval<T2>(), declval<T3>(), declval<T4>(), \
- declval<T5>(), declval<T6>(), declval<T7>()
-# define ASIO_VARIADIC_DECLVAL_8 \
- declval<T1>(), declval<T2>(), declval<T3>(), declval<T4>(), \
- declval<T5>(), declval<T6>(), declval<T7>(), declval<T8>()
-
-# define ASIO_VARIADIC_MOVE_DECLVAL(n) \
- ASIO_VARIADIC_MOVE_DECLVAL_##n
-
-# define ASIO_VARIADIC_MOVE_DECLVAL_1 \
- declval<ASIO_MOVE_ARG(T1)>()
-# define ASIO_VARIADIC_MOVE_DECLVAL_2 \
- declval<ASIO_MOVE_ARG(T1)>(), declval<ASIO_MOVE_ARG(T2)>()
-# define ASIO_VARIADIC_MOVE_DECLVAL_3 \
- declval<ASIO_MOVE_ARG(T1)>(), declval<ASIO_MOVE_ARG(T2)>(), \
- declval<ASIO_MOVE_ARG(T3)>()
-# define ASIO_VARIADIC_MOVE_DECLVAL_4 \
- declval<ASIO_MOVE_ARG(T1)>(), declval<ASIO_MOVE_ARG(T2)>(), \
- declval<ASIO_MOVE_ARG(T3)>(), declval<ASIO_MOVE_ARG(T4)>()
-# define ASIO_VARIADIC_MOVE_DECLVAL_5 \
- declval<ASIO_MOVE_ARG(T1)>(), declval<ASIO_MOVE_ARG(T2)>(), \
- declval<ASIO_MOVE_ARG(T3)>(), declval<ASIO_MOVE_ARG(T4)>(), \
- declval<ASIO_MOVE_ARG(T5)>()
-# define ASIO_VARIADIC_MOVE_DECLVAL_6 \
- declval<ASIO_MOVE_ARG(T1)>(), declval<ASIO_MOVE_ARG(T2)>(), \
- declval<ASIO_MOVE_ARG(T3)>(), declval<ASIO_MOVE_ARG(T4)>(), \
- declval<ASIO_MOVE_ARG(T5)>(), declval<ASIO_MOVE_ARG(T6)>()
-# define ASIO_VARIADIC_MOVE_DECLVAL_7 \
- declval<ASIO_MOVE_ARG(T1)>(), declval<ASIO_MOVE_ARG(T2)>(), \
- declval<ASIO_MOVE_ARG(T3)>(), declval<ASIO_MOVE_ARG(T4)>(), \
- declval<ASIO_MOVE_ARG(T5)>(), declval<ASIO_MOVE_ARG(T6)>(), \
- declval<ASIO_MOVE_ARG(T7)>()
-# define ASIO_VARIADIC_MOVE_DECLVAL_8 \
- declval<ASIO_MOVE_ARG(T1)>(), declval<ASIO_MOVE_ARG(T2)>(), \
- declval<ASIO_MOVE_ARG(T3)>(), declval<ASIO_MOVE_ARG(T4)>(), \
- declval<ASIO_MOVE_ARG(T5)>(), declval<ASIO_MOVE_ARG(T6)>(), \
- declval<ASIO_MOVE_ARG(T7)>(), declval<ASIO_MOVE_ARG(T8)>()
-
-# define ASIO_VARIADIC_DECAY(n) \
- ASIO_VARIADIC_DECAY_##n
-
-# define ASIO_VARIADIC_DECAY_1 \
- typename decay<T1>::type
-# define ASIO_VARIADIC_DECAY_2 \
- typename decay<T1>::type, typename decay<T2>::type
-# define ASIO_VARIADIC_DECAY_3 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type
-# define ASIO_VARIADIC_DECAY_4 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type, typename decay<T4>::type
-# define ASIO_VARIADIC_DECAY_5 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type, typename decay<T4>::type, \
- typename decay<T5>::type
-# define ASIO_VARIADIC_DECAY_6 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type, typename decay<T4>::type, \
- typename decay<T5>::type, typename decay<T6>::type
-# define ASIO_VARIADIC_DECAY_7 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type, typename decay<T4>::type, \
- typename decay<T5>::type, typename decay<T6>::type, \
- typename decay<T7>::type
-# define ASIO_VARIADIC_DECAY_8 \
- typename decay<T1>::type, typename decay<T2>::type, \
- typename decay<T3>::type, typename decay<T4>::type, \
- typename decay<T5>::type, typename decay<T6>::type, \
- typename decay<T7>::type, typename decay<T8>::type
-
-# define ASIO_VARIADIC_GENERATE(m) m(1) m(2) m(3) m(4) m(5) m(6) m(7) m(8)
-# define ASIO_VARIADIC_GENERATE_5(m) m(1) m(2) m(3) m(4) m(5)
-
-#endif // !defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#endif // ASIO_DETAIL_VARIADIC_TEMPLATES_HPP
diff --git a/3rdparty/asio/include/asio/detail/wait_handler.hpp b/3rdparty/asio/include/asio/detail/wait_handler.hpp
index 6a87a538567..489a968cd77 100644
--- a/3rdparty/asio/include/asio/detail/wait_handler.hpp
+++ b/3rdparty/asio/include/asio/detail/wait_handler.hpp
@@ -2,7 +2,7 @@
// detail/wait_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -36,7 +36,7 @@ public:
wait_handler(Handler& h, const IoExecutor& io_ex)
: wait_op(&wait_handler::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(h)),
+ handler_(static_cast<Handler&&>(h)),
work_(handler_, io_ex)
{
}
@@ -53,7 +53,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
h->work_));
// Make a copy of the handler so that the memory can be deallocated before
diff --git a/3rdparty/asio/include/asio/detail/wait_op.hpp b/3rdparty/asio/include/asio/detail/wait_op.hpp
index e4a62de6170..548232c1c55 100644
--- a/3rdparty/asio/include/asio/detail/wait_op.hpp
+++ b/3rdparty/asio/include/asio/detail/wait_op.hpp
@@ -2,7 +2,7 @@
// detail/wait_op.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/win_event.hpp b/3rdparty/asio/include/asio/detail/win_event.hpp
index 3f00e003289..e61843e5b9d 100644
--- a/3rdparty/asio/include/asio/detail/win_event.hpp
+++ b/3rdparty/asio/include/asio/detail/win_event.hpp
@@ -2,7 +2,7 @@
// detail/win_event.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/win_fd_set_adapter.hpp b/3rdparty/asio/include/asio/detail/win_fd_set_adapter.hpp
index f5e19f01107..0e3e63f0c25 100644
--- a/3rdparty/asio/include/asio/detail/win_fd_set_adapter.hpp
+++ b/3rdparty/asio/include/asio/detail/win_fd_set_adapter.hpp
@@ -2,7 +2,7 @@
// detail/win_fd_set_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/win_fenced_block.hpp b/3rdparty/asio/include/asio/detail/win_fenced_block.hpp
deleted file mode 100644
index 77d1eb1506b..00000000000
--- a/3rdparty/asio/include/asio/detail/win_fenced_block.hpp
+++ /dev/null
@@ -1,90 +0,0 @@
-//
-// detail/win_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_DETAIL_WIN_FENCED_BLOCK_HPP
-#define ASIO_DETAIL_WIN_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#if defined(ASIO_WINDOWS) && !defined(UNDER_CE)
-
-#include "asio/detail/socket_types.hpp"
-#include "asio/detail/noncopyable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class win_fenced_block
- : private noncopyable
-{
-public:
- enum half_t { half };
- enum full_t { full };
-
- // Constructor for a half fenced block.
- explicit win_fenced_block(half_t)
- {
- }
-
- // Constructor for a full fenced block.
- explicit win_fenced_block(full_t)
- {
-#if defined(__BORLANDC__)
- LONG barrier = 0;
- ::InterlockedExchange(&barrier, 1);
-#elif defined(ASIO_MSVC) \
- && ((ASIO_MSVC < 1400) || !defined(MemoryBarrier))
-# if defined(_M_IX86)
-# pragma warning(push)
-# pragma warning(disable:4793)
- LONG barrier;
- __asm { xchg barrier, eax }
-# pragma warning(pop)
-# endif // defined(_M_IX86)
-#else
- MemoryBarrier();
-#endif
- }
-
- // Destructor.
- ~win_fenced_block()
- {
-#if defined(__BORLANDC__)
- LONG barrier = 0;
- ::InterlockedExchange(&barrier, 1);
-#elif defined(ASIO_MSVC) \
- && ((ASIO_MSVC < 1400) || !defined(MemoryBarrier))
-# if defined(_M_IX86)
-# pragma warning(push)
-# pragma warning(disable:4793)
- LONG barrier;
- __asm { xchg barrier, eax }
-# pragma warning(pop)
-# endif // defined(_M_IX86)
-#else
- MemoryBarrier();
-#endif
- }
-};
-
-} // namespace detail
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // defined(ASIO_WINDOWS) && !defined(UNDER_CE)
-
-#endif // ASIO_DETAIL_WIN_FENCED_BLOCK_HPP
diff --git a/3rdparty/asio/include/asio/detail/win_global.hpp b/3rdparty/asio/include/asio/detail/win_global.hpp
index f77976e21ed..771f3fcba4b 100644
--- a/3rdparty/asio/include/asio/detail/win_global.hpp
+++ b/3rdparty/asio/include/asio/detail/win_global.hpp
@@ -2,7 +2,7 @@
// detail/win_global.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_file_service.hpp b/3rdparty/asio/include/asio/detail/win_iocp_file_service.hpp
new file mode 100644
index 00000000000..f10a8d3cdf4
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/win_iocp_file_service.hpp
@@ -0,0 +1,287 @@
+//
+// detail/win_iocp_file_service.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 ASIO_DETAIL_WIN_IOCP_FILE_SERVICE_HPP
+#define ASIO_DETAIL_WIN_IOCP_FILE_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_IOCP) && defined(ASIO_HAS_FILE)
+
+#include <string>
+#include "asio/detail/cstdint.hpp"
+#include "asio/detail/win_iocp_handle_service.hpp"
+#include "asio/error.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/file_base.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Extend win_iocp_handle_service to provide file support.
+class win_iocp_file_service :
+ public execution_context_service_base<win_iocp_file_service>
+{
+public:
+ // The native type of a file.
+ typedef win_iocp_handle_service::native_handle_type native_handle_type;
+
+ // The implementation type of the file.
+ class implementation_type : win_iocp_handle_service::implementation_type
+ {
+ private:
+ // Only this service will have access to the internal values.
+ friend class win_iocp_file_service;
+
+ uint64_t offset_;
+ bool is_stream_;
+ };
+
+ // Constructor.
+ ASIO_DECL win_iocp_file_service(execution_context& context);
+
+ // Destroy all user-defined handler objects owned by the service.
+ ASIO_DECL void shutdown();
+
+ // Construct a new file implementation.
+ void construct(implementation_type& impl)
+ {
+ handle_service_.construct(impl);
+ impl.offset_ = 0;
+ impl.is_stream_ = false;
+ }
+
+ // Move-construct a new file implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ handle_service_.move_construct(impl, other_impl);
+ impl.offset_ = other_impl.offset_;
+ impl.is_stream_ = other_impl.is_stream_;
+ other_impl.offset_ = 0;
+ }
+
+ // Move-assign from another file implementation.
+ void move_assign(implementation_type& impl,
+ win_iocp_file_service& other_service,
+ implementation_type& other_impl)
+ {
+ handle_service_.move_assign(impl,
+ other_service.handle_service_, other_impl);
+ impl.offset_ = other_impl.offset_;
+ impl.is_stream_ = other_impl.is_stream_;
+ other_impl.offset_ = 0;
+ }
+
+ // Destroy a file implementation.
+ void destroy(implementation_type& impl)
+ {
+ handle_service_.destroy(impl);
+ }
+
+ // Set whether the implementation is stream-oriented.
+ void set_is_stream(implementation_type& impl, bool is_stream)
+ {
+ impl.is_stream_ = is_stream;
+ }
+
+ // Open the file using the specified path name.
+ ASIO_DECL asio::error_code open(implementation_type& impl,
+ const char* path, file_base::flags open_flags,
+ asio::error_code& ec);
+
+ // Assign a native handle to a file implementation.
+ asio::error_code assign(implementation_type& impl,
+ const native_handle_type& native_handle,
+ asio::error_code& ec)
+ {
+ return handle_service_.assign(impl, native_handle, ec);
+ }
+
+ // Determine whether the file is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return handle_service_.is_open(impl);
+ }
+
+ // Destroy a file implementation.
+ asio::error_code close(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return handle_service_.close(impl, ec);
+ }
+
+ // Get the native file representation.
+ native_handle_type native_handle(const implementation_type& impl) const
+ {
+ return handle_service_.native_handle(impl);
+ }
+
+ // Release ownership of a file.
+ native_handle_type release(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return handle_service_.release(impl, ec);
+ }
+
+ // Cancel all operations associated with the file.
+ asio::error_code cancel(implementation_type& impl,
+ asio::error_code& ec)
+ {
+ return handle_service_.cancel(impl, ec);
+ }
+
+ // Get the size of the file.
+ ASIO_DECL uint64_t size(const implementation_type& impl,
+ asio::error_code& ec) const;
+
+ // Alter the size of the file.
+ ASIO_DECL asio::error_code resize(implementation_type& impl,
+ uint64_t n, asio::error_code& ec);
+
+ // Synchronise the file to disk.
+ ASIO_DECL asio::error_code sync_all(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Synchronise the file data to disk.
+ ASIO_DECL asio::error_code sync_data(implementation_type& impl,
+ asio::error_code& ec);
+
+ // Seek to a position in the file.
+ ASIO_DECL uint64_t seek(implementation_type& impl, int64_t offset,
+ file_base::seek_basis whence, asio::error_code& ec);
+
+ // Write the given data. Returns the number of bytes written.
+ template <typename ConstBufferSequence>
+ size_t write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ uint64_t offset = impl.offset_;
+ impl.offset_ += asio::buffer_size(buffers);
+ return handle_service_.write_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous write. The data being written must be valid for the
+ // lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some(implementation_type& impl,
+ const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ uint64_t offset = impl.offset_;
+ impl.offset_ += asio::buffer_size(buffers);
+ handle_service_.async_write_some_at(impl, offset, buffers, handler, io_ex);
+ }
+
+ // Write the given data at the specified location. Returns the number of
+ // bytes written.
+ template <typename ConstBufferSequence>
+ size_t write_some_at(implementation_type& impl, uint64_t offset,
+ const ConstBufferSequence& buffers, asio::error_code& ec)
+ {
+ return handle_service_.write_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous write at the specified location. The data being
+ // written must be valid for the lifetime of the asynchronous operation.
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
+ void async_write_some_at(implementation_type& impl,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ handle_service_.async_write_some_at(impl, offset, buffers, handler, io_ex);
+ }
+
+ // Read some data. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ uint64_t offset = impl.offset_;
+ impl.offset_ += asio::buffer_size(buffers);
+ return handle_service_.read_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some(implementation_type& impl,
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ uint64_t offset = impl.offset_;
+ impl.offset_ += asio::buffer_size(buffers);
+ handle_service_.async_read_some_at(impl, offset, buffers, handler, io_ex);
+ }
+
+ // Read some data. Returns the number of bytes read.
+ template <typename MutableBufferSequence>
+ size_t read_some_at(implementation_type& impl, uint64_t offset,
+ const MutableBufferSequence& buffers, asio::error_code& ec)
+ {
+ return handle_service_.read_some_at(impl, offset, buffers, ec);
+ }
+
+ // Start an asynchronous read. The buffer for the data being read must be
+ // valid for the lifetime of the asynchronous operation.
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
+ void async_read_some_at(implementation_type& impl,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ handle_service_.async_read_some_at(impl, offset, buffers, handler, io_ex);
+ }
+
+private:
+ // The implementation used for initiating asynchronous operations.
+ win_iocp_handle_service handle_service_;
+
+ // Emulation of Windows IO_STATUS_BLOCK structure.
+ struct io_status_block
+ {
+ union u
+ {
+ LONG Status;
+ void* Pointer;
+ };
+ ULONG_PTR Information;
+ };
+
+ // Emulation of flag passed to NtFlushBuffersFileEx.
+ enum { flush_flags_file_data_sync_only = 4 };
+
+ // The type of a NtFlushBuffersFileEx function pointer.
+ typedef LONG (NTAPI *nt_flush_buffers_file_ex_fn)(
+ HANDLE, ULONG, void*, ULONG, io_status_block*);
+
+ // The NTFlushBuffersFileEx function pointer.
+ nt_flush_buffers_file_ex_fn nt_flush_buffers_file_ex_;
+};
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/detail/impl/win_iocp_file_service.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // defined(ASIO_HAS_IOCP) && defined(ASIO_HAS_FILE)
+
+#endif // ASIO_DETAIL_WIN_IOCP_FILE_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_handle_read_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_handle_read_op.hpp
index f11abb122e4..9721bda1c21 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_handle_read_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_handle_read_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_handle_read_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -24,7 +24,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
@@ -45,7 +44,7 @@ public:
Handler& handler, const IoExecutor& io_ex)
: operation(&win_iocp_handle_read_op::do_complete),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -57,6 +56,7 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_handle_read_op* o(static_cast<win_iocp_handle_read_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -64,7 +64,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
@@ -80,6 +80,8 @@ public:
if (ec.value() == ERROR_HANDLE_EOF)
ec = asio::error::eof;
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_handle_service.hpp b/3rdparty/asio/include/asio/detail/win_iocp_handle_service.hpp
index 99fc94f0bdf..9e2486b4b79 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_handle_service.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_handle_service.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_handle_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -110,6 +110,10 @@ public:
ASIO_DECL asio::error_code close(implementation_type& impl,
asio::error_code& ec);
+ // Release ownership of a handle.
+ ASIO_DECL native_handle_type release(implementation_type& impl,
+ asio::error_code& ec);
+
// Get the native handle representation.
native_handle_type native_handle(const implementation_type& impl) const
{
@@ -148,7 +152,7 @@ public:
const ConstBufferSequence& buffers,
Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -178,7 +182,7 @@ public:
uint64_t offset, const ConstBufferSequence& buffers,
Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -229,7 +233,7 @@ public:
const MutableBufferSequence& buffers,
Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -261,7 +265,7 @@ public:
uint64_t offset, const MutableBufferSequence& buffers,
Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -339,6 +343,27 @@ private:
// destroyed.
ASIO_DECL void close_for_destruction(implementation_type& impl);
+ // The type of a NtSetInformationFile function pointer.
+ typedef LONG (NTAPI *nt_set_info_fn)(HANDLE, ULONG_PTR*, void*, ULONG, ULONG);
+
+ // Helper function to get the NtSetInformationFile function pointer. If no
+ // NtSetInformationFile pointer has been obtained yet, one is obtained using
+ // GetProcAddress and the pointer is cached. Returns a null pointer if
+ // NtSetInformationFile is not available.
+ ASIO_DECL nt_set_info_fn get_nt_set_info();
+
+ // Helper function to emulate InterlockedCompareExchangePointer functionality
+ // for:
+ // - very old Platform SDKs; and
+ // - platform SDKs where MSVC's /Wp64 option causes spurious warnings.
+ ASIO_DECL void* interlocked_compare_exchange_pointer(
+ void** dest, void* exch, void* cmp);
+
+ // Helper function to emulate InterlockedExchangePointer functionality for:
+ // - very old Platform SDKs; and
+ // - platform SDKs where MSVC's /Wp64 option causes spurious warnings.
+ ASIO_DECL void* interlocked_exchange_pointer(void** dest, void* val);
+
// Helper class used to implement per operation cancellation.
class iocp_op_cancellation : public operation
{
@@ -382,6 +407,9 @@ private:
// handlers.
win_iocp_io_context& iocp_service_;
+ // Pointer to NtSetInformationFile implementation.
+ void* nt_set_info_;
+
// Mutex to protect access to the linked list of implementations.
mutex mutex_;
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_handle_write_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_handle_write_op.hpp
index a6862051d2d..6a5b7e78338 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_handle_write_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_handle_write_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_handle_write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -24,7 +24,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
@@ -45,15 +44,18 @@ public:
Handler& handler, const IoExecutor& io_ex)
: operation(&win_iocp_handle_write_op::do_complete),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
static void do_complete(void* owner, operation* base,
- const asio::error_code& ec, std::size_t bytes_transferred)
+ const asio::error_code& result_ec, std::size_t bytes_transferred)
{
+ asio::error_code ec(result_ec);
+
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_handle_write_op* o(static_cast<win_iocp_handle_write_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -61,7 +63,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
@@ -73,6 +75,8 @@ public:
}
#endif // defined(ASIO_ENABLE_BUFFER_DEBUGGING)
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_io_context.hpp b/3rdparty/asio/include/asio/detail/win_iocp_io_context.hpp
index 1376d37fc45..1de94df7854 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_io_context.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_io_context.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_io_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -272,11 +272,13 @@ private:
enum
{
+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0600)
// Timeout to use with GetQueuedCompletionStatus on older versions of
// Windows. Some versions of windows have a "bug" where a call to
// GetQueuedCompletionStatus can appear stuck even though there are events
// waiting on the queue. Using a timeout helps to work around the issue.
default_gqcs_timeout = 500,
+#endif // !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0600)
// Maximum waitable timer timeout, in milliseconds.
max_timeout_msec = 5 * 60 * 1000,
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_null_buffers_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
index 5aedd7aed97..07751b9234b 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_null_buffers_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,7 +22,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -46,7 +45,7 @@ public:
&win_iocp_null_buffers_op::do_perform,
&win_iocp_null_buffers_op::do_complete),
cancel_token_(cancel_token),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -63,6 +62,7 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_null_buffers_op* o(static_cast<win_iocp_null_buffers_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -70,7 +70,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
// The reactor may have stored a result in the operation object.
@@ -90,6 +90,8 @@ public:
ec = asio::error::connection_refused;
}
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_operation.hpp b/3rdparty/asio/include/asio/detail/win_iocp_operation.hpp
index 4e1cd6a98c7..a935f87b882 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_operation.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_operation.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_operation.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_overlapped_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_overlapped_op.hpp
index 247375ba2c7..dc65ad08311 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_overlapped_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_overlapped_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_overlapped_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,7 +22,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
@@ -41,15 +40,18 @@ public:
win_iocp_overlapped_op(Handler& handler, const IoExecutor& io_ex)
: operation(&win_iocp_overlapped_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
static void do_complete(void* owner, operation* base,
- const asio::error_code& ec, std::size_t bytes_transferred)
+ const asio::error_code& result_ec, std::size_t bytes_transferred)
{
+ asio::error_code ec(result_ec);
+
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_overlapped_op* o(static_cast<win_iocp_overlapped_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -57,9 +59,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp b/3rdparty/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
index 5249abb66dd..596705a38c6 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_overlapped_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -47,11 +47,11 @@ public:
// Construct an win_iocp_overlapped_ptr to contain the specified handler.
template <typename Executor, typename Handler>
explicit win_iocp_overlapped_ptr(const Executor& ex,
- ASIO_MOVE_ARG(Handler) handler)
+ Handler&& handler)
: ptr_(0),
iocp_service_(0)
{
- this->reset(ex, ASIO_MOVE_CAST(Handler)(handler));
+ this->reset(ex, static_cast<Handler&&>(handler));
}
// Destructor automatically frees the OVERLAPPED object unless released.
@@ -134,9 +134,9 @@ public:
private:
template <typename Executor>
static win_iocp_io_context* get_iocp_service(const Executor& ex,
- typename enable_if<
+ enable_if_t<
can_query<const Executor&, execution::context_t>::value
- >::type* = 0)
+ >* = 0)
{
return &use_service<win_iocp_io_context>(
asio::query(ex, execution::context));
@@ -144,9 +144,9 @@ private:
template <typename Executor>
static win_iocp_io_context* get_iocp_service(const Executor& ex,
- typename enable_if<
+ enable_if_t<
!can_query<const Executor&, execution::context_t>::value
- >::type* = 0)
+ >* = 0)
{
return &use_service<win_iocp_io_context>(ex.context());
}
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp b/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp
index d1d9d8281ce..e0e12e91d5f 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_serial_port_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -137,6 +137,7 @@ public:
asio::error_code& ec)
{
ec = asio::error::operation_not_supported;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_accept_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
index c25cb172484..f4aa850be80 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_accept_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,7 +22,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
@@ -55,7 +54,7 @@ public:
enable_connection_aborted_(enable_connection_aborted),
proxy_op_(0),
cancel_requested_(0),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -88,6 +87,7 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_accept_op* o(static_cast<win_iocp_socket_accept_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -137,9 +137,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -176,8 +178,6 @@ private:
handler_work<Handler, IoExecutor> work_;
};
-#if defined(ASIO_HAS_MOVE)
-
template <typename Protocol, typename PeerIoExecutor,
typename Handler, typename IoExecutor>
class win_iocp_socket_move_accept_op : public operation
@@ -199,7 +199,7 @@ public:
enable_connection_aborted_(enable_connection_aborted),
cancel_requested_(0),
proxy_op_(0),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -232,6 +232,7 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_move_accept_op* o(
static_cast<win_iocp_socket_move_accept_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -282,9 +283,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
@@ -293,8 +296,8 @@ public:
// deallocated the memory here.
detail::move_binder2<Handler,
asio::error_code, peer_socket_type>
- handler(0, ASIO_MOVE_CAST(Handler)(o->handler_), ec,
- ASIO_MOVE_CAST(peer_socket_type)(o->peer_));
+ handler(0, static_cast<Handler&&>(o->handler_), ec,
+ static_cast<peer_socket_type&&>(o->peer_));
p.h = asio::detail::addressof(handler.handler_);
p.reset();
@@ -326,8 +329,6 @@ private:
handler_work<Handler, IoExecutor> work_;
};
-#endif // defined(ASIO_HAS_MOVE)
-
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_connect_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
index f7be04d5c56..104ee87bb24 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_connect_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,7 +22,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -47,6 +46,7 @@ public:
static status do_perform(reactor_op* base)
{
+ ASIO_ASSUME(base != 0);
win_iocp_socket_connect_op_base* o(
static_cast<win_iocp_socket_connect_op_base*>(base));
@@ -68,7 +68,7 @@ public:
Handler& handler, const IoExecutor& io_ex)
: win_iocp_socket_connect_op_base(socket,
&win_iocp_socket_connect_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -80,6 +80,7 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_connect_op* o(
static_cast<win_iocp_socket_connect_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -96,9 +97,11 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_recv_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
index 0da29825dd2..874a12aa7d0 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_recv_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,7 +23,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
@@ -49,7 +48,7 @@ public:
state_(state),
cancel_token_(cancel_token),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -61,6 +60,7 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_recv_op* o(static_cast<win_iocp_socket_recv_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -68,7 +68,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
@@ -85,6 +85,8 @@ public:
MutableBufferSequence>::all_empty(o->buffers_),
ec, bytes_transferred);
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
index 40c91144c58..b4b98aa0148 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_recvfrom_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,7 +23,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
@@ -51,7 +50,7 @@ public:
endpoint_size_(static_cast<int>(endpoint.capacity())),
cancel_token_(cancel_token),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -68,6 +67,7 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_recvfrom_op* o(
static_cast<win_iocp_socket_recvfrom_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -76,7 +76,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
@@ -93,6 +93,8 @@ public:
// Record the size of the endpoint returned by the operation.
o->endpoint_.resize(o->endpoint_size_);
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
index a14a4b5cb1b..85e4b78dc20 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
@@ -1,8 +1,8 @@
//
// detail/win_iocp_socket_recvmsg_op.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,7 +23,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
@@ -51,7 +50,7 @@ public:
cancel_token_(cancel_token),
buffers_(buffers),
out_flags_(out_flags),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -63,6 +62,7 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_recvmsg_op* o(
static_cast<win_iocp_socket_recvmsg_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -71,7 +71,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
@@ -86,6 +86,8 @@ public:
socket_ops::complete_iocp_recvmsg(o->cancel_token_, ec);
o->out_flags_ = 0;
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_send_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_send_op.hpp
index 3a40abefa06..c7043c4875e 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_send_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_send_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_send_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,7 +23,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/operation.hpp"
@@ -47,7 +46,7 @@ public:
: operation(&win_iocp_socket_send_op::do_complete),
cancel_token_(cancel_token),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -59,6 +58,7 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_socket_send_op* o(static_cast<win_iocp_socket_send_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -66,7 +66,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
@@ -80,6 +80,8 @@ public:
socket_ops::complete_iocp_send(o->cancel_token_, ec);
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_service.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_service.hpp
index 6f7fa182c43..faeaffa4c36 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_service.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_service.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -27,7 +27,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/mutex.hpp"
#include "asio/detail/operation.hpp"
@@ -51,7 +50,7 @@ namespace detail {
template <typename Protocol>
class win_iocp_socket_service :
- public execution_context_service_base<win_iocp_socket_service<Protocol> >,
+ public execution_context_service_base<win_iocp_socket_service<Protocol>>,
public win_iocp_socket_service_base
{
public:
@@ -131,7 +130,7 @@ public:
// Constructor.
win_iocp_socket_service(execution_context& context)
: execution_context_service_base<
- win_iocp_socket_service<Protocol> >(context),
+ win_iocp_socket_service<Protocol>>(context),
win_iocp_socket_service_base(context)
{
}
@@ -144,7 +143,7 @@ public:
// Move-construct a new socket implementation.
void move_construct(implementation_type& impl,
- implementation_type& other_impl) ASIO_NOEXCEPT
+ implementation_type& other_impl) noexcept
{
this->base_move_construct(impl, other_impl);
@@ -205,6 +204,8 @@ public:
impl.have_remote_endpoint_ = false;
impl.remote_endpoint_ = endpoint_type();
}
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -219,6 +220,8 @@ public:
impl.have_remote_endpoint_ = native_socket.have_remote_endpoint();
impl.remote_endpoint_ = native_socket.remote_endpoint();
}
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -235,6 +238,8 @@ public:
const endpoint_type& endpoint, asio::error_code& ec)
{
socket_ops::bind(impl.socket_, endpoint.data(), endpoint.size(), ec);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -246,6 +251,8 @@ public:
socket_ops::setsockopt(impl.socket_, impl.state_,
option.level(impl.protocol_), option.name(impl.protocol_),
option.data(impl.protocol_), option.size(impl.protocol_), ec);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -260,6 +267,8 @@ public:
option.data(impl.protocol_), &size, ec);
if (!ec)
option.resize(impl.protocol_, size);
+
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -270,7 +279,10 @@ public:
endpoint_type endpoint;
std::size_t addr_len = endpoint.capacity();
if (socket_ops::getsockname(impl.socket_, endpoint.data(), &addr_len, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return endpoint_type();
+ }
endpoint.resize(addr_len);
return endpoint;
}
@@ -283,7 +295,10 @@ public:
std::size_t addr_len = endpoint.capacity();
if (socket_ops::getpeername(impl.socket_, endpoint.data(),
&addr_len, impl.have_remote_endpoint_, ec))
+ {
+ ASIO_ERROR_LOCATION(ec);
return endpoint_type();
+ }
endpoint.resize(addr_len);
return endpoint;
}
@@ -306,9 +321,12 @@ public:
buffer_sequence_adapter<asio::const_buffer,
ConstBufferSequence> bufs(buffers);
- return socket_ops::sync_sendto(impl.socket_, impl.state_,
- bufs.buffers(), bufs.count(), flags,
+ size_t n = socket_ops::sync_sendto(impl.socket_,
+ impl.state_, bufs.buffers(), bufs.count(), flags,
destination.data(), destination.size(), ec);
+
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be sent without blocking.
@@ -318,7 +336,7 @@ public:
{
// Wait for socket to become ready.
socket_ops::poll_write(impl.socket_, impl.state_, -1, ec);
-
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -330,7 +348,7 @@ public:
socket_base::message_flags flags, Handler& handler,
const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -388,14 +406,15 @@ public:
MutableBufferSequence> bufs(buffers);
std::size_t addr_len = sender_endpoint.capacity();
- std::size_t bytes_recvd = socket_ops::sync_recvfrom(
- impl.socket_, impl.state_, bufs.buffers(), bufs.count(),
- flags, sender_endpoint.data(), &addr_len, ec);
+ std::size_t n = socket_ops::sync_recvfrom(impl.socket_,
+ impl.state_, bufs.buffers(), bufs.count(), flags,
+ sender_endpoint.data(), &addr_len, ec);
if (!ec)
sender_endpoint.resize(addr_len);
- return bytes_recvd;
+ ASIO_ERROR_LOCATION(ec);
+ return n;
}
// Wait until data can be received without blocking.
@@ -409,6 +428,7 @@ public:
// Reset endpoint since it can be given no sensible value at this time.
sender_endpoint = endpoint_type();
+ ASIO_ERROR_LOCATION(ec);
return 0;
}
@@ -422,7 +442,7 @@ public:
socket_base::message_flags flags, Handler& handler,
const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -454,7 +474,7 @@ public:
endpoint_type& sender_endpoint, socket_base::message_flags flags,
Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -498,6 +518,7 @@ public:
if (peer.is_open())
{
ec = asio::error::already_open;
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -516,6 +537,7 @@ public:
new_socket.release();
}
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -525,7 +547,7 @@ public:
void async_accept(implementation_type& impl, Socket& peer,
endpoint_type* peer_endpoint, Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -557,7 +579,6 @@ public:
p.v = p.p = 0;
}
-#if defined(ASIO_HAS_MOVE)
// Start an asynchronous accept. The peer and peer_endpoint objects
// must be valid until the accept's handler is invoked.
template <typename PeerIoExecutor, typename Handler, typename IoExecutor>
@@ -565,7 +586,7 @@ public:
const PeerIoExecutor& peer_io_ex, endpoint_type* peer_endpoint,
Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -597,7 +618,6 @@ public:
p.p->address_length(), o);
p.v = p.p = 0;
}
-#endif // defined(ASIO_HAS_MOVE)
// Connect the socket to the specified endpoint.
asio::error_code connect(implementation_type& impl,
@@ -605,6 +625,7 @@ public:
{
socket_ops::sync_connect(impl.socket_,
peer_endpoint.data(), peer_endpoint.size(), ec);
+ ASIO_ERROR_LOCATION(ec);
return ec;
}
@@ -614,7 +635,7 @@ public:
const endpoint_type& peer_endpoint, Handler& handler,
const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_socket_service_base.hpp b/3rdparty/asio/include/asio/detail/win_iocp_socket_service_base.hpp
index 738c6f04191..a157143e35b 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_socket_service_base.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_socket_service_base.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -27,7 +27,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/mutex.hpp"
#include "asio/detail/operation.hpp"
@@ -96,7 +95,7 @@ public:
// Move-construct a new socket implementation.
ASIO_DECL void base_move_construct(base_implementation_type& impl,
- base_implementation_type& other_impl) ASIO_NOEXCEPT;
+ base_implementation_type& other_impl) noexcept;
// Move-assign from another socket implementation.
ASIO_DECL void base_move_assign(base_implementation_type& impl,
@@ -214,7 +213,7 @@ public:
void async_wait(base_implementation_type& impl,
socket_base::wait_type w, Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
bool is_continuation =
@@ -298,7 +297,7 @@ public:
const ConstBufferSequence& buffers, socket_base::message_flags flags,
Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -374,7 +373,7 @@ public:
const MutableBufferSequence& buffers, socket_base::message_flags flags,
Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -407,7 +406,7 @@ public:
const null_buffers&, socket_base::message_flags flags,
Handler& handler, const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -478,7 +477,7 @@ public:
socket_base::message_flags& out_flags, Handler& handler,
const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -510,7 +509,7 @@ public:
socket_base::message_flags& out_flags, Handler& handler,
const IoExecutor& io_ex)
{
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Allocate and construct an operation to wrap the handler.
@@ -569,9 +568,8 @@ protected:
// Helper function to start an asynchronous send_to operation.
ASIO_DECL void start_send_to_op(base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count,
- const socket_addr_type* addr, int addrlen,
- socket_base::message_flags flags, operation* op);
+ WSABUF* buffers, std::size_t buffer_count, const void* addr,
+ int addrlen, socket_base::message_flags flags, operation* op);
// Helper function to start an asynchronous receive operation.
ASIO_DECL void start_receive_op(base_implementation_type& impl,
@@ -585,7 +583,7 @@ protected:
// Helper function to start an asynchronous receive_from operation.
ASIO_DECL void start_receive_from_op(base_implementation_type& impl,
- WSABUF* buffers, std::size_t buffer_count, socket_addr_type* addr,
+ WSABUF* buffers, std::size_t buffer_count, void* addr,
socket_base::message_flags flags, int* addrlen, operation* op);
// Helper function to start an asynchronous accept operation.
@@ -599,9 +597,8 @@ protected:
// Start the asynchronous connect operation using the reactor.
ASIO_DECL int start_connect_op(base_implementation_type& impl,
- int family, int type, const socket_addr_type* remote_addr,
- std::size_t remote_addrlen, win_iocp_socket_connect_op_base* op,
- operation* iocp_op);
+ int family, int type, const void* remote_addr, std::size_t remote_addrlen,
+ win_iocp_socket_connect_op_base* op, operation* iocp_op);
// Helper function to close a socket when the associated object is being
// destroyed.
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_thread_info.hpp b/3rdparty/asio/include/asio/detail/win_iocp_thread_info.hpp
index 2b9b1bf5623..3f1e0126779 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_thread_info.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_thread_info.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_thread_info.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_wait_op.hpp b/3rdparty/asio/include/asio/detail/win_iocp_wait_op.hpp
index b17fe404b89..882f16e73cf 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_wait_op.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_wait_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_wait_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,7 +23,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/reactor_op.hpp"
@@ -47,7 +46,7 @@ public:
&win_iocp_wait_op::do_perform,
&win_iocp_wait_op::do_complete),
cancel_token_(cancel_token),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -64,6 +63,7 @@ public:
asio::error_code ec(result_ec);
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
win_iocp_wait_op* o(static_cast<win_iocp_wait_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -71,7 +71,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
// The reactor may have stored a result in the operation object.
@@ -91,6 +91,8 @@ public:
ec = asio::error::connection_refused;
}
+ ASIO_ERROR_LOCATION(ec);
+
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
diff --git a/3rdparty/asio/include/asio/detail/win_mutex.hpp b/3rdparty/asio/include/asio/detail/win_mutex.hpp
index aed9ad91b92..77603ec9750 100644
--- a/3rdparty/asio/include/asio/detail/win_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/win_mutex.hpp
@@ -2,7 +2,7 @@
// detail/win_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/win_object_handle_service.hpp b/3rdparty/asio/include/asio/detail/win_object_handle_service.hpp
index a80c27dfc0b..8e01b72f4f6 100644
--- a/3rdparty/asio/include/asio/detail/win_object_handle_service.hpp
+++ b/3rdparty/asio/include/asio/detail/win_object_handle_service.hpp
@@ -2,7 +2,7 @@
// detail/win_object_handle_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -20,7 +20,6 @@
#if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE)
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/wait_handler.hpp"
#include "asio/error.hpp"
diff --git a/3rdparty/asio/include/asio/detail/win_static_mutex.hpp b/3rdparty/asio/include/asio/detail/win_static_mutex.hpp
index 4538c3d168c..736ef0e3f2c 100644
--- a/3rdparty/asio/include/asio/detail/win_static_mutex.hpp
+++ b/3rdparty/asio/include/asio/detail/win_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/win_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/win_thread.hpp b/3rdparty/asio/include/asio/detail/win_thread.hpp
index 0f6679d0190..c1e7b8e618a 100644
--- a/3rdparty/asio/include/asio/detail/win_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/win_thread.hpp
@@ -2,7 +2,7 @@
// detail/win_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/win_tss_ptr.hpp b/3rdparty/asio/include/asio/detail/win_tss_ptr.hpp
index fa137a8bce2..95a87717bad 100644
--- a/3rdparty/asio/include/asio/detail/win_tss_ptr.hpp
+++ b/3rdparty/asio/include/asio/detail/win_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/win_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/winapp_thread.hpp b/3rdparty/asio/include/asio/detail/winapp_thread.hpp
index 512aa231e26..efa662dfe6f 100644
--- a/3rdparty/asio/include/asio/detail/winapp_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/winapp_thread.hpp
@@ -2,7 +2,7 @@
// detail/winapp_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/wince_thread.hpp b/3rdparty/asio/include/asio/detail/wince_thread.hpp
index 63030f2545f..3c6b8543c21 100644
--- a/3rdparty/asio/include/asio/detail/wince_thread.hpp
+++ b/3rdparty/asio/include/asio/detail/wince_thread.hpp
@@ -2,7 +2,7 @@
// detail/wince_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/winrt_async_manager.hpp b/3rdparty/asio/include/asio/detail/winrt_async_manager.hpp
index ee7d4f691a6..9d0f9023c8c 100644
--- a/3rdparty/asio/include/asio/detail/winrt_async_manager.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_async_manager.hpp
@@ -2,7 +2,7 @@
// detail/winrt_async_manager.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/winrt_async_op.hpp b/3rdparty/asio/include/asio/detail/winrt_async_op.hpp
index 0751681fae7..a34989841bc 100644
--- a/3rdparty/asio/include/asio/detail/winrt_async_op.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_async_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_async_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/winrt_resolve_op.hpp b/3rdparty/asio/include/asio/detail/winrt_resolve_op.hpp
index b7cfcb203ae..3cbd00e61f2 100644
--- a/3rdparty/asio/include/asio/detail/winrt_resolve_op.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_resolve_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_resolve_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,7 +22,6 @@
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/winrt_async_op.hpp"
@@ -54,7 +53,7 @@ public:
Windows::Networking::EndpointPair^>^>(
&winrt_resolve_op::do_complete),
query_(query),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -63,6 +62,7 @@ public:
const asio::error_code&, std::size_t)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
winrt_resolve_op* o(static_cast<winrt_resolve_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -70,7 +70,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
results_type results = results_type();
diff --git a/3rdparty/asio/include/asio/detail/winrt_resolver_service.hpp b/3rdparty/asio/include/asio/detail/winrt_resolver_service.hpp
index 81ecb7400bf..02dddf08226 100644
--- a/3rdparty/asio/include/asio/detail/winrt_resolver_service.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_resolver_service.hpp
@@ -2,7 +2,7 @@
// detail/winrt_resolver_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -42,7 +42,7 @@ namespace detail {
template <typename Protocol>
class winrt_resolver_service :
- public execution_context_service_base<winrt_resolver_service<Protocol> >
+ public execution_context_service_base<winrt_resolver_service<Protocol>>
{
public:
// The implementation type of the resolver. A cancellation token is used to
@@ -62,7 +62,7 @@ public:
// Constructor.
winrt_resolver_service(execution_context& context)
: execution_context_service_base<
- winrt_resolver_service<Protocol> >(context),
+ winrt_resolver_service<Protocol>>(context),
scheduler_(use_service<scheduler_impl>(context)),
async_manager_(use_service<winrt_async_manager>(context))
{
diff --git a/3rdparty/asio/include/asio/detail/winrt_socket_connect_op.hpp b/3rdparty/asio/include/asio/detail/winrt_socket_connect_op.hpp
index b0e0fbf2975..008062e1b6e 100644
--- a/3rdparty/asio/include/asio/detail/winrt_socket_connect_op.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_socket_connect_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_socket_connect_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,7 +23,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/winrt_async_op.hpp"
@@ -43,7 +42,7 @@ public:
winrt_socket_connect_op(Handler& handler, const IoExecutor& io_ex)
: winrt_async_op<void>(&winrt_socket_connect_op::do_complete),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -52,6 +51,7 @@ public:
const asio::error_code&, std::size_t)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
winrt_socket_connect_op* o(static_cast<winrt_socket_connect_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -59,7 +59,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
// Make a copy of the handler so that the memory can be deallocated before
diff --git a/3rdparty/asio/include/asio/detail/winrt_socket_recv_op.hpp b/3rdparty/asio/include/asio/detail/winrt_socket_recv_op.hpp
index 722578ee9f9..4b1d9f895f3 100644
--- a/3rdparty/asio/include/asio/detail/winrt_socket_recv_op.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_socket_recv_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_socket_recv_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,7 +23,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/winrt_async_op.hpp"
@@ -46,7 +45,7 @@ public:
: winrt_async_op<Windows::Storage::Streams::IBuffer^>(
&winrt_socket_recv_op::do_complete),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -55,6 +54,7 @@ public:
const asio::error_code&, std::size_t)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
winrt_socket_recv_op* o(static_cast<winrt_socket_recv_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -62,7 +62,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
diff --git a/3rdparty/asio/include/asio/detail/winrt_socket_send_op.hpp b/3rdparty/asio/include/asio/detail/winrt_socket_send_op.hpp
index 0f52d9718e7..eb21ef7e902 100644
--- a/3rdparty/asio/include/asio/detail/winrt_socket_send_op.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_socket_send_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_socket_send_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,7 +23,6 @@
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_work.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/winrt_async_op.hpp"
@@ -45,7 +44,7 @@ public:
Handler& handler, const IoExecutor& io_ex)
: winrt_async_op<unsigned int>(&winrt_socket_send_op::do_complete),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(Handler)(handler)),
+ handler_(static_cast<Handler&&>(handler)),
work_(handler_, io_ex)
{
}
@@ -54,6 +53,7 @@ public:
const asio::error_code&, std::size_t)
{
// Take ownership of the operation object.
+ ASIO_ASSUME(base != 0);
winrt_socket_send_op* o(static_cast<winrt_socket_send_op*>(base));
ptr p = { asio::detail::addressof(o->handler_), o, o };
@@ -61,7 +61,7 @@ public:
// Take ownership of the operation's outstanding work.
handler_work<Handler, IoExecutor> w(
- ASIO_MOVE_CAST2(handler_work<Handler, IoExecutor>)(
+ static_cast<handler_work<Handler, IoExecutor>&&>(
o->work_));
#if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
diff --git a/3rdparty/asio/include/asio/detail/winrt_ssocket_service.hpp b/3rdparty/asio/include/asio/detail/winrt_ssocket_service.hpp
index b7727ff2d2f..6b45ed4fb0c 100644
--- a/3rdparty/asio/include/asio/detail/winrt_ssocket_service.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_ssocket_service.hpp
@@ -2,7 +2,7 @@
// detail/winrt_ssocket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -33,7 +33,7 @@ namespace detail {
template <typename Protocol>
class winrt_ssocket_service :
- public execution_context_service_base<winrt_ssocket_service<Protocol> >,
+ public execution_context_service_base<winrt_ssocket_service<Protocol>>,
public winrt_ssocket_service_base
{
public:
@@ -62,7 +62,7 @@ public:
// Constructor.
winrt_ssocket_service(execution_context& context)
- : execution_context_service_base<winrt_ssocket_service<Protocol> >(context),
+ : execution_context_service_base<winrt_ssocket_service<Protocol>>(context),
winrt_ssocket_service_base(context)
{
}
@@ -75,7 +75,7 @@ public:
// Move-construct a new socket implementation.
void move_construct(implementation_type& impl,
- implementation_type& other_impl) ASIO_NOEXCEPT
+ implementation_type& other_impl) noexcept
{
this->base_move_construct(impl, other_impl);
diff --git a/3rdparty/asio/include/asio/detail/winrt_ssocket_service_base.hpp b/3rdparty/asio/include/asio/detail/winrt_ssocket_service_base.hpp
index 6668975e5a7..c752da80e2a 100644
--- a/3rdparty/asio/include/asio/detail/winrt_ssocket_service_base.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_ssocket_service_base.hpp
@@ -2,7 +2,7 @@
// detail/winrt_ssocket_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -77,7 +77,7 @@ public:
// Move-construct a new socket implementation.
ASIO_DECL void base_move_construct(base_implementation_type& impl,
- base_implementation_type& other_impl) ASIO_NOEXCEPT;
+ base_implementation_type& other_impl) noexcept;
// Move-assign from another socket implementation.
ASIO_DECL void base_move_assign(base_implementation_type& impl,
diff --git a/3rdparty/asio/include/asio/detail/winrt_timer_scheduler.hpp b/3rdparty/asio/include/asio/detail/winrt_timer_scheduler.hpp
index 8fd9636bf85..aadd581f75d 100644
--- a/3rdparty/asio/include/asio/detail/winrt_timer_scheduler.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_timer_scheduler.hpp
@@ -2,7 +2,7 @@
// detail/winrt_timer_scheduler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/winrt_utils.hpp b/3rdparty/asio/include/asio/detail/winrt_utils.hpp
index d0e184098eb..f33786ccf8b 100644
--- a/3rdparty/asio/include/asio/detail/winrt_utils.hpp
+++ b/3rdparty/asio/include/asio/detail/winrt_utils.hpp
@@ -2,7 +2,7 @@
// detail/winrt_utils.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/detail/winsock_init.hpp b/3rdparty/asio/include/asio/detail/winsock_init.hpp
index a9e361a1c94..7914560ab64 100644
--- a/3rdparty/asio/include/asio/detail/winsock_init.hpp
+++ b/3rdparty/asio/include/asio/detail/winsock_init.hpp
@@ -2,7 +2,7 @@
// detail/winsock_init.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -47,7 +47,7 @@ protected:
ASIO_DECL static void throw_on_error(data& d);
};
-template <int Major = 2, int Minor = 0>
+template <int Major = 2, int Minor = 2>
class winsock_init : private winsock_init_base
{
public:
diff --git a/3rdparty/asio/include/asio/detail/work_dispatcher.hpp b/3rdparty/asio/include/asio/detail/work_dispatcher.hpp
index 9ece5014d94..2a473e45af6 100644
--- a/3rdparty/asio/include/asio/detail/work_dispatcher.hpp
+++ b/3rdparty/asio/include/asio/detail/work_dispatcher.hpp
@@ -2,7 +2,7 @@
// detail/work_dispatcher.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -39,13 +39,13 @@ struct is_work_dispatcher_required : true_type
template <typename Handler, typename Executor>
struct is_work_dispatcher_required<Handler, Executor,
- typename enable_if<
+ enable_if_t<
is_same<
typename associated_executor<Handler,
Executor>::asio_associated_executor_is_unspecialised,
void
>::value
- >::type> : false_type
+ >> : false_type
{
};
@@ -54,15 +54,14 @@ class work_dispatcher
{
public:
template <typename CompletionHandler>
- work_dispatcher(ASIO_MOVE_ARG(CompletionHandler) handler,
+ work_dispatcher(CompletionHandler&& handler,
const Executor& handler_ex)
- : handler_(ASIO_MOVE_CAST(CompletionHandler)(handler)),
+ : handler_(static_cast<CompletionHandler&&>(handler)),
executor_(asio::prefer(handler_ex,
execution::outstanding_work.tracked))
{
}
-#if defined(ASIO_HAS_MOVE)
work_dispatcher(const work_dispatcher& other)
: handler_(other.handler_),
executor_(other.executor_)
@@ -70,28 +69,25 @@ public:
}
work_dispatcher(work_dispatcher&& other)
- : handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- executor_(ASIO_MOVE_CAST(work_executor_type)(other.executor_))
+ : handler_(static_cast<Handler&&>(other.handler_)),
+ executor_(static_cast<work_executor_type&&>(other.executor_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- execution::execute(
- asio::prefer(executor_,
- execution::blocking.possibly,
- execution::allocator((get_associated_allocator)(handler_))),
+ associated_allocator_t<Handler> alloc((get_associated_allocator)(handler_));
+ asio::prefer(executor_, execution::allocator(alloc)).execute(
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler_)));
+ static_cast<Handler&&>(handler_)));
}
private:
- typedef typename decay<
- typename prefer_result<const Executor&,
+ typedef decay_t<
+ prefer_result_t<const Executor&,
execution::outstanding_work_t::tracked_t
- >::type
- >::type work_executor_type;
+ >
+ > work_executor_type;
Handler handler_;
work_executor_type executor_;
@@ -101,18 +97,16 @@ private:
template <typename Handler, typename Executor>
class work_dispatcher<Handler, Executor,
- typename enable_if<!execution::is_executor<Executor>::value>::type>
+ enable_if_t<!execution::is_executor<Executor>::value>>
{
public:
template <typename CompletionHandler>
- work_dispatcher(ASIO_MOVE_ARG(CompletionHandler) handler,
- const Executor& handler_ex)
+ work_dispatcher(CompletionHandler&& handler, const Executor& handler_ex)
: work_(handler_ex),
- handler_(ASIO_MOVE_CAST(CompletionHandler)(handler))
+ handler_(static_cast<CompletionHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
work_dispatcher(const work_dispatcher& other)
: work_(other.work_),
handler_(other.handler_)
@@ -120,19 +114,17 @@ public:
}
work_dispatcher(work_dispatcher&& other)
- : work_(ASIO_MOVE_CAST(executor_work_guard<Executor>)(other.work_)),
- handler_(ASIO_MOVE_CAST(Handler)(other.handler_))
+ : work_(static_cast<executor_work_guard<Executor>&&>(other.work_)),
+ handler_(static_cast<Handler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- typename associated_allocator<Handler>::type alloc(
- (get_associated_allocator)(handler_));
+ associated_allocator_t<Handler> alloc((get_associated_allocator)(handler_));
work_.get_executor().dispatch(
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler_)), alloc);
+ static_cast<Handler&&>(handler_)), alloc);
work_.reset();
}
diff --git a/3rdparty/asio/include/asio/detail/wrapped_handler.hpp b/3rdparty/asio/include/asio/detail/wrapped_handler.hpp
index 18ca6d3b955..fce9abfab43 100644
--- a/3rdparty/asio/include/asio/detail/wrapped_handler.hpp
+++ b/3rdparty/asio/include/asio/detail/wrapped_handler.hpp
@@ -2,7 +2,7 @@
// detail/wrapped_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/push_options.hpp"
@@ -52,11 +50,10 @@ public:
wrapped_handler(Dispatcher dispatcher, Handler& handler)
: dispatcher_(dispatcher),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
wrapped_handler(const wrapped_handler& other)
: dispatcher_(other.dispatcher_),
handler_(other.handler_)
@@ -65,14 +62,13 @@ public:
wrapped_handler(wrapped_handler&& other)
: dispatcher_(other.dispatcher_),
- handler_(ASIO_MOVE_CAST(Handler)(other.handler_))
+ handler_(static_cast<Handler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
- dispatcher_.dispatch(ASIO_MOVE_CAST(Handler)(handler_));
+ dispatcher_.dispatch(static_cast<Handler&&>(handler_));
}
void operator()() const
@@ -161,7 +157,7 @@ class rewrapped_handler
public:
explicit rewrapped_handler(Handler& handler, const Context& context)
: context_(context),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler))
{
}
@@ -171,7 +167,6 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE)
rewrapped_handler(const rewrapped_handler& other)
: context_(other.context_),
handler_(other.handler_)
@@ -179,11 +174,10 @@ public:
}
rewrapped_handler(rewrapped_handler&& other)
- : context_(ASIO_MOVE_CAST(Context)(other.context_)),
- handler_(ASIO_MOVE_CAST(Handler)(other.handler_))
+ : context_(static_cast<Context&&>(other.context_)),
+ handler_(static_cast<Handler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()()
{
@@ -201,92 +195,12 @@ public:
};
template <typename Dispatcher, typename Handler, typename IsContinuation>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Dispatcher, typename Handler, typename IsContinuation>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Dispatcher, typename Handler, typename IsContinuation>
inline bool asio_handler_is_continuation(
wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
{
return IsContinuation()(this_handler->dispatcher_, this_handler->handler_);
}
-template <typename Function, typename Dispatcher,
- typename Handler, typename IsContinuation>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- this_handler->dispatcher_.dispatch(
- rewrapped_handler<Function, Handler>(
- function, this_handler->handler_));
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Dispatcher,
- typename Handler, typename IsContinuation>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- wrapped_handler<Dispatcher, Handler, IsContinuation>* this_handler)
-{
- this_handler->dispatcher_.dispatch(
- rewrapped_handler<Function, Handler>(
- function, this_handler->handler_));
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Context>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- rewrapped_handler<Handler, Context>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler, typename Context>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- rewrapped_handler<Handler, Context>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->context_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
template <typename Dispatcher, typename Context>
inline bool asio_handler_is_continuation(
rewrapped_handler<Dispatcher, Context>* this_handler)
@@ -295,30 +209,6 @@ inline bool asio_handler_is_continuation(
this_handler->context_);
}
-template <typename Function, typename Handler, typename Context>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- rewrapped_handler<Handler, Context>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->context_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler, typename Context>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- rewrapped_handler<Handler, Context>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->context_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/dispatch.hpp b/3rdparty/asio/include/asio/dispatch.hpp
index 64da41b7c25..9eb60a4103d 100644
--- a/3rdparty/asio/include/asio/dispatch.hpp
+++ b/3rdparty/asio/include/asio/dispatch.hpp
@@ -2,7 +2,7 @@
// dispatch.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,6 +17,7 @@
#include "asio/detail/config.hpp"
#include "asio/async_result.hpp"
+#include "asio/detail/initiate_dispatch.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution_context.hpp"
#include "asio/execution/executor.hpp"
@@ -32,27 +33,50 @@ namespace asio {
* executor. The function object may be called from the current thread prior to
* returning from <tt>dispatch()</tt>. Otherwise, it is queued for execution.
*
- * This function has the following effects:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{}, token)</tt>, where @c Init is a function object type defined
+ * as:
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * }; @endcode
*
- * @li Obtains the handler's associated executor object @c ex by performing
- * <tt>get_associated_executor(handler)</tt>.
+ * The function call operator of @c Init:
+ *
+ * @li Obtains the handler's associated executor object @c ex of type @c Ex by
+ * performing @code auto ex = get_associated_executor(handler); @endcode
*
* @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(ex, execution::allocator(alloc)).execute(
+ * std::forward<CompletionHandler>(completion_handler)); @endcode
*
- * @li Performs <tt>ex.dispatch(std::move(handler), alloc)</tt>.
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.dispatch(
+ * std::forward<CompletionHandler>(completion_handler),
+ * alloc); @endcode
*
- * @li Returns <tt>result.get()</tt>.
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch(
- ASIO_MOVE_ARG(CompletionToken) token);
+template <ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken>
+inline auto dispatch(NullaryToken&& token)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_dispatch>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_dispatch(), token);
+}
/// Submits a completion token or function object for execution.
/**
@@ -60,62 +84,114 @@ ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch(
* The function object may be called from the current thread prior to returning
* from <tt>dispatch()</tt>. Otherwise, it is queued for execution.
*
- * This function has the following effects:
- *
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @param ex The target executor.
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Obtains the handler's associated executor object @c ex1 by performing
- * <tt>get_associated_executor(handler)</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{ex}, token)</tt>, where @c Init is a function object type
+ * defined as:
*
- * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
- *
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * using executor_type = Executor;
+ * explicit Init(const Executor& ex) : ex_(ex) {}
+ * executor_type get_executor() const noexcept { return ex_; }
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * private:
+ * Executor ex_; // exposition only
+ * }; @endcode
*
- * @li Constructs a function object @c f with a function call operator that
- * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
- * <tt>w.reset()</tt>.
+ * The function call operator of @c Init:
*
- * @li Performs <tt>Executor(ex).dispatch(std::move(f), alloc)</tt>.
+ * @li Obtains the handler's associated executor object @c ex1 of type @c Ex1 by
+ * performing @code auto ex1 = get_associated_executor(handler, ex); @endcode
*
- * @li Returns <tt>result.get()</tt>.
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is true, constructs a
+ * function object @c f with a member @c executor_ that is initialised with
+ * <tt>prefer(ex1, execution::outstanding_work.tracked)</tt>, a member @c
+ * handler_ that is a decay-copy of @c completion_handler, and a function call
+ * operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * prefer(executor_, execution::allocator(a)).execute(std::move(handler_));
+ * @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is false, constructs a
+ * function object @c f with a member @c work_ that is initialised with
+ * <tt>make_work_guard(ex1)</tt>, a member @c handler_ that is a decay-copy of
+ * @c completion_handler, and a function call operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * work_.get_executor().dispatch(std::move(handler_), a);
+ * work_.reset(); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(ex, execution::allocator(alloc)).execute(std::move(f)); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.dispatch(std::move(f), alloc); @endcode
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
template <typename Executor,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch(
- const Executor& ex,
- ASIO_MOVE_ARG(CompletionToken) token
- ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<Executor>>
+inline auto dispatch(const Executor& ex,
+ NullaryToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<
execution::is_executor<Executor>::value || is_executor<Executor>::value
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_dispatch_with_executor<Executor>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_dispatch_with_executor<Executor>(ex), token);
+}
/// Submits a completion token or function object for execution.
/**
+ * @param ctx An execution context, from which the target executor is obtained.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
+ *
* @returns <tt>dispatch(ctx.get_executor(),
- * forward<CompletionToken>(token))</tt>.
+ * forward<NullaryToken>(token))</tt>.
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
template <typename ExecutionContext,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename ExecutionContext::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch(
- ExecutionContext& ctx,
- ASIO_MOVE_ARG(CompletionToken) token
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename ExecutionContext::executor_type),
- typename constraint<is_convertible<
- ExecutionContext&, execution_context&>::value>::type = 0);
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<typename ExecutionContext::executor_type>>
+inline auto dispatch(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_dispatch_with_executor<
+ typename ExecutionContext::executor_type>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_dispatch_with_executor<
+ typename ExecutionContext::executor_type>(
+ ctx.get_executor()), token);
+}
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#include "asio/impl/dispatch.hpp"
-
#endif // ASIO_DISPATCH_HPP
diff --git a/3rdparty/asio/include/asio/error.hpp b/3rdparty/asio/include/asio/error.hpp
index 8b4decd52d2..d676ee8aa7d 100644
--- a/3rdparty/asio/include/asio/error.hpp
+++ b/3rdparty/asio/include/asio/error.hpp
@@ -2,7 +2,7 @@
// error.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -223,6 +223,41 @@ enum misc_errors
fd_set_failure
};
+// boostify: non-boost code starts here
+#if !defined(ASIO_ERROR_LOCATION)
+# define ASIO_ERROR_LOCATION(e) (void)0
+#endif // !defined(ASIO_ERROR_LOCATION)
+
+// boostify: non-boost code ends here
+#if !defined(ASIO_ERROR_LOCATION) \
+ && !defined(ASIO_DISABLE_ERROR_LOCATION) \
+ && defined(ASIO_HAS_BOOST_CONFIG) \
+ && (BOOST_VERSION >= 107900)
+
+# define ASIO_ERROR_LOCATION(e) \
+ do { \
+ BOOST_STATIC_CONSTEXPR boost::source_location loc \
+ = BOOST_CURRENT_LOCATION; \
+ (e).assign((e), &loc); \
+ } while (false)
+
+#else // !defined(ASIO_ERROR_LOCATION)
+ // && !defined(ASIO_DISABLE_ERROR_LOCATION)
+ // && defined(ASIO_HAS_BOOST_CONFIG)
+ // && (BOOST_VERSION >= 107900)
+
+# define ASIO_ERROR_LOCATION(e) (void)0
+
+#endif // !defined(ASIO_ERROR_LOCATION)
+ // && !defined(ASIO_DISABLE_ERROR_LOCATION)
+ // && defined(ASIO_HAS_BOOST_CONFIG)
+ // && (BOOST_VERSION >= 107900)
+
+inline void clear(asio::error_code& ec)
+{
+ ec.assign(0, ec.category());
+}
+
inline const asio::error_category& get_system_category()
{
return asio::system_category();
@@ -269,7 +304,6 @@ static const asio::error_category&
} // namespace error
} // namespace asio
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
namespace std {
template<> struct is_error_code_enum<asio::error::basic_errors>
@@ -293,7 +327,6 @@ template<> struct is_error_code_enum<asio::error::misc_errors>
};
} // namespace std
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
namespace asio {
namespace error {
diff --git a/3rdparty/asio/include/asio/error_code.hpp b/3rdparty/asio/include/asio/error_code.hpp
index 4026b9ca58f..5cb07f48c42 100644
--- a/3rdparty/asio/include/asio/error_code.hpp
+++ b/3rdparty/asio/include/asio/error_code.hpp
@@ -2,7 +2,7 @@
// error_code.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,181 +16,18 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
-# include <system_error>
-#else // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-# include <string>
-# include "asio/detail/noncopyable.hpp"
-# if !defined(ASIO_NO_IOSTREAM)
-# include <iosfwd>
-# endif // !defined(ASIO_NO_IOSTREAM)
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
+#include <system_error>
#include "asio/detail/push_options.hpp"
namespace asio {
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
typedef std::error_category error_category;
-
-#else // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
-/// Base class for all error categories.
-class error_category : private noncopyable
-{
-public:
- /// Destructor.
- virtual ~error_category()
- {
- }
-
- /// Returns a string naming the error gategory.
- virtual const char* name() const = 0;
-
- /// Returns a string describing the error denoted by @c value.
- virtual std::string message(int value) const = 0;
-
- /// Equality operator to compare two error categories.
- bool operator==(const error_category& rhs) const
- {
- return this == &rhs;
- }
-
- /// Inequality operator to compare two error categories.
- bool operator!=(const error_category& rhs) const
- {
- return !(*this == rhs);
- }
-};
-
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
+typedef std::error_code error_code;
/// Returns the error category used for the system errors produced by asio.
extern ASIO_DECL const error_category& system_category();
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
-typedef std::error_code error_code;
-
-#else // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
-/// Class to represent an error code value.
-class error_code
-{
-public:
- /// Default constructor.
- error_code()
- : value_(0),
- category_(&system_category())
- {
- }
-
- /// Construct with specific error code and category.
- error_code(int v, const error_category& c)
- : value_(v),
- category_(&c)
- {
- }
-
- /// Construct from an error code enum.
- template <typename ErrorEnum>
- error_code(ErrorEnum e)
- {
- *this = make_error_code(e);
- }
-
- /// Clear the error value to the default.
- void clear()
- {
- value_ = 0;
- category_ = &system_category();
- }
-
- /// Assign a new error value.
- void assign(int v, const error_category& c)
- {
- value_ = v;
- category_ = &c;
- }
-
- /// Get the error value.
- int value() const
- {
- return value_;
- }
-
- /// Get the error category.
- const error_category& category() const
- {
- return *category_;
- }
-
- /// Get the message associated with the error.
- std::string message() const
- {
- return category_->message(value_);
- }
-
- struct unspecified_bool_type_t
- {
- };
-
- typedef void (*unspecified_bool_type)(unspecified_bool_type_t);
-
- static void unspecified_bool_true(unspecified_bool_type_t) {}
-
- /// Operator returns non-null if there is a non-success error code.
- operator unspecified_bool_type() const
- {
- if (value_ == 0)
- return 0;
- else
- return &error_code::unspecified_bool_true;
- }
-
- /// Operator to test if the error represents success.
- bool operator!() const
- {
- return value_ == 0;
- }
-
- /// Equality operator to compare two error objects.
- friend bool operator==(const error_code& e1, const error_code& e2)
- {
- return e1.value_ == e2.value_ && e1.category_ == e2.category_;
- }
-
- /// Inequality operator to compare two error objects.
- friend bool operator!=(const error_code& e1, const error_code& e2)
- {
- return e1.value_ != e2.value_ || e1.category_ != e2.category_;
- }
-
-private:
- // The value associated with the error code.
- int value_;
-
- // The category associated with the error code.
- const error_category* category_;
-};
-
-# if !defined(ASIO_NO_IOSTREAM)
-
-/// Output an error code.
-template <typename Elem, typename Traits>
-std::basic_ostream<Elem, Traits>& operator<<(
- std::basic_ostream<Elem, Traits>& os, const error_code& ec)
-{
- os << ec.category().name() << ':' << ec.value();
- return os;
-}
-
-# endif // !defined(ASIO_NO_IOSTREAM)
-
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/execution.hpp b/3rdparty/asio/include/asio/execution.hpp
index 861b25bb4b4..fa773259fad 100644
--- a/3rdparty/asio/include/asio/execution.hpp
+++ b/3rdparty/asio/include/asio/execution.hpp
@@ -2,7 +2,7 @@
// execution.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,29 +20,14 @@
#include "asio/execution/bad_executor.hpp"
#include "asio/execution/blocking.hpp"
#include "asio/execution/blocking_adaptation.hpp"
-#include "asio/execution/bulk_execute.hpp"
-#include "asio/execution/bulk_guarantee.hpp"
-#include "asio/execution/connect.hpp"
#include "asio/execution/context.hpp"
#include "asio/execution/context_as.hpp"
-#include "asio/execution/execute.hpp"
#include "asio/execution/executor.hpp"
#include "asio/execution/invocable_archetype.hpp"
#include "asio/execution/mapping.hpp"
#include "asio/execution/occupancy.hpp"
-#include "asio/execution/operation_state.hpp"
#include "asio/execution/outstanding_work.hpp"
#include "asio/execution/prefer_only.hpp"
-#include "asio/execution/receiver.hpp"
-#include "asio/execution/receiver_invocation_error.hpp"
#include "asio/execution/relationship.hpp"
-#include "asio/execution/schedule.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
-#include "asio/execution/set_done.hpp"
-#include "asio/execution/set_error.hpp"
-#include "asio/execution/set_value.hpp"
-#include "asio/execution/start.hpp"
-#include "asio/execution/submit.hpp"
#endif // ASIO_EXECUTION_HPP
diff --git a/3rdparty/asio/include/asio/execution/allocator.hpp b/3rdparty/asio/include/asio/execution/allocator.hpp
index ea4d56c381a..cdb6a4a9203 100644
--- a/3rdparty/asio/include/asio/execution/allocator.hpp
+++ b/3rdparty/asio/include/asio/execution/allocator.hpp
@@ -2,7 +2,7 @@
// execution/allocator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,8 +18,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution/executor.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
#include "asio/is_applicable_property.hpp"
#include "asio/traits/query_static_constexpr_member.hpp"
#include "asio/traits/static_query.hpp"
@@ -37,10 +35,9 @@ namespace execution {
template <typename ProtoAllocator>
struct allocator_t
{
- /// The allocator_t property applies to executors, senders, and schedulers.
+ /// The allocator_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The allocator_t property can be required.
static constexpr bool is_requirable = true;
@@ -79,23 +76,11 @@ struct allocator_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
template <typename T>
struct static_proxy
@@ -104,17 +89,17 @@ struct allocator_t
struct type
{
template <typename P>
- static constexpr auto query(ASIO_MOVE_ARG(P) p)
+ static constexpr auto query(P&& p)
noexcept(
noexcept(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
)
-> decltype(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
{
- return T::query(ASIO_MOVE_CAST(P)(p));
+ return T::query(static_cast<P&&>(p));
}
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
@@ -130,22 +115,19 @@ struct allocator_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
+ static constexpr typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename E, typename T = decltype(allocator_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = allocator_t::static_query<E>();
+ static constexpr const T static_query_v = allocator_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- ASIO_CONSTEXPR ProtoAllocator value() const
+ constexpr ProtoAllocator value() const
{
return a_;
}
@@ -153,7 +135,7 @@ struct allocator_t
private:
friend struct allocator_t<void>;
- explicit ASIO_CONSTEXPR allocator_t(const ProtoAllocator& a)
+ explicit constexpr allocator_t(const ProtoAllocator& a)
: a_(a)
{
}
@@ -173,25 +155,13 @@ struct allocator_t<void>
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
- ASIO_CONSTEXPR allocator_t()
+ constexpr allocator_t()
{
}
@@ -202,17 +172,17 @@ struct allocator_t<void>
struct type
{
template <typename P>
- static constexpr auto query(ASIO_MOVE_ARG(P) p)
+ static constexpr auto query(P&& p)
noexcept(
noexcept(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
)
-> decltype(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
{
- return T::query(ASIO_MOVE_CAST(P)(p));
+ return T::query(static_cast<P&&>(p));
}
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
@@ -228,23 +198,20 @@ struct allocator_t<void>
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
+ static constexpr typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename E, typename T = decltype(allocator_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = allocator_t::static_query<E>();
+ static constexpr const T static_query_v = allocator_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename OtherProtoAllocator>
- ASIO_CONSTEXPR allocator_t<OtherProtoAllocator> operator()(
+ constexpr allocator_t<OtherProtoAllocator> operator()(
const OtherProtoAllocator& a) const
{
return allocator_t<OtherProtoAllocator>(a);
@@ -258,41 +225,15 @@ const T allocator_t<void>::static_query_v;
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr allocator_t<void> allocator;
-#else // defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-template <typename T>
-struct allocator_instance
-{
- static allocator_t<T> instance;
-};
-
-template <typename T>
-allocator_t<T> allocator_instance<T>::instance;
-
-namespace {
-static const allocator_t<void>& allocator = allocator_instance<void>::instance;
-} // namespace
-#endif
} // namespace execution
#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T, typename ProtoAllocator>
-struct is_applicable_property<T, execution::allocator_t<ProtoAllocator> >
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+struct is_applicable_property<T, execution::allocator_t<ProtoAllocator>>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
@@ -305,18 +246,18 @@ namespace traits {
template <typename T, typename ProtoAllocator>
struct static_query<T, execution::allocator_t<ProtoAllocator>,
- typename enable_if<
+ enable_if_t<
execution::allocator_t<ProtoAllocator>::template
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::allocator_t<ProtoAllocator>::template
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::allocator_t<ProtoAllocator>::template
query_static_constexpr_member<T>::value();
diff --git a/3rdparty/asio/include/asio/execution/any_executor.hpp b/3rdparty/asio/include/asio/execution/any_executor.hpp
index b5f5233fdfb..a057543b139 100644
--- a/3rdparty/asio/include/asio/execution/any_executor.hpp
+++ b/3rdparty/asio/include/asio/execution/any_executor.hpp
@@ -2,7 +2,7 @@
// execution/any_executor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,6 +19,7 @@
#include <new>
#include <typeinfo>
#include "asio/detail/assert.hpp"
+#include "asio/detail/atomic_count.hpp"
#include "asio/detail/cstddef.hpp"
#include "asio/detail/executor_function.hpp"
#include "asio/detail/memory.hpp"
@@ -26,10 +27,8 @@
#include "asio/detail/scoped_ptr.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/detail/throw_exception.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/execution/bad_executor.hpp"
#include "asio/execution/blocking.hpp"
-#include "asio/execution/execute.hpp"
#include "asio/execution/executor.hpp"
#include "asio/prefer.hpp"
#include "asio/query.hpp"
@@ -64,10 +63,25 @@ public:
template <class... OtherSupportableProperties>
any_executor(any_executor<OtherSupportableProperties...> e);
+ /// Construct to point to the same target as another any_executor.
+ template <class... OtherSupportableProperties>
+ any_executor(std::nothrow_t,
+ any_executor<OtherSupportableProperties...> e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+ any_executor(std::nothrow_t, const any_executor& e) noexcept;
+
+ /// Construct to point to the same target as another any_executor.
+ any_executor(std::nothrow_t, any_executor&& e) noexcept;
+
/// Construct a polymorphic wrapper for the specified executor.
template <typename Executor>
any_executor(Executor e);
+ /// Construct a polymorphic wrapper for the specified executor.
+ template <typename Executor>
+ any_executor(std::nothrow_t, Executor e) noexcept;
+
/// Assignment operator.
any_executor& operator=(const any_executor& e) noexcept;
@@ -126,13 +140,6 @@ public:
/// Execute the function on the target executor.
/**
- * Do not call this function directly. It is intended for use with the
- * execution::execute customisation point.
- *
- * For example:
- * @code execution::any_executor<> ex = ...;
- * execution::execute(ex, my_function_object); @endcode
- *
* Throws asio::bad_executor if the polymorphic wrapper has no target.
*/
template <typename Function>
@@ -220,20 +227,9 @@ namespace execution {
#if !defined(ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL)
#define ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... SupportableProperties>
class any_executor;
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename = void, typename = void, typename = void,
- typename = void, typename = void, typename = void,
- typename = void, typename = void, typename = void>
-class any_executor;
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#endif // !defined(ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL)
template <typename U>
@@ -249,15 +245,13 @@ template <typename T, typename = void>
struct is_requirable : false_type {};
template <typename T>
-struct is_requirable<T, typename enable_if<T::is_requirable>::type> :
- true_type {};
+struct is_requirable<T, enable_if_t<T::is_requirable>> : true_type {};
template <typename T, typename = void>
struct is_preferable : false_type {};
template <typename T>
-struct is_preferable<T, typename enable_if<T::is_preferable>::type> :
- true_type {};
+struct is_preferable<T, enable_if_t<T::is_preferable>> : true_type {};
// Trait used to detect context_as property, for backward compatibility.
@@ -265,7 +259,7 @@ template <typename T>
struct is_context_as : false_type {};
template <typename U>
-struct is_context_as<context_as_t<U> > : true_type {};
+struct is_context_as<context_as_t<U>> : true_type {};
// Helper template to:
// - Check if a target can supply the supportable properties.
@@ -302,53 +296,51 @@ struct supportable_properties<I, void(Prop)>
struct found
{
- ASIO_STATIC_CONSTEXPR(bool, value = true);
+ static constexpr bool value = true;
typedef Prop type;
typedef typename Prop::polymorphic_query_result_type query_result_type;
- ASIO_STATIC_CONSTEXPR(std::size_t, index = I);
+ static constexpr std::size_t index = I;
};
struct not_found
{
- ASIO_STATIC_CONSTEXPR(bool, value = false);
+ static constexpr bool value = false;
};
template <typename T>
struct find_convertible_property :
- conditional<
+ conditional_t<
is_same<T, Prop>::value || is_convertible<T, Prop>::value,
found,
not_found
- >::type {};
+ > {};
template <typename T>
struct find_convertible_requirable_property :
- conditional<
+ conditional_t<
is_requirable<Prop>::value
&& (is_same<T, Prop>::value || is_convertible<T, Prop>::value),
found,
not_found
- >::type {};
+ > {};
template <typename T>
struct find_convertible_preferable_property :
- conditional<
+ conditional_t<
is_preferable<Prop>::value
&& (is_same<T, Prop>::value || is_convertible<T, Prop>::value),
found,
not_found
- >::type {};
+ > {};
struct find_context_as_property :
- conditional<
+ conditional_t<
is_context_as<Prop>::value,
found,
not_found
- >::type {};
+ > {};
};
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <std::size_t I, typename Head, typename... Tail>
struct supportable_properties<I, void(Head, Tail...)>
{
@@ -367,127 +359,136 @@ struct supportable_properties<I, void(Head, Tail...)>
template <typename T>
struct find_convertible_property :
- conditional<
+ conditional_t<
is_convertible<T, Head>::value,
typename supportable_properties<I, void(Head)>::found,
typename supportable_properties<I + 1,
void(Tail...)>::template find_convertible_property<T>
- >::type {};
+ > {};
template <typename T>
struct find_convertible_requirable_property :
- conditional<
+ conditional_t<
is_requirable<Head>::value
&& is_convertible<T, Head>::value,
typename supportable_properties<I, void(Head)>::found,
typename supportable_properties<I + 1,
void(Tail...)>::template find_convertible_requirable_property<T>
- >::type {};
+ > {};
template <typename T>
struct find_convertible_preferable_property :
- conditional<
+ conditional_t<
is_preferable<Head>::value
&& is_convertible<T, Head>::value,
typename supportable_properties<I, void(Head)>::found,
typename supportable_properties<I + 1,
void(Tail...)>::template find_convertible_preferable_property<T>
- >::type {};
+ > {};
struct find_context_as_property :
- conditional<
+ conditional_t<
is_context_as<Head>::value,
typename supportable_properties<I, void(Head)>::found,
typename supportable_properties<I + 1,
void(Tail...)>::find_context_as_property
- >::type {};
+ > {};
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_ANY_EXECUTOR_PROPS_BASE_DEF(n) \
- template <std::size_t I, \
- typename Head, ASIO_VARIADIC_TPARAMS(n)> \
- struct supportable_properties<I, \
- void(Head, ASIO_VARIADIC_TARGS(n))> \
- { \
- template <typename T> \
- struct is_valid_target : integral_constant<bool, \
- ( \
- supportable_properties<I, \
- void(Head)>::template is_valid_target<T>::value \
- && \
- supportable_properties<I + 1, \
- void(ASIO_VARIADIC_TARGS(n))>::template \
- is_valid_target<T>::value \
- ) \
- > \
- { \
- }; \
- \
- template <typename T> \
- struct find_convertible_property : \
- conditional< \
- is_convertible<T, Head>::value, \
- typename supportable_properties<I, void(Head)>::found, \
- typename supportable_properties<I + 1, \
- void(ASIO_VARIADIC_TARGS(n))>::template \
- find_convertible_property<T> \
- >::type {}; \
- \
- template <typename T> \
- struct find_convertible_requirable_property : \
- conditional< \
- is_requirable<Head>::value \
- && is_convertible<T, Head>::value, \
- typename supportable_properties<I, void(Head)>::found, \
- typename supportable_properties<I + 1, \
- void(ASIO_VARIADIC_TARGS(n))>::template \
- find_convertible_requirable_property<T> \
- >::type {}; \
- \
- template <typename T> \
- struct find_convertible_preferable_property : \
- conditional< \
- is_preferable<Head>::value \
- && is_convertible<T, Head>::value, \
- typename supportable_properties<I, void(Head)>::found, \
- typename supportable_properties<I + 1, \
- void(ASIO_VARIADIC_TARGS(n))>::template \
- find_convertible_preferable_property<T> \
- >::type {}; \
- \
- struct find_context_as_property : \
- conditional< \
- is_context_as<Head>::value, \
- typename supportable_properties<I, void(Head)>::found, \
- typename supportable_properties<I + 1, void( \
- ASIO_VARIADIC_TARGS(n))>::find_context_as_property \
- >::type {}; \
- }; \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ANY_EXECUTOR_PROPS_BASE_DEF)
-#undef ASIO_PRIVATE_ANY_EXECUTOR_PROPS_BASE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename T, typename Props>
struct is_valid_target_executor :
- conditional<
+ conditional_t<
is_executor<T>::value,
typename supportable_properties<0, Props>::template is_valid_target<T>,
false_type
- >::type
+ >
+{
+};
+
+template <typename Props>
+struct is_valid_target_executor<int, Props> : false_type
+{
+};
+
+class shared_target_executor
{
+public:
+ template <typename E>
+ shared_target_executor(E&& e, decay_t<E>*& target)
+ {
+ impl<decay_t<E>>* i =
+ new impl<decay_t<E>>(static_cast<E&&>(e));
+ target = &i->ex_;
+ impl_ = i;
+ }
+
+ template <typename E>
+ shared_target_executor(std::nothrow_t, E&& e, decay_t<E>*& target) noexcept
+ {
+ impl<decay_t<E>>* i =
+ new (std::nothrow) impl<decay_t<E>>(static_cast<E&&>(e));
+ target = i ? &i->ex_ : 0;
+ impl_ = i;
+ }
+
+ shared_target_executor(const shared_target_executor& other) noexcept
+ : impl_(other.impl_)
+ {
+ if (impl_)
+ asio::detail::ref_count_up(impl_->ref_count_);
+ }
+
+ shared_target_executor(shared_target_executor&& other) noexcept
+ : impl_(other.impl_)
+ {
+ other.impl_ = 0;
+ }
+
+ ~shared_target_executor()
+ {
+ if (impl_)
+ if (asio::detail::ref_count_down(impl_->ref_count_))
+ delete impl_;
+ }
+
+ void* get() const noexcept
+ {
+ return impl_ ? impl_->get() : 0;
+ }
+
+private:
+ shared_target_executor& operator=(
+ const shared_target_executor& other) = delete;
+
+ shared_target_executor& operator=(
+ shared_target_executor&& other) = delete;
+
+ struct impl_base
+ {
+ impl_base() : ref_count_(1) {}
+ virtual ~impl_base() {}
+ virtual void* get() = 0;
+ asio::detail::atomic_count ref_count_;
+ };
+
+ template <typename Executor>
+ struct impl : impl_base
+ {
+ impl(Executor ex) : ex_(static_cast<Executor&&>(ex)) {}
+ virtual void* get() { return &ex_; }
+ Executor ex_;
+ };
+
+ impl_base* impl_;
};
class any_executor_base
{
public:
- any_executor_base() ASIO_NOEXCEPT
- : object_fns_(object_fns_table<void>()),
+ any_executor_base() noexcept
+ : object_fns_(0),
target_(0),
- target_fns_(target_fns_table<void>())
+ target_fns_(0)
{
}
@@ -506,144 +507,231 @@ public:
}
template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_executor_base(std::nothrow_t, Executor ex, false_type) noexcept
+ : target_fns_(target_fns_table<Executor>(
+ any_executor_base::query_blocking(ex,
+ can_query<const Executor&, const execution::blocking_t&>())
+ == execution::blocking.always))
+ {
+ any_executor_base::construct_object(std::nothrow, ex,
+ integral_constant<bool,
+ sizeof(Executor) <= sizeof(object_type)
+ && alignment_of<Executor>::value <= alignment_of<object_type>::value
+ >());
+ if (target_ == 0)
+ {
+ object_fns_ = 0;
+ target_fns_ = 0;
+ }
+ }
+
+ template <ASIO_EXECUTION_EXECUTOR Executor>
any_executor_base(Executor other, true_type)
- : object_fns_(object_fns_table<asio::detail::shared_ptr<void> >()),
+ : object_fns_(object_fns_table<shared_target_executor>()),
target_fns_(other.target_fns_)
{
- asio::detail::shared_ptr<Executor> p =
- asio::detail::make_shared<Executor>(
- ASIO_MOVE_CAST(Executor)(other));
+ Executor* p = 0;
+ new (&object_) shared_target_executor(
+ static_cast<Executor&&>(other), p);
target_ = p->template target<void>();
- new (&object_) asio::detail::shared_ptr<void>(
- ASIO_MOVE_CAST(asio::detail::shared_ptr<Executor>)(p));
}
- any_executor_base(const any_executor_base& other) ASIO_NOEXCEPT
- : object_fns_(other.object_fns_),
+ template <ASIO_EXECUTION_EXECUTOR Executor>
+ any_executor_base(std::nothrow_t,
+ Executor other, true_type) noexcept
+ : object_fns_(object_fns_table<shared_target_executor>()),
target_fns_(other.target_fns_)
{
- object_fns_->copy(*this, other);
+ Executor* p = 0;
+ new (&object_) shared_target_executor(
+ std::nothrow, static_cast<Executor&&>(other), p);
+ if (p)
+ target_ = p->template target<void>();
+ else
+ {
+ target_ = 0;
+ object_fns_ = 0;
+ target_fns_ = 0;
+ }
}
- ~any_executor_base() ASIO_NOEXCEPT
+ any_executor_base(const any_executor_base& other) noexcept
{
- object_fns_->destroy(*this);
+ if (!!other)
+ {
+ object_fns_ = other.object_fns_;
+ target_fns_ = other.target_fns_;
+ object_fns_->copy(*this, other);
+ }
+ else
+ {
+ object_fns_ = 0;
+ target_ = 0;
+ target_fns_ = 0;
+ }
+ }
+
+ ~any_executor_base() noexcept
+ {
+ if (!!*this)
+ object_fns_->destroy(*this);
}
any_executor_base& operator=(
- const any_executor_base& other) ASIO_NOEXCEPT
+ const any_executor_base& other) noexcept
{
if (this != &other)
{
- object_fns_->destroy(*this);
- object_fns_ = other.object_fns_;
- target_fns_ = other.target_fns_;
- object_fns_->copy(*this, other);
+ if (!!*this)
+ object_fns_->destroy(*this);
+ if (!!other)
+ {
+ object_fns_ = other.object_fns_;
+ target_fns_ = other.target_fns_;
+ object_fns_->copy(*this, other);
+ }
+ else
+ {
+ object_fns_ = 0;
+ target_ = 0;
+ target_fns_ = 0;
+ }
}
return *this;
}
- any_executor_base& operator=(nullptr_t) ASIO_NOEXCEPT
+ any_executor_base& operator=(nullptr_t) noexcept
{
- object_fns_->destroy(*this);
+ if (target_)
+ object_fns_->destroy(*this);
target_ = 0;
- object_fns_ = object_fns_table<void>();
- target_fns_ = target_fns_table<void>();
+ object_fns_ = 0;
+ target_fns_ = 0;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
-
- any_executor_base(any_executor_base&& other) ASIO_NOEXCEPT
- : object_fns_(other.object_fns_),
- target_fns_(other.target_fns_)
+ any_executor_base(any_executor_base&& other) noexcept
{
- other.object_fns_ = object_fns_table<void>();
- other.target_fns_ = target_fns_table<void>();
- object_fns_->move(*this, other);
- other.target_ = 0;
+ if (other.target_)
+ {
+ object_fns_ = other.object_fns_;
+ target_fns_ = other.target_fns_;
+ other.object_fns_ = 0;
+ other.target_fns_ = 0;
+ object_fns_->move(*this, other);
+ other.target_ = 0;
+ }
+ else
+ {
+ object_fns_ = 0;
+ target_ = 0;
+ target_fns_ = 0;
+ }
}
any_executor_base& operator=(
- any_executor_base&& other) ASIO_NOEXCEPT
+ any_executor_base&& other) noexcept
{
if (this != &other)
{
- object_fns_->destroy(*this);
- object_fns_ = other.object_fns_;
- other.object_fns_ = object_fns_table<void>();
- target_fns_ = other.target_fns_;
- other.target_fns_ = target_fns_table<void>();
- object_fns_->move(*this, other);
- other.target_ = 0;
+ if (!!*this)
+ object_fns_->destroy(*this);
+ if (!!other)
+ {
+ object_fns_ = other.object_fns_;
+ target_fns_ = other.target_fns_;
+ other.object_fns_ = 0;
+ other.target_fns_ = 0;
+ object_fns_->move(*this, other);
+ other.target_ = 0;
+ }
+ else
+ {
+ object_fns_ = 0;
+ target_ = 0;
+ target_fns_ = 0;
+ }
}
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
-
- void swap(any_executor_base& other) ASIO_NOEXCEPT
+ void swap(any_executor_base& other) noexcept
{
if (this != &other)
{
- any_executor_base tmp(ASIO_MOVE_CAST(any_executor_base)(other));
- other = ASIO_MOVE_CAST(any_executor_base)(*this);
- *this = ASIO_MOVE_CAST(any_executor_base)(tmp);
+ any_executor_base tmp(static_cast<any_executor_base&&>(other));
+ other = static_cast<any_executor_base&&>(*this);
+ *this = static_cast<any_executor_base&&>(tmp);
}
}
template <typename F>
- void execute(ASIO_MOVE_ARG(F) f) const
+ void execute(F&& f) const
{
- if (target_fns_->blocking_execute != 0)
+ if (target_)
{
- asio::detail::non_const_lvalue<F> f2(f);
- target_fns_->blocking_execute(*this, function_view(f2.value));
+ if (target_fns_->blocking_execute != 0)
+ {
+ asio::detail::non_const_lvalue<F> f2(f);
+ target_fns_->blocking_execute(*this, function_view(f2.value));
+ }
+ else
+ {
+ target_fns_->execute(*this,
+ function(static_cast<F&&>(f), std::allocator<void>()));
+ }
}
else
{
- target_fns_->execute(*this,
- function(ASIO_MOVE_CAST(F)(f), std::allocator<void>()));
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
}
}
template <typename Executor>
Executor* target()
{
- return static_cast<Executor*>(target_);
+ return target_ && (is_same<Executor, void>::value
+ || target_fns_->target_type() == target_type_ex<Executor>())
+ ? static_cast<Executor*>(target_) : 0;
}
template <typename Executor>
const Executor* target() const
{
- return static_cast<Executor*>(target_);
+ return target_ && (is_same<Executor, void>::value
+ || target_fns_->target_type() == target_type_ex<Executor>())
+ ? static_cast<const Executor*>(target_) : 0;
}
#if !defined(ASIO_NO_TYPEID)
const std::type_info& target_type() const
+ {
+ return target_ ? target_fns_->target_type() : typeid(void);
+ }
#else // !defined(ASIO_NO_TYPEID)
const void* target_type() const
-#endif // !defined(ASIO_NO_TYPEID)
{
- return target_fns_->target_type();
+ return target_ ? target_fns_->target_type() : 0;
}
+#endif // !defined(ASIO_NO_TYPEID)
struct unspecified_bool_type_t {};
typedef void (*unspecified_bool_type)(unspecified_bool_type_t);
static void unspecified_bool_true(unspecified_bool_type_t) {}
- operator unspecified_bool_type() const ASIO_NOEXCEPT
+ operator unspecified_bool_type() const noexcept
{
return target_ ? &any_executor_base::unspecified_bool_true : 0;
}
- bool operator!() const ASIO_NOEXCEPT
+ bool operator!() const noexcept
{
return target_ == 0;
}
protected:
- bool equality_helper(const any_executor_base& other) const ASIO_NOEXCEPT
+ bool equality_helper(const any_executor_base& other) const noexcept
{
if (target_ == other.target_)
return true;
@@ -676,73 +764,38 @@ protected:
const void* (*target)(const any_executor_base&);
};
- static void destroy_void(any_executor_base&)
- {
- }
-
- static void copy_void(any_executor_base& ex1, const any_executor_base&)
- {
- ex1.target_ = 0;
- }
-
- static void move_void(any_executor_base& ex1, any_executor_base&)
- {
- ex1.target_ = 0;
- }
-
- static const void* target_void(const any_executor_base&)
- {
- return 0;
- }
-
- template <typename Obj>
- static const object_fns* object_fns_table(
- typename enable_if<
- is_same<Obj, void>::value
- >::type* = 0)
- {
- static const object_fns fns =
- {
- &any_executor_base::destroy_void,
- &any_executor_base::copy_void,
- &any_executor_base::move_void,
- &any_executor_base::target_void
- };
- return &fns;
- }
-
static void destroy_shared(any_executor_base& ex)
{
- typedef asio::detail::shared_ptr<void> type;
+ typedef shared_target_executor type;
ex.object<type>().~type();
}
static void copy_shared(any_executor_base& ex1, const any_executor_base& ex2)
{
- typedef asio::detail::shared_ptr<void> type;
+ typedef shared_target_executor type;
new (&ex1.object_) type(ex2.object<type>());
ex1.target_ = ex2.target_;
}
static void move_shared(any_executor_base& ex1, any_executor_base& ex2)
{
- typedef asio::detail::shared_ptr<void> type;
- new (&ex1.object_) type(ASIO_MOVE_CAST(type)(ex2.object<type>()));
+ typedef shared_target_executor type;
+ new (&ex1.object_) type(static_cast<type&&>(ex2.object<type>()));
ex1.target_ = ex2.target_;
ex2.object<type>().~type();
}
static const void* target_shared(const any_executor_base& ex)
{
- typedef asio::detail::shared_ptr<void> type;
+ typedef shared_target_executor type;
return ex.object<type>().get();
}
template <typename Obj>
static const object_fns* object_fns_table(
- typename enable_if<
- is_same<Obj, asio::detail::shared_ptr<void> >::value
- >::type* = 0)
+ enable_if_t<
+ is_same<Obj, shared_target_executor>::value
+ >* = 0)
{
static const object_fns fns =
{
@@ -770,7 +823,7 @@ protected:
template <typename Obj>
static void move_object(any_executor_base& ex1, any_executor_base& ex2)
{
- new (&ex1.object_) Obj(ASIO_MOVE_CAST(Obj)(ex2.object<Obj>()));
+ new (&ex1.object_) Obj(static_cast<Obj&&>(ex2.object<Obj>()));
ex1.target_ = &ex1.object<Obj>();
ex2.object<Obj>().~Obj();
}
@@ -783,10 +836,10 @@ protected:
template <typename Obj>
static const object_fns* object_fns_table(
- typename enable_if<
+ enable_if_t<
!is_same<Obj, void>::value
- && !is_same<Obj, asio::detail::shared_ptr<void> >::value
- >::type* = 0)
+ && !is_same<Obj, shared_target_executor>::value
+ >* = 0)
{
static const object_fns fns =
{
@@ -809,57 +862,11 @@ protected:
const void* (*target_type)();
#endif // !defined(ASIO_NO_TYPEID)
bool (*equal)(const any_executor_base&, const any_executor_base&);
- void (*execute)(const any_executor_base&, ASIO_MOVE_ARG(function));
+ void (*execute)(const any_executor_base&, function&&);
void (*blocking_execute)(const any_executor_base&, function_view);
};
#if !defined(ASIO_NO_TYPEID)
- static const std::type_info& target_type_void()
- {
- return typeid(void);
- }
-#else // !defined(ASIO_NO_TYPEID)
- static const void* target_type_void()
- {
- return 0;
- }
-#endif // !defined(ASIO_NO_TYPEID)
-
- static bool equal_void(const any_executor_base&, const any_executor_base&)
- {
- return true;
- }
-
- static void execute_void(const any_executor_base&,
- ASIO_MOVE_ARG(function))
- {
- bad_executor ex;
- asio::detail::throw_exception(ex);
- }
-
- static void blocking_execute_void(const any_executor_base&, function_view)
- {
- bad_executor ex;
- asio::detail::throw_exception(ex);
- }
-
- template <typename Ex>
- static const target_fns* target_fns_table(
- typename enable_if<
- is_same<Ex, void>::value
- >::type* = 0)
- {
- static const target_fns fns =
- {
- &any_executor_base::target_type_void,
- &any_executor_base::equal_void,
- &any_executor_base::execute_void,
- &any_executor_base::blocking_execute_void
- };
- return &fns;
- }
-
-#if !defined(ASIO_NO_TYPEID)
template <typename Ex>
static const std::type_info& target_type_ex()
{
@@ -878,27 +885,33 @@ protected:
static bool equal_ex(const any_executor_base& ex1,
const any_executor_base& ex2)
{
- return *ex1.target<Ex>() == *ex2.target<Ex>();
+ const Ex* p1 = ex1.target<Ex>();
+ const Ex* p2 = ex2.target<Ex>();
+ ASIO_ASSUME(p1 != 0 && p2 != 0);
+ return *p1 == *p2;
}
template <typename Ex>
- static void execute_ex(const any_executor_base& ex,
- ASIO_MOVE_ARG(function) f)
+ static void execute_ex(const any_executor_base& ex, function&& f)
{
- execution::execute(*ex.target<Ex>(), ASIO_MOVE_CAST(function)(f));
+ const Ex* p = ex.target<Ex>();
+ ASIO_ASSUME(p != 0);
+ p->execute(static_cast<function&&>(f));
}
template <typename Ex>
static void blocking_execute_ex(const any_executor_base& ex, function_view f)
{
- execution::execute(*ex.target<Ex>(), f);
+ const Ex* p = ex.target<Ex>();
+ ASIO_ASSUME(p != 0);
+ p->execute(f);
}
template <typename Ex>
static const target_fns* target_fns_table(bool is_always_blocking,
- typename enable_if<
+ enable_if_t<
!is_same<Ex, void>::value
- >::type* = 0)
+ >* = 0)
{
static const target_fns fns_with_execute =
{
@@ -932,10 +945,10 @@ protected:
template <typename Ex, class Prop>
static void query_fn_non_void(void*, const void* ex, const void* prop,
- typename enable_if<
+ enable_if_t<
asio::can_query<const Ex&, const Prop&>::value
&& is_same<typename Prop::polymorphic_query_result_type, void>::value
- >::type*)
+ >*)
{
asio::query(*static_cast<const Ex*>(ex),
*static_cast<const Prop*>(prop));
@@ -943,23 +956,23 @@ protected:
template <typename Ex, class Prop>
static void query_fn_non_void(void*, const void*, const void*,
- typename enable_if<
+ enable_if_t<
!asio::can_query<const Ex&, const Prop&>::value
&& is_same<typename Prop::polymorphic_query_result_type, void>::value
- >::type*)
+ >*)
{
}
template <typename Ex, class Prop>
static void query_fn_non_void(void* result, const void* ex, const void* prop,
- typename enable_if<
+ enable_if_t<
asio::can_query<const Ex&, const Prop&>::value
&& !is_same<typename Prop::polymorphic_query_result_type, void>::value
&& is_reference<typename Prop::polymorphic_query_result_type>::value
- >::type*)
+ >*)
{
- *static_cast<typename remove_reference<
- typename Prop::polymorphic_query_result_type>::type**>(result)
+ *static_cast<remove_reference_t<
+ typename Prop::polymorphic_query_result_type>**>(result)
= &static_cast<typename Prop::polymorphic_query_result_type>(
asio::query(*static_cast<const Ex*>(ex),
*static_cast<const Prop*>(prop)));
@@ -967,22 +980,22 @@ protected:
template <typename Ex, class Prop>
static void query_fn_non_void(void*, const void*, const void*,
- typename enable_if<
+ enable_if_t<
!asio::can_query<const Ex&, const Prop&>::value
&& !is_same<typename Prop::polymorphic_query_result_type, void>::value
&& is_reference<typename Prop::polymorphic_query_result_type>::value
- >::type*)
+ >*)
{
std::terminate(); // Combination should not be possible.
}
template <typename Ex, class Prop>
static void query_fn_non_void(void* result, const void* ex, const void* prop,
- typename enable_if<
+ enable_if_t<
asio::can_query<const Ex&, const Prop&>::value
&& !is_same<typename Prop::polymorphic_query_result_type, void>::value
&& is_scalar<typename Prop::polymorphic_query_result_type>::value
- >::type*)
+ >*)
{
*static_cast<typename Prop::polymorphic_query_result_type*>(result)
= static_cast<typename Prop::polymorphic_query_result_type>(
@@ -992,11 +1005,11 @@ protected:
template <typename Ex, class Prop>
static void query_fn_non_void(void* result, const void*, const void*,
- typename enable_if<
+ enable_if_t<
!asio::can_query<const Ex&, const Prop&>::value
&& !is_same<typename Prop::polymorphic_query_result_type, void>::value
&& is_scalar<typename Prop::polymorphic_query_result_type>::value
- >::type*)
+ >*)
{
*static_cast<typename Prop::polymorphic_query_result_type*>(result)
= typename Prop::polymorphic_query_result_type();
@@ -1004,12 +1017,12 @@ protected:
template <typename Ex, class Prop>
static void query_fn_non_void(void* result, const void* ex, const void* prop,
- typename enable_if<
+ enable_if_t<
asio::can_query<const Ex&, const Prop&>::value
&& !is_same<typename Prop::polymorphic_query_result_type, void>::value
&& !is_reference<typename Prop::polymorphic_query_result_type>::value
&& !is_scalar<typename Prop::polymorphic_query_result_type>::value
- >::type*)
+ >*)
{
*static_cast<typename Prop::polymorphic_query_result_type**>(result)
= new typename Prop::polymorphic_query_result_type(
@@ -1026,18 +1039,18 @@ protected:
template <typename Ex, class Prop>
static void query_fn_impl(void* result, const void* ex, const void* prop,
- typename enable_if<
+ enable_if_t<
is_same<Ex, void>::value
- >::type*)
+ >*)
{
query_fn_void(result, ex, prop);
}
template <typename Ex, class Prop>
static void query_fn_impl(void* result, const void* ex, const void* prop,
- typename enable_if<
+ enable_if_t<
!is_same<Ex, void>::value
- >::type*)
+ >*)
{
query_fn_non_void<Ex, Prop>(result, ex, prop, 0);
}
@@ -1050,9 +1063,9 @@ protected:
template <typename Poly, typename Ex, class Prop>
static Poly require_fn_impl(const void*, const void*,
- typename enable_if<
+ enable_if_t<
is_same<Ex, void>::value
- >::type*)
+ >*)
{
bad_executor ex;
asio::detail::throw_exception(ex);
@@ -1061,9 +1074,9 @@ protected:
template <typename Poly, typename Ex, class Prop>
static Poly require_fn_impl(const void* ex, const void* prop,
- typename enable_if<
+ enable_if_t<
!is_same<Ex, void>::value && Prop::is_requirable
- >::type*)
+ >*)
{
return asio::require(*static_cast<const Ex*>(ex),
*static_cast<const Prop*>(prop));
@@ -1083,9 +1096,9 @@ protected:
template <typename Poly, typename Ex, class Prop>
static Poly prefer_fn_impl(const void*, const void*,
- typename enable_if<
+ enable_if_t<
is_same<Ex, void>::value
- >::type*)
+ >*)
{
bad_executor ex;
asio::detail::throw_exception(ex);
@@ -1094,9 +1107,9 @@ protected:
template <typename Poly, typename Ex, class Prop>
static Poly prefer_fn_impl(const void* ex, const void* prop,
- typename enable_if<
+ enable_if_t<
!is_same<Ex, void>::value && Prop::is_preferable
- >::type*)
+ >*)
{
return asio::prefer(*static_cast<const Ex*>(ex),
*static_cast<const Prop*>(prop));
@@ -1143,27 +1156,44 @@ private:
void construct_object(Executor& ex, true_type)
{
object_fns_ = object_fns_table<Executor>();
- target_ = new (&object_) Executor(ASIO_MOVE_CAST(Executor)(ex));
+ target_ = new (&object_) Executor(static_cast<Executor&&>(ex));
}
template <typename Executor>
void construct_object(Executor& ex, false_type)
{
- object_fns_ = object_fns_table<asio::detail::shared_ptr<void> >();
- asio::detail::shared_ptr<Executor> p =
- asio::detail::make_shared<Executor>(
- ASIO_MOVE_CAST(Executor)(ex));
- target_ = p.get();
- new (&object_) asio::detail::shared_ptr<void>(
- ASIO_MOVE_CAST(asio::detail::shared_ptr<Executor>)(p));
+ object_fns_ = object_fns_table<shared_target_executor>();
+ Executor* p = 0;
+ new (&object_) shared_target_executor(
+ static_cast<Executor&&>(ex), p);
+ target_ = p;
+ }
+
+ template <typename Executor>
+ void construct_object(std::nothrow_t,
+ Executor& ex, true_type) noexcept
+ {
+ object_fns_ = object_fns_table<Executor>();
+ target_ = new (&object_) Executor(static_cast<Executor&&>(ex));
+ }
+
+ template <typename Executor>
+ void construct_object(std::nothrow_t,
+ Executor& ex, false_type) noexcept
+ {
+ object_fns_ = object_fns_table<shared_target_executor>();
+ Executor* p = 0;
+ new (&object_) shared_target_executor(
+ std::nothrow, static_cast<Executor&&>(ex), p);
+ target_ = p;
}
/*private:*/public:
// template <typename...> friend class any_executor;
typedef aligned_storage<
- sizeof(asio::detail::shared_ptr<void>),
- alignment_of<asio::detail::shared_ptr<void> >::value
+ sizeof(asio::detail::shared_ptr<void>) + sizeof(void*),
+ alignment_of<asio::detail::shared_ptr<void>>::value
>::type object_type;
object_type object_;
@@ -1180,8 +1210,7 @@ struct any_executor_context
#if !defined(ASIO_NO_TS_EXECUTORS)
template <typename Derived, typename Property>
-struct any_executor_context<Derived, Property,
- typename enable_if<Property::value>::type>
+struct any_executor_context<Derived, Property, enable_if_t<Property::value>>
{
typename Property::query_result_type context() const
{
@@ -1197,32 +1226,45 @@ template <>
class any_executor<> : public detail::any_executor_base
{
public:
- any_executor() ASIO_NOEXCEPT
+ any_executor() noexcept
: detail::any_executor_base()
{
}
- any_executor(nullptr_t) ASIO_NOEXCEPT
+ any_executor(nullptr_t) noexcept
: detail::any_executor_base()
{
}
template <typename Executor>
any_executor(Executor ex,
- typename enable_if<
- conditional<
+ enable_if_t<
+ conditional_t<
!is_same<Executor, any_executor>::value
&& !is_base_of<detail::any_executor_base, Executor>::value,
is_executor<Executor>,
false_type
- >::type::value
- >::type* = 0)
+ >::value
+ >* = 0)
: detail::any_executor_base(
- ASIO_MOVE_CAST(Executor)(ex), false_type())
+ static_cast<Executor&&>(ex), false_type())
{
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
+ template <typename Executor>
+ any_executor(std::nothrow_t, Executor ex,
+ enable_if_t<
+ conditional_t<
+ !is_same<Executor, any_executor>::value
+ && !is_base_of<detail::any_executor_base, Executor>::value,
+ is_executor<Executor>,
+ false_type
+ >::value
+ >* = 0) noexcept
+ : detail::any_executor_base(std::nothrow,
+ static_cast<Executor&&>(ex), false_type())
+ {
+ }
template <typename... OtherSupportableProperties>
any_executor(any_executor<OtherSupportableProperties...> other)
@@ -1231,25 +1273,27 @@ public:
{
}
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename U0, typename U1, typename U2, typename U3,
- typename U4, typename U5, typename U6, typename U7>
- any_executor(any_executor<U0, U1, U2, U3, U4, U5, U6, U7> other)
+ template <typename... OtherSupportableProperties>
+ any_executor(std::nothrow_t,
+ any_executor<OtherSupportableProperties...> other) noexcept
: detail::any_executor_base(
static_cast<const detail::any_executor_base&>(other))
{
}
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+ any_executor(const any_executor& other) noexcept
+ : detail::any_executor_base(
+ static_cast<const detail::any_executor_base&>(other))
+ {
+ }
- any_executor(const any_executor& other) ASIO_NOEXCEPT
+ any_executor(std::nothrow_t, const any_executor& other) noexcept
: detail::any_executor_base(
static_cast<const detail::any_executor_base&>(other))
{
}
- any_executor& operator=(const any_executor& other) ASIO_NOEXCEPT
+ any_executor& operator=(const any_executor& other) noexcept
{
if (this != &other)
{
@@ -1259,22 +1303,27 @@ public:
return *this;
}
- any_executor& operator=(nullptr_t p) ASIO_NOEXCEPT
+ any_executor& operator=(nullptr_t p) noexcept
{
detail::any_executor_base::operator=(p);
return *this;
}
-#if defined(ASIO_HAS_MOVE)
+ any_executor(any_executor&& other) noexcept
+ : detail::any_executor_base(
+ static_cast<any_executor_base&&>(
+ static_cast<any_executor_base&>(other)))
+ {
+ }
- any_executor(any_executor&& other) ASIO_NOEXCEPT
+ any_executor(std::nothrow_t, any_executor&& other) noexcept
: detail::any_executor_base(
static_cast<any_executor_base&&>(
static_cast<any_executor_base&>(other)))
{
}
- any_executor& operator=(any_executor&& other) ASIO_NOEXCEPT
+ any_executor& operator=(any_executor&& other) noexcept
{
if (this != &other)
{
@@ -1285,9 +1334,7 @@ public:
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
-
- void swap(any_executor& other) ASIO_NOEXCEPT
+ void swap(any_executor& other) noexcept
{
detail::any_executor_base::swap(
static_cast<detail::any_executor_base&>(other));
@@ -1299,77 +1346,75 @@ public:
using detail::any_executor_base::operator unspecified_bool_type;
using detail::any_executor_base::operator!;
- bool equality_helper(const any_executor& other) const ASIO_NOEXCEPT
+ bool equality_helper(const any_executor& other) const noexcept
{
return any_executor_base::equality_helper(other);
}
template <typename AnyExecutor1, typename AnyExecutor2>
- friend typename enable_if<
+ friend enable_if_t<
is_base_of<any_executor, AnyExecutor1>::value
|| is_base_of<any_executor, AnyExecutor2>::value,
bool
- >::type operator==(const AnyExecutor1& a,
- const AnyExecutor2& b) ASIO_NOEXCEPT
+ > operator==(const AnyExecutor1& a,
+ const AnyExecutor2& b) noexcept
{
return static_cast<const any_executor&>(a).equality_helper(b);
}
template <typename AnyExecutor>
- friend typename enable_if<
+ friend enable_if_t<
is_same<AnyExecutor, any_executor>::value,
bool
- >::type operator==(const AnyExecutor& a, nullptr_t) ASIO_NOEXCEPT
+ > operator==(const AnyExecutor& a, nullptr_t) noexcept
{
return !a;
}
template <typename AnyExecutor>
- friend typename enable_if<
+ friend enable_if_t<
is_same<AnyExecutor, any_executor>::value,
bool
- >::type operator==(nullptr_t, const AnyExecutor& b) ASIO_NOEXCEPT
+ > operator==(nullptr_t, const AnyExecutor& b) noexcept
{
return !b;
}
template <typename AnyExecutor1, typename AnyExecutor2>
- friend typename enable_if<
+ friend enable_if_t<
is_base_of<any_executor, AnyExecutor1>::value
|| is_base_of<any_executor, AnyExecutor2>::value,
bool
- >::type operator!=(const AnyExecutor1& a,
- const AnyExecutor2& b) ASIO_NOEXCEPT
+ > operator!=(const AnyExecutor1& a,
+ const AnyExecutor2& b) noexcept
{
return !static_cast<const any_executor&>(a).equality_helper(b);
}
template <typename AnyExecutor>
- friend typename enable_if<
+ friend enable_if_t<
is_same<AnyExecutor, any_executor>::value,
bool
- >::type operator!=(const AnyExecutor& a, nullptr_t) ASIO_NOEXCEPT
+ > operator!=(const AnyExecutor& a, nullptr_t) noexcept
{
return !!a;
}
template <typename AnyExecutor>
- friend typename enable_if<
+ friend enable_if_t<
is_same<AnyExecutor, any_executor>::value,
bool
- >::type operator!=(nullptr_t, const AnyExecutor& b) ASIO_NOEXCEPT
+ > operator!=(nullptr_t, const AnyExecutor& b) noexcept
{
return !!b;
}
};
-inline void swap(any_executor<>& a, any_executor<>& b) ASIO_NOEXCEPT
+inline void swap(any_executor<>& a, any_executor<>& b) noexcept
{
return a.swap(b);
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... SupportableProperties>
class any_executor :
public detail::any_executor_base,
@@ -1379,13 +1424,13 @@ class any_executor :
0, void(SupportableProperties...)>::find_context_as_property>
{
public:
- any_executor() ASIO_NOEXCEPT
+ any_executor() noexcept
: detail::any_executor_base(),
prop_fns_(prop_fns_table<void>())
{
}
- any_executor(nullptr_t) ASIO_NOEXCEPT
+ any_executor(nullptr_t) noexcept
: detail::any_executor_base(),
prop_fns_(prop_fns_table<void>())
{
@@ -1393,49 +1438,100 @@ public:
template <typename Executor>
any_executor(Executor ex,
- typename enable_if<
- conditional<
+ enable_if_t<
+ conditional_t<
!is_same<Executor, any_executor>::value
&& !is_base_of<detail::any_executor_base, Executor>::value,
detail::is_valid_target_executor<
Executor, void(SupportableProperties...)>,
false_type
- >::type::value
- >::type* = 0)
+ >::value
+ >* = 0)
: detail::any_executor_base(
- ASIO_MOVE_CAST(Executor)(ex), false_type()),
+ static_cast<Executor&&>(ex), false_type()),
prop_fns_(prop_fns_table<Executor>())
{
}
+ template <typename Executor>
+ any_executor(std::nothrow_t, Executor ex,
+ enable_if_t<
+ conditional_t<
+ !is_same<Executor, any_executor>::value
+ && !is_base_of<detail::any_executor_base, Executor>::value,
+ detail::is_valid_target_executor<
+ Executor, void(SupportableProperties...)>,
+ false_type
+ >::value
+ >* = 0) noexcept
+ : detail::any_executor_base(std::nothrow,
+ static_cast<Executor&&>(ex), false_type()),
+ prop_fns_(prop_fns_table<Executor>())
+ {
+ if (this->template target<void>() == 0)
+ prop_fns_ = prop_fns_table<void>();
+ }
+
template <typename... OtherSupportableProperties>
any_executor(any_executor<OtherSupportableProperties...> other,
- typename enable_if<
- conditional<
+ enable_if_t<
+ conditional_t<
!is_same<
any_executor<OtherSupportableProperties...>,
any_executor
>::value,
typename detail::supportable_properties<
0, void(SupportableProperties...)>::template is_valid_target<
- any_executor<OtherSupportableProperties...> >,
+ any_executor<OtherSupportableProperties...>>,
false_type
- >::type::value
- >::type* = 0)
- : detail::any_executor_base(ASIO_MOVE_CAST(
- any_executor<OtherSupportableProperties...>)(other), true_type()),
- prop_fns_(prop_fns_table<any_executor<OtherSupportableProperties...> >())
+ >::value
+ >* = 0)
+ : detail::any_executor_base(
+ static_cast<any_executor<OtherSupportableProperties...>&&>(other),
+ true_type()),
+ prop_fns_(prop_fns_table<any_executor<OtherSupportableProperties...>>())
{
}
- any_executor(const any_executor& other) ASIO_NOEXCEPT
+ template <typename... OtherSupportableProperties>
+ any_executor(std::nothrow_t,
+ any_executor<OtherSupportableProperties...> other,
+ enable_if_t<
+ conditional_t<
+ !is_same<
+ any_executor<OtherSupportableProperties...>,
+ any_executor
+ >::value,
+ typename detail::supportable_properties<
+ 0, void(SupportableProperties...)>::template is_valid_target<
+ any_executor<OtherSupportableProperties...>>,
+ false_type
+ >::value
+ >* = 0) noexcept
+ : detail::any_executor_base(std::nothrow,
+ static_cast<any_executor<OtherSupportableProperties...>&&>(other),
+ true_type()),
+ prop_fns_(prop_fns_table<any_executor<OtherSupportableProperties...>>())
+ {
+ if (this->template target<void>() == 0)
+ prop_fns_ = prop_fns_table<void>();
+ }
+
+ any_executor(const any_executor& other) noexcept
: detail::any_executor_base(
static_cast<const detail::any_executor_base&>(other)),
prop_fns_(other.prop_fns_)
{
}
- any_executor& operator=(const any_executor& other) ASIO_NOEXCEPT
+ any_executor(std::nothrow_t, const any_executor& other) noexcept
+ : detail::any_executor_base(
+ static_cast<const detail::any_executor_base&>(other)),
+ prop_fns_(other.prop_fns_)
+ {
+ }
+
+ any_executor& operator=(const any_executor& other) noexcept
{
if (this != &other)
{
@@ -1446,16 +1542,23 @@ public:
return *this;
}
- any_executor& operator=(nullptr_t p) ASIO_NOEXCEPT
+ any_executor& operator=(nullptr_t p) noexcept
{
prop_fns_ = prop_fns_table<void>();
detail::any_executor_base::operator=(p);
return *this;
}
-#if defined(ASIO_HAS_MOVE)
+ any_executor(any_executor&& other) noexcept
+ : detail::any_executor_base(
+ static_cast<any_executor_base&&>(
+ static_cast<any_executor_base&>(other))),
+ prop_fns_(other.prop_fns_)
+ {
+ other.prop_fns_ = prop_fns_table<void>();
+ }
- any_executor(any_executor&& other) ASIO_NOEXCEPT
+ any_executor(std::nothrow_t, any_executor&& other) noexcept
: detail::any_executor_base(
static_cast<any_executor_base&&>(
static_cast<any_executor_base&>(other))),
@@ -1464,7 +1567,7 @@ public:
other.prop_fns_ = prop_fns_table<void>();
}
- any_executor& operator=(any_executor&& other) ASIO_NOEXCEPT
+ any_executor& operator=(any_executor&& other) noexcept
{
if (this != &other)
{
@@ -1476,9 +1579,7 @@ public:
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
-
- void swap(any_executor& other) ASIO_NOEXCEPT
+ void swap(any_executor& other) noexcept
{
if (this != &other)
{
@@ -1496,65 +1597,65 @@ public:
using detail::any_executor_base::operator unspecified_bool_type;
using detail::any_executor_base::operator!;
- bool equality_helper(const any_executor& other) const ASIO_NOEXCEPT
+ bool equality_helper(const any_executor& other) const noexcept
{
return any_executor_base::equality_helper(other);
}
template <typename AnyExecutor1, typename AnyExecutor2>
- friend typename enable_if<
+ friend enable_if_t<
is_base_of<any_executor, AnyExecutor1>::value
|| is_base_of<any_executor, AnyExecutor2>::value,
bool
- >::type operator==(const AnyExecutor1& a,
- const AnyExecutor2& b) ASIO_NOEXCEPT
+ > operator==(const AnyExecutor1& a,
+ const AnyExecutor2& b) noexcept
{
return static_cast<const any_executor&>(a).equality_helper(b);
}
template <typename AnyExecutor>
- friend typename enable_if<
+ friend enable_if_t<
is_same<AnyExecutor, any_executor>::value,
bool
- >::type operator==(const AnyExecutor& a, nullptr_t) ASIO_NOEXCEPT
+ > operator==(const AnyExecutor& a, nullptr_t) noexcept
{
return !a;
}
template <typename AnyExecutor>
- friend typename enable_if<
+ friend enable_if_t<
is_same<AnyExecutor, any_executor>::value,
bool
- >::type operator==(nullptr_t, const AnyExecutor& b) ASIO_NOEXCEPT
+ > operator==(nullptr_t, const AnyExecutor& b) noexcept
{
return !b;
}
template <typename AnyExecutor1, typename AnyExecutor2>
- friend typename enable_if<
+ friend enable_if_t<
is_base_of<any_executor, AnyExecutor1>::value
|| is_base_of<any_executor, AnyExecutor2>::value,
bool
- >::type operator!=(const AnyExecutor1& a,
- const AnyExecutor2& b) ASIO_NOEXCEPT
+ > operator!=(const AnyExecutor1& a,
+ const AnyExecutor2& b) noexcept
{
return !static_cast<const any_executor&>(a).equality_helper(b);
}
template <typename AnyExecutor>
- friend typename enable_if<
+ friend enable_if_t<
is_same<AnyExecutor, any_executor>::value,
bool
- >::type operator!=(const AnyExecutor& a, nullptr_t) ASIO_NOEXCEPT
+ > operator!=(const AnyExecutor& a, nullptr_t) noexcept
{
return !!a;
}
template <typename AnyExecutor>
- friend typename enable_if<
+ friend enable_if_t<
is_same<AnyExecutor, any_executor>::value,
bool
- >::type operator!=(nullptr_t, const AnyExecutor& b) ASIO_NOEXCEPT
+ > operator!=(nullptr_t, const AnyExecutor& b) noexcept
{
return !!b;
}
@@ -1567,13 +1668,18 @@ public:
template <typename Property>
void query(const Property& p,
- typename enable_if<
+ enable_if_t<
is_same<
typename find_convertible_property<Property>::query_result_type,
void
>::value
- >::type* = 0) const
+ >* = 0) const
{
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
typedef find_convertible_property<Property> found;
prop_fns_[found::index].query(0, object_fns_->target(*this),
&static_cast<const typename found::type&>(p));
@@ -1582,7 +1688,7 @@ public:
template <typename Property>
typename find_convertible_property<Property>::query_result_type
query(const Property& p,
- typename enable_if<
+ enable_if_t<
!is_same<
typename find_convertible_property<Property>::query_result_type,
void
@@ -1591,11 +1697,15 @@ public:
is_reference<
typename find_convertible_property<Property>::query_result_type
>::value
- >::type* = 0) const
+ >* = 0) const
{
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
typedef find_convertible_property<Property> found;
- typename remove_reference<
- typename found::query_result_type>::type* result = 0;
+ remove_reference_t<typename found::query_result_type>* result = 0;
prop_fns_[found::index].query(&result, object_fns_->target(*this),
&static_cast<const typename found::type&>(p));
return *result;
@@ -1604,7 +1714,7 @@ public:
template <typename Property>
typename find_convertible_property<Property>::query_result_type
query(const Property& p,
- typename enable_if<
+ enable_if_t<
!is_same<
typename find_convertible_property<Property>::query_result_type,
void
@@ -1613,8 +1723,13 @@ public:
is_scalar<
typename find_convertible_property<Property>::query_result_type
>::value
- >::type* = 0) const
+ >* = 0) const
{
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
typedef find_convertible_property<Property> found;
typename found::query_result_type result;
prop_fns_[found::index].query(&result, object_fns_->target(*this),
@@ -1625,7 +1740,7 @@ public:
template <typename Property>
typename find_convertible_property<Property>::query_result_type
query(const Property& p,
- typename enable_if<
+ enable_if_t<
!is_same<
typename find_convertible_property<Property>::query_result_type,
void
@@ -1638,8 +1753,13 @@ public:
!is_scalar<
typename find_convertible_property<Property>::query_result_type
>::value
- >::type* = 0) const
+ >* = 0) const
{
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
typedef find_convertible_property<Property> found;
typename found::query_result_type* result;
prop_fns_[found::index].query(&result, object_fns_->target(*this),
@@ -1656,10 +1776,15 @@ public:
template <typename Property>
any_executor require(const Property& p,
- typename enable_if<
+ enable_if_t<
find_convertible_requirable_property<Property>::value
- >::type* = 0) const
+ >* = 0) const
{
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
typedef find_convertible_requirable_property<Property> found;
return prop_fns_[found::index].require(object_fns_->target(*this),
&static_cast<const typename found::type&>(p));
@@ -1673,10 +1798,15 @@ public:
template <typename Property>
any_executor prefer(const Property& p,
- typename enable_if<
+ enable_if_t<
find_convertible_preferable_property<Property>::value
- >::type* = 0) const
+ >* = 0) const
{
+ if (!target_)
+ {
+ bad_executor ex;
+ asio::detail::throw_exception(ex);
+ }
typedef find_convertible_preferable_property<Property> found;
return prop_fns_[found::index].prefer(object_fns_->target(*this),
&static_cast<const typename found::type&>(p));
@@ -1705,634 +1835,91 @@ public:
template <typename... SupportableProperties>
inline void swap(any_executor<SupportableProperties...>& a,
- any_executor<SupportableProperties...>& b) ASIO_NOEXCEPT
+ any_executor<SupportableProperties...>& b) noexcept
{
return a.swap(b);
}
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS(n) \
- ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_##n
-
-#define ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_1 \
- { \
- &detail::any_executor_base::query_fn<Ex, T1>, \
- &detail::any_executor_base::require_fn<any_executor, Ex, T1>, \
- &detail::any_executor_base::prefer_fn<any_executor, Ex, T1> \
- }
-#define ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_2 \
- ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_1, \
- { \
- &detail::any_executor_base::query_fn<Ex, T2>, \
- &detail::any_executor_base::require_fn<any_executor, Ex, T2>, \
- &detail::any_executor_base::prefer_fn<any_executor, Ex, T2> \
- }
-#define ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_3 \
- ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_2, \
- { \
- &detail::any_executor_base::query_fn<Ex, T3>, \
- &detail::any_executor_base::require_fn<any_executor, Ex, T3>, \
- &detail::any_executor_base::prefer_fn<any_executor, Ex, T3> \
- }
-#define ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_4 \
- ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_3, \
- { \
- &detail::any_executor_base::query_fn<Ex, T4>, \
- &detail::any_executor_base::require_fn<any_executor, Ex, T4>, \
- &detail::any_executor_base::prefer_fn<any_executor, Ex, T4> \
- }
-#define ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_5 \
- ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_4, \
- { \
- &detail::any_executor_base::query_fn<Ex, T5>, \
- &detail::any_executor_base::require_fn<any_executor, Ex, T5>, \
- &detail::any_executor_base::prefer_fn<any_executor, Ex, T5> \
- }
-#define ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_6 \
- ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_5, \
- { \
- &detail::any_executor_base::query_fn<Ex, T6>, \
- &detail::any_executor_base::require_fn<any_executor, Ex, T6>, \
- &detail::any_executor_base::prefer_fn<any_executor, Ex, T6> \
- }
-#define ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_7 \
- ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_6, \
- { \
- &detail::any_executor_base::query_fn<Ex, T7>, \
- &detail::any_executor_base::require_fn<any_executor, Ex, T7>, \
- &detail::any_executor_base::prefer_fn<any_executor, Ex, T7> \
- }
-#define ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_8 \
- ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_7, \
- { \
- &detail::any_executor_base::query_fn<Ex, T8>, \
- &detail::any_executor_base::require_fn<any_executor, Ex, T8>, \
- &detail::any_executor_base::prefer_fn<any_executor, Ex, T8> \
- }
-
-#if defined(ASIO_HAS_MOVE)
-
-# define ASIO_PRIVATE_ANY_EXECUTOR_MOVE_OPS \
- any_executor(any_executor&& other) ASIO_NOEXCEPT \
- : detail::any_executor_base( \
- static_cast<any_executor_base&&>( \
- static_cast<any_executor_base&>(other))), \
- prop_fns_(other.prop_fns_) \
- { \
- other.prop_fns_ = prop_fns_table<void>(); \
- } \
- \
- any_executor& operator=(any_executor&& other) ASIO_NOEXCEPT \
- { \
- if (this != &other) \
- { \
- prop_fns_ = other.prop_fns_; \
- detail::any_executor_base::operator=( \
- static_cast<detail::any_executor_base&&>( \
- static_cast<detail::any_executor_base&>(other))); \
- } \
- return *this; \
- } \
- /**/
-#else // defined(ASIO_HAS_MOVE)
-
-# define ASIO_PRIVATE_ANY_EXECUTOR_MOVE_OPS
-
-#endif // defined(ASIO_HAS_MOVE)
-
-#define ASIO_PRIVATE_ANY_EXECUTOR_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- class any_executor<ASIO_VARIADIC_TARGS(n)> : \
- public detail::any_executor_base, \
- public detail::any_executor_context< \
- any_executor<ASIO_VARIADIC_TARGS(n)>, \
- typename detail::supportable_properties< \
- 0, void(ASIO_VARIADIC_TARGS(n))>::find_context_as_property> \
- { \
- public: \
- any_executor() ASIO_NOEXCEPT \
- : detail::any_executor_base(), \
- prop_fns_(prop_fns_table<void>()) \
- { \
- } \
- \
- any_executor(nullptr_t) ASIO_NOEXCEPT \
- : detail::any_executor_base(), \
- prop_fns_(prop_fns_table<void>()) \
- { \
- } \
- \
- template <ASIO_EXECUTION_EXECUTOR Executor> \
- any_executor(Executor ex, \
- typename enable_if< \
- conditional< \
- !is_same<Executor, any_executor>::value \
- && !is_base_of<detail::any_executor_base, Executor>::value, \
- detail::is_valid_target_executor< \
- Executor, void(ASIO_VARIADIC_TARGS(n))>, \
- false_type \
- >::type::value \
- >::type* = 0) \
- : detail::any_executor_base(ASIO_MOVE_CAST( \
- Executor)(ex), false_type()), \
- prop_fns_(prop_fns_table<Executor>()) \
- { \
- } \
- \
- any_executor(const any_executor& other) ASIO_NOEXCEPT \
- : detail::any_executor_base( \
- static_cast<const detail::any_executor_base&>(other)), \
- prop_fns_(other.prop_fns_) \
- { \
- } \
- \
- any_executor(any_executor<> other) \
- : detail::any_executor_base(ASIO_MOVE_CAST( \
- any_executor<>)(other), true_type()), \
- prop_fns_(prop_fns_table<any_executor<> >()) \
- { \
- } \
- \
- template <typename OtherAnyExecutor> \
- any_executor(OtherAnyExecutor other, \
- typename enable_if< \
- conditional< \
- !is_same<OtherAnyExecutor, any_executor>::value \
- && is_base_of<detail::any_executor_base, \
- OtherAnyExecutor>::value, \
- typename detail::supportable_properties< \
- 0, void(ASIO_VARIADIC_TARGS(n))>::template \
- is_valid_target<OtherAnyExecutor>, \
- false_type \
- >::type::value \
- >::type* = 0) \
- : detail::any_executor_base(ASIO_MOVE_CAST( \
- OtherAnyExecutor)(other), true_type()), \
- prop_fns_(prop_fns_table<OtherAnyExecutor>()) \
- { \
- } \
- \
- any_executor& operator=(const any_executor& other) ASIO_NOEXCEPT \
- { \
- if (this != &other) \
- { \
- prop_fns_ = other.prop_fns_; \
- detail::any_executor_base::operator=( \
- static_cast<const detail::any_executor_base&>(other)); \
- } \
- return *this; \
- } \
- \
- any_executor& operator=(nullptr_t p) ASIO_NOEXCEPT \
- { \
- prop_fns_ = prop_fns_table<void>(); \
- detail::any_executor_base::operator=(p); \
- return *this; \
- } \
- \
- ASIO_PRIVATE_ANY_EXECUTOR_MOVE_OPS \
- \
- void swap(any_executor& other) ASIO_NOEXCEPT \
- { \
- if (this != &other) \
- { \
- detail::any_executor_base::swap( \
- static_cast<detail::any_executor_base&>(other)); \
- const prop_fns<any_executor>* tmp_prop_fns = other.prop_fns_; \
- other.prop_fns_ = prop_fns_; \
- prop_fns_ = tmp_prop_fns; \
- } \
- } \
- \
- using detail::any_executor_base::execute; \
- using detail::any_executor_base::target; \
- using detail::any_executor_base::target_type; \
- using detail::any_executor_base::operator unspecified_bool_type; \
- using detail::any_executor_base::operator!; \
- \
- bool equality_helper(const any_executor& other) const ASIO_NOEXCEPT \
- { \
- return any_executor_base::equality_helper(other); \
- } \
- \
- template <typename AnyExecutor1, typename AnyExecutor2> \
- friend typename enable_if< \
- is_base_of<any_executor, AnyExecutor1>::value \
- || is_base_of<any_executor, AnyExecutor2>::value, \
- bool \
- >::type operator==(const AnyExecutor1& a, \
- const AnyExecutor2& b) ASIO_NOEXCEPT \
- { \
- return static_cast<const any_executor&>(a).equality_helper(b); \
- } \
- \
- template <typename AnyExecutor> \
- friend typename enable_if< \
- is_same<AnyExecutor, any_executor>::value, \
- bool \
- >::type operator==(const AnyExecutor& a, nullptr_t) ASIO_NOEXCEPT \
- { \
- return !a; \
- } \
- \
- template <typename AnyExecutor> \
- friend typename enable_if< \
- is_same<AnyExecutor, any_executor>::value, \
- bool \
- >::type operator==(nullptr_t, const AnyExecutor& b) ASIO_NOEXCEPT \
- { \
- return !b; \
- } \
- \
- template <typename AnyExecutor1, typename AnyExecutor2> \
- friend typename enable_if< \
- is_base_of<any_executor, AnyExecutor1>::value \
- || is_base_of<any_executor, AnyExecutor2>::value, \
- bool \
- >::type operator!=(const AnyExecutor1& a, \
- const AnyExecutor2& b) ASIO_NOEXCEPT \
- { \
- return !static_cast<const any_executor&>(a).equality_helper(b); \
- } \
- \
- template <typename AnyExecutor> \
- friend typename enable_if< \
- is_same<AnyExecutor, any_executor>::value, \
- bool \
- >::type operator!=(const AnyExecutor& a, nullptr_t) ASIO_NOEXCEPT \
- { \
- return !!a; \
- } \
- \
- template <typename AnyExecutor> \
- friend typename enable_if< \
- is_same<AnyExecutor, any_executor>::value, \
- bool \
- >::type operator!=(nullptr_t, const AnyExecutor& b) ASIO_NOEXCEPT \
- { \
- return !!b; \
- } \
- \
- template <typename T> \
- struct find_convertible_property : \
- detail::supportable_properties< \
- 0, void(ASIO_VARIADIC_TARGS(n))>::template \
- find_convertible_property<T> {}; \
- \
- template <typename Property> \
- void query(const Property& p, \
- typename enable_if< \
- is_same< \
- typename find_convertible_property<Property>::query_result_type, \
- void \
- >::value \
- >::type* = 0) const \
- { \
- typedef find_convertible_property<Property> found; \
- prop_fns_[found::index].query(0, object_fns_->target(*this), \
- &static_cast<const typename found::type&>(p)); \
- } \
- \
- template <typename Property> \
- typename find_convertible_property<Property>::query_result_type \
- query(const Property& p, \
- typename enable_if< \
- !is_same< \
- typename find_convertible_property<Property>::query_result_type, \
- void \
- >::value \
- && \
- is_reference< \
- typename find_convertible_property<Property>::query_result_type \
- >::value \
- >::type* = 0) const \
- { \
- typedef find_convertible_property<Property> found; \
- typename remove_reference< \
- typename found::query_result_type>::type* result; \
- prop_fns_[found::index].query(&result, object_fns_->target(*this), \
- &static_cast<const typename found::type&>(p)); \
- return *result; \
- } \
- \
- template <typename Property> \
- typename find_convertible_property<Property>::query_result_type \
- query(const Property& p, \
- typename enable_if< \
- !is_same< \
- typename find_convertible_property<Property>::query_result_type, \
- void \
- >::value \
- && \
- is_scalar< \
- typename find_convertible_property<Property>::query_result_type \
- >::value \
- >::type* = 0) const \
- { \
- typedef find_convertible_property<Property> found; \
- typename found::query_result_type result; \
- prop_fns_[found::index].query(&result, object_fns_->target(*this), \
- &static_cast<const typename found::type&>(p)); \
- return result; \
- } \
- \
- template <typename Property> \
- typename find_convertible_property<Property>::query_result_type \
- query(const Property& p, \
- typename enable_if< \
- !is_same< \
- typename find_convertible_property<Property>::query_result_type, \
- void \
- >::value \
- && \
- !is_reference< \
- typename find_convertible_property<Property>::query_result_type \
- >::value \
- && \
- !is_scalar< \
- typename find_convertible_property<Property>::query_result_type \
- >::value \
- >::type* = 0) const \
- { \
- typedef find_convertible_property<Property> found; \
- typename found::query_result_type* result; \
- prop_fns_[found::index].query(&result, object_fns_->target(*this), \
- &static_cast<const typename found::type&>(p)); \
- return *asio::detail::scoped_ptr< \
- typename found::query_result_type>(result); \
- } \
- \
- template <typename T> \
- struct find_convertible_requirable_property : \
- detail::supportable_properties< \
- 0, void(ASIO_VARIADIC_TARGS(n))>::template \
- find_convertible_requirable_property<T> {}; \
- \
- template <typename Property> \
- any_executor require(const Property& p, \
- typename enable_if< \
- find_convertible_requirable_property<Property>::value \
- >::type* = 0) const \
- { \
- typedef find_convertible_requirable_property<Property> found; \
- return prop_fns_[found::index].require(object_fns_->target(*this), \
- &static_cast<const typename found::type&>(p)); \
- } \
- \
- template <typename T> \
- struct find_convertible_preferable_property : \
- detail::supportable_properties< \
- 0, void(ASIO_VARIADIC_TARGS(n))>::template \
- find_convertible_preferable_property<T> {}; \
- \
- template <typename Property> \
- any_executor prefer(const Property& p, \
- typename enable_if< \
- find_convertible_preferable_property<Property>::value \
- >::type* = 0) const \
- { \
- typedef find_convertible_preferable_property<Property> found; \
- return prop_fns_[found::index].prefer(object_fns_->target(*this), \
- &static_cast<const typename found::type&>(p)); \
- } \
- \
- template <typename Ex> \
- static const prop_fns<any_executor>* prop_fns_table() \
- { \
- static const prop_fns<any_executor> fns[] = \
- { \
- ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS(n) \
- }; \
- return fns; \
- } \
- \
- const prop_fns<any_executor>* prop_fns_; \
- typedef detail::supportable_properties<0, \
- void(ASIO_VARIADIC_TARGS(n))> supportable_properties_type; \
- }; \
- \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- inline void swap(any_executor<ASIO_VARIADIC_TARGS(n)>& a, \
- any_executor<ASIO_VARIADIC_TARGS(n)>& b) ASIO_NOEXCEPT \
- { \
- return a.swap(b); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ANY_EXECUTOR_DEF)
-#undef ASIO_PRIVATE_ANY_EXECUTOR_DEF
-#undef ASIO_PRIVATE_ANY_EXECUTOR_MOVE_OPS
-#undef ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS
-#undef ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_1
-#undef ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_2
-#undef ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_3
-#undef ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_4
-#undef ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_5
-#undef ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_6
-#undef ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_7
-#undef ASIO_PRIVATE_ANY_EXECUTOR_PROP_FNS_8
-
-#endif // if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
} // namespace execution
namespace traits {
#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename... SupportableProperties>
-struct equality_comparable<execution::any_executor<SupportableProperties...> >
-{
- static const bool is_valid = true;
- static const bool is_noexcept = true;
-};
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <>
-struct equality_comparable<execution::any_executor<> >
+struct equality_comparable<execution::any_executor<SupportableProperties...>>
{
- static const bool is_valid = true;
- static const bool is_noexcept = true;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
-#define ASIO_PRIVATE_ANY_EXECUTOR_EQUALITY_COMPARABLE_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- struct equality_comparable< \
- execution::any_executor<ASIO_VARIADIC_TARGS(n)> > \
- { \
- static const bool is_valid = true; \
- static const bool is_noexcept = true; \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(
- ASIO_PRIVATE_ANY_EXECUTOR_EQUALITY_COMPARABLE_DEF)
-#undef ASIO_PRIVATE_ANY_EXECUTOR_EQUALITY_COMPARABLE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename F, typename... SupportableProperties>
struct execute_member<execution::any_executor<SupportableProperties...>, F>
{
- static const bool is_valid = true;
- static const bool is_noexcept = false;
- typedef void result_type;
-};
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename F>
-struct execute_member<execution::any_executor<>, F>
-{
- static const bool is_valid = true;
- static const bool is_noexcept = false;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
-#define ASIO_PRIVATE_ANY_EXECUTOR_EXECUTE_MEMBER_DEF(n) \
- template <typename F, ASIO_VARIADIC_TPARAMS(n)> \
- struct execute_member< \
- execution::any_executor<ASIO_VARIADIC_TARGS(n)>, F> \
- { \
- static const bool is_valid = true; \
- static const bool is_noexcept = false; \
- typedef void result_type; \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(
- ASIO_PRIVATE_ANY_EXECUTOR_EXECUTE_MEMBER_DEF)
-#undef ASIO_PRIVATE_ANY_EXECUTOR_EXECUTE_MEMBER_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename Prop, typename... SupportableProperties>
struct query_member<
execution::any_executor<SupportableProperties...>, Prop,
- typename enable_if<
+ enable_if_t<
execution::detail::supportable_properties<
0, void(SupportableProperties...)>::template
find_convertible_property<Prop>::value
- >::type>
+ >>
{
- static const bool is_valid = true;
- static const bool is_noexcept = false;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef typename execution::detail::supportable_properties<
0, void(SupportableProperties...)>::template
find_convertible_property<Prop>::query_result_type result_type;
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_ANY_EXECUTOR_QUERY_MEMBER_DEF(n) \
- template <typename Prop, ASIO_VARIADIC_TPARAMS(n)> \
- struct query_member< \
- execution::any_executor<ASIO_VARIADIC_TARGS(n)>, Prop, \
- typename enable_if< \
- execution::detail::supportable_properties< \
- 0, void(ASIO_VARIADIC_TARGS(n))>::template \
- find_convertible_property<Prop>::value \
- >::type> \
- { \
- static const bool is_valid = true; \
- static const bool is_noexcept = false; \
- typedef typename execution::detail::supportable_properties< \
- 0, void(ASIO_VARIADIC_TARGS(n))>::template \
- find_convertible_property<Prop>::query_result_type result_type; \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ANY_EXECUTOR_QUERY_MEMBER_DEF)
-#undef ASIO_PRIVATE_ANY_EXECUTOR_QUERY_MEMBER_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename Prop, typename... SupportableProperties>
struct require_member<
execution::any_executor<SupportableProperties...>, Prop,
- typename enable_if<
+ enable_if_t<
execution::detail::supportable_properties<
0, void(SupportableProperties...)>::template
find_convertible_requirable_property<Prop>::value
- >::type>
+ >>
{
- static const bool is_valid = true;
- static const bool is_noexcept = false;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef execution::any_executor<SupportableProperties...> result_type;
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_ANY_EXECUTOR_REQUIRE_MEMBER_DEF(n) \
- template <typename Prop, ASIO_VARIADIC_TPARAMS(n)> \
- struct require_member< \
- execution::any_executor<ASIO_VARIADIC_TARGS(n)>, Prop, \
- typename enable_if< \
- execution::detail::supportable_properties< \
- 0, void(ASIO_VARIADIC_TARGS(n))>::template \
- find_convertible_requirable_property<Prop>::value \
- >::type> \
- { \
- static const bool is_valid = true; \
- static const bool is_noexcept = false; \
- typedef execution::any_executor<ASIO_VARIADIC_TARGS(n)> result_type; \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(
- ASIO_PRIVATE_ANY_EXECUTOR_REQUIRE_MEMBER_DEF)
-#undef ASIO_PRIVATE_ANY_EXECUTOR_REQUIRE_MEMBER_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
#if !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
template <typename Prop, typename... SupportableProperties>
struct prefer_member<
execution::any_executor<SupportableProperties...>, Prop,
- typename enable_if<
+ enable_if_t<
execution::detail::supportable_properties<
0, void(SupportableProperties...)>::template
find_convertible_preferable_property<Prop>::value
- >::type>
+ >>
{
- static const bool is_valid = true;
- static const bool is_noexcept = false;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef execution::any_executor<SupportableProperties...> result_type;
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_ANY_EXECUTOR_PREFER_FREE_DEF(n) \
- template <typename Prop, ASIO_VARIADIC_TPARAMS(n)> \
- struct prefer_member< \
- execution::any_executor<ASIO_VARIADIC_TARGS(n)>, Prop, \
- typename enable_if< \
- execution::detail::supportable_properties< \
- 0, void(ASIO_VARIADIC_TARGS(n))>::template \
- find_convertible_preferable_property<Prop>::value \
- >::type> \
- { \
- static const bool is_valid = true; \
- static const bool is_noexcept = false; \
- typedef execution::any_executor<ASIO_VARIADIC_TARGS(n)> result_type; \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ANY_EXECUTOR_PREFER_FREE_DEF)
-#undef ASIO_PRIVATE_ANY_EXECUTOR_PREFER_FREE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
#endif // !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
} // namespace traits
diff --git a/3rdparty/asio/include/asio/execution/bad_executor.hpp b/3rdparty/asio/include/asio/execution/bad_executor.hpp
index 0532ceff17a..791951684fe 100644
--- a/3rdparty/asio/include/asio/execution/bad_executor.hpp
+++ b/3rdparty/asio/include/asio/execution/bad_executor.hpp
@@ -2,7 +2,7 @@
// execution/bad_executor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -28,11 +28,10 @@ class bad_executor
{
public:
/// Constructor.
- ASIO_DECL bad_executor() ASIO_NOEXCEPT;
+ ASIO_DECL bad_executor() noexcept;
/// Obtain message associated with exception.
- ASIO_DECL virtual const char* what() const
- ASIO_NOEXCEPT_OR_NOTHROW;
+ ASIO_DECL virtual const char* what() const noexcept;
};
} // namespace execution
diff --git a/3rdparty/asio/include/asio/execution/blocking.hpp b/3rdparty/asio/include/asio/execution/blocking.hpp
index 76a2eb523dc..e120299bded 100644
--- a/3rdparty/asio/include/asio/execution/blocking.hpp
+++ b/3rdparty/asio/include/asio/execution/blocking.hpp
@@ -2,7 +2,7 @@
// execution/blocking.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,14 +17,12 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/execution/execute.hpp"
#include "asio/execution/executor.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
#include "asio/is_applicable_property.hpp"
#include "asio/prefer.hpp"
#include "asio/query.hpp"
#include "asio/require.hpp"
+#include "asio/traits/execute_member.hpp"
#include "asio/traits/query_free.hpp"
#include "asio/traits/query_member.hpp"
#include "asio/traits/query_static_constexpr_member.hpp"
@@ -43,10 +41,9 @@ namespace execution {
/// behaviour of their execution functions.
struct blocking_t
{
- /// The blocking_t property applies to executors, senders, and schedulers.
+ /// The blocking_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The top-level blocking_t property cannot be required.
static constexpr bool is_requirable = false;
@@ -62,11 +59,9 @@ struct blocking_t
/// submitted function object.
struct possibly_t
{
- /// The blocking_t::possibly_t property applies to executors, senders, and
- /// schedulers.
+ /// The blocking_t::possibly_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The blocking_t::possibly_t property can be required.
static constexpr bool is_requirable = true;
@@ -92,11 +87,9 @@ struct blocking_t
/// function object.
struct always_t
{
- /// The blocking_t::always_t property applies to executors, senders, and
- /// schedulers.
+ /// The blocking_t::always_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The blocking_t::always_t property can be required.
static constexpr bool is_requirable = true;
@@ -122,11 +115,9 @@ struct blocking_t
/// submitted function object.
struct never_t
{
- /// The blocking_t::never_t property applies to executors, senders, and
- /// schedulers.
+ /// The blocking_t::never_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The blocking_t::never_t property can be required.
static constexpr bool is_requirable = true;
@@ -199,8 +190,8 @@ template <int I> struct allowed_t;
template <typename Executor, typename Function>
void blocking_execute(
- ASIO_MOVE_ARG(Executor) ex,
- ASIO_MOVE_ARG(Function) func);
+ Executor&& ex,
+ Function&& func);
} // namespace blocking_adaptation
@@ -209,45 +200,33 @@ struct blocking_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = false);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
typedef blocking_t polymorphic_query_result_type;
typedef detail::blocking::possibly_t<I> possibly_t;
typedef detail::blocking::always_t<I> always_t;
typedef detail::blocking::never_t<I> never_t;
- ASIO_CONSTEXPR blocking_t()
+ constexpr blocking_t()
: value_(-1)
{
}
- ASIO_CONSTEXPR blocking_t(possibly_t)
+ constexpr blocking_t(possibly_t)
: value_(0)
{
}
- ASIO_CONSTEXPR blocking_t(always_t)
+ constexpr blocking_t(always_t)
: value_(1)
{
}
- ASIO_CONSTEXPR blocking_t(never_t)
+ constexpr blocking_t(never_t)
: value_(2)
{
}
@@ -259,16 +238,14 @@ struct blocking_t
struct type
{
template <typename P>
- auto query(ASIO_MOVE_ARG(P) p) const
+ auto query(P&& p) const
noexcept(
noexcept(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
)
)
-> decltype(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
);
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
@@ -283,17 +260,17 @@ struct blocking_t
struct type
{
template <typename P>
- static constexpr auto query(ASIO_MOVE_ARG(P) p)
+ static constexpr auto query(P&& p)
noexcept(
noexcept(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
)
-> decltype(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
{
- return T::query(ASIO_MOVE_CAST(P)(p));
+ return T::query(static_cast<P&&>(p));
}
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
@@ -313,88 +290,87 @@ struct blocking_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, possibly_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, possibly_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, possibly_t>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, always_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::static_query<T, possibly_t>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, always_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, always_t>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, never_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::static_query<T, possibly_t>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::static_query<T, always_t>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, never_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, never_t>::value();
}
template <typename E, typename T = decltype(blocking_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= blocking_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- friend ASIO_CONSTEXPR bool operator==(
+ friend constexpr bool operator==(
const blocking_t& a, const blocking_t& b)
{
return a.value_ == b.value_;
}
- friend ASIO_CONSTEXPR bool operator!=(
+ friend constexpr bool operator!=(
const blocking_t& a, const blocking_t& b)
{
return a.value_ != b.value_;
@@ -402,22 +378,20 @@ struct blocking_t
struct convertible_from_blocking_t
{
- ASIO_CONSTEXPR convertible_from_blocking_t(blocking_t) {}
+ constexpr convertible_from_blocking_t(blocking_t) {}
};
template <typename Executor>
- friend ASIO_CONSTEXPR blocking_t query(
+ friend constexpr blocking_t query(
const Executor& ex, convertible_from_blocking_t,
- typename enable_if<
+ enable_if_t<
can_query<const Executor&, possibly_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, blocking_t<>::possibly_t>::value))
+ noexcept(is_nothrow_query<const Executor&, blocking_t<>::possibly_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, possibly_t>::value))
+ noexcept(is_nothrow_query<const Executor&, possibly_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -425,21 +399,19 @@ struct blocking_t
}
template <typename Executor>
- friend ASIO_CONSTEXPR blocking_t query(
+ friend constexpr blocking_t query(
const Executor& ex, convertible_from_blocking_t,
- typename enable_if<
+ enable_if_t<
!can_query<const Executor&, possibly_t>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
can_query<const Executor&, always_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, blocking_t<>::always_t>::value))
+ noexcept(is_nothrow_query<const Executor&, blocking_t<>::always_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, always_t>::value))
+ noexcept(is_nothrow_query<const Executor&, always_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -447,24 +419,22 @@ struct blocking_t
}
template <typename Executor>
- friend ASIO_CONSTEXPR blocking_t query(
+ friend constexpr blocking_t query(
const Executor& ex, convertible_from_blocking_t,
- typename enable_if<
+ enable_if_t<
!can_query<const Executor&, possibly_t>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!can_query<const Executor&, always_t>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
can_query<const Executor&, never_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, blocking_t<>::never_t>::value))
+ noexcept(is_nothrow_query<const Executor&, blocking_t<>::never_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, never_t>::value))
+ noexcept(is_nothrow_query<const Executor&, never_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -475,10 +445,6 @@ struct blocking_t
ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(always_t, always);
ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(never_t, never);
-#if !defined(ASIO_HAS_CONSTEXPR)
- static const blocking_t instance;
-#endif // !defined(ASIO_HAS_CONSTEXPR)
-
private:
int value_;
};
@@ -490,11 +456,6 @@ const T blocking_t<I>::static_query_v;
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_CONSTEXPR)
-template <int I>
-const blocking_t<I> blocking_t<I>::instance;
-#endif
-
template <int I>
const typename blocking_t<I>::possibly_t blocking_t<I>::possibly;
@@ -511,26 +472,14 @@ struct possibly_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
typedef blocking_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR possibly_t()
+ constexpr possibly_t()
{
}
@@ -547,78 +496,77 @@ struct possibly_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename T>
- static ASIO_CONSTEXPR possibly_t static_query(
- typename enable_if<
+ static constexpr possibly_t static_query(
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::query_free<T, possibly_t>::is_valid
- >::type* = 0,
- typename enable_if<
- !can_query<T, always_t<I> >::value
- >::type* = 0,
- typename enable_if<
- !can_query<T, never_t<I> >::value
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0,
+ enable_if_t<
+ !can_query<T, always_t<I>>::value
+ >* = 0,
+ enable_if_t<
+ !can_query<T, never_t<I>>::value
+ >* = 0) noexcept
{
return possibly_t();
}
template <typename E, typename T = decltype(possibly_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= possibly_t::static_query<E>();
#endif // defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR blocking_t<I> value()
+ static constexpr blocking_t<I> value()
{
return possibly_t();
}
- friend ASIO_CONSTEXPR bool operator==(
+ friend constexpr bool operator==(
const possibly_t&, const possibly_t&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
+ friend constexpr bool operator!=(
const possibly_t&, const possibly_t&)
{
return false;
}
- friend ASIO_CONSTEXPR bool operator==(
+ friend constexpr bool operator==(
const possibly_t&, const always_t<I>&)
{
return false;
}
- friend ASIO_CONSTEXPR bool operator!=(
+ friend constexpr bool operator!=(
const possibly_t&, const always_t<I>&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator==(
+ friend constexpr bool operator==(
const possibly_t&, const never_t<I>&)
{
return false;
}
- friend ASIO_CONSTEXPR bool operator!=(
+ friend constexpr bool operator!=(
const possibly_t&, const never_t<I>&)
{
return true;
@@ -636,125 +584,110 @@ template <typename Executor>
class adapter
{
public:
- adapter(int, const Executor& e) ASIO_NOEXCEPT
+ adapter(int, const Executor& e) noexcept
: executor_(e)
{
}
- adapter(const adapter& other) ASIO_NOEXCEPT
+ adapter(const adapter& other) noexcept
: executor_(other.executor_)
{
}
-#if defined(ASIO_HAS_MOVE)
- adapter(adapter&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(Executor)(other.executor_))
+ adapter(adapter&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_))
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
template <int I>
- static ASIO_CONSTEXPR always_t<I> query(
- blocking_t<I>) ASIO_NOEXCEPT
+ static constexpr always_t<I> query(blocking_t<I>) noexcept
{
return always_t<I>();
}
template <int I>
- static ASIO_CONSTEXPR always_t<I> query(
- possibly_t<I>) ASIO_NOEXCEPT
+ static constexpr always_t<I> query(possibly_t<I>) noexcept
{
return always_t<I>();
}
template <int I>
- static ASIO_CONSTEXPR always_t<I> query(
- always_t<I>) ASIO_NOEXCEPT
+ static constexpr always_t<I> query(always_t<I>) noexcept
{
return always_t<I>();
}
template <int I>
- static ASIO_CONSTEXPR always_t<I> query(
- never_t<I>) ASIO_NOEXCEPT
+ static constexpr always_t<I> query(never_t<I>) noexcept
{
return always_t<I>();
}
template <typename Property>
- typename enable_if<
+ enable_if_t<
can_query<const Executor&, Property>::value,
- typename query_result<const Executor&, Property>::type
- >::type query(const Property& p) const
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, Property>::value))
+ query_result_t<const Executor&, Property>
+ > query(const Property& p) const
+ noexcept(is_nothrow_query<const Executor&, Property>::value)
{
return asio::query(executor_, p);
}
template <int I>
- typename enable_if<
- can_require<const Executor&, possibly_t<I> >::value,
- typename require_result<const Executor&, possibly_t<I> >::type
- >::type require(possibly_t<I>) const ASIO_NOEXCEPT
+ enable_if_t<
+ can_require<const Executor&, possibly_t<I>>::value,
+ require_result_t<const Executor&, possibly_t<I>>
+ > require(possibly_t<I>) const noexcept
{
return asio::require(executor_, possibly_t<I>());
}
template <int I>
- typename enable_if<
- can_require<const Executor&, never_t<I> >::value,
- typename require_result<const Executor&, never_t<I> >::type
- >::type require(never_t<I>) const ASIO_NOEXCEPT
+ enable_if_t<
+ can_require<const Executor&, never_t<I>>::value,
+ require_result_t<const Executor&, never_t<I>>
+ > require(never_t<I>) const noexcept
{
return asio::require(executor_, never_t<I>());
}
template <typename Property>
- typename enable_if<
+ enable_if_t<
can_require<const Executor&, Property>::value,
- adapter<typename decay<
- typename require_result<const Executor&, Property>::type
- >::type>
- >::type require(const Property& p) const
- ASIO_NOEXCEPT_IF((
- is_nothrow_require<const Executor&, Property>::value))
+ adapter<decay_t<require_result_t<const Executor&, Property>>>
+ > require(const Property& p) const
+ noexcept(is_nothrow_require<const Executor&, Property>::value)
{
- return adapter<typename decay<
- typename require_result<const Executor&, Property>::type
- >::type>(0, asio::require(executor_, p));
+ return adapter<decay_t<require_result_t<const Executor&, Property>>>(
+ 0, asio::require(executor_, p));
}
template <typename Property>
- typename enable_if<
+ enable_if_t<
can_prefer<const Executor&, Property>::value,
- adapter<typename decay<
- typename prefer_result<const Executor&, Property>::type
- >::type>
- >::type prefer(const Property& p) const
- ASIO_NOEXCEPT_IF((
- is_nothrow_prefer<const Executor&, Property>::value))
+ adapter<decay_t<prefer_result_t<const Executor&, Property>>>
+ > prefer(const Property& p) const
+ noexcept(is_nothrow_prefer<const Executor&, Property>::value)
{
- return adapter<typename decay<
- typename prefer_result<const Executor&, Property>::type
- >::type>(0, asio::prefer(executor_, p));
+ return adapter<decay_t<prefer_result_t<const Executor&, Property>>>(
+ 0, asio::prefer(executor_, p));
}
template <typename Function>
- typename enable_if<
- execution::can_execute<const Executor&, Function>::value
- >::type execute(ASIO_MOVE_ARG(Function) f) const
+ enable_if_t<
+ traits::execute_member<const Executor&, Function>::is_valid
+ > execute(Function&& f) const
{
blocking_adaptation::blocking_execute(
- executor_, ASIO_MOVE_CAST(Function)(f));
+ executor_, static_cast<Function&&>(f));
}
- friend bool operator==(const adapter& a, const adapter& b) ASIO_NOEXCEPT
+ friend bool operator==(const adapter& a, const adapter& b) noexcept
{
return a.executor_ == b.executor_;
}
- friend bool operator!=(const adapter& a, const adapter& b) ASIO_NOEXCEPT
+ friend bool operator!=(const adapter& a, const adapter& b) noexcept
{
return a.executor_ != b.executor_;
}
@@ -768,26 +701,14 @@ struct always_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = false;
typedef blocking_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR always_t()
+ constexpr always_t()
{
}
@@ -804,57 +725,54 @@ struct always_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
+ static constexpr typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename E, typename T = decltype(always_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = always_t::static_query<E>();
+ static constexpr const T static_query_v = always_t::static_query<E>();
#endif // defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR blocking_t<I> value()
+ static constexpr blocking_t<I> value()
{
return always_t();
}
- friend ASIO_CONSTEXPR bool operator==(
+ friend constexpr bool operator==(
const always_t&, const always_t&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
+ friend constexpr bool operator!=(
const always_t&, const always_t&)
{
return false;
}
- friend ASIO_CONSTEXPR bool operator==(
+ friend constexpr bool operator==(
const always_t&, const possibly_t<I>&)
{
return false;
}
- friend ASIO_CONSTEXPR bool operator!=(
+ friend constexpr bool operator!=(
const always_t&, const possibly_t<I>&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator==(
+ friend constexpr bool operator==(
const always_t&, const never_t<I>&)
{
return false;
}
- friend ASIO_CONSTEXPR bool operator!=(
+ friend constexpr bool operator!=(
const always_t&, const never_t<I>&)
{
return true;
@@ -863,15 +781,15 @@ struct always_t
template <typename Executor>
friend adapter<Executor> require(
const Executor& e, const always_t&,
- typename enable_if<
+ enable_if_t<
is_executor<Executor>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_require<
const Executor&,
blocking_adaptation::allowed_t<0>
>::is_valid
- >::type* = 0)
+ >* = 0)
{
return adapter<Executor>(0, e);
}
@@ -889,26 +807,14 @@ struct never_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
typedef blocking_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR never_t()
+ constexpr never_t()
{
}
@@ -925,58 +831,51 @@ struct never_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename E, typename T = decltype(never_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= never_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR blocking_t<I> value()
+ static constexpr blocking_t<I> value()
{
return never_t();
}
- friend ASIO_CONSTEXPR bool operator==(
- const never_t&, const never_t&)
+ friend constexpr bool operator==(const never_t&, const never_t&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const never_t&, const never_t&)
+ friend constexpr bool operator!=(const never_t&, const never_t&)
{
return false;
}
- friend ASIO_CONSTEXPR bool operator==(
- const never_t&, const possibly_t<I>&)
+ friend constexpr bool operator==(const never_t&, const possibly_t<I>&)
{
return false;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const never_t&, const possibly_t<I>&)
+ friend constexpr bool operator!=(const never_t&, const possibly_t<I>&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator==(
- const never_t&, const always_t<I>&)
+ friend constexpr bool operator==(const never_t&, const always_t<I>&)
{
return false;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const never_t&, const always_t<I>&)
+ friend constexpr bool operator!=(const never_t&, const always_t<I>&)
{
return true;
}
@@ -993,11 +892,7 @@ const T never_t<I>::static_query_v;
typedef detail::blocking_t<> blocking_t;
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr blocking_t blocking;
-#else // defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-namespace { static const blocking_t& blocking = blocking_t::instance; }
-#endif
} // namespace execution
@@ -1005,69 +900,25 @@ namespace { static const blocking_t& blocking = blocking_t::instance; }
template <typename T>
struct is_applicable_property<T, execution::blocking_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::blocking_t::possibly_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::blocking_t::always_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::blocking_t::never_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
@@ -1079,42 +930,42 @@ namespace traits {
template <typename T>
struct query_free_default<T, execution::blocking_t,
- typename enable_if<
+ enable_if_t<
can_query<T, execution::blocking_t::possibly_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::blocking_t::possibly_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::blocking_t::possibly_t>::value;
typedef execution::blocking_t result_type;
};
template <typename T>
struct query_free_default<T, execution::blocking_t,
- typename enable_if<
+ enable_if_t<
!can_query<T, execution::blocking_t::possibly_t>::value
&& can_query<T, execution::blocking_t::always_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::blocking_t::always_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::blocking_t::always_t>::value;
typedef execution::blocking_t result_type;
};
template <typename T>
struct query_free_default<T, execution::blocking_t,
- typename enable_if<
+ enable_if_t<
!can_query<T, execution::blocking_t::possibly_t>::value
&& !can_query<T, execution::blocking_t::always_t>::value
&& can_query<T, execution::blocking_t::never_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::blocking_t::never_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::blocking_t::never_t>::value;
typedef execution::blocking_t result_type;
};
@@ -1126,18 +977,18 @@ struct query_free_default<T, execution::blocking_t,
template <typename T>
struct static_query<T, execution::blocking_t,
- typename enable_if<
+ enable_if_t<
execution::detail::blocking_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::blocking_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::blocking_t::query_static_constexpr_member<T>::value();
}
@@ -1145,21 +996,21 @@ struct static_query<T, execution::blocking_t,
template <typename T>
struct static_query<T, execution::blocking_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::blocking_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::blocking_t<0>::
query_member<T>::is_valid
&& traits::static_query<T, execution::blocking_t::possibly_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::blocking_t::possibly_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T, execution::blocking_t::possibly_t>::value();
}
@@ -1167,22 +1018,22 @@ struct static_query<T, execution::blocking_t,
template <typename T>
struct static_query<T, execution::blocking_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::blocking_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::blocking_t<0>::
query_member<T>::is_valid
&& !traits::static_query<T, execution::blocking_t::possibly_t>::is_valid
&& traits::static_query<T, execution::blocking_t::always_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::blocking_t::always_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T, execution::blocking_t::always_t>::value();
}
@@ -1190,7 +1041,7 @@ struct static_query<T, execution::blocking_t,
template <typename T>
struct static_query<T, execution::blocking_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::blocking_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::blocking_t<0>::
@@ -1198,15 +1049,15 @@ struct static_query<T, execution::blocking_t,
&& !traits::static_query<T, execution::blocking_t::possibly_t>::is_valid
&& !traits::static_query<T, execution::blocking_t::always_t>::is_valid
&& traits::static_query<T, execution::blocking_t::never_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::blocking_t::never_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T, execution::blocking_t::never_t>::value();
}
@@ -1214,18 +1065,18 @@ struct static_query<T, execution::blocking_t,
template <typename T>
struct static_query<T, execution::blocking_t::possibly_t,
- typename enable_if<
+ enable_if_t<
execution::detail::blocking::possibly_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::blocking::possibly_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::blocking::possibly_t<0>::
query_static_constexpr_member<T>::value();
@@ -1234,7 +1085,7 @@ struct static_query<T, execution::blocking_t::possibly_t,
template <typename T>
struct static_query<T, execution::blocking_t::possibly_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::blocking::possibly_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::blocking::possibly_t<0>::
@@ -1242,14 +1093,14 @@ struct static_query<T, execution::blocking_t::possibly_t,
&& !traits::query_free<T, execution::blocking_t::possibly_t>::is_valid
&& !can_query<T, execution::blocking_t::always_t>::value
&& !can_query<T, execution::blocking_t::never_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::blocking_t::possibly_t result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return result_type();
}
@@ -1257,18 +1108,18 @@ struct static_query<T, execution::blocking_t::possibly_t,
template <typename T>
struct static_query<T, execution::blocking_t::always_t,
- typename enable_if<
+ enable_if_t<
execution::detail::blocking::always_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::blocking::always_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::blocking::always_t<0>::
query_static_constexpr_member<T>::value();
@@ -1277,18 +1128,18 @@ struct static_query<T, execution::blocking_t::always_t,
template <typename T>
struct static_query<T, execution::blocking_t::never_t,
- typename enable_if<
+ enable_if_t<
execution::detail::blocking::never_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::blocking::never_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::blocking::never_t<0>::
query_static_constexpr_member<T>::value();
@@ -1298,61 +1149,21 @@ struct static_query<T, execution::blocking_t::never_t,
#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
-template <typename T>
-struct static_require<T, execution::blocking_t::possibly_t,
- typename enable_if<
- static_query<T, execution::blocking_t::possibly_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::blocking_t::possibly_t>::result_type,
- execution::blocking_t::possibly_t>::value));
-};
-
-template <typename T>
-struct static_require<T, execution::blocking_t::always_t,
- typename enable_if<
- static_query<T, execution::blocking_t::always_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::blocking_t::always_t>::result_type,
- execution::blocking_t::always_t>::value));
-};
-
-template <typename T>
-struct static_require<T, execution::blocking_t::never_t,
- typename enable_if<
- static_query<T, execution::blocking_t::never_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::blocking_t::never_t>::result_type,
- execution::blocking_t::never_t>::value));
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
#if !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
template <typename T>
struct require_free_default<T, execution::blocking_t::always_t,
- typename enable_if<
- is_same<T, typename decay<T>::type>::value
+ enable_if_t<
+ is_same<T, decay_t<T>>::value
&& execution::is_executor<T>::value
&& traits::static_require<
const T&,
execution::detail::blocking_adaptation::allowed_t<0>
>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef execution::detail::blocking::adapter<T> result_type;
};
@@ -1362,10 +1173,10 @@ struct require_free_default<T, execution::blocking_t::always_t,
template <typename Executor>
struct equality_comparable<
- execution::detail::blocking::adapter<Executor> >
+ execution::detail::blocking::adapter<Executor>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -1376,8 +1187,8 @@ template <typename Executor, typename Function>
struct execute_member<
execution::detail::blocking::adapter<Executor>, Function>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
@@ -1388,13 +1199,13 @@ struct execute_member<
template <typename Executor, int I>
struct query_static_constexpr_member<
execution::detail::blocking::adapter<Executor>,
- execution::detail::blocking_t<I> >
+ execution::detail::blocking_t<I>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::blocking_t::always_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return result_type();
}
@@ -1403,13 +1214,13 @@ struct query_static_constexpr_member<
template <typename Executor, int I>
struct query_static_constexpr_member<
execution::detail::blocking::adapter<Executor>,
- execution::detail::blocking::always_t<I> >
+ execution::detail::blocking::always_t<I>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::blocking_t::always_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return result_type();
}
@@ -1418,13 +1229,13 @@ struct query_static_constexpr_member<
template <typename Executor, int I>
struct query_static_constexpr_member<
execution::detail::blocking::adapter<Executor>,
- execution::detail::blocking::possibly_t<I> >
+ execution::detail::blocking::possibly_t<I>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::blocking_t::always_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return result_type();
}
@@ -1433,13 +1244,13 @@ struct query_static_constexpr_member<
template <typename Executor, int I>
struct query_static_constexpr_member<
execution::detail::blocking::adapter<Executor>,
- execution::detail::blocking::never_t<I> >
+ execution::detail::blocking::never_t<I>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::blocking_t::always_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return result_type();
}
@@ -1452,14 +1263,14 @@ struct query_static_constexpr_member<
template <typename Executor, typename Property>
struct query_member<
execution::detail::blocking::adapter<Executor>, Property,
- typename enable_if<
+ enable_if_t<
can_query<const Executor&, Property>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<Executor, Property>::value));
- typedef typename query_result<Executor, Property>::type result_type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<Executor, Property>::value;
+ typedef query_result_t<Executor, Property> result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
@@ -1470,53 +1281,52 @@ template <typename Executor, int I>
struct require_member<
execution::detail::blocking::adapter<Executor>,
execution::detail::blocking::possibly_t<I>,
- typename enable_if<
+ enable_if_t<
can_require<
const Executor&,
execution::detail::blocking::possibly_t<I>
>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_require<const Executor&,
- execution::detail::blocking::possibly_t<I> >::value));
- typedef typename require_result<const Executor&,
- execution::detail::blocking::possibly_t<I> >::type result_type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_require<const Executor&,
+ execution::detail::blocking::possibly_t<I>>::value;
+ typedef require_result_t<const Executor&,
+ execution::detail::blocking::possibly_t<I>> result_type;
};
template <typename Executor, int I>
struct require_member<
execution::detail::blocking::adapter<Executor>,
execution::detail::blocking::never_t<I>,
- typename enable_if<
+ enable_if_t<
can_require<
const Executor&,
execution::detail::blocking::never_t<I>
>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_require<const Executor&,
- execution::detail::blocking::never_t<I> >::value));
- typedef typename require_result<const Executor&,
- execution::detail::blocking::never_t<I> >::type result_type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_require<const Executor&,
+ execution::detail::blocking::never_t<I>>::value;
+ typedef require_result_t<const Executor&,
+ execution::detail::blocking::never_t<I>> result_type;
};
template <typename Executor, typename Property>
struct require_member<
execution::detail::blocking::adapter<Executor>, Property,
- typename enable_if<
+ enable_if_t<
can_require<const Executor&, Property>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_require<Executor, Property>::value));
- typedef execution::detail::blocking::adapter<typename decay<
- typename require_result<Executor, Property>::type
- >::type> result_type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_require<Executor, Property>::value;
+ typedef execution::detail::blocking::adapter<
+ decay_t<require_result_t<Executor, Property>>> result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
@@ -1526,16 +1336,15 @@ struct require_member<
template <typename Executor, typename Property>
struct prefer_member<
execution::detail::blocking::adapter<Executor>, Property,
- typename enable_if<
+ enable_if_t<
can_prefer<const Executor&, Property>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_prefer<Executor, Property>::value));
- typedef execution::detail::blocking::adapter<typename decay<
- typename prefer_result<Executor, Property>::type
- >::type> result_type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_prefer<Executor, Property>::value;
+ typedef execution::detail::blocking::adapter<
+ decay_t<prefer_result_t<Executor, Property>>> result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
diff --git a/3rdparty/asio/include/asio/execution/blocking_adaptation.hpp b/3rdparty/asio/include/asio/execution/blocking_adaptation.hpp
index 2a3fe908df9..a2769b254a5 100644
--- a/3rdparty/asio/include/asio/execution/blocking_adaptation.hpp
+++ b/3rdparty/asio/include/asio/execution/blocking_adaptation.hpp
@@ -2,7 +2,7 @@
// execution/blocking_adaptation.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,10 +19,7 @@
#include "asio/detail/event.hpp"
#include "asio/detail/mutex.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/execution/execute.hpp"
#include "asio/execution/executor.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
#include "asio/is_applicable_property.hpp"
#include "asio/prefer.hpp"
#include "asio/query.hpp"
@@ -47,11 +44,9 @@ namespace execution {
/// allowed in order to apply the blocking_adaptation_t::allowed_t property.
struct blocking_adaptation_t
{
- /// The blocking_adaptation_t property applies to executors, senders, and
- /// schedulers.
+ /// The blocking_adaptation_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The top-level blocking_adaptation_t property cannot be required.
static constexpr bool is_requirable = false;
@@ -65,11 +60,9 @@ struct blocking_adaptation_t
/// A sub-property that indicates that automatic adaptation is not allowed.
struct disallowed_t
{
- /// The blocking_adaptation_t::disallowed_t property applies to executors,
- /// senders, and schedulers.
+ /// The blocking_adaptation_t::disallowed_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The blocking_adaptation_t::disallowed_t property can be required.
static constexpr bool is_requirable = true;
@@ -93,11 +86,9 @@ struct blocking_adaptation_t
/// A sub-property that indicates that automatic adaptation is allowed.
struct allowed_t
{
- /// The blocking_adaptation_t::allowed_t property applies to executors,
- /// senders, and schedulers.
+ /// The blocking_adaptation_t::allowed_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The blocking_adaptation_t::allowed_t property can be required.
static constexpr bool is_requirable = true;
@@ -165,39 +156,27 @@ struct blocking_adaptation_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = false);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
typedef blocking_adaptation_t polymorphic_query_result_type;
typedef detail::blocking_adaptation::disallowed_t<I> disallowed_t;
typedef detail::blocking_adaptation::allowed_t<I> allowed_t;
- ASIO_CONSTEXPR blocking_adaptation_t()
+ constexpr blocking_adaptation_t()
: value_(-1)
{
}
- ASIO_CONSTEXPR blocking_adaptation_t(disallowed_t)
+ constexpr blocking_adaptation_t(disallowed_t)
: value_(0)
{
}
- ASIO_CONSTEXPR blocking_adaptation_t(allowed_t)
+ constexpr blocking_adaptation_t(allowed_t)
: value_(1)
{
}
@@ -209,16 +188,14 @@ struct blocking_adaptation_t
struct type
{
template <typename P>
- auto query(ASIO_MOVE_ARG(P) p) const
+ auto query(P&& p) const
noexcept(
noexcept(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
)
)
-> decltype(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
);
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
@@ -233,17 +210,17 @@ struct blocking_adaptation_t
struct type
{
template <typename P>
- static constexpr auto query(ASIO_MOVE_ARG(P) p)
+ static constexpr auto query(P&& p)
noexcept(
noexcept(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
)
-> decltype(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
{
- return T::query(ASIO_MOVE_CAST(P)(p));
+ return T::query(static_cast<P&&>(p));
}
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
@@ -263,66 +240,64 @@ struct blocking_adaptation_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
+ static constexpr typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, disallowed_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, disallowed_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, disallowed_t>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, allowed_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::static_query<T, disallowed_t>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, allowed_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, allowed_t>::value();
}
template <typename E,
typename T = decltype(blocking_adaptation_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= blocking_adaptation_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- friend ASIO_CONSTEXPR bool operator==(
+ friend constexpr bool operator==(
const blocking_adaptation_t& a, const blocking_adaptation_t& b)
{
return a.value_ == b.value_;
}
- friend ASIO_CONSTEXPR bool operator!=(
+ friend constexpr bool operator!=(
const blocking_adaptation_t& a, const blocking_adaptation_t& b)
{
return a.value_ != b.value_;
@@ -330,26 +305,24 @@ struct blocking_adaptation_t
struct convertible_from_blocking_adaptation_t
{
- ASIO_CONSTEXPR convertible_from_blocking_adaptation_t(
+ constexpr convertible_from_blocking_adaptation_t(
blocking_adaptation_t)
{
}
};
template <typename Executor>
- friend ASIO_CONSTEXPR blocking_adaptation_t query(
+ friend constexpr blocking_adaptation_t query(
const Executor& ex, convertible_from_blocking_adaptation_t,
- typename enable_if<
+ enable_if_t<
can_query<const Executor&, disallowed_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&,
- blocking_adaptation_t<>::disallowed_t>::value))
+ noexcept(is_nothrow_query<const Executor&,
+ blocking_adaptation_t<>::disallowed_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, disallowed_t>::value))
+ noexcept(is_nothrow_query<const Executor&, disallowed_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -357,22 +330,20 @@ struct blocking_adaptation_t
}
template <typename Executor>
- friend ASIO_CONSTEXPR blocking_adaptation_t query(
+ friend constexpr blocking_adaptation_t query(
const Executor& ex, convertible_from_blocking_adaptation_t,
- typename enable_if<
+ enable_if_t<
!can_query<const Executor&, disallowed_t>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
can_query<const Executor&, allowed_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&,
- blocking_adaptation_t<>::allowed_t>::value))
+ noexcept(is_nothrow_query<const Executor&,
+ blocking_adaptation_t<>::allowed_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, allowed_t>::value))
+ noexcept(is_nothrow_query<const Executor&, allowed_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -382,10 +353,6 @@ struct blocking_adaptation_t
ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(disallowed_t, disallowed);
ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(allowed_t, allowed);
-#if !defined(ASIO_HAS_CONSTEXPR)
- static const blocking_adaptation_t instance;
-#endif // !defined(ASIO_HAS_CONSTEXPR)
-
private:
int value_;
};
@@ -397,11 +364,6 @@ const T blocking_adaptation_t<I>::static_query_v;
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_CONSTEXPR)
-template <int I>
-const blocking_adaptation_t<I> blocking_adaptation_t<I>::instance;
-#endif
-
template <int I>
const typename blocking_adaptation_t<I>::disallowed_t
blocking_adaptation_t<I>::disallowed;
@@ -417,26 +379,14 @@ struct disallowed_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
typedef blocking_adaptation_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR disallowed_t()
+ constexpr disallowed_t()
{
}
@@ -455,55 +405,62 @@ struct disallowed_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename T>
- static ASIO_CONSTEXPR disallowed_t static_query(
- typename enable_if<
+ static constexpr disallowed_t static_query(
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::query_free<T, disallowed_t>::is_valid
- >::type* = 0,
- typename enable_if<
- !can_query<T, allowed_t<I> >::value
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0,
+ enable_if_t<
+ !can_query<T, allowed_t<I>>::value
+ >* = 0) noexcept
{
return disallowed_t();
}
template <typename E, typename T = decltype(disallowed_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= disallowed_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR blocking_adaptation_t<I> value()
+ static constexpr blocking_adaptation_t<I> value()
{
return disallowed_t();
}
- friend ASIO_CONSTEXPR bool operator==(
- const disallowed_t&, const disallowed_t&)
+ friend constexpr bool operator==(const disallowed_t&, const disallowed_t&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const disallowed_t&, const disallowed_t&)
+ friend constexpr bool operator!=(const disallowed_t&, const disallowed_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const disallowed_t&, const allowed_t<I>&)
{
return false;
}
+
+ friend constexpr bool operator!=(const disallowed_t&, const allowed_t<I>&)
+ {
+ return true;
+ }
};
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
@@ -517,105 +474,91 @@ template <typename Executor>
class adapter
{
public:
- adapter(int, const Executor& e) ASIO_NOEXCEPT
+ adapter(int, const Executor& e) noexcept
: executor_(e)
{
}
- adapter(const adapter& other) ASIO_NOEXCEPT
+ adapter(const adapter& other) noexcept
: executor_(other.executor_)
{
}
-#if defined(ASIO_HAS_MOVE)
- adapter(adapter&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(Executor)(other.executor_))
+ adapter(adapter&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_))
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
template <int I>
- static ASIO_CONSTEXPR allowed_t<I> query(
- blocking_adaptation_t<I>) ASIO_NOEXCEPT
+ static constexpr allowed_t<I> query(blocking_adaptation_t<I>) noexcept
{
return allowed_t<I>();
}
template <int I>
- static ASIO_CONSTEXPR allowed_t<I> query(
- allowed_t<I>) ASIO_NOEXCEPT
+ static constexpr allowed_t<I> query(allowed_t<I>) noexcept
{
return allowed_t<I>();
}
template <int I>
- static ASIO_CONSTEXPR allowed_t<I> query(
- disallowed_t<I>) ASIO_NOEXCEPT
+ static constexpr allowed_t<I> query(disallowed_t<I>) noexcept
{
return allowed_t<I>();
}
template <typename Property>
- typename enable_if<
+ enable_if_t<
can_query<const Executor&, Property>::value,
- typename query_result<const Executor&, Property>::type
- >::type query(const Property& p) const
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, Property>::value))
+ query_result_t<const Executor&, Property>
+ > query(const Property& p) const
+ noexcept(is_nothrow_query<const Executor&, Property>::value)
{
return asio::query(executor_, p);
}
template <int I>
- Executor require(disallowed_t<I>) const ASIO_NOEXCEPT
+ Executor require(disallowed_t<I>) const noexcept
{
return executor_;
}
template <typename Property>
- typename enable_if<
+ enable_if_t<
can_require<const Executor&, Property>::value,
- adapter<typename decay<
- typename require_result<const Executor&, Property>::type
- >::type>
- >::type require(const Property& p) const
- ASIO_NOEXCEPT_IF((
- is_nothrow_require<const Executor&, Property>::value))
+ adapter<decay_t<require_result_t<const Executor&, Property>>>
+ > require(const Property& p) const
+ noexcept(is_nothrow_require<const Executor&, Property>::value)
{
- return adapter<typename decay<
- typename require_result<const Executor&, Property>::type
- >::type>(0, asio::require(executor_, p));
+ return adapter<decay_t<require_result_t<const Executor&, Property>>>(
+ 0, asio::require(executor_, p));
}
template <typename Property>
- typename enable_if<
+ enable_if_t<
can_prefer<const Executor&, Property>::value,
- adapter<typename decay<
- typename prefer_result<const Executor&, Property>::type
- >::type>
- >::type prefer(const Property& p) const
- ASIO_NOEXCEPT_IF((
- is_nothrow_prefer<const Executor&, Property>::value))
+ adapter<decay_t<prefer_result_t<const Executor&, Property>>>
+ > prefer(const Property& p) const
+ noexcept(is_nothrow_prefer<const Executor&, Property>::value)
{
- return adapter<typename decay<
- typename prefer_result<const Executor&, Property>::type
- >::type>(0, asio::prefer(executor_, p));
+ return adapter<decay_t<prefer_result_t<const Executor&, Property>>>(
+ 0, asio::prefer(executor_, p));
}
template <typename Function>
- typename enable_if<
- execution::can_execute<const Executor&, Function>::value
- >::type execute(ASIO_MOVE_ARG(Function) f) const
+ enable_if_t<
+ traits::execute_member<const Executor&, Function>::is_valid
+ > execute(Function&& f) const
{
- execution::execute(executor_, ASIO_MOVE_CAST(Function)(f));
+ executor_.execute(static_cast<Function&&>(f));
}
- friend bool operator==(const adapter& a, const adapter& b) ASIO_NOEXCEPT
+ friend bool operator==(const adapter& a, const adapter& b) noexcept
{
return a.executor_ == b.executor_;
}
- friend bool operator!=(const adapter& a, const adapter& b) ASIO_NOEXCEPT
+ friend bool operator!=(const adapter& a, const adapter& b) noexcept
{
return a.executor_ != b.executor_;
}
@@ -629,26 +572,14 @@ struct allowed_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = false;
typedef blocking_adaptation_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR allowed_t()
+ constexpr allowed_t()
{
}
@@ -667,44 +598,49 @@ struct allowed_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
+ static constexpr typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename E, typename T = decltype(allowed_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = allowed_t::static_query<E>();
+ static constexpr const T static_query_v = allowed_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR blocking_adaptation_t<I> value()
+ static constexpr blocking_adaptation_t<I> value()
{
return allowed_t();
}
- friend ASIO_CONSTEXPR bool operator==(
- const allowed_t&, const allowed_t&)
+ friend constexpr bool operator==(const allowed_t&, const allowed_t&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const allowed_t&, const allowed_t&)
+ friend constexpr bool operator!=(const allowed_t&, const allowed_t&)
{
return false;
}
+ friend constexpr bool operator==(const allowed_t&, const disallowed_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const allowed_t&, const disallowed_t<I>&)
+ {
+ return true;
+ }
+
template <typename Executor>
friend adapter<Executor> require(
const Executor& e, const allowed_t&,
- typename enable_if<
+ enable_if_t<
is_executor<Executor>::value
- >::type* = 0)
+ >* = 0)
{
return adapter<Executor>(0, e);
}
@@ -722,17 +658,17 @@ class blocking_execute_state
{
public:
template <typename F>
- blocking_execute_state(ASIO_MOVE_ARG(F) f)
- : func_(ASIO_MOVE_CAST(F)(f)),
+ blocking_execute_state(F&& f)
+ : func_(static_cast<F&&>(f)),
is_complete_(false)
{
}
template <typename Executor>
- void execute_and_wait(ASIO_MOVE_ARG(Executor) ex)
+ void execute_and_wait(Executor&& ex)
{
handler h = { this };
- execution::execute(ASIO_MOVE_CAST(Executor)(ex), h);
+ ex.execute(h);
asio::detail::mutex::scoped_lock lock(mutex_);
while (!is_complete_)
event_.wait(lock);
@@ -769,11 +705,11 @@ public:
template <typename Executor, typename Function>
void blocking_execute(
- ASIO_MOVE_ARG(Executor) ex,
- ASIO_MOVE_ARG(Function) func)
+ Executor&& ex,
+ Function&& func)
{
- typedef typename decay<Function>::type func_t;
- blocking_execute_state<func_t> state(ASIO_MOVE_CAST(Function)(func));
+ typedef decay_t<Function> func_t;
+ blocking_execute_state<func_t> state(static_cast<Function&&>(func));
state.execute_and_wait(ex);
}
@@ -782,12 +718,7 @@ void blocking_execute(
typedef detail::blocking_adaptation_t<> blocking_adaptation_t;
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr blocking_adaptation_t blocking_adaptation;
-#else // defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-namespace { static const blocking_adaptation_t&
- blocking_adaptation = blocking_adaptation_t::instance; }
-#endif
} // namespace execution
@@ -795,52 +726,19 @@ namespace { static const blocking_adaptation_t&
template <typename T>
struct is_applicable_property<T, execution::blocking_adaptation_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::blocking_adaptation_t::disallowed_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::blocking_adaptation_t::allowed_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
@@ -852,27 +750,27 @@ namespace traits {
template <typename T>
struct query_free_default<T, execution::blocking_adaptation_t,
- typename enable_if<
+ enable_if_t<
can_query<T, execution::blocking_adaptation_t::disallowed_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = (is_nothrow_query<T,
- execution::blocking_adaptation_t::disallowed_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::blocking_adaptation_t::disallowed_t>::value;
typedef execution::blocking_adaptation_t result_type;
};
template <typename T>
struct query_free_default<T, execution::blocking_adaptation_t,
- typename enable_if<
+ enable_if_t<
!can_query<T, execution::blocking_adaptation_t::disallowed_t>::value
&& can_query<T, execution::blocking_adaptation_t::allowed_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::blocking_adaptation_t::allowed_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::blocking_adaptation_t::allowed_t>::value;
typedef execution::blocking_adaptation_t result_type;
};
@@ -884,18 +782,18 @@ struct query_free_default<T, execution::blocking_adaptation_t,
template <typename T>
struct static_query<T, execution::blocking_adaptation_t,
- typename enable_if<
+ enable_if_t<
execution::detail::blocking_adaptation_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::blocking_adaptation_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::blocking_adaptation_t<0>::
query_static_constexpr_member<T>::value();
@@ -904,22 +802,22 @@ struct static_query<T, execution::blocking_adaptation_t,
template <typename T>
struct static_query<T, execution::blocking_adaptation_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::blocking_adaptation_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::blocking_adaptation_t<0>::
query_member<T>::is_valid
&& traits::static_query<T,
execution::blocking_adaptation_t::disallowed_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::blocking_adaptation_t::disallowed_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T,
execution::blocking_adaptation_t::disallowed_t>::value();
@@ -928,7 +826,7 @@ struct static_query<T, execution::blocking_adaptation_t,
template <typename T>
struct static_query<T, execution::blocking_adaptation_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::blocking_adaptation_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::blocking_adaptation_t<0>::
@@ -937,15 +835,15 @@ struct static_query<T, execution::blocking_adaptation_t,
execution::blocking_adaptation_t::disallowed_t>::is_valid
&& traits::static_query<T,
execution::blocking_adaptation_t::allowed_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::blocking_adaptation_t::allowed_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T,
execution::blocking_adaptation_t::allowed_t>::value();
@@ -954,18 +852,18 @@ struct static_query<T, execution::blocking_adaptation_t,
template <typename T>
struct static_query<T, execution::blocking_adaptation_t::disallowed_t,
- typename enable_if<
+ enable_if_t<
execution::detail::blocking_adaptation::disallowed_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::blocking_adaptation::disallowed_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::blocking_adaptation::disallowed_t<0>::
query_static_constexpr_member<T>::value();
@@ -974,7 +872,7 @@ struct static_query<T, execution::blocking_adaptation_t::disallowed_t,
template <typename T>
struct static_query<T, execution::blocking_adaptation_t::disallowed_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::blocking_adaptation::disallowed_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::blocking_adaptation::disallowed_t<0>::
@@ -982,14 +880,14 @@ struct static_query<T, execution::blocking_adaptation_t::disallowed_t,
&& !traits::query_free<T,
execution::blocking_adaptation_t::disallowed_t>::is_valid
&& !can_query<T, execution::blocking_adaptation_t::allowed_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::blocking_adaptation_t::disallowed_t result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return result_type();
}
@@ -997,18 +895,18 @@ struct static_query<T, execution::blocking_adaptation_t::disallowed_t,
template <typename T>
struct static_query<T, execution::blocking_adaptation_t::allowed_t,
- typename enable_if<
+ enable_if_t<
execution::detail::blocking_adaptation::allowed_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::blocking_adaptation::allowed_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::blocking_adaptation::allowed_t<0>::
query_static_constexpr_member<T>::value();
@@ -1018,45 +916,17 @@ struct static_query<T, execution::blocking_adaptation_t::allowed_t,
#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
-template <typename T>
-struct static_require<T, execution::blocking_adaptation_t::disallowed_t,
- typename enable_if<
- static_query<T, execution::blocking_adaptation_t::disallowed_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::blocking_adaptation_t::disallowed_t>::result_type,
- execution::blocking_adaptation_t::disallowed_t>::value));
-};
-
-template <typename T>
-struct static_require<T, execution::blocking_adaptation_t::allowed_t,
- typename enable_if<
- static_query<T, execution::blocking_adaptation_t::allowed_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::blocking_adaptation_t::allowed_t>::result_type,
- execution::blocking_adaptation_t::allowed_t>::value));
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
#if !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
template <typename T>
struct require_free_default<T, execution::blocking_adaptation_t::allowed_t,
- typename enable_if<
- is_same<T, typename decay<T>::type>::value
+ enable_if_t<
+ is_same<T, decay_t<T>>::value
&& execution::is_executor<T>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef execution::detail::blocking_adaptation::adapter<T> result_type;
};
@@ -1066,10 +936,10 @@ struct require_free_default<T, execution::blocking_adaptation_t::allowed_t,
template <typename Executor>
struct equality_comparable<
- execution::detail::blocking_adaptation::adapter<Executor> >
+ execution::detail::blocking_adaptation::adapter<Executor>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -1080,8 +950,8 @@ template <typename Executor, typename Function>
struct execute_member<
execution::detail::blocking_adaptation::adapter<Executor>, Function>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
@@ -1092,13 +962,13 @@ struct execute_member<
template <typename Executor, int I>
struct query_static_constexpr_member<
execution::detail::blocking_adaptation::adapter<Executor>,
- execution::detail::blocking_adaptation_t<I> >
+ execution::detail::blocking_adaptation_t<I>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::blocking_adaptation_t::allowed_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return result_type();
}
@@ -1107,13 +977,13 @@ struct query_static_constexpr_member<
template <typename Executor, int I>
struct query_static_constexpr_member<
execution::detail::blocking_adaptation::adapter<Executor>,
- execution::detail::blocking_adaptation::allowed_t<I> >
+ execution::detail::blocking_adaptation::allowed_t<I>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::blocking_adaptation_t::allowed_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return result_type();
}
@@ -1122,13 +992,13 @@ struct query_static_constexpr_member<
template <typename Executor, int I>
struct query_static_constexpr_member<
execution::detail::blocking_adaptation::adapter<Executor>,
- execution::detail::blocking_adaptation::disallowed_t<I> >
+ execution::detail::blocking_adaptation::disallowed_t<I>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::blocking_adaptation_t::allowed_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return result_type();
}
@@ -1141,14 +1011,14 @@ struct query_static_constexpr_member<
template <typename Executor, typename Property>
struct query_member<
execution::detail::blocking_adaptation::adapter<Executor>, Property,
- typename enable_if<
+ enable_if_t<
can_query<const Executor&, Property>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<Executor, Property>::value));
- typedef typename query_result<Executor, Property>::type result_type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<Executor, Property>::value;
+ typedef query_result_t<Executor, Property> result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
@@ -1158,26 +1028,25 @@ struct query_member<
template <typename Executor, int I>
struct require_member<
execution::detail::blocking_adaptation::adapter<Executor>,
- execution::detail::blocking_adaptation::disallowed_t<I> >
+ execution::detail::blocking_adaptation::disallowed_t<I>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Executor result_type;
};
template <typename Executor, typename Property>
struct require_member<
execution::detail::blocking_adaptation::adapter<Executor>, Property,
- typename enable_if<
+ enable_if_t<
can_require<const Executor&, Property>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_require<Executor, Property>::value));
- typedef execution::detail::blocking_adaptation::adapter<typename decay<
- typename require_result<Executor, Property>::type
- >::type> result_type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_require<Executor, Property>::value;
+ typedef execution::detail::blocking_adaptation::adapter<
+ decay_t<require_result_t<Executor, Property>>> result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
@@ -1187,16 +1056,15 @@ struct require_member<
template <typename Executor, typename Property>
struct prefer_member<
execution::detail::blocking_adaptation::adapter<Executor>, Property,
- typename enable_if<
+ enable_if_t<
can_prefer<const Executor&, Property>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_prefer<Executor, Property>::value));
- typedef execution::detail::blocking_adaptation::adapter<typename decay<
- typename prefer_result<Executor, Property>::type
- >::type> result_type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_prefer<Executor, Property>::value;
+ typedef execution::detail::blocking_adaptation::adapter<
+ decay_t<prefer_result_t<Executor, Property>>> result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
diff --git a/3rdparty/asio/include/asio/execution/bulk_execute.hpp b/3rdparty/asio/include/asio/execution/bulk_execute.hpp
deleted file mode 100644
index 2bc13c954c0..00000000000
--- a/3rdparty/asio/include/asio/execution/bulk_execute.hpp
+++ /dev/null
@@ -1,397 +0,0 @@
-//
-// execution/bulk_execute.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_BULK_EXECUTE_HPP
-#define ASIO_EXECUTION_BULK_EXECUTE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/bulk_guarantee.hpp"
-#include "asio/execution/detail/bulk_sender.hpp"
-#include "asio/execution/executor.hpp"
-#include "asio/execution/sender.hpp"
-#include "asio/traits/bulk_execute_member.hpp"
-#include "asio/traits/bulk_execute_free.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-#if defined(GENERATING_DOCUMENTATION)
-
-namespace asio {
-namespace execution {
-
-/// A customisation point that creates a bulk sender.
-/**
- * The name <tt>execution::bulk_execute</tt> denotes a customisation point
- * object. If <tt>is_convertible_v<N, size_t></tt> is true, then the expression
- * <tt>execution::bulk_execute(S, F, N)</tt> for some subexpressions
- * <tt>S</tt>, <tt>F</tt>, and <tt>N</tt> is expression-equivalent to:
- *
- * @li <tt>S.bulk_execute(F, N)</tt>, if that expression is valid. If the
- * function selected does not execute <tt>N</tt> invocations of the function
- * object <tt>F</tt> on the executor <tt>S</tt> in bulk with forward progress
- * guarantee <tt>asio::query(S, execution::bulk_guarantee)</tt>, and
- * the result of that function does not model <tt>sender<void></tt>, the
- * program is ill-formed with no diagnostic required.
- *
- * @li Otherwise, <tt>bulk_execute(S, F, N)</tt>, if that expression is valid,
- * with overload resolution performed in a context that includes the
- * declaration <tt>void bulk_execute();</tt> and that does not include a
- * declaration of <tt>execution::bulk_execute</tt>. If the function selected
- * by overload resolution does not execute <tt>N</tt> invocations of the
- * function object <tt>F</tt> on the executor <tt>S</tt> in bulk with forward
- * progress guarantee <tt>asio::query(E,
- * execution::bulk_guarantee)</tt>, and the result of that function does not
- * model <tt>sender<void></tt>, the program is ill-formed with no diagnostic
- * required.
- *
- * @li Otherwise, if the types <tt>F</tt> and
- * <tt>executor_index_t<remove_cvref_t<S>></tt> model <tt>invocable</tt> and
- * if <tt>asio::query(S, execution::bulk_guarantee)</tt> equals
- * <tt>execution::bulk_guarantee.unsequenced</tt>, then
- *
- * - Evaluates <tt>DECAY_COPY(std::forward<decltype(F)>(F))</tt> on the
- * calling thread to create a function object <tt>cf</tt>. [Note:
- * Additional copies of <tt>cf</tt> may subsequently be created. --end
- * note.]
- *
- * - For each value of <tt>i</tt> in <tt>N</tt>, <tt>cf(i)</tt> (or copy of
- * <tt>cf</tt>)) will be invoked at most once by an execution agent that is
- * unique for each value of <tt>i</tt>.
- *
- * - May block pending completion of one or more invocations of <tt>cf</tt>.
- *
- * - Synchronizes with (C++Std [intro.multithread]) the invocations of
- * <tt>cf</tt>.
- *
- * @li Otherwise, <tt>execution::bulk_execute(S, F, N)</tt> is ill-formed.
- */
-inline constexpr unspecified bulk_execute = unspecified;
-
-/// A type trait that determines whether a @c bulk_execute expression is
-/// well-formed.
-/**
- * Class template @c can_bulk_execute is a trait that is derived from @c
- * true_type if the expression <tt>execution::bulk_execute(std::declval<S>(),
- * std::declval<F>(), std::declval<N>)</tt> is well formed; otherwise @c
- * false_type.
- */
-template <typename S, typename F, typename N>
-struct can_bulk_execute :
- integral_constant<bool, automatically_determined>
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-namespace asio_execution_bulk_execute_fn {
-
-using asio::declval;
-using asio::enable_if;
-using asio::execution::bulk_guarantee_t;
-using asio::execution::detail::bulk_sender;
-using asio::execution::executor_index;
-using asio::execution::is_sender;
-using asio::is_convertible;
-using asio::is_same;
-using asio::remove_cvref;
-using asio::result_of;
-using asio::traits::bulk_execute_free;
-using asio::traits::bulk_execute_member;
-using asio::traits::static_require;
-
-void bulk_execute();
-
-enum overload_type
-{
- call_member,
- call_free,
- adapter,
- ill_formed
-};
-
-template <typename S, typename Args, typename = void, typename = void,
- typename = void, typename = void, typename = void, typename = void>
-struct call_traits
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename S, typename F, typename N>
-struct call_traits<S, void(F, N),
- typename enable_if<
- is_convertible<N, std::size_t>::value
- >::type,
- typename enable_if<
- bulk_execute_member<S, F, N>::is_valid
- >::type,
- typename enable_if<
- is_sender<
- typename bulk_execute_member<S, F, N>::result_type
- >::value
- >::type> :
- bulk_execute_member<S, F, N>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
-};
-
-template <typename S, typename F, typename N>
-struct call_traits<S, void(F, N),
- typename enable_if<
- is_convertible<N, std::size_t>::value
- >::type,
- typename enable_if<
- !bulk_execute_member<S, F, N>::is_valid
- >::type,
- typename enable_if<
- bulk_execute_free<S, F, N>::is_valid
- >::type,
- typename enable_if<
- is_sender<
- typename bulk_execute_free<S, F, N>::result_type
- >::value
- >::type> :
- bulk_execute_free<S, F, N>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
-};
-
-template <typename S, typename F, typename N>
-struct call_traits<S, void(F, N),
- typename enable_if<
- is_convertible<N, std::size_t>::value
- >::type,
- typename enable_if<
- !bulk_execute_member<S, F, N>::is_valid
- >::type,
- typename enable_if<
- !bulk_execute_free<S, F, N>::is_valid
- >::type,
- typename enable_if<
- is_sender<S>::value
- >::type,
- typename enable_if<
- is_same<
- typename result_of<
- F(typename executor_index<typename remove_cvref<S>::type>::type)
- >::type,
- typename result_of<
- F(typename executor_index<typename remove_cvref<S>::type>::type)
- >::type
- >::value
- >::type,
- typename enable_if<
- static_require<S, bulk_guarantee_t::unsequenced_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef bulk_sender<S, F, N> result_type;
-};
-
-struct impl
-{
-#if defined(ASIO_HAS_MOVE)
- template <typename S, typename F, typename N>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(F, N)>::overload == call_member,
- typename call_traits<S, void(F, N)>::result_type
- >::type
- operator()(S&& s, F&& f, N&& n) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(F, N)>::is_noexcept))
- {
- return ASIO_MOVE_CAST(S)(s).bulk_execute(
- ASIO_MOVE_CAST(F)(f), ASIO_MOVE_CAST(N)(n));
- }
-
- template <typename S, typename F, typename N>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(F, N)>::overload == call_free,
- typename call_traits<S, void(F, N)>::result_type
- >::type
- operator()(S&& s, F&& f, N&& n) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(F, N)>::is_noexcept))
- {
- return bulk_execute(ASIO_MOVE_CAST(S)(s),
- ASIO_MOVE_CAST(F)(f), ASIO_MOVE_CAST(N)(n));
- }
-
- template <typename S, typename F, typename N>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(F, N)>::overload == adapter,
- typename call_traits<S, void(F, N)>::result_type
- >::type
- operator()(S&& s, F&& f, N&& n) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(F, N)>::is_noexcept))
- {
- return typename call_traits<S, void(F, N)>::result_type(
- ASIO_MOVE_CAST(S)(s), ASIO_MOVE_CAST(F)(f),
- ASIO_MOVE_CAST(N)(n));
- }
-#else // defined(ASIO_HAS_MOVE)
- template <typename S, typename F, typename N>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(const F&, const N&)>::overload == call_member,
- typename call_traits<S, void(const F&, const N&)>::result_type
- >::type
- operator()(S& s, const F& f, const N& n) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(const F&, const N&)>::is_noexcept))
- {
- return s.bulk_execute(ASIO_MOVE_CAST(F)(f),
- ASIO_MOVE_CAST(N)(n));
- }
-
- template <typename S, typename F, typename N>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(const F&, const N&)>::overload == call_member,
- typename call_traits<S, void(const F&, const N&)>::result_type
- >::type
- operator()(const S& s, const F& f, const N& n) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(const F&, const N&)>::is_noexcept))
- {
- return s.bulk_execute(ASIO_MOVE_CAST(F)(f),
- ASIO_MOVE_CAST(N)(n));
- }
-
- template <typename S, typename F, typename N>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(const F&, const N&)>::overload == call_free,
- typename call_traits<S, void(const F&, const N&)>::result_type
- >::type
- operator()(S& s, const F& f, const N& n) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(const F&, const N&)>::is_noexcept))
- {
- return bulk_execute(s, ASIO_MOVE_CAST(F)(f),
- ASIO_MOVE_CAST(N)(n));
- }
-
- template <typename S, typename F, typename N>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(const F&, const N&)>::overload == call_free,
- typename call_traits<S, void(const F&, const N&)>::result_type
- >::type
- operator()(const S& s, const F& f, const N& n) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(const F&, const N&)>::is_noexcept))
- {
- return bulk_execute(s, ASIO_MOVE_CAST(F)(f),
- ASIO_MOVE_CAST(N)(n));
- }
-
- template <typename S, typename F, typename N>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(const F&, const N&)>::overload == adapter,
- typename call_traits<S, void(const F&, const N&)>::result_type
- >::type
- operator()(S& s, const F& f, const N& n) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(const F&, const N&)>::is_noexcept))
- {
- return typename call_traits<S, void(const F&, const N&)>::result_type(
- s, ASIO_MOVE_CAST(F)(f), ASIO_MOVE_CAST(N)(n));
- }
-
- template <typename S, typename F, typename N>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(const F&, const N&)>::overload == adapter,
- typename call_traits<S, void(const F&, const N&)>::result_type
- >::type
- operator()(const S& s, const F& f, const N& n) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(const F&, const N&)>::is_noexcept))
- {
- return typename call_traits<S, void(const F&, const N&)>::result_type(
- s, ASIO_MOVE_CAST(F)(f), ASIO_MOVE_CAST(N)(n));
- }
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-template <typename T = impl>
-struct static_instance
-{
- static const T instance;
-};
-
-template <typename T>
-const T static_instance<T>::instance = {};
-
-} // namespace asio_execution_bulk_execute_fn
-namespace asio {
-namespace execution {
-namespace {
-
-static ASIO_CONSTEXPR
- const asio_execution_bulk_execute_fn::impl& bulk_execute =
- asio_execution_bulk_execute_fn::static_instance<>::instance;
-
-} // namespace
-
-template <typename S, typename F, typename N>
-struct can_bulk_execute :
- integral_constant<bool,
- asio_execution_bulk_execute_fn::call_traits<
- S, void(F, N)>::overload !=
- asio_execution_bulk_execute_fn::ill_formed>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename F, typename N>
-constexpr bool can_bulk_execute_v = can_bulk_execute<S, F, N>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename F, typename N>
-struct is_nothrow_bulk_execute :
- integral_constant<bool,
- asio_execution_bulk_execute_fn::call_traits<
- S, void(F, N)>::is_noexcept>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename F, typename N>
-constexpr bool is_nothrow_bulk_execute_v
- = is_nothrow_bulk_execute<S, F, N>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename F, typename N>
-struct bulk_execute_result
-{
- typedef typename asio_execution_bulk_execute_fn::call_traits<
- S, void(F, N)>::result_type type;
-};
-
-} // namespace execution
-} // namespace asio
-
-#endif // defined(GENERATING_DOCUMENTATION)
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_BULK_EXECUTE_HPP
diff --git a/3rdparty/asio/include/asio/execution/bulk_guarantee.hpp b/3rdparty/asio/include/asio/execution/bulk_guarantee.hpp
deleted file mode 100644
index 6482218357d..00000000000
--- a/3rdparty/asio/include/asio/execution/bulk_guarantee.hpp
+++ /dev/null
@@ -1,1215 +0,0 @@
-//
-// execution/bulk_guarantee.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_BULK_GUARANTEE_HPP
-#define ASIO_EXECUTION_BULK_GUARANTEE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/executor.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
-#include "asio/is_applicable_property.hpp"
-#include "asio/query.hpp"
-#include "asio/traits/query_free.hpp"
-#include "asio/traits/query_member.hpp"
-#include "asio/traits/query_static_constexpr_member.hpp"
-#include "asio/traits/static_query.hpp"
-#include "asio/traits/static_require.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-#if defined(GENERATING_DOCUMENTATION)
-
-namespace execution {
-
-/// A property to communicate the forward progress and ordering guarantees of
-/// execution agents associated with the bulk execution.
-struct bulk_guarantee_t
-{
- /// The bulk_guarantee_t property applies to executors, senders, and
- /// schedulers.
- template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
-
- /// The top-level bulk_guarantee_t property cannot be required.
- static constexpr bool is_requirable = false;
-
- /// The top-level bulk_guarantee_t property cannot be preferred.
- static constexpr bool is_preferable = false;
-
- /// The type returned by queries against an @c any_executor.
- typedef bulk_guarantee_t polymorphic_query_result_type;
-
- /// A sub-property that indicates that execution agents within the same bulk
- /// execution may be parallelised and vectorised.
- struct unsequenced_t
- {
- /// The bulk_guarantee_t::unsequenced_t property applies to executors,
- /// senders, and schedulers.
- template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
-
- /// The bulk_guarantee_t::unsequenced_t property can be required.
- static constexpr bool is_requirable = true;
-
- /// The bulk_guarantee_t::unsequenced_t property can be preferred.
- static constexpr bool is_preferable = true;
-
- /// The type returned by queries against an @c any_executor.
- typedef bulk_guarantee_t polymorphic_query_result_type;
-
- /// Default constructor.
- constexpr unsequenced_t();
-
- /// Get the value associated with a property object.
- /**
- * @returns unsequenced_t();
- */
- static constexpr bulk_guarantee_t value();
- };
-
- /// A sub-property that indicates that execution agents within the same bulk
- /// execution may not be parallelised and vectorised.
- struct sequenced_t
- {
- /// The bulk_guarantee_t::sequenced_t property applies to executors,
- /// senders, and schedulers.
- template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
-
- /// The bulk_guarantee_t::sequenced_t property can be required.
- static constexpr bool is_requirable = true;
-
- /// The bulk_guarantee_t::sequenced_t property can be preferred.
- static constexpr bool is_preferable = true;
-
- /// The type returned by queries against an @c any_executor.
- typedef bulk_guarantee_t polymorphic_query_result_type;
-
- /// Default constructor.
- constexpr sequenced_t();
-
- /// Get the value associated with a property object.
- /**
- * @returns sequenced_t();
- */
- static constexpr bulk_guarantee_t value();
- };
-
- /// A sub-property that indicates that execution agents within the same bulk
- /// execution may be parallelised.
- struct parallel_t
- {
- /// The bulk_guarantee_t::parallel_t property applies to executors,
- /// senders, and schedulers.
- template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
-
- /// The bulk_guarantee_t::parallel_t property can be required.
- static constexpr bool is_requirable = true;
-
- /// The bulk_guarantee_t::parallel_t property can be preferred.
- static constexpr bool is_preferable = true;
-
- /// The type returned by queries against an @c any_executor.
- typedef bulk_guarantee_t polymorphic_query_result_type;
-
- /// Default constructor.
- constexpr parallel_t();
-
- /// Get the value associated with a property object.
- /**
- * @returns parallel_t();
- */
- static constexpr bulk_guarantee_t value();
- };
-
- /// A special value used for accessing the bulk_guarantee_t::unsequenced_t
- /// property.
- static constexpr unsequenced_t unsequenced;
-
- /// A special value used for accessing the bulk_guarantee_t::sequenced_t
- /// property.
- static constexpr sequenced_t sequenced;
-
- /// A special value used for accessing the bulk_guarantee_t::parallel_t
- /// property.
- static constexpr parallel_t parallel;
-
- /// Default constructor.
- constexpr bulk_guarantee_t();
-
- /// Construct from a sub-property value.
- constexpr bulk_guarantee_t(unsequenced_t);
-
- /// Construct from a sub-property value.
- constexpr bulk_guarantee_t(sequenced_t);
-
- /// Construct from a sub-property value.
- constexpr bulk_guarantee_t(parallel_t);
-
- /// Compare property values for equality.
- friend constexpr bool operator==(
- const bulk_guarantee_t& a, const bulk_guarantee_t& b) noexcept;
-
- /// Compare property values for inequality.
- friend constexpr bool operator!=(
- const bulk_guarantee_t& a, const bulk_guarantee_t& b) noexcept;
-};
-
-/// A special value used for accessing the bulk_guarantee_t property.
-constexpr bulk_guarantee_t bulk_guarantee;
-
-} // namespace execution
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-namespace execution {
-namespace detail {
-namespace bulk_guarantee {
-
-template <int I> struct unsequenced_t;
-template <int I> struct sequenced_t;
-template <int I> struct parallel_t;
-
-} // namespace bulk_guarantee
-
-template <int I = 0>
-struct bulk_guarantee_t
-{
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
- template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = false);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
- typedef bulk_guarantee_t polymorphic_query_result_type;
-
- typedef detail::bulk_guarantee::unsequenced_t<I> unsequenced_t;
- typedef detail::bulk_guarantee::sequenced_t<I> sequenced_t;
- typedef detail::bulk_guarantee::parallel_t<I> parallel_t;
-
- ASIO_CONSTEXPR bulk_guarantee_t()
- : value_(-1)
- {
- }
-
- ASIO_CONSTEXPR bulk_guarantee_t(unsequenced_t)
- : value_(0)
- {
- }
-
- ASIO_CONSTEXPR bulk_guarantee_t(sequenced_t)
- : value_(1)
- {
- }
-
- ASIO_CONSTEXPR bulk_guarantee_t(parallel_t)
- : value_(2)
- {
- }
-
- template <typename T>
- struct proxy
- {
-#if defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
- struct type
- {
- template <typename P>
- auto query(ASIO_MOVE_ARG(P) p) const
- noexcept(
- noexcept(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
- )
- )
- -> decltype(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
- );
- };
-#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
- typedef T type;
-#endif // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
- };
-
- template <typename T>
- struct static_proxy
- {
-#if defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
- struct type
- {
- template <typename P>
- static constexpr auto query(ASIO_MOVE_ARG(P) p)
- noexcept(
- noexcept(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
- )
- )
- -> decltype(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
- )
- {
- return T::query(ASIO_MOVE_CAST(P)(p));
- }
- };
-#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
- typedef T type;
-#endif // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
- };
-
- template <typename T>
- struct query_member :
- traits::query_member<typename proxy<T>::type, bulk_guarantee_t> {};
-
- template <typename T>
- struct query_static_constexpr_member :
- traits::query_static_constexpr_member<
- typename static_proxy<T>::type, bulk_guarantee_t> {};
-
-#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
- && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
- static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
- {
- return query_static_constexpr_member<T>::value();
- }
-
- template <typename T>
- static ASIO_CONSTEXPR
- typename traits::static_query<T, unsequenced_t>::result_type
- static_query(
- typename enable_if<
- !query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
- !query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
- traits::static_query<T, unsequenced_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
- {
- return traits::static_query<T, unsequenced_t>::value();
- }
-
- template <typename T>
- static ASIO_CONSTEXPR
- typename traits::static_query<T, sequenced_t>::result_type
- static_query(
- typename enable_if<
- !query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
- !query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
- !traits::static_query<T, unsequenced_t>::is_valid
- >::type* = 0,
- typename enable_if<
- traits::static_query<T, sequenced_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
- {
- return traits::static_query<T, sequenced_t>::value();
- }
-
- template <typename T>
- static ASIO_CONSTEXPR
- typename traits::static_query<T, parallel_t>::result_type
- static_query(
- typename enable_if<
- !query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
- !query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
- !traits::static_query<T, unsequenced_t>::is_valid
- >::type* = 0,
- typename enable_if<
- !traits::static_query<T, sequenced_t>::is_valid
- >::type* = 0,
- typename enable_if<
- traits::static_query<T, parallel_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
- {
- return traits::static_query<T, parallel_t>::value();
- }
-
- template <typename E,
- typename T = decltype(bulk_guarantee_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = bulk_guarantee_t::static_query<E>();
-#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
- // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
- friend ASIO_CONSTEXPR bool operator==(
- const bulk_guarantee_t& a, const bulk_guarantee_t& b)
- {
- return a.value_ == b.value_;
- }
-
- friend ASIO_CONSTEXPR bool operator!=(
- const bulk_guarantee_t& a, const bulk_guarantee_t& b)
- {
- return a.value_ != b.value_;
- }
-
- struct convertible_from_bulk_guarantee_t
- {
- ASIO_CONSTEXPR convertible_from_bulk_guarantee_t(bulk_guarantee_t) {}
- };
-
- template <typename Executor>
- friend ASIO_CONSTEXPR bulk_guarantee_t query(
- const Executor& ex, convertible_from_bulk_guarantee_t,
- typename enable_if<
- can_query<const Executor&, unsequenced_t>::value
- >::type* = 0)
-#if !defined(__clang__) // Clang crashes if noexcept is used here.
-#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&,
- bulk_guarantee_t<>::unsequenced_t>::value))
-#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, unsequenced_t>::value))
-#endif // defined(ASIO_MSVC)
-#endif // !defined(__clang__)
- {
- return asio::query(ex, unsequenced_t());
- }
-
- template <typename Executor>
- friend ASIO_CONSTEXPR bulk_guarantee_t query(
- const Executor& ex, convertible_from_bulk_guarantee_t,
- typename enable_if<
- !can_query<const Executor&, unsequenced_t>::value
- >::type* = 0,
- typename enable_if<
- can_query<const Executor&, sequenced_t>::value
- >::type* = 0)
-#if !defined(__clang__) // Clang crashes if noexcept is used here.
-#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&,
- bulk_guarantee_t<>::sequenced_t>::value))
-#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, sequenced_t>::value))
-#endif // defined(ASIO_MSVC)
-#endif // !defined(__clang__)
- {
- return asio::query(ex, sequenced_t());
- }
-
- template <typename Executor>
- friend ASIO_CONSTEXPR bulk_guarantee_t query(
- const Executor& ex, convertible_from_bulk_guarantee_t,
- typename enable_if<
- !can_query<const Executor&, unsequenced_t>::value
- >::type* = 0,
- typename enable_if<
- !can_query<const Executor&, sequenced_t>::value
- >::type* = 0,
- typename enable_if<
- can_query<const Executor&, parallel_t>::value
- >::type* = 0)
-#if !defined(__clang__) // Clang crashes if noexcept is used here.
-#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, bulk_guarantee_t<>::parallel_t>::value))
-#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, parallel_t>::value))
-#endif // defined(ASIO_MSVC)
-#endif // !defined(__clang__)
- {
- return asio::query(ex, parallel_t());
- }
-
- ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(unsequenced_t, unsequenced);
- ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(sequenced_t, sequenced);
- ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(parallel_t, parallel);
-
-#if !defined(ASIO_HAS_CONSTEXPR)
- static const bulk_guarantee_t instance;
-#endif // !defined(ASIO_HAS_CONSTEXPR)
-
-private:
- int value_;
-};
-
-#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
- && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-template <int I> template <typename E, typename T>
-const T bulk_guarantee_t<I>::static_query_v;
-#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
- // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
-#if !defined(ASIO_HAS_CONSTEXPR)
-template <int I>
-const bulk_guarantee_t<I> bulk_guarantee_t<I>::instance;
-#endif
-
-template <int I>
-const typename bulk_guarantee_t<I>::unsequenced_t
-bulk_guarantee_t<I>::unsequenced;
-
-template <int I>
-const typename bulk_guarantee_t<I>::sequenced_t
-bulk_guarantee_t<I>::sequenced;
-
-template <int I>
-const typename bulk_guarantee_t<I>::parallel_t
-bulk_guarantee_t<I>::parallel;
-
-namespace bulk_guarantee {
-
-template <int I = 0>
-struct unsequenced_t
-{
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
- template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
- typedef bulk_guarantee_t<I> polymorphic_query_result_type;
-
- ASIO_CONSTEXPR unsequenced_t()
- {
- }
-
- template <typename T>
- struct query_member :
- traits::query_member<
- typename bulk_guarantee_t<I>::template proxy<T>::type,
- unsequenced_t> {};
-
- template <typename T>
- struct query_static_constexpr_member :
- traits::query_static_constexpr_member<
- typename bulk_guarantee_t<I>::template static_proxy<T>::type,
- unsequenced_t> {};
-
-#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
- && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
- static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
- {
- return query_static_constexpr_member<T>::value();
- }
-
- template <typename T>
- static ASIO_CONSTEXPR unsequenced_t static_query(
- typename enable_if<
- !query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
- !query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
- !traits::query_free<T, unsequenced_t>::is_valid
- >::type* = 0,
- typename enable_if<
- !can_query<T, sequenced_t<I> >::value
- >::type* = 0,
- typename enable_if<
- !can_query<T, parallel_t<I> >::value
- >::type* = 0) ASIO_NOEXCEPT
- {
- return unsequenced_t();
- }
-
- template <typename E, typename T = decltype(unsequenced_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = unsequenced_t::static_query<E>();
-#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
- // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
- static ASIO_CONSTEXPR bulk_guarantee_t<I> value()
- {
- return unsequenced_t();
- }
-
- friend ASIO_CONSTEXPR bool operator==(
- const unsequenced_t&, const unsequenced_t&)
- {
- return true;
- }
-
- friend ASIO_CONSTEXPR bool operator!=(
- const unsequenced_t&, const unsequenced_t&)
- {
- return false;
- }
-
- friend ASIO_CONSTEXPR bool operator==(
- const unsequenced_t&, const sequenced_t<I>&)
- {
- return false;
- }
-
- friend ASIO_CONSTEXPR bool operator!=(
- const unsequenced_t&, const sequenced_t<I>&)
- {
- return true;
- }
-
- friend ASIO_CONSTEXPR bool operator==(
- const unsequenced_t&, const parallel_t<I>&)
- {
- return false;
- }
-
- friend ASIO_CONSTEXPR bool operator!=(
- const unsequenced_t&, const parallel_t<I>&)
- {
- return true;
- }
-};
-
-#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
- && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-template <int I> template <typename E, typename T>
-const T unsequenced_t<I>::static_query_v;
-#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
- // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
-template <int I = 0>
-struct sequenced_t
-{
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
- template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
- typedef bulk_guarantee_t<I> polymorphic_query_result_type;
-
- ASIO_CONSTEXPR sequenced_t()
- {
- }
-
- template <typename T>
- struct query_member :
- traits::query_member<
- typename bulk_guarantee_t<I>::template proxy<T>::type,
- sequenced_t> {};
-
- template <typename T>
- struct query_static_constexpr_member :
- traits::query_static_constexpr_member<
- typename bulk_guarantee_t<I>::template static_proxy<T>::type,
- sequenced_t> {};
-
-#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
- && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
- static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
- {
- return query_static_constexpr_member<T>::value();
- }
-
- template <typename E, typename T = decltype(sequenced_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = sequenced_t::static_query<E>();
-#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
- // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
- static ASIO_CONSTEXPR bulk_guarantee_t<I> value()
- {
- return sequenced_t();
- }
-
- friend ASIO_CONSTEXPR bool operator==(
- const sequenced_t&, const sequenced_t&)
- {
- return true;
- }
-
- friend ASIO_CONSTEXPR bool operator!=(
- const sequenced_t&, const sequenced_t&)
- {
- return false;
- }
-
- friend ASIO_CONSTEXPR bool operator==(
- const sequenced_t&, const unsequenced_t<I>&)
- {
- return false;
- }
-
- friend ASIO_CONSTEXPR bool operator!=(
- const sequenced_t&, const unsequenced_t<I>&)
- {
- return true;
- }
-
- friend ASIO_CONSTEXPR bool operator==(
- const sequenced_t&, const parallel_t<I>&)
- {
- return false;
- }
-
- friend ASIO_CONSTEXPR bool operator!=(
- const sequenced_t&, const parallel_t<I>&)
- {
- return true;
- }
-};
-
-#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
- && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-template <int I> template <typename E, typename T>
-const T sequenced_t<I>::static_query_v;
-#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
- // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
-template <int I>
-struct parallel_t
-{
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
- template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
- typedef bulk_guarantee_t<I> polymorphic_query_result_type;
-
- ASIO_CONSTEXPR parallel_t()
- {
- }
-
- template <typename T>
- struct query_member :
- traits::query_member<
- typename bulk_guarantee_t<I>::template proxy<T>::type,
- parallel_t> {};
-
- template <typename T>
- struct query_static_constexpr_member :
- traits::query_static_constexpr_member<
- typename bulk_guarantee_t<I>::template static_proxy<T>::type,
- parallel_t> {};
-
-#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
- && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
- static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
- {
- return query_static_constexpr_member<T>::value();
- }
-
- template <typename E, typename T = decltype(parallel_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = parallel_t::static_query<E>();
-#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
- // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
- static ASIO_CONSTEXPR bulk_guarantee_t<I> value()
- {
- return parallel_t();
- }
-
- friend ASIO_CONSTEXPR bool operator==(
- const parallel_t&, const parallel_t&)
- {
- return true;
- }
-
- friend ASIO_CONSTEXPR bool operator!=(
- const parallel_t&, const parallel_t&)
- {
- return false;
- }
-
- friend ASIO_CONSTEXPR bool operator==(
- const parallel_t&, const unsequenced_t<I>&)
- {
- return false;
- }
-
- friend ASIO_CONSTEXPR bool operator!=(
- const parallel_t&, const unsequenced_t<I>&)
- {
- return true;
- }
-
- friend ASIO_CONSTEXPR bool operator==(
- const parallel_t&, const sequenced_t<I>&)
- {
- return false;
- }
-
- friend ASIO_CONSTEXPR bool operator!=(
- const parallel_t&, const sequenced_t<I>&)
- {
- return true;
- }
-};
-
-#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
- && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-template <int I> template <typename E, typename T>
-const T parallel_t<I>::static_query_v;
-#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
- // && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
-} // namespace bulk_guarantee
-} // namespace detail
-
-typedef detail::bulk_guarantee_t<> bulk_guarantee_t;
-
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-constexpr bulk_guarantee_t bulk_guarantee;
-#else // defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-namespace { static const bulk_guarantee_t&
- bulk_guarantee = bulk_guarantee_t::instance; }
-#endif
-
-} // namespace execution
-
-#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename T>
-struct is_applicable_property<T, execution::bulk_guarantee_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
-{
-};
-
-template <typename T>
-struct is_applicable_property<T, execution::bulk_guarantee_t::unsequenced_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
-{
-};
-
-template <typename T>
-struct is_applicable_property<T, execution::bulk_guarantee_t::sequenced_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
-{
-};
-
-template <typename T>
-struct is_applicable_property<T, execution::bulk_guarantee_t::parallel_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
-{
-};
-
-#endif // !defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
-
-template <typename T>
-struct query_free_default<T, execution::bulk_guarantee_t,
- typename enable_if<
- can_query<T, execution::bulk_guarantee_t::unsequenced_t>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::bulk_guarantee_t::unsequenced_t>::value));
-
- typedef execution::bulk_guarantee_t result_type;
-};
-
-template <typename T>
-struct query_free_default<T, execution::bulk_guarantee_t,
- typename enable_if<
- !can_query<T, execution::bulk_guarantee_t::unsequenced_t>::value
- && can_query<T, execution::bulk_guarantee_t::sequenced_t>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::bulk_guarantee_t::sequenced_t>::value));
-
- typedef execution::bulk_guarantee_t result_type;
-};
-
-template <typename T>
-struct query_free_default<T, execution::bulk_guarantee_t,
- typename enable_if<
- !can_query<T, execution::bulk_guarantee_t::unsequenced_t>::value
- && !can_query<T, execution::bulk_guarantee_t::sequenced_t>::value
- && can_query<T, execution::bulk_guarantee_t::parallel_t>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::bulk_guarantee_t::parallel_t>::value));
-
- typedef execution::bulk_guarantee_t result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
- || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
-template <typename T>
-struct static_query<T, execution::bulk_guarantee_t,
- typename enable_if<
- execution::detail::bulk_guarantee_t<0>::
- query_static_constexpr_member<T>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef typename execution::detail::bulk_guarantee_t<0>::
- query_static_constexpr_member<T>::result_type result_type;
-
- static ASIO_CONSTEXPR result_type value()
- {
- return execution::detail::bulk_guarantee_t<0>::
- query_static_constexpr_member<T>::value();
- }
-};
-
-template <typename T>
-struct static_query<T, execution::bulk_guarantee_t,
- typename enable_if<
- !execution::detail::bulk_guarantee_t<0>::
- query_static_constexpr_member<T>::is_valid
- && !execution::detail::bulk_guarantee_t<0>::
- query_member<T>::is_valid
- && traits::static_query<T,
- execution::bulk_guarantee_t::unsequenced_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef typename traits::static_query<T,
- execution::bulk_guarantee_t::unsequenced_t>::result_type result_type;
-
- static ASIO_CONSTEXPR result_type value()
- {
- return traits::static_query<T,
- execution::bulk_guarantee_t::unsequenced_t>::value();
- }
-};
-
-template <typename T>
-struct static_query<T, execution::bulk_guarantee_t,
- typename enable_if<
- !execution::detail::bulk_guarantee_t<0>::
- query_static_constexpr_member<T>::is_valid
- && !execution::detail::bulk_guarantee_t<0>::
- query_member<T>::is_valid
- && !traits::static_query<T,
- execution::bulk_guarantee_t::unsequenced_t>::is_valid
- && traits::static_query<T,
- execution::bulk_guarantee_t::sequenced_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef typename traits::static_query<T,
- execution::bulk_guarantee_t::sequenced_t>::result_type result_type;
-
- static ASIO_CONSTEXPR result_type value()
- {
- return traits::static_query<T,
- execution::bulk_guarantee_t::sequenced_t>::value();
- }
-};
-
-template <typename T>
-struct static_query<T, execution::bulk_guarantee_t,
- typename enable_if<
- !execution::detail::bulk_guarantee_t<0>::
- query_static_constexpr_member<T>::is_valid
- && !execution::detail::bulk_guarantee_t<0>::
- query_member<T>::is_valid
- && !traits::static_query<T,
- execution::bulk_guarantee_t::unsequenced_t>::is_valid
- && !traits::static_query<T,
- execution::bulk_guarantee_t::sequenced_t>::is_valid
- && traits::static_query<T,
- execution::bulk_guarantee_t::parallel_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef typename traits::static_query<T,
- execution::bulk_guarantee_t::parallel_t>::result_type result_type;
-
- static ASIO_CONSTEXPR result_type value()
- {
- return traits::static_query<T,
- execution::bulk_guarantee_t::parallel_t>::value();
- }
-};
-
-template <typename T>
-struct static_query<T, execution::bulk_guarantee_t::unsequenced_t,
- typename enable_if<
- execution::detail::bulk_guarantee::unsequenced_t<0>::
- query_static_constexpr_member<T>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef typename execution::detail::bulk_guarantee::unsequenced_t<0>::
- query_static_constexpr_member<T>::result_type result_type;
-
- static ASIO_CONSTEXPR result_type value()
- {
- return execution::detail::bulk_guarantee::unsequenced_t<0>::
- query_static_constexpr_member<T>::value();
- }
-};
-
-template <typename T>
-struct static_query<T, execution::bulk_guarantee_t::unsequenced_t,
- typename enable_if<
- !execution::detail::bulk_guarantee::unsequenced_t<0>::
- query_static_constexpr_member<T>::is_valid
- && !execution::detail::bulk_guarantee::unsequenced_t<0>::
- query_member<T>::is_valid
- && !traits::query_free<T,
- execution::bulk_guarantee_t::unsequenced_t>::is_valid
- && !can_query<T, execution::bulk_guarantee_t::sequenced_t>::value
- && !can_query<T, execution::bulk_guarantee_t::parallel_t>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef execution::bulk_guarantee_t::unsequenced_t result_type;
-
- static ASIO_CONSTEXPR result_type value()
- {
- return result_type();
- }
-};
-
-template <typename T>
-struct static_query<T, execution::bulk_guarantee_t::sequenced_t,
- typename enable_if<
- execution::detail::bulk_guarantee::sequenced_t<0>::
- query_static_constexpr_member<T>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef typename execution::detail::bulk_guarantee::sequenced_t<0>::
- query_static_constexpr_member<T>::result_type result_type;
-
- static ASIO_CONSTEXPR result_type value()
- {
- return execution::detail::bulk_guarantee::sequenced_t<0>::
- query_static_constexpr_member<T>::value();
- }
-};
-
-template <typename T>
-struct static_query<T, execution::bulk_guarantee_t::parallel_t,
- typename enable_if<
- execution::detail::bulk_guarantee::parallel_t<0>::
- query_static_constexpr_member<T>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef typename execution::detail::bulk_guarantee::parallel_t<0>::
- query_static_constexpr_member<T>::result_type result_type;
-
- static ASIO_CONSTEXPR result_type value()
- {
- return execution::detail::bulk_guarantee::parallel_t<0>::
- query_static_constexpr_member<T>::value();
- }
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
- // || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
-#if !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
-template <typename T>
-struct static_require<T, execution::bulk_guarantee_t::unsequenced_t,
- typename enable_if<
- static_query<T, execution::bulk_guarantee_t::unsequenced_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::bulk_guarantee_t::unsequenced_t>::result_type,
- execution::bulk_guarantee_t::unsequenced_t>::value));
-};
-
-template <typename T>
-struct static_require<T, execution::bulk_guarantee_t::sequenced_t,
- typename enable_if<
- static_query<T, execution::bulk_guarantee_t::sequenced_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::bulk_guarantee_t::sequenced_t>::result_type,
- execution::bulk_guarantee_t::sequenced_t>::value));
-};
-
-template <typename T>
-struct static_require<T, execution::bulk_guarantee_t::parallel_t,
- typename enable_if<
- static_query<T, execution::bulk_guarantee_t::parallel_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::bulk_guarantee_t::parallel_t>::result_type,
- execution::bulk_guarantee_t::parallel_t>::value));
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
-} // namespace traits
-
-#endif // defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_BULK_GUARANTEE_HPP
diff --git a/3rdparty/asio/include/asio/execution/connect.hpp b/3rdparty/asio/include/asio/execution/connect.hpp
deleted file mode 100644
index 527f123294f..00000000000
--- a/3rdparty/asio/include/asio/execution/connect.hpp
+++ /dev/null
@@ -1,489 +0,0 @@
-//
-// execution/connect.hpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_CONNECT_HPP
-#define ASIO_EXECUTION_CONNECT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/detail/as_invocable.hpp"
-#include "asio/execution/detail/as_operation.hpp"
-#include "asio/execution/detail/as_receiver.hpp"
-#include "asio/execution/executor.hpp"
-#include "asio/execution/operation_state.hpp"
-#include "asio/execution/receiver.hpp"
-#include "asio/execution/sender.hpp"
-#include "asio/traits/connect_member.hpp"
-#include "asio/traits/connect_free.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-#if defined(GENERATING_DOCUMENTATION)
-
-namespace asio {
-namespace execution {
-
-/// A customisation point that connects a sender to a receiver.
-/**
- * The name <tt>execution::connect</tt> denotes a customisation point object.
- * For some subexpressions <tt>s</tt> and <tt>r</tt>, let <tt>S</tt> be a type
- * such that <tt>decltype((s))</tt> is <tt>S</tt> and let <tt>R</tt> be a type
- * such that <tt>decltype((r))</tt> is <tt>R</tt>. The expression
- * <tt>execution::connect(s, r)</tt> is expression-equivalent to:
- *
- * @li <tt>s.connect(r)</tt>, if that expression is valid, if its type
- * satisfies <tt>operation_state</tt>, and if <tt>S</tt> satisfies
- * <tt>sender</tt>.
- *
- * @li Otherwise, <tt>connect(s, r)</tt>, if that expression is valid, if its
- * type satisfies <tt>operation_state</tt>, and if <tt>S</tt> satisfies
- * <tt>sender</tt>, with overload resolution performed in a context that
- * includes the declaration <tt>void connect();</tt> and that does not include
- * a declaration of <tt>execution::connect</tt>.
- *
- * @li Otherwise, <tt>as_operation{s, r}</tt>, if <tt>r</tt> is not an instance
- * of <tt>as_receiver<F, S></tt> for some type <tt>F</tt>, and if
- * <tt>receiver_of<R> && executor_of<remove_cvref_t<S>,
- * as_invocable<remove_cvref_t<R>, S>></tt> is <tt>true</tt>, where
- * <tt>as_operation</tt> is an implementation-defined class equivalent to
- * @code template <class S, class R>
- * struct as_operation
- * {
- * remove_cvref_t<S> e_;
- * remove_cvref_t<R> r_;
- * void start() noexcept try {
- * execution::execute(std::move(e_),
- * as_invocable<remove_cvref_t<R>, S>{r_});
- * } catch(...) {
- * execution::set_error(std::move(r_), current_exception());
- * }
- * }; @endcode
- * and <tt>as_invocable</tt> is a class template equivalent to the following:
- * @code template<class R>
- * struct as_invocable
- * {
- * R* r_;
- * explicit as_invocable(R& r) noexcept
- * : r_(std::addressof(r)) {}
- * as_invocable(as_invocable && other) noexcept
- * : r_(std::exchange(other.r_, nullptr)) {}
- * ~as_invocable() {
- * if(r_)
- * execution::set_done(std::move(*r_));
- * }
- * void operator()() & noexcept try {
- * execution::set_value(std::move(*r_));
- * r_ = nullptr;
- * } catch(...) {
- * execution::set_error(std::move(*r_), current_exception());
- * r_ = nullptr;
- * }
- * };
- * @endcode
- *
- * @li Otherwise, <tt>execution::connect(s, r)</tt> is ill-formed.
- */
-inline constexpr unspecified connect = unspecified;
-
-/// A type trait that determines whether a @c connect expression is
-/// well-formed.
-/**
- * Class template @c can_connect is a trait that is derived from
- * @c true_type if the expression <tt>execution::connect(std::declval<S>(),
- * std::declval<R>())</tt> is well formed; otherwise @c false_type.
- */
-template <typename S, typename R>
-struct can_connect :
- integral_constant<bool, automatically_determined>
-{
-};
-
-/// A type trait to determine the result of a @c connect expression.
-template <typename S, typename R>
-struct connect_result
-{
- /// The type of the connect expression.
- /**
- * The type of the expression <tt>execution::connect(std::declval<S>(),
- * std::declval<R>())</tt>.
- */
- typedef automatically_determined type;
-};
-
-/// A type alis to determine the result of a @c connect expression.
-template <typename S, typename R>
-using connect_result_t = typename connect_result<S, R>::type;
-
-} // namespace execution
-} // namespace asio
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-namespace asio_execution_connect_fn {
-
-using asio::conditional;
-using asio::declval;
-using asio::enable_if;
-using asio::execution::detail::as_invocable;
-using asio::execution::detail::as_operation;
-using asio::execution::detail::is_as_receiver;
-using asio::execution::is_executor_of;
-using asio::execution::is_operation_state;
-using asio::execution::is_receiver;
-using asio::execution::is_sender;
-using asio::false_type;
-using asio::remove_cvref;
-using asio::traits::connect_free;
-using asio::traits::connect_member;
-
-void connect();
-
-enum overload_type
-{
- call_member,
- call_free,
- adapter,
- ill_formed
-};
-
-template <typename S, typename R, typename = void,
- typename = void, typename = void, typename = void>
-struct call_traits
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename S, typename R>
-struct call_traits<S, void(R),
- typename enable_if<
- connect_member<S, R>::is_valid
- >::type,
- typename enable_if<
- is_operation_state<typename connect_member<S, R>::result_type>::value
- >::type,
- typename enable_if<
- is_sender<typename remove_cvref<S>::type>::value
- >::type> :
- connect_member<S, R>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
-};
-
-template <typename S, typename R>
-struct call_traits<S, void(R),
- typename enable_if<
- !connect_member<S, R>::is_valid
- >::type,
- typename enable_if<
- connect_free<S, R>::is_valid
- >::type,
- typename enable_if<
- is_operation_state<typename connect_free<S, R>::result_type>::value
- >::type,
- typename enable_if<
- is_sender<typename remove_cvref<S>::type>::value
- >::type> :
- connect_free<S, R>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
-};
-
-template <typename S, typename R>
-struct call_traits<S, void(R),
- typename enable_if<
- !connect_member<S, R>::is_valid
- >::type,
- typename enable_if<
- !connect_free<S, R>::is_valid
- >::type,
- typename enable_if<
- is_receiver<R>::value
- >::type,
- typename enable_if<
- conditional<
- !is_as_receiver<
- typename remove_cvref<R>::type
- >::value,
- is_executor_of<
- typename remove_cvref<S>::type,
- as_invocable<typename remove_cvref<R>::type, S>
- >,
- false_type
- >::type::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef as_operation<S, R> result_type;
-};
-
-struct impl
-{
-#if defined(ASIO_HAS_MOVE)
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(R)>::overload == call_member,
- typename call_traits<S, void(R)>::result_type
- >::type
- operator()(S&& s, R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(R)>::is_noexcept))
- {
- return ASIO_MOVE_CAST(S)(s).connect(ASIO_MOVE_CAST(R)(r));
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(R)>::overload == call_free,
- typename call_traits<S, void(R)>::result_type
- >::type
- operator()(S&& s, R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(R)>::is_noexcept))
- {
- return connect(ASIO_MOVE_CAST(S)(s), ASIO_MOVE_CAST(R)(r));
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(R)>::overload == adapter,
- typename call_traits<S, void(R)>::result_type
- >::type
- operator()(S&& s, R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(R)>::is_noexcept))
- {
- return typename call_traits<S, void(R)>::result_type(
- ASIO_MOVE_CAST(S)(s), ASIO_MOVE_CAST(R)(r));
- }
-#else // defined(ASIO_HAS_MOVE)
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(R&)>::overload == call_member,
- typename call_traits<S&, void(R&)>::result_type
- >::type
- operator()(S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(R&)>::is_noexcept))
- {
- return s.connect(r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(R&)>::overload == call_member,
- typename call_traits<const S&, void(R&)>::result_type
- >::type
- operator()(const S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(R&)>::is_noexcept))
- {
- return s.connect(r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(R&)>::overload == call_free,
- typename call_traits<S&, void(R&)>::result_type
- >::type
- operator()(S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(R&)>::is_noexcept))
- {
- return connect(s, r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(R&)>::overload == call_free,
- typename call_traits<const S&, void(R&)>::result_type
- >::type
- operator()(const S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(R&)>::is_noexcept))
- {
- return connect(s, r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(R&)>::overload == adapter,
- typename call_traits<S&, void(R&)>::result_type
- >::type
- operator()(S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(R&)>::is_noexcept))
- {
- return typename call_traits<S&, void(R&)>::result_type(s, r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(R&)>::overload == adapter,
- typename call_traits<const S&, void(R&)>::result_type
- >::type
- operator()(const S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(R&)>::is_noexcept))
- {
- return typename call_traits<const S&, void(R&)>::result_type(s, r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(const R&)>::overload == call_member,
- typename call_traits<S&, void(const R&)>::result_type
- >::type
- operator()(S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(const R&)>::is_noexcept))
- {
- return s.connect(r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(const R&)>::overload == call_member,
- typename call_traits<const S&, void(const R&)>::result_type
- >::type
- operator()(const S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(const R&)>::is_noexcept))
- {
- return s.connect(r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(const R&)>::overload == call_free,
- typename call_traits<S&, void(const R&)>::result_type
- >::type
- operator()(S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(const R&)>::is_noexcept))
- {
- return connect(s, r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(const R&)>::overload == call_free,
- typename call_traits<const S&, void(const R&)>::result_type
- >::type
- operator()(const S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(const R&)>::is_noexcept))
- {
- return connect(s, r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(const R&)>::overload == adapter,
- typename call_traits<S&, void(const R&)>::result_type
- >::type
- operator()(S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(const R&)>::is_noexcept))
- {
- return typename call_traits<S&, void(const R&)>::result_type(s, r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(const R&)>::overload == adapter,
- typename call_traits<const S&, void(const R&)>::result_type
- >::type
- operator()(const S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(const R&)>::is_noexcept))
- {
- return typename call_traits<const S&, void(const R&)>::result_type(s, r);
- }
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-template <typename T = impl>
-struct static_instance
-{
- static const T instance;
-};
-
-template <typename T>
-const T static_instance<T>::instance = {};
-
-} // namespace asio_execution_connect_fn
-namespace asio {
-namespace execution {
-namespace {
-
-static ASIO_CONSTEXPR const asio_execution_connect_fn::impl&
- connect = asio_execution_connect_fn::static_instance<>::instance;
-
-} // namespace
-
-template <typename S, typename R>
-struct can_connect :
- integral_constant<bool,
- asio_execution_connect_fn::call_traits<S, void(R)>::overload !=
- asio_execution_connect_fn::ill_formed>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename R>
-constexpr bool can_connect_v = can_connect<S, R>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename R>
-struct is_nothrow_connect :
- integral_constant<bool,
- asio_execution_connect_fn::call_traits<S, void(R)>::is_noexcept>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename R>
-constexpr bool is_nothrow_connect_v
- = is_nothrow_connect<S, R>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename R>
-struct connect_result
-{
- typedef typename asio_execution_connect_fn::call_traits<
- S, void(R)>::result_type type;
-};
-
-#if defined(ASIO_HAS_ALIAS_TEMPLATES)
-
-template <typename S, typename R>
-using connect_result_t = typename connect_result<S, R>::type;
-
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
-
-} // namespace execution
-} // namespace asio
-
-#endif // defined(GENERATING_DOCUMENTATION)
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_CONNECT_HPP
diff --git a/3rdparty/asio/include/asio/execution/context.hpp b/3rdparty/asio/include/asio/execution/context.hpp
index f751c7a6e65..a9df9c1c4b6 100644
--- a/3rdparty/asio/include/asio/execution/context.hpp
+++ b/3rdparty/asio/include/asio/execution/context.hpp
@@ -2,7 +2,7 @@
// execution/context.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,8 +18,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution/executor.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
#include "asio/is_applicable_property.hpp"
#include "asio/traits/query_static_constexpr_member.hpp"
#include "asio/traits/static_query.hpp"
@@ -40,10 +38,9 @@ namespace execution {
/// with an executor.
struct context_t
{
- /// The context_t property applies to executors, senders, and schedulers.
+ /// The context_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The context_t property cannot be required.
static constexpr bool is_requirable = false;
@@ -70,29 +67,17 @@ struct context_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = false);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
#if defined(ASIO_HAS_STD_ANY)
typedef std::any polymorphic_query_result_type;
#endif // defined(ASIO_HAS_STD_ANY)
- ASIO_CONSTEXPR context_t()
+ constexpr context_t()
{
}
@@ -103,17 +88,17 @@ struct context_t
struct type
{
template <typename P>
- static constexpr auto query(ASIO_MOVE_ARG(P) p)
+ static constexpr auto query(P&& p)
noexcept(
noexcept(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
)
-> decltype(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
{
- return T::query(ASIO_MOVE_CAST(P)(p));
+ return T::query(static_cast<P&&>(p));
}
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
@@ -129,24 +114,17 @@ struct context_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
+ static constexpr typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename E, typename T = decltype(context_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = context_t::static_query<E>();
+ static constexpr const T static_query_v = context_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
-#if !defined(ASIO_HAS_CONSTEXPR)
- static const context_t instance;
-#endif // !defined(ASIO_HAS_CONSTEXPR)
};
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
@@ -156,20 +134,11 @@ const T context_t<I>::static_query_v;
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_CONSTEXPR)
-template <int I>
-const context_t<I> context_t<I>::instance;
-#endif
-
} // namespace detail
typedef detail::context_t<> context_t;
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr context_t context;
-#else // defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-namespace { static const context_t& context = context_t::instance; }
-#endif
} // namespace execution
@@ -177,18 +146,7 @@ namespace { static const context_t& context = context_t::instance; }
template <typename T>
struct is_applicable_property<T, execution::context_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
@@ -201,18 +159,18 @@ namespace traits {
template <typename T>
struct static_query<T, execution::context_t,
- typename enable_if<
+ enable_if_t<
execution::detail::context_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::context_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::context_t<0>::
query_static_constexpr_member<T>::value();
diff --git a/3rdparty/asio/include/asio/execution/context_as.hpp b/3rdparty/asio/include/asio/execution/context_as.hpp
index 740918c7993..f51fb1dc4c7 100644
--- a/3rdparty/asio/include/asio/execution/context_as.hpp
+++ b/3rdparty/asio/include/asio/execution/context_as.hpp
@@ -2,7 +2,7 @@
// execution/context_as.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,8 +19,6 @@
#include "asio/detail/type_traits.hpp"
#include "asio/execution/context.hpp"
#include "asio/execution/executor.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
#include "asio/is_applicable_property.hpp"
#include "asio/query.hpp"
#include "asio/traits/query_static_constexpr_member.hpp"
@@ -39,10 +37,9 @@ namespace execution {
template <typename U>
struct context_as_t
{
- /// The context_as_t property applies to executors, senders, and schedulers.
+ /// The context_as_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The context_t property cannot be required.
static constexpr bool is_requirable = false;
@@ -69,68 +66,53 @@ struct context_as_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename U>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<U>::value
- || conditional<
- is_executor<U>::value,
- false_type,
- is_sender<U>
- >::type::value
- || conditional<
- is_executor<U>::value,
- false_type,
- is_scheduler<U>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<U>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = false);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
typedef T polymorphic_query_result_type;
- ASIO_CONSTEXPR context_as_t()
+ constexpr context_as_t()
{
}
- ASIO_CONSTEXPR context_as_t(context_t)
+ constexpr context_as_t(context_t)
{
}
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename E>
- static ASIO_CONSTEXPR
+ static constexpr
typename context_t::query_static_constexpr_member<E>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- context_t::query_static_constexpr_member<E>::is_noexcept))
+ noexcept(context_t::query_static_constexpr_member<E>::is_noexcept)
{
return context_t::query_static_constexpr_member<E>::value();
}
template <typename E, typename U = decltype(context_as_t::static_query<E>())>
- static ASIO_CONSTEXPR const U static_query_v
+ static constexpr const U static_query_v
= context_as_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename Executor, typename U>
- friend ASIO_CONSTEXPR U query(
+ friend constexpr U query(
const Executor& ex, const context_as_t<U>&,
- typename enable_if<
+ enable_if_t<
is_same<T, U>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
can_query<const Executor&, const context_t&>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, const context_t&>::value))
+ noexcept(is_nothrow_query<const Executor&, const context_t&>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, const context_t&>::value))
+ noexcept(is_nothrow_query<const Executor&, const context_t&>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -145,13 +127,11 @@ const U context_as_t<T>::static_query_v;
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if (defined(ASIO_HAS_VARIABLE_TEMPLATES) \
- && defined(ASIO_HAS_CONSTEXPR)) \
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES) \
|| defined(GENERATING_DOCUMENTATION)
template <typename T>
constexpr context_as_t<T> context_as{};
-#endif // (defined(ASIO_HAS_VARIABLE_TEMPLATES)
- // && defined(ASIO_HAS_CONSTEXPR))
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
// || defined(GENERATING_DOCUMENTATION)
} // namespace execution
@@ -159,19 +139,8 @@ constexpr context_as_t<T> context_as{};
#if !defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T, typename U>
-struct is_applicable_property<T, execution::context_as_t<U> >
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+struct is_applicable_property<T, execution::context_as_t<U>>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
@@ -184,9 +153,9 @@ namespace traits {
template <typename T, typename U>
struct static_query<T, execution::context_as_t<U>,
- typename enable_if<
+ enable_if_t<
static_query<T, execution::context_t>::is_valid
- >::type> : static_query<T, execution::context_t>
+ >> : static_query<T, execution::context_t>
{
};
@@ -197,13 +166,13 @@ struct static_query<T, execution::context_as_t<U>,
template <typename T, typename U>
struct query_free<T, execution::context_as_t<U>,
- typename enable_if<
- can_query<const T&, const execution::context_t&>::value
- >::type>
+ enable_if_t<
+ can_query<const T&, const execution::context_t&>::value
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<const T&, const execution::context_t&>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<const T&, const execution::context_t&>::value;
typedef U result_type;
};
diff --git a/3rdparty/asio/include/asio/execution/detail/as_invocable.hpp b/3rdparty/asio/include/asio/execution/detail/as_invocable.hpp
deleted file mode 100644
index 13b6e44dd23..00000000000
--- a/3rdparty/asio/include/asio/execution/detail/as_invocable.hpp
+++ /dev/null
@@ -1,152 +0,0 @@
-//
-// execution/detail/as_invocable.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_DETAIL_AS_INVOCABLE_HPP
-#define ASIO_EXECUTION_DETAIL_AS_INVOCABLE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/atomic_count.hpp"
-#include "asio/detail/memory.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/receiver_invocation_error.hpp"
-#include "asio/execution/set_done.hpp"
-#include "asio/execution/set_error.hpp"
-#include "asio/execution/set_value.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace execution {
-namespace detail {
-
-#if defined(ASIO_HAS_MOVE)
-
-template <typename Receiver, typename>
-struct as_invocable
-{
- Receiver* receiver_;
-
- explicit as_invocable(Receiver& r) ASIO_NOEXCEPT
- : receiver_(asio::detail::addressof(r))
- {
- }
-
- as_invocable(as_invocable&& other) ASIO_NOEXCEPT
- : receiver_(other.receiver_)
- {
- other.receiver_ = 0;
- }
-
- ~as_invocable()
- {
- if (receiver_)
- execution::set_done(ASIO_MOVE_OR_LVALUE(Receiver)(*receiver_));
- }
-
- void operator()() ASIO_LVALUE_REF_QUAL ASIO_NOEXCEPT
- {
-#if !defined(ASIO_NO_EXCEPTIONS)
- try
- {
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- execution::set_value(ASIO_MOVE_CAST(Receiver)(*receiver_));
- receiver_ = 0;
-#if !defined(ASIO_NO_EXCEPTIONS)
- }
- catch (...)
- {
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR)
- execution::set_error(ASIO_MOVE_CAST(Receiver)(*receiver_),
- std::make_exception_ptr(receiver_invocation_error()));
- receiver_ = 0;
-#else // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- std::terminate();
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- }
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- }
-};
-
-#else // defined(ASIO_HAS_MOVE)
-
-template <typename Receiver, typename>
-struct as_invocable
-{
- Receiver* receiver_;
- asio::detail::shared_ptr<asio::detail::atomic_count> ref_count_;
-
- explicit as_invocable(Receiver& r,
- const asio::detail::shared_ptr<
- asio::detail::atomic_count>& c) ASIO_NOEXCEPT
- : receiver_(asio::detail::addressof(r)),
- ref_count_(c)
- {
- }
-
- as_invocable(const as_invocable& other) ASIO_NOEXCEPT
- : receiver_(other.receiver_),
- ref_count_(other.ref_count_)
- {
- ++(*ref_count_);
- }
-
- ~as_invocable()
- {
- if (--(*ref_count_) == 0)
- execution::set_done(*receiver_);
- }
-
- void operator()() ASIO_LVALUE_REF_QUAL ASIO_NOEXCEPT
- {
-#if !defined(ASIO_NO_EXCEPTIONS)
- try
- {
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- execution::set_value(*receiver_);
- ++(*ref_count_);
- }
-#if !defined(ASIO_NO_EXCEPTIONS)
- catch (...)
- {
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR)
- execution::set_error(*receiver_,
- std::make_exception_ptr(receiver_invocation_error()));
- ++(*ref_count_);
-#else // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- std::terminate();
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- }
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- }
-};
-
-#endif // defined(ASIO_HAS_MOVE)
-
-template <typename T>
-struct is_as_invocable : false_type
-{
-};
-
-template <typename Function, typename T>
-struct is_as_invocable<as_invocable<Function, T> > : true_type
-{
-};
-
-} // namespace detail
-} // namespace execution
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_DETAIL_AS_INVOCABLE_HPP
diff --git a/3rdparty/asio/include/asio/execution/detail/as_operation.hpp b/3rdparty/asio/include/asio/execution/detail/as_operation.hpp
deleted file mode 100644
index 565bf3634e6..00000000000
--- a/3rdparty/asio/include/asio/execution/detail/as_operation.hpp
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// execution/detail/as_operation.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_DETAIL_AS_OPERATION_HPP
-#define ASIO_EXECUTION_DETAIL_AS_OPERATION_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/memory.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/detail/as_invocable.hpp"
-#include "asio/execution/execute.hpp"
-#include "asio/execution/set_error.hpp"
-#include "asio/traits/start_member.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace execution {
-namespace detail {
-
-template <typename Executor, typename Receiver>
-struct as_operation
-{
- typename remove_cvref<Executor>::type ex_;
- typename remove_cvref<Receiver>::type receiver_;
-#if !defined(ASIO_HAS_MOVE)
- asio::detail::shared_ptr<asio::detail::atomic_count> ref_count_;
-#endif // !defined(ASIO_HAS_MOVE)
-
- template <typename E, typename R>
- explicit as_operation(ASIO_MOVE_ARG(E) e, ASIO_MOVE_ARG(R) r)
- : ex_(ASIO_MOVE_CAST(E)(e)),
- receiver_(ASIO_MOVE_CAST(R)(r))
-#if !defined(ASIO_HAS_MOVE)
- , ref_count_(new asio::detail::atomic_count(1))
-#endif // !defined(ASIO_HAS_MOVE)
- {
- }
-
- void start() ASIO_NOEXCEPT
- {
-#if !defined(ASIO_NO_EXCEPTIONS)
- try
- {
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- execution::execute(
- ASIO_MOVE_CAST(typename remove_cvref<Executor>::type)(ex_),
- as_invocable<typename remove_cvref<Receiver>::type,
- Executor>(receiver_
-#if !defined(ASIO_HAS_MOVE)
- , ref_count_
-#endif // !defined(ASIO_HAS_MOVE)
- ));
-#if !defined(ASIO_NO_EXCEPTIONS)
- }
- catch (...)
- {
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR)
- execution::set_error(
- ASIO_MOVE_OR_LVALUE(
- typename remove_cvref<Receiver>::type)(
- receiver_),
- std::current_exception());
-#else // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- std::terminate();
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- }
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- }
-};
-
-} // namespace detail
-} // namespace execution
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-template <typename Executor, typename Receiver>
-struct start_member<
- asio::execution::detail::as_operation<Executor, Receiver> >
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_DETAIL_AS_OPERATION_HPP
diff --git a/3rdparty/asio/include/asio/execution/detail/as_receiver.hpp b/3rdparty/asio/include/asio/execution/detail/as_receiver.hpp
deleted file mode 100644
index a10bdc7f9b4..00000000000
--- a/3rdparty/asio/include/asio/execution/detail/as_receiver.hpp
+++ /dev/null
@@ -1,128 +0,0 @@
-//
-// execution/detail/as_receiver.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_DETAIL_AS_RECEIVER_HPP
-#define ASIO_EXECUTION_DETAIL_AS_RECEIVER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/traits/set_done_member.hpp"
-#include "asio/traits/set_error_member.hpp"
-#include "asio/traits/set_value_member.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace execution {
-namespace detail {
-
-template <typename Function, typename>
-struct as_receiver
-{
- Function f_;
-
- template <typename F>
- explicit as_receiver(ASIO_MOVE_ARG(F) f, int)
- : f_(ASIO_MOVE_CAST(F)(f))
- {
- }
-
-#if defined(ASIO_MSVC) && defined(ASIO_HAS_MOVE)
- as_receiver(as_receiver&& other)
- : f_(ASIO_MOVE_CAST(Function)(other.f_))
- {
- }
-#endif // defined(ASIO_MSVC) && defined(ASIO_HAS_MOVE)
-
- void set_value()
- ASIO_NOEXCEPT_IF(noexcept(declval<Function&>()()))
- {
- f_();
- }
-
- template <typename E>
- void set_error(E) ASIO_NOEXCEPT
- {
- std::terminate();
- }
-
- void set_done() ASIO_NOEXCEPT
- {
- }
-};
-
-template <typename T>
-struct is_as_receiver : false_type
-{
-};
-
-template <typename Function, typename T>
-struct is_as_receiver<as_receiver<Function, T> > : true_type
-{
-};
-
-} // namespace detail
-} // namespace execution
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-template <typename Function, typename T>
-struct set_value_member<
- asio::execution::detail::as_receiver<Function, T>, void()>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-#if defined(ASIO_HAS_NOEXCEPT)
- ASIO_STATIC_CONSTEXPR(bool,
- is_noexcept = noexcept(declval<Function&>()()));
-#else // defined(ASIO_HAS_NOEXCEPT)
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-#endif // defined(ASIO_HAS_NOEXCEPT)
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename Function, typename T, typename E>
-struct set_error_member<
- asio::execution::detail::as_receiver<Function, T>, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <typename Function, typename T>
-struct set_done_member<
- asio::execution::detail::as_receiver<Function, T> >
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_DETAIL_AS_RECEIVER_HPP
diff --git a/3rdparty/asio/include/asio/execution/detail/bulk_sender.hpp b/3rdparty/asio/include/asio/execution/detail/bulk_sender.hpp
deleted file mode 100644
index 0e4e5c12d5b..00000000000
--- a/3rdparty/asio/include/asio/execution/detail/bulk_sender.hpp
+++ /dev/null
@@ -1,261 +0,0 @@
-//
-// execution/detail/bulk_sender.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_DETAIL_BULK_SENDER_HPP
-#define ASIO_EXECUTION_DETAIL_BULK_SENDER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/connect.hpp"
-#include "asio/execution/executor.hpp"
-#include "asio/execution/set_done.hpp"
-#include "asio/execution/set_error.hpp"
-#include "asio/traits/connect_member.hpp"
-#include "asio/traits/set_done_member.hpp"
-#include "asio/traits/set_error_member.hpp"
-#include "asio/traits/set_value_member.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace execution {
-namespace detail {
-
-template <typename Receiver, typename Function, typename Number, typename Index>
-struct bulk_receiver
-{
- typename remove_cvref<Receiver>::type receiver_;
- typename decay<Function>::type f_;
- typename decay<Number>::type n_;
-
- template <typename R, typename F, typename N>
- explicit bulk_receiver(ASIO_MOVE_ARG(R) r,
- ASIO_MOVE_ARG(F) f, ASIO_MOVE_ARG(N) n)
- : receiver_(ASIO_MOVE_CAST(R)(r)),
- f_(ASIO_MOVE_CAST(F)(f)),
- n_(ASIO_MOVE_CAST(N)(n))
- {
- }
-
- void set_value()
- {
- for (Index i = 0; i < n_; ++i)
- f_(i);
-
- execution::set_value(
- ASIO_MOVE_OR_LVALUE(
- typename remove_cvref<Receiver>::type)(receiver_));
- }
-
- template <typename Error>
- void set_error(ASIO_MOVE_ARG(Error) e) ASIO_NOEXCEPT
- {
- execution::set_error(
- ASIO_MOVE_OR_LVALUE(
- typename remove_cvref<Receiver>::type)(receiver_),
- ASIO_MOVE_CAST(Error)(e));
- }
-
- void set_done() ASIO_NOEXCEPT
- {
- execution::set_done(
- ASIO_MOVE_OR_LVALUE(
- typename remove_cvref<Receiver>::type)(receiver_));
- }
-};
-
-template <typename Sender, typename Receiver,
- typename Function, typename Number>
-struct bulk_receiver_traits
-{
- typedef bulk_receiver<
- Receiver, Function, Number,
- typename execution::executor_index<
- typename remove_cvref<Sender>::type
- >::type
- > type;
-
-#if defined(ASIO_HAS_MOVE)
- typedef type arg_type;
-#else // defined(ASIO_HAS_MOVE)
- typedef const type& arg_type;
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-template <typename Sender, typename Function, typename Number>
-struct bulk_sender : sender_base
-{
- typename remove_cvref<Sender>::type sender_;
- typename decay<Function>::type f_;
- typename decay<Number>::type n_;
-
- template <typename S, typename F, typename N>
- explicit bulk_sender(ASIO_MOVE_ARG(S) s,
- ASIO_MOVE_ARG(F) f, ASIO_MOVE_ARG(N) n)
- : sender_(ASIO_MOVE_CAST(S)(s)),
- f_(ASIO_MOVE_CAST(F)(f)),
- n_(ASIO_MOVE_CAST(N)(n))
- {
- }
-
- template <typename Receiver>
- typename connect_result<
- ASIO_MOVE_OR_LVALUE_TYPE(typename remove_cvref<Sender>::type),
- typename bulk_receiver_traits<
- Sender, Receiver, Function, Number
- >::arg_type
- >::type connect(ASIO_MOVE_ARG(Receiver) r,
- typename enable_if<
- can_connect<
- typename remove_cvref<Sender>::type,
- typename bulk_receiver_traits<
- Sender, Receiver, Function, Number
- >::arg_type
- >::value
- >::type* = 0) ASIO_RVALUE_REF_QUAL ASIO_NOEXCEPT
- {
- return execution::connect(
- ASIO_MOVE_OR_LVALUE(typename remove_cvref<Sender>::type)(sender_),
- typename bulk_receiver_traits<Sender, Receiver, Function, Number>::type(
- ASIO_MOVE_CAST(Receiver)(r),
- ASIO_MOVE_CAST(typename decay<Function>::type)(f_),
- ASIO_MOVE_CAST(typename decay<Number>::type)(n_)));
- }
-
- template <typename Receiver>
- typename connect_result<
- const typename remove_cvref<Sender>::type&,
- typename bulk_receiver_traits<
- Sender, Receiver, Function, Number
- >::arg_type
- >::type connect(ASIO_MOVE_ARG(Receiver) r,
- typename enable_if<
- can_connect<
- const typename remove_cvref<Sender>::type&,
- typename bulk_receiver_traits<
- Sender, Receiver, Function, Number
- >::arg_type
- >::value
- >::type* = 0) const ASIO_LVALUE_REF_QUAL ASIO_NOEXCEPT
- {
- return execution::connect(sender_,
- typename bulk_receiver_traits<Sender, Receiver, Function, Number>::type(
- ASIO_MOVE_CAST(Receiver)(r), f_, n_));
- }
-};
-
-} // namespace detail
-} // namespace execution
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-template <typename Receiver, typename Function, typename Number, typename Index>
-struct set_value_member<
- execution::detail::bulk_receiver<Receiver, Function, Number, Index>,
- void()>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename Receiver, typename Function,
- typename Number, typename Index, typename Error>
-struct set_error_member<
- execution::detail::bulk_receiver<Receiver, Function, Number, Index>,
- Error>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <typename Receiver, typename Function, typename Number, typename Index>
-struct set_done_member<
- execution::detail::bulk_receiver<Receiver, Function, Number, Index> >
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-template <typename Sender, typename Function,
- typename Number, typename Receiver>
-struct connect_member<
- execution::detail::bulk_sender<Sender, Function, Number>,
- Receiver,
- typename enable_if<
- execution::can_connect<
- ASIO_MOVE_OR_LVALUE_TYPE(typename remove_cvref<Sender>::type),
- typename execution::detail::bulk_receiver_traits<
- Sender, Receiver, Function, Number
- >::arg_type
- >::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef typename execution::connect_result<
- ASIO_MOVE_OR_LVALUE_TYPE(typename remove_cvref<Sender>::type),
- typename execution::detail::bulk_receiver_traits<
- Sender, Receiver, Function, Number
- >::arg_type
- >::type result_type;
-};
-
-template <typename Sender, typename Function,
- typename Number, typename Receiver>
-struct connect_member<
- const execution::detail::bulk_sender<Sender, Function, Number>,
- Receiver,
- typename enable_if<
- execution::can_connect<
- const typename remove_cvref<Sender>::type&,
- typename execution::detail::bulk_receiver_traits<
- Sender, Receiver, Function, Number
- >::arg_type
- >::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef typename execution::connect_result<
- const typename remove_cvref<Sender>::type&,
- typename execution::detail::bulk_receiver_traits<
- Sender, Receiver, Function, Number
- >::arg_type
- >::type result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_DETAIL_BULK_SENDER_HPP
diff --git a/3rdparty/asio/include/asio/execution/detail/submit_receiver.hpp b/3rdparty/asio/include/asio/execution/detail/submit_receiver.hpp
deleted file mode 100644
index 6faa119d224..00000000000
--- a/3rdparty/asio/include/asio/execution/detail/submit_receiver.hpp
+++ /dev/null
@@ -1,233 +0,0 @@
-//
-// execution/detail/submit_receiver.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_DETAIL_SUBMIT_RECEIVER_HPP
-#define ASIO_EXECUTION_DETAIL_SUBMIT_RECEIVER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
-#include "asio/execution/connect.hpp"
-#include "asio/execution/receiver.hpp"
-#include "asio/execution/set_done.hpp"
-#include "asio/execution/set_error.hpp"
-#include "asio/execution/set_value.hpp"
-#include "asio/traits/set_done_member.hpp"
-#include "asio/traits/set_error_member.hpp"
-#include "asio/traits/set_value_member.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace execution {
-namespace detail {
-
-template <typename Sender, typename Receiver>
-struct submit_receiver;
-
-template <typename Sender, typename Receiver>
-struct submit_receiver_wrapper
-{
- submit_receiver<Sender, Receiver>* p_;
-
- explicit submit_receiver_wrapper(submit_receiver<Sender, Receiver>* p)
- : p_(p)
- {
- }
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename... Args>
- typename enable_if<is_receiver_of<Receiver, Args...>::value>::type
- set_value(ASIO_MOVE_ARG(Args)... args) ASIO_RVALUE_REF_QUAL
- ASIO_NOEXCEPT_IF((is_nothrow_receiver_of<Receiver, Args...>::value))
- {
- execution::set_value(
- ASIO_MOVE_OR_LVALUE(
- typename remove_cvref<Receiver>::type)(p_->r_),
- ASIO_MOVE_CAST(Args)(args)...);
- delete p_;
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- void set_value() ASIO_RVALUE_REF_QUAL
- ASIO_NOEXCEPT_IF((is_nothrow_receiver_of<Receiver>::value))
- {
- execution::set_value(
- ASIO_MOVE_OR_LVALUE(
- typename remove_cvref<Receiver>::type)(p_->r_));
- delete p_;
- }
-
-#define ASIO_PRIVATE_SUBMIT_RECEIVER_SET_VALUE_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- typename enable_if<is_receiver_of<Receiver, \
- ASIO_VARIADIC_TARGS(n)>::value>::type \
- set_value(ASIO_VARIADIC_MOVE_PARAMS(n)) ASIO_RVALUE_REF_QUAL \
- ASIO_NOEXCEPT_IF((is_nothrow_receiver_of< \
- Receiver, ASIO_VARIADIC_TARGS(n)>::value)) \
- { \
- execution::set_value( \
- ASIO_MOVE_OR_LVALUE( \
- typename remove_cvref<Receiver>::type)(p_->r_), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- delete p_; \
- } \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SUBMIT_RECEIVER_SET_VALUE_DEF)
-#undef ASIO_PRIVATE_SUBMIT_RECEIVER_SET_VALUE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E) e)
- ASIO_RVALUE_REF_QUAL ASIO_NOEXCEPT
- {
- execution::set_error(
- ASIO_MOVE_OR_LVALUE(
- typename remove_cvref<Receiver>::type)(p_->r_),
- ASIO_MOVE_CAST(E)(e));
- delete p_;
- }
-
- void set_done() ASIO_RVALUE_REF_QUAL ASIO_NOEXCEPT
- {
- execution::set_done(
- ASIO_MOVE_OR_LVALUE(
- typename remove_cvref<Receiver>::type)(p_->r_));
- delete p_;
- }
-};
-
-template <typename Sender, typename Receiver>
-struct submit_receiver
-{
- typename remove_cvref<Receiver>::type r_;
-#if defined(ASIO_HAS_MOVE)
- typename connect_result<Sender,
- submit_receiver_wrapper<Sender, Receiver> >::type state_;
-#else // defined(ASIO_HAS_MOVE)
- typename connect_result<Sender,
- const submit_receiver_wrapper<Sender, Receiver>& >::type state_;
-#endif // defined(ASIO_HAS_MOVE)
-
-#if defined(ASIO_HAS_MOVE)
- template <typename S, typename R>
- explicit submit_receiver(ASIO_MOVE_ARG(S) s, ASIO_MOVE_ARG(R) r)
- : r_(ASIO_MOVE_CAST(R)(r)),
- state_(execution::connect(ASIO_MOVE_CAST(S)(s),
- submit_receiver_wrapper<Sender, Receiver>(this)))
- {
- }
-#else // defined(ASIO_HAS_MOVE)
- explicit submit_receiver(Sender s, Receiver r)
- : r_(r),
- state_(execution::connect(s,
- submit_receiver_wrapper<Sender, Receiver>(this)))
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-} // namespace detail
-} // namespace execution
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Sender, typename Receiver, typename... Args>
-struct set_value_member<
- asio::execution::detail::submit_receiver_wrapper<
- Sender, Receiver>,
- void(Args...)>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (asio::execution::is_nothrow_receiver_of<Receiver, Args...>::value));
- typedef void result_type;
-};
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Sender, typename Receiver>
-struct set_value_member<
- asio::execution::detail::submit_receiver_wrapper<
- Sender, Receiver>,
- void()>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- asio::execution::is_nothrow_receiver_of<Receiver>::value);
- typedef void result_type;
-};
-
-#define ASIO_PRIVATE_SUBMIT_RECEIVER_TRAIT_DEF(n) \
- template <typename Sender, typename Receiver, \
- ASIO_VARIADIC_TPARAMS(n)> \
- struct set_value_member< \
- asio::execution::detail::submit_receiver_wrapper< \
- Sender, Receiver>, \
- void(ASIO_VARIADIC_TARGS(n))> \
- { \
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true); \
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = \
- (asio::execution::is_nothrow_receiver_of<Receiver, \
- ASIO_VARIADIC_TARGS(n)>::value)); \
- typedef void result_type; \
- }; \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SUBMIT_RECEIVER_TRAIT_DEF)
-#undef ASIO_PRIVATE_SUBMIT_RECEIVER_TRAIT_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename Sender, typename Receiver, typename E>
-struct set_error_member<
- asio::execution::detail::submit_receiver_wrapper<
- Sender, Receiver>, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <typename Sender, typename Receiver>
-struct set_done_member<
- asio::execution::detail::submit_receiver_wrapper<
- Sender, Receiver> >
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_DETAIL_SUBMIT_RECEIVER_HPP
diff --git a/3rdparty/asio/include/asio/execution/detail/void_receiver.hpp b/3rdparty/asio/include/asio/execution/detail/void_receiver.hpp
deleted file mode 100644
index fb2d53f58ee..00000000000
--- a/3rdparty/asio/include/asio/execution/detail/void_receiver.hpp
+++ /dev/null
@@ -1,90 +0,0 @@
-//
-// execution/detail/void_receiver.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_DETAIL_VOID_RECEIVER_HPP
-#define ASIO_EXECUTION_DETAIL_VOID_RECEIVER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/traits/set_done_member.hpp"
-#include "asio/traits/set_error_member.hpp"
-#include "asio/traits/set_value_member.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace execution {
-namespace detail {
-
-struct void_receiver
-{
- void set_value() ASIO_NOEXCEPT
- {
- }
-
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E)) ASIO_NOEXCEPT
- {
- }
-
- void set_done() ASIO_NOEXCEPT
- {
- }
-};
-
-} // namespace detail
-} // namespace execution
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-template <>
-struct set_value_member<asio::execution::detail::void_receiver, void()>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename E>
-struct set_error_member<asio::execution::detail::void_receiver, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_done_member<asio::execution::detail::void_receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_DETAIL_VOID_RECEIVER_HPP
diff --git a/3rdparty/asio/include/asio/execution/execute.hpp b/3rdparty/asio/include/asio/execution/execute.hpp
deleted file mode 100644
index 54eb31bebab..00000000000
--- a/3rdparty/asio/include/asio/execution/execute.hpp
+++ /dev/null
@@ -1,283 +0,0 @@
-//
-// execution/execute.hpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_EXECUTE_HPP
-#define ASIO_EXECUTION_EXECUTE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/detail/as_invocable.hpp"
-#include "asio/execution/detail/as_receiver.hpp"
-#include "asio/traits/execute_member.hpp"
-#include "asio/traits/execute_free.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-#if defined(GENERATING_DOCUMENTATION)
-
-namespace asio {
-namespace execution {
-
-/// A customisation point that executes a function on an executor.
-/**
- * The name <tt>execution::execute</tt> denotes a customisation point object.
- *
- * For some subexpressions <tt>e</tt> and <tt>f</tt>, let <tt>E</tt> be a type
- * such that <tt>decltype((e))</tt> is <tt>E</tt> and let <tt>F</tt> be a type
- * such that <tt>decltype((f))</tt> is <tt>F</tt>. The expression
- * <tt>execution::execute(e, f)</tt> is ill-formed if <tt>F</tt> does not model
- * <tt>invocable</tt>, or if <tt>E</tt> does not model either <tt>executor</tt>
- * or <tt>sender</tt>. Otherwise, it is expression-equivalent to:
- *
- * @li <tt>e.execute(f)</tt>, if that expression is valid. If the function
- * selected does not execute the function object <tt>f</tt> on the executor
- * <tt>e</tt>, the program is ill-formed with no diagnostic required.
- *
- * @li Otherwise, <tt>execute(e, f)</tt>, if that expression is valid, with
- * overload resolution performed in a context that includes the declaration
- * <tt>void execute();</tt> and that does not include a declaration of
- * <tt>execution::execute</tt>. If the function selected by overload
- * resolution does not execute the function object <tt>f</tt> on the executor
- * <tt>e</tt>, the program is ill-formed with no diagnostic required.
- */
-inline constexpr unspecified execute = unspecified;
-
-/// A type trait that determines whether a @c execute expression is well-formed.
-/**
- * Class template @c can_execute is a trait that is derived from
- * @c true_type if the expression <tt>execution::execute(std::declval<T>(),
- * std::declval<F>())</tt> is well formed; otherwise @c false_type.
- */
-template <typename T, typename F>
-struct can_execute :
- integral_constant<bool, automatically_determined>
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-namespace asio {
-namespace execution {
-
-template <typename T, typename R>
-struct is_sender_to;
-
-namespace detail {
-
-template <typename S, typename R>
-void submit_helper(ASIO_MOVE_ARG(S) s, ASIO_MOVE_ARG(R) r);
-
-} // namespace detail
-} // namespace execution
-} // namespace asio
-namespace asio_execution_execute_fn {
-
-using asio::conditional;
-using asio::decay;
-using asio::declval;
-using asio::enable_if;
-using asio::execution::detail::as_receiver;
-using asio::execution::detail::is_as_invocable;
-using asio::execution::is_sender_to;
-using asio::false_type;
-using asio::result_of;
-using asio::traits::execute_free;
-using asio::traits::execute_member;
-using asio::true_type;
-using asio::void_type;
-
-void execute();
-
-enum overload_type
-{
- call_member,
- call_free,
- adapter,
- ill_formed
-};
-
-template <typename Impl, typename T, typename F, typename = void,
- typename = void, typename = void, typename = void, typename = void>
-struct call_traits
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
-};
-
-template <typename Impl, typename T, typename F>
-struct call_traits<Impl, T, void(F),
- typename enable_if<
- execute_member<typename Impl::template proxy<T>::type, F>::is_valid
- >::type> :
- execute_member<typename Impl::template proxy<T>::type, F>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
-};
-
-template <typename Impl, typename T, typename F>
-struct call_traits<Impl, T, void(F),
- typename enable_if<
- !execute_member<typename Impl::template proxy<T>, F>::is_valid
- >::type,
- typename enable_if<
- execute_free<T, F>::is_valid
- >::type> :
- execute_free<T, F>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
-};
-
-template <typename Impl, typename T, typename F>
-struct call_traits<Impl, T, void(F),
- typename enable_if<
- !execute_member<typename Impl::template proxy<T>::type, F>::is_valid
- >::type,
- typename enable_if<
- !execute_free<T, F>::is_valid
- >::type,
- typename void_type<
- typename result_of<typename decay<F>::type&()>::type
- >::type,
- typename enable_if<
- !is_as_invocable<typename decay<F>::type>::value
- >::type,
- typename enable_if<
- is_sender_to<T, as_receiver<typename decay<F>::type, T> >::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter);
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-struct impl
-{
- template <typename T>
- struct proxy
- {
-#if defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
- struct type
- {
- template <typename F>
- auto execute(ASIO_MOVE_ARG(F) f)
- noexcept(
- noexcept(
- declval<typename conditional<true, T, F>::type>().execute(
- ASIO_MOVE_CAST(F)(f))
- )
- )
- -> decltype(
- declval<typename conditional<true, T, F>::type>().execute(
- ASIO_MOVE_CAST(F)(f))
- );
- };
-#else // defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
- typedef T type;
-#endif // defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
- };
-
- template <typename T, typename F>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<impl, T, void(F)>::overload == call_member,
- typename call_traits<impl, T, void(F)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(F) f) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(F)>::is_noexcept))
- {
- return ASIO_MOVE_CAST(T)(t).execute(ASIO_MOVE_CAST(F)(f));
- }
-
- template <typename T, typename F>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<impl, T, void(F)>::overload == call_free,
- typename call_traits<impl, T, void(F)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(F) f) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(F)>::is_noexcept))
- {
- return execute(ASIO_MOVE_CAST(T)(t), ASIO_MOVE_CAST(F)(f));
- }
-
- template <typename T, typename F>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<impl, T, void(F)>::overload == adapter,
- typename call_traits<impl, T, void(F)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(F) f) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(F)>::is_noexcept))
- {
- return asio::execution::detail::submit_helper(
- ASIO_MOVE_CAST(T)(t),
- as_receiver<typename decay<F>::type, T>(
- ASIO_MOVE_CAST(F)(f), 0));
- }
-};
-
-template <typename T = impl>
-struct static_instance
-{
- static const T instance;
-};
-
-template <typename T>
-const T static_instance<T>::instance = {};
-
-} // namespace asio_execution_execute_fn
-namespace asio {
-namespace execution {
-namespace {
-
-static ASIO_CONSTEXPR const asio_execution_execute_fn::impl&
- execute = asio_execution_execute_fn::static_instance<>::instance;
-
-} // namespace
-
-typedef asio_execution_execute_fn::impl execute_t;
-
-template <typename T, typename F>
-struct can_execute :
- integral_constant<bool,
- asio_execution_execute_fn::call_traits<
- execute_t, T, void(F)>::overload !=
- asio_execution_execute_fn::ill_formed>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename T, typename F>
-constexpr bool can_execute_v = can_execute<T, F>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-} // namespace execution
-} // namespace asio
-
-#endif // defined(GENERATING_DOCUMENTATION)
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_EXECUTE_HPP
diff --git a/3rdparty/asio/include/asio/execution/executor.hpp b/3rdparty/asio/include/asio/execution/executor.hpp
index 7e05d5a0f8c..1f34981fa78 100644
--- a/3rdparty/asio/include/asio/execution/executor.hpp
+++ b/3rdparty/asio/include/asio/execution/executor.hpp
@@ -2,7 +2,7 @@
// execution/executor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,16 +17,14 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/execution/execute.hpp"
#include "asio/execution/invocable_archetype.hpp"
#include "asio/traits/equality_comparable.hpp"
+#include "asio/traits/execute_member.hpp"
-#if defined(ASIO_HAS_DEDUCED_EXECUTE_FREE_TRAIT) \
- && defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) \
+#if defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) \
&& defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
# define ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT 1
-#endif // defined(ASIO_HAS_DEDUCED_EXECUTE_FREE_TRAIT)
- // && defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+#endif // defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
// && defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
#include "asio/detail/push_options.hpp"
@@ -44,72 +42,33 @@ struct is_executor_of_impl : false_type
template <typename T, typename F>
struct is_executor_of_impl<T, F,
- typename enable_if<
- can_execute<typename add_const<T>::type, F>::value
- >::type,
- typename void_type<
- typename result_of<typename decay<F>::type&()>::type
- >::type,
- typename enable_if<
- is_constructible<typename decay<F>::type, F>::value
- >::type,
- typename enable_if<
- is_move_constructible<typename decay<F>::type>::value
- >::type,
-#if defined(ASIO_HAS_NOEXCEPT)
- typename enable_if<
+ enable_if_t<
+ traits::execute_member<add_const_t<T>, F>::is_valid
+ >,
+ void_t<
+ result_of_t<decay_t<F>&()>
+ >,
+ enable_if_t<
+ is_constructible<decay_t<F>, F>::value
+ >,
+ enable_if_t<
+ is_move_constructible<decay_t<F>>::value
+ >,
+ enable_if_t<
is_nothrow_copy_constructible<T>::value
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
is_nothrow_destructible<T>::value
- >::type,
-#else // defined(ASIO_HAS_NOEXCEPT)
- typename enable_if<
- is_copy_constructible<T>::value
- >::type,
- typename enable_if<
- is_destructible<T>::value
- >::type,
-#endif // defined(ASIO_HAS_NOEXCEPT)
- typename enable_if<
+ >,
+ enable_if_t<
traits::equality_comparable<T>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
traits::equality_comparable<T>::is_noexcept
- >::type> : true_type
+ >> : true_type
{
};
-template <typename T, typename = void>
-struct executor_shape
-{
- typedef std::size_t type;
-};
-
-template <typename T>
-struct executor_shape<T,
- typename void_type<
- typename T::shape_type
- >::type>
-{
- typedef typename T::shape_type type;
-};
-
-template <typename T, typename Default, typename = void>
-struct executor_index
-{
- typedef Default type;
-};
-
-template <typename T, typename Default>
-struct executor_index<T, Default,
- typename void_type<
- typename T::index_type
- >::type>
-{
- typedef typename T::index_type type;
-};
-
} // namespace detail
/// The is_executor trait detects whether a type T satisfies the
@@ -132,7 +91,7 @@ struct is_executor :
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
-ASIO_CONSTEXPR const bool is_executor_v = is_executor<T>::value;
+constexpr const bool is_executor_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
@@ -149,101 +108,6 @@ ASIO_CONCEPT executor = is_executor<T>::value;
#endif // defined(ASIO_HAS_CONCEPTS)
-/// The is_executor_of trait detects whether a type T satisfies the
-/// execution::executor_of concept for some set of value arguments.
-/**
- * Class template @c is_executor_of is a type trait that is derived from @c
- * true_type if the type @c T meets the concept definition for an executor
- * that is invocable with a function object of type @c F, otherwise @c
- * false_type.
- */
-template <typename T, typename F>
-struct is_executor_of :
-#if defined(GENERATING_DOCUMENTATION)
- integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- integral_constant<bool,
- is_executor<T>::value && detail::is_executor_of_impl<T, F>::value
- >
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename T, typename F>
-ASIO_CONSTEXPR const bool is_executor_of_v =
- is_executor_of<T, F>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-#if defined(ASIO_HAS_CONCEPTS)
-
-template <typename T, typename F>
-ASIO_CONCEPT executor_of = is_executor_of<T, F>::value;
-
-#define ASIO_EXECUTION_EXECUTOR_OF(f) \
- ::asio::execution::executor_of<f>
-
-#else // defined(ASIO_HAS_CONCEPTS)
-
-#define ASIO_EXECUTION_EXECUTOR_OF typename
-
-#endif // defined(ASIO_HAS_CONCEPTS)
-
-/// The executor_shape trait detects the type used by an executor to represent
-/// the shape of a bulk operation.
-/**
- * Class template @c executor_shape is a type trait with a nested type alias
- * @c type whose type is @c T::shape_type if @c T::shape_type is valid,
- * otherwise @c std::size_t.
- */
-template <typename T>
-struct executor_shape
-#if !defined(GENERATING_DOCUMENTATION)
- : detail::executor_shape<T>
-#endif // !defined(GENERATING_DOCUMENTATION)
-{
-#if defined(GENERATING_DOCUMENTATION)
- /// @c T::shape_type if @c T::shape_type is valid, otherwise @c std::size_t.
- typedef automatically_determined type;
-#endif // defined(GENERATING_DOCUMENTATION)
-};
-
-#if defined(ASIO_HAS_ALIAS_TEMPLATES)
-
-template <typename T>
-using executor_shape_t = typename executor_shape<T>::type;
-
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
-
-/// The executor_index trait detects the type used by an executor to represent
-/// an index within a bulk operation.
-/**
- * Class template @c executor_index is a type trait with a nested type alias
- * @c type whose type is @c T::index_type if @c T::index_type is valid,
- * otherwise @c executor_shape_t<T>.
- */
-template <typename T>
-struct executor_index
-#if !defined(GENERATING_DOCUMENTATION)
- : detail::executor_index<T, typename executor_shape<T>::type>
-#endif // !defined(GENERATING_DOCUMENTATION)
-{
-#if defined(GENERATING_DOCUMENTATION)
- /// @c T::index_type if @c T::index_type is valid, otherwise
- /// @c executor_shape_t<T>.
- typedef automatically_determined type;
-#endif // defined(GENERATING_DOCUMENTATION)
-};
-
-#if defined(ASIO_HAS_ALIAS_TEMPLATES)
-
-template <typename T>
-using executor_index_t = typename executor_index<T>::type;
-
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
-
} // namespace execution
} // namespace asio
diff --git a/3rdparty/asio/include/asio/execution/impl/bad_executor.ipp b/3rdparty/asio/include/asio/execution/impl/bad_executor.ipp
index 7505e5c85c1..4e185acb059 100644
--- a/3rdparty/asio/include/asio/execution/impl/bad_executor.ipp
+++ b/3rdparty/asio/include/asio/execution/impl/bad_executor.ipp
@@ -2,7 +2,7 @@
// exection/impl/bad_executor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,11 +23,11 @@
namespace asio {
namespace execution {
-bad_executor::bad_executor() ASIO_NOEXCEPT
+bad_executor::bad_executor() noexcept
{
}
-const char* bad_executor::what() const ASIO_NOEXCEPT_OR_NOTHROW
+const char* bad_executor::what() const noexcept
{
return "bad executor";
}
diff --git a/3rdparty/asio/include/asio/execution/impl/receiver_invocation_error.ipp b/3rdparty/asio/include/asio/execution/impl/receiver_invocation_error.ipp
deleted file mode 100644
index 5fd4e91191a..00000000000
--- a/3rdparty/asio/include/asio/execution/impl/receiver_invocation_error.ipp
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// exection/impl/receiver_invocation_error.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_IMPL_RECEIVER_INVOCATION_ERROR_IPP
-#define ASIO_EXECUTION_IMPL_RECEIVER_INVOCATION_ERROR_IPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/execution/receiver_invocation_error.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace execution {
-
-receiver_invocation_error::receiver_invocation_error()
- : std::runtime_error("receiver invocation error")
-{
-}
-
-} // namespace execution
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_IMPL_RECEIVER_INVOCATION_ERROR_IPP
diff --git a/3rdparty/asio/include/asio/execution/invocable_archetype.hpp b/3rdparty/asio/include/asio/execution/invocable_archetype.hpp
index b141979caff..50223279e1f 100644
--- a/3rdparty/asio/include/asio/execution/invocable_archetype.hpp
+++ b/3rdparty/asio/include/asio/execution/invocable_archetype.hpp
@@ -2,7 +2,7 @@
// execution/invocable_archetype.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,7 +17,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/detail/push_options.hpp"
@@ -28,38 +27,11 @@ namespace execution {
/// execution::executor concept.
struct invocable_archetype
{
-#if !defined(GENERATING_DOCUMENTATION)
- // Necessary for compatibility with a C++03 implementation of result_of.
- typedef void result_type;
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
-
/// Function call operator.
template <typename... Args>
- void operator()(ASIO_MOVE_ARG(Args)...)
- {
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
- void operator()()
+ void operator()(Args&&...)
{
}
-
-#define ASIO_PRIVATE_INVOCABLE_ARCHETYPE_CALL_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(ASIO_VARIADIC_UNNAMED_MOVE_PARAMS(n)) \
- { \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INVOCABLE_ARCHETYPE_CALL_DEF)
-#undef ASIO_PRIVATE_INVOCABLE_ARCHETYPE_CALL_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
};
} // namespace execution
diff --git a/3rdparty/asio/include/asio/execution/mapping.hpp b/3rdparty/asio/include/asio/execution/mapping.hpp
index 33924c81466..4c6e1791869 100644
--- a/3rdparty/asio/include/asio/execution/mapping.hpp
+++ b/3rdparty/asio/include/asio/execution/mapping.hpp
@@ -2,7 +2,7 @@
// execution/mapping.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,8 +18,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution/executor.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
#include "asio/is_applicable_property.hpp"
#include "asio/query.hpp"
#include "asio/traits/query_free.hpp"
@@ -40,10 +38,9 @@ namespace execution {
/// of execution agents on to threads of execution.
struct mapping_t
{
- /// The mapping_t property applies to executors, senders, and schedulers.
+ /// The mapping_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The top-level mapping_t property cannot be required.
static constexpr bool is_requirable = false;
@@ -58,11 +55,9 @@ struct mapping_t
/// threads of execution.
struct thread_t
{
- /// The mapping_t::thread_t property applies to executors, senders, and
- /// schedulers.
+ /// The mapping_t::thread_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The mapping_t::thread_t property can be required.
static constexpr bool is_requirable = true;
@@ -87,11 +82,9 @@ struct mapping_t
/// new threads of execution.
struct new_thread_t
{
- /// The mapping_t::new_thread_t property applies to executors, senders, and
- /// schedulers.
+ /// The mapping_t::new_thread_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The mapping_t::new_thread_t property can be required.
static constexpr bool is_requirable = true;
@@ -116,11 +109,9 @@ struct mapping_t
/// implementation-defined.
struct other_t
{
- /// The mapping_t::other_t property applies to executors, senders, and
- /// schedulers.
+ /// The mapping_t::other_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The mapping_t::other_t property can be required.
static constexpr bool is_requirable = true;
@@ -193,45 +184,33 @@ struct mapping_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = false);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
typedef mapping_t polymorphic_query_result_type;
typedef detail::mapping::thread_t<I> thread_t;
typedef detail::mapping::new_thread_t<I> new_thread_t;
typedef detail::mapping::other_t<I> other_t;
- ASIO_CONSTEXPR mapping_t()
+ constexpr mapping_t()
: value_(-1)
{
}
- ASIO_CONSTEXPR mapping_t(thread_t)
+ constexpr mapping_t(thread_t)
: value_(0)
{
}
- ASIO_CONSTEXPR mapping_t(new_thread_t)
+ constexpr mapping_t(new_thread_t)
: value_(1)
{
}
- ASIO_CONSTEXPR mapping_t(other_t)
+ constexpr mapping_t(other_t)
: value_(2)
{
}
@@ -243,16 +222,14 @@ struct mapping_t
struct type
{
template <typename P>
- auto query(ASIO_MOVE_ARG(P) p) const
+ auto query(P&& p) const
noexcept(
noexcept(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
)
)
-> decltype(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
);
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
@@ -267,17 +244,17 @@ struct mapping_t
struct type
{
template <typename P>
- static constexpr auto query(ASIO_MOVE_ARG(P) p)
+ static constexpr auto query(P&& p)
noexcept(
noexcept(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
)
-> decltype(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
{
- return T::query(ASIO_MOVE_CAST(P)(p));
+ return T::query(static_cast<P&&>(p));
}
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
@@ -297,88 +274,87 @@ struct mapping_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, thread_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, thread_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, thread_t>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, new_thread_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::static_query<T, thread_t>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, new_thread_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, new_thread_t>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, other_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::static_query<T, thread_t>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::static_query<T, new_thread_t>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, other_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, other_t>::value();
}
template <typename E, typename T = decltype(mapping_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= mapping_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- friend ASIO_CONSTEXPR bool operator==(
+ friend constexpr bool operator==(
const mapping_t& a, const mapping_t& b)
{
return a.value_ == b.value_;
}
- friend ASIO_CONSTEXPR bool operator!=(
+ friend constexpr bool operator!=(
const mapping_t& a, const mapping_t& b)
{
return a.value_ != b.value_;
@@ -386,22 +362,20 @@ struct mapping_t
struct convertible_from_mapping_t
{
- ASIO_CONSTEXPR convertible_from_mapping_t(mapping_t) {}
+ constexpr convertible_from_mapping_t(mapping_t) {}
};
template <typename Executor>
- friend ASIO_CONSTEXPR mapping_t query(
+ friend constexpr mapping_t query(
const Executor& ex, convertible_from_mapping_t,
- typename enable_if<
+ enable_if_t<
can_query<const Executor&, thread_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, mapping_t<>::thread_t>::value))
+ noexcept(is_nothrow_query<const Executor&, mapping_t<>::thread_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, thread_t>::value))
+ noexcept(is_nothrow_query<const Executor&, thread_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -409,21 +383,20 @@ struct mapping_t
}
template <typename Executor>
- friend ASIO_CONSTEXPR mapping_t query(
+ friend constexpr mapping_t query(
const Executor& ex, convertible_from_mapping_t,
- typename enable_if<
+ enable_if_t<
!can_query<const Executor&, thread_t>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
can_query<const Executor&, new_thread_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, mapping_t<>::new_thread_t>::value))
+ noexcept(
+ is_nothrow_query<const Executor&, mapping_t<>::new_thread_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, new_thread_t>::value))
+ noexcept(is_nothrow_query<const Executor&, new_thread_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -431,24 +404,22 @@ struct mapping_t
}
template <typename Executor>
- friend ASIO_CONSTEXPR mapping_t query(
+ friend constexpr mapping_t query(
const Executor& ex, convertible_from_mapping_t,
- typename enable_if<
+ enable_if_t<
!can_query<const Executor&, thread_t>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!can_query<const Executor&, new_thread_t>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
can_query<const Executor&, other_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, mapping_t<>::other_t>::value))
+ noexcept(is_nothrow_query<const Executor&, mapping_t<>::other_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, other_t>::value))
+ noexcept(is_nothrow_query<const Executor&, other_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -459,10 +430,6 @@ struct mapping_t
ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(new_thread_t, new_thread);
ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(other_t, other);
-#if !defined(ASIO_HAS_CONSTEXPR)
- static const mapping_t instance;
-#endif // !defined(ASIO_HAS_CONSTEXPR)
-
private:
int value_;
};
@@ -474,11 +441,6 @@ const T mapping_t<I>::static_query_v;
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_CONSTEXPR)
-template <int I>
-const mapping_t<I> mapping_t<I>::instance;
-#endif
-
template <int I>
const typename mapping_t<I>::thread_t mapping_t<I>::thread;
@@ -495,26 +457,14 @@ struct thread_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
typedef mapping_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR thread_t()
+ constexpr thread_t()
{
}
@@ -531,58 +481,75 @@ struct thread_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename T>
- static ASIO_CONSTEXPR thread_t static_query(
- typename enable_if<
+ static constexpr thread_t static_query(
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::query_free<T, thread_t>::is_valid
- >::type* = 0,
- typename enable_if<
- !can_query<T, new_thread_t<I> >::value
- >::type* = 0,
- typename enable_if<
- !can_query<T, other_t<I> >::value
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0,
+ enable_if_t<
+ !can_query<T, new_thread_t<I>>::value
+ >* = 0,
+ enable_if_t<
+ !can_query<T, other_t<I>>::value
+ >* = 0) noexcept
{
return thread_t();
}
template <typename E, typename T = decltype(thread_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= thread_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR mapping_t<I> value()
+ static constexpr mapping_t<I> value()
{
return thread_t();
}
- friend ASIO_CONSTEXPR bool operator==(
- const thread_t&, const thread_t&)
+ friend constexpr bool operator==(const thread_t&, const thread_t&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const thread_t&, const thread_t&)
+ friend constexpr bool operator!=(const thread_t&, const thread_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const thread_t&, const new_thread_t<I>&)
{
return false;
}
+
+ friend constexpr bool operator!=(const thread_t&, const new_thread_t<I>&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator==(const thread_t&, const other_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const thread_t&, const other_t<I>&)
+ {
+ return true;
+ }
};
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
@@ -597,26 +564,14 @@ struct new_thread_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
typedef mapping_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR new_thread_t()
+ constexpr new_thread_t()
{
}
@@ -633,37 +588,52 @@ struct new_thread_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
+ static constexpr typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename E, typename T = decltype(new_thread_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = new_thread_t::static_query<E>();
+ static constexpr const T static_query_v = new_thread_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR mapping_t<I> value()
+ static constexpr mapping_t<I> value()
{
return new_thread_t();
}
- friend ASIO_CONSTEXPR bool operator==(
- const new_thread_t&, const new_thread_t&)
+ friend constexpr bool operator==(const new_thread_t&, const new_thread_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const new_thread_t&, const new_thread_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const new_thread_t&, const thread_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const new_thread_t&, const thread_t<I>&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const new_thread_t&, const new_thread_t&)
+ friend constexpr bool operator==(const new_thread_t&, const other_t<I>&)
{
return false;
}
+
+ friend constexpr bool operator!=(const new_thread_t&, const other_t<I>&)
+ {
+ return true;
+ }
};
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
@@ -678,26 +648,14 @@ struct other_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
typedef mapping_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR other_t()
+ constexpr other_t()
{
}
@@ -714,37 +672,53 @@ struct other_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename E, typename T = decltype(other_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = other_t::static_query<E>();
+ static constexpr const T static_query_v = other_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR mapping_t<I> value()
+ static constexpr mapping_t<I> value()
{
return other_t();
}
- friend ASIO_CONSTEXPR bool operator==(
- const other_t&, const other_t&)
+ friend constexpr bool operator==(const other_t&, const other_t&)
+ {
+ return true;
+ }
+
+ friend constexpr bool operator!=(const other_t&, const other_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const other_t&, const thread_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const other_t&, const thread_t<I>&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const other_t&, const other_t&)
+ friend constexpr bool operator==(const other_t&, const new_thread_t<I>&)
{
return false;
}
+
+ friend constexpr bool operator!=(const other_t&, const new_thread_t<I>&)
+ {
+ return true;
+ }
};
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
@@ -759,11 +733,7 @@ const T other_t<I>::static_query_v;
typedef detail::mapping_t<> mapping_t;
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr mapping_t mapping;
-#else // defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-namespace { static const mapping_t& mapping = mapping_t::instance; }
-#endif
} // namespace execution
@@ -771,69 +741,25 @@ namespace { static const mapping_t& mapping = mapping_t::instance; }
template <typename T>
struct is_applicable_property<T, execution::mapping_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::mapping_t::thread_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::mapping_t::new_thread_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::mapping_t::other_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
@@ -845,42 +771,42 @@ namespace traits {
template <typename T>
struct query_free_default<T, execution::mapping_t,
- typename enable_if<
+ enable_if_t<
can_query<T, execution::mapping_t::thread_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::mapping_t::thread_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::mapping_t::thread_t>::value;
typedef execution::mapping_t result_type;
};
template <typename T>
struct query_free_default<T, execution::mapping_t,
- typename enable_if<
+ enable_if_t<
!can_query<T, execution::mapping_t::thread_t>::value
&& can_query<T, execution::mapping_t::new_thread_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::mapping_t::new_thread_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::mapping_t::new_thread_t>::value;
typedef execution::mapping_t result_type;
};
template <typename T>
struct query_free_default<T, execution::mapping_t,
- typename enable_if<
+ enable_if_t<
!can_query<T, execution::mapping_t::thread_t>::value
&& !can_query<T, execution::mapping_t::new_thread_t>::value
&& can_query<T, execution::mapping_t::other_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::mapping_t::other_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::mapping_t::other_t>::value;
typedef execution::mapping_t result_type;
};
@@ -892,18 +818,18 @@ struct query_free_default<T, execution::mapping_t,
template <typename T>
struct static_query<T, execution::mapping_t,
- typename enable_if<
+ enable_if_t<
execution::detail::mapping_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::mapping_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::mapping_t<0>::
query_static_constexpr_member<T>::value();
@@ -912,21 +838,21 @@ struct static_query<T, execution::mapping_t,
template <typename T>
struct static_query<T, execution::mapping_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::mapping_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::mapping_t<0>::
query_member<T>::is_valid
&& traits::static_query<T, execution::mapping_t::thread_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::mapping_t::thread_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T, execution::mapping_t::thread_t>::value();
}
@@ -934,22 +860,22 @@ struct static_query<T, execution::mapping_t,
template <typename T>
struct static_query<T, execution::mapping_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::mapping_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::mapping_t<0>::
query_member<T>::is_valid
&& !traits::static_query<T, execution::mapping_t::thread_t>::is_valid
&& traits::static_query<T, execution::mapping_t::new_thread_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::mapping_t::new_thread_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T, execution::mapping_t::new_thread_t>::value();
}
@@ -957,7 +883,7 @@ struct static_query<T, execution::mapping_t,
template <typename T>
struct static_query<T, execution::mapping_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::mapping_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::mapping_t<0>::
@@ -965,15 +891,15 @@ struct static_query<T, execution::mapping_t,
&& !traits::static_query<T, execution::mapping_t::thread_t>::is_valid
&& !traits::static_query<T, execution::mapping_t::new_thread_t>::is_valid
&& traits::static_query<T, execution::mapping_t::other_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::mapping_t::other_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T, execution::mapping_t::other_t>::value();
}
@@ -981,18 +907,18 @@ struct static_query<T, execution::mapping_t,
template <typename T>
struct static_query<T, execution::mapping_t::thread_t,
- typename enable_if<
+ enable_if_t<
execution::detail::mapping::thread_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::mapping::thread_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::mapping::thread_t<0>::
query_static_constexpr_member<T>::value();
@@ -1001,7 +927,7 @@ struct static_query<T, execution::mapping_t::thread_t,
template <typename T>
struct static_query<T, execution::mapping_t::thread_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::mapping::thread_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::mapping::thread_t<0>::
@@ -1009,14 +935,14 @@ struct static_query<T, execution::mapping_t::thread_t,
&& !traits::query_free<T, execution::mapping_t::thread_t>::is_valid
&& !can_query<T, execution::mapping_t::new_thread_t>::value
&& !can_query<T, execution::mapping_t::other_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::mapping_t::thread_t result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return result_type();
}
@@ -1024,18 +950,18 @@ struct static_query<T, execution::mapping_t::thread_t,
template <typename T>
struct static_query<T, execution::mapping_t::new_thread_t,
- typename enable_if<
+ enable_if_t<
execution::detail::mapping::new_thread_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::mapping::new_thread_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::mapping::new_thread_t<0>::
query_static_constexpr_member<T>::value();
@@ -1044,18 +970,18 @@ struct static_query<T, execution::mapping_t::new_thread_t,
template <typename T>
struct static_query<T, execution::mapping_t::other_t,
- typename enable_if<
+ enable_if_t<
execution::detail::mapping::other_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::mapping::other_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::mapping::other_t<0>::
query_static_constexpr_member<T>::value();
@@ -1065,46 +991,6 @@ struct static_query<T, execution::mapping_t::other_t,
#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
-template <typename T>
-struct static_require<T, execution::mapping_t::thread_t,
- typename enable_if<
- static_query<T, execution::mapping_t::thread_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::mapping_t::thread_t>::result_type,
- execution::mapping_t::thread_t>::value));
-};
-
-template <typename T>
-struct static_require<T, execution::mapping_t::new_thread_t,
- typename enable_if<
- static_query<T, execution::mapping_t::new_thread_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::mapping_t::new_thread_t>::result_type,
- execution::mapping_t::new_thread_t>::value));
-};
-
-template <typename T>
-struct static_require<T, execution::mapping_t::other_t,
- typename enable_if<
- static_query<T, execution::mapping_t::other_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::mapping_t::other_t>::result_type,
- execution::mapping_t::other_t>::value));
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
} // namespace traits
#endif // defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/execution/occupancy.hpp b/3rdparty/asio/include/asio/execution/occupancy.hpp
index e1842a46ab0..c986c88113d 100644
--- a/3rdparty/asio/include/asio/execution/occupancy.hpp
+++ b/3rdparty/asio/include/asio/execution/occupancy.hpp
@@ -2,7 +2,7 @@
// execution/occupancy.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,8 +18,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution/executor.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
#include "asio/is_applicable_property.hpp"
#include "asio/traits/query_static_constexpr_member.hpp"
#include "asio/traits/static_query.hpp"
@@ -36,10 +34,9 @@ namespace execution {
/// should occupy the associated execution context.
struct occupancy_t
{
- /// The occupancy_t property applies to executors, senders, and schedulers.
+ /// The occupancy_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The occupancy_t property cannot be required.
static constexpr bool is_requirable = false;
@@ -66,26 +63,14 @@ struct occupancy_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = false);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
typedef std::size_t polymorphic_query_result_type;
- ASIO_CONSTEXPR occupancy_t()
+ constexpr occupancy_t()
{
}
@@ -96,17 +81,17 @@ struct occupancy_t
struct type
{
template <typename P>
- static constexpr auto query(ASIO_MOVE_ARG(P) p)
+ static constexpr auto query(P&& p)
noexcept(
noexcept(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
)
-> decltype(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
{
- return T::query(ASIO_MOVE_CAST(P)(p));
+ return T::query(static_cast<P&&>(p));
}
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
@@ -122,24 +107,17 @@ struct occupancy_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
+ static constexpr typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename E, typename T = decltype(occupancy_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = occupancy_t::static_query<E>();
+ static constexpr const T static_query_v = occupancy_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-
-#if !defined(ASIO_HAS_CONSTEXPR)
- static const occupancy_t instance;
-#endif // !defined(ASIO_HAS_CONSTEXPR)
};
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
@@ -149,20 +127,11 @@ const T occupancy_t<I>::static_query_v;
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_CONSTEXPR)
-template <int I>
-const occupancy_t<I> occupancy_t<I>::instance;
-#endif
-
} // namespace detail
typedef detail::occupancy_t<> occupancy_t;
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr occupancy_t occupancy;
-#else // defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-namespace { static const occupancy_t& occupancy = occupancy_t::instance; }
-#endif
} // namespace execution
@@ -170,18 +139,7 @@ namespace { static const occupancy_t& occupancy = occupancy_t::instance; }
template <typename T>
struct is_applicable_property<T, execution::occupancy_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
@@ -194,18 +152,18 @@ namespace traits {
template <typename T>
struct static_query<T, execution::occupancy_t,
- typename enable_if<
+ enable_if_t<
execution::detail::occupancy_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::occupancy_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::occupancy_t<0>::
query_static_constexpr_member<T>::value();
diff --git a/3rdparty/asio/include/asio/execution/operation_state.hpp b/3rdparty/asio/include/asio/execution/operation_state.hpp
deleted file mode 100644
index 8fb7a94b8ca..00000000000
--- a/3rdparty/asio/include/asio/execution/operation_state.hpp
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// execution/operation_state.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_OPERATION_STATE_HPP
-#define ASIO_EXECUTION_OPERATION_STATE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/start.hpp"
-
-#if defined(ASIO_HAS_DEDUCED_START_FREE_TRAIT) \
- && defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-# define ASIO_HAS_DEDUCED_EXECUTION_IS_OPERATION_STATE_TRAIT 1
-#endif // defined(ASIO_HAS_DEDUCED_START_FREE_TRAIT)
- // && defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace execution {
-namespace detail {
-
-template <typename T>
-struct is_operation_state_base :
- integral_constant<bool,
- is_destructible<T>::value
- && is_object<T>::value
- >
-{
-};
-
-} // namespace detail
-
-/// The is_operation_state trait detects whether a type T satisfies the
-/// execution::operation_state concept.
-/**
- * Class template @c is_operation_state is a type trait that is derived from
- * @c true_type if the type @c T meets the concept definition for an
- * @c operation_state, otherwise @c false_type.
- */
-template <typename T>
-struct is_operation_state :
-#if defined(GENERATING_DOCUMENTATION)
- integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- conditional<
- can_start<typename add_lvalue_reference<T>::type>::value
- && is_nothrow_start<typename add_lvalue_reference<T>::type>::value,
- detail::is_operation_state_base<T>,
- false_type
- >::type
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename T>
-ASIO_CONSTEXPR const bool is_operation_state_v =
- is_operation_state<T>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-#if defined(ASIO_HAS_CONCEPTS)
-
-template <typename T>
-ASIO_CONCEPT operation_state = is_operation_state<T>::value;
-
-#define ASIO_EXECUTION_OPERATION_STATE \
- ::asio::execution::operation_state
-
-#else // defined(ASIO_HAS_CONCEPTS)
-
-#define ASIO_EXECUTION_OPERATION_STATE typename
-
-#endif // defined(ASIO_HAS_CONCEPTS)
-
-} // namespace execution
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_OPERATION_STATE_HPP
diff --git a/3rdparty/asio/include/asio/execution/outstanding_work.hpp b/3rdparty/asio/include/asio/execution/outstanding_work.hpp
index 48ed71d1563..600792b95b4 100644
--- a/3rdparty/asio/include/asio/execution/outstanding_work.hpp
+++ b/3rdparty/asio/include/asio/execution/outstanding_work.hpp
@@ -2,7 +2,7 @@
// execution/outstanding_work.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,8 +18,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution/executor.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
#include "asio/is_applicable_property.hpp"
#include "asio/query.hpp"
#include "asio/traits/query_free.hpp"
@@ -39,11 +37,9 @@ namespace execution {
/// A property to describe whether task submission is likely in the future.
struct outstanding_work_t
{
- /// The outstanding_work_t property applies to executors, senders, and
- /// schedulers.
+ /// The outstanding_work_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The top-level outstanding_work_t property cannot be required.
static constexpr bool is_requirable = false;
@@ -58,11 +54,9 @@ struct outstanding_work_t
/// future submission of a function object.
struct untracked_t
{
- /// The outstanding_work_t::untracked_t property applies to executors,
- /// senders, and schedulers.
+ /// The outstanding_work_t::untracked_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The outstanding_work_t::untracked_t property can be required.
static constexpr bool is_requirable = true;
@@ -87,11 +81,9 @@ struct outstanding_work_t
/// future submission of a function object.
struct tracked_t
{
- /// The outstanding_work_t::untracked_t property applies to executors,
- /// senders, and schedulers.
+ /// The outstanding_work_t::untracked_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The outstanding_work_t::tracked_t property can be required.
static constexpr bool is_requirable = true;
@@ -159,39 +151,27 @@ struct outstanding_work_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = false);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
typedef outstanding_work_t polymorphic_query_result_type;
typedef detail::outstanding_work::untracked_t<I> untracked_t;
typedef detail::outstanding_work::tracked_t<I> tracked_t;
- ASIO_CONSTEXPR outstanding_work_t()
+ constexpr outstanding_work_t()
: value_(-1)
{
}
- ASIO_CONSTEXPR outstanding_work_t(untracked_t)
+ constexpr outstanding_work_t(untracked_t)
: value_(0)
{
}
- ASIO_CONSTEXPR outstanding_work_t(tracked_t)
+ constexpr outstanding_work_t(tracked_t)
: value_(1)
{
}
@@ -203,16 +183,14 @@ struct outstanding_work_t
struct type
{
template <typename P>
- auto query(ASIO_MOVE_ARG(P) p) const
+ auto query(P&& p) const
noexcept(
noexcept(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
)
)
-> decltype(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
);
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
@@ -227,17 +205,17 @@ struct outstanding_work_t
struct type
{
template <typename P>
- static constexpr auto query(ASIO_MOVE_ARG(P) p)
+ static constexpr auto query(P&& p)
noexcept(
noexcept(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
)
-> decltype(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
{
- return T::query(ASIO_MOVE_CAST(P)(p));
+ return T::query(static_cast<P&&>(p));
}
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
@@ -257,66 +235,65 @@ struct outstanding_work_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, untracked_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, untracked_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, untracked_t>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, tracked_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::static_query<T, untracked_t>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, tracked_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, tracked_t>::value();
}
template <typename E,
typename T = decltype(outstanding_work_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= outstanding_work_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- friend ASIO_CONSTEXPR bool operator==(
+ friend constexpr bool operator==(
const outstanding_work_t& a, const outstanding_work_t& b)
{
return a.value_ == b.value_;
}
- friend ASIO_CONSTEXPR bool operator!=(
+ friend constexpr bool operator!=(
const outstanding_work_t& a, const outstanding_work_t& b)
{
return a.value_ != b.value_;
@@ -324,25 +301,23 @@ struct outstanding_work_t
struct convertible_from_outstanding_work_t
{
- ASIO_CONSTEXPR convertible_from_outstanding_work_t(outstanding_work_t)
+ constexpr convertible_from_outstanding_work_t(outstanding_work_t)
{
}
};
template <typename Executor>
- friend ASIO_CONSTEXPR outstanding_work_t query(
+ friend constexpr outstanding_work_t query(
const Executor& ex, convertible_from_outstanding_work_t,
- typename enable_if<
+ enable_if_t<
can_query<const Executor&, untracked_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&,
- outstanding_work_t<>::untracked_t>::value))
+ noexcept(is_nothrow_query<const Executor&,
+ outstanding_work_t<>::untracked_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, untracked_t>::value))
+ noexcept(is_nothrow_query<const Executor&, untracked_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -350,22 +325,20 @@ struct outstanding_work_t
}
template <typename Executor>
- friend ASIO_CONSTEXPR outstanding_work_t query(
+ friend constexpr outstanding_work_t query(
const Executor& ex, convertible_from_outstanding_work_t,
- typename enable_if<
+ enable_if_t<
!can_query<const Executor&, untracked_t>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
can_query<const Executor&, tracked_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&,
- outstanding_work_t<>::tracked_t>::value))
+ noexcept(is_nothrow_query<const Executor&,
+ outstanding_work_t<>::tracked_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, tracked_t>::value))
+ noexcept(is_nothrow_query<const Executor&, tracked_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -375,10 +348,6 @@ struct outstanding_work_t
ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(untracked_t, untracked);
ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(tracked_t, tracked);
-#if !defined(ASIO_HAS_CONSTEXPR)
- static const outstanding_work_t instance;
-#endif // !defined(ASIO_HAS_CONSTEXPR)
-
private:
int value_;
};
@@ -390,11 +359,6 @@ const T outstanding_work_t<I>::static_query_v;
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_CONSTEXPR)
-template <int I>
-const outstanding_work_t<I> outstanding_work_t<I>::instance;
-#endif
-
template <int I>
const typename outstanding_work_t<I>::untracked_t
outstanding_work_t<I>::untracked;
@@ -410,26 +374,14 @@ struct untracked_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
typedef outstanding_work_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR untracked_t()
+ constexpr untracked_t()
{
}
@@ -447,55 +399,61 @@ struct untracked_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename T>
- static ASIO_CONSTEXPR untracked_t static_query(
- typename enable_if<
+ static constexpr untracked_t static_query(
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::query_free<T, untracked_t>::is_valid
- >::type* = 0,
- typename enable_if<
- !can_query<T, tracked_t<I> >::value
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0,
+ enable_if_t<
+ !can_query<T, tracked_t<I>>::value
+ >* = 0) noexcept
{
return untracked_t();
}
template <typename E, typename T = decltype(untracked_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = untracked_t::static_query<E>();
+ static constexpr const T static_query_v = untracked_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR outstanding_work_t<I> value()
+ static constexpr outstanding_work_t<I> value()
{
return untracked_t();
}
- friend ASIO_CONSTEXPR bool operator==(
- const untracked_t&, const untracked_t&)
+ friend constexpr bool operator==(const untracked_t&, const untracked_t&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const untracked_t&, const untracked_t&)
+ friend constexpr bool operator!=(const untracked_t&, const untracked_t&)
{
return false;
}
+
+ friend constexpr bool operator==(const untracked_t&, const tracked_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const untracked_t&, const tracked_t<I>&)
+ {
+ return true;
+ }
};
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
@@ -510,26 +468,14 @@ struct tracked_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
typedef outstanding_work_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR tracked_t()
+ constexpr tracked_t()
{
}
@@ -547,37 +493,43 @@ struct tracked_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename E, typename T = decltype(tracked_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
- = tracked_t::static_query<E>();
+ static constexpr const T static_query_v = tracked_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR outstanding_work_t<I> value()
+ static constexpr outstanding_work_t<I> value()
{
return tracked_t();
}
- friend ASIO_CONSTEXPR bool operator==(
- const tracked_t&, const tracked_t&)
+ friend constexpr bool operator==(const tracked_t&, const tracked_t&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const tracked_t&, const tracked_t&)
+ friend constexpr bool operator!=(const tracked_t&, const tracked_t&)
{
return false;
}
+
+ friend constexpr bool operator==(const tracked_t&, const untracked_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const tracked_t&, const untracked_t<I>&)
+ {
+ return true;
+ }
};
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
@@ -592,12 +544,7 @@ const T tracked_t<I>::static_query_v;
typedef detail::outstanding_work_t<> outstanding_work_t;
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr outstanding_work_t outstanding_work;
-#else // defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-namespace { static const outstanding_work_t&
- outstanding_work = outstanding_work_t::instance; }
-#endif
} // namespace execution
@@ -605,52 +552,19 @@ namespace { static const outstanding_work_t&
template <typename T>
struct is_applicable_property<T, execution::outstanding_work_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::outstanding_work_t::untracked_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::outstanding_work_t::tracked_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
@@ -662,27 +576,27 @@ namespace traits {
template <typename T>
struct query_free_default<T, execution::outstanding_work_t,
- typename enable_if<
+ enable_if_t<
can_query<T, execution::outstanding_work_t::untracked_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::outstanding_work_t::untracked_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::outstanding_work_t::untracked_t>::value;
typedef execution::outstanding_work_t result_type;
};
template <typename T>
struct query_free_default<T, execution::outstanding_work_t,
- typename enable_if<
+ enable_if_t<
!can_query<T, execution::outstanding_work_t::untracked_t>::value
&& can_query<T, execution::outstanding_work_t::tracked_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::outstanding_work_t::tracked_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::outstanding_work_t::tracked_t>::value;
typedef execution::outstanding_work_t result_type;
};
@@ -694,18 +608,18 @@ struct query_free_default<T, execution::outstanding_work_t,
template <typename T>
struct static_query<T, execution::outstanding_work_t,
- typename enable_if<
+ enable_if_t<
execution::detail::outstanding_work_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::outstanding_work_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::outstanding_work_t<0>::
query_static_constexpr_member<T>::value();
@@ -714,22 +628,22 @@ struct static_query<T, execution::outstanding_work_t,
template <typename T>
struct static_query<T, execution::outstanding_work_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::outstanding_work_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::outstanding_work_t<0>::
query_member<T>::is_valid
&& traits::static_query<T,
execution::outstanding_work_t::untracked_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::outstanding_work_t::untracked_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T,
execution::outstanding_work_t::untracked_t>::value();
@@ -738,7 +652,7 @@ struct static_query<T, execution::outstanding_work_t,
template <typename T>
struct static_query<T, execution::outstanding_work_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::outstanding_work_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::outstanding_work_t<0>::
@@ -747,15 +661,15 @@ struct static_query<T, execution::outstanding_work_t,
execution::outstanding_work_t::untracked_t>::is_valid
&& traits::static_query<T,
execution::outstanding_work_t::tracked_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::outstanding_work_t::tracked_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T,
execution::outstanding_work_t::tracked_t>::value();
@@ -764,18 +678,18 @@ struct static_query<T, execution::outstanding_work_t,
template <typename T>
struct static_query<T, execution::outstanding_work_t::untracked_t,
- typename enable_if<
+ enable_if_t<
execution::detail::outstanding_work::untracked_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::outstanding_work::untracked_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::outstanding_work::untracked_t<0>::
query_static_constexpr_member<T>::value();
@@ -784,7 +698,7 @@ struct static_query<T, execution::outstanding_work_t::untracked_t,
template <typename T>
struct static_query<T, execution::outstanding_work_t::untracked_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::outstanding_work::untracked_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::outstanding_work::untracked_t<0>::
@@ -792,14 +706,14 @@ struct static_query<T, execution::outstanding_work_t::untracked_t,
&& !traits::query_free<T,
execution::outstanding_work_t::untracked_t>::is_valid
&& !can_query<T, execution::outstanding_work_t::tracked_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::outstanding_work_t::untracked_t result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return result_type();
}
@@ -807,18 +721,18 @@ struct static_query<T, execution::outstanding_work_t::untracked_t,
template <typename T>
struct static_query<T, execution::outstanding_work_t::tracked_t,
- typename enable_if<
+ enable_if_t<
execution::detail::outstanding_work::tracked_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::outstanding_work::tracked_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::outstanding_work::tracked_t<0>::
query_static_constexpr_member<T>::value();
@@ -828,34 +742,6 @@ struct static_query<T, execution::outstanding_work_t::tracked_t,
#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
-template <typename T>
-struct static_require<T, execution::outstanding_work_t::untracked_t,
- typename enable_if<
- static_query<T, execution::outstanding_work_t::untracked_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::outstanding_work_t::untracked_t>::result_type,
- execution::outstanding_work_t::untracked_t>::value));
-};
-
-template <typename T>
-struct static_require<T, execution::outstanding_work_t::tracked_t,
- typename enable_if<
- static_query<T, execution::outstanding_work_t::tracked_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::outstanding_work_t::tracked_t>::result_type,
- execution::outstanding_work_t::tracked_t>::value));
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
} // namespace traits
#endif // defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/execution/prefer_only.hpp b/3rdparty/asio/include/asio/execution/prefer_only.hpp
index e608a7707db..1a990ebf392 100644
--- a/3rdparty/asio/include/asio/execution/prefer_only.hpp
+++ b/3rdparty/asio/include/asio/execution/prefer_only.hpp
@@ -2,7 +2,7 @@
// execution/prefer_only.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -65,16 +65,17 @@ namespace detail {
template <typename InnerProperty, typename = void>
struct prefer_only_is_preferable
{
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
+ static constexpr bool is_preferable = false;
};
template <typename InnerProperty>
struct prefer_only_is_preferable<InnerProperty,
- typename enable_if<
+ enable_if_t<
InnerProperty::is_preferable
- >::type>
+ >
+ >
{
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_preferable = true;
};
template <typename InnerProperty, typename = void>
@@ -84,9 +85,10 @@ struct prefer_only_polymorphic_query_result_type
template <typename InnerProperty>
struct prefer_only_polymorphic_query_result_type<InnerProperty,
- typename void_type<
+ void_t<
typename InnerProperty::polymorphic_query_result_type
- >::type>
+ >
+ >
{
typedef typename InnerProperty::polymorphic_query_result_type
polymorphic_query_result_type;
@@ -103,14 +105,14 @@ struct prefer_only_property
}
};
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
template <typename InnerProperty>
struct prefer_only_property<InnerProperty,
- typename void_type<
+ void_t<
decltype(asio::declval<const InnerProperty>().value())
- >::type>
+ >
+ >
{
InnerProperty property;
@@ -119,17 +121,15 @@ struct prefer_only_property<InnerProperty,
{
}
- ASIO_CONSTEXPR auto value() const
- ASIO_NOEXCEPT_IF((
- noexcept(asio::declval<const InnerProperty>().value())))
+ constexpr auto value() const
+ noexcept(noexcept(asio::declval<const InnerProperty>().value()))
-> decltype(asio::declval<const InnerProperty>().value())
{
return property.value();
}
};
-#else // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#else // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
struct prefer_only_memfns_base
{
@@ -158,11 +158,12 @@ char prefer_only_value_memfn_helper(
template <typename InnerProperty>
struct prefer_only_property<InnerProperty,
- typename enable_if<
+ enable_if_t<
sizeof(prefer_only_value_memfn_helper<InnerProperty>(0)) != 1
&& !is_same<typename InnerProperty::polymorphic_query_result_type,
void>::value
- >::type>
+ >
+ >
{
InnerProperty property;
@@ -171,15 +172,14 @@ struct prefer_only_property<InnerProperty,
{
}
- ASIO_CONSTEXPR typename InnerProperty::polymorphic_query_result_type
+ constexpr typename InnerProperty::polymorphic_query_result_type
value() const
{
return property.value();
}
};
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
} // namespace detail
@@ -189,9 +189,9 @@ struct prefer_only :
detail::prefer_only_polymorphic_query_result_type<InnerProperty>,
detail::prefer_only_property<InnerProperty>
{
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = false);
+ static constexpr bool is_requirable = false;
- ASIO_CONSTEXPR prefer_only(const InnerProperty& p)
+ constexpr prefer_only(const InnerProperty& p)
: detail::prefer_only_property<InnerProperty>(p)
{
}
@@ -199,35 +199,33 @@ struct prefer_only :
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, InnerProperty>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- traits::static_query<T, InnerProperty>::is_noexcept))
+ noexcept(traits::static_query<T, InnerProperty>::is_noexcept)
{
return traits::static_query<T, InnerProperty>::value();
}
template <typename E, typename T = decltype(prefer_only::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= prefer_only::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename Executor, typename Property>
- friend ASIO_CONSTEXPR
- typename prefer_result<const Executor&, const InnerProperty&>::type
+ friend constexpr
+ prefer_result_t<const Executor&, const InnerProperty&>
prefer(const Executor& ex, const prefer_only<Property>& p,
- typename enable_if<
+ enable_if_t<
is_same<Property, InnerProperty>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
can_prefer<const Executor&, const InnerProperty&>::value
- >::type* = 0)
+ >* = 0)
#if !defined(ASIO_MSVC) \
&& !defined(__clang__) // Clang crashes if noexcept is used here.
- ASIO_NOEXCEPT_IF((
- is_nothrow_prefer<const Executor&, const InnerProperty&>::value))
+ noexcept(is_nothrow_prefer<const Executor&, const InnerProperty&>::value)
#endif // !defined(ASIO_MSVC)
// && !defined(__clang__)
{
@@ -235,19 +233,18 @@ struct prefer_only :
}
template <typename Executor, typename Property>
- friend ASIO_CONSTEXPR
- typename query_result<const Executor&, const InnerProperty&>::type
+ friend constexpr
+ query_result_t<const Executor&, const InnerProperty&>
query(const Executor& ex, const prefer_only<Property>& p,
- typename enable_if<
+ enable_if_t<
is_same<Property, InnerProperty>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
can_query<const Executor&, const InnerProperty&>::value
- >::type* = 0)
+ >* = 0)
#if !defined(ASIO_MSVC) \
&& !defined(__clang__) // Clang crashes if noexcept is used here.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, const InnerProperty&>::value))
+ noexcept(is_nothrow_query<const Executor&, const InnerProperty&>::value)
#endif // !defined(ASIO_MSVC)
// && !defined(__clang__)
{
@@ -265,7 +262,7 @@ const T prefer_only<InnerProperty>::static_query_v;
} // namespace execution
template <typename T, typename InnerProperty>
-struct is_applicable_property<T, execution::prefer_only<InnerProperty> >
+struct is_applicable_property<T, execution::prefer_only<InnerProperty>>
: is_applicable_property<T, InnerProperty>
{
};
@@ -276,7 +273,7 @@ namespace traits {
|| !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T, typename InnerProperty>
-struct static_query<T, execution::prefer_only<InnerProperty> > :
+struct static_query<T, execution::prefer_only<InnerProperty>> :
static_query<T, const InnerProperty&>
{
};
@@ -288,16 +285,16 @@ struct static_query<T, execution::prefer_only<InnerProperty> > :
template <typename T, typename InnerProperty>
struct prefer_free_default<T, execution::prefer_only<InnerProperty>,
- typename enable_if<
+ enable_if_t<
can_prefer<const T&, const InnerProperty&>::value
- >::type>
+ >
+ >
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_prefer<const T&, const InnerProperty&>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_prefer<const T&, const InnerProperty&>::value;
- typedef typename prefer_result<const T&,
- const InnerProperty&>::type result_type;
+ typedef prefer_result_t<const T&, const InnerProperty&> result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
@@ -306,16 +303,16 @@ struct prefer_free_default<T, execution::prefer_only<InnerProperty>,
template <typename T, typename InnerProperty>
struct query_free<T, execution::prefer_only<InnerProperty>,
- typename enable_if<
+ enable_if_t<
can_query<const T&, const InnerProperty&>::value
- >::type>
+ >
+ >
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<const T&, const InnerProperty&>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<const T&, const InnerProperty&>::value;
- typedef typename query_result<const T&,
- const InnerProperty&>::type result_type;
+ typedef query_result_t<const T&, const InnerProperty&> result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
diff --git a/3rdparty/asio/include/asio/execution/receiver.hpp b/3rdparty/asio/include/asio/execution/receiver.hpp
deleted file mode 100644
index 4f205aa5240..00000000000
--- a/3rdparty/asio/include/asio/execution/receiver.hpp
+++ /dev/null
@@ -1,280 +0,0 @@
-//
-// execution/receiver.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_RECEIVER_HPP
-#define ASIO_EXECUTION_RECEIVER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
-#include "asio/execution/set_done.hpp"
-#include "asio/execution/set_error.hpp"
-#include "asio/execution/set_value.hpp"
-
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR)
-# include <exception>
-#else // defined(ASIO_HAS_STD_EXCEPTION_PTR)
-# include "asio/error_code.hpp"
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
-
-#if defined(ASIO_HAS_DEDUCED_SET_DONE_FREE_TRAIT) \
- && defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT) \
- && defined(ASIO_HAS_DEDUCED_SET_ERROR_FREE_TRAIT) \
- && defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT) \
- && defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT) \
- && defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT) \
- && defined(ASIO_HAS_DEDUCED_RECEIVER_OF_FREE_TRAIT) \
- && defined(ASIO_HAS_DEDUCED_RECEIVER_OF_MEMBER_TRAIT)
-# define ASIO_HAS_DEDUCED_EXECUTION_IS_RECEIVER_TRAIT 1
-#endif // defined(ASIO_HAS_DEDUCED_SET_DONE_FREE_TRAIT)
- // && defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
- // && defined(ASIO_HAS_DEDUCED_SET_ERROR_FREE_TRAIT)
- // && defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
- // && defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
- // && defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
- // && defined(ASIO_HAS_DEDUCED_RECEIVER_OF_FREE_TRAIT)
- // && defined(ASIO_HAS_DEDUCED_RECEIVER_OF_MEMBER_TRAIT)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace execution {
-namespace detail {
-
-template <typename T, typename E>
-struct is_receiver_base :
- integral_constant<bool,
- is_move_constructible<typename remove_cvref<T>::type>::value
- && is_constructible<typename remove_cvref<T>::type, T>::value
- >
-{
-};
-
-} // namespace detail
-
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR)
-# define ASIO_EXECUTION_RECEIVER_ERROR_DEFAULT = std::exception_ptr
-#else // defined(ASIO_HAS_STD_EXCEPTION_PTR)
-# define ASIO_EXECUTION_RECEIVER_ERROR_DEFAULT \
- = ::asio::error_code
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
-
-/// The is_receiver trait detects whether a type T satisfies the
-/// execution::receiver concept.
-/**
- * Class template @c is_receiver is a type trait that is derived from @c
- * true_type if the type @c T meets the concept definition for a receiver for
- * error type @c E, otherwise @c false_type.
- */
-template <typename T, typename E ASIO_EXECUTION_RECEIVER_ERROR_DEFAULT>
-struct is_receiver :
-#if defined(GENERATING_DOCUMENTATION)
- integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- conditional<
- can_set_done<typename remove_cvref<T>::type>::value
- && is_nothrow_set_done<typename remove_cvref<T>::type>::value
- && can_set_error<typename remove_cvref<T>::type, E>::value
- && is_nothrow_set_error<typename remove_cvref<T>::type, E>::value,
- detail::is_receiver_base<T, E>,
- false_type
- >::type
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename T, typename E ASIO_EXECUTION_RECEIVER_ERROR_DEFAULT>
-ASIO_CONSTEXPR const bool is_receiver_v = is_receiver<T, E>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-#if defined(ASIO_HAS_CONCEPTS)
-
-template <typename T, typename E ASIO_EXECUTION_RECEIVER_ERROR_DEFAULT>
-ASIO_CONCEPT receiver = is_receiver<T, E>::value;
-
-#define ASIO_EXECUTION_RECEIVER ::asio::execution::receiver
-
-#else // defined(ASIO_HAS_CONCEPTS)
-
-#define ASIO_EXECUTION_RECEIVER typename
-
-#endif // defined(ASIO_HAS_CONCEPTS)
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// The is_receiver_of trait detects whether a type T satisfies the
-/// execution::receiver_of concept for some set of value arguments.
-/**
- * Class template @c is_receiver_of is a type trait that is derived from @c
- * true_type if the type @c T meets the concept definition for a receiver for
- * value arguments @c Vs, otherwise @c false_type.
- */
-template <typename T, typename... Vs>
-struct is_receiver_of :
-#if defined(GENERATING_DOCUMENTATION)
- integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- conditional<
- is_receiver<T>::value,
- can_set_value<typename remove_cvref<T>::type, Vs...>,
- false_type
- >::type
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename T, typename... Vs>
-ASIO_CONSTEXPR const bool is_receiver_of_v =
- is_receiver_of<T, Vs...>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-#if defined(ASIO_HAS_CONCEPTS)
-
-template <typename T, typename... Vs>
-ASIO_CONCEPT receiver_of = is_receiver_of<T, Vs...>::value;
-
-#define ASIO_EXECUTION_RECEIVER_OF_0 \
- ::asio::execution::receiver_of
-
-#define ASIO_EXECUTION_RECEIVER_OF_1(v) \
- ::asio::execution::receiver_of<v>
-
-#else // defined(ASIO_HAS_CONCEPTS)
-
-#define ASIO_EXECUTION_RECEIVER_OF_0 typename
-#define ASIO_EXECUTION_RECEIVER_OF_1(v) typename
-
-#endif // defined(ASIO_HAS_CONCEPTS)
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
-template <typename T, typename = void,
- typename = void, typename = void, typename = void, typename = void,
- typename = void, typename = void, typename = void, typename = void>
-struct is_receiver_of;
-
-template <typename T>
-struct is_receiver_of<T> :
- conditional<
- is_receiver<T>::value,
- can_set_value<typename remove_cvref<T>::type>,
- false_type
- >::type
-{
-};
-
-#define ASIO_PRIVATE_RECEIVER_OF_TRAITS_DEF(n) \
- template <typename T, ASIO_VARIADIC_TPARAMS(n)> \
- struct is_receiver_of<T, ASIO_VARIADIC_TARGS(n)> : \
- conditional< \
- conditional<true, is_receiver<T>, void>::type::value, \
- can_set_value< \
- typename remove_cvref<T>::type, \
- ASIO_VARIADIC_TARGS(n)>, \
- false_type \
- >::type \
- { \
- }; \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_RECEIVER_OF_TRAITS_DEF)
-#undef ASIO_PRIVATE_RECEIVER_OF_TRAITS_DEF
-
-#define ASIO_EXECUTION_RECEIVER_OF_0 typename
-#define ASIO_EXECUTION_RECEIVER_OF_1(v) typename
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// The is_nothrow_receiver_of trait detects whether a type T satisfies the
-/// execution::receiver_of concept for some set of value arguments, with a
-/// noexcept @c set_value operation.
-/**
- * Class template @c is_nothrow_receiver_of is a type trait that is derived
- * from @c true_type if the type @c T meets the concept definition for a
- * receiver for value arguments @c Vs, and the expression
- * <tt>execution::set_value(declval<T>(), declval<Ts>()...)</tt> is noexcept,
- * otherwise @c false_type.
- */
-template <typename T, typename... Vs>
-struct is_nothrow_receiver_of :
-#if defined(GENERATING_DOCUMENTATION)
- integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- integral_constant<bool,
- is_receiver_of<T, Vs...>::value
- && is_nothrow_set_value<typename remove_cvref<T>::type, Vs...>::value
- >
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename T, typename... Vs>
-ASIO_CONSTEXPR const bool is_nothrow_receiver_of_v =
- is_nothrow_receiver_of<T, Vs...>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
-template <typename T, typename = void,
- typename = void, typename = void, typename = void, typename = void,
- typename = void, typename = void, typename = void, typename = void>
-struct is_nothrow_receiver_of;
-
-template <typename T>
-struct is_nothrow_receiver_of<T> :
- integral_constant<bool,
- is_receiver_of<T>::value
- && is_nothrow_set_value<typename remove_cvref<T>::type>::value
- >
-{
-};
-
-#define ASIO_PRIVATE_NOTHROW_RECEIVER_OF_TRAITS_DEF(n) \
- template <typename T, ASIO_VARIADIC_TPARAMS(n)> \
- struct is_nothrow_receiver_of<T, ASIO_VARIADIC_TARGS(n)> : \
- integral_constant<bool, \
- is_receiver_of<T, ASIO_VARIADIC_TARGS(n)>::value \
- && is_nothrow_set_value<typename remove_cvref<T>::type, \
- ASIO_VARIADIC_TARGS(n)>::value \
- > \
- { \
- }; \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_NOTHROW_RECEIVER_OF_TRAITS_DEF)
-#undef ASIO_PRIVATE_NOTHROW_RECEIVER_OF_TRAITS_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
-} // namespace execution
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_RECEIVER_HPP
diff --git a/3rdparty/asio/include/asio/execution/receiver_invocation_error.hpp b/3rdparty/asio/include/asio/execution/receiver_invocation_error.hpp
deleted file mode 100644
index 00557da85e1..00000000000
--- a/3rdparty/asio/include/asio/execution/receiver_invocation_error.hpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// execution/receiver_invocation_error.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_RECEIVER_INVOCATION_ERROR_HPP
-#define ASIO_EXECUTION_RECEIVER_INVOCATION_ERROR_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include <stdexcept>
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace execution {
-
-/// Exception reported via @c set_error when an exception escapes from
-/// @c set_value.
-class receiver_invocation_error
- : public std::runtime_error
-#if defined(ASIO_HAS_STD_NESTED_EXCEPTION)
- , public std::nested_exception
-#endif // defined(ASIO_HAS_STD_NESTED_EXCEPTION)
-{
-public:
- /// Constructor.
- ASIO_DECL receiver_invocation_error();
-};
-
-} // namespace execution
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#if defined(ASIO_HEADER_ONLY)
-# include "asio/execution/impl/receiver_invocation_error.ipp"
-#endif // defined(ASIO_HEADER_ONLY)
-
-#endif // ASIO_EXECUTION_RECEIVER_INVOCATION_ERROR_HPP
diff --git a/3rdparty/asio/include/asio/execution/relationship.hpp b/3rdparty/asio/include/asio/execution/relationship.hpp
index 95160e07f1a..e4f27555e24 100644
--- a/3rdparty/asio/include/asio/execution/relationship.hpp
+++ b/3rdparty/asio/include/asio/execution/relationship.hpp
@@ -2,7 +2,7 @@
// execution/relationship.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,8 +18,6 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution/executor.hpp"
-#include "asio/execution/scheduler.hpp"
-#include "asio/execution/sender.hpp"
#include "asio/is_applicable_property.hpp"
#include "asio/query.hpp"
#include "asio/traits/query_free.hpp"
@@ -40,10 +38,9 @@ namespace execution {
/// the calling context.
struct relationship_t
{
- /// The relationship_t property applies to executors, senders, and schedulers.
+ /// The relationship_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The top-level relationship_t property cannot be required.
static constexpr bool is_requirable = false;
@@ -58,11 +55,9 @@ struct relationship_t
/// continuation of the calling context.
struct fork_t
{
- /// The relationship_t::fork_t property applies to executors, senders, and
- /// schedulers.
+ /// The relationship_t::fork_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The relationship_t::fork_t property can be required.
static constexpr bool is_requirable = true;
@@ -87,11 +82,9 @@ struct relationship_t
/// of the calling context.
struct continuation_t
{
- /// The relationship_t::continuation_t property applies to executors,
- /// senders, and schedulers.
+ /// The relationship_t::continuation_t property applies to executors.
template <typename T>
- static constexpr bool is_applicable_property_v =
- is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;
+ static constexpr bool is_applicable_property_v = is_executor_v<T>;
/// The relationship_t::continuation_t property can be required.
static constexpr bool is_requirable = true;
@@ -158,39 +151,27 @@ struct relationship_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = false);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = false);
+ static constexpr bool is_requirable = false;
+ static constexpr bool is_preferable = false;
typedef relationship_t polymorphic_query_result_type;
typedef detail::relationship::fork_t<I> fork_t;
typedef detail::relationship::continuation_t<I> continuation_t;
- ASIO_CONSTEXPR relationship_t()
+ constexpr relationship_t()
: value_(-1)
{
}
- ASIO_CONSTEXPR relationship_t(fork_t)
+ constexpr relationship_t(fork_t)
: value_(0)
{
}
- ASIO_CONSTEXPR relationship_t(continuation_t)
+ constexpr relationship_t(continuation_t)
: value_(1)
{
}
@@ -202,16 +183,14 @@ struct relationship_t
struct type
{
template <typename P>
- auto query(ASIO_MOVE_ARG(P) p) const
+ auto query(P&& p) const
noexcept(
noexcept(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
)
)
-> decltype(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
);
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
@@ -226,17 +205,17 @@ struct relationship_t
struct type
{
template <typename P>
- static constexpr auto query(ASIO_MOVE_ARG(P) p)
+ static constexpr auto query(P&& p)
noexcept(
noexcept(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
)
-> decltype(
- conditional<true, T, P>::type::query(ASIO_MOVE_CAST(P)(p))
+ conditional_t<true, T, P>::query(static_cast<P&&>(p))
)
{
- return T::query(ASIO_MOVE_CAST(P)(p));
+ return T::query(static_cast<P&&>(p));
}
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
@@ -256,66 +235,65 @@ struct relationship_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, fork_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, fork_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, fork_t>::value();
}
template <typename T>
- static ASIO_CONSTEXPR
+ static constexpr
typename traits::static_query<T, continuation_t>::result_type
static_query(
- typename enable_if<
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::static_query<T, fork_t>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
traits::static_query<T, continuation_t>::is_valid
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0) noexcept
{
return traits::static_query<T, continuation_t>::value();
}
template <typename E,
typename T = decltype(relationship_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= relationship_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- friend ASIO_CONSTEXPR bool operator==(
+ friend constexpr bool operator==(
const relationship_t& a, const relationship_t& b)
{
return a.value_ == b.value_;
}
- friend ASIO_CONSTEXPR bool operator!=(
+ friend constexpr bool operator!=(
const relationship_t& a, const relationship_t& b)
{
return a.value_ != b.value_;
@@ -323,24 +301,22 @@ struct relationship_t
struct convertible_from_relationship_t
{
- ASIO_CONSTEXPR convertible_from_relationship_t(relationship_t)
+ constexpr convertible_from_relationship_t(relationship_t)
{
}
};
template <typename Executor>
- friend ASIO_CONSTEXPR relationship_t query(
+ friend constexpr relationship_t query(
const Executor& ex, convertible_from_relationship_t,
- typename enable_if<
+ enable_if_t<
can_query<const Executor&, fork_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, relationship_t<>::fork_t>::value))
+ noexcept(is_nothrow_query<const Executor&, relationship_t<>::fork_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, fork_t>::value))
+ noexcept(is_nothrow_query<const Executor&, fork_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -348,22 +324,20 @@ struct relationship_t
}
template <typename Executor>
- friend ASIO_CONSTEXPR relationship_t query(
+ friend constexpr relationship_t query(
const Executor& ex, convertible_from_relationship_t,
- typename enable_if<
+ enable_if_t<
!can_query<const Executor&, fork_t>::value
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
can_query<const Executor&, continuation_t>::value
- >::type* = 0)
+ >* = 0)
#if !defined(__clang__) // Clang crashes if noexcept is used here.
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&,
- relationship_t<>::continuation_t>::value))
+ noexcept(is_nothrow_query<const Executor&,
+ relationship_t<>::continuation_t>::value)
#else // defined(ASIO_MSVC)
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, continuation_t>::value))
+ noexcept(is_nothrow_query<const Executor&, continuation_t>::value)
#endif // defined(ASIO_MSVC)
#endif // !defined(__clang__)
{
@@ -373,10 +347,6 @@ struct relationship_t
ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(fork_t, fork);
ASIO_STATIC_CONSTEXPR_DEFAULT_INIT(continuation_t, continuation);
-#if !defined(ASIO_HAS_CONSTEXPR)
- static const relationship_t instance;
-#endif // !defined(ASIO_HAS_CONSTEXPR)
-
private:
int value_;
};
@@ -388,14 +358,8 @@ const T relationship_t<I>::static_query_v;
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_CONSTEXPR)
template <int I>
-const relationship_t<I> relationship_t<I>::instance;
-#endif
-
-template <int I>
-const typename relationship_t<I>::fork_t
-relationship_t<I>::fork;
+const typename relationship_t<I>::fork_t relationship_t<I>::fork;
template <int I>
const typename relationship_t<I>::continuation_t
@@ -408,26 +372,14 @@ struct fork_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
typedef relationship_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR fork_t()
+ constexpr fork_t()
{
}
@@ -444,55 +396,61 @@ struct fork_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
+ static constexpr typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename T>
- static ASIO_CONSTEXPR fork_t static_query(
- typename enable_if<
+ static constexpr fork_t static_query(
+ enable_if_t<
!query_static_constexpr_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!query_member<T>::is_valid
- >::type* = 0,
- typename enable_if<
+ >* = 0,
+ enable_if_t<
!traits::query_free<T, fork_t>::is_valid
- >::type* = 0,
- typename enable_if<
- !can_query<T, continuation_t<I> >::value
- >::type* = 0) ASIO_NOEXCEPT
+ >* = 0,
+ enable_if_t<
+ !can_query<T, continuation_t<I>>::value
+ >* = 0) noexcept
{
return fork_t();
}
template <typename E, typename T = decltype(fork_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= fork_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR relationship_t<I> value()
+ static constexpr relationship_t<I> value()
{
return fork_t();
}
- friend ASIO_CONSTEXPR bool operator==(
- const fork_t&, const fork_t&)
+ friend constexpr bool operator==(const fork_t&, const fork_t&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const fork_t&, const fork_t&)
+ friend constexpr bool operator!=(const fork_t&, const fork_t&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator==(const fork_t&, const continuation_t<I>&)
{
return false;
}
+
+ friend constexpr bool operator!=(const fork_t&, const continuation_t<I>&)
+ {
+ return true;
+ }
};
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
@@ -507,26 +465,14 @@ struct continuation_t
{
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T>
- ASIO_STATIC_CONSTEXPR(bool,
- is_applicable_property_v = (
- is_executor<T>::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_sender<T>
- >::type::value
- || conditional<
- is_executor<T>::value,
- false_type,
- is_scheduler<T>
- >::type::value));
+ static constexpr bool is_applicable_property_v = is_executor<T>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
- ASIO_STATIC_CONSTEXPR(bool, is_requirable = true);
- ASIO_STATIC_CONSTEXPR(bool, is_preferable = true);
+ static constexpr bool is_requirable = true;
+ static constexpr bool is_preferable = true;
typedef relationship_t<I> polymorphic_query_result_type;
- ASIO_CONSTEXPR continuation_t()
+ constexpr continuation_t()
{
}
@@ -544,38 +490,44 @@ struct continuation_t
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
&& defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
template <typename T>
- static ASIO_CONSTEXPR
- typename query_static_constexpr_member<T>::result_type
+ static constexpr typename query_static_constexpr_member<T>::result_type
static_query()
- ASIO_NOEXCEPT_IF((
- query_static_constexpr_member<T>::is_noexcept))
+ noexcept(query_static_constexpr_member<T>::is_noexcept)
{
return query_static_constexpr_member<T>::value();
}
template <typename E,
typename T = decltype(continuation_t::static_query<E>())>
- static ASIO_CONSTEXPR const T static_query_v
+ static constexpr const T static_query_v
= continuation_t::static_query<E>();
#endif // defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// && defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
- static ASIO_CONSTEXPR relationship_t<I> value()
+ static constexpr relationship_t<I> value()
{
return continuation_t();
}
- friend ASIO_CONSTEXPR bool operator==(
- const continuation_t&, const continuation_t&)
+ friend constexpr bool operator==(const continuation_t&, const continuation_t&)
{
return true;
}
- friend ASIO_CONSTEXPR bool operator!=(
- const continuation_t&, const continuation_t&)
+ friend constexpr bool operator!=(const continuation_t&, const continuation_t&)
{
return false;
}
+
+ friend constexpr bool operator==(const continuation_t&, const fork_t<I>&)
+ {
+ return false;
+ }
+
+ friend constexpr bool operator!=(const continuation_t&, const fork_t<I>&)
+ {
+ return true;
+ }
};
#if defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \
@@ -590,12 +542,7 @@ const T continuation_t<I>::static_query_v;
typedef detail::relationship_t<> relationship_t;
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr relationship_t relationship;
-#else // defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-namespace { static const relationship_t&
- relationship = relationship_t::instance; }
-#endif
} // namespace execution
@@ -603,52 +550,19 @@ namespace { static const relationship_t&
template <typename T>
struct is_applicable_property<T, execution::relationship_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::relationship_t::fork_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
template <typename T>
struct is_applicable_property<T, execution::relationship_t::continuation_t>
- : integral_constant<bool,
- execution::is_executor<T>::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_sender<T>
- >::type::value
- || conditional<
- execution::is_executor<T>::value,
- false_type,
- execution::is_scheduler<T>
- >::type::value>
+ : integral_constant<bool, execution::is_executor<T>::value>
{
};
@@ -660,27 +574,27 @@ namespace traits {
template <typename T>
struct query_free_default<T, execution::relationship_t,
- typename enable_if<
+ enable_if_t<
can_query<T, execution::relationship_t::fork_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::relationship_t::fork_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::relationship_t::fork_t>::value;
typedef execution::relationship_t result_type;
};
template <typename T>
struct query_free_default<T, execution::relationship_t,
- typename enable_if<
+ enable_if_t<
!can_query<T, execution::relationship_t::fork_t>::value
&& can_query<T, execution::relationship_t::continuation_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<T, execution::relationship_t::continuation_t>::value));
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<T, execution::relationship_t::continuation_t>::value;
typedef execution::relationship_t result_type;
};
@@ -692,18 +606,18 @@ struct query_free_default<T, execution::relationship_t,
template <typename T>
struct static_query<T, execution::relationship_t,
- typename enable_if<
+ enable_if_t<
execution::detail::relationship_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::relationship_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::relationship_t<0>::
query_static_constexpr_member<T>::value();
@@ -712,22 +626,22 @@ struct static_query<T, execution::relationship_t,
template <typename T>
struct static_query<T, execution::relationship_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::relationship_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::relationship_t<0>::
query_member<T>::is_valid
&& traits::static_query<T,
execution::relationship_t::fork_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::relationship_t::fork_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T,
execution::relationship_t::fork_t>::value();
@@ -736,7 +650,7 @@ struct static_query<T, execution::relationship_t,
template <typename T>
struct static_query<T, execution::relationship_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::relationship_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::relationship_t<0>::
@@ -745,15 +659,15 @@ struct static_query<T, execution::relationship_t,
execution::relationship_t::fork_t>::is_valid
&& traits::static_query<T,
execution::relationship_t::continuation_t>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename traits::static_query<T,
execution::relationship_t::continuation_t>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return traits::static_query<T,
execution::relationship_t::continuation_t>::value();
@@ -762,18 +676,18 @@ struct static_query<T, execution::relationship_t,
template <typename T>
struct static_query<T, execution::relationship_t::fork_t,
- typename enable_if<
+ enable_if_t<
execution::detail::relationship::fork_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::relationship::fork_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::relationship::fork_t<0>::
query_static_constexpr_member<T>::value();
@@ -782,7 +696,7 @@ struct static_query<T, execution::relationship_t::fork_t,
template <typename T>
struct static_query<T, execution::relationship_t::fork_t,
- typename enable_if<
+ enable_if_t<
!execution::detail::relationship::fork_t<0>::
query_static_constexpr_member<T>::is_valid
&& !execution::detail::relationship::fork_t<0>::
@@ -790,14 +704,14 @@ struct static_query<T, execution::relationship_t::fork_t,
&& !traits::query_free<T,
execution::relationship_t::fork_t>::is_valid
&& !can_query<T, execution::relationship_t::continuation_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::relationship_t::fork_t result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return result_type();
}
@@ -805,18 +719,18 @@ struct static_query<T, execution::relationship_t::fork_t,
template <typename T>
struct static_query<T, execution::relationship_t::continuation_t,
- typename enable_if<
+ enable_if_t<
execution::detail::relationship::continuation_t<0>::
query_static_constexpr_member<T>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef typename execution::detail::relationship::continuation_t<0>::
query_static_constexpr_member<T>::result_type result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return execution::detail::relationship::continuation_t<0>::
query_static_constexpr_member<T>::value();
@@ -826,34 +740,6 @@ struct static_query<T, execution::relationship_t::continuation_t,
#endif // !defined(ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT)
// || !defined(ASIO_HAS_SFINAE_VARIABLE_TEMPLATES)
-#if !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
-template <typename T>
-struct static_require<T, execution::relationship_t::fork_t,
- typename enable_if<
- static_query<T, execution::relationship_t::fork_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::relationship_t::fork_t>::result_type,
- execution::relationship_t::fork_t>::value));
-};
-
-template <typename T>
-struct static_require<T, execution::relationship_t::continuation_t,
- typename enable_if<
- static_query<T, execution::relationship_t::continuation_t>::is_valid
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid =
- (is_same<typename static_query<T,
- execution::relationship_t::continuation_t>::result_type,
- execution::relationship_t::continuation_t>::value));
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
} // namespace traits
#endif // defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/execution/schedule.hpp b/3rdparty/asio/include/asio/execution/schedule.hpp
deleted file mode 100644
index fde0cdda599..00000000000
--- a/3rdparty/asio/include/asio/execution/schedule.hpp
+++ /dev/null
@@ -1,287 +0,0 @@
-//
-// execution/schedule.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_SCHEDULE_HPP
-#define ASIO_EXECUTION_SCHEDULE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/executor.hpp"
-#include "asio/traits/schedule_member.hpp"
-#include "asio/traits/schedule_free.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-#if defined(GENERATING_DOCUMENTATION)
-
-namespace asio {
-namespace execution {
-
-/// A customisation point that is used to obtain a sender from a scheduler.
-/**
- * The name <tt>execution::schedule</tt> denotes a customisation point object.
- * For some subexpression <tt>s</tt>, let <tt>S</tt> be a type such that
- * <tt>decltype((s))</tt> is <tt>S</tt>. The expression
- * <tt>execution::schedule(s)</tt> is expression-equivalent to:
- *
- * @li <tt>s.schedule()</tt>, if that expression is valid and its type models
- * <tt>sender</tt>.
- *
- * @li Otherwise, <tt>schedule(s)</tt>, if that expression is valid and its
- * type models <tt>sender</tt> with overload resolution performed in a context
- * that includes the declaration <tt>void schedule();</tt> and that does not
- * include a declaration of <tt>execution::schedule</tt>.
- *
- * @li Otherwise, <tt>S</tt> if <tt>S</tt> satisfies <tt>executor</tt>.
- *
- * @li Otherwise, <tt>execution::schedule(s)</tt> is ill-formed.
- */
-inline constexpr unspecified schedule = unspecified;
-
-/// A type trait that determines whether a @c schedule expression is
-/// well-formed.
-/**
- * Class template @c can_schedule is a trait that is derived from @c true_type
- * if the expression <tt>execution::schedule(std::declval<S>())</tt> is well
- * formed; otherwise @c false_type.
- */
-template <typename S>
-struct can_schedule :
- integral_constant<bool, automatically_determined>
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-namespace asio_execution_schedule_fn {
-
-using asio::decay;
-using asio::declval;
-using asio::enable_if;
-using asio::execution::is_executor;
-using asio::traits::schedule_free;
-using asio::traits::schedule_member;
-
-void schedule();
-
-enum overload_type
-{
- identity,
- call_member,
- call_free,
- ill_formed
-};
-
-template <typename S, typename = void, typename = void, typename = void>
-struct call_traits
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename S>
-struct call_traits<S,
- typename enable_if<
- schedule_member<S>::is_valid
- >::type> :
- schedule_member<S>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
-};
-
-template <typename S>
-struct call_traits<S,
- typename enable_if<
- !schedule_member<S>::is_valid
- >::type,
- typename enable_if<
- schedule_free<S>::is_valid
- >::type> :
- schedule_free<S>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
-};
-
-template <typename S>
-struct call_traits<S,
- typename enable_if<
- !schedule_member<S>::is_valid
- >::type,
- typename enable_if<
- !schedule_free<S>::is_valid
- >::type,
- typename enable_if<
- is_executor<typename decay<S>::type>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = identity);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
-#if defined(ASIO_HAS_MOVE)
- typedef ASIO_MOVE_ARG(S) result_type;
-#else // defined(ASIO_HAS_MOVE)
- typedef ASIO_MOVE_ARG(typename decay<S>::type) result_type;
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-struct impl
-{
- template <typename S>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S>::overload == identity,
- typename call_traits<S>::result_type
- >::type
- operator()(ASIO_MOVE_ARG(S) s) const
- ASIO_NOEXCEPT_IF((
- call_traits<S>::is_noexcept))
- {
- return ASIO_MOVE_CAST(S)(s);
- }
-
-#if defined(ASIO_HAS_MOVE)
- template <typename S>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S>::overload == call_member,
- typename call_traits<S>::result_type
- >::type
- operator()(S&& s) const
- ASIO_NOEXCEPT_IF((
- call_traits<S>::is_noexcept))
- {
- return ASIO_MOVE_CAST(S)(s).schedule();
- }
-
- template <typename S>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S>::overload == call_free,
- typename call_traits<S>::result_type
- >::type
- operator()(S&& s) const
- ASIO_NOEXCEPT_IF((
- call_traits<S>::is_noexcept))
- {
- return schedule(ASIO_MOVE_CAST(S)(s));
- }
-#else // defined(ASIO_HAS_MOVE)
- template <typename S>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&>::overload == call_member,
- typename call_traits<S&>::result_type
- >::type
- operator()(S& s) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&>::is_noexcept))
- {
- return s.schedule();
- }
-
- template <typename S>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&>::overload == call_member,
- typename call_traits<const S&>::result_type
- >::type
- operator()(const S& s) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&>::is_noexcept))
- {
- return s.schedule();
- }
-
- template <typename S>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&>::overload == call_free,
- typename call_traits<S&>::result_type
- >::type
- operator()(S& s) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&>::is_noexcept))
- {
- return schedule(s);
- }
-
- template <typename S>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&>::overload == call_free,
- typename call_traits<const S&>::result_type
- >::type
- operator()(const S& s) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&>::is_noexcept))
- {
- return schedule(s);
- }
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-template <typename T = impl>
-struct static_instance
-{
- static const T instance;
-};
-
-template <typename T>
-const T static_instance<T>::instance = {};
-
-} // namespace asio_execution_schedule_fn
-namespace asio {
-namespace execution {
-namespace {
-
-static ASIO_CONSTEXPR const asio_execution_schedule_fn::impl&
- schedule = asio_execution_schedule_fn::static_instance<>::instance;
-
-} // namespace
-
-template <typename S>
-struct can_schedule :
- integral_constant<bool,
- asio_execution_schedule_fn::call_traits<S>::overload !=
- asio_execution_schedule_fn::ill_formed>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S>
-constexpr bool can_schedule_v = can_schedule<S>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S>
-struct is_nothrow_schedule :
- integral_constant<bool,
- asio_execution_schedule_fn::call_traits<S>::is_noexcept>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S>
-constexpr bool is_nothrow_schedule_v
- = is_nothrow_schedule<S>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-} // namespace execution
-} // namespace asio
-
-#endif // defined(GENERATING_DOCUMENTATION)
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_SCHEDULE_HPP
diff --git a/3rdparty/asio/include/asio/execution/scheduler.hpp b/3rdparty/asio/include/asio/execution/scheduler.hpp
deleted file mode 100644
index b99ab3c7e9f..00000000000
--- a/3rdparty/asio/include/asio/execution/scheduler.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-// execution/scheduler.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_SCHEDULER_HPP
-#define ASIO_EXECUTION_SCHEDULER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/schedule.hpp"
-#include "asio/traits/equality_comparable.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace execution {
-namespace detail {
-
-template <typename T>
-struct is_scheduler_base :
- integral_constant<bool,
- is_copy_constructible<typename remove_cvref<T>::type>::value
- && traits::equality_comparable<typename remove_cvref<T>::type>::is_valid
- >
-{
-};
-
-} // namespace detail
-
-/// The is_scheduler trait detects whether a type T satisfies the
-/// execution::scheduler concept.
-/**
- * Class template @c is_scheduler is a type trait that is derived from @c
- * true_type if the type @c T meets the concept definition for a scheduler for
- * error type @c E, otherwise @c false_type.
- */
-template <typename T>
-struct is_scheduler :
-#if defined(GENERATING_DOCUMENTATION)
- integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- conditional<
- can_schedule<T>::value,
- detail::is_scheduler_base<T>,
- false_type
- >::type
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename T>
-ASIO_CONSTEXPR const bool is_scheduler_v = is_scheduler<T>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-#if defined(ASIO_HAS_CONCEPTS)
-
-template <typename T>
-ASIO_CONCEPT scheduler = is_scheduler<T>::value;
-
-#define ASIO_EXECUTION_SCHEDULER ::asio::execution::scheduler
-
-#else // defined(ASIO_HAS_CONCEPTS)
-
-#define ASIO_EXECUTION_SCHEDULER typename
-
-#endif // defined(ASIO_HAS_CONCEPTS)
-
-} // namespace execution
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_SCHEDULER_HPP
diff --git a/3rdparty/asio/include/asio/execution/sender.hpp b/3rdparty/asio/include/asio/execution/sender.hpp
deleted file mode 100644
index 4e4ba476b01..00000000000
--- a/3rdparty/asio/include/asio/execution/sender.hpp
+++ /dev/null
@@ -1,311 +0,0 @@
-//
-// execution/sender.hpp
-// ~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_SENDER_HPP
-#define ASIO_EXECUTION_SENDER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/detail/as_invocable.hpp"
-#include "asio/execution/detail/void_receiver.hpp"
-#include "asio/execution/executor.hpp"
-#include "asio/execution/receiver.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-#if defined(ASIO_HAS_ALIAS_TEMPLATES) \
- && defined(ASIO_HAS_VARIADIC_TEMPLATES) \
- && defined(ASIO_HAS_DECLTYPE) \
- && !defined(ASIO_MSVC) || (_MSC_VER >= 1910)
-# define ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT 1
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
- // && defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // && defined(ASIO_HAS_DECLTYPE)
- // && !defined(ASIO_MSVC) || (_MSC_VER >= 1910)
-
-namespace asio {
-namespace execution {
-namespace detail {
-
-namespace sender_base_ns { struct sender_base {}; }
-
-template <typename S, typename = void>
-struct sender_traits_base
-{
- typedef void asio_execution_sender_traits_base_is_unspecialised;
-};
-
-template <typename S>
-struct sender_traits_base<S,
- typename enable_if<
- is_base_of<sender_base_ns::sender_base, S>::value
- >::type>
-{
-};
-
-template <typename S, typename = void, typename = void, typename = void>
-struct has_sender_types : false_type
-{
-};
-
-#if defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
-
-template <
- template <
- template <typename...> class Tuple,
- template <typename...> class Variant
- > class>
-struct has_value_types
-{
- typedef void type;
-};
-
-template <
- template <
- template <typename...> class Variant
- > class>
-struct has_error_types
-{
- typedef void type;
-};
-
-template <typename S>
-struct has_sender_types<S,
- typename has_value_types<S::template value_types>::type,
- typename has_error_types<S::template error_types>::type,
- typename conditional<S::sends_done, void, void>::type> : true_type
-{
-};
-
-template <typename S>
-struct sender_traits_base<S,
- typename enable_if<
- has_sender_types<S>::value
- >::type>
-{
- template <
- template <typename...> class Tuple,
- template <typename...> class Variant>
- using value_types = typename S::template value_types<Tuple, Variant>;
-
- template <template <typename...> class Variant>
- using error_types = typename S::template error_types<Variant>;
-
- ASIO_STATIC_CONSTEXPR(bool, sends_done = S::sends_done);
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
-
-template <typename S>
-struct sender_traits_base<S,
- typename enable_if<
- !has_sender_types<S>::value
- && detail::is_executor_of_impl<S,
- as_invocable<void_receiver, S> >::value
- >::type>
-{
-#if defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT) \
- && defined(ASIO_HAS_STD_EXCEPTION_PTR)
-
- template <
- template <typename...> class Tuple,
- template <typename...> class Variant>
- using value_types = Variant<Tuple<>>;
-
- template <template <typename...> class Variant>
- using error_types = Variant<std::exception_ptr>;
-
- ASIO_STATIC_CONSTEXPR(bool, sends_done = true);
-
-#endif // defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
- // && defined(ASIO_HAS_STD_EXCEPTION_PTR)
-};
-
-} // namespace detail
-
-/// Base class used for tagging senders.
-#if defined(GENERATING_DOCUMENTATION)
-typedef unspecified sender_base;
-#else // defined(GENERATING_DOCUMENTATION)
-typedef detail::sender_base_ns::sender_base sender_base;
-#endif // defined(GENERATING_DOCUMENTATION)
-
-/// Traits for senders.
-template <typename S>
-struct sender_traits
-#if !defined(GENERATING_DOCUMENTATION)
- : detail::sender_traits_base<S>
-#endif // !defined(GENERATING_DOCUMENTATION)
-{
-};
-
-namespace detail {
-
-template <typename S, typename = void>
-struct has_sender_traits : true_type
-{
-};
-
-template <typename S>
-struct has_sender_traits<S,
- typename enable_if<
- is_same<
- typename asio::execution::sender_traits<
- S>::asio_execution_sender_traits_base_is_unspecialised,
- void
- >::value
- >::type> : false_type
-{
-};
-
-} // namespace detail
-
-/// The is_sender trait detects whether a type T satisfies the
-/// execution::sender concept.
-
-/**
- * Class template @c is_sender is a type trait that is derived from @c
- * true_type if the type @c T meets the concept definition for a sender,
- * otherwise @c false_type.
- */
-template <typename T>
-struct is_sender :
-#if defined(GENERATING_DOCUMENTATION)
- integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- conditional<
- detail::has_sender_traits<typename remove_cvref<T>::type>::value,
- is_move_constructible<typename remove_cvref<T>::type>,
- false_type
- >::type
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename T>
-ASIO_CONSTEXPR const bool is_sender_v = is_sender<T>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-#if defined(ASIO_HAS_CONCEPTS)
-
-template <typename T>
-ASIO_CONCEPT sender = is_sender<T>::value;
-
-#define ASIO_EXECUTION_SENDER ::asio::execution::sender
-
-#else // defined(ASIO_HAS_CONCEPTS)
-
-#define ASIO_EXECUTION_SENDER typename
-
-#endif // defined(ASIO_HAS_CONCEPTS)
-
-template <typename S, typename R>
-struct can_connect;
-
-/// The is_sender_to trait detects whether a type T satisfies the
-/// execution::sender_to concept for some receiver.
-/**
- * Class template @c is_sender_to is a type trait that is derived from @c
- * true_type if the type @c T meets the concept definition for a sender
- * for some receiver type R, otherwise @c false.
- */
-template <typename T, typename R>
-struct is_sender_to :
-#if defined(GENERATING_DOCUMENTATION)
- integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- integral_constant<bool,
- is_sender<T>::value
- && is_receiver<R>::value
- && can_connect<T, R>::value
- >
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename T, typename R>
-ASIO_CONSTEXPR const bool is_sender_to_v =
- is_sender_to<T, R>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-#if defined(ASIO_HAS_CONCEPTS)
-
-template <typename T, typename R>
-ASIO_CONCEPT sender_to = is_sender_to<T, R>::value;
-
-#define ASIO_EXECUTION_SENDER_TO(r) \
- ::asio::execution::sender_to<r>
-
-#else // defined(ASIO_HAS_CONCEPTS)
-
-#define ASIO_EXECUTION_SENDER_TO(r) typename
-
-#endif // defined(ASIO_HAS_CONCEPTS)
-
-/// The is_typed_sender trait detects whether a type T satisfies the
-/// execution::typed_sender concept.
-/**
- * Class template @c is_typed_sender is a type trait that is derived from @c
- * true_type if the type @c T meets the concept definition for a typed sender,
- * otherwise @c false.
- */
-template <typename T>
-struct is_typed_sender :
-#if defined(GENERATING_DOCUMENTATION)
- integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- integral_constant<bool,
- is_sender<T>::value
- && detail::has_sender_types<
- sender_traits<typename remove_cvref<T>::type> >::value
- >
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename T>
-ASIO_CONSTEXPR const bool is_typed_sender_v = is_typed_sender<T>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-#if defined(ASIO_HAS_CONCEPTS)
-
-template <typename T>
-ASIO_CONCEPT typed_sender = is_typed_sender<T>::value;
-
-#define ASIO_EXECUTION_TYPED_SENDER \
- ::asio::execution::typed_sender
-
-#else // defined(ASIO_HAS_CONCEPTS)
-
-#define ASIO_EXECUTION_TYPED_SENDER typename
-
-#endif // defined(ASIO_HAS_CONCEPTS)
-
-} // namespace execution
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#include "asio/execution/connect.hpp"
-
-#endif // ASIO_EXECUTION_SENDER_HPP
diff --git a/3rdparty/asio/include/asio/execution/set_done.hpp b/3rdparty/asio/include/asio/execution/set_done.hpp
deleted file mode 100644
index ae26869a020..00000000000
--- a/3rdparty/asio/include/asio/execution/set_done.hpp
+++ /dev/null
@@ -1,250 +0,0 @@
-//
-// execution/set_done.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_SET_DONE_HPP
-#define ASIO_EXECUTION_SET_DONE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/traits/set_done_member.hpp"
-#include "asio/traits/set_done_free.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-#if defined(GENERATING_DOCUMENTATION)
-
-namespace asio {
-namespace execution {
-
-/// A customisation point that delivers a done notification to a receiver.
-/**
- * The name <tt>execution::set_done</tt> denotes a customisation point object.
- * The expression <tt>execution::set_done(R)</tt> for some subexpression
- * <tt>R</tt> is expression-equivalent to:
- *
- * @li <tt>R.set_done()</tt>, if that expression is valid. If the function
- * selected does not signal the receiver <tt>R</tt>'s done channel, the
- * program is ill-formed with no diagnostic required.
- *
- * @li Otherwise, <tt>set_done(R)</tt>, if that expression is valid, with
- * overload resolution performed in a context that includes the declaration
- * <tt>void set_done();</tt> and that does not include a declaration of
- * <tt>execution::set_done</tt>. If the function selected by overload
- * resolution does not signal the receiver <tt>R</tt>'s done channel, the
- * program is ill-formed with no diagnostic required.
- *
- * @li Otherwise, <tt>execution::set_done(R)</tt> is ill-formed.
- */
-inline constexpr unspecified set_done = unspecified;
-
-/// A type trait that determines whether a @c set_done expression is
-/// well-formed.
-/**
- * Class template @c can_set_done is a trait that is derived from
- * @c true_type if the expression <tt>execution::set_done(std::declval<R>(),
- * std::declval<E>())</tt> is well formed; otherwise @c false_type.
- */
-template <typename R>
-struct can_set_done :
- integral_constant<bool, automatically_determined>
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-namespace asio_execution_set_done_fn {
-
-using asio::decay;
-using asio::declval;
-using asio::enable_if;
-using asio::traits::set_done_free;
-using asio::traits::set_done_member;
-
-void set_done();
-
-enum overload_type
-{
- call_member,
- call_free,
- ill_formed
-};
-
-template <typename R, typename = void, typename = void>
-struct call_traits
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename R>
-struct call_traits<R,
- typename enable_if<
- set_done_member<R>::is_valid
- >::type> :
- set_done_member<R>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
-};
-
-template <typename R>
-struct call_traits<R,
- typename enable_if<
- !set_done_member<R>::is_valid
- >::type,
- typename enable_if<
- set_done_free<R>::is_valid
- >::type> :
- set_done_free<R>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
-};
-
-struct impl
-{
-#if defined(ASIO_HAS_MOVE)
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R>::overload == call_member,
- typename call_traits<R>::result_type
- >::type
- operator()(R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R>::is_noexcept))
- {
- return ASIO_MOVE_CAST(R)(r).set_done();
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R>::overload == call_free,
- typename call_traits<R>::result_type
- >::type
- operator()(R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R>::is_noexcept))
- {
- return set_done(ASIO_MOVE_CAST(R)(r));
- }
-#else // defined(ASIO_HAS_MOVE)
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R&>::overload == call_member,
- typename call_traits<R&>::result_type
- >::type
- operator()(R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R&>::is_noexcept))
- {
- return r.set_done();
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const R&>::overload == call_member,
- typename call_traits<const R&>::result_type
- >::type
- operator()(const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const R&>::is_noexcept))
- {
- return r.set_done();
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R&>::overload == call_free,
- typename call_traits<R&>::result_type
- >::type
- operator()(R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R&>::is_noexcept))
- {
- return set_done(r);
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const R&>::overload == call_free,
- typename call_traits<const R&>::result_type
- >::type
- operator()(const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const R&>::is_noexcept))
- {
- return set_done(r);
- }
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-template <typename T = impl>
-struct static_instance
-{
- static const T instance;
-};
-
-template <typename T>
-const T static_instance<T>::instance = {};
-
-} // namespace asio_execution_set_done_fn
-namespace asio {
-namespace execution {
-namespace {
-
-static ASIO_CONSTEXPR const asio_execution_set_done_fn::impl&
- set_done = asio_execution_set_done_fn::static_instance<>::instance;
-
-} // namespace
-
-template <typename R>
-struct can_set_done :
- integral_constant<bool,
- asio_execution_set_done_fn::call_traits<R>::overload !=
- asio_execution_set_done_fn::ill_formed>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R>
-constexpr bool can_set_done_v = can_set_done<R>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R>
-struct is_nothrow_set_done :
- integral_constant<bool,
- asio_execution_set_done_fn::call_traits<R>::is_noexcept>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R>
-constexpr bool is_nothrow_set_done_v
- = is_nothrow_set_done<R>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-} // namespace execution
-} // namespace asio
-
-#endif // defined(GENERATING_DOCUMENTATION)
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_SET_DONE_HPP
diff --git a/3rdparty/asio/include/asio/execution/set_error.hpp b/3rdparty/asio/include/asio/execution/set_error.hpp
deleted file mode 100644
index 2aa3de3a6fc..00000000000
--- a/3rdparty/asio/include/asio/execution/set_error.hpp
+++ /dev/null
@@ -1,250 +0,0 @@
-//
-// execution/set_error.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_SET_ERROR_HPP
-#define ASIO_EXECUTION_SET_ERROR_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/traits/set_error_member.hpp"
-#include "asio/traits/set_error_free.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-#if defined(GENERATING_DOCUMENTATION)
-
-namespace asio {
-namespace execution {
-
-/// A customisation point that delivers an error notification to a receiver.
-/**
- * The name <tt>execution::set_error</tt> denotes a customisation point object.
- * The expression <tt>execution::set_error(R, E)</tt> for some subexpressions
- * <tt>R</tt> and <tt>E</tt> are expression-equivalent to:
- *
- * @li <tt>R.set_error(E)</tt>, if that expression is valid. If the function
- * selected does not send the error <tt>E</tt> to the receiver <tt>R</tt>'s
- * error channel, the program is ill-formed with no diagnostic required.
- *
- * @li Otherwise, <tt>set_error(R, E)</tt>, if that expression is valid, with
- * overload resolution performed in a context that includes the declaration
- * <tt>void set_error();</tt> and that does not include a declaration of
- * <tt>execution::set_error</tt>. If the function selected by overload
- * resolution does not send the error <tt>E</tt> to the receiver <tt>R</tt>'s
- * error channel, the program is ill-formed with no diagnostic required.
- *
- * @li Otherwise, <tt>execution::set_error(R, E)</tt> is ill-formed.
- */
-inline constexpr unspecified set_error = unspecified;
-
-/// A type trait that determines whether a @c set_error expression is
-/// well-formed.
-/**
- * Class template @c can_set_error is a trait that is derived from
- * @c true_type if the expression <tt>execution::set_error(std::declval<R>(),
- * std::declval<E>())</tt> is well formed; otherwise @c false_type.
- */
-template <typename R, typename E>
-struct can_set_error :
- integral_constant<bool, automatically_determined>
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-namespace asio_execution_set_error_fn {
-
-using asio::decay;
-using asio::declval;
-using asio::enable_if;
-using asio::traits::set_error_free;
-using asio::traits::set_error_member;
-
-void set_error();
-
-enum overload_type
-{
- call_member,
- call_free,
- ill_formed
-};
-
-template <typename R, typename E, typename = void, typename = void>
-struct call_traits
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename R, typename E>
-struct call_traits<R, void(E),
- typename enable_if<
- set_error_member<R, E>::is_valid
- >::type> :
- set_error_member<R, E>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
-};
-
-template <typename R, typename E>
-struct call_traits<R, void(E),
- typename enable_if<
- !set_error_member<R, E>::is_valid
- >::type,
- typename enable_if<
- set_error_free<R, E>::is_valid
- >::type> :
- set_error_free<R, E>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
-};
-
-struct impl
-{
-#if defined(ASIO_HAS_MOVE)
- template <typename R, typename E>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R, void(E)>::overload == call_member,
- typename call_traits<R, void(E)>::result_type
- >::type
- operator()(R&& r, E&& e) const
- ASIO_NOEXCEPT_IF((
- call_traits<R, void(E)>::is_noexcept))
- {
- return ASIO_MOVE_CAST(R)(r).set_error(ASIO_MOVE_CAST(E)(e));
- }
-
- template <typename R, typename E>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R, void(E)>::overload == call_free,
- typename call_traits<R, void(E)>::result_type
- >::type
- operator()(R&& r, E&& e) const
- ASIO_NOEXCEPT_IF((
- call_traits<R, void(E)>::is_noexcept))
- {
- return set_error(ASIO_MOVE_CAST(R)(r), ASIO_MOVE_CAST(E)(e));
- }
-#else // defined(ASIO_HAS_MOVE)
- template <typename R, typename E>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R&, void(const E&)>::overload == call_member,
- typename call_traits<R&, void(const E&)>::result_type
- >::type
- operator()(R& r, const E& e) const
- ASIO_NOEXCEPT_IF((
- call_traits<R&, void(const E&)>::is_noexcept))
- {
- return r.set_error(e);
- }
-
- template <typename R, typename E>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const R&, void(const E&)>::overload == call_member,
- typename call_traits<const R&, void(const E&)>::result_type
- >::type
- operator()(const R& r, const E& e) const
- ASIO_NOEXCEPT_IF((
- call_traits<const R&, void(const E&)>::is_noexcept))
- {
- return r.set_error(e);
- }
-
- template <typename R, typename E>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R&, void(const E&)>::overload == call_free,
- typename call_traits<R&, void(const E&)>::result_type
- >::type
- operator()(R& r, const E& e) const
- ASIO_NOEXCEPT_IF((
- call_traits<R&, void(const E&)>::is_noexcept))
- {
- return set_error(r, e);
- }
-
- template <typename R, typename E>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const R&, void(const E&)>::overload == call_free,
- typename call_traits<const R&, void(const E&)>::result_type
- >::type
- operator()(const R& r, const E& e) const
- ASIO_NOEXCEPT_IF((
- call_traits<const R&, void(const E&)>::is_noexcept))
- {
- return set_error(r, e);
- }
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-template <typename T = impl>
-struct static_instance
-{
- static const T instance;
-};
-
-template <typename T>
-const T static_instance<T>::instance = {};
-
-} // namespace asio_execution_set_error_fn
-namespace asio {
-namespace execution {
-namespace {
-
-static ASIO_CONSTEXPR const asio_execution_set_error_fn::impl&
- set_error = asio_execution_set_error_fn::static_instance<>::instance;
-
-} // namespace
-
-template <typename R, typename E>
-struct can_set_error :
- integral_constant<bool,
- asio_execution_set_error_fn::call_traits<R, void(E)>::overload !=
- asio_execution_set_error_fn::ill_formed>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R, typename E>
-constexpr bool can_set_error_v = can_set_error<R, E>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R, typename E>
-struct is_nothrow_set_error :
- integral_constant<bool,
- asio_execution_set_error_fn::call_traits<R, void(E)>::is_noexcept>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R, typename E>
-constexpr bool is_nothrow_set_error_v
- = is_nothrow_set_error<R, E>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-} // namespace execution
-} // namespace asio
-
-#endif // defined(GENERATING_DOCUMENTATION)
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_SET_ERROR_HPP
diff --git a/3rdparty/asio/include/asio/execution/set_value.hpp b/3rdparty/asio/include/asio/execution/set_value.hpp
deleted file mode 100644
index 90d29dda540..00000000000
--- a/3rdparty/asio/include/asio/execution/set_value.hpp
+++ /dev/null
@@ -1,483 +0,0 @@
-//
-// execution/set_value.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_SET_VALUE_HPP
-#define ASIO_EXECUTION_SET_VALUE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
-#include "asio/traits/set_value_member.hpp"
-#include "asio/traits/set_value_free.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-#if defined(GENERATING_DOCUMENTATION)
-
-namespace asio {
-namespace execution {
-
-/// A customisation point that delivers a value to a receiver.
-/**
- * The name <tt>execution::set_value</tt> denotes a customisation point object.
- * The expression <tt>execution::set_value(R, Vs...)</tt> for some
- * subexpressions <tt>R</tt> and <tt>Vs...</tt> is expression-equivalent to:
- *
- * @li <tt>R.set_value(Vs...)</tt>, if that expression is valid. If the
- * function selected does not send the value(s) <tt>Vs...</tt> to the receiver
- * <tt>R</tt>'s value channel, the program is ill-formed with no diagnostic
- * required.
- *
- * @li Otherwise, <tt>set_value(R, Vs...)</tt>, if that expression is valid,
- * with overload resolution performed in a context that includes the
- * declaration <tt>void set_value();</tt> and that does not include a
- * declaration of <tt>execution::set_value</tt>. If the function selected by
- * overload resolution does not send the value(s) <tt>Vs...</tt> to the
- * receiver <tt>R</tt>'s value channel, the program is ill-formed with no
- * diagnostic required.
- *
- * @li Otherwise, <tt>execution::set_value(R, Vs...)</tt> is ill-formed.
- */
-inline constexpr unspecified set_value = unspecified;
-
-/// A type trait that determines whether a @c set_value expression is
-/// well-formed.
-/**
- * Class template @c can_set_value is a trait that is derived from
- * @c true_type if the expression <tt>execution::set_value(std::declval<R>(),
- * std::declval<Vs>()...)</tt> is well formed; otherwise @c false_type.
- */
-template <typename R, typename... Vs>
-struct can_set_value :
- integral_constant<bool, automatically_determined>
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-namespace asio_execution_set_value_fn {
-
-using asio::decay;
-using asio::declval;
-using asio::enable_if;
-using asio::traits::set_value_free;
-using asio::traits::set_value_member;
-
-void set_value();
-
-enum overload_type
-{
- call_member,
- call_free,
- ill_formed
-};
-
-template <typename R, typename Vs, typename = void, typename = void>
-struct call_traits
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename R, typename Vs>
-struct call_traits<R, Vs,
- typename enable_if<
- set_value_member<R, Vs>::is_valid
- >::type> :
- set_value_member<R, Vs>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
-};
-
-template <typename R, typename Vs>
-struct call_traits<R, Vs,
- typename enable_if<
- !set_value_member<R, Vs>::is_valid
- >::type,
- typename enable_if<
- set_value_free<R, Vs>::is_valid
- >::type> :
- set_value_free<R, Vs>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
-};
-
-struct impl
-{
-#if defined(ASIO_HAS_MOVE)
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename R, typename... Vs>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R, void(Vs...)>::overload == call_member,
- typename call_traits<R, void(Vs...)>::result_type
- >::type
- operator()(R&& r, Vs&&... v) const
- ASIO_NOEXCEPT_IF((
- call_traits<R, void(Vs...)>::is_noexcept))
- {
- return ASIO_MOVE_CAST(R)(r).set_value(ASIO_MOVE_CAST(Vs)(v)...);
- }
-
- template <typename R, typename... Vs>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R, void(Vs...)>::overload == call_free,
- typename call_traits<R, void(Vs...)>::result_type
- >::type
- operator()(R&& r, Vs&&... v) const
- ASIO_NOEXCEPT_IF((
- call_traits<R, void(Vs...)>::is_noexcept))
- {
- return set_value(ASIO_MOVE_CAST(R)(r),
- ASIO_MOVE_CAST(Vs)(v)...);
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R, void()>::overload == call_member,
- typename call_traits<R, void()>::result_type
- >::type
- operator()(R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R, void()>::is_noexcept))
- {
- return ASIO_MOVE_CAST(R)(r).set_value();
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R, void()>::overload == call_free,
- typename call_traits<R, void()>::result_type
- >::type
- operator()(R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R, void()>::is_noexcept))
- {
- return set_value(ASIO_MOVE_CAST(R)(r));
- }
-
-#define ASIO_PRIVATE_SET_VALUE_CALL_DEF(n) \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- ASIO_CONSTEXPR typename enable_if< \
- call_traits<R, \
- void(ASIO_VARIADIC_TARGS(n))>::overload == call_member, \
- typename call_traits<R, void(ASIO_VARIADIC_TARGS(n))>::result_type \
- >::type \
- operator()(R&& r, ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- ASIO_NOEXCEPT_IF(( \
- call_traits<R, void(ASIO_VARIADIC_TARGS(n))>::is_noexcept)) \
- { \
- return ASIO_MOVE_CAST(R)(r).set_value( \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- ASIO_CONSTEXPR typename enable_if< \
- call_traits<R, void(ASIO_VARIADIC_TARGS(n))>::overload == call_free, \
- typename call_traits<R, void(ASIO_VARIADIC_TARGS(n))>::result_type \
- >::type \
- operator()(R&& r, ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- ASIO_NOEXCEPT_IF(( \
- call_traits<R, void(ASIO_VARIADIC_TARGS(n))>::is_noexcept)) \
- { \
- return set_value(ASIO_MOVE_CAST(R)(r), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SET_VALUE_CALL_DEF)
-#undef ASIO_PRIVATE_SET_VALUE_CALL_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#else // defined(ASIO_HAS_MOVE)
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename R, typename... Vs>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R&, void(const Vs&...)>::overload == call_member,
- typename call_traits<R&, void(const Vs&...)>::result_type
- >::type
- operator()(R& r, const Vs&... v) const
- ASIO_NOEXCEPT_IF((
- call_traits<R&, void(const Vs&...)>::is_noexcept))
- {
- return r.set_value(v...);
- }
-
- template <typename R, typename... Vs>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const R&, void(const Vs&...)>::overload == call_member,
- typename call_traits<const R&, void(const Vs&...)>::result_type
- >::type
- operator()(const R& r, const Vs&... v) const
- ASIO_NOEXCEPT_IF((
- call_traits<const R&, void(const Vs&...)>::is_noexcept))
- {
- return r.set_value(v...);
- }
-
- template <typename R, typename... Vs>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R&, void(const Vs&...)>::overload == call_free,
- typename call_traits<R&, void(const Vs&...)>::result_type
- >::type
- operator()(R& r, const Vs&... v) const
- ASIO_NOEXCEPT_IF((
- call_traits<R&, void(const Vs&...)>::is_noexcept))
- {
- return set_value(r, v...);
- }
-
- template <typename R, typename... Vs>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const R&, void(const Vs&...)>::overload == call_free,
- typename call_traits<const R&, void(const Vs&...)>::result_type
- >::type
- operator()(const R& r, const Vs&... v) const
- ASIO_NOEXCEPT_IF((
- call_traits<const R&, void(const Vs&...)>::is_noexcept))
- {
- return set_value(r, v...);
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R&, void()>::overload == call_member,
- typename call_traits<R&, void()>::result_type
- >::type
- operator()(R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R&, void()>::is_noexcept))
- {
- return r.set_value();
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const R&, void()>::overload == call_member,
- typename call_traits<const R&, void()>::result_type
- >::type
- operator()(const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const R&, void()>::is_noexcept))
- {
- return r.set_value();
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R&, void()>::overload == call_free,
- typename call_traits<R&, void()>::result_type
- >::type
- operator()(R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R&, void()>::is_noexcept))
- {
- return set_value(r);
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const R&, void()>::overload == call_free,
- typename call_traits<const R&, void()>::result_type
- >::type
- operator()(const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const R&, void()>::is_noexcept))
- {
- return set_value(r);
- }
-
-#define ASIO_PRIVATE_SET_VALUE_CALL_DEF(n) \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- ASIO_CONSTEXPR typename enable_if< \
- call_traits<R&, \
- void(ASIO_VARIADIC_TARGS(n))>::overload == call_member, \
- typename call_traits<R&, void(ASIO_VARIADIC_TARGS(n))>::result_type \
- >::type \
- operator()(R& r, ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- ASIO_NOEXCEPT_IF(( \
- call_traits<R&, void(ASIO_VARIADIC_TARGS(n))>::is_noexcept)) \
- { \
- return r.set_value(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- ASIO_CONSTEXPR typename enable_if< \
- call_traits<const R&, \
- void(ASIO_VARIADIC_TARGS(n))>::overload == call_member, \
- typename call_traits<const R&, \
- void(ASIO_VARIADIC_TARGS(n))>::result_type \
- >::type \
- operator()(const R& r, ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- ASIO_NOEXCEPT_IF(( \
- call_traits<const R&, void(ASIO_VARIADIC_TARGS(n))>::is_noexcept)) \
- { \
- return r.set_value(ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- ASIO_CONSTEXPR typename enable_if< \
- call_traits<R&, \
- void(ASIO_VARIADIC_TARGS(n))>::overload == call_free, \
- typename call_traits<R&, void(ASIO_VARIADIC_TARGS(n))>::result_type \
- >::type \
- operator()(R& r, ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- ASIO_NOEXCEPT_IF(( \
- call_traits<R&, void(ASIO_VARIADIC_TARGS(n))>::is_noexcept)) \
- { \
- return set_value(r, ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- ASIO_CONSTEXPR typename enable_if< \
- call_traits<const R&, \
- void(ASIO_VARIADIC_TARGS(n))>::overload == call_free, \
- typename call_traits<const R&, \
- void(ASIO_VARIADIC_TARGS(n))>::result_type \
- >::type \
- operator()(const R& r, ASIO_VARIADIC_MOVE_PARAMS(n)) const \
- ASIO_NOEXCEPT_IF(( \
- call_traits<const R&, void(ASIO_VARIADIC_TARGS(n))>::is_noexcept)) \
- { \
- return set_value(r, ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SET_VALUE_CALL_DEF)
-#undef ASIO_PRIVATE_SET_VALUE_CALL_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-template <typename T = impl>
-struct static_instance
-{
- static const T instance;
-};
-
-template <typename T>
-const T static_instance<T>::instance = {};
-
-} // namespace asio_execution_set_value_fn
-namespace asio {
-namespace execution {
-namespace {
-
-static ASIO_CONSTEXPR const asio_execution_set_value_fn::impl&
- set_value = asio_execution_set_value_fn::static_instance<>::instance;
-
-} // namespace
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename R, typename... Vs>
-struct can_set_value :
- integral_constant<bool,
- asio_execution_set_value_fn::call_traits<R, void(Vs...)>::overload !=
- asio_execution_set_value_fn::ill_formed>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R, typename... Vs>
-constexpr bool can_set_value_v = can_set_value<R, Vs...>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R, typename... Vs>
-struct is_nothrow_set_value :
- integral_constant<bool,
- asio_execution_set_value_fn::call_traits<R, void(Vs...)>::is_noexcept>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R, typename... Vs>
-constexpr bool is_nothrow_set_value_v
- = is_nothrow_set_value<R, Vs...>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename R, typename = void,
- typename = void, typename = void, typename = void, typename = void,
- typename = void, typename = void, typename = void, typename = void>
-struct can_set_value;
-
-template <typename R, typename = void,
- typename = void, typename = void, typename = void, typename = void,
- typename = void, typename = void, typename = void, typename = void>
-struct is_nothrow_set_value;
-
-template <typename R>
-struct can_set_value<R> :
- integral_constant<bool,
- asio_execution_set_value_fn::call_traits<R, void()>::overload !=
- asio_execution_set_value_fn::ill_formed>
-{
-};
-
-template <typename R>
-struct is_nothrow_set_value<R> :
- integral_constant<bool,
- asio_execution_set_value_fn::call_traits<R, void()>::is_noexcept>
-{
-};
-
-#define ASIO_PRIVATE_SET_VALUE_TRAITS_DEF(n) \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct can_set_value<R, ASIO_VARIADIC_TARGS(n)> : \
- integral_constant<bool, \
- asio_execution_set_value_fn::call_traits<R, \
- void(ASIO_VARIADIC_TARGS(n))>::overload != \
- asio_execution_set_value_fn::ill_formed> \
- { \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct is_nothrow_set_value<R, ASIO_VARIADIC_TARGS(n)> : \
- integral_constant<bool, \
- asio_execution_set_value_fn::call_traits<R, \
- void(ASIO_VARIADIC_TARGS(n))>::is_noexcept> \
- { \
- }; \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SET_VALUE_TRAITS_DEF)
-#undef ASIO_PRIVATE_SET_VALUE_TRAITS_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-} // namespace execution
-} // namespace asio
-
-#endif // defined(GENERATING_DOCUMENTATION)
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_SET_VALUE_HPP
diff --git a/3rdparty/asio/include/asio/execution/start.hpp b/3rdparty/asio/include/asio/execution/start.hpp
deleted file mode 100644
index 80592356570..00000000000
--- a/3rdparty/asio/include/asio/execution/start.hpp
+++ /dev/null
@@ -1,247 +0,0 @@
-//
-// execution/start.hpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_START_HPP
-#define ASIO_EXECUTION_START_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/traits/start_member.hpp"
-#include "asio/traits/start_free.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-#if defined(GENERATING_DOCUMENTATION)
-
-namespace asio {
-namespace execution {
-
-/// A customisation point that notifies an operation state object to start
-/// its associated operation.
-/**
- * The name <tt>execution::start</tt> denotes a customisation point object.
- * The expression <tt>execution::start(R)</tt> for some subexpression
- * <tt>R</tt> is expression-equivalent to:
- *
- * @li <tt>R.start()</tt>, if that expression is valid.
- *
- * @li Otherwise, <tt>start(R)</tt>, if that expression is valid, with
- * overload resolution performed in a context that includes the declaration
- * <tt>void start();</tt> and that does not include a declaration of
- * <tt>execution::start</tt>.
- *
- * @li Otherwise, <tt>execution::start(R)</tt> is ill-formed.
- */
-inline constexpr unspecified start = unspecified;
-
-/// A type trait that determines whether a @c start expression is
-/// well-formed.
-/**
- * Class template @c can_start is a trait that is derived from
- * @c true_type if the expression <tt>execution::start(std::declval<R>(),
- * std::declval<E>())</tt> is well formed; otherwise @c false_type.
- */
-template <typename R>
-struct can_start :
- integral_constant<bool, automatically_determined>
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-namespace asio_execution_start_fn {
-
-using asio::decay;
-using asio::declval;
-using asio::enable_if;
-using asio::traits::start_free;
-using asio::traits::start_member;
-
-void start();
-
-enum overload_type
-{
- call_member,
- call_free,
- ill_formed
-};
-
-template <typename R, typename = void, typename = void>
-struct call_traits
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename R>
-struct call_traits<R,
- typename enable_if<
- start_member<R>::is_valid
- >::type> :
- start_member<R>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
-};
-
-template <typename R>
-struct call_traits<R,
- typename enable_if<
- !start_member<R>::is_valid
- >::type,
- typename enable_if<
- start_free<R>::is_valid
- >::type> :
- start_free<R>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
-};
-
-struct impl
-{
-#if defined(ASIO_HAS_MOVE)
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R>::overload == call_member,
- typename call_traits<R>::result_type
- >::type
- operator()(R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R>::is_noexcept))
- {
- return ASIO_MOVE_CAST(R)(r).start();
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R>::overload == call_free,
- typename call_traits<R>::result_type
- >::type
- operator()(R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R>::is_noexcept))
- {
- return start(ASIO_MOVE_CAST(R)(r));
- }
-#else // defined(ASIO_HAS_MOVE)
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R&>::overload == call_member,
- typename call_traits<R&>::result_type
- >::type
- operator()(R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R&>::is_noexcept))
- {
- return r.start();
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const R&>::overload == call_member,
- typename call_traits<const R&>::result_type
- >::type
- operator()(const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const R&>::is_noexcept))
- {
- return r.start();
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<R&>::overload == call_free,
- typename call_traits<R&>::result_type
- >::type
- operator()(R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<R&>::is_noexcept))
- {
- return start(r);
- }
-
- template <typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const R&>::overload == call_free,
- typename call_traits<const R&>::result_type
- >::type
- operator()(const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const R&>::is_noexcept))
- {
- return start(r);
- }
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-template <typename T = impl>
-struct static_instance
-{
- static const T instance;
-};
-
-template <typename T>
-const T static_instance<T>::instance = {};
-
-} // namespace asio_execution_start_fn
-namespace asio {
-namespace execution {
-namespace {
-
-static ASIO_CONSTEXPR const asio_execution_start_fn::impl&
- start = asio_execution_start_fn::static_instance<>::instance;
-
-} // namespace
-
-template <typename R>
-struct can_start :
- integral_constant<bool,
- asio_execution_start_fn::call_traits<R>::overload !=
- asio_execution_start_fn::ill_formed>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R>
-constexpr bool can_start_v = can_start<R>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R>
-struct is_nothrow_start :
- integral_constant<bool,
- asio_execution_start_fn::call_traits<R>::is_noexcept>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename R>
-constexpr bool is_nothrow_start_v
- = is_nothrow_start<R>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-} // namespace execution
-} // namespace asio
-
-#endif // defined(GENERATING_DOCUMENTATION)
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_START_HPP
diff --git a/3rdparty/asio/include/asio/execution/submit.hpp b/3rdparty/asio/include/asio/execution/submit.hpp
deleted file mode 100644
index 7a0bddf83be..00000000000
--- a/3rdparty/asio/include/asio/execution/submit.hpp
+++ /dev/null
@@ -1,450 +0,0 @@
-//
-// execution/submit.hpp
-// ~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXECUTION_SUBMIT_HPP
-#define ASIO_EXECUTION_SUBMIT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/execution/detail/submit_receiver.hpp"
-#include "asio/execution/executor.hpp"
-#include "asio/execution/receiver.hpp"
-#include "asio/execution/sender.hpp"
-#include "asio/execution/start.hpp"
-#include "asio/traits/submit_member.hpp"
-#include "asio/traits/submit_free.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-#if defined(GENERATING_DOCUMENTATION)
-
-namespace asio {
-namespace execution {
-
-/// A customisation point that submits a sender to a receiver.
-/**
- * The name <tt>execution::submit</tt> denotes a customisation point object. For
- * some subexpressions <tt>s</tt> and <tt>r</tt>, let <tt>S</tt> be a type such
- * that <tt>decltype((s))</tt> is <tt>S</tt> and let <tt>R</tt> be a type such
- * that <tt>decltype((r))</tt> is <tt>R</tt>. The expression
- * <tt>execution::submit(s, r)</tt> is ill-formed if <tt>sender_to<S, R></tt> is
- * not <tt>true</tt>. Otherwise, it is expression-equivalent to:
- *
- * @li <tt>s.submit(r)</tt>, if that expression is valid and <tt>S</tt> models
- * <tt>sender</tt>. If the function selected does not submit the receiver
- * object <tt>r</tt> via the sender <tt>s</tt>, the program is ill-formed with
- * no diagnostic required.
- *
- * @li Otherwise, <tt>submit(s, r)</tt>, if that expression is valid and
- * <tt>S</tt> models <tt>sender</tt>, with overload resolution performed in a
- * context that includes the declaration <tt>void submit();</tt> and that does
- * not include a declaration of <tt>execution::submit</tt>. If the function
- * selected by overload resolution does not submit the receiver object
- * <tt>r</tt> via the sender <tt>s</tt>, the program is ill-formed with no
- * diagnostic required.
- *
- * @li Otherwise, <tt>execution::start((new submit_receiver<S,
- * R>{s,r})->state_)</tt>, where <tt>submit_receiver</tt> is an
- * implementation-defined class template equivalent to:
- * @code template<class S, class R>
- * struct submit_receiver {
- * struct wrap {
- * submit_receiver * p_;
- * template<class...As>
- * requires receiver_of<R, As...>
- * void set_value(As&&... as) &&
- * noexcept(is_nothrow_receiver_of_v<R, As...>) {
- * execution::set_value(std::move(p_->r_), (As&&) as...);
- * delete p_;
- * }
- * template<class E>
- * requires receiver<R, E>
- * void set_error(E&& e) && noexcept {
- * execution::set_error(std::move(p_->r_), (E&&) e);
- * delete p_;
- * }
- * void set_done() && noexcept {
- * execution::set_done(std::move(p_->r_));
- * delete p_;
- * }
- * };
- * remove_cvref_t<R> r_;
- * connect_result_t<S, wrap> state_;
- * submit_receiver(S&& s, R&& r)
- * : r_((R&&) r)
- * , state_(execution::connect((S&&) s, wrap{this})) {}
- * };
- * @endcode
- */
-inline constexpr unspecified submit = unspecified;
-
-/// A type trait that determines whether a @c submit expression is
-/// well-formed.
-/**
- * Class template @c can_submit is a trait that is derived from
- * @c true_type if the expression <tt>execution::submit(std::declval<R>(),
- * std::declval<E>())</tt> is well formed; otherwise @c false_type.
- */
-template <typename S, typename R>
-struct can_submit :
- integral_constant<bool, automatically_determined>
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#else // defined(GENERATING_DOCUMENTATION)
-
-namespace asio_execution_submit_fn {
-
-using asio::declval;
-using asio::enable_if;
-using asio::execution::is_sender_to;
-using asio::traits::submit_free;
-using asio::traits::submit_member;
-
-void submit();
-
-enum overload_type
-{
- call_member,
- call_free,
- adapter,
- ill_formed
-};
-
-template <typename S, typename R, typename = void,
- typename = void, typename = void>
-struct call_traits
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename S, typename R>
-struct call_traits<S, void(R),
- typename enable_if<
- submit_member<S, R>::is_valid
- >::type,
- typename enable_if<
- is_sender_to<S, R>::value
- >::type> :
- submit_member<S, R>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
-};
-
-template <typename S, typename R>
-struct call_traits<S, void(R),
- typename enable_if<
- !submit_member<S, R>::is_valid
- >::type,
- typename enable_if<
- submit_free<S, R>::is_valid
- >::type,
- typename enable_if<
- is_sender_to<S, R>::value
- >::type> :
- submit_free<S, R>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
-};
-
-template <typename S, typename R>
-struct call_traits<S, void(R),
- typename enable_if<
- !submit_member<S, R>::is_valid
- >::type,
- typename enable_if<
- !submit_free<S, R>::is_valid
- >::type,
- typename enable_if<
- is_sender_to<S, R>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-struct impl
-{
-#if defined(ASIO_HAS_MOVE)
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(R)>::overload == call_member,
- typename call_traits<S, void(R)>::result_type
- >::type
- operator()(S&& s, R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(R)>::is_noexcept))
- {
- return ASIO_MOVE_CAST(S)(s).submit(ASIO_MOVE_CAST(R)(r));
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(R)>::overload == call_free,
- typename call_traits<S, void(R)>::result_type
- >::type
- operator()(S&& s, R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(R)>::is_noexcept))
- {
- return submit(ASIO_MOVE_CAST(S)(s), ASIO_MOVE_CAST(R)(r));
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S, void(R)>::overload == adapter,
- typename call_traits<S, void(R)>::result_type
- >::type
- operator()(S&& s, R&& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S, void(R)>::is_noexcept))
- {
- return asio::execution::start(
- (new asio::execution::detail::submit_receiver<S, R>(
- ASIO_MOVE_CAST(S)(s), ASIO_MOVE_CAST(R)(r)))->state_);
- }
-#else // defined(ASIO_HAS_MOVE)
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(R&)>::overload == call_member,
- typename call_traits<S&, void(R&)>::result_type
- >::type
- operator()(S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(R&)>::is_noexcept))
- {
- return s.submit(r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(R&)>::overload == call_member,
- typename call_traits<const S&, void(R&)>::result_type
- >::type
- operator()(const S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(R&)>::is_noexcept))
- {
- return s.submit(r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(R&)>::overload == call_free,
- typename call_traits<S&, void(R&)>::result_type
- >::type
- operator()(S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(R&)>::is_noexcept))
- {
- return submit(s, r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(R&)>::overload == call_free,
- typename call_traits<const S&, void(R&)>::result_type
- >::type
- operator()(const S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(R&)>::is_noexcept))
- {
- return submit(s, r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(R&)>::overload == adapter,
- typename call_traits<S&, void(R&)>::result_type
- >::type
- operator()(S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(R&)>::is_noexcept))
- {
- return asio::execution::start(
- (new asio::execution::detail::submit_receiver<
- S&, R&>(s, r))->state_);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(R&)>::overload == adapter,
- typename call_traits<const S&, void(R&)>::result_type
- >::type
- operator()(const S& s, R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(R&)>::is_noexcept))
- {
- asio::execution::start(
- (new asio::execution::detail::submit_receiver<
- const S&, R&>(s, r))->state_);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(const R&)>::overload == call_member,
- typename call_traits<S&, void(const R&)>::result_type
- >::type
- operator()(S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(const R&)>::is_noexcept))
- {
- return s.submit(r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(const R&)>::overload == call_member,
- typename call_traits<const S&, void(const R&)>::result_type
- >::type
- operator()(const S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(const R&)>::is_noexcept))
- {
- return s.submit(r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(const R&)>::overload == call_free,
- typename call_traits<S&, void(const R&)>::result_type
- >::type
- operator()(S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(const R&)>::is_noexcept))
- {
- return submit(s, r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(const R&)>::overload == call_free,
- typename call_traits<const S&, void(const R&)>::result_type
- >::type
- operator()(const S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(const R&)>::is_noexcept))
- {
- return submit(s, r);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<S&, void(const R&)>::overload == adapter,
- typename call_traits<S&, void(const R&)>::result_type
- >::type
- operator()(S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<S&, void(const R&)>::is_noexcept))
- {
- asio::execution::start(
- (new asio::execution::detail::submit_receiver<
- S&, const R&>(s, r))->state_);
- }
-
- template <typename S, typename R>
- ASIO_CONSTEXPR typename enable_if<
- call_traits<const S&, void(const R&)>::overload == adapter,
- typename call_traits<const S&, void(const R&)>::result_type
- >::type
- operator()(const S& s, const R& r) const
- ASIO_NOEXCEPT_IF((
- call_traits<const S&, void(const R&)>::is_noexcept))
- {
- asio::execution::start(
- (new asio::execution::detail::submit_receiver<
- const S&, const R&>(s, r))->state_);
- }
-#endif // defined(ASIO_HAS_MOVE)
-};
-
-template <typename T = impl>
-struct static_instance
-{
- static const T instance;
-};
-
-template <typename T>
-const T static_instance<T>::instance = {};
-
-} // namespace asio_execution_submit_fn
-namespace asio {
-namespace execution {
-namespace {
-
-static ASIO_CONSTEXPR const asio_execution_submit_fn::impl&
- submit = asio_execution_submit_fn::static_instance<>::instance;
-
-} // namespace
-
-template <typename S, typename R>
-struct can_submit :
- integral_constant<bool,
- asio_execution_submit_fn::call_traits<S, void(R)>::overload !=
- asio_execution_submit_fn::ill_formed>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename R>
-constexpr bool can_submit_v = can_submit<S, R>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename R>
-struct is_nothrow_submit :
- integral_constant<bool,
- asio_execution_submit_fn::call_traits<S, void(R)>::is_noexcept>
-{
-};
-
-#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename R>
-constexpr bool is_nothrow_submit_v
- = is_nothrow_submit<S, R>::value;
-
-#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-
-template <typename S, typename R>
-struct submit_result
-{
- typedef typename asio_execution_submit_fn::call_traits<
- S, void(R)>::result_type type;
-};
-
-namespace detail {
-
-template <typename S, typename R>
-void submit_helper(ASIO_MOVE_ARG(S) s, ASIO_MOVE_ARG(R) r)
-{
- execution::submit(ASIO_MOVE_CAST(S)(s), ASIO_MOVE_CAST(R)(r));
-}
-
-} // namespace detail
-} // namespace execution
-} // namespace asio
-
-#endif // defined(GENERATING_DOCUMENTATION)
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXECUTION_SUBMIT_HPP
diff --git a/3rdparty/asio/include/asio/execution_context.hpp b/3rdparty/asio/include/asio/execution_context.hpp
index e1ee67a28c7..bce8d431607 100644
--- a/3rdparty/asio/include/asio/execution_context.hpp
+++ b/3rdparty/asio/include/asio/execution_context.hpp
@@ -2,7 +2,7 @@
// execution_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,7 +20,6 @@
#include <stdexcept>
#include <typeinfo>
#include "asio/detail/noncopyable.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/detail/push_options.hpp"
@@ -224,8 +223,6 @@ public:
template <typename Service>
friend Service& use_service(io_context& ioc);
-#if defined(GENERATING_DOCUMENTATION)
-
/// Creates a service object and adds it to the execution_context.
/**
* This function is used to add a service to the execution_context.
@@ -241,27 +238,6 @@ public:
template <typename Service, typename... Args>
friend Service& make_service(execution_context& e, Args&&... args);
-#elif defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Service, typename... Args>
- friend Service& make_service(execution_context& e,
- ASIO_MOVE_ARG(Args)... args);
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Service>
- friend Service& make_service(execution_context& e);
-
-#define ASIO_PRIVATE_MAKE_SERVICE_DEF(n) \
- template <typename Service, ASIO_VARIADIC_TPARAMS(n)> \
- friend Service& make_service(execution_context& e, \
- ASIO_VARIADIC_MOVE_PARAMS(n)); \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_MAKE_SERVICE_DEF)
-#undef ASIO_PRIVATE_MAKE_SERVICE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
/// (Deprecated: Use make_service().) Add a service object to the
/// execution_context.
/**
diff --git a/3rdparty/asio/include/asio/executor.hpp b/3rdparty/asio/include/asio/executor.hpp
index 419fdcae653..c056525460a 100644
--- a/3rdparty/asio/include/asio/executor.hpp
+++ b/3rdparty/asio/include/asio/executor.hpp
@@ -2,7 +2,7 @@
// executor.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,6 +19,7 @@
#if !defined(ASIO_NO_TS_EXECUTORS)
+#include <new>
#include <typeinfo>
#include "asio/detail/cstddef.hpp"
#include "asio/detail/executor_function.hpp"
@@ -36,11 +37,11 @@ class bad_executor
{
public:
/// Constructor.
- ASIO_DECL bad_executor() ASIO_NOEXCEPT;
+ ASIO_DECL bad_executor() noexcept;
/// Obtain message associated with exception.
ASIO_DECL virtual const char* what() const
- ASIO_NOEXCEPT_OR_NOTHROW;
+ noexcept;
};
/// Polymorphic wrapper for executors.
@@ -48,36 +49,53 @@ class executor
{
public:
/// Default constructor.
- executor() ASIO_NOEXCEPT
+ executor() noexcept
: impl_(0)
{
}
/// Construct from nullptr.
- executor(nullptr_t) ASIO_NOEXCEPT
+ executor(nullptr_t) noexcept
: impl_(0)
{
}
/// Copy constructor.
- executor(const executor& other) ASIO_NOEXCEPT
+ executor(const executor& other) noexcept
: impl_(other.clone())
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
- executor(executor&& other) ASIO_NOEXCEPT
+ executor(executor&& other) noexcept
: impl_(other.impl_)
{
other.impl_ = 0;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Construct a polymorphic wrapper for the specified executor.
template <typename Executor>
executor(Executor e);
+ /// Construct a polymorphic executor that points to the same target as
+ /// another polymorphic executor.
+ executor(std::nothrow_t, const executor& other) noexcept
+ : impl_(other.clone())
+ {
+ }
+
+ /// Construct a polymorphic executor that moves the target from another
+ /// polymorphic executor.
+ executor(std::nothrow_t, executor&& other) noexcept
+ : impl_(other.impl_)
+ {
+ other.impl_ = 0;
+ }
+
+ /// Construct a polymorphic wrapper for the specified executor.
+ template <typename Executor>
+ executor(std::nothrow_t, Executor e) noexcept;
+
/// Allocator-aware constructor to create a polymorphic wrapper for the
/// specified executor.
template <typename Executor, typename Allocator>
@@ -90,26 +108,24 @@ public:
}
/// Assignment operator.
- executor& operator=(const executor& other) ASIO_NOEXCEPT
+ executor& operator=(const executor& other) noexcept
{
destroy();
impl_ = other.clone();
return *this;
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
// Move assignment operator.
- executor& operator=(executor&& other) ASIO_NOEXCEPT
+ executor& operator=(executor&& other) noexcept
{
destroy();
impl_ = other.impl_;
other.impl_ = 0;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Assignment operator for nullptr_t.
- executor& operator=(nullptr_t) ASIO_NOEXCEPT
+ executor& operator=(nullptr_t) noexcept
{
destroy();
impl_ = 0;
@@ -119,9 +135,9 @@ public:
/// Assignment operator to create a polymorphic wrapper for the specified
/// executor.
template <typename Executor>
- executor& operator=(ASIO_MOVE_ARG(Executor) e) ASIO_NOEXCEPT
+ executor& operator=(Executor&& e) noexcept
{
- executor tmp(ASIO_MOVE_CAST(Executor)(e));
+ executor tmp(static_cast<Executor&&>(e));
destroy();
impl_ = tmp.impl_;
tmp.impl_ = 0;
@@ -129,19 +145,19 @@ public:
}
/// Obtain the underlying execution context.
- execution_context& context() const ASIO_NOEXCEPT
+ execution_context& context() const noexcept
{
return get_impl()->context();
}
/// Inform the executor that it has some outstanding work to do.
- void on_work_started() const ASIO_NOEXCEPT
+ void on_work_started() const noexcept
{
get_impl()->on_work_started();
}
/// Inform the executor that some work is no longer outstanding.
- void on_work_finished() const ASIO_NOEXCEPT
+ void on_work_finished() const noexcept
{
get_impl()->on_work_finished();
}
@@ -160,7 +176,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void dispatch(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ void dispatch(Function&& f, const Allocator& a) const;
/// Request the executor to invoke the given function object.
/**
@@ -176,7 +192,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void post(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ void post(Function&& f, const Allocator& a) const;
/// Request the executor to invoke the given function object.
/**
@@ -192,14 +208,14 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void defer(ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+ void defer(Function&& f, const Allocator& a) const;
struct unspecified_bool_type_t {};
typedef void (*unspecified_bool_type)(unspecified_bool_type_t);
static void unspecified_bool_true(unspecified_bool_type_t) {}
/// Operator to test if the executor contains a valid target.
- operator unspecified_bool_type() const ASIO_NOEXCEPT
+ operator unspecified_bool_type() const noexcept
{
return impl_ ? &executor::unspecified_bool_true : 0;
}
@@ -210,12 +226,12 @@ public:
* otherwise, <tt>typeid(void)</tt>.
*/
#if !defined(ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION)
- const std::type_info& target_type() const ASIO_NOEXCEPT
+ const std::type_info& target_type() const noexcept
{
return impl_ ? impl_->target_type() : typeid(void);
}
#else // !defined(ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION)
- const void* target_type() const ASIO_NOEXCEPT
+ const void* target_type() const noexcept
{
return impl_ ? impl_->target_type() : 0;
}
@@ -227,7 +243,7 @@ public:
* executor target; otherwise, a null pointer.
*/
template <typename Executor>
- Executor* target() ASIO_NOEXCEPT;
+ Executor* target() noexcept;
/// Obtain a pointer to the target executor object.
/**
@@ -235,11 +251,11 @@ public:
* executor target; otherwise, a null pointer.
*/
template <typename Executor>
- const Executor* target() const ASIO_NOEXCEPT;
+ const Executor* target() const noexcept;
/// Compare two executors for equality.
friend bool operator==(const executor& a,
- const executor& b) ASIO_NOEXCEPT
+ const executor& b) noexcept
{
if (a.impl_ == b.impl_)
return true;
@@ -250,7 +266,7 @@ public:
/// Compare two executors for inequality.
friend bool operator!=(const executor& a,
- const executor& b) ASIO_NOEXCEPT
+ const executor& b) noexcept
{
return !(a == b);
}
@@ -281,18 +297,18 @@ private:
class impl_base
{
public:
- virtual impl_base* clone() const ASIO_NOEXCEPT = 0;
- virtual void destroy() ASIO_NOEXCEPT = 0;
- virtual execution_context& context() ASIO_NOEXCEPT = 0;
- virtual void on_work_started() ASIO_NOEXCEPT = 0;
- virtual void on_work_finished() ASIO_NOEXCEPT = 0;
- virtual void dispatch(ASIO_MOVE_ARG(function)) = 0;
- virtual void post(ASIO_MOVE_ARG(function)) = 0;
- virtual void defer(ASIO_MOVE_ARG(function)) = 0;
- virtual type_id_result_type target_type() const ASIO_NOEXCEPT = 0;
- virtual void* target() ASIO_NOEXCEPT = 0;
- virtual const void* target() const ASIO_NOEXCEPT = 0;
- virtual bool equals(const impl_base* e) const ASIO_NOEXCEPT = 0;
+ virtual impl_base* clone() const noexcept = 0;
+ virtual void destroy() noexcept = 0;
+ virtual execution_context& context() noexcept = 0;
+ virtual void on_work_started() noexcept = 0;
+ virtual void on_work_finished() noexcept = 0;
+ virtual void dispatch(function&&) = 0;
+ virtual void post(function&&) = 0;
+ virtual void defer(function&&) = 0;
+ virtual type_id_result_type target_type() const noexcept = 0;
+ virtual void* target() noexcept = 0;
+ virtual const void* target() const noexcept = 0;
+ virtual bool equals(const impl_base* e) const noexcept = 0;
protected:
impl_base(bool fast_dispatch) : fast_dispatch_(fast_dispatch) {}
@@ -315,13 +331,13 @@ private:
}
// Helper function to clone another implementation.
- impl_base* clone() const ASIO_NOEXCEPT
+ impl_base* clone() const noexcept
{
return impl_ ? impl_->clone() : 0;
}
// Helper function to destroy an implementation.
- void destroy() ASIO_NOEXCEPT
+ void destroy() noexcept
{
if (impl_)
impl_->destroy();
diff --git a/3rdparty/asio/include/asio/executor_work_guard.hpp b/3rdparty/asio/include/asio/executor_work_guard.hpp
index 63837cb7458..72787ccdc83 100644
--- a/3rdparty/asio/include/asio/executor_work_guard.hpp
+++ b/3rdparty/asio/include/asio/executor_work_guard.hpp
@@ -2,7 +2,7 @@
// executor_work_guard.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,8 +17,6 @@
#include "asio/detail/config.hpp"
-#if !defined(ASIO_NO_TS_EXECUTORS)
-
#include "asio/associated_executor.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution.hpp"
@@ -36,13 +34,11 @@ class executor_work_guard;
#endif // !defined(ASIO_EXECUTOR_WORK_GUARD_DECL)
-/// An object of type @c executor_work_guard controls ownership of executor work
-/// within a scope.
#if defined(GENERATING_DOCUMENTATION)
+
+/// An object of type @c executor_work_guard controls ownership of outstanding
+/// executor work within a scope.
template <typename Executor>
-#else // defined(GENERATING_DOCUMENTATION)
-template <typename Executor, typename, typename>
-#endif // defined(GENERATING_DOCUMENTATION)
class executor_work_guard
{
public:
@@ -53,15 +49,58 @@ public:
/**
* Stores a copy of @c e and calls <tt>on_work_started()</tt> on it.
*/
- explicit executor_work_guard(const executor_type& e) ASIO_NOEXCEPT
+ explicit executor_work_guard(const executor_type& e) noexcept;
+
+ /// Copy constructor.
+ executor_work_guard(const executor_work_guard& other) noexcept;
+
+ /// Move constructor.
+ executor_work_guard(executor_work_guard&& other) noexcept;
+
+ /// Destructor.
+ /**
+ * Unless the object has already been reset, or is in a moved-from state,
+ * calls <tt>on_work_finished()</tt> on the stored executor.
+ */
+ ~executor_work_guard();
+
+ /// Obtain the associated executor.
+ executor_type get_executor() const noexcept;
+
+ /// Whether the executor_work_guard object owns some outstanding work.
+ bool owns_work() const noexcept;
+
+ /// Indicate that the work is no longer outstanding.
+ /**
+ * Unless the object has already been reset, or is in a moved-from state,
+ * calls <tt>on_work_finished()</tt> on the stored executor.
+ */
+ void reset() noexcept;
+};
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Executor>
+class executor_work_guard<Executor,
+ enable_if_t<
+ is_executor<Executor>::value
+ >>
+{
+public:
+ typedef Executor executor_type;
+
+ explicit executor_work_guard(const executor_type& e) noexcept
: executor_(e),
owns_(true)
{
executor_.on_work_started();
}
- /// Copy constructor.
- executor_work_guard(const executor_work_guard& other) ASIO_NOEXCEPT
+ executor_work_guard(const executor_work_guard& other) noexcept
: executor_(other.executor_),
owns_(other.owns_)
{
@@ -69,45 +108,30 @@ public:
executor_.on_work_started();
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move constructor.
- executor_work_guard(executor_work_guard&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(Executor)(other.executor_)),
+ executor_work_guard(executor_work_guard&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_)),
owns_(other.owns_)
{
other.owns_ = false;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Destructor.
- /**
- * Unless the object has already been reset, or is in a moved-from state,
- * calls <tt>on_work_finished()</tt> on the stored executor.
- */
~executor_work_guard()
{
if (owns_)
executor_.on_work_finished();
}
- /// Obtain the associated executor.
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return executor_;
}
- /// Whether the executor_work_guard object owns some outstanding work.
- bool owns_work() const ASIO_NOEXCEPT
+ bool owns_work() const noexcept
{
return owns_;
}
- /// Indicate that the work is no longer outstanding.
- /**
- * Unless the object has already been reset, or is in a moved-from state,
- * calls <tt>on_work_finished()</tt> on the stored executor.
- */
- void reset() ASIO_NOEXCEPT
+ void reset() noexcept
{
if (owns_)
{
@@ -124,21 +148,21 @@ private:
bool owns_;
};
-#if !defined(GENERATING_DOCUMENTATION)
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
template <typename Executor>
class executor_work_guard<Executor,
- typename enable_if<
+ enable_if_t<
!is_executor<Executor>::value
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
execution::is_executor<Executor>::value
- >::type>
+ >>
{
public:
typedef Executor executor_type;
- explicit executor_work_guard(const executor_type& e) ASIO_NOEXCEPT
+ explicit executor_work_guard(const executor_type& e) noexcept
: executor_(e),
owns_(true)
{
@@ -146,7 +170,7 @@ public:
execution::outstanding_work.tracked));
}
- executor_work_guard(const executor_work_guard& other) ASIO_NOEXCEPT
+ executor_work_guard(const executor_work_guard& other) noexcept
: executor_(other.executor_),
owns_(other.owns_)
{
@@ -157,21 +181,19 @@ public:
}
}
-#if defined(ASIO_HAS_MOVE)
- executor_work_guard(executor_work_guard&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(Executor)(other.executor_)),
+ executor_work_guard(executor_work_guard&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_)),
owns_(other.owns_)
{
if (owns_)
{
new (&work_) work_type(
- ASIO_MOVE_CAST(work_type)(
+ static_cast<work_type&&>(
*static_cast<work_type*>(
static_cast<void*>(&other.work_))));
other.owns_ = false;
}
}
-#endif // defined(ASIO_HAS_MOVE)
~executor_work_guard()
{
@@ -179,17 +201,17 @@ public:
static_cast<work_type*>(static_cast<void*>(&work_))->~work_type();
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return executor_;
}
- bool owns_work() const ASIO_NOEXCEPT
+ bool owns_work() const noexcept
{
return owns_;
}
- void reset() ASIO_NOEXCEPT
+ void reset() noexcept
{
if (owns_)
{
@@ -202,93 +224,133 @@ private:
// Disallow assignment.
executor_work_guard& operator=(const executor_work_guard&);
- typedef typename decay<
- typename prefer_result<
+ typedef decay_t<
+ prefer_result_t<
const executor_type&,
execution::outstanding_work_t::tracked_t
- >::type
- >::type work_type;
+ >
+ > work_type;
executor_type executor_;
- typename aligned_storage<sizeof(work_type),
- alignment_of<work_type>::value>::type work_;
+ aligned_storage_t<sizeof(work_type), alignment_of<work_type>::value> work_;
bool owns_;
};
#endif // !defined(GENERATING_DOCUMENTATION)
/// Create an @ref executor_work_guard object.
+/**
+ * @param ex An executor.
+ *
+ * @returns A work guard constructed with the specified executor.
+ */
template <typename Executor>
-inline executor_work_guard<Executor> make_work_guard(const Executor& ex,
- typename constraint<
+ASIO_NODISCARD inline executor_work_guard<Executor>
+make_work_guard(const Executor& ex,
+ constraint_t<
is_executor<Executor>::value || execution::is_executor<Executor>::value
- >::type = 0)
+ > = 0)
{
return executor_work_guard<Executor>(ex);
}
/// Create an @ref executor_work_guard object.
+/**
+ * @param ctx An execution context, from which an executor will be obtained.
+ *
+ * @returns A work guard constructed with the execution context's executor,
+ * obtained by performing <tt>ctx.get_executor()</tt>.
+ */
template <typename ExecutionContext>
-inline executor_work_guard<typename ExecutionContext::executor_type>
+ASIO_NODISCARD inline
+executor_work_guard<typename ExecutionContext::executor_type>
make_work_guard(ExecutionContext& ctx,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
{
return executor_work_guard<typename ExecutionContext::executor_type>(
ctx.get_executor());
}
/// Create an @ref executor_work_guard object.
+/**
+ * @param t An arbitrary object, such as a completion handler, for which the
+ * associated executor will be obtained.
+ *
+ * @returns A work guard constructed with the associated executor of the object
+ * @c t, which is obtained as if by calling <tt>get_associated_executor(t)</tt>.
+ */
template <typename T>
-inline executor_work_guard<typename associated_executor<T>::type>
-make_work_guard(const T& t,
- typename constraint<
+ASIO_NODISCARD inline
+executor_work_guard<
+ typename constraint_t<
!is_executor<T>::value
- >::type = 0,
- typename constraint<
- !execution::is_executor<T>::value
- >::type = 0,
- typename constraint<
- !is_convertible<T&, execution_context&>::value
- >::type = 0)
+ && !execution::is_executor<T>::value
+ && !is_convertible<T&, execution_context&>::value,
+ associated_executor<T>
+ >::type>
+make_work_guard(const T& t)
{
- return executor_work_guard<typename associated_executor<T>::type>(
+ return executor_work_guard<associated_executor_t<T>>(
associated_executor<T>::get(t));
}
/// Create an @ref executor_work_guard object.
+/**
+ * @param t An arbitrary object, such as a completion handler, for which the
+ * associated executor will be obtained.
+ *
+ * @param ex An executor to be used as the candidate object when determining the
+ * associated executor.
+ *
+ * @returns A work guard constructed with the associated executor of the object
+ * @c t, which is obtained as if by calling <tt>get_associated_executor(t,
+ * ex)</tt>.
+ */
template <typename T, typename Executor>
-inline executor_work_guard<typename associated_executor<T, Executor>::type>
+ASIO_NODISCARD inline
+executor_work_guard<associated_executor_t<T, Executor>>
make_work_guard(const T& t, const Executor& ex,
- typename constraint<
+ constraint_t<
is_executor<Executor>::value || execution::is_executor<Executor>::value
- >::type = 0)
+ > = 0)
{
- return executor_work_guard<typename associated_executor<T, Executor>::type>(
+ return executor_work_guard<associated_executor_t<T, Executor>>(
associated_executor<T, Executor>::get(t, ex));
}
/// Create an @ref executor_work_guard object.
+/**
+ * @param t An arbitrary object, such as a completion handler, for which the
+ * associated executor will be obtained.
+ *
+ * @param ctx An execution context, from which an executor is obtained to use as
+ * the candidate object for determining the associated executor.
+ *
+ * @returns A work guard constructed with the associated executor of the object
+ * @c t, which is obtained as if by calling <tt>get_associated_executor(t,
+ * ctx.get_executor())</tt>.
+ */
template <typename T, typename ExecutionContext>
-inline executor_work_guard<typename associated_executor<T,
- typename ExecutionContext::executor_type>::type>
+ASIO_NODISCARD inline executor_work_guard<
+ associated_executor_t<T, typename ExecutionContext::executor_type>>
make_work_guard(const T& t, ExecutionContext& ctx,
- typename constraint<
+ constraint_t<
!is_executor<T>::value
- >::type = 0,
- typename constraint<
+ > = 0,
+ constraint_t<
!execution::is_executor<T>::value
- >::type = 0,
- typename constraint<
+ > = 0,
+ constraint_t<
!is_convertible<T&, execution_context&>::value
- >::type = 0,
- typename constraint<
+ > = 0,
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
{
- return executor_work_guard<typename associated_executor<T,
- typename ExecutionContext::executor_type>::type>(
+ return executor_work_guard<
+ associated_executor_t<T, typename ExecutionContext::executor_type>>(
associated_executor<T, typename ExecutionContext::executor_type>::get(
t, ctx.get_executor()));
}
@@ -297,6 +359,4 @@ make_work_guard(const T& t, ExecutionContext& ctx,
#include "asio/detail/pop_options.hpp"
-#endif // !defined(ASIO_NO_TS_EXECUTORS)
-
#endif // ASIO_EXECUTOR_WORK_GUARD_HPP
diff --git a/3rdparty/asio/include/asio/experimental/append.hpp b/3rdparty/asio/include/asio/experimental/append.hpp
index 681d5e34c17..6a1f280cdd9 100644
--- a/3rdparty/asio/include/asio/experimental/append.hpp
+++ b/3rdparty/asio/include/asio/experimental/append.hpp
@@ -2,7 +2,7 @@
// experimental/append.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,56 +16,21 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include <tuple>
-#include "asio/detail/type_traits.hpp"
+#include "asio/append.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace experimental {
-/// Completion token type used to specify that the completion handler
-/// arguments should be passed additional values after the results of the
-/// operation.
-template <typename CompletionToken, typename... Values>
-class append_t
-{
-public:
- /// Constructor.
- template <typename T, typename... V>
- ASIO_CONSTEXPR explicit append_t(
- ASIO_MOVE_ARG(T) completion_token,
- ASIO_MOVE_ARG(V)... values)
- : token_(ASIO_MOVE_CAST(T)(completion_token)),
- values_(ASIO_MOVE_CAST(V)(values)...)
- {
- }
-
-//private:
- CompletionToken token_;
- std::tuple<Values...> values_;
-};
-
-/// Completion token type used to specify that the completion handler
-/// arguments should be passed additional values after the results of the
-/// operation.
-template <typename CompletionToken, typename... Values>
-inline ASIO_CONSTEXPR append_t<
- typename decay<CompletionToken>::type, typename decay<Values>::type...>
-append(ASIO_MOVE_ARG(CompletionToken) completion_token,
- ASIO_MOVE_ARG(Values)... values)
-{
- return append_t<
- typename decay<CompletionToken>::type, typename decay<Values>::type...>(
- ASIO_MOVE_CAST(CompletionToken)(completion_token),
- ASIO_MOVE_CAST(Values)(values)...);
-}
+#if !defined(ASIO_NO_DEPRECATED)
+using asio::append_t;
+using asio::append;
+#endif // !defined(ASIO_NO_DEPRECATED)
} // namespace experimental
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#include "asio/experimental/impl/append.hpp"
-
#endif // ASIO_EXPERIMENTAL_APPEND_HPP
diff --git a/3rdparty/asio/include/asio/experimental/as_single.hpp b/3rdparty/asio/include/asio/experimental/as_single.hpp
index cfd63ad122f..6282c14f142 100644
--- a/3rdparty/asio/include/asio/experimental/as_single.hpp
+++ b/3rdparty/asio/include/asio/experimental/as_single.hpp
@@ -2,7 +2,7 @@
// experimental/as_single.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,7 +23,7 @@
namespace asio {
namespace experimental {
-/// Completion token type used to specify that the completion handler
+/// A @ref completion_token adapter used to specify that the completion handler
/// arguments should be combined into a single argument.
/**
* The as_single_t class is used to indicate that any arguments to the
@@ -47,18 +47,18 @@ public:
* token is itself defaulted as an argument to allow it to capture a source
* location.
*/
- ASIO_CONSTEXPR as_single_t(
+ constexpr as_single_t(
default_constructor_tag = default_constructor_tag(),
CompletionToken token = CompletionToken())
- : token_(ASIO_MOVE_CAST(CompletionToken)(token))
+ : token_(static_cast<CompletionToken&&>(token))
{
}
/// Constructor.
template <typename T>
- ASIO_CONSTEXPR explicit as_single_t(
- ASIO_MOVE_ARG(T) completion_token)
- : token_(ASIO_MOVE_CAST(T)(completion_token))
+ constexpr explicit as_single_t(
+ T&& completion_token)
+ : token_(static_cast<T&&>(completion_token))
{
}
@@ -71,7 +71,7 @@ public:
typedef as_single_t default_completion_token_type;
/// Construct the adapted executor from the inner executor type.
- executor_with_default(const InnerExecutor& ex) ASIO_NOEXCEPT
+ executor_with_default(const InnerExecutor& ex) noexcept
: InnerExecutor(ex)
{
}
@@ -80,9 +80,9 @@ public:
/// that to construct the adapted executor.
template <typename OtherExecutor>
executor_with_default(const OtherExecutor& ex,
- typename constraint<
+ constraint_t<
is_convertible<OtherExecutor, InnerExecutor>::value
- >::type = 0) ASIO_NOEXCEPT
+ > = 0) noexcept
: InnerExecutor(ex)
{
}
@@ -90,39 +90,36 @@ public:
/// Type alias to adapt an I/O object to use @c as_single_t as its
/// default completion token type.
-#if defined(ASIO_HAS_ALIAS_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
template <typename T>
using as_default_on_t = typename T::template rebind_executor<
- executor_with_default<typename T::executor_type> >::other;
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
+ executor_with_default<typename T::executor_type>>::other;
/// Function helper to adapt an I/O object to use @c as_single_t as its
/// default completion token type.
template <typename T>
- static typename decay<T>::type::template rebind_executor<
- executor_with_default<typename decay<T>::type::executor_type>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
>::other
- as_default_on(ASIO_MOVE_ARG(T) object)
+ as_default_on(T&& object)
{
- return typename decay<T>::type::template rebind_executor<
- executor_with_default<typename decay<T>::type::executor_type>
- >::other(ASIO_MOVE_CAST(T)(object));
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
}
//private:
CompletionToken token_;
};
-/// Create a completion token to specify that the completion handler arguments
-/// should be combined into a single argument.
+/// Adapt a @ref completion_token to specify that the completion handler
+/// arguments should be combined into a single argument.
template <typename CompletionToken>
-inline ASIO_CONSTEXPR as_single_t<typename decay<CompletionToken>::type>
-as_single(ASIO_MOVE_ARG(CompletionToken) completion_token)
+ASIO_NODISCARD inline
+constexpr as_single_t<decay_t<CompletionToken>>
+as_single(CompletionToken&& completion_token)
{
- return as_single_t<typename decay<CompletionToken>::type>(
- ASIO_MOVE_CAST(CompletionToken)(completion_token));
+ return as_single_t<decay_t<CompletionToken>>(
+ static_cast<CompletionToken&&>(completion_token));
}
} // namespace experimental
diff --git a/3rdparty/asio/include/asio/experimental/as_tuple.hpp b/3rdparty/asio/include/asio/experimental/as_tuple.hpp
index d8ccdafd806..02f23f2909b 100644
--- a/3rdparty/asio/include/asio/experimental/as_tuple.hpp
+++ b/3rdparty/asio/include/asio/experimental/as_tuple.hpp
@@ -2,7 +2,7 @@
// experimental/as_tuple.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,116 +16,21 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
+#include "asio/as_tuple.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace experimental {
-/// Completion token type used to specify that the completion handler
-/// arguments should be combined into a single tuple argument.
-/**
- * The as_tuple_t class is used to indicate that any arguments to the
- * completion handler should be combined and passed as a single tuple argument.
- * The arguments are first moved into a @c std::tuple and that tuple is then
- * passed to the completion handler.
- */
-template <typename CompletionToken>
-class as_tuple_t
-{
-public:
- /// Tag type used to prevent the "default" constructor from being used for
- /// conversions.
- struct default_constructor_tag {};
-
- /// Default constructor.
- /**
- * This constructor is only valid if the underlying completion token is
- * default constructible and move constructible. The underlying completion
- * token is itself defaulted as an argument to allow it to capture a source
- * location.
- */
- ASIO_CONSTEXPR as_tuple_t(
- default_constructor_tag = default_constructor_tag(),
- CompletionToken token = CompletionToken())
- : token_(ASIO_MOVE_CAST(CompletionToken)(token))
- {
- }
-
- /// Constructor.
- template <typename T>
- ASIO_CONSTEXPR explicit as_tuple_t(
- ASIO_MOVE_ARG(T) completion_token)
- : token_(ASIO_MOVE_CAST(T)(completion_token))
- {
- }
-
- /// Adapts an executor to add the @c as_tuple_t completion token as the
- /// default.
- template <typename InnerExecutor>
- struct executor_with_default : InnerExecutor
- {
- /// Specify @c as_tuple_t as the default completion token type.
- typedef as_tuple_t default_completion_token_type;
-
- /// Construct the adapted executor from the inner executor type.
- template <typename InnerExecutor1>
- executor_with_default(const InnerExecutor1& ex,
- typename constraint<
- conditional<
- !is_same<InnerExecutor1, executor_with_default>::value,
- is_convertible<InnerExecutor1, InnerExecutor>,
- false_type
- >::type::value
- >::type = 0) ASIO_NOEXCEPT
- : InnerExecutor(ex)
- {
- }
- };
-
- /// Type alias to adapt an I/O object to use @c as_tuple_t as its
- /// default completion token type.
-#if defined(ASIO_HAS_ALIAS_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
- template <typename T>
- using as_default_on_t = typename T::template rebind_executor<
- executor_with_default<typename T::executor_type> >::other;
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
- /// Function helper to adapt an I/O object to use @c as_tuple_t as its
- /// default completion token type.
- template <typename T>
- static typename decay<T>::type::template rebind_executor<
- executor_with_default<typename decay<T>::type::executor_type>
- >::other
- as_default_on(ASIO_MOVE_ARG(T) object)
- {
- return typename decay<T>::type::template rebind_executor<
- executor_with_default<typename decay<T>::type::executor_type>
- >::other(ASIO_MOVE_CAST(T)(object));
- }
-
-//private:
- CompletionToken token_;
-};
-
-/// Create a completion token to specify that the completion handler arguments
-/// should be combined into a single tuple argument.
-template <typename CompletionToken>
-inline ASIO_CONSTEXPR as_tuple_t<typename decay<CompletionToken>::type>
-as_tuple(ASIO_MOVE_ARG(CompletionToken) completion_token)
-{
- return as_tuple_t<typename decay<CompletionToken>::type>(
- ASIO_MOVE_CAST(CompletionToken)(completion_token));
-}
+#if !defined(ASIO_NO_DEPRECATED)
+using asio::as_tuple_t;
+using asio::as_tuple;
+#endif // !defined(ASIO_NO_DEPRECATED)
} // namespace experimental
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#include "asio/experimental/impl/as_tuple.hpp"
-
#endif // ASIO_EXPERIMENTAL_AS_TUPLE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/awaitable_operators.hpp b/3rdparty/asio/include/asio/experimental/awaitable_operators.hpp
index ddc24c0af82..45799daaa5f 100644
--- a/3rdparty/asio/include/asio/experimental/awaitable_operators.hpp
+++ b/3rdparty/asio/include/asio/experimental/awaitable_operators.hpp
@@ -2,7 +2,7 @@
// experimental/awaitable_operators.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -21,12 +21,12 @@
#include <tuple>
#include <variant>
#include "asio/awaitable.hpp"
+#include "asio/co_spawn.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/experimental/deferred.hpp"
#include "asio/experimental/parallel_group.hpp"
#include "asio/multiple_exceptions.hpp"
#include "asio/this_coro.hpp"
-#include "asio/use_awaitable.hpp"
#include "asio/detail/push_options.hpp"
@@ -37,28 +37,28 @@ namespace detail {
template <typename T, typename Executor>
awaitable<T, Executor> awaitable_wrap(awaitable<T, Executor> a,
- typename constraint<is_constructible<T>::value>::type* = 0)
+ constraint_t<is_constructible<T>::value>* = 0)
{
return a;
}
template <typename T, typename Executor>
awaitable<std::optional<T>, Executor> awaitable_wrap(awaitable<T, Executor> a,
- typename constraint<!is_constructible<T>::value>::type* = 0)
+ constraint_t<!is_constructible<T>::value>* = 0)
{
co_return std::optional<T>(co_await std::move(a));
}
template <typename T>
-T& awaitable_unwrap(typename conditional<true, T, void>::type& r,
- typename constraint<is_constructible<T>::value>::type* = 0)
+T& awaitable_unwrap(conditional_t<true, T, void>& r,
+ constraint_t<is_constructible<T>::value>* = 0)
{
return r;
}
template <typename T>
-T& awaitable_unwrap(std::optional<typename conditional<true, T, void>::type>& r,
- typename constraint<!is_constructible<T>::value>::type* = 0)
+T& awaitable_unwrap(std::optional<conditional_t<true, T, void>>& r,
+ constraint_t<!is_constructible<T>::value>* = 0)
{
return *r;
}
@@ -82,7 +82,7 @@ awaitable<void, Executor> operator&&(
co_spawn(ex, std::move(u), deferred)
).async_wait(
wait_for_one_error(),
- use_awaitable_t<Executor>{}
+ deferred
);
if (ex0 && ex1)
@@ -111,7 +111,7 @@ awaitable<U, Executor> operator&&(
co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
).async_wait(
wait_for_one_error(),
- use_awaitable_t<Executor>{}
+ deferred
);
if (ex0 && ex1)
@@ -140,7 +140,7 @@ awaitable<T, Executor> operator&&(
co_spawn(ex, std::move(u), deferred)
).async_wait(
wait_for_one_error(),
- use_awaitable_t<Executor>{}
+ deferred
);
if (ex0 && ex1)
@@ -169,7 +169,7 @@ awaitable<std::tuple<T, U>, Executor> operator&&(
co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
).async_wait(
wait_for_one_error(),
- use_awaitable_t<Executor>{}
+ deferred
);
if (ex0 && ex1)
@@ -200,7 +200,7 @@ awaitable<std::tuple<T..., std::monostate>, Executor> operator&&(
co_spawn(ex, std::move(u), deferred)
).async_wait(
wait_for_one_error(),
- use_awaitable_t<Executor>{}
+ deferred
);
if (ex0 && ex1)
@@ -229,7 +229,7 @@ awaitable<std::tuple<T..., U>, Executor> operator&&(
co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
).async_wait(
wait_for_one_error(),
- use_awaitable_t<Executor>{}
+ deferred
);
if (ex0 && ex1)
@@ -260,7 +260,7 @@ awaitable<std::variant<std::monostate, std::monostate>, Executor> operator||(
co_spawn(ex, std::move(u), deferred)
).async_wait(
wait_for_one_success(),
- use_awaitable_t<Executor>{}
+ deferred
);
if (order[0] == 0)
@@ -302,7 +302,7 @@ awaitable<std::variant<std::monostate, U>, Executor> operator||(
co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
).async_wait(
wait_for_one_success(),
- use_awaitable_t<Executor>{}
+ deferred
);
if (order[0] == 0)
@@ -346,7 +346,7 @@ awaitable<std::variant<T, std::monostate>, Executor> operator||(
co_spawn(ex, std::move(u), deferred)
).async_wait(
wait_for_one_success(),
- use_awaitable_t<Executor>{}
+ deferred
);
if (order[0] == 0)
@@ -390,7 +390,7 @@ awaitable<std::variant<T, U>, Executor> operator||(
co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
).async_wait(
wait_for_one_success(),
- use_awaitable_t<Executor>{}
+ deferred
);
if (order[0] == 0)
@@ -456,7 +456,7 @@ awaitable<std::variant<T..., std::monostate>, Executor> operator||(
co_spawn(ex, std::move(u), deferred)
).async_wait(
wait_for_one_success(),
- use_awaitable_t<Executor>{}
+ deferred
);
using widen = detail::widen_variant<T..., std::monostate>;
@@ -499,7 +499,7 @@ awaitable<std::variant<T..., U>, Executor> operator||(
co_spawn(ex, detail::awaitable_wrap(std::move(u)), deferred)
).async_wait(
wait_for_one_success(),
- use_awaitable_t<Executor>{}
+ deferred
);
using widen = detail::widen_variant<T..., U>;
diff --git a/3rdparty/asio/include/asio/experimental/basic_channel.hpp b/3rdparty/asio/include/asio/experimental/basic_channel.hpp
new file mode 100644
index 00000000000..6ca1438a093
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/basic_channel.hpp
@@ -0,0 +1,513 @@
+//
+// experimental/basic_channel.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 ASIO_EXPERIMENTAL_BASIC_CHANNEL_HPP
+#define ASIO_EXPERIMENTAL_BASIC_CHANNEL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/null_mutex.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/experimental/detail/channel_send_functions.hpp"
+#include "asio/experimental/detail/channel_service.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+} // namespace detail
+
+/// A channel for messages.
+/**
+ * The basic_channel class template is used for sending messages between
+ * different parts of the same application. A <em>message</em> is defined as a
+ * collection of arguments to be passed to a completion handler, and the set of
+ * messages supported by a channel is specified by its @c Traits and
+ * <tt>Signatures...</tt> template parameters. Messages may be sent and received
+ * using asynchronous or non-blocking synchronous operations.
+ *
+ * Unless customising the traits, applications will typically use the @c
+ * experimental::channel alias template. For example:
+ * @code void send_loop(int i, steady_timer& timer,
+ * channel<void(error_code, int)>& ch)
+ * {
+ * if (i < 10)
+ * {
+ * timer.expires_after(chrono::seconds(1));
+ * timer.async_wait(
+ * [i, &timer, &ch](error_code error)
+ * {
+ * if (!error)
+ * {
+ * ch.async_send(error_code(), i,
+ * [i, &timer, &ch](error_code error)
+ * {
+ * if (!error)
+ * {
+ * send_loop(i + 1, timer, ch);
+ * }
+ * });
+ * }
+ * });
+ * }
+ * else
+ * {
+ * ch.close();
+ * }
+ * }
+ *
+ * void receive_loop(channel<void(error_code, int)>& ch)
+ * {
+ * ch.async_receive(
+ * [&ch](error_code error, int i)
+ * {
+ * if (!error)
+ * {
+ * std::cout << "Received " << i << "\n";
+ * receive_loop(ch);
+ * }
+ * });
+ * } @endcode
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * The basic_channel class template is not thread-safe, and would typically be
+ * used for passing messages between application code that runs on the same
+ * thread or in the same strand. Consider using @ref basic_concurrent_channel,
+ * and its alias template @c experimental::concurrent_channel, to pass messages
+ * between code running in different threads.
+ */
+template <typename Executor, typename Traits, typename... Signatures>
+class basic_channel
+#if !defined(GENERATING_DOCUMENTATION)
+ : public detail::channel_send_functions<
+ basic_channel<Executor, Traits, Signatures...>,
+ Executor, Signatures...>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+private:
+ class initiate_async_send;
+ class initiate_async_receive;
+ typedef detail::channel_service<asio::detail::null_mutex> service_type;
+ typedef typename service_type::template implementation_type<
+ Traits, Signatures...>::payload_type payload_type;
+
+ template <typename... PayloadSignatures,
+ ASIO_COMPLETION_TOKEN_FOR(PayloadSignatures...) CompletionToken>
+ auto do_async_receive(detail::channel_payload<PayloadSignatures...>*,
+ CompletionToken&& token)
+ -> decltype(
+ async_initiate<CompletionToken, PayloadSignatures...>(
+ declval<initiate_async_receive>(), token))
+ {
+ return async_initiate<CompletionToken, PayloadSignatures...>(
+ initiate_async_receive(this), token);
+ }
+
+public:
+ /// The type of the executor associated with the channel.
+ typedef Executor executor_type;
+
+ /// Rebinds the channel type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The channel type when rebound to the specified executor.
+ typedef basic_channel<Executor1, Traits, Signatures...> other;
+ };
+
+ /// The traits type associated with the channel.
+ typedef typename Traits::template rebind<Signatures...>::other traits_type;
+
+ /// Construct a basic_channel.
+ /**
+ * This constructor creates and channel.
+ *
+ * @param ex The I/O executor that the channel will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the channel.
+ *
+ * @param max_buffer_size The maximum number of messages that may be buffered
+ * in the channel.
+ */
+ basic_channel(const executor_type& ex, std::size_t max_buffer_size = 0)
+ : service_(&asio::use_service<service_type>(
+ basic_channel::get_context(ex))),
+ impl_(),
+ executor_(ex)
+ {
+ service_->construct(impl_, max_buffer_size);
+ }
+
+ /// Construct and open a basic_channel.
+ /**
+ * This constructor creates and opens a channel.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the channel will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the channel.
+ *
+ * @param max_buffer_size The maximum number of messages that may be buffered
+ * in the channel.
+ */
+ template <typename ExecutionContext>
+ basic_channel(ExecutionContext& context, std::size_t max_buffer_size = 0,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : service_(&asio::use_service<service_type>(context)),
+ impl_(),
+ executor_(context.get_executor())
+ {
+ service_->construct(impl_, max_buffer_size);
+ }
+
+ /// Move-construct a basic_channel from another.
+ /**
+ * This constructor moves a channel from one object to another.
+ *
+ * @param other The other basic_channel object from which the move will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_channel(const executor_type&) constructor.
+ */
+ basic_channel(basic_channel&& other)
+ : service_(other.service_),
+ executor_(other.executor_)
+ {
+ service_->move_construct(impl_, other.impl_);
+ }
+
+ /// Move-assign a basic_channel from another.
+ /**
+ * This assignment operator moves a channel from one object to another.
+ * Cancels any outstanding asynchronous operations associated with the target
+ * object.
+ *
+ * @param other The other basic_channel object from which the move will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_channel(const executor_type&)
+ * constructor.
+ */
+ basic_channel& operator=(basic_channel&& other)
+ {
+ if (this != &other)
+ {
+ service_->move_assign(impl_, *other.service_, other.impl_);
+ executor_.~executor_type();
+ new (&executor_) executor_type(other.executor_);
+ service_ = other.service_;
+ }
+ return *this;
+ }
+
+ // All channels have access to each other's implementations.
+ template <typename, typename, typename...>
+ friend class basic_channel;
+
+ /// Move-construct a basic_channel from another.
+ /**
+ * This constructor moves a channel from one object to another.
+ *
+ * @param other The other basic_channel object from which the move will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_channel(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_channel(
+ basic_channel<Executor1, Traits, Signatures...>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value
+ > = 0)
+ : service_(other.service_),
+ executor_(other.executor_)
+ {
+ service_->move_construct(impl_, other.impl_);
+ }
+
+ /// Move-assign a basic_channel from another.
+ /**
+ * This assignment operator moves a channel from one object to another.
+ * Cancels any outstanding asynchronous operations associated with the target
+ * object.
+ *
+ * @param other The other basic_channel object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_channel(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_channel&
+ > operator=(basic_channel<Executor1, Traits, Signatures...>&& other)
+ {
+ if (this != &other)
+ {
+ service_->move_assign(impl_, *other.service_, other.impl_);
+ executor_.~executor_type();
+ new (&executor_) executor_type(other.executor_);
+ service_ = other.service_;
+ }
+ return *this;
+ }
+
+ /// Destructor.
+ ~basic_channel()
+ {
+ service_->destroy(impl_);
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return executor_;
+ }
+
+ /// Get the capacity of the channel's buffer.
+ std::size_t capacity() noexcept
+ {
+ return service_->capacity(impl_);
+ }
+
+ /// Determine whether the channel is open.
+ bool is_open() const noexcept
+ {
+ return service_->is_open(impl_);
+ }
+
+ /// Reset the channel to its initial state.
+ void reset()
+ {
+ service_->reset(impl_);
+ }
+
+ /// Close the channel.
+ void close()
+ {
+ service_->close(impl_);
+ }
+
+ /// Cancel all asynchronous operations waiting on the channel.
+ /**
+ * All outstanding send operations will complete with the error
+ * @c asio::experimental::error::channel_cancelled. Outstanding receive
+ * operations complete with the result as determined by the channel traits.
+ */
+ void cancel()
+ {
+ service_->cancel(impl_);
+ }
+
+ /// Determine whether a message can be received without blocking.
+ bool ready() const noexcept
+ {
+ return service_->ready(impl_);
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+
+ /// Try to send a message without blocking.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename... Args>
+ bool try_send(Args&&... args);
+
+ /// Try to send a message without blocking, using dispatch semantics to call
+ /// the receive operation's completion handler.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * The receive operation's completion handler may be called from inside this
+ * function.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename... Args>
+ bool try_send_via_dispatch(Args&&... args);
+
+ /// Try to send a number of messages without blocking.
+ /**
+ * @returns The number of messages that were sent.
+ */
+ template <typename... Args>
+ std::size_t try_send_n(std::size_t count, Args&&... args);
+
+ /// Try to send a number of messages without blocking, using dispatch
+ /// semantics to call the receive operations' completion handlers.
+ /**
+ * The receive operations' completion handlers may be called from inside this
+ * function.
+ *
+ * @returns The number of messages that were sent.
+ */
+ template <typename... Args>
+ std::size_t try_send_n_via_dispatch(std::size_t count, Args&&... args);
+
+ /// Asynchronously send a message.
+ /**
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ */
+ template <typename... Args,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ CompletionToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
+ auto async_send(Args&&... args,
+ CompletionToken&& token);
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Try to receive a message without blocking.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename Handler>
+ bool try_receive(Handler&& handler)
+ {
+ return service_->try_receive(impl_, static_cast<Handler&&>(handler));
+ }
+
+ /// Asynchronously receive a message.
+ /**
+ * @par Completion Signature
+ * As determined by the <tt>Signatures...</tt> template parameter and the
+ * channel traits.
+ */
+ template <typename CompletionToken
+ ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
+ auto async_receive(
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(Executor))
+#if !defined(GENERATING_DOCUMENTATION)
+ -> decltype(
+ this->do_async_receive(static_cast<payload_type*>(0),
+ static_cast<CompletionToken&&>(token)))
+#endif // !defined(GENERATING_DOCUMENTATION)
+ {
+ return this->do_async_receive(static_cast<payload_type*>(0),
+ static_cast<CompletionToken&&>(token));
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_channel(const basic_channel&) = delete;
+ basic_channel& operator=(const basic_channel&) = delete;
+
+ template <typename, typename, typename...>
+ friend class detail::channel_send_functions;
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<execution::is_executor<T>::value>* = 0)
+ {
+ return asio::query(t, execution::context);
+ }
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<!execution::is_executor<T>::value>* = 0)
+ {
+ return t.context();
+ }
+
+ class initiate_async_send
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_send(basic_channel* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename SendHandler>
+ void operator()(SendHandler&& handler,
+ payload_type&& payload) const
+ {
+ asio::detail::non_const_lvalue<SendHandler> handler2(handler);
+ self_->service_->async_send(self_->impl_,
+ static_cast<payload_type&&>(payload),
+ handler2.value, self_->get_executor());
+ }
+
+ private:
+ basic_channel* self_;
+ };
+
+ class initiate_async_receive
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_receive(basic_channel* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReceiveHandler>
+ void operator()(ReceiveHandler&& handler) const
+ {
+ asio::detail::non_const_lvalue<ReceiveHandler> handler2(handler);
+ self_->service_->async_receive(self_->impl_,
+ handler2.value, self_->get_executor());
+ }
+
+ private:
+ basic_channel* self_;
+ };
+
+ // The service associated with the I/O object.
+ service_type* service_;
+
+ // The underlying implementation of the I/O object.
+ typename service_type::template implementation_type<
+ Traits, Signatures...> impl_;
+
+ // The associated executor.
+ Executor executor_;
+};
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_BASIC_CHANNEL_HPP
diff --git a/3rdparty/asio/include/asio/experimental/basic_concurrent_channel.hpp b/3rdparty/asio/include/asio/experimental/basic_concurrent_channel.hpp
new file mode 100644
index 00000000000..9dbfea39527
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/basic_concurrent_channel.hpp
@@ -0,0 +1,513 @@
+//
+// experimental/basic_concurrent_channel.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 ASIO_EXPERIMENTAL_BASIC_CONCURRENT_CHANNEL_HPP
+#define ASIO_EXPERIMENTAL_BASIC_CONCURRENT_CHANNEL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/non_const_lvalue.hpp"
+#include "asio/detail/mutex.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/experimental/detail/channel_send_functions.hpp"
+#include "asio/experimental/detail/channel_service.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+} // namespace detail
+
+/// A channel for messages.
+/**
+ * The basic_concurrent_channel class template is used for sending messages
+ * between different parts of the same application. A <em>message</em> is
+ * defined as a collection of arguments to be passed to a completion handler,
+ * and the set of messages supported by a channel is specified by its @c Traits
+ * and <tt>Signatures...</tt> template parameters. Messages may be sent and
+ * received using asynchronous or non-blocking synchronous operations.
+ *
+ * Unless customising the traits, applications will typically use the @c
+ * experimental::concurrent_channel alias template. For example:
+ * @code void send_loop(int i, steady_timer& timer,
+ * concurrent_channel<void(error_code, int)>& ch)
+ * {
+ * if (i < 10)
+ * {
+ * timer.expires_after(chrono::seconds(1));
+ * timer.async_wait(
+ * [i, &timer, &ch](error_code error)
+ * {
+ * if (!error)
+ * {
+ * ch.async_send(error_code(), i,
+ * [i, &timer, &ch](error_code error)
+ * {
+ * if (!error)
+ * {
+ * send_loop(i + 1, timer, ch);
+ * }
+ * });
+ * }
+ * });
+ * }
+ * else
+ * {
+ * ch.close();
+ * }
+ * }
+ *
+ * void receive_loop(concurent_channel<void(error_code, int)>& ch)
+ * {
+ * ch.async_receive(
+ * [&ch](error_code error, int i)
+ * {
+ * if (!error)
+ * {
+ * std::cout << "Received " << i << "\n";
+ * receive_loop(ch);
+ * }
+ * });
+ * } @endcode
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * The basic_concurrent_channel class template is thread-safe, and would
+ * typically be used for passing messages between application code that run on
+ * different threads. Consider using @ref basic_channel, and its alias template
+ * @c experimental::channel, to pass messages between code running in a single
+ * thread or on the same strand.
+ */
+template <typename Executor, typename Traits, typename... Signatures>
+class basic_concurrent_channel
+#if !defined(GENERATING_DOCUMENTATION)
+ : public detail::channel_send_functions<
+ basic_concurrent_channel<Executor, Traits, Signatures...>,
+ Executor, Signatures...>
+#endif // !defined(GENERATING_DOCUMENTATION)
+{
+private:
+ class initiate_async_send;
+ class initiate_async_receive;
+ typedef detail::channel_service<asio::detail::mutex> service_type;
+ typedef typename service_type::template implementation_type<
+ Traits, Signatures...>::payload_type payload_type;
+
+ template <typename... PayloadSignatures,
+ ASIO_COMPLETION_TOKEN_FOR(PayloadSignatures...) CompletionToken>
+ auto do_async_receive(detail::channel_payload<PayloadSignatures...>*,
+ CompletionToken&& token)
+ -> decltype(
+ async_initiate<CompletionToken, PayloadSignatures...>(
+ declval<initiate_async_receive>(), token))
+ {
+ return async_initiate<CompletionToken, PayloadSignatures...>(
+ initiate_async_receive(this), token);
+ }
+
+public:
+ /// The type of the executor associated with the channel.
+ typedef Executor executor_type;
+
+ /// Rebinds the channel type to another executor.
+ template <typename Executor1>
+ struct rebind_executor
+ {
+ /// The channel type when rebound to the specified executor.
+ typedef basic_concurrent_channel<Executor1, Traits, Signatures...> other;
+ };
+
+ /// The traits type associated with the channel.
+ typedef typename Traits::template rebind<Signatures...>::other traits_type;
+
+ /// Construct a basic_concurrent_channel.
+ /**
+ * This constructor creates and channel.
+ *
+ * @param ex The I/O executor that the channel will use, by default, to
+ * dispatch handlers for any asynchronous operations performed on the channel.
+ *
+ * @param max_buffer_size The maximum number of messages that may be buffered
+ * in the channel.
+ */
+ basic_concurrent_channel(const executor_type& ex,
+ std::size_t max_buffer_size = 0)
+ : service_(&asio::use_service<service_type>(
+ basic_concurrent_channel::get_context(ex))),
+ impl_(),
+ executor_(ex)
+ {
+ service_->construct(impl_, max_buffer_size);
+ }
+
+ /// Construct and open a basic_concurrent_channel.
+ /**
+ * This constructor creates and opens a channel.
+ *
+ * @param context An execution context which provides the I/O executor that
+ * the channel will use, by default, to dispatch handlers for any asynchronous
+ * operations performed on the channel.
+ *
+ * @param max_buffer_size The maximum number of messages that may be buffered
+ * in the channel.
+ */
+ template <typename ExecutionContext>
+ basic_concurrent_channel(ExecutionContext& context,
+ std::size_t max_buffer_size = 0,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : service_(&asio::use_service<service_type>(context)),
+ impl_(),
+ executor_(context.get_executor())
+ {
+ service_->construct(impl_, max_buffer_size);
+ }
+
+ /// Move-construct a basic_concurrent_channel from another.
+ /**
+ * This constructor moves a channel from one object to another.
+ *
+ * @param other The other basic_concurrent_channel object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_concurrent_channel(const executor_type&)
+ * constructor.
+ */
+ basic_concurrent_channel(basic_concurrent_channel&& other)
+ : service_(other.service_),
+ executor_(other.executor_)
+ {
+ service_->move_construct(impl_, other.impl_);
+ }
+
+ /// Move-assign a basic_concurrent_channel from another.
+ /**
+ * This assignment operator moves a channel from one object to another.
+ * Cancels any outstanding asynchronous operations associated with the target
+ * object.
+ *
+ * @param other The other basic_concurrent_channel object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_concurrent_channel(const executor_type&)
+ * constructor.
+ */
+ basic_concurrent_channel& operator=(basic_concurrent_channel&& other)
+ {
+ if (this != &other)
+ {
+ service_->move_assign(impl_, *other.service_, other.impl_);
+ executor_.~executor_type();
+ new (&executor_) executor_type(other.executor_);
+ service_ = other.service_;
+ }
+ return *this;
+ }
+
+ // All channels have access to each other's implementations.
+ template <typename, typename, typename...>
+ friend class basic_concurrent_channel;
+
+ /// Move-construct a basic_concurrent_channel from another.
+ /**
+ * This constructor moves a channel from one object to another.
+ *
+ * @param other The other basic_concurrent_channel object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_concurrent_channel(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_concurrent_channel(
+ basic_concurrent_channel<Executor1, Traits, Signatures...>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value
+ > = 0)
+ : service_(other.service_),
+ executor_(other.executor_)
+ {
+ service_->move_construct(impl_, other.impl_);
+ }
+
+ /// Move-assign a basic_concurrent_channel from another.
+ /**
+ * This assignment operator moves a channel from one object to another.
+ * Cancels any outstanding asynchronous operations associated with the target
+ * object.
+ *
+ * @param other The other basic_concurrent_channel object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_concurrent_channel(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_concurrent_channel&
+ > operator=(
+ basic_concurrent_channel<Executor1, Traits, Signatures...>&& other)
+ {
+ if (this != &other)
+ {
+ service_->move_assign(impl_, *other.service_, other.impl_);
+ executor_.~executor_type();
+ new (&executor_) executor_type(other.executor_);
+ service_ = other.service_;
+ }
+ return *this;
+ }
+
+ /// Destructor.
+ ~basic_concurrent_channel()
+ {
+ service_->destroy(impl_);
+ }
+
+ /// Get the executor associated with the object.
+ const executor_type& get_executor() noexcept
+ {
+ return executor_;
+ }
+
+ /// Get the capacity of the channel's buffer.
+ std::size_t capacity() noexcept
+ {
+ return service_->capacity(impl_);
+ }
+
+ /// Determine whether the channel is open.
+ bool is_open() const noexcept
+ {
+ return service_->is_open(impl_);
+ }
+
+ /// Reset the channel to its initial state.
+ void reset()
+ {
+ service_->reset(impl_);
+ }
+
+ /// Close the channel.
+ void close()
+ {
+ service_->close(impl_);
+ }
+
+ /// Cancel all asynchronous operations waiting on the channel.
+ /**
+ * All outstanding send operations will complete with the error
+ * @c asio::experimental::error::channel_cancelled. Outstanding receive
+ * operations complete with the result as determined by the channel traits.
+ */
+ void cancel()
+ {
+ service_->cancel(impl_);
+ }
+
+ /// Determine whether a message can be received without blocking.
+ bool ready() const noexcept
+ {
+ return service_->ready(impl_);
+ }
+
+#if defined(GENERATING_DOCUMENTATION)
+
+ /// Try to send a message without blocking.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename... Args>
+ bool try_send(Args&&... args);
+
+ /// Try to send a message without blocking, using dispatch semantics to call
+ /// the receive operation's completion handler.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * The receive operation's completion handler may be called from inside this
+ * function.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename... Args>
+ bool try_send_via_dispatch(Args&&... args);
+
+ /// Try to send a number of messages without blocking.
+ /**
+ * @returns The number of messages that were sent.
+ */
+ template <typename... Args>
+ std::size_t try_send_n(std::size_t count, Args&&... args);
+
+ /// Try to send a number of messages without blocking, using dispatch
+ /// semantics to call the receive operations' completion handlers.
+ /**
+ * The receive operations' completion handlers may be called from inside this
+ * function.
+ *
+ * @returns The number of messages that were sent.
+ */
+ template <typename... Args>
+ std::size_t try_send_n_via_dispatch(std::size_t count, Args&&... args);
+
+ /// Asynchronously send a message.
+ template <typename... Args,
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ CompletionToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
+ auto async_send(Args&&... args,
+ CompletionToken&& token);
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+ /// Try to receive a message without blocking.
+ /**
+ * Fails if the buffer is full and there are no waiting receive operations.
+ *
+ * @returns @c true on success, @c false on failure.
+ */
+ template <typename Handler>
+ bool try_receive(Handler&& handler)
+ {
+ return service_->try_receive(impl_, static_cast<Handler&&>(handler));
+ }
+
+ /// Asynchronously receive a message.
+ template <typename CompletionToken
+ ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
+ auto async_receive(
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(Executor))
+#if !defined(GENERATING_DOCUMENTATION)
+ -> decltype(
+ this->do_async_receive(static_cast<payload_type*>(0),
+ static_cast<CompletionToken&&>(token)))
+#endif // !defined(GENERATING_DOCUMENTATION)
+ {
+ return this->do_async_receive(static_cast<payload_type*>(0),
+ static_cast<CompletionToken&&>(token));
+ }
+
+private:
+ // Disallow copying and assignment.
+ basic_concurrent_channel(
+ const basic_concurrent_channel&) = delete;
+ basic_concurrent_channel& operator=(
+ const basic_concurrent_channel&) = delete;
+
+ template <typename, typename, typename...>
+ friend class detail::channel_send_functions;
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<execution::is_executor<T>::value>* = 0)
+ {
+ return asio::query(t, execution::context);
+ }
+
+ // Helper function to get an executor's context.
+ template <typename T>
+ static execution_context& get_context(const T& t,
+ enable_if_t<!execution::is_executor<T>::value>* = 0)
+ {
+ return t.context();
+ }
+
+ class initiate_async_send
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_send(basic_concurrent_channel* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename SendHandler>
+ void operator()(SendHandler&& handler,
+ payload_type&& payload) const
+ {
+ asio::detail::non_const_lvalue<SendHandler> handler2(handler);
+ self_->service_->async_send(self_->impl_,
+ static_cast<payload_type&&>(payload),
+ handler2.value, self_->get_executor());
+ }
+
+ private:
+ basic_concurrent_channel* self_;
+ };
+
+ class initiate_async_receive
+ {
+ public:
+ typedef Executor executor_type;
+
+ explicit initiate_async_receive(basic_concurrent_channel* self)
+ : self_(self)
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return self_->get_executor();
+ }
+
+ template <typename ReceiveHandler>
+ void operator()(ReceiveHandler&& handler) const
+ {
+ asio::detail::non_const_lvalue<ReceiveHandler> handler2(handler);
+ self_->service_->async_receive(self_->impl_,
+ handler2.value, self_->get_executor());
+ }
+
+ private:
+ basic_concurrent_channel* self_;
+ };
+
+ // The service associated with the I/O object.
+ service_type* service_;
+
+ // The underlying implementation of the I/O object.
+ typename service_type::template implementation_type<
+ Traits, Signatures...> impl_;
+
+ // The associated executor.
+ Executor executor_;
+};
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_BASIC_CONCURRENT_CHANNEL_HPP
diff --git a/3rdparty/asio/include/asio/experimental/cancellation_condition.hpp b/3rdparty/asio/include/asio/experimental/cancellation_condition.hpp
index 586e75e2857..6b1b46dd759 100644
--- a/3rdparty/asio/include/asio/experimental/cancellation_condition.hpp
+++ b/3rdparty/asio/include/asio/experimental/cancellation_condition.hpp
@@ -2,7 +2,7 @@
// experimental/cancellation_condition.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -31,8 +31,7 @@ class wait_for_all
{
public:
template <typename... Args>
- ASIO_CONSTEXPR cancellation_type_t operator()(
- Args&&...) const ASIO_NOEXCEPT
+ constexpr cancellation_type_t operator()(Args&&...) const noexcept
{
return cancellation_type::none;
}
@@ -42,15 +41,14 @@ public:
class wait_for_one
{
public:
- ASIO_CONSTEXPR explicit wait_for_one(
+ constexpr explicit wait_for_one(
cancellation_type_t cancel_type = cancellation_type::all)
: cancel_type_(cancel_type)
{
}
template <typename... Args>
- ASIO_CONSTEXPR cancellation_type_t operator()(
- Args&&...) const ASIO_NOEXCEPT
+ constexpr cancellation_type_t operator()(Args&&...) const noexcept
{
return cancel_type_;
}
@@ -67,34 +65,34 @@ private:
class wait_for_one_success
{
public:
- ASIO_CONSTEXPR explicit wait_for_one_success(
+ constexpr explicit wait_for_one_success(
cancellation_type_t cancel_type = cancellation_type::all)
: cancel_type_(cancel_type)
{
}
- ASIO_CONSTEXPR cancellation_type_t
- operator()() const ASIO_NOEXCEPT
+ constexpr cancellation_type_t
+ operator()() const noexcept
{
return cancel_type_;
}
template <typename E, typename... Args>
- ASIO_CONSTEXPR typename constraint<
- !is_same<typename decay<E>::type, asio::error_code>::value
- && !is_same<typename decay<E>::type, std::exception_ptr>::value,
+ constexpr constraint_t<
+ !is_same<decay_t<E>, asio::error_code>::value
+ && !is_same<decay_t<E>, std::exception_ptr>::value,
cancellation_type_t
- >::type operator()(const E&, Args&&...) const ASIO_NOEXCEPT
+ > operator()(const E&, Args&&...) const noexcept
{
return cancel_type_;
}
template <typename E, typename... Args>
- ASIO_CONSTEXPR typename constraint<
- is_same<typename decay<E>::type, asio::error_code>::value
- || is_same<typename decay<E>::type, std::exception_ptr>::value,
+ constexpr constraint_t<
+ is_same<decay_t<E>, asio::error_code>::value
+ || is_same<decay_t<E>, std::exception_ptr>::value,
cancellation_type_t
- >::type operator()(const E& e, Args&&...) const ASIO_NOEXCEPT
+ > operator()(const E& e, Args&&...) const noexcept
{
return !!e ? cancellation_type::none : cancel_type_;
}
@@ -111,34 +109,33 @@ private:
class wait_for_one_error
{
public:
- ASIO_CONSTEXPR explicit wait_for_one_error(
+ constexpr explicit wait_for_one_error(
cancellation_type_t cancel_type = cancellation_type::all)
: cancel_type_(cancel_type)
{
}
- ASIO_CONSTEXPR cancellation_type_t
- operator()() const ASIO_NOEXCEPT
+ constexpr cancellation_type_t operator()() const noexcept
{
return cancellation_type::none;
}
template <typename E, typename... Args>
- ASIO_CONSTEXPR typename constraint<
- !is_same<typename decay<E>::type, asio::error_code>::value
- && !is_same<typename decay<E>::type, std::exception_ptr>::value,
+ constexpr constraint_t<
+ !is_same<decay_t<E>, asio::error_code>::value
+ && !is_same<decay_t<E>, std::exception_ptr>::value,
cancellation_type_t
- >::type operator()(const E&, Args&&...) const ASIO_NOEXCEPT
+ > operator()(const E&, Args&&...) const noexcept
{
return cancellation_type::none;
}
template <typename E, typename... Args>
- ASIO_CONSTEXPR typename constraint<
- is_same<typename decay<E>::type, asio::error_code>::value
- || is_same<typename decay<E>::type, std::exception_ptr>::value,
+ constexpr constraint_t<
+ is_same<decay_t<E>, asio::error_code>::value
+ || is_same<decay_t<E>, std::exception_ptr>::value,
cancellation_type_t
- >::type operator()(const E& e, Args&&...) const ASIO_NOEXCEPT
+ > operator()(const E& e, Args&&...) const noexcept
{
return !!e ? cancel_type_ : cancellation_type::none;
}
diff --git a/3rdparty/asio/include/asio/experimental/channel.hpp b/3rdparty/asio/include/asio/experimental/channel.hpp
new file mode 100644
index 00000000000..c808bb4aafd
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/channel.hpp
@@ -0,0 +1,70 @@
+//
+// experimental/channel.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 ASIO_EXPERIMENTAL_CHANNEL_HPP
+#define ASIO_EXPERIMENTAL_CHANNEL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_executor.hpp"
+#include "asio/experimental/basic_channel.hpp"
+#include "asio/experimental/channel_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename ExecutorOrSignature, typename = void>
+struct channel_type
+{
+ template <typename... Signatures>
+ struct inner
+ {
+ typedef basic_channel<any_io_executor, channel_traits<>,
+ ExecutorOrSignature, Signatures...> type;
+ };
+};
+
+template <typename ExecutorOrSignature>
+struct channel_type<ExecutorOrSignature,
+ enable_if_t<
+ is_executor<ExecutorOrSignature>::value
+ || execution::is_executor<ExecutorOrSignature>::value
+ >>
+{
+ template <typename... Signatures>
+ struct inner
+ {
+ typedef basic_channel<ExecutorOrSignature,
+ channel_traits<>, Signatures...> type;
+ };
+};
+
+} // namespace detail
+
+/// Template type alias for common use of channel.
+template <typename ExecutorOrSignature, typename... Signatures>
+using channel = typename detail::channel_type<
+ ExecutorOrSignature>::template inner<Signatures...>::type;
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_CHANNEL_HPP
diff --git a/3rdparty/asio/include/asio/experimental/channel_error.hpp b/3rdparty/asio/include/asio/experimental/channel_error.hpp
new file mode 100644
index 00000000000..dd419757cc3
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/channel_error.hpp
@@ -0,0 +1,82 @@
+//
+// experimental/channel_error.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 ASIO_EXPERIMENTAL_CHANNEL_ERROR_HPP
+#define ASIO_EXPERIMENTAL_CHANNEL_ERROR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/error_code.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace error {
+
+enum channel_errors
+{
+ /// The channel was closed.
+ channel_closed = 1,
+
+ /// The channel was cancelled.
+ channel_cancelled = 2
+};
+
+extern ASIO_DECL
+const asio::error_category& get_channel_category();
+
+static const asio::error_category&
+ channel_category ASIO_UNUSED_VARIABLE
+ = asio::experimental::error::get_channel_category();
+
+} // namespace error
+namespace channel_errc {
+ // Simulates a scoped enum.
+ using error::channel_closed;
+ using error::channel_cancelled;
+} // namespace channel_errc
+} // namespace experimental
+} // namespace asio
+
+namespace std {
+
+template<> struct is_error_code_enum<
+ asio::experimental::error::channel_errors>
+{
+ static const bool value = true;
+};
+
+} // namespace std
+
+namespace asio {
+namespace experimental {
+namespace error {
+
+inline asio::error_code make_error_code(channel_errors e)
+{
+ return asio::error_code(
+ static_cast<int>(e), get_channel_category());
+}
+
+} // namespace error
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/experimental/impl/channel_error.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // ASIO_EXPERIMENTAL_CHANNEL_ERROR_HPP
diff --git a/3rdparty/asio/include/asio/experimental/channel_traits.hpp b/3rdparty/asio/include/asio/experimental/channel_traits.hpp
new file mode 100644
index 00000000000..bccff9876e4
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/channel_traits.hpp
@@ -0,0 +1,301 @@
+//
+// experimental/channel_traits.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 ASIO_EXPERIMENTAL_CHANNEL_TRAITS_HPP
+#define ASIO_EXPERIMENTAL_CHANNEL_TRAITS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <deque>
+#include "asio/detail/type_traits.hpp"
+#include "asio/error.hpp"
+#include "asio/experimental/channel_error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+#if defined(GENERATING_DOCUMENTATION)
+
+template <typename... Signatures>
+struct channel_traits
+{
+ /// Rebind the traits to a new set of signatures.
+ /**
+ * This nested structure must have a single nested type @c other that
+ * aliases a traits type with the specified set of signatures.
+ */
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef user_defined other;
+ };
+
+ /// Determine the container for the specified elements.
+ /**
+ * This nested structure must have a single nested type @c other that
+ * aliases a container type for the specified element type.
+ */
+ template <typename Element>
+ struct container
+ {
+ typedef user_defined type;
+ };
+
+ /// The signature of a channel cancellation notification.
+ typedef void receive_cancelled_signature(...);
+
+ /// Invoke the specified handler with a cancellation notification.
+ template <typename F>
+ static void invoke_receive_cancelled(F f);
+
+ /// The signature of a channel closed notification.
+ typedef void receive_closed_signature(...);
+
+ /// Invoke the specified handler with a closed notification.
+ template <typename F>
+ static void invoke_receive_closed(F f);
+};
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+/// Traits used for customising channel behaviour.
+template <typename... Signatures>
+struct channel_traits
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+};
+
+template <typename R>
+struct channel_traits<R(asio::error_code)>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(e);
+ }
+
+ typedef R receive_closed_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(e);
+ }
+};
+
+template <typename R, typename... Args, typename... Signatures>
+struct channel_traits<R(asio::error_code, Args...), Signatures...>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(asio::error_code, Args...);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(e, decay_t<Args>()...);
+ }
+
+ typedef R receive_closed_signature(asio::error_code, Args...);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(e, decay_t<Args>()...);
+ }
+};
+
+template <typename R>
+struct channel_traits<R(std::exception_ptr)>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(std::exception_ptr);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(
+ std::make_exception_ptr(asio::system_error(e)));
+ }
+
+ typedef R receive_closed_signature(std::exception_ptr);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(
+ std::make_exception_ptr(asio::system_error(e)));
+ }
+};
+
+template <typename R, typename... Args, typename... Signatures>
+struct channel_traits<R(std::exception_ptr, Args...), Signatures...>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(std::exception_ptr, Args...);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(
+ std::make_exception_ptr(asio::system_error(e)),
+ decay_t<Args>()...);
+ }
+
+ typedef R receive_closed_signature(std::exception_ptr, Args...);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(
+ std::make_exception_ptr(asio::system_error(e)),
+ decay_t<Args>()...);
+ }
+};
+
+template <typename R>
+struct channel_traits<R()>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(e);
+ }
+
+ typedef R receive_closed_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(e);
+ }
+};
+
+template <typename R, typename T>
+struct channel_traits<R(T)>
+{
+ template <typename... NewSignatures>
+ struct rebind
+ {
+ typedef channel_traits<NewSignatures...> other;
+ };
+
+ template <typename Element>
+ struct container
+ {
+ typedef std::deque<Element> type;
+ };
+
+ typedef R receive_cancelled_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_cancelled(F f)
+ {
+ const asio::error_code e = error::channel_cancelled;
+ static_cast<F&&>(f)(e);
+ }
+
+ typedef R receive_closed_signature(asio::error_code);
+
+ template <typename F>
+ static void invoke_receive_closed(F f)
+ {
+ const asio::error_code e = error::channel_closed;
+ static_cast<F&&>(f)(e);
+ }
+};
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_CHANNEL_TRAITS_HPP
diff --git a/3rdparty/asio/include/asio/experimental/co_composed.hpp b/3rdparty/asio/include/asio/experimental/co_composed.hpp
new file mode 100644
index 00000000000..dd1b82939cd
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/co_composed.hpp
@@ -0,0 +1,145 @@
+//
+// experimental/co_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 ASIO_EXPERIMENTAL_CO_COMPOSED_HPP
+#define ASIO_EXPERIMENTAL_CO_COMPOSED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/async_result.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+/// 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 asio::async_initiate<
+ * CompletionToken, void(std::error_code)>(
+ * asio::experimental::co_composed(
+ * [](auto state, tcp::socket& socket) -> void
+ * {
+ * state.reset_cancellation_state(
+ * asio::enable_terminal_cancellation());
+ *
+ * while (!state.cancelled())
+ * {
+ * char data[1024];
+ * auto [e1, n1] =
+ * co_await socket.async_read_some(
+ * asio::buffer(data),
+ * asio::as_tuple(asio::deferred));
+ *
+ * if (e1)
+ * co_yield state.complete(e1);
+ *
+ * if (!!state.cancelled())
+ * co_yield state.complete(
+ * make_error_code(asio::error::operation_aborted));
+ *
+ * auto [e2, n2] =
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n1),
+ * asio::as_tuple(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 asio::async_initiate<
+ * CompletionToken, void(std::error_code)>(
+ * asio::experimental::co_composed<
+ * void(std::error_code)>(
+ * [](auto state, tcp::socket& socket) -> void
+ * {
+ * try
+ * {
+ * state.throw_if_cancelled(true);
+ * state.reset_cancellation_state(
+ * asio::enable_terminal_cancellation());
+ *
+ * for (;;)
+ * {
+ * char data[1024];
+ * std::size_t n = co_await socket.async_read_some(
+ * asio::buffer(data), asio::deferred);
+ *
+ * co_await asio::async_write(socket,
+ * asio::buffer(data, n), asio::deferred);
+ * }
+ * }
+ * catch (const std::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
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/experimental/impl/co_composed.hpp"
+
+#endif // ASIO_EXPERIMENTAL_CO_COMPOSED_HPP
diff --git a/3rdparty/asio/include/asio/experimental/co_spawn.hpp b/3rdparty/asio/include/asio/experimental/co_spawn.hpp
new file mode 100644
index 00000000000..8ef59283178
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/co_spawn.hpp
@@ -0,0 +1,187 @@
+//
+// experimental/co_spawn.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_CO_SPAWN_HPP
+#define ASIO_EXPERIMENTAL_CO_SPAWN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <utility>
+#include "asio/compose.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/experimental/coro.hpp"
+#include "asio/experimental/deferred.hpp"
+#include "asio/experimental/prepend.hpp"
+#include "asio/redirect_error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename T, typename U, typename Executor>
+struct coro_spawn_op
+{
+ coro<T, U, Executor> c;
+
+ void operator()(auto& self)
+ {
+ auto op = c.async_resume(deferred);
+ std::move(op)((prepend)(std::move(self), 0));
+ }
+
+ void operator()(auto& self, int, auto... res)
+ {
+ self.complete(std::move(res)...);
+ }
+};
+
+} // namespace detail
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename T, typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr, T))
+co_spawn(coro<void, T, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void(std::exception_ptr, T)>(
+ detail::coro_spawn_op<void, T, Executor>{std::move(c)},
+ token, exec);
+}
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename T, typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr, T))
+co_spawn(coro<void(), T, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void(std::exception_ptr, T)>(
+ detail::coro_spawn_op<void(), T, Executor>{std::move(c)},
+ token, exec);
+}
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename T, typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void(T))
+co_spawn(coro<void() noexcept, T, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void(T)>(
+ detail::coro_spawn_op<void() noexcept, T, Executor>{std::move(c)},
+ token, exec);
+}
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr))
+co_spawn(coro<void, void, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void(std::exception_ptr)>(
+ detail::coro_spawn_op<void, void, Executor>{std::move(c)},
+ token, exec);
+}
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(std::exception_ptr))
+co_spawn(coro<void(), void, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void(std::exception_ptr)>(
+ detail::coro_spawn_op<void(), void, Executor>{std::move(c)},
+ token, exec);
+}
+
+/// Spawn a resumable coroutine.
+/**
+ * This function spawns the coroutine for execution on its executor. It binds
+ * the lifetime of the coroutine to the executor.
+ *
+ * @param c The coroutine
+ *
+ * @param token The completion token
+ *
+ * @returns Implementation defined
+ */
+template <typename Executor, typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void())
+co_spawn(coro<void() noexcept, void, Executor> c, CompletionToken&& token)
+{
+ auto exec = c.get_executor();
+ return async_compose<CompletionToken, void()>(
+ detail::coro_spawn_op<void() noexcept, void, Executor>{std::move(c)},
+ token, exec);
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif //ASIO_EXPERIMENTAL_CO_SPAWN_HPP
diff --git a/3rdparty/asio/include/asio/experimental/concurrent_channel.hpp b/3rdparty/asio/include/asio/experimental/concurrent_channel.hpp
new file mode 100644
index 00000000000..b326be96d31
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/concurrent_channel.hpp
@@ -0,0 +1,70 @@
+//
+// experimental/concurrent_channel.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 ASIO_EXPERIMENTAL_CONCURRENT_CHANNEL_HPP
+#define ASIO_EXPERIMENTAL_CONCURRENT_CHANNEL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/is_executor.hpp"
+#include "asio/experimental/basic_concurrent_channel.hpp"
+#include "asio/experimental/channel_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename ExecutorOrSignature, typename = void>
+struct concurrent_channel_type
+{
+ template <typename... Signatures>
+ struct inner
+ {
+ typedef basic_concurrent_channel<any_io_executor, channel_traits<>,
+ ExecutorOrSignature, Signatures...> type;
+ };
+};
+
+template <typename ExecutorOrSignature>
+struct concurrent_channel_type<ExecutorOrSignature,
+ enable_if_t<
+ is_executor<ExecutorOrSignature>::value
+ || execution::is_executor<ExecutorOrSignature>::value
+ >>
+{
+ template <typename... Signatures>
+ struct inner
+ {
+ typedef basic_concurrent_channel<ExecutorOrSignature,
+ channel_traits<>, Signatures...> type;
+ };
+};
+
+} // namespace detail
+
+/// Template type alias for common use of channel.
+template <typename ExecutorOrSignature, typename... Signatures>
+using concurrent_channel = typename detail::concurrent_channel_type<
+ ExecutorOrSignature>::template inner<Signatures...>::type;
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_CONCURRENT_CHANNEL_HPP
diff --git a/3rdparty/asio/include/asio/experimental/coro.hpp b/3rdparty/asio/include/asio/experimental/coro.hpp
index fb2ad013a52..de909d29a6b 100644
--- a/3rdparty/asio/include/asio/experimental/coro.hpp
+++ b/3rdparty/asio/include/asio/experimental/coro.hpp
@@ -2,8 +2,8 @@
// experimental/coro.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -12,236 +12,105 @@
#ifndef ASIO_EXPERIMENTAL_CORO_HPP
#define ASIO_EXPERIMENTAL_CORO_HPP
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
#include "asio/detail/config.hpp"
#include "asio/dispatch.hpp"
-#include "asio/experimental/detail/coro_promise_allocator.hpp"
-#include "asio/experimental/detail/partial_promise.hpp"
-#include "asio/experimental/detail/coro_traits.hpp"
#include "asio/error.hpp"
#include "asio/error_code.hpp"
-#include "asio/experimental/use_coro.hpp"
+#include "asio/experimental/coro_traits.hpp"
+#include "asio/experimental/detail/coro_promise_allocator.hpp"
+#include "asio/experimental/detail/partial_promise.hpp"
#include "asio/post.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace experimental {
-
-template <typename Yield, typename Return, typename Executor>
-struct coro;
-
namespace detail {
-template <typename Signature, typename Return, typename Executor>
+template <typename Signature, typename Return,
+ typename Executor, typename Allocator>
struct coro_promise;
-template <typename T>
-struct is_noexcept : std::false_type
-{
-};
-
-template <typename Return, typename... Args>
-struct is_noexcept<Return(Args...)> : std::false_type
-{
-};
-
-template <typename Return, typename... Args>
-struct is_noexcept<Return(Args...) noexcept> : std::true_type
-{
-};
-
-template <typename T>
-constexpr bool is_noexcept_v = is_noexcept<T>::value;
-
-template <typename T>
-struct coro_error;
-
-template <>
-struct coro_error<asio::error_code>
-{
- static asio::error_code invalid()
- {
- return error::fault;
- }
-
- static asio::error_code cancelled()
- {
- return error::operation_aborted;
- }
-
- static asio::error_code interrupted()
- {
- return error::interrupted;
- }
-
- static asio::error_code done()
- {
- return error::broken_pipe;
- }
-};
-
-template <>
-struct coro_error<std::exception_ptr>
-{
- static std::exception_ptr invalid()
- {
- return std::make_exception_ptr(
- asio::system_error(
- coro_error<asio::error_code>::invalid()));
- }
-
- static std::exception_ptr cancelled()
- {
- return std::make_exception_ptr(
- asio::system_error(
- coro_error<asio::error_code>::cancelled()));
- }
-
- static std::exception_ptr interrupted()
- {
- return std::make_exception_ptr(
- asio::system_error(
- coro_error<asio::error_code>::interrupted()));
- }
-
- static std::exception_ptr done()
- {
- return std::make_exception_ptr(
- asio::system_error(
- coro_error<asio::error_code>::done()));
- }
-};
-
-template <typename T, typename Coroutine, typename = void>
-struct coro_with_arg
-{
- using coro_t = Coroutine;
- T value;
- coro_t& coro;
-
- struct awaitable_t
- {
- T value;
- coro_t& coro;
-
- constexpr static bool await_ready() { return false; }
-
- template <typename Y, typename R, typename E>
- auto await_suspend(coroutine_handle<coro_promise<Y, R, E>> h)
- -> coroutine_handle<>
- {
- auto& hp = h.promise();
- if (hp.get_executor() == coro.get_executor())
- {
- coro.coro_->awaited_from = h;
- coro.coro_->reset_error();
- coro.coro_->input_ = std::move(value);
- struct cancel_handler
- {
- cancel_handler(coro_t& coro) : coro(coro.coro_) {}
-
- typename coro_t::promise_type* coro;
-
- void operator()(cancellation_type ct)
- {
- coro->cancel.signal.emit(ct);
- }
- };
-
- hp.cancel.state.slot().template emplace<cancel_handler>(coro);
- return coro.coro_->get_handle();
- } else
- {
- coro.coro_->awaited_from =
- dispatch_coroutine(hp.get_executor(), [h]() mutable
- { h.resume(); });
- coro.coro_->reset_error();
- coro.coro_->input_ = std::move(value);
-
- struct cancel_handler
- {
- cancel_handler(E e, coro_t& coro) : e(e), coro(coro.coro_) {}
-
- E e;
- typename coro_t::promise_type* coro;
-
- void operator()(cancellation_type ct)
- {
- asio::dispatch(e,
- [ct, p = coro]() mutable
- {
- p->cancel.signal.emit(ct);
- });
- }
- };
-
- hp.cancel.state.slot().template emplace<cancel_handler>(
- coro.get_executor(), coro);
-
- return dispatch_coroutine(
- hp.get_executor(), [h]() mutable { h.resume(); });
- }
-
- }
-
- auto await_resume() -> typename coro_t::result_type
- {
- coro.coro_->cancel.state.slot().clear();
- coro.coro_->rethrow_if();
- return std::move(coro.coro_->result_);
- }
- };
-
- template <typename CompletionToken>
- auto async_resume(CompletionToken&& token) &&
- {
- return coro.async_resume(std::move(value),
- std::forward<CompletionToken>(token));
- }
-
- auto operator co_await() &&
- {
- return awaitable_t{std::move(value), coro};
- }
-};
+template <typename T, typename Coroutine>
+struct coro_with_arg;
} // namespace detail
+/// The main type of a resumable coroutine.
+/**
+ * Template parameter @c Yield specifies type or signature used by co_yield,
+ * @c Return specifies the type used for co_return, and @c Executor specifies
+ * the underlying executor type.
+ */
template <typename Yield = void, typename Return = void,
- typename Executor = any_io_executor>
+ typename Executor = any_io_executor,
+ typename Allocator = std::allocator<void>>
struct coro
{
- using traits = detail::coro_traits<Yield, Return, Executor>;
+ /// The traits of the coroutine. See asio::experimental::coro_traits
+ /// for details.
+ using traits = coro_traits<Yield, Return, Executor>;
+ /// The value that can be passed into a symmetrical cororoutine. @c void if
+ /// asymmetrical.
using input_type = typename traits::input_type;
+
+ /// The type that can be passed out through a co_yield.
using yield_type = typename traits::yield_type;
+
+ /// The type that can be passed out through a co_return.
using return_type = typename traits::return_type;
- using error_type = typename traits::error_type;
+
+ /// The type received by a co_await or async_resume. Its a combination of
+ /// yield and return.
using result_type = typename traits::result_type;
+
+ /// The signature used by the async_resume.
+ using signature_type = typename traits::signature_type;
+
+ /// Whether or not the coroutine is noexcept.
constexpr static bool is_noexcept = traits::is_noexcept;
- using promise_type = detail::coro_promise<Yield, Return, Executor>;
+ /// The error type of the coroutine. Void for noexcept
+ using error_type = typename traits::error_type;
+
+ /// Completion handler type used by async_resume.
+ using completion_handler = typename traits::completion_handler;
+
+ /// The internal promise-type of the coroutine.
+ using promise_type = detail::coro_promise<Yield, Return, Executor, Allocator>;
#if !defined(GENERATING_DOCUMENTATION)
- template <typename T, typename Coroutine, typename>
+ template <typename T, typename Coroutine>
friend struct detail::coro_with_arg;
#endif // !defined(GENERATING_DOCUMENTATION)
+ /// The executor type.
using executor_type = Executor;
+ /// The allocator type.
+ using allocator_type = Allocator;
+
#if !defined(GENERATING_DOCUMENTATION)
- friend struct detail::coro_promise<Yield, Return, Executor>;
+ friend struct detail::coro_promise<Yield, Return, Executor, Allocator>;
#endif // !defined(GENERATING_DOCUMENTATION)
+ /// The default constructor, gives an invalid coroutine.
coro() = default;
+ /// Move constructor.
coro(coro&& lhs) noexcept
: coro_(std::exchange(lhs.coro_, nullptr))
{
}
- coro(const coro &) = delete;
+ coro(const coro&) = delete;
+ /// Move assignment.
coro& operator=(coro&& lhs) noexcept
{
std::swap(coro_, lhs.coro_);
@@ -250,6 +119,12 @@ struct coro
coro& operator=(const coro&) = delete;
+ /// Destructor. Destroys the coroutine, if it holds a valid one.
+ /**
+ * @note This does not cancel an active coroutine. Destructing a resumable
+ * coroutine, i.e. one with a call to async_resume that has not completed, is
+ * undefined behaviour.
+ */
~coro()
{
if (coro_ != nullptr)
@@ -260,8 +135,7 @@ struct coro
destroyer(const detail::coroutine_handle<promise_type>& handle)
: handle(handle)
- {
- }
+ { }
destroyer(destroyer&& lhs)
: handle(std::exchange(lhs.handle, nullptr))
@@ -286,6 +160,7 @@ struct coro
}
}
+ /// Get the used executor.
executor_type get_executor() const
{
if (coro_)
@@ -297,29 +172,74 @@ struct coro
throw std::logic_error("Coroutine has no executor");
}
+ /// Get the used allocator.
+ allocator_type get_allocator() const
+ {
+ if (coro_)
+ return coro_->get_allocator();
+
+ if constexpr (std::is_default_constructible_v<Allocator>)
+ return Allocator{};
+ else
+ throw std::logic_error(
+ "Coroutine has no available allocator without a constructed promise");
+ }
+
+ /// Resume the coroutine.
+ /**
+ * @param token The completion token of the async resume.
+ *
+ * @attention Calling an invalid coroutine with a noexcept signature is
+ * undefined behaviour.
+ *
+ * @note This overload is only available for coroutines without an input
+ * value.
+ */
template <typename CompletionToken>
requires std::is_void_v<input_type>
- auto async_resume(CompletionToken&& token)
+ auto async_resume(CompletionToken&& token) &
{
return async_initiate<CompletionToken,
typename traits::completion_handler>(
initiate_async_resume(this), token);
}
-
+ /// Resume the coroutine.
+ /**
+ * @param token The completion token of the async resume.
+ *
+ * @attention Calling an invalid coroutine with a noexcept signature is
+ * undefined behaviour.
+ *
+ * @note This overload is only available for coroutines with an input value.
+ */
template <typename CompletionToken, detail::convertible_to<input_type> T>
- auto async_resume(T&& ip, CompletionToken&& token)
+ auto async_resume(T&& ip, CompletionToken&& token) &
{
return async_initiate<CompletionToken,
typename traits::completion_handler>(
initiate_async_resume(this), token, std::forward<T>(ip));
}
+ /// Operator used for coroutines without input value.
auto operator co_await() requires (std::is_void_v<input_type>)
{
return awaitable_t{*this};
}
+ /// Operator used for coroutines with input value.
+ /**
+ * @param ip The input value
+ *
+ * @returns An awaitable handle.
+ *
+ * @code
+ * coro<void> push_values(coro<double(int)> c)
+ * {
+ * std::optional<double> res = co_await c(42);
+ * }
+ * @endcode
+ */
template <detail::convertible_to<input_type> T>
auto operator()(T&& ip)
{
@@ -327,6 +247,7 @@ struct coro
std::forward<T>(ip), *this};
}
+ /// Check whether the coroutine is open, i.e. can be resumed.
bool is_open() const
{
if (coro_)
@@ -339,717 +260,34 @@ struct coro
return false;
}
+ /// Check whether the coroutine is open, i.e. can be resumed.
explicit operator bool() const { return is_open(); }
- void cancel(cancellation_type ct = cancellation_type::all)
- {
- if (is_open() && !coro_->cancel.state.cancelled())
- asio::dispatch(get_executor(),
- [ct, coro = coro_] { coro->cancel.signal.emit(ct); });
- }
-
private:
- struct awaitable_t
- {
- coro& coro_;
-
- constexpr static bool await_ready() { return false; }
-
- template <typename Y, typename R, typename E>
- auto await_suspend(
- detail::coroutine_handle<detail::coro_promise<Y, R, E>> h)
- -> detail::coroutine_handle<>
- {
- auto& hp = h.promise();
- if (hp.get_executor() == coro_.get_executor())
- {
- coro_.coro_->awaited_from = h;
- coro_.coro_->reset_error();
-
- struct cancel_handler
- {
- cancel_handler(coro& coro_) : coro_(coro_.coro_) {}
-
- typename coro::promise_type* coro_;
+ struct awaitable_t;
- void operator()(cancellation_type ct)
- {
- coro_->cancel.signal.emit(ct);
- }
- };
-
- hp.cancel.state.slot().template emplace<cancel_handler>(coro_);
- return coro_.coro_->get_handle();
- }
- else
- {
- coro_.coro_->awaited_from = detail::dispatch_coroutine(
- hp.get_executor(), [h]() mutable { h.resume(); });
- coro_.coro_->reset_error();
-
- struct cancel_handler
- {
- cancel_handler(E e, coro& coro) : e(e), coro_(coro.coro_) {}
-
- E e;
- typename coro::promise_type* coro_;
-
- void operator()(cancellation_type ct)
- {
- asio::dispatch(e,
- [ct, p = coro_]() mutable
- {
- p->cancel.signal.emit(ct);
- });
- }
- };
-
- hp.cancel.state.slot().template emplace<cancel_handler>(
- coro_.get_executor(), coro_);
-
- return detail::dispatch_coroutine(
- hp.get_executor(), [h]() mutable { h.resume(); });
- }
- }
-
- auto await_resume() -> result_type
- {
- coro_.coro_->cancel.state.slot().clear();
- coro_.coro_->rethrow_if();
- if constexpr (!std::is_void_v<result_type>)
- return std::move(coro_.coro_->result_);
- }
- };
-
- class initiate_async_resume
- {
- public:
- typedef Executor executor_type;
-
- explicit initiate_async_resume(coro* self)
- : self_(self)
- {
- }
-
- executor_type get_executor() const noexcept
- {
- return self_->get_executor();
- }
-
- template <typename E, typename WaitHandler>
- auto handle(E exec, WaitHandler&& handler,
- std::true_type /* error is noexcept */,
- std::true_type /* result is void */) const //noexcept
- {
- return [self = self_,
- h = std::forward<WaitHandler>(handler),
- exec = std::move(exec)]() mutable
- {
- assert(self);
- auto ch =
- detail::coroutine_handle<promise_type>::from_promise(*self->coro_);
- assert(ch && !ch.done());
- assert(self->coro_->awaited_from == detail::noop_coroutine());
-
- self->coro_->awaited_from =
- post_coroutine(std::move(exec), std::move(h));
- self->coro_->reset_error();
- ch.resume();
- };
- }
-
- template <typename E, typename WaitHandler>
- requires (!std::is_void_v<result_type>)
- auto handle(E exec, WaitHandler&& handler,
- std::true_type /* error is noexcept */,
- std::false_type /* result is void */) const //noexcept
- {
- return [self = self_,
- h = std::forward<WaitHandler>(handler),
- exec = std::move(exec)]() mutable
- {
- assert(self);
-
- auto ch =
- detail::coroutine_handle<promise_type>::from_promise(*self->coro_);
- assert(ch && !ch.done());
- assert(self->coro_->awaited_from == detail::noop_coroutine());
-
- self->coro_->awaited_from =
- detail::post_coroutine(exec,
- [self, h = std::move(h)]() mutable
- {
- std::move(h)(std::move(self->coro_->result_));
- });
- self->coro_->reset_error();
- ch.resume();
- };
- }
-
- template <typename E, typename WaitHandler>
- auto handle(E exec, WaitHandler&& handler,
- std::false_type /* error is noexcept */,
- std::true_type /* result is void */) const
- {
- return [self = self_,
- h = std::forward<WaitHandler>(handler),
- exec = std::move(exec)]() mutable
- {
- if (!self)
- {
- asio::post(exec,
- [h = std::move(h)]() mutable
- {
- h(detail::coro_error<error_type>::invalid());
- });
- return;
- }
-
- auto ch =
- detail::coroutine_handle<promise_type>::from_promise(*self->coro_);
- if (!ch)
- {
- asio::post(exec,
- [h = std::move(h)]() mutable
- {
- h(detail::coro_error<error_type>::invalid());
- });
- }
- else if (ch.done())
- {
- asio::post(exec,
- [h = std::move(h)]() mutable
- {
- h(detail::coro_error<error_type>::done());
- });
- }
- else
- {
- assert(self->coro_->awaited_from == detail::noop_coroutine());
- self->coro_->awaited_from =
- detail::post_coroutine(exec,
- [self, h = std::move(h)]() mutable
- {
- std::move(h)(std::move(self->coro_->error_));
- });
- self->coro_->reset_error();
- ch.resume();
- }
- };
- }
-
- template <typename E, typename WaitHandler>
- auto handle(E exec, WaitHandler&& handler,
- std::false_type /* error is noexcept */,
- std::false_type /* result is void */) const
- {
- return [self = self_, h = std::forward<WaitHandler>(handler),
- exec = std::move(exec)]() mutable
- {
- if (!self)
- {
- asio::post(exec,
- [h = std::move(h)]() mutable
- {
- h(detail::coro_error<error_type>::invalid(), result_type{});
- });
- return;
- }
-
- auto ch =
- detail::coroutine_handle<promise_type>::from_promise(*self->coro_);
- if (!ch)
- {
- asio::post(exec,
- [h = std::move(h)]() mutable
- {
- h(detail::coro_error<error_type>::invalid(), result_type{});
- });
- }
- else if (ch.done())
- {
- asio::post(exec,
- [h = std::move(h)]() mutable
- {
- h(detail::coro_error<error_type>::done(), result_type{});
- });
- }
- else
- {
- assert(self->coro_->awaited_from == detail::noop_coroutine());
- self->coro_->awaited_from =
- detail::post_coroutine(exec,
- [h = std::move(h), self]() mutable
- {
- std::move(h)(std::move(self->coro_->error_),
- std::move(self->coro_->result_));
- });
- self->coro_->reset_error();
- ch.resume();
- }
- };
- }
-
- struct cancel_handler
- {
- promise_type* coro;
-
- cancel_handler(promise_type* coro) : coro(coro) {}
-
- void operator()(cancellation_type ct)
- {
- asio::dispatch(coro->get_executor(),
- [ct, k = coro] { k->cancel.signal.emit(ct); });
- }
- };
-
- template <typename WaitHandler>
- void operator()(WaitHandler&& handler) const
- {
- const auto exec =
- asio::prefer(
- get_associated_executor(handler, get_executor()),
- execution::outstanding_work.tracked);
-
- using cancel_t = decltype(self_->coro_->cancel);
- self_->coro_->cancel.~cancel_t();
- new(&self_->coro_->cancel) cancel_t();
-
- auto cancel = get_associated_cancellation_slot(handler);
- if (cancel.is_connected())
- cancel.template emplace<cancel_handler>(self_->coro_);
-
- asio::dispatch(get_executor(),
- handle(exec, std::forward<WaitHandler>(handler),
- std::integral_constant<bool, is_noexcept>{},
- std::is_void<result_type>{}));
- }
-
- template <typename WaitHandler, typename Input>
- void operator()(WaitHandler&& handler, Input&& input) const
- {
- const auto exec =
- asio::prefer(
- get_associated_executor(handler, get_executor()),
- execution::outstanding_work.tracked);
- auto cancel = get_associated_cancellation_slot(handler);
-
- using cancel_t = decltype(self_->coro_->cancel);
- self_->coro_->cancel.~cancel_t();
- new(&self_->coro_->cancel) cancel_t();
-
- if (cancel.is_connected())
- cancel.template emplace<cancel_handler>(self_->coro_);
-
- asio::dispatch(get_executor(),
- [h = handle(exec, std::forward<WaitHandler>(handler),
- std::integral_constant<bool, is_noexcept>{},
- std::is_void<result_type>{}),
- in = std::forward<Input>(input), self = self_]() mutable
- {
- self->coro_->input_ = std::move(in);
- std::move(h)();
- });
- }
-
- private:
- coro* self_;
- };
+ struct initiate_async_resume;
explicit coro(promise_type* const cr) : coro_(cr) {}
promise_type* coro_{nullptr};
};
-namespace detail {
+/// A generator is a coro that returns void and yields value.
+template<typename T, typename Executor = asio::any_io_executor,
+ typename Allocator = std::allocator<void>>
+using generator = coro<T, void, Executor, Allocator>;
-template <bool IsNoexcept>
-struct coro_promise_error;
+/// A task is a coro that does not yield values
+template<typename T, typename Executor = asio::any_io_executor,
+ typename Allocator = std::allocator<void>>
+using task = coro<void(), T, Executor, Allocator>;
-template <>
-struct coro_promise_error<false>
-{
- std::exception_ptr error_;
-
- void reset_error() { error_ = std::exception_ptr{}; }
-
- void unhandled_exception() { error_ = std::current_exception(); }
-
- void rethrow_if()
- {
- if (error_)
- std::rethrow_exception(error_);
- }
-};
-
-template <>
-struct coro_promise_error<true>
-{
- void reset_error() {}
-
- void unhandled_exception() noexcept { throw; }
-
- void rethrow_if() {}
-};
-
-template <typename T = void>
-struct yield_input
-{
- T& value;
- coroutine_handle<> awaited_from{noop_coroutine()};
-
- bool await_ready() const noexcept
- {
- return false;
- }
-
- auto await_suspend(coroutine_handle<>) noexcept
- {
- return std::exchange(awaited_from, noop_coroutine());
- }
-
- T await_resume() const noexcept { return std::move(value); }
-};
-
-template <>
-struct yield_input<void>
-{
- coroutine_handle<> awaited_from{noop_coroutine()};
-
- bool await_ready() const noexcept
- {
- return false;
- }
-
- auto await_suspend(coroutine_handle<>) noexcept
- {
- return std::exchange(awaited_from, noop_coroutine());
- }
-
- constexpr void await_resume() const noexcept {}
-};
-
-struct coro_awaited_from
-{
- coroutine_handle<> awaited_from{noop_coroutine()};
-
- auto final_suspend() noexcept
- {
- struct suspendor
- {
- coroutine_handle<> awaited_from;
-
- constexpr static bool await_ready() noexcept { return false; }
-
- auto await_suspend(coroutine_handle<>) noexcept
- {
- return std::exchange(awaited_from, noop_coroutine());
- }
-
- constexpr static void await_resume() noexcept {}
- };
-
- return suspendor{std::exchange(awaited_from, noop_coroutine())};
- }
-
- ~coro_awaited_from()
- {
- awaited_from.resume();
- }//must be on the right executor
-};
-
-template <typename Yield, typename Input, typename Return>
-struct coro_promise_exchange : coro_awaited_from
-{
- using result_type = coro_result_t<Yield, Return>;
-
- result_type result_;
- Input input_;
-
- auto yield_value(Yield&& y)
- {
- result_ = std::move(y);
- return yield_input<Input>{std::move(input_),
- std::exchange(awaited_from, noop_coroutine())};
- }
-
- auto yield_value(const Yield& y)
- {
- result_ = y;
- return yield_input<Input>{std::move(input_),
- std::exchange(awaited_from, noop_coroutine())};
- }
-
- void return_value(const Return& r) { result_ = r; }
-
- void return_value(Return&& r) { result_ = std::move(r); }
-};
-
-template <typename YieldReturn>
-struct coro_promise_exchange<YieldReturn, void, YieldReturn> : coro_awaited_from
-{
- using result_type = coro_result_t<YieldReturn, YieldReturn>;
-
- result_type result_;
-
- auto yield_value(const YieldReturn& y)
- {
- result_ = y;
- return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
- }
-
- auto yield_value(YieldReturn&& y)
- {
- result_ = std::move(y);
- return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
- }
-
- void return_value(const YieldReturn& r) { result_ = r; }
-
- void return_value(YieldReturn&& r) { result_ = std::move(r); }
-};
-
-template <typename Yield, typename Return>
-struct coro_promise_exchange<Yield, void, Return> : coro_awaited_from
-{
- using result_type = coro_result_t<Yield, Return>;
-
- result_type result_;
-
- auto yield_value(const Yield& y)
- {
- result_.template emplace<0>(y);
- return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
- }
-
- auto yield_value(Yield&& y)
- {
- result_.template emplace<0>(std::move(y));
- return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
- }
-
- void return_value(const Return& r)
- { result_.template emplace<1>(r); }
-
- void return_value(Return&& r)
- { result_.template emplace<1>(std::move(r)); }
-};
-
-template <typename Yield, typename Input>
-struct coro_promise_exchange<Yield, Input, void> : coro_awaited_from
-{
- using result_type = coro_result_t<Yield, void>;
-
- result_type result_;
- Input input_;
-
- auto yield_value(Yield&& y)
- {
- result_ = std::move(y);
- return yield_input<Input>{input_,
- std::exchange(awaited_from, noop_coroutine())};
- }
-
- auto yield_value(const Yield& y)
- {
- result_ = y;
- return yield_input<Input>{input_,
- std::exchange(awaited_from, noop_coroutine())};
- }
-
- void return_void() { result_.reset(); }
-};
-
-template <typename Return>
-struct coro_promise_exchange<void, void, Return> : coro_awaited_from
-{
- using result_type = coro_result_t<void, Return>;
-
- result_type result_;
-
- void yield_value();
-
- void return_value(const Return& r) { result_ = r; }
-
- void return_value(Return&& r) { result_ = std::move(r); }
-};
-
-
-template <>
-struct coro_promise_exchange<void, void, void> : coro_awaited_from
-{
- void return_void() {}
-
- void yield_value();
-};
-
-template <typename Yield>
-struct coro_promise_exchange<Yield, void, void> : coro_awaited_from
-{
- using result_type = coro_result_t<Yield, void>;
-
- result_type result_;
-
- auto yield_value(const Yield& y)
- {
- result_ = y;
- return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
- }
-
- auto yield_value(Yield&& y)
- {
- result_ = std::move(y);
- return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
- }
-
- void return_void() { result_.reset(); }
-};
-
-template <typename Yield, typename Return, typename Executor>
-struct coro_promise final :
- coro_promise_allocator<coro<Yield, Return, Executor>>,
- coro_promise_error<coro_traits<Yield, Return, Executor>::is_noexcept>,
- coro_promise_exchange<
- typename coro_traits<Yield, Return, Executor>::yield_type,
- typename coro_traits<Yield, Return, Executor>::input_type,
- typename coro_traits<Yield, Return, Executor>::return_type>
-{
- using coro_type = coro<Yield, Return, Executor>;
-
- auto handle()
- { return coroutine_handle<coro_promise>::from_promise(this); }
-
- using executor_type = Executor;
-
- executor_type executor_;
- struct cancel_pair
- {
- cancellation_signal signal;
- asio::cancellation_state state{signal.slot()};
-
- };
- cancel_pair cancel;
-
- using allocator_type =
- typename std::allocator_traits<associated_allocator_t < Executor>>::
- template rebind_alloc<std::byte>;
- using traits = coro_traits<Yield, Return, Executor>;
-
- using input_type = typename traits::input_type;
- using yield_type = typename traits::yield_type;
- using return_type = typename traits::return_type;
- using error_type = typename traits::error_type;
- using result_type = typename traits::result_type;
- constexpr static bool is_noexcept = traits::is_noexcept;
-
- auto get_executor() const -> Executor { return executor_; }
-
- auto get_handle()
- {
- return coroutine_handle<coro_promise>::from_promise(*this);
- }
-
- template <typename... Args>
- coro_promise(Executor executor, Args &&...) noexcept
- : executor_(std::move(executor))
- {
- }
-
- template <execution_context Context, typename... Args>
- coro_promise(Context&& ctx, Args&&...) noexcept
- : executor_(ctx.get_executor())
- {
- }
-
- auto get_return_object()
- {
- return coro<Yield, Return, Executor>{this};
- }
-
- auto initial_suspend() noexcept
- {
- return suspend_always{};
- }
-
- using coro_promise_exchange<
- typename coro_traits<Yield, Return, Executor>::yield_type,
- typename coro_traits<Yield, Return, Executor>::input_type,
- typename coro_traits<Yield, Return, Executor>::return_type>::yield_value;
-
- auto await_transform(this_coro::executor_t) const
- {
- struct exec_helper
- {
- const executor_type& value;
-
- constexpr static bool await_ready() noexcept { return true; }
-
- constexpr static void await_suspend(coroutine_handle<>) noexcept {}
-
- executor_type await_resume() const noexcept { return value; }
- };
-
- return exec_helper{executor_};
- }
-
- auto await_transform(this_coro::cancellation_state_t) const
- {
- struct exec_helper
- {
- const asio::cancellation_state& value;
-
- constexpr static bool await_ready() noexcept { return true; }
-
- constexpr static void await_suspend(coroutine_handle<>) noexcept {}
-
- const asio::cancellation_state& await_resume() const noexcept
- {
- return value;
- }
- };
-
- return exec_helper{cancel.state};
- }
-
- template <typename Yield_, typename Return_, typename Executor_>
- auto await_transform(coro<Yield_, Return_, Executor_>& kr) -> decltype(auto)
- {
- return kr;
- }
-
- template <typename Yield_, typename Return_, typename Executor_>
- auto await_transform(coro<Yield_, Return_, Executor_>&& kr)
- {
- return std::move(kr);
- }
-
- template <typename T_, typename Coroutine>
- auto await_transform(coro_with_arg<T_, Coroutine>&& kr) -> decltype(auto)
- {
- return std::move(kr);
- }
-
- template <typename T_>
- requires requires(T_ t) {{ t.async_wait(use_coro) }; }
- auto await_transform(T_ &t) -> decltype(auto)
- {
- return await_transform(t.async_wait(use_coro));
- }
-
- template <typename... Ts>
- auto await_transform(coro_init_handler<Executor, Ts...>&& kr) const
- {
- if constexpr (is_noexcept)
- return std::move(kr).as_noexcept(cancel.state.slot());
- else
- return std::move(kr).as_throwing(cancel.state.slot());
- }
-};
-
-} // namespace detail
} // namespace experimental
} // namespace asio
#include "asio/detail/pop_options.hpp"
+#include "asio/experimental/impl/coro.hpp"
+
#endif // ASIO_EXPERIMENTAL_CORO_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/coro_traits.hpp b/3rdparty/asio/include/asio/experimental/coro_traits.hpp
index a2b31cb952e..7da904b1273 100644
--- a/3rdparty/asio/include/asio/experimental/detail/coro_traits.hpp
+++ b/3rdparty/asio/include/asio/experimental/coro_traits.hpp
@@ -2,8 +2,8 @@
// experimental/detail/coro_traits.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -12,6 +12,10 @@
#ifndef ASIO_EXPERIMENTAL_DETAIL_CORO_TRAITS_HPP
#define ASIO_EXPERIMENTAL_DETAIL_CORO_TRAITS_HPP
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
#include "asio/detail/config.hpp"
#include <optional>
#include <variant>
@@ -22,16 +26,15 @@ namespace experimental {
namespace detail {
template <class From, class To>
-concept convertible_to = std::is_convertible_v<From, To> &&
- requires(std::add_rvalue_reference_t<From> (&f)()) {static_cast<To>(f()); };
+concept convertible_to = std::is_convertible_v<From, To>;
template <typename T>
concept decays_to_executor = execution::executor<std::decay_t<T>>;
-template <typename T>
+template <typename T, typename Executor = any_io_executor>
concept execution_context = requires (T& t)
{
- {t.get_executor()} -> decays_to_executor;
+ {t.get_executor()} -> convertible_to<Executor>;
};
template <typename Yield, typename Return>
@@ -97,17 +100,59 @@ struct coro_handler<T, true>
template <typename Result, bool IsNoexcept>
using coro_handler_t = typename coro_handler<Result, IsNoexcept>::type;
+} // namespace detail
+
+#if defined(GENERATING_DOCUMENTATION)
+
+/// The traits describing the resumable coroutine behaviour.
+/**
+ * Template parameter @c Yield specifies type or signature used by co_yield,
+ * @c Return specifies the type used for co_return, and @c Executor specifies
+ * the underlying executor type.
+ */
+template <typename Yield, typename Return, typename Executor>
+struct coro_traits
+{
+ /// The value that can be passed into a symmetrical cororoutine. @c void if
+ /// asymmetrical.
+ using input_type = argument_dependent;
+
+ /// The type that can be passed out through a co_yield.
+ using yield_type = argument_dependent;
+
+ /// The type that can be passed out through a co_return.
+ using return_type = argument_dependent;
+
+ /// The type received by a co_await or async_resume. It's a combination of
+ /// yield and return.
+ using result_type = argument_dependent;
+
+ /// The signature used by the async_resume.
+ using signature_type = argument_dependent;
+
+ /// Whether or not the coroutine is noexcept.
+ constexpr static bool is_noexcept = argument_dependent;
+
+ /// The error type of the coroutine. @c void for noexcept.
+ using error_type = argument_dependent;
+
+ /// Completion handler type used by async_resume.
+ using completion_handler = argument_dependent;
+};
+
+#else // defined(GENERATING_DOCUMENTATION)
+
template <typename Yield, typename Return, typename Executor>
struct coro_traits
{
using input_type = void;
using yield_type = Yield;
using return_type = Return;
- using result_type = coro_result_t<yield_type, return_type>;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
using signature_type = result_type();
constexpr static bool is_noexcept = false;
using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
- using completion_handler = coro_handler_t<result_type, is_noexcept>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
};
template <typename T, typename Return, typename Executor>
@@ -116,11 +161,11 @@ struct coro_traits<T(), Return, Executor>
using input_type = void;
using yield_type = T;
using return_type = Return;
- using result_type = coro_result_t<yield_type, return_type>;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
using signature_type = result_type();
constexpr static bool is_noexcept = false;
using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
- using completion_handler = coro_handler_t<result_type, is_noexcept>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
};
template <typename T, typename Return, typename Executor>
@@ -129,11 +174,11 @@ struct coro_traits<T() noexcept, Return, Executor>
using input_type = void;
using yield_type = T;
using return_type = Return;
- using result_type = coro_result_t<yield_type, return_type>;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
using signature_type = result_type();
constexpr static bool is_noexcept = true;
using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
- using completion_handler = coro_handler_t<result_type, is_noexcept>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
};
template <typename T, typename U, typename Return, typename Executor>
@@ -142,11 +187,11 @@ struct coro_traits<T(U), Return, Executor>
using input_type = U;
using yield_type = T;
using return_type = Return;
- using result_type = coro_result_t<yield_type, return_type>;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
using signature_type = result_type(input_type);
constexpr static bool is_noexcept = false;
using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
- using completion_handler = coro_handler_t<result_type, is_noexcept>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
};
template <typename T, typename U, typename Return, typename Executor>
@@ -155,28 +200,28 @@ struct coro_traits<T(U) noexcept, Return, Executor>
using input_type = U;
using yield_type = T;
using return_type = Return;
- using result_type = coro_result_t<yield_type, return_type>;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
using signature_type = result_type(input_type);
constexpr static bool is_noexcept = true;
using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
- using completion_handler = coro_handler_t<result_type, is_noexcept>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
};
-
template <typename Executor>
struct coro_traits<void() noexcept, void, Executor>
{
using input_type = void;
using yield_type = void;
using return_type = void;
- using result_type = coro_result_t<yield_type, return_type>;
+ using result_type = detail::coro_result_t<yield_type, return_type>;
using signature_type = result_type(input_type);
constexpr static bool is_noexcept = true;
using error_type = std::conditional_t<is_noexcept, void, std::exception_ptr>;
- using completion_handler = coro_handler_t<result_type, is_noexcept>;
+ using completion_handler = detail::coro_handler_t<result_type, is_noexcept>;
};
-} // namespace detail
+#endif // defined(GENERATING_DOCUMENTATION)
+
} // namespace experimental
} // namespace asio
diff --git a/3rdparty/asio/include/asio/experimental/deferred.hpp b/3rdparty/asio/include/asio/experimental/deferred.hpp
index f09be1582a3..c722ad1a2de 100644
--- a/3rdparty/asio/include/asio/experimental/deferred.hpp
+++ b/3rdparty/asio/include/asio/experimental/deferred.hpp
@@ -2,7 +2,7 @@
// experimental/deferred.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,590 +16,21 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include <tuple>
-#include "asio/associator.hpp"
-#include "asio/async_result.hpp"
-#include "asio/detail/type_traits.hpp"
+#include "asio/deferred.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace experimental {
-/// Trait for detecting objects that are usable as deferred operations.
-template <typename T>
-struct is_deferred : false_type
-{
-};
-
-namespace detail {
-
-// Helper trait for getting the completion signature from an async operation.
-
-struct deferred_signature_probe {};
-
-template <typename T>
-struct deferred_signature_probe_result
-{
- typedef T type;
-};
-
-template <typename T>
-struct deferred_signature
-{
- typedef typename decltype(
- declval<T>()(declval<deferred_signature_probe>()))::type type;
-};
-
-// Helper trait for getting the completion signature of the tail in a sequence
-// when invoked with the specified arguments.
-
-template <typename HeadSignature, typename Tail>
-struct deferred_sequence_signature;
-
-template <typename R, typename... Args, typename Tail>
-struct deferred_sequence_signature<R(Args...), Tail>
-{
- static_assert(
- !is_same<decltype(declval<Tail>()(declval<Args>()...)), void>::value,
- "deferred functions must produce a deferred return type");
-
- typedef typename decltype(
- declval<Tail>()(declval<Args>()...)(
- declval<deferred_signature_probe>()))::type type;
-};
-
-// Completion handler for the head component of a deferred sequence.
-template <typename Handler, typename Tail>
-class deferred_sequence_handler
-{
-public:
- template <typename H, typename T>
- explicit deferred_sequence_handler(
- ASIO_MOVE_ARG(H) handler, ASIO_MOVE_ARG(T) tail)
- : handler_(ASIO_MOVE_CAST(H)(handler)),
- tail_(ASIO_MOVE_CAST(T)(tail))
- {
- }
-
- template <typename... Args>
- void operator()(ASIO_MOVE_ARG(Args)... args)
- {
- ASIO_MOVE_OR_LVALUE(Tail)(tail_)(
- ASIO_MOVE_CAST(Args)(args)...)(
- ASIO_MOVE_OR_LVALUE(Handler)(handler_));
- }
-
-//private:
- Handler handler_;
- Tail tail_;
-};
-
-} // namespace detail
-
-/// Used to represent an empty deferred action.
-struct deferred_noop
-{
- /// No effect.
- template <typename... Args>
- void operator()(ASIO_MOVE_ARG(Args)...) ASIO_RVALUE_REF_QUAL
- {
- }
-
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
- /// No effect.
- template <typename... Args>
- decltype(auto) operator()(ASIO_MOVE_ARG(Args)...) const &
- {
- }
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-};
-
-#if !defined(GENERATING_DOCUMENTATION)
-template <>
-struct is_deferred<deferred_noop> : true_type
-{
-};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-/// Tag type to disambiguate deferred constructors.
-struct deferred_init_tag {};
-
-/// Wraps a function object so that it may be used as an element in a deferred
-/// composition.
-template <typename Function>
-class deferred_function
-{
-public:
- /// Constructor.
- template <typename F>
- ASIO_CONSTEXPR explicit deferred_function(
- deferred_init_tag, ASIO_MOVE_ARG(F) function)
- : function_(ASIO_MOVE_CAST(F)(function))
- {
- }
-
- template <typename... Args>
- decltype(auto) operator()(
- ASIO_MOVE_ARG(Args)... args) ASIO_RVALUE_REF_QUAL
- {
- return ASIO_MOVE_CAST(Function)(function_)(
- ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
- template <typename... Args>
- decltype(auto) operator()(
- ASIO_MOVE_ARG(Args)... args) const &
- {
- return deferred_function(*this)(
- ASIO_MOVE_CAST(Args)(args)...);
- }
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-//private:
- Function function_;
-};
-
-#if !defined(GENERATING_DOCUMENTATION)
-template <typename Function>
-struct is_deferred<deferred_function<Function> > : true_type
-{
-};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-/// Encapsulates deferred values.
-template <typename... Values>
-class ASIO_NODISCARD deferred_values
-{
-private:
- std::tuple<Values...> values_;
-
- struct initiate
- {
- template <typename Handler, typename... V>
- void operator()(Handler handler, ASIO_MOVE_ARG(V)... values)
- {
- ASIO_MOVE_OR_LVALUE(Handler)(handler)(
- ASIO_MOVE_CAST(V)(values)...);
- }
- };
-
- template <typename CompletionToken, std::size_t... I>
- decltype(auto) invoke_helper(
- ASIO_MOVE_ARG(CompletionToken) token,
- std::index_sequence<I...>)
- {
- return asio::async_initiate<CompletionToken, void(Values...)>(
- initiate(), token,
- std::get<I>(ASIO_MOVE_CAST(std::tuple<Values...>)(values_))...);
- }
-
-public:
- /// Construct a deferred asynchronous operation from the arguments to an
- /// initiation function object.
- template <typename... V>
- ASIO_CONSTEXPR explicit deferred_values(
- deferred_init_tag, ASIO_MOVE_ARG(V)... values)
- : values_(ASIO_MOVE_CAST(V)(values)...)
- {
- }
-
- /// Initiate the deferred operation using the supplied completion token.
- template <ASIO_COMPLETION_TOKEN_FOR(void(Values...)) CompletionToken>
- decltype(auto) operator()(
- ASIO_MOVE_ARG(CompletionToken) token) ASIO_RVALUE_REF_QUAL
- {
- return this->invoke_helper(
- ASIO_MOVE_CAST(CompletionToken)(token),
- std::index_sequence_for<Values...>());
- }
-
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
- template <ASIO_COMPLETION_TOKEN_FOR(void(Values...)) CompletionToken>
- decltype(auto) operator()(
- ASIO_MOVE_ARG(CompletionToken) token) const &
- {
- return deferred_values(*this)(
- ASIO_MOVE_CAST(CompletionToken)(token));
- }
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-};
-
-#if !defined(GENERATING_DOCUMENTATION)
-template <typename... Values>
-struct is_deferred<deferred_values<Values...> > : true_type
-{
-};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-/// Encapsulates a deferred asynchronous operation.
-template <typename Signature, typename Initiation, typename... InitArgs>
-class ASIO_NODISCARD deferred_async_operation
-{
-private:
- typename decay<Initiation>::type initiation_;
- typedef std::tuple<typename decay<InitArgs>::type...> init_args_t;
- init_args_t init_args_;
-
- template <typename CompletionToken, std::size_t... I>
- decltype(auto) invoke_helper(
- ASIO_MOVE_ARG(CompletionToken) token,
- std::index_sequence<I...>)
- {
- return asio::async_initiate<CompletionToken, Signature>(
- ASIO_MOVE_CAST(typename decay<Initiation>::type)(initiation_),
- token, std::get<I>(ASIO_MOVE_CAST(init_args_t)(init_args_))...);
- }
-
-public:
- /// Construct a deferred asynchronous operation from the arguments to an
- /// initiation function object.
- template <typename I, typename... A>
- ASIO_CONSTEXPR explicit deferred_async_operation(
- deferred_init_tag, ASIO_MOVE_ARG(I) initiation,
- ASIO_MOVE_ARG(A)... init_args)
- : initiation_(ASIO_MOVE_CAST(I)(initiation)),
- init_args_(ASIO_MOVE_CAST(A)(init_args)...)
- {
- }
-
- /// Initiate the asynchronous operation using the supplied completion token.
- template <ASIO_COMPLETION_TOKEN_FOR(Signature) CompletionToken>
- decltype(auto) operator()(
- ASIO_MOVE_ARG(CompletionToken) token) ASIO_RVALUE_REF_QUAL
- {
- return this->invoke_helper(
- ASIO_MOVE_CAST(CompletionToken)(token),
- std::index_sequence_for<InitArgs...>());
- }
-
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
- template <ASIO_COMPLETION_TOKEN_FOR(Signature) CompletionToken>
- decltype(auto) operator()(
- ASIO_MOVE_ARG(CompletionToken) token) const &
- {
- return deferred_async_operation(*this)(
- ASIO_MOVE_CAST(CompletionToken)(token));
- }
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-};
-
-#if !defined(GENERATING_DOCUMENTATION)
-template <typename Signature, typename Initiation, typename... InitArgs>
-struct is_deferred<
- deferred_async_operation<Signature, Initiation, InitArgs...> > : true_type
-{
-};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-/// Defines a link between two consecutive operations in a sequence.
-template <typename Head, typename Tail>
-class ASIO_NODISCARD deferred_sequence
-{
-private:
- typedef typename detail::deferred_sequence_signature<
- typename detail::deferred_signature<Head>::type, Tail>::type
- signature;
-
-public:
- template <typename H, typename T>
- ASIO_CONSTEXPR explicit deferred_sequence(deferred_init_tag,
- ASIO_MOVE_ARG(H) head, ASIO_MOVE_ARG(T) tail)
- : head_(ASIO_MOVE_CAST(H)(head)),
- tail_(ASIO_MOVE_CAST(T)(tail))
- {
- }
-
- template <ASIO_COMPLETION_TOKEN_FOR(signature) CompletionToken>
- decltype(auto) operator()(
- ASIO_MOVE_ARG(CompletionToken) token) ASIO_RVALUE_REF_QUAL
- {
- return asio::async_initiate<CompletionToken, signature>(
- initiate(), token, ASIO_MOVE_OR_LVALUE(Head)(head_),
- ASIO_MOVE_OR_LVALUE(Tail)(tail_));
- }
-
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
- template <ASIO_COMPLETION_TOKEN_FOR(signature) CompletionToken>
- decltype(auto) operator()(
- ASIO_MOVE_ARG(CompletionToken) token) const &
- {
- return deferred_sequence(*this)(
- ASIO_MOVE_CAST(CompletionToken)(token));
- }
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-private:
- struct initiate
- {
- template <typename Handler>
- void operator()(ASIO_MOVE_ARG(Handler) handler,
- Head head, ASIO_MOVE_ARG(Tail) tail)
- {
- ASIO_MOVE_OR_LVALUE(Head)(head)(
- detail::deferred_sequence_handler<
- typename decay<Handler>::type,
- typename decay<Tail>::type>(
- ASIO_MOVE_CAST(Handler)(handler),
- ASIO_MOVE_CAST(Tail)(tail)));
- }
- };
-
- Head head_;
- Tail tail_;
-};
-
-#if !defined(GENERATING_DOCUMENTATION)
-template <typename Head, typename Tail>
-struct is_deferred<deferred_sequence<Head, Tail> > : true_type
-{
-};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-/// Used to represent a deferred conditional branch.
-template <typename OnTrue = deferred_noop,
- typename OnFalse = deferred_noop>
-class ASIO_NODISCARD deferred_conditional
-{
-public:
- /// Construct a deferred conditional with the value to determine which branch
- /// will be executed.
- ASIO_CONSTEXPR explicit deferred_conditional(bool b)
- : on_true_(),
- on_false_(),
- bool_(b)
- {
- }
-
- /// Invoke the conditional branch bsaed on the stored alue.
- template <typename... Args>
- auto operator()(ASIO_MOVE_ARG(Args)... args) ASIO_RVALUE_REF_QUAL
- {
- if (bool_)
- {
- return ASIO_MOVE_OR_LVALUE(OnTrue)(on_true_)(
- ASIO_MOVE_CAST(Args)(args)...);
- }
- else
- {
- return ASIO_MOVE_OR_LVALUE(OnFalse)(on_false_)(
- ASIO_MOVE_CAST(Args)(args)...);
- }
- }
-
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
- template <typename... Args>
- auto operator()(ASIO_MOVE_ARG(Args)... args) const &
- {
- return deferred_conditional(*this)(
- ASIO_MOVE_CAST(Args)(args)...);
- }
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
- /// Set the true branch of the conditional.
- template <typename T>
- deferred_conditional<T, OnFalse> then(T on_true,
- typename constraint<
- is_deferred<T>::value
- >::type* = 0,
- typename constraint<
- is_same<
- typename conditional<true, OnTrue, T>::type,
- deferred_noop
- >::value
- >::type* = 0) ASIO_RVALUE_REF_QUAL
- {
- return deferred_conditional<T, OnFalse>(
- bool_, ASIO_MOVE_CAST(T)(on_true),
- ASIO_MOVE_CAST(OnFalse)(on_false_));
- }
-
- /// Set the false branch of the conditional.
- template <typename T>
- deferred_conditional<OnTrue, T> otherwise(T on_false,
- typename constraint<
- is_deferred<T>::value
- >::type* = 0,
- typename constraint<
- !is_same<
- typename conditional<true, OnTrue, T>::type,
- deferred_noop
- >::value
- >::type* = 0,
- typename constraint<
- is_same<
- typename conditional<true, OnFalse, T>::type,
- deferred_noop
- >::value
- >::type* = 0) ASIO_RVALUE_REF_QUAL
- {
- return deferred_conditional<OnTrue, T>(
- bool_, ASIO_MOVE_CAST(OnTrue)(on_true_),
- ASIO_MOVE_CAST(T)(on_false));
- }
-
-private:
- template <typename T, typename F> friend class deferred_conditional;
-
- // Helper constructor.
- template <typename T, typename F>
- explicit deferred_conditional(bool b, ASIO_MOVE_ARG(T) on_true,
- ASIO_MOVE_ARG(F) on_false)
- : on_true_(ASIO_MOVE_CAST(T)(on_true)),
- on_false_(ASIO_MOVE_CAST(F)(on_false)),
- bool_(b)
- {
- }
-
- OnTrue on_true_;
- OnFalse on_false_;
- bool bool_;
-};
-
-#if !defined(GENERATING_DOCUMENTATION)
-template <typename OnTrue, typename OnFalse>
-struct is_deferred<deferred_conditional<OnTrue, OnFalse> > : true_type
-{
-};
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-/// Class used to specify that an asynchronous operation should return a
-/// function object to lazily launch the operation.
-/**
- * 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 using the special value @c asio::deferred. For
- * example:
- *
- * @code auto my_sender
- * = my_socket.async_read_some(my_buffer,
- * asio::experimental::deferred); @endcode
- *
- * The initiating function (async_read_some in the above example) returns a
- * function object that will lazily initiate the operation.
- */
-class deferred_t
-{
-public:
- /// Default constructor.
- ASIO_CONSTEXPR deferred_t()
- {
- }
-
- /// Adapts an executor to add the @c deferred_t completion token as the
- /// default.
- template <typename InnerExecutor>
- struct executor_with_default : InnerExecutor
- {
- /// Specify @c deferred_t as the default completion token type.
- typedef deferred_t default_completion_token_type;
-
- /// Construct the adapted executor from the inner executor type.
- template <typename InnerExecutor1>
- executor_with_default(const InnerExecutor1& ex,
- typename constraint<
- conditional<
- !is_same<InnerExecutor1, executor_with_default>::value,
- is_convertible<InnerExecutor1, InnerExecutor>,
- false_type
- >::type::value
- >::type = 0) ASIO_NOEXCEPT
- : InnerExecutor(ex)
- {
- }
- };
-
- /// Type alias to adapt an I/O object to use @c deferred_t as its
- /// default completion token type.
-#if defined(ASIO_HAS_ALIAS_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
- template <typename T>
- using as_default_on_t = typename T::template rebind_executor<
- executor_with_default<typename T::executor_type> >::other;
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
- /// Function helper to adapt an I/O object to use @c deferred_t as its
- /// default completion token type.
- template <typename T>
- static typename decay<T>::type::template rebind_executor<
- executor_with_default<typename decay<T>::type::executor_type>
- >::other
- as_default_on(ASIO_MOVE_ARG(T) object)
- {
- return typename decay<T>::type::template rebind_executor<
- executor_with_default<typename decay<T>::type::executor_type>
- >::other(ASIO_MOVE_CAST(T)(object));
- }
-
- /// Creates a new deferred from a function.
- template <typename Function>
- typename constraint<
- !is_deferred<typename decay<Function>::type>::value,
- deferred_function<typename decay<Function>::type>
- >::type operator()(ASIO_MOVE_ARG(Function) function) const
- {
- return deferred_function<typename decay<Function>::type>(
- deferred_init_tag{}, ASIO_MOVE_CAST(Function)(function));
- }
-
- /// Passes through anything that is already deferred.
- template <typename T>
- typename constraint<
- is_deferred<typename decay<T>::type>::value,
- typename decay<T>::type
- >::type operator()(ASIO_MOVE_ARG(T) t) const
- {
- return ASIO_MOVE_CAST(T)(t);
- }
-
- /// Returns a deferred operation that returns the provided values.
- template <typename... Args>
- static ASIO_CONSTEXPR deferred_values<typename decay<Args>::type...>
- values(ASIO_MOVE_ARG(Args)... args)
- {
- return deferred_values<typename decay<Args>::type...>(
- deferred_init_tag{}, ASIO_MOVE_CAST(Args)(args)...);
- }
-
- /// Creates a conditional object for branching deferred operations.
- static ASIO_CONSTEXPR deferred_conditional<> when(bool b)
- {
- return deferred_conditional<>(b);
- }
-};
-
-/// Pipe operator used to chain deferred operations.
-template <typename Head, typename Tail>
-inline auto operator|(Head head, ASIO_MOVE_ARG(Tail) tail)
- -> typename constraint<
- is_deferred<Head>::value,
- decltype(ASIO_MOVE_OR_LVALUE(Head)(head)(
- ASIO_MOVE_CAST(Tail)(tail)))
- >::type
-{
- return ASIO_MOVE_OR_LVALUE(Head)(head)(
- ASIO_MOVE_CAST(Tail)(tail));
-}
-
-/// A special value, similar to std::nothrow.
-/**
- * See the documentation for asio::experimental::deferred_t for a usage
- * example.
- */
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-constexpr deferred_t deferred;
-#elif defined(ASIO_MSVC)
-__declspec(selectany) deferred_t deferred;
-#endif
+#if !defined(ASIO_NO_DEPRECATED)
+using asio::deferred_t;
+using asio::deferred;
+#endif // !defined(ASIO_NO_DEPRECATED)
} // namespace experimental
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#include "asio/experimental/impl/deferred.hpp"
-
#endif // ASIO_EXPERIMENTAL_DEFERRED_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_handler.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_handler.hpp
new file mode 100644
index 00000000000..0152c2e76ff
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_handler.hpp
@@ -0,0 +1,77 @@
+//
+// experimental/detail/channel_handler.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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_HANDLER_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_HANDLER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/experimental/detail/channel_payload.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Payload, typename Handler>
+class channel_handler
+{
+public:
+ channel_handler(Payload&& p, Handler& h)
+ : payload_(static_cast<Payload&&>(p)),
+ handler_(static_cast<Handler&&>(h))
+ {
+ }
+
+ void operator()()
+ {
+ payload_.receive(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,
+ experimental::detail::channel_handler<Payload, Handler>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const experimental::detail::channel_handler<Payload, Handler>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const experimental::detail::channel_handler<Payload, Handler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_HANDLER_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_message.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_message.hpp
new file mode 100644
index 00000000000..16446f0c1bb
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_message.hpp
@@ -0,0 +1,129 @@
+//
+// experimental/detail/channel_message.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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_MESSAGE_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_MESSAGE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Signature>
+class channel_message;
+
+template <typename R>
+class channel_message<R()>
+{
+public:
+ channel_message(int)
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ static_cast<Handler&&>(handler)();
+ }
+};
+
+template <typename R, typename Arg0>
+class channel_message<R(Arg0)>
+{
+public:
+ template <typename T0>
+ channel_message(int, T0&& t0)
+ : arg0_(static_cast<T0&&>(t0))
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ static_cast<Handler&&>(handler)(
+ static_cast<arg0_type&&>(arg0_));
+ }
+
+private:
+ typedef decay_t<Arg0> arg0_type;
+ arg0_type arg0_;
+};
+
+template <typename R, typename Arg0, typename Arg1>
+class channel_message<R(Arg0, Arg1)>
+{
+public:
+ template <typename T0, typename T1>
+ channel_message(int, T0&& t0, T1&& t1)
+ : arg0_(static_cast<T0&&>(t0)),
+ arg1_(static_cast<T1&&>(t1))
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ static_cast<Handler&&>(handler)(
+ static_cast<arg0_type&&>(arg0_),
+ static_cast<arg1_type&&>(arg1_));
+ }
+
+private:
+ typedef decay_t<Arg0> arg0_type;
+ arg0_type arg0_;
+ typedef decay_t<Arg1> arg1_type;
+ arg1_type arg1_;
+};
+
+template <typename R, typename... Args>
+class channel_message<R(Args...)>
+{
+public:
+ template <typename... T>
+ channel_message(int, T&&... t)
+ : args_(static_cast<T&&>(t)...)
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& h)
+ {
+ this->do_receive(h, asio::detail::index_sequence_for<Args...>());
+ }
+
+private:
+ template <typename Handler, std::size_t... I>
+ void do_receive(Handler& h, asio::detail::index_sequence<I...>)
+ {
+ static_cast<Handler&&>(h)(
+ std::get<I>(static_cast<args_type&&>(args_))...);
+ }
+
+ typedef std::tuple<decay_t<Args>...> args_type;
+ args_type args_;
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_MESSAGE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_operation.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_operation.hpp
new file mode 100644
index 00000000000..1231f1f87c1
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_operation.hpp
@@ -0,0 +1,361 @@
+//
+// experimental/detail/channel_operation.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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_OPERATION_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_OPERATION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/associated_immediate_executor.hpp"
+#include "asio/detail/initiate_post.hpp"
+#include "asio/detail/initiate_dispatch.hpp"
+#include "asio/detail/op_queue.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/execution/executor.hpp"
+#include "asio/execution/outstanding_work.hpp"
+#include "asio/executor_work_guard.hpp"
+#include "asio/prefer.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+// Base class for all channel operations. A function pointer is used instead of
+// virtual functions to avoid the associated overhead.
+class channel_operation ASIO_INHERIT_TRACKED_HANDLER
+{
+public:
+ template <typename Executor, typename = void, typename = void>
+ class handler_work_base;
+
+ template <typename Handler, typename IoExecutor, typename = void>
+ class handler_work;
+
+ void destroy()
+ {
+ func_(this, destroy_op, 0);
+ }
+
+protected:
+ enum action
+ {
+ destroy_op = 0,
+ immediate_op = 1,
+ post_op = 2,
+ dispatch_op = 3,
+ cancel_op = 4,
+ close_op = 5
+ };
+
+ typedef void (*func_type)(channel_operation*, action, void*);
+
+ channel_operation(func_type func)
+ : next_(0),
+ func_(func),
+ cancellation_key_(0)
+ {
+ }
+
+ // Prevents deletion through this type.
+ ~channel_operation()
+ {
+ }
+
+ friend class asio::detail::op_queue_access;
+ channel_operation* next_;
+ func_type func_;
+
+public:
+ // The operation key used for targeted cancellation.
+ void* cancellation_key_;
+};
+
+template <typename Executor, typename, typename>
+class channel_operation::handler_work_base
+{
+public:
+ typedef decay_t<
+ prefer_result_t<Executor,
+ execution::outstanding_work_t::tracked_t
+ >
+ > executor_type;
+
+ handler_work_base(int, const Executor& ex)
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ template <typename IoExecutor, typename Function, typename Handler>
+ void post(const IoExecutor& io_exec, Function& function, Handler&)
+ {
+ (asio::detail::initiate_post_with_executor<IoExecutor>(io_exec))(
+ static_cast<Function&&>(function));
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler& handler)
+ {
+ associated_allocator_t<Handler> allocator =
+ (get_associated_allocator)(handler);
+
+ asio::prefer(executor_,
+ execution::allocator(allocator)
+ ).execute(static_cast<Function&&>(function));
+ }
+
+private:
+ executor_type executor_;
+};
+
+template <typename Executor>
+class channel_operation::handler_work_base<Executor,
+ enable_if_t<
+ execution::is_executor<Executor>::value
+ >,
+ enable_if_t<
+ can_require<Executor, execution::blocking_t::never_t>::value
+ >
+ >
+{
+public:
+ typedef decay_t<
+ prefer_result_t<Executor,
+ execution::outstanding_work_t::tracked_t
+ >
+ > executor_type;
+
+ handler_work_base(int, const Executor& ex)
+ : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
+ {
+ }
+
+ const executor_type& get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ template <typename IoExecutor, typename Function, typename Handler>
+ void post(const IoExecutor&, Function& function, Handler& handler)
+ {
+ associated_allocator_t<Handler> allocator =
+ (get_associated_allocator)(handler);
+
+ asio::prefer(
+ asio::require(executor_, execution::blocking.never),
+ execution::allocator(allocator)
+ ).execute(static_cast<Function&&>(function));
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler& handler)
+ {
+ associated_allocator_t<Handler> allocator =
+ (get_associated_allocator)(handler);
+
+ asio::prefer(executor_,
+ execution::allocator(allocator)
+ ).execute(static_cast<Function&&>(function));
+ }
+
+private:
+ executor_type executor_;
+};
+
+#if !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Executor>
+class channel_operation::handler_work_base<Executor,
+ enable_if_t<
+ !execution::is_executor<Executor>::value
+ >
+ >
+{
+public:
+ typedef Executor executor_type;
+
+ handler_work_base(int, const Executor& ex)
+ : work_(ex)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return work_.get_executor();
+ }
+
+ template <typename IoExecutor, typename Function, typename Handler>
+ void post(const IoExecutor&, Function& function, Handler& handler)
+ {
+ associated_allocator_t<Handler> allocator =
+ (get_associated_allocator)(handler);
+
+ work_.get_executor().post(
+ static_cast<Function&&>(function), allocator);
+ }
+
+ template <typename Function, typename Handler>
+ void dispatch(Function& function, Handler& handler)
+ {
+ associated_allocator_t<Handler> allocator =
+ (get_associated_allocator)(handler);
+
+ work_.get_executor().dispatch(
+ static_cast<Function&&>(function), allocator);
+ }
+
+private:
+ executor_work_guard<Executor> work_;
+};
+
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
+template <typename Handler, typename IoExecutor, typename>
+class channel_operation::handler_work :
+ channel_operation::handler_work_base<IoExecutor>,
+ channel_operation::handler_work_base<
+ associated_executor_t<Handler, IoExecutor>, IoExecutor>
+{
+public:
+ typedef channel_operation::handler_work_base<IoExecutor> base1_type;
+
+ typedef channel_operation::handler_work_base<
+ associated_executor_t<Handler, IoExecutor>, IoExecutor>
+ base2_type;
+
+ handler_work(Handler& handler, const IoExecutor& io_ex) noexcept
+ : base1_type(0, io_ex),
+ base2_type(0, (get_associated_executor)(handler, io_ex))
+ {
+ }
+
+ template <typename Function>
+ void post(Function& function, Handler& handler)
+ {
+ base2_type::post(base1_type::get_executor(), function, handler);
+ }
+
+ template <typename Function>
+ void dispatch(Function& function, Handler& handler)
+ {
+ base2_type::dispatch(function, handler);
+ }
+
+ template <typename Function>
+ void immediate(Function& function, Handler& handler, ...)
+ {
+ typedef associated_immediate_executor_t<Handler,
+ typename base1_type::executor_type> immediate_ex_type;
+
+ immediate_ex_type immediate_ex = (get_associated_immediate_executor)(
+ handler, base1_type::get_executor());
+
+ (asio::detail::initiate_dispatch_with_executor<immediate_ex_type>(
+ immediate_ex))(static_cast<Function&&>(function));
+ }
+
+ template <typename Function>
+ void immediate(Function& function, Handler&,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ conditional_t<false, Function, Handler>,
+ typename base1_type::executor_type>::
+ asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ (asio::detail::initiate_post_with_executor<
+ typename base1_type::executor_type>(
+ base1_type::get_executor()))(
+ static_cast<Function&&>(function));
+ }
+};
+
+template <typename Handler, typename IoExecutor>
+class channel_operation::handler_work<
+ Handler, IoExecutor,
+ enable_if_t<
+ is_same<
+ typename associated_executor<Handler,
+ IoExecutor>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >
+ > : handler_work_base<IoExecutor>
+{
+public:
+ typedef channel_operation::handler_work_base<IoExecutor> base1_type;
+
+ handler_work(Handler&, const IoExecutor& io_ex) noexcept
+ : base1_type(0, io_ex)
+ {
+ }
+
+ template <typename Function>
+ void post(Function& function, Handler& handler)
+ {
+ base1_type::post(base1_type::get_executor(), function, handler);
+ }
+
+ template <typename Function>
+ void dispatch(Function& function, Handler& handler)
+ {
+ base1_type::dispatch(function, handler);
+ }
+
+ template <typename Function>
+ void immediate(Function& function, Handler& handler, ...)
+ {
+ typedef associated_immediate_executor_t<Handler,
+ typename base1_type::executor_type> immediate_ex_type;
+
+ immediate_ex_type immediate_ex = (get_associated_immediate_executor)(
+ handler, base1_type::get_executor());
+
+ (asio::detail::initiate_dispatch_with_executor<immediate_ex_type>(
+ immediate_ex))(static_cast<Function&&>(function));
+ }
+
+ template <typename Function>
+ void immediate(Function& function, Handler& handler,
+ enable_if_t<
+ is_same<
+ typename associated_immediate_executor<
+ conditional_t<false, Function, Handler>,
+ typename base1_type::executor_type>::
+ asio_associated_immediate_executor_is_unspecialised,
+ void
+ >::value
+ >*)
+ {
+ base1_type::post(base1_type::get_executor(), function, handler);
+ }
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_OPERATION_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_payload.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_payload.hpp
new file mode 100644
index 00000000000..31614cd5dbc
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_payload.hpp
@@ -0,0 +1,222 @@
+//
+// experimental/detail/channel_payload.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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_PAYLOAD_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_PAYLOAD_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error_code.hpp"
+#include "asio/experimental/detail/channel_message.hpp"
+
+#if defined(ASIO_HAS_STD_VARIANT)
+# include <variant>
+#else // defined(ASIO_HAS_STD_VARIANT)
+# include <new>
+#endif // defined(ASIO_HAS_STD_VARIANT)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename... Signatures>
+class channel_payload;
+
+template <typename R>
+class channel_payload<R()>
+{
+public:
+ explicit channel_payload(channel_message<R()>)
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ static_cast<Handler&&>(handler)();
+ }
+};
+
+template <typename Signature>
+class channel_payload<Signature>
+{
+public:
+ channel_payload(channel_message<Signature>&& m)
+ : message_(static_cast<channel_message<Signature>&&>(m))
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ message_.receive(handler);
+ }
+
+private:
+ channel_message<Signature> message_;
+};
+
+#if defined(ASIO_HAS_STD_VARIANT)
+
+template <typename... Signatures>
+class channel_payload
+{
+public:
+ template <typename Signature>
+ channel_payload(channel_message<Signature>&& m)
+ : message_(static_cast<channel_message<Signature>&&>(m))
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ std::visit(
+ [&](auto& message)
+ {
+ message.receive(handler);
+ }, message_);
+ }
+
+private:
+ std::variant<channel_message<Signatures>...> message_;
+};
+
+#else // defined(ASIO_HAS_STD_VARIANT)
+
+template <typename R1, typename R2>
+class channel_payload<R1(), R2(asio::error_code)>
+{
+public:
+ typedef channel_message<R1()> void_message_type;
+ typedef channel_message<R2(asio::error_code)> error_message_type;
+
+ channel_payload(void_message_type&&)
+ : message_(0, asio::error_code()),
+ empty_(true)
+ {
+ }
+
+ channel_payload(error_message_type&& m)
+ : message_(static_cast<error_message_type&&>(m)),
+ empty_(false)
+ {
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ if (empty_)
+ channel_message<R1()>(0).receive(handler);
+ else
+ message_.receive(handler);
+ }
+
+private:
+ error_message_type message_;
+ bool empty_;
+};
+
+template <typename Sig1, typename Sig2>
+class channel_payload<Sig1, Sig2>
+{
+public:
+ typedef channel_message<Sig1> message_1_type;
+ typedef channel_message<Sig2> message_2_type;
+
+ channel_payload(message_1_type&& m)
+ : index_(1)
+ {
+ new (&storage_.message_1_) message_1_type(static_cast<message_1_type&&>(m));
+ }
+
+ channel_payload(message_2_type&& m)
+ : index_(2)
+ {
+ new (&storage_.message_2_) message_2_type(static_cast<message_2_type&&>(m));
+ }
+
+ channel_payload(channel_payload&& other)
+ : index_(other.index_)
+ {
+ switch (index_)
+ {
+ case 1:
+ new (&storage_.message_1_) message_1_type(
+ static_cast<message_1_type&&>(other.storage_.message_1_));
+ break;
+ case 2:
+ new (&storage_.message_2_) message_2_type(
+ static_cast<message_2_type&&>(other.storage_.message_2_));
+ break;
+ default:
+ break;
+ }
+ }
+
+ ~channel_payload()
+ {
+ switch (index_)
+ {
+ case 1:
+ storage_.message_1_.~message_1_type();
+ break;
+ case 2:
+ storage_.message_2_.~message_2_type();
+ break;
+ default:
+ break;
+ }
+ }
+
+ template <typename Handler>
+ void receive(Handler& handler)
+ {
+ switch (index_)
+ {
+ case 1:
+ storage_.message_1_.receive(handler);
+ break;
+ case 2:
+ storage_.message_2_.receive(handler);
+ break;
+ default:
+ break;
+ }
+ }
+
+private:
+ union storage
+ {
+ storage() {}
+ ~storage() {}
+
+ char dummy_;
+ message_1_type message_1_;
+ message_2_type message_2_;
+ } storage_;
+ unsigned char index_;
+};
+
+#endif // defined(ASIO_HAS_STD_VARIANT)
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_PAYLOAD_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_receive_op.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_receive_op.hpp
new file mode 100644
index 00000000000..89d8ac2a5ab
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_receive_op.hpp
@@ -0,0 +1,127 @@
+//
+// experimental/detail/channel_receive_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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_RECEIVE_OP_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_RECEIVE_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/error.hpp"
+#include "asio/experimental/detail/channel_handler.hpp"
+#include "asio/experimental/detail/channel_operation.hpp"
+#include "asio/experimental/detail/channel_payload.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Payload>
+class channel_receive : public channel_operation
+{
+public:
+ void immediate(Payload payload)
+ {
+ func_(this, immediate_op, &payload);
+ }
+
+ void post(Payload payload)
+ {
+ func_(this, post_op, &payload);
+ }
+
+ void dispatch(Payload payload)
+ {
+ func_(this, dispatch_op, &payload);
+ }
+
+protected:
+ channel_receive(func_type func)
+ : channel_operation(func)
+ {
+ }
+};
+
+template <typename Payload, typename Handler, typename IoExecutor>
+class channel_receive_op : public channel_receive<Payload>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(channel_receive_op);
+
+ template <typename... Args>
+ channel_receive_op(Handler& handler, const IoExecutor& io_ex)
+ : channel_receive<Payload>(&channel_receive_op::do_action),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_action(channel_operation* base,
+ channel_operation::action a, void* v)
+ {
+ // Take ownership of the operation object.
+ channel_receive_op* o(static_cast<channel_receive_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ channel_operation::handler_work<Handler, IoExecutor> w(
+ static_cast<channel_operation::handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the handler is posted. Even if we're not about to post the handler, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ if (a != channel_operation::destroy_op)
+ {
+ Payload* payload = static_cast<Payload*>(v);
+ channel_handler<Payload, Handler> handler(
+ static_cast<Payload&&>(*payload), o->handler_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+ ASIO_HANDLER_INVOCATION_BEGIN(());
+ if (a == channel_operation::immediate_op)
+ w.immediate(handler, handler.handler_, 0);
+ else if (a == channel_operation::dispatch_op)
+ w.dispatch(handler, handler.handler_);
+ else
+ w.post(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ else
+ {
+ asio::detail::binder0<Handler> handler(o->handler_);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+ }
+ }
+
+private:
+ Handler handler_;
+ channel_operation::handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_RECEIVE_OP_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_send_functions.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_send_functions.hpp
new file mode 100644
index 00000000000..108dffec934
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_send_functions.hpp
@@ -0,0 +1,192 @@
+//
+// experimental/detail/channel_send_functions.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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_FUNCTIONS_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_FUNCTIONS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error_code.hpp"
+#include "asio/experimental/detail/channel_message.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Derived, typename Executor, typename... Signatures>
+class channel_send_functions;
+
+template <typename Derived, typename Executor, typename R, typename... Args>
+class channel_send_functions<Derived, Executor, R(Args...)>
+{
+public:
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ bool
+ > try_send(Args2&&... args)
+ {
+ 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)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ bool
+ > try_send_via_dispatch(Args2&&... args)
+ {
+ 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)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ std::size_t
+ > try_send_n(std::size_t count, Args2&&... args)
+ {
+ 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)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ 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 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)...);
+ }
+
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ CompletionToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
+ auto async_send(Args... args,
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(Executor))
+ -> decltype(
+ async_initiate<CompletionToken, void (asio::error_code)>(
+ declval<typename conditional_t<false, CompletionToken,
+ Derived>::initiate_async_send>(), token,
+ declval<typename conditional_t<false, CompletionToken,
+ Derived>::payload_type>()))
+ {
+ typedef typename Derived::payload_type payload_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return async_initiate<CompletionToken, void (asio::error_code)>(
+ typename Derived::initiate_async_send(self), token,
+ payload_type(message_type(0, static_cast<Args&&>(args)...)));
+ }
+};
+
+template <typename Derived, typename Executor,
+ typename R, typename... Args, typename... Signatures>
+class channel_send_functions<Derived, Executor, R(Args...), Signatures...> :
+ public channel_send_functions<Derived, Executor, Signatures...>
+{
+public:
+ using channel_send_functions<Derived, Executor, Signatures...>::try_send;
+ using channel_send_functions<Derived, Executor, Signatures...>::async_send;
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ bool
+ > try_send(Args2&&... args)
+ {
+ 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)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ bool
+ > try_send_via_dispatch(Args2&&... args)
+ {
+ 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)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ is_constructible<detail::channel_message<R(Args...)>, int, Args2...>::value,
+ std::size_t
+ > try_send_n(std::size_t count, Args2&&... args)
+ {
+ 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)...);
+ }
+
+ template <typename... Args2>
+ enable_if_t<
+ 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 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)...);
+ }
+
+ template <
+ ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
+ CompletionToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
+ auto async_send(Args... args,
+ CompletionToken&& token
+ ASIO_DEFAULT_COMPLETION_TOKEN(Executor))
+ -> decltype(
+ async_initiate<CompletionToken, void (asio::error_code)>(
+ declval<typename conditional_t<false, CompletionToken,
+ Derived>::initiate_async_send>(), token,
+ declval<typename conditional_t<false, CompletionToken,
+ Derived>::payload_type>()))
+ {
+ typedef typename Derived::payload_type payload_type;
+ typedef typename detail::channel_message<R(Args...)> message_type;
+ Derived* self = static_cast<Derived*>(this);
+ return async_initiate<CompletionToken, void (asio::error_code)>(
+ typename Derived::initiate_async_send(self), token,
+ payload_type(message_type(0, static_cast<Args&&>(args)...)));
+ }
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_FUNCTIONS_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_send_op.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_send_op.hpp
new file mode 100644
index 00000000000..4326c23253e
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_send_op.hpp
@@ -0,0 +1,148 @@
+//
+// experimental/detail/channel_send_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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_OP_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_OP_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/bind_handler.hpp"
+#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/error.hpp"
+#include "asio/experimental/channel_error.hpp"
+#include "asio/experimental/detail/channel_operation.hpp"
+#include "asio/experimental/detail/channel_payload.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Payload>
+class channel_send : public channel_operation
+{
+public:
+ Payload get_payload()
+ {
+ return static_cast<Payload&&>(payload_);
+ }
+
+ void immediate()
+ {
+ func_(this, immediate_op, 0);
+ }
+
+ void post()
+ {
+ func_(this, post_op, 0);
+ }
+
+ void cancel()
+ {
+ func_(this, cancel_op, 0);
+ }
+
+ void close()
+ {
+ func_(this, close_op, 0);
+ }
+
+protected:
+ channel_send(func_type func, Payload&& payload)
+ : channel_operation(func),
+ payload_(static_cast<Payload&&>(payload))
+ {
+ }
+
+private:
+ Payload payload_;
+};
+
+template <typename Payload, typename Handler, typename IoExecutor>
+class channel_send_op : public channel_send<Payload>
+{
+public:
+ ASIO_DEFINE_HANDLER_PTR(channel_send_op);
+
+ channel_send_op(Payload&& payload,
+ Handler& handler, const IoExecutor& io_ex)
+ : channel_send<Payload>(&channel_send_op::do_action,
+ static_cast<Payload&&>(payload)),
+ handler_(static_cast<Handler&&>(handler)),
+ work_(handler_, io_ex)
+ {
+ }
+
+ static void do_action(channel_operation* base,
+ channel_operation::action a, void*)
+ {
+ // Take ownership of the operation object.
+ channel_send_op* o(static_cast<channel_send_op*>(base));
+ ptr p = { asio::detail::addressof(o->handler_), o, o };
+
+ ASIO_HANDLER_COMPLETION((*o));
+
+ // Take ownership of the operation's outstanding work.
+ channel_operation::handler_work<Handler, IoExecutor> w(
+ static_cast<channel_operation::handler_work<Handler, IoExecutor>&&>(
+ o->work_));
+
+ asio::error_code ec;
+ switch (a)
+ {
+ case channel_operation::cancel_op:
+ ec = error::channel_cancelled;
+ break;
+ case channel_operation::close_op:
+ ec = error::channel_closed;
+ break;
+ default:
+ break;
+ }
+
+ // Make a copy of the handler so that the memory can be deallocated before
+ // the handler is posted. Even if we're not about to post the handler, a
+ // sub-object of the handler may be the true owner of the memory associated
+ // with the handler. Consequently, a local copy of the handler is required
+ // to ensure that any owning sub-object remains valid until after we have
+ // deallocated the memory here.
+ asio::detail::binder1<Handler, asio::error_code>
+ handler(o->handler_, ec);
+ p.h = asio::detail::addressof(handler.handler_);
+ p.reset();
+
+ // Post the completion if required.
+ if (a != channel_operation::destroy_op)
+ {
+ ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
+ if (a == channel_operation::immediate_op)
+ w.immediate(handler, handler.handler_, 0);
+ else
+ w.post(handler, handler.handler_);
+ ASIO_HANDLER_INVOCATION_END;
+ }
+ }
+
+private:
+ Handler handler_;
+ channel_operation::handler_work<Handler, IoExecutor> work_;
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SEND_OP_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/channel_service.hpp b/3rdparty/asio/include/asio/experimental/detail/channel_service.hpp
new file mode 100644
index 00000000000..12324414613
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/channel_service.hpp
@@ -0,0 +1,677 @@
+//
+// experimental/detail/channel_service.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 ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SERVICE_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/cancellation_type.hpp"
+#include "asio/detail/mutex.hpp"
+#include "asio/detail/op_queue.hpp"
+#include "asio/execution_context.hpp"
+#include "asio/experimental/detail/channel_message.hpp"
+#include "asio/experimental/detail/channel_receive_op.hpp"
+#include "asio/experimental/detail/channel_send_op.hpp"
+#include "asio/experimental/detail/has_signature.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Mutex>
+class channel_service
+ : public asio::detail::execution_context_service_base<
+ channel_service<Mutex>>
+{
+public:
+ // Possible states for a channel end.
+ enum state
+ {
+ buffer = 0,
+ waiter = 1,
+ block = 2,
+ closed = 3
+ };
+
+ // The base implementation type of all channels.
+ struct base_implementation_type
+ {
+ // Default constructor.
+ base_implementation_type()
+ : receive_state_(block),
+ send_state_(block),
+ max_buffer_size_(0),
+ next_(0),
+ prev_(0)
+ {
+ }
+
+ // The current state of the channel.
+ state receive_state_ : 16;
+ state send_state_ : 16;
+
+ // The maximum number of elements that may be buffered in the channel.
+ std::size_t max_buffer_size_;
+
+ // The operations that are waiting on the channel.
+ asio::detail::op_queue<channel_operation> waiters_;
+
+ // Pointers to adjacent channel implementations in linked list.
+ base_implementation_type* next_;
+ base_implementation_type* prev_;
+
+ // The mutex type to protect the internal implementation.
+ mutable Mutex mutex_;
+ };
+
+ // The implementation for a specific value type.
+ template <typename Traits, typename... Signatures>
+ struct implementation_type;
+
+ // Constructor.
+ channel_service(asio::execution_context& ctx);
+
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown();
+
+ // Construct a new channel implementation.
+ void construct(base_implementation_type& impl, std::size_t max_buffer_size);
+
+ // Destroy a channel implementation.
+ template <typename Traits, typename... Signatures>
+ void destroy(implementation_type<Traits, Signatures...>& impl);
+
+ // Move-construct a new channel implementation.
+ template <typename Traits, typename... Signatures>
+ void move_construct(implementation_type<Traits, Signatures...>& impl,
+ implementation_type<Traits, Signatures...>& other_impl);
+
+ // Move-assign from another channel implementation.
+ template <typename Traits, typename... Signatures>
+ void move_assign(implementation_type<Traits, Signatures...>& impl,
+ channel_service& other_service,
+ implementation_type<Traits, Signatures...>& other_impl);
+
+ // Get the capacity of the channel.
+ std::size_t capacity(
+ const base_implementation_type& impl) const noexcept;
+
+ // Determine whether the channel is open.
+ bool is_open(const base_implementation_type& impl) const noexcept;
+
+ // Reset the channel to its initial state.
+ template <typename Traits, typename... Signatures>
+ void reset(implementation_type<Traits, Signatures...>& impl);
+
+ // Close the channel.
+ template <typename Traits, typename... Signatures>
+ void close(implementation_type<Traits, Signatures...>& impl);
+
+ // Cancel all operations associated with the channel.
+ template <typename Traits, typename... Signatures>
+ void cancel(implementation_type<Traits, Signatures...>& impl);
+
+ // Cancel the operation associated with the channel that has the given key.
+ template <typename Traits, typename... Signatures>
+ void cancel_by_key(implementation_type<Traits, Signatures...>& impl,
+ void* cancellation_key);
+
+ // Determine whether a value can be read from the channel without blocking.
+ bool ready(const base_implementation_type& impl) const noexcept;
+
+ // Synchronously send a new value into the channel.
+ template <typename Message, typename Traits,
+ typename... Signatures, typename... Args>
+ bool try_send(implementation_type<Traits, Signatures...>& impl,
+ bool via_dispatch, Args&&... args);
+
+ // Synchronously send a number of new values into the channel.
+ template <typename Message, typename Traits,
+ typename... Signatures, typename... Args>
+ std::size_t try_send_n(implementation_type<Traits, Signatures...>& impl,
+ std::size_t count, bool via_dispatch, Args&&... args);
+
+ // Asynchronously send a new value into the channel.
+ template <typename Traits, typename... Signatures,
+ typename Handler, typename IoExecutor>
+ void async_send(implementation_type<Traits, Signatures...>& impl,
+ typename implementation_type<Traits,
+ Signatures...>::payload_type&& payload,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef channel_send_op<
+ typename implementation_type<Traits, Signatures...>::payload_type,
+ Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(static_cast<typename implementation_type<
+ Traits, Signatures...>::payload_type&&>(payload), handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<op_cancellation<Traits, Signatures...>>(
+ this, &impl);
+ }
+
+ ASIO_HANDLER_CREATION((this->context(), *p.p,
+ "channel", &impl, 0, "async_send"));
+
+ start_send_op(impl, p.p);
+ p.v = p.p = 0;
+ }
+
+ // Synchronously receive a value from the channel.
+ template <typename Traits, typename... Signatures, typename Handler>
+ bool try_receive(implementation_type<Traits, Signatures...>& impl,
+ Handler&& handler);
+
+ // Asynchronously receive a value from the channel.
+ template <typename Traits, typename... Signatures,
+ typename Handler, typename IoExecutor>
+ void async_receive(implementation_type<Traits, Signatures...>& impl,
+ Handler& handler, const IoExecutor& io_ex)
+ {
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef channel_receive_op<
+ typename implementation_type<Traits, Signatures...>::payload_type,
+ Handler, IoExecutor> op;
+ typename op::ptr p = { asio::detail::addressof(handler),
+ op::ptr::allocate(handler), 0 };
+ p.p = new (p.v) op(handler, io_ex);
+
+ // Optionally register for per-operation cancellation.
+ if (slot.is_connected())
+ {
+ p.p->cancellation_key_ =
+ &slot.template emplace<op_cancellation<Traits, Signatures...>>(
+ this, &impl);
+ }
+
+ ASIO_HANDLER_CREATION((this->context(), *p.p,
+ "channel", &impl, 0, "async_receive"));
+
+ start_receive_op(impl, p.p);
+ p.v = p.p = 0;
+ }
+
+private:
+ // Helper function object to handle a closed notification.
+ template <typename Payload, typename Signature>
+ struct post_receive
+ {
+ explicit post_receive(channel_receive<Payload>* op)
+ : op_(op)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ op_->post(
+ channel_message<Signature>(0,
+ static_cast<Args&&>(args)...));
+ }
+
+ channel_receive<Payload>* op_;
+ };
+
+ // Destroy a base channel implementation.
+ void base_destroy(base_implementation_type& impl);
+
+ // Helper function to start an asynchronous put operation.
+ template <typename Traits, typename... Signatures>
+ void start_send_op(implementation_type<Traits, Signatures...>& impl,
+ channel_send<typename implementation_type<
+ Traits, Signatures...>::payload_type>* send_op);
+
+ // Helper function to start an asynchronous get operation.
+ template <typename Traits, typename... Signatures>
+ void start_receive_op(implementation_type<Traits, Signatures...>& impl,
+ channel_receive<typename implementation_type<
+ Traits, Signatures...>::payload_type>* receive_op);
+
+ // Helper class used to implement per-operation cancellation.
+ template <typename Traits, typename... Signatures>
+ class op_cancellation
+ {
+ public:
+ op_cancellation(channel_service* s,
+ implementation_type<Traits, Signatures...>* impl)
+ : service_(s),
+ impl_(impl)
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (!!(type &
+ (cancellation_type::terminal
+ | cancellation_type::partial
+ | cancellation_type::total)))
+ {
+ service_->cancel_by_key(*impl_, this);
+ }
+ }
+
+ private:
+ channel_service* service_;
+ implementation_type<Traits, Signatures...>* impl_;
+ };
+
+ // Mutex to protect access to the linked list of implementations.
+ asio::detail::mutex mutex_;
+
+ // The head of a linked list of all implementations.
+ base_implementation_type* impl_list_;
+};
+
+// The implementation for a specific value type.
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+struct channel_service<Mutex>::implementation_type : base_implementation_type
+{
+ // The traits type associated with the channel.
+ typedef typename Traits::template rebind<Signatures...>::other traits_type;
+
+ // Type of an element stored in the buffer.
+ typedef conditional_t<
+ has_signature<
+ typename traits_type::receive_cancelled_signature,
+ Signatures...
+ >::value,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ Signatures...
+ >::value,
+ channel_payload<Signatures...>,
+ channel_payload<
+ Signatures...,
+ typename traits_type::receive_closed_signature
+ >
+ >,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ Signatures...,
+ typename traits_type::receive_cancelled_signature
+ >::value,
+ channel_payload<
+ Signatures...,
+ typename traits_type::receive_cancelled_signature
+ >,
+ channel_payload<
+ Signatures...,
+ typename traits_type::receive_cancelled_signature,
+ typename traits_type::receive_closed_signature
+ >
+ >
+ > payload_type;
+
+ // Move from another buffer.
+ void buffer_move_from(implementation_type& other)
+ {
+ buffer_ = static_cast<
+ typename traits_type::template container<payload_type>::type&&>(
+ other.buffer_);
+ other.buffer_clear();
+ }
+
+ // Get number of buffered elements.
+ std::size_t buffer_size() const
+ {
+ return buffer_.size();
+ }
+
+ // Push a new value to the back of the buffer.
+ void buffer_push(payload_type payload)
+ {
+ buffer_.push_back(static_cast<payload_type&&>(payload));
+ }
+
+ // Push new values to the back of the buffer.
+ std::size_t buffer_push_n(std::size_t count, payload_type payload)
+ {
+ std::size_t i = 0;
+ for (; i < count && buffer_.size() < this->max_buffer_size_; ++i)
+ buffer_.push_back(payload);
+ return i;
+ }
+
+ // Get the element at the front of the buffer.
+ payload_type buffer_front()
+ {
+ return static_cast<payload_type&&>(buffer_.front());
+ }
+
+ // Pop a value from the front of the buffer.
+ void buffer_pop()
+ {
+ buffer_.pop_front();
+ }
+
+ // Clear all buffered values.
+ void buffer_clear()
+ {
+ buffer_.clear();
+ }
+
+private:
+ // Buffered values.
+ typename traits_type::template container<payload_type>::type buffer_;
+};
+
+// The implementation for a void value type.
+template <typename Mutex>
+template <typename Traits, typename R>
+struct channel_service<Mutex>::implementation_type<Traits, R()>
+ : channel_service::base_implementation_type
+{
+ // The traits type associated with the channel.
+ typedef typename Traits::template rebind<R()>::other traits_type;
+
+ // Type of an element stored in the buffer.
+ typedef conditional_t<
+ has_signature<
+ typename traits_type::receive_cancelled_signature,
+ R()
+ >::value,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ R()
+ >::value,
+ channel_payload<R()>,
+ channel_payload<
+ R(),
+ typename traits_type::receive_closed_signature
+ >
+ >,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ R(),
+ typename traits_type::receive_cancelled_signature
+ >::value,
+ channel_payload<
+ R(),
+ typename traits_type::receive_cancelled_signature
+ >,
+ channel_payload<
+ R(),
+ typename traits_type::receive_cancelled_signature,
+ typename traits_type::receive_closed_signature
+ >
+ >
+ > payload_type;
+
+ // Construct with empty buffer.
+ implementation_type()
+ : buffer_(0)
+ {
+ }
+
+ // Move from another buffer.
+ void buffer_move_from(implementation_type& other)
+ {
+ buffer_ = other.buffer_;
+ other.buffer_ = 0;
+ }
+
+ // Get number of buffered elements.
+ std::size_t buffer_size() const
+ {
+ return buffer_;
+ }
+
+ // Push a new value to the back of the buffer.
+ void buffer_push(payload_type)
+ {
+ ++buffer_;
+ }
+
+ // Push new values to the back of the buffer.
+ std::size_t buffer_push_n(std::size_t count, payload_type)
+ {
+ std::size_t available = this->max_buffer_size_ - buffer_;
+ count = (count < available) ? count : available;
+ buffer_ += count;
+ return count;
+ }
+
+ // Get the element at the front of the buffer.
+ payload_type buffer_front()
+ {
+ return payload_type(channel_message<R()>(0));
+ }
+
+ // Pop a value from the front of the buffer.
+ void buffer_pop()
+ {
+ --buffer_;
+ }
+
+ // Clear all values from the buffer.
+ void buffer_clear()
+ {
+ buffer_ = 0;
+ }
+
+private:
+ // Number of buffered "values".
+ std::size_t buffer_;
+};
+
+// The implementation for an error_code signature.
+template <typename Mutex>
+template <typename Traits, typename R>
+struct channel_service<Mutex>::implementation_type<
+ Traits, R(asio::error_code)>
+ : channel_service::base_implementation_type
+{
+ // The traits type associated with the channel.
+ typedef typename Traits::template rebind<R(asio::error_code)>::other
+ traits_type;
+
+ // Type of an element stored in the buffer.
+ typedef conditional_t<
+ has_signature<
+ typename traits_type::receive_cancelled_signature,
+ R(asio::error_code)
+ >::value,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ R(asio::error_code)
+ >::value,
+ channel_payload<R(asio::error_code)>,
+ channel_payload<
+ R(asio::error_code),
+ typename traits_type::receive_closed_signature
+ >
+ >,
+ conditional_t<
+ has_signature<
+ typename traits_type::receive_closed_signature,
+ R(asio::error_code),
+ typename traits_type::receive_cancelled_signature
+ >::value,
+ channel_payload<
+ R(asio::error_code),
+ typename traits_type::receive_cancelled_signature
+ >,
+ channel_payload<
+ R(asio::error_code),
+ typename traits_type::receive_cancelled_signature,
+ typename traits_type::receive_closed_signature
+ >
+ >
+ > payload_type;
+
+ // Construct with empty buffer.
+ implementation_type()
+ : size_(0)
+ {
+ first_.count_ = 0;
+ }
+
+ // Move from another buffer.
+ void buffer_move_from(implementation_type& other)
+ {
+ size_ = other.buffer_;
+ other.size_ = 0;
+ first_ = other.first_;
+ other.first.count_ = 0;
+ rest_ = static_cast<
+ typename traits_type::template container<buffered_value>::type&&>(
+ other.rest_);
+ other.buffer_clear();
+ }
+
+ // Get number of buffered elements.
+ std::size_t buffer_size() const
+ {
+ return size_;
+ }
+
+ // Push a new value to the back of the buffer.
+ void buffer_push(payload_type payload)
+ {
+ buffered_value& last = rest_.empty() ? first_ : rest_.back();
+ if (last.count_ == 0)
+ {
+ value_handler handler{last.value_};
+ payload.receive(handler);
+ last.count_ = 1;
+ }
+ else
+ {
+ asio::error_code value{last.value_};
+ value_handler handler{value};
+ payload.receive(handler);
+ if (last.value_ == value)
+ ++last.count_;
+ else
+ rest_.push_back({value, 1});
+ }
+ ++size_;
+ }
+
+ // Push new values to the back of the buffer.
+ std::size_t buffer_push_n(std::size_t count, payload_type payload)
+ {
+ std::size_t available = this->max_buffer_size_ - size_;
+ count = (count < available) ? count : available;
+ if (count > 0)
+ {
+ buffered_value& last = rest_.empty() ? first_ : rest_.back();
+ if (last.count_ == 0)
+ {
+ payload.receive(value_handler{last.value_});
+ last.count_ = count;
+ }
+ else
+ {
+ asio::error_code value{last.value_};
+ payload.receive(value_handler{value});
+ if (last.value_ == value)
+ last.count_ += count;
+ else
+ rest_.push_back({value, count});
+ }
+ size_ += count;
+ }
+ return count;
+ }
+
+ // Get the element at the front of the buffer.
+ payload_type buffer_front()
+ {
+ return payload_type({0, first_.value_});
+ }
+
+ // Pop a value from the front of the buffer.
+ void buffer_pop()
+ {
+ --size_;
+ if (--first_.count_ == 0 && !rest_.empty())
+ {
+ first_ = rest_.front();
+ rest_.pop_front();
+ }
+ }
+
+ // Clear all values from the buffer.
+ void buffer_clear()
+ {
+ size_ = 0;
+ first_.count_ == 0;
+ rest_.clear();
+ }
+
+private:
+ struct buffered_value
+ {
+ asio::error_code value_;
+ std::size_t count_;
+ };
+
+ struct value_handler
+ {
+ asio::error_code& target_;
+
+ template <typename... Args>
+ void operator()(const asio::error_code& value, Args&&...)
+ {
+ target_ = value;
+ }
+ };
+
+ buffered_value& last_value()
+ {
+ return rest_.empty() ? first_ : rest_.back();
+ }
+
+ // Total number of buffered values.
+ std::size_t size_;
+
+ // The first buffered value is maintained as a separate data member to avoid
+ // allocating space in the container in the common case.
+ buffered_value first_;
+
+ // The rest of the buffered values.
+ typename traits_type::template container<buffered_value>::type rest_;
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/experimental/detail/impl/channel_service.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CHANNEL_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/completion_handler_erasure.hpp b/3rdparty/asio/include/asio/experimental/detail/completion_handler_erasure.hpp
deleted file mode 100644
index aca02496957..00000000000
--- a/3rdparty/asio/include/asio/experimental/detail/completion_handler_erasure.hpp
+++ /dev/null
@@ -1,158 +0,0 @@
-//
-// experimental/detail/completion_handler_erasure.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
-//
-// 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 ASIO_EXPERIMENTAL_DETAIL_COMPLETION_HANDLER_ERASURE_HPP
-#define ASIO_EXPERIMENTAL_DETAIL_COMPLETION_HANDLER_ERASURE_HPP
-
-#include "asio/associated_allocator.hpp"
-#include "asio/dispatch.hpp"
-
-namespace asio {
-
-class any_io_executor;
-
-namespace experimental {
-namespace detail {
-
-template<typename Signature, typename Executor>
-struct completion_handler_erasure_base;
-
-template<typename Func, typename Signature, typename Executor>
-struct completion_handler_erasure_impl;
-
-template<typename Return, typename ... Args, typename Executor>
-struct completion_handler_erasure_base<Return(Args...), Executor>
-{
- Executor executor;
-
- completion_handler_erasure_base(Executor&& executor)
- : executor(std::move(executor))
- {
- }
-
- virtual Return call(Args ...args) = 0;
- virtual ~completion_handler_erasure_base() = default;
-};
-
-template<typename Func, typename Return, typename ... Args, typename Executor>
-struct completion_handler_erasure_impl<Func, Return(Args...), Executor> final
- : completion_handler_erasure_base<Return(Args...), Executor>
-{
- completion_handler_erasure_impl(Executor&& exec, Func&& func)
- : completion_handler_erasure_base<Return(Args...), Executor>(
- std::move(exec)), func(std::move(func))
- {
- }
-
- virtual Return call(Args ...args) override
- {
- std::move(func)(std::move(args)...);
- }
-
- Func func;
-};
-
-template<typename Signature, typename Executor = any_io_executor>
-struct completion_handler_erasure;
-
-template<typename Return, typename ... Args, typename Executor>
-struct completion_handler_erasure<Return(Args...), Executor>
-{
- struct deleter_t
- {
- using allocator_base = typename associated_allocator<Executor>::type;
- using allocator_type =
- typename std::allocator_traits<allocator_base>::template rebind_alloc<
- completion_handler_erasure_base<Return(Args...), Executor>>;
-
- allocator_type allocator;
- std::size_t size;
-
- template<typename Func>
- static std::unique_ptr<
- completion_handler_erasure_base<Return(Args...), Executor>, deleter_t>
- make(Executor exec, Func&& func)
- {
- using type = completion_handler_erasure_impl<
- std::remove_reference_t<Func>, Return(Args...), Executor>;
- using alloc_type = typename std::allocator_traits<
- allocator_base>::template rebind_alloc<type>;
- auto alloc = alloc_type(get_associated_allocator(exec));
- auto size = sizeof(type);
- auto p = std::allocator_traits<alloc_type>::allocate(alloc, size);
- auto res = std::unique_ptr<type, deleter_t>(
- p, deleter_t{allocator_type(alloc), size});
- std::allocator_traits<alloc_type>::construct(alloc,
- p, std::move(exec), std::forward<Func>(func));
- return res;
- }
-
- void operator()(
- completion_handler_erasure_base<Return(Args...), Executor> * p)
- {
- std::allocator_traits<allocator_type>::destroy(allocator, p);
- std::allocator_traits<allocator_type>::deallocate(allocator, p, size);
- }
- };
-
- completion_handler_erasure(const completion_handler_erasure&) = delete;
- completion_handler_erasure(completion_handler_erasure&&) = default;
- completion_handler_erasure& operator=(
- const completion_handler_erasure&) = delete;
- completion_handler_erasure& operator=(
- completion_handler_erasure&&) = default;
-
- constexpr completion_handler_erasure() = default;
-
- constexpr completion_handler_erasure(nullptr_t)
- : completion_handler_erasure()
- {
- }
-
- template<typename Func>
- completion_handler_erasure(Executor exec, Func&& func)
- : impl_(deleter_t::make(std::move(exec), std::forward<Func>(func)))
- {
- }
-
- ~completion_handler_erasure()
- {
- if (auto f = std::exchange(impl_, nullptr); f != nullptr)
- {
- asio::dispatch(f->executor,
- [f = std::move(f)]() mutable
- {
- std::move(f)->call(Args{}...);
- });
- }
- }
-
- Return operator()(Args ... args)
- {
- if (auto f = std::exchange(impl_, nullptr); f != nullptr)
- f->call(std::move(args)...);
- }
-
- constexpr bool operator==(nullptr_t) const noexcept {return impl_ == nullptr;}
- constexpr bool operator!=(nullptr_t) const noexcept {return impl_ != nullptr;}
- constexpr bool operator!() const noexcept {return impl_ == nullptr;}
-
-private:
- std::unique_ptr<
- completion_handler_erasure_base<Return(Args...), Executor>, deleter_t>
- impl_;
-};
-
-} // namespace detail
-} // namespace experimental
-} // namespace asio
-
-#endif // ASIO_EXPERIMENTAL_DETAIL_COMPLETION_HANDLER_ERASURE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/coro_completion_handler.hpp b/3rdparty/asio/include/asio/experimental/detail/coro_completion_handler.hpp
new file mode 100644
index 00000000000..52809134cb0
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/coro_completion_handler.hpp
@@ -0,0 +1,169 @@
+//
+// experimental/detail/coro_completion_handler.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_DETAIL_CORO_COMPLETION_HANDLER_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_CORO_COMPLETION_HANDLER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/deferred.hpp"
+#include "asio/experimental/coro.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Promise, typename... Args>
+struct coro_completion_handler
+{
+ coro_completion_handler(coroutine_handle<Promise> h,
+ std::optional<std::tuple<Args...>>& result)
+ : self(h),
+ result(result)
+ {
+ }
+
+ coro_completion_handler(coro_completion_handler&&) = default;
+
+ coroutine_handle<Promise> self;
+
+ std::optional<std::tuple<Args...>>& result;
+
+ using promise_type = Promise;
+
+ void operator()(Args... args)
+ {
+ result.emplace(std::move(args)...);
+ self.resume();
+ }
+
+ using allocator_type = typename promise_type::allocator_type;
+ allocator_type get_allocator() const noexcept
+ {
+ return self.promise().get_allocator();
+ }
+
+ using executor_type = typename promise_type::executor_type;
+ executor_type get_executor() const noexcept
+ {
+ return self.promise().get_executor();
+ }
+
+ using cancellation_slot_type = typename promise_type::cancellation_slot_type;
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return self.promise().get_cancellation_slot();
+ }
+};
+
+template <typename Signature>
+struct coro_completion_handler_type;
+
+template <typename... Args>
+struct coro_completion_handler_type<void(Args...)>
+{
+ using type = std::tuple<Args...>;
+
+ template <typename Promise>
+ using completion_handler = coro_completion_handler<Promise, Args...>;
+};
+
+template <typename Signature>
+using coro_completion_handler_type_t =
+ typename coro_completion_handler_type<Signature>::type;
+
+inline void coro_interpret_result(std::tuple<>&&)
+{
+}
+
+template <typename... Args>
+inline auto coro_interpret_result(std::tuple<Args...>&& args)
+{
+ return std::move(args);
+}
+
+template <typename... Args>
+auto coro_interpret_result(std::tuple<std::exception_ptr, Args...>&& args)
+{
+ if (std::get<0>(args))
+ std::rethrow_exception(std::get<0>(args));
+
+ return std::apply(
+ [](auto, auto&&... rest)
+ {
+ return std::make_tuple(std::move(rest)...);
+ }, std::move(args));
+}
+
+template <typename... Args>
+auto coro_interpret_result(
+ std::tuple<asio::error_code, Args...>&& args)
+{
+ if (std::get<0>(args))
+ asio::detail::throw_exception(
+ asio::system_error(std::get<0>(args)));
+
+ return std::apply(
+ [](auto, auto&&... rest)
+ {
+ return std::make_tuple(std::move(rest)...);
+ }, std::move(args));
+}
+
+template <typename Arg>
+inline auto coro_interpret_result(std::tuple<Arg>&& args)
+{
+ return std::get<0>(std::move(args));
+}
+
+template <typename Arg>
+auto coro_interpret_result(std::tuple<std::exception_ptr, Arg>&& args)
+{
+ if (std::get<0>(args))
+ std::rethrow_exception(std::get<0>(args));
+ return std::get<1>(std::move(args));
+}
+
+inline auto coro_interpret_result(
+ std::tuple<asio::error_code>&& args)
+{
+ if (std::get<0>(args))
+ asio::detail::throw_exception(
+ asio::system_error(std::get<0>(args)));
+}
+
+inline auto coro_interpret_result(std::tuple<std::exception_ptr>&& args)
+{
+ if (std::get<0>(args))
+ std::rethrow_exception(std::get<0>(args));
+}
+
+template <typename Arg>
+auto coro_interpret_result(std::tuple<asio::error_code, Arg>&& args)
+{
+ if (std::get<0>(args))
+ asio::detail::throw_exception(
+ asio::system_error(std::get<0>(args)));
+ return std::get<1>(std::move(args));
+}
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_CORO_COMPLETION_HANDLER_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/coro_promise_allocator.hpp b/3rdparty/asio/include/asio/experimental/detail/coro_promise_allocator.hpp
index bb78677f115..328646968f3 100644
--- a/3rdparty/asio/include/asio/experimental/detail/coro_promise_allocator.hpp
+++ b/3rdparty/asio/include/asio/experimental/detail/coro_promise_allocator.hpp
@@ -2,8 +2,8 @@
// experimental/detail/coro_promise_allocator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -13,101 +13,124 @@
#define ASIO_EXPERIMENTAL_DETAIL_CORO_PROMISE_ALLOCATOR_HPP
#include "asio/detail/config.hpp"
-#include "asio/experimental/detail/coro_traits.hpp"
+#include "asio/experimental/coro_traits.hpp"
namespace asio {
namespace experimental {
namespace detail {
-template <typename Coroutine,
- typename Executor = typename Coroutine::executor_type,
- typename Allocator = typename std::allocator_traits<
- associated_allocator_t<Executor>>:: template rebind_alloc<std::byte>,
- bool Noexcept = noexcept(std::declval<Allocator>().allocate(0u))>
-struct coro_promise_allocator
+/// Allocate the memory and put the allocator behind the coro memory
+template <typename AllocatorType>
+void* allocate_coroutine(const std::size_t size, AllocatorType alloc_)
{
- using allocator_type = Allocator;
+ using alloc_type = typename std::allocator_traits<AllocatorType>::template
+ rebind_alloc<unsigned char>;
+ alloc_type alloc{alloc_};
+
+ const auto align_needed = size % alignof(alloc_type);
+ const auto align_offset = align_needed != 0
+ ? alignof(alloc_type) - align_needed : 0ull;
+ const auto alloc_size = size + sizeof(alloc_type) + align_offset;
+ const auto raw =
+ std::allocator_traits<alloc_type>::allocate(alloc, alloc_size);
+ new(raw + size + align_offset) alloc_type(std::move(alloc));
+
+ return raw;
+}
+
+/// Deallocate the memory and destroy the allocator in the coro memory.
+template <typename AllocatorType>
+void deallocate_coroutine(void* raw_, const std::size_t size)
+{
+ using alloc_type = typename std::allocator_traits<AllocatorType>::template
+ rebind_alloc<unsigned char>;
- template <typename... Args>
- void* operator new(const std::size_t size, Executor executor, Args&&...)
- {
- static_assert(std::is_nothrow_move_constructible_v<allocator_type>);
- allocator_type alloc{get_associated_allocator(executor)};
-
- const auto csize = size + sizeof(alloc);
- const auto raw =
- std::allocator_traits<allocator_type>::allocate(alloc, csize);
- new (raw) allocator_type(std::move(alloc));
- return static_cast<std::byte*>(raw) + sizeof(alloc);
- }
+ const auto raw = static_cast<unsigned char *>(raw_);
- template <execution_context Context, typename... Args>
- void* operator new(const std::size_t size, Context&& ctx, Args&&... args)
- {
- return coro_promise_allocator::operator new(size,
- ctx.get_executor(), std::forward<Args>(args)...);
- }
+ const auto align_needed = size % alignof(alloc_type);
+ const auto align_offset = align_needed != 0
+ ? alignof(alloc_type) - align_needed : 0ull;
+ const auto alloc_size = size + sizeof(alloc_type) + align_offset;
- void operator delete(void* raw, std::size_t size )
- {
- auto * alloc_p = static_cast<allocator_type*>(raw);
+ auto alloc_p = reinterpret_cast<alloc_type *>(raw + size + align_offset);
+ auto alloc = std::move(*alloc_p);
+ alloc_p->~alloc_type();
+ std::allocator_traits<alloc_type>::deallocate(alloc, raw, alloc_size);
+}
+
+template <typename T>
+constexpr std::size_t variadic_first(std::size_t = 0u)
+{
+ return std::numeric_limits<std::size_t>::max();
+}
- auto alloc = std::move(*alloc_p);
- alloc_p->~allocator_type();
- std::allocator_traits<allocator_type>::deallocate(alloc,
- static_cast<std::byte*>(raw), size + sizeof(allocator_type));
- }
-};
-template <typename Coroutine, typename Executor>
-struct coro_promise_allocator<Coroutine,
- Executor, std::allocator<std::byte>, false>
+template <typename T, typename First, typename... Args>
+constexpr std::size_t variadic_first(std::size_t pos = 0u)
{
+ if constexpr (std::is_same_v<std::decay_t<First>, T>)
+ return pos;
+ else
+ return variadic_first<T, Args...>(pos+1);
+}
+
+template <std::size_t Idx, typename First, typename... Args>
+ requires (Idx <= sizeof...(Args))
+constexpr decltype(auto) get_variadic(First&& first, Args&&... args)
+{
+ if constexpr (Idx == 0u)
+ return static_cast<First>(first);
+ else
+ return get_variadic<Idx-1u>(static_cast<Args>(args)...);
+}
-};
+template <std::size_t Idx>
+constexpr decltype(auto) get_variadic();
-template <typename Coroutine, typename Executor, typename Allocator>
-struct coro_promise_allocator<Coroutine, Executor, Allocator, true>
+template <typename Allocator>
+struct coro_promise_allocator
{
using allocator_type = Allocator;
+ allocator_type get_allocator() const {return alloc_;}
template <typename... Args>
- void* operator new(const std::size_t size,
- Executor executor, Args&&...) noexcept
+ 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, const std::size_t size)
{
- static_assert(std::is_nothrow_move_constructible_v<allocator_type>);
- allocator_type alloc{get_associated_allocator(executor)};
-
- const auto csize = size + sizeof(alloc);
- const auto raw =
- std::allocator_traits<allocator_type>::allocate(alloc, csize);
- if (raw == nullptr)
- return nullptr;
- new (raw) allocator_type(std::move(alloc));
- return static_cast<std::byte*>(raw) + sizeof(alloc);
+ deallocate_coroutine<allocator_type>(raw, size);
}
- template <execution_context Context, typename... Args>
- void* operator new(const std::size_t size,
- Context&& ctx, Args&&... args) noexcept
+ template <typename... Args>
+ coro_promise_allocator(Args&& ... args)
+ : alloc_(
+ get_variadic<variadic_first<std::allocator_arg_t,
+ std::decay_t<Args>...>() + 1u>(args...))
{
- return coro_promise_allocator::operator new(size,
- ctx.get_executor(), std::forward<Args>(args)...);
}
- void operator delete(void* raw, std::size_t size) noexcept
+private:
+ allocator_type alloc_;
+};
+
+template <>
+struct coro_promise_allocator<std::allocator<void>>
+{
+ using allocator_type = std::allocator<void>;
+
+ template <typename... Args>
+ coro_promise_allocator(Args&&...)
{
- auto * alloc_p = static_cast<allocator_type*>(raw);
- auto alloc = std::move(*alloc_p);
- alloc_p->~allocator_type();
- const auto csize = size + sizeof(allocator_type);
- std::allocator_traits<allocator_type>::deallocate(alloc,
- static_cast<std::byte*>(raw) - sizeof(allocator_type), csize);
}
- static auto get_return_object_on_allocation_failure() noexcept -> Coroutine
+ allocator_type get_allocator() const
{
- return Coroutine{};
+ return {};
}
};
diff --git a/3rdparty/asio/include/asio/experimental/detail/has_signature.hpp b/3rdparty/asio/include/asio/experimental/detail/has_signature.hpp
new file mode 100644
index 00000000000..ea5dac8c69b
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/has_signature.hpp
@@ -0,0 +1,54 @@
+//
+// experimental/detail/has_signature.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 ASIO_EXPERIMENTAL_DETAIL_HAS_SIGNATURE_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_HAS_SIGNATURE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename S, typename... Signatures>
+struct has_signature;
+
+template <typename S, typename... Signatures>
+struct has_signature;
+
+template <typename S>
+struct has_signature<S> : false_type
+{
+};
+
+template <typename S, typename... Signatures>
+struct has_signature<S, S, Signatures...> : true_type
+{
+};
+
+template <typename S, typename Head, typename... Tail>
+struct has_signature<S, Head, Tail...> : has_signature<S, Tail...>
+{
+};
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_HAS_SIGNATURE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/impl/channel_service.hpp b/3rdparty/asio/include/asio/experimental/detail/impl/channel_service.hpp
new file mode 100644
index 00000000000..797c9f433c7
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/detail/impl/channel_service.hpp
@@ -0,0 +1,621 @@
+//
+// experimental/detail/impl/channel_service.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 ASIO_EXPERIMENTAL_DETAIL_IMPL_CHANNEL_SERVICE_HPP
+#define ASIO_EXPERIMENTAL_DETAIL_IMPL_CHANNEL_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+template <typename Mutex>
+inline channel_service<Mutex>::channel_service(
+ asio::execution_context& ctx)
+ : asio::detail::execution_context_service_base<channel_service>(ctx),
+ mutex_(),
+ impl_list_(0)
+{
+}
+
+template <typename Mutex>
+inline void channel_service<Mutex>::shutdown()
+{
+ // Abandon all pending operations.
+ asio::detail::op_queue<channel_operation> ops;
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ base_implementation_type* impl = impl_list_;
+ while (impl)
+ {
+ ops.push(impl->waiters_);
+ impl = impl->next_;
+ }
+}
+
+template <typename Mutex>
+inline void channel_service<Mutex>::construct(
+ channel_service<Mutex>::base_implementation_type& impl,
+ std::size_t max_buffer_size)
+{
+ impl.max_buffer_size_ = max_buffer_size;
+ impl.receive_state_ = block;
+ impl.send_state_ = max_buffer_size ? buffer : block;
+
+ // Insert implementation into linked list of all implementations.
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::destroy(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl)
+{
+ cancel(impl);
+ base_destroy(impl);
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::move_construct(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ channel_service<Mutex>::implementation_type<
+ Traits, Signatures...>& other_impl)
+{
+ impl.max_buffer_size_ = other_impl.max_buffer_size_;
+ impl.receive_state_ = other_impl.receive_state_;
+ other_impl.receive_state_ = block;
+ impl.send_state_ = other_impl.send_state_;
+ other_impl.send_state_ = other_impl.max_buffer_size_ ? buffer : block;
+ impl.buffer_move_from(other_impl);
+
+ // Insert implementation into linked list of all implementations.
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ impl.next_ = impl_list_;
+ impl.prev_ = 0;
+ if (impl_list_)
+ impl_list_->prev_ = &impl;
+ impl_list_ = &impl;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::move_assign(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ channel_service& other_service,
+ channel_service<Mutex>::implementation_type<
+ Traits, Signatures...>& other_impl)
+{
+ cancel(impl);
+
+ if (this != &other_service)
+ {
+ // Remove implementation from linked list of all implementations.
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+ }
+
+ impl.max_buffer_size_ = other_impl.max_buffer_size_;
+ impl.receive_state_ = other_impl.receive_state_;
+ other_impl.receive_state_ = block;
+ impl.send_state_ = other_impl.send_state_;
+ other_impl.send_state_ = other_impl.max_buffer_size_ ? buffer : block;
+ impl.buffer_move_from(other_impl);
+
+ if (this != &other_service)
+ {
+ // Insert implementation into linked list of all implementations.
+ asio::detail::mutex::scoped_lock lock(other_service.mutex_);
+ impl.next_ = other_service.impl_list_;
+ impl.prev_ = 0;
+ if (other_service.impl_list_)
+ other_service.impl_list_->prev_ = &impl;
+ other_service.impl_list_ = &impl;
+ }
+}
+
+template <typename Mutex>
+inline void channel_service<Mutex>::base_destroy(
+ channel_service<Mutex>::base_implementation_type& impl)
+{
+ // Remove implementation from linked list of all implementations.
+ asio::detail::mutex::scoped_lock lock(mutex_);
+ if (impl_list_ == &impl)
+ impl_list_ = impl.next_;
+ if (impl.prev_)
+ impl.prev_->next_ = impl.next_;
+ if (impl.next_)
+ impl.next_->prev_= impl.prev_;
+ impl.next_ = 0;
+ impl.prev_ = 0;
+}
+
+template <typename Mutex>
+inline std::size_t channel_service<Mutex>::capacity(
+ const channel_service<Mutex>::base_implementation_type& impl)
+ const noexcept
+{
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ return impl.max_buffer_size_;
+}
+
+template <typename Mutex>
+inline bool channel_service<Mutex>::is_open(
+ const channel_service<Mutex>::base_implementation_type& impl)
+ const noexcept
+{
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ return impl.send_state_ != closed;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::reset(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl)
+{
+ cancel(impl);
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ impl.receive_state_ = block;
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+ impl.buffer_clear();
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::close(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::traits_type traits_type;
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ if (impl.receive_state_ == block)
+ {
+ while (channel_operation* op = impl.waiters_.front())
+ {
+ impl.waiters_.pop();
+ traits_type::invoke_receive_closed(
+ post_receive<payload_type,
+ typename traits_type::receive_closed_signature>(
+ static_cast<channel_receive<payload_type>*>(op)));
+ }
+ }
+
+ impl.send_state_ = closed;
+ if (impl.receive_state_ != buffer)
+ impl.receive_state_ = closed;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::cancel(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::traits_type traits_type;
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ while (channel_operation* op = impl.waiters_.front())
+ {
+ if (impl.send_state_ == block)
+ {
+ impl.waiters_.pop();
+ static_cast<channel_send<payload_type>*>(op)->cancel();
+ }
+ else
+ {
+ impl.waiters_.pop();
+ traits_type::invoke_receive_cancelled(
+ post_receive<payload_type,
+ typename traits_type::receive_cancelled_signature>(
+ static_cast<channel_receive<payload_type>*>(op)));
+ }
+ }
+
+ if (impl.receive_state_ == waiter)
+ impl.receive_state_ = block;
+ if (impl.send_state_ == waiter)
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::cancel_by_key(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ void* cancellation_key)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::traits_type traits_type;
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ asio::detail::op_queue<channel_operation> other_ops;
+ while (channel_operation* op = impl.waiters_.front())
+ {
+ if (op->cancellation_key_ == cancellation_key)
+ {
+ if (impl.send_state_ == block)
+ {
+ impl.waiters_.pop();
+ static_cast<channel_send<payload_type>*>(op)->cancel();
+ }
+ else
+ {
+ impl.waiters_.pop();
+ traits_type::invoke_receive_cancelled(
+ post_receive<payload_type,
+ typename traits_type::receive_cancelled_signature>(
+ static_cast<channel_receive<payload_type>*>(op)));
+ }
+ }
+ else
+ {
+ impl.waiters_.pop();
+ other_ops.push(op);
+ }
+ }
+ impl.waiters_.push(other_ops);
+
+ if (impl.waiters_.empty())
+ {
+ if (impl.receive_state_ == waiter)
+ impl.receive_state_ = block;
+ if (impl.send_state_ == waiter)
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+ }
+}
+
+template <typename Mutex>
+inline bool channel_service<Mutex>::ready(
+ const channel_service<Mutex>::base_implementation_type& impl)
+ const noexcept
+{
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ return impl.receive_state_ != block;
+}
+
+template <typename Mutex>
+template <typename Message, typename Traits,
+ typename... Signatures, typename... Args>
+bool channel_service<Mutex>::try_send(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ bool via_dispatch, Args&&... args)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ switch (impl.send_state_)
+ {
+ case block:
+ {
+ return false;
+ }
+ case buffer:
+ {
+ impl.buffer_push(Message(0, static_cast<Args&&>(args)...));
+ impl.receive_state_ = buffer;
+ if (impl.buffer_size() == impl.max_buffer_size_)
+ impl.send_state_ = block;
+ return true;
+ }
+ case waiter:
+ {
+ payload_type payload(Message(0, static_cast<Args&&>(args)...));
+ channel_receive<payload_type>* receive_op =
+ static_cast<channel_receive<payload_type>*>(impl.waiters_.front());
+ impl.waiters_.pop();
+ if (impl.waiters_.empty())
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+ lock.unlock();
+ if (via_dispatch)
+ receive_op->dispatch(static_cast<payload_type&&>(payload));
+ else
+ receive_op->post(static_cast<payload_type&&>(payload));
+ return true;
+ }
+ case closed:
+ default:
+ {
+ return false;
+ }
+ }
+}
+
+template <typename Mutex>
+template <typename Message, typename Traits,
+ typename... Signatures, typename... Args>
+std::size_t channel_service<Mutex>::try_send_n(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ std::size_t count, bool via_dispatch, Args&&... args)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ if (count == 0)
+ return 0;
+
+ switch (impl.send_state_)
+ {
+ case block:
+ return 0;
+ case buffer:
+ case waiter:
+ break;
+ case closed:
+ default:
+ return 0;
+ }
+
+ payload_type payload(Message(0, static_cast<Args&&>(args)...));
+
+ for (std::size_t i = 0; i < count; ++i)
+ {
+ switch (impl.send_state_)
+ {
+ case block:
+ {
+ return i;
+ }
+ case buffer:
+ {
+ i += impl.buffer_push_n(count - i,
+ static_cast<payload_type&&>(payload));
+ impl.receive_state_ = buffer;
+ if (impl.buffer_size() == impl.max_buffer_size_)
+ impl.send_state_ = block;
+ return i;
+ }
+ case waiter:
+ {
+ channel_receive<payload_type>* receive_op =
+ static_cast<channel_receive<payload_type>*>(impl.waiters_.front());
+ impl.waiters_.pop();
+ if (impl.waiters_.empty())
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+ lock.unlock();
+ if (via_dispatch)
+ receive_op->dispatch(payload);
+ else
+ receive_op->post(payload);
+ break;
+ }
+ case closed:
+ default:
+ {
+ return i;
+ }
+ }
+ }
+
+ return count;
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::start_send_op(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ channel_send<typename implementation_type<
+ Traits, Signatures...>::payload_type>* send_op)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ switch (impl.send_state_)
+ {
+ case block:
+ {
+ impl.waiters_.push(send_op);
+ if (impl.receive_state_ == block)
+ impl.receive_state_ = waiter;
+ return;
+ }
+ case buffer:
+ {
+ impl.buffer_push(send_op->get_payload());
+ impl.receive_state_ = buffer;
+ if (impl.buffer_size() == impl.max_buffer_size_)
+ impl.send_state_ = block;
+ send_op->immediate();
+ break;
+ }
+ case waiter:
+ {
+ channel_receive<payload_type>* receive_op =
+ static_cast<channel_receive<payload_type>*>(impl.waiters_.front());
+ impl.waiters_.pop();
+ if (impl.waiters_.empty())
+ impl.send_state_ = impl.max_buffer_size_ ? buffer : block;
+ receive_op->post(send_op->get_payload());
+ send_op->immediate();
+ break;
+ }
+ case closed:
+ default:
+ {
+ send_op->close();
+ break;
+ }
+ }
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures, typename Handler>
+bool channel_service<Mutex>::try_receive(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ Handler&& handler)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ switch (impl.receive_state_)
+ {
+ case block:
+ {
+ return false;
+ }
+ case buffer:
+ {
+ payload_type payload(impl.buffer_front());
+ if (channel_send<payload_type>* send_op =
+ static_cast<channel_send<payload_type>*>(impl.waiters_.front()))
+ {
+ impl.buffer_pop();
+ impl.buffer_push(send_op->get_payload());
+ impl.waiters_.pop();
+ send_op->post();
+ }
+ else
+ {
+ impl.buffer_pop();
+ if (impl.buffer_size() == 0)
+ impl.receive_state_ = (impl.send_state_ == closed) ? closed : block;
+ impl.send_state_ = (impl.send_state_ == closed) ? closed : buffer;
+ }
+ lock.unlock();
+ asio::detail::non_const_lvalue<Handler> handler2(handler);
+ channel_handler<payload_type, decay_t<Handler>>(
+ static_cast<payload_type&&>(payload), handler2.value)();
+ return true;
+ }
+ case waiter:
+ {
+ channel_send<payload_type>* send_op =
+ static_cast<channel_send<payload_type>*>(impl.waiters_.front());
+ payload_type payload = send_op->get_payload();
+ impl.waiters_.pop();
+ if (impl.waiters_.front() == 0)
+ impl.receive_state_ = (impl.send_state_ == closed) ? closed : block;
+ send_op->post();
+ lock.unlock();
+ asio::detail::non_const_lvalue<Handler> handler2(handler);
+ channel_handler<payload_type, decay_t<Handler>>(
+ static_cast<payload_type&&>(payload), handler2.value)();
+ return true;
+ }
+ case closed:
+ default:
+ {
+ return false;
+ }
+ }
+}
+
+template <typename Mutex>
+template <typename Traits, typename... Signatures>
+void channel_service<Mutex>::start_receive_op(
+ channel_service<Mutex>::implementation_type<Traits, Signatures...>& impl,
+ channel_receive<typename implementation_type<
+ Traits, Signatures...>::payload_type>* receive_op)
+{
+ typedef typename implementation_type<Traits,
+ Signatures...>::traits_type traits_type;
+ typedef typename implementation_type<Traits,
+ Signatures...>::payload_type payload_type;
+
+ typename Mutex::scoped_lock lock(impl.mutex_);
+
+ switch (impl.receive_state_)
+ {
+ case block:
+ {
+ impl.waiters_.push(receive_op);
+ if (impl.send_state_ != closed)
+ impl.send_state_ = waiter;
+ return;
+ }
+ case buffer:
+ {
+ payload_type payload(
+ static_cast<payload_type&&>(impl.buffer_front()));
+ if (channel_send<payload_type>* send_op =
+ static_cast<channel_send<payload_type>*>(impl.waiters_.front()))
+ {
+ impl.buffer_pop();
+ impl.buffer_push(send_op->get_payload());
+ impl.waiters_.pop();
+ send_op->post();
+ }
+ else
+ {
+ impl.buffer_pop();
+ if (impl.buffer_size() == 0)
+ impl.receive_state_ = (impl.send_state_ == closed) ? closed : block;
+ impl.send_state_ = (impl.send_state_ == closed) ? closed : buffer;
+ }
+ receive_op->immediate(static_cast<payload_type&&>(payload));
+ break;
+ }
+ case waiter:
+ {
+ channel_send<payload_type>* send_op =
+ static_cast<channel_send<payload_type>*>(impl.waiters_.front());
+ payload_type payload = send_op->get_payload();
+ impl.waiters_.pop();
+ if (impl.waiters_.front() == 0)
+ impl.receive_state_ = (impl.send_state_ == closed) ? closed : block;
+ send_op->post();
+ receive_op->immediate(static_cast<payload_type&&>(payload));
+ break;
+ }
+ case closed:
+ default:
+ {
+ traits_type::invoke_receive_closed(
+ post_receive<payload_type,
+ typename traits_type::receive_closed_signature>(receive_op));
+ break;
+ }
+ }
+}
+
+} // namespace detail
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_DETAIL_IMPL_CHANNEL_SERVICE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/detail/partial_promise.hpp b/3rdparty/asio/include/asio/experimental/detail/partial_promise.hpp
index 55aa6d0c2b6..8495af2f0ba 100644
--- a/3rdparty/asio/include/asio/experimental/detail/partial_promise.hpp
+++ b/3rdparty/asio/include/asio/experimental/detail/partial_promise.hpp
@@ -2,8 +2,8 @@
// experimental/detail/partial_promise.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -13,9 +13,9 @@
#define ASIO_EXPERIMENTAL_DETAIL_PARTIAL_PROMISE_HPP
#include "asio/detail/config.hpp"
-#include "asio/experimental/detail/coro_traits.hpp"
+#include "asio/append.hpp"
#include "asio/awaitable.hpp"
-#include <iostream>
+#include "asio/experimental/coro_traits.hpp"
#if defined(ASIO_HAS_STD_COROUTINE)
# include <coroutine>
@@ -45,7 +45,33 @@ using std::experimental::noop_coroutine;
#endif // defined(ASIO_HAS_STD_COROUTINE)
-struct partial_promise
+struct partial_coro
+{
+ coroutine_handle<void> handle{nullptr};
+};
+
+template <typename Allocator>
+struct partial_promise_base
+{
+ template <typename Executor, typename Token, typename... 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, const std::size_t size)
+ {
+ deallocate_coroutine<Allocator>(raw, size);
+ }
+};
+
+template <>
+struct partial_promise_base<std::allocator<void>>
+{
+};
+
+template <typename Allocator>
+struct partial_promise : partial_promise_base<Allocator>
{
auto initial_suspend() noexcept
{
@@ -62,7 +88,7 @@ struct partial_promise
auto await_suspend(asio::detail::coroutine_handle<>) noexcept
{
- p->get_return_object().destroy();
+ p->get_return_object().handle.destroy();
}
constexpr void await_resume() noexcept {}
@@ -73,9 +99,9 @@ struct partial_promise
void return_void() {}
- coroutine_handle<partial_promise> get_return_object()
+ partial_coro get_return_object()
{
- return coroutine_handle<partial_promise>::from_promise(*this);
+ return partial_coro{coroutine_handle<partial_promise>::from_promise(*this)};
}
void unhandled_exception()
@@ -84,7 +110,9 @@ struct partial_promise
}
};
-} // namespace detail
+
+
+}; // namespace detail
} // namespace experimental
} // namespace asio
@@ -92,12 +120,14 @@ struct partial_promise
namespace std {
-template<typename ... Args>
+template <typename Executor, typename Completion, typename... Args>
struct coroutine_traits<
- coroutine_handle<asio::experimental::detail::partial_promise>,
- Args...>
+ asio::experimental::detail::partial_coro,
+ Executor, Completion, Args...>
{
- using promise_type = asio::experimental::detail::partial_promise;
+ using promise_type =
+ asio::experimental::detail::partial_promise<
+ asio::associated_allocator_t<Completion>>;
};
} // namespace std
@@ -106,12 +136,14 @@ struct coroutine_traits<
namespace std { namespace experimental {
-template<typename... Args>
+template <typename Executor, typename Completion, typename... Args>
struct coroutine_traits<
- coroutine_handle<asio::experimental::detail::partial_promise>,
- Args...>
+ asio::experimental::detail::partial_coro,
+ Executor, Completion, Args...>
{
- using promise_type = asio::experimental::detail::partial_promise;
+ using promise_type =
+ asio::experimental::detail::partial_promise<
+ asio::associated_allocator_t<Completion>>;
};
}} // namespace std::experimental
@@ -122,51 +154,39 @@ namespace asio {
namespace experimental {
namespace detail {
-template<typename CompletionToken>
-auto post_coroutine(CompletionToken token) noexcept
- -> coroutine_handle<partial_promise>
-{
- post(std::move(token));
- co_return;
-}
-
-template<execution::executor Executor, typename CompletionToken>
-auto post_coroutine(Executor exec, CompletionToken token) noexcept
- -> coroutine_handle<partial_promise>
-{
- post(exec, std::move(token));
- co_return;
-}
-
-template<execution_context Context, typename CompletionToken>
-auto post_coroutine(Context &ctx, CompletionToken token) noexcept
- -> coroutine_handle<partial_promise>
+template <execution::executor Executor,
+ typename CompletionToken, typename... Args>
+partial_coro post_coroutine(Executor exec,
+ CompletionToken token, Args&&... args) noexcept
{
- post(ctx, std::move(token));
+ post(exec, asio::append(std::move(token), std::move(args)...));
co_return;
}
-template<typename CompletionToken>
-auto dispatch_coroutine(CompletionToken token) noexcept
- -> coroutine_handle<partial_promise>
+template <detail::execution_context Context,
+ typename CompletionToken, typename... Args>
+partial_coro post_coroutine(Context& ctx,
+ CompletionToken token, Args&&... args) noexcept
{
- dispatch(std::move(token));
+ post(ctx, asio::append(std::move(token), std::move(args)...));
co_return;
}
-template<execution::executor Executor, typename CompletionToken>
-auto dispatch_coroutine(Executor exec, CompletionToken token) noexcept
- -> coroutine_handle<partial_promise>
+template <execution::executor Executor,
+ typename CompletionToken, typename... Args>
+partial_coro dispatch_coroutine(Executor exec,
+ CompletionToken token, Args&&... args) noexcept
{
- dispatch(exec, std::move(token));
+ dispatch(exec, asio::append(std::move(token), std::move(args)...));
co_return;
}
-template<execution_context Context, typename CompletionToken>
-auto dispatch_coroutine(Context &ctx, CompletionToken token) noexcept
- -> coroutine_handle<partial_promise>
+template <detail::execution_context Context,
+ typename CompletionToken, typename... Args>
+partial_coro dispatch_coroutine(Context& ctx,
+ CompletionToken token, Args &&... args) noexcept
{
- dispatch(ctx, std::move(token));
+ dispatch(ctx, asio::append(std::move(token), std::move(args)...));
co_return;
}
diff --git a/3rdparty/asio/include/asio/experimental/impl/append.hpp b/3rdparty/asio/include/asio/experimental/impl/append.hpp
deleted file mode 100644
index 7a764832e1b..00000000000
--- a/3rdparty/asio/include/asio/experimental/impl/append.hpp
+++ /dev/null
@@ -1,217 +0,0 @@
-//
-// experimental/impl/append.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_IMPL_EXPERIMENTAL_APPEND_HPP
-#define ASIO_IMPL_EXPERIMENTAL_APPEND_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#include "asio/associator.hpp"
-#include "asio/async_result.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace experimental {
-namespace detail {
-
-// Class to adapt a append_t as a completion handler.
-template <typename Handler, typename... Values>
-class append_handler
-{
-public:
- typedef void result_type;
-
- template <typename H>
- append_handler(ASIO_MOVE_ARG(H) handler, std::tuple<Values...> values)
- : handler_(ASIO_MOVE_CAST(H)(handler)),
- values_(ASIO_MOVE_CAST(std::tuple<Values...>)(values))
- {
- }
-
- template <typename... Args>
- void operator()(ASIO_MOVE_ARG(Args)... args)
- {
- this->invoke(
- std::make_index_sequence<sizeof...(Values)>{},
- ASIO_MOVE_CAST(Args)(args)...);
- }
-
- template <std::size_t... I, typename... Args>
- void invoke(std::index_sequence<I...>, ASIO_MOVE_ARG(Args)... args)
- {
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
- ASIO_MOVE_CAST(Args)(args)...,
- ASIO_MOVE_CAST(Values)(std::get<I>(values_))...);
- }
-
-//private:
- Handler handler_;
- std::tuple<Values...> values_;
-};
-
-template <typename Handler>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- append_handler<Handler>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- append_handler<Handler>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
-inline bool asio_handler_is_continuation(
- append_handler<Handler>* this_handler)
-{
- return asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- append_handler<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- append_handler<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Signature, typename... Values>
-struct append_signature;
-
-template <typename R, typename... Args, typename... Values>
-struct append_signature<R(Args...), Values...>
-{
- typedef R type(typename decay<Args>::type..., Values...);
-};
-
-} // namespace detail
-} // namespace experimental
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename CompletionToken, typename... Values, typename Signature>
-struct async_result<
- experimental::append_t<CompletionToken, Values...>, Signature>
- : async_result<CompletionToken,
- typename experimental::detail::append_signature<
- Signature, Values...>::type>
-{
- typedef typename experimental::detail::append_signature<
- Signature, Values...>::type signature;
-
- template <typename Initiation>
- struct init_wrapper
- {
- init_wrapper(Initiation init)
- : initiation_(ASIO_MOVE_CAST(Initiation)(init))
- {
- }
-
- template <typename Handler, typename... Args>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler,
- std::tuple<Values...> values,
- ASIO_MOVE_ARG(Args)... args)
- {
- ASIO_MOVE_CAST(Initiation)(initiation_)(
- experimental::detail::append_handler<
- typename decay<Handler>::type, Values...>(
- ASIO_MOVE_CAST(Handler)(handler),
- ASIO_MOVE_CAST(std::tuple<Values...>)(values)),
- ASIO_MOVE_CAST(Args)(args)...);
- }
-
- Initiation initiation_;
- };
-
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static ASIO_INITFN_DEDUCED_RESULT_TYPE(CompletionToken, signature,
- (async_initiate<CompletionToken, signature>(
- declval<init_wrapper<typename decay<Initiation>::type> >(),
- declval<CompletionToken&>(),
- declval<std::tuple<Values...> >(),
- declval<ASIO_MOVE_ARG(Args)>()...)))
- initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token,
- ASIO_MOVE_ARG(Args)... args)
- {
- return async_initiate<CompletionToken, signature>(
- init_wrapper<typename decay<Initiation>::type>(
- ASIO_MOVE_CAST(Initiation)(initiation)),
- token.token_,
- ASIO_MOVE_CAST(std::tuple<Values...>)(token.values_),
- ASIO_MOVE_CAST(Args)(args)...);
- }
-};
-
-template <template <typename, typename> class Associator,
- typename Handler, typename DefaultCandidate>
-struct associator<Associator,
- experimental::detail::append_handler<Handler>, DefaultCandidate>
- : Associator<Handler, DefaultCandidate>
-{
- static typename Associator<Handler, DefaultCandidate>::type get(
- const experimental::detail::append_handler<Handler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
- {
- return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_EXPERIMENTAL_APPEND_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/as_single.hpp b/3rdparty/asio/include/asio/experimental/impl/as_single.hpp
index dce5f2a3052..d183cf5679e 100644
--- a/3rdparty/asio/include/asio/experimental/impl/as_single.hpp
+++ b/3rdparty/asio/include/asio/experimental/impl/as_single.hpp
@@ -2,7 +2,7 @@
// experimental/impl/as_single.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,16 +16,11 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
#include <tuple>
-
#include "asio/associator.hpp"
#include "asio/async_result.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/detail/push_options.hpp"
@@ -42,33 +37,32 @@ public:
template <typename CompletionToken>
as_single_handler(as_single_t<CompletionToken> e)
- : handler_(ASIO_MOVE_CAST(CompletionToken)(e.token_))
+ : handler_(static_cast<CompletionToken&&>(e.token_))
{
}
template <typename RedirectedHandler>
- as_single_handler(ASIO_MOVE_ARG(RedirectedHandler) h)
- : handler_(ASIO_MOVE_CAST(RedirectedHandler)(h))
+ as_single_handler(RedirectedHandler&& h)
+ : handler_(static_cast<RedirectedHandler&&>(h))
{
}
void operator()()
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)();
+ static_cast<Handler&&>(handler_)();
}
template <typename Arg>
- void operator()(ASIO_MOVE_ARG(Arg) arg)
+ void operator()(Arg&& arg)
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
- ASIO_MOVE_CAST(Arg)(arg));
+ static_cast<Handler&&>(handler_)(static_cast<Arg&&>(arg));
}
template <typename... Args>
- void operator()(ASIO_MOVE_ARG(Args)... args)
+ void operator()(Args&&... args)
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
- std::make_tuple(ASIO_MOVE_CAST(Args)(args)...));
+ static_cast<Handler&&>(handler_)(
+ std::make_tuple(static_cast<Args&&>(args)...));
}
//private:
@@ -76,32 +70,6 @@ public:
};
template <typename Handler>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- as_single_handler<Handler>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- as_single_handler<Handler>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
inline bool asio_handler_is_continuation(
as_single_handler<Handler>* this_handler)
{
@@ -109,30 +77,6 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- as_single_handler<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- as_single_handler<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
template <typename Signature>
struct as_single_signature
{
@@ -154,7 +98,7 @@ struct as_single_signature<R(Arg)>
template <typename R, typename... Args>
struct as_single_signature<R(Args...)>
{
- typedef R type(std::tuple<typename decay<Args>::type...>);
+ typedef R type(std::tuple<decay_t<Args>...>);
};
} // namespace detail
@@ -165,44 +109,41 @@ struct as_single_signature<R(Args...)>
template <typename CompletionToken, typename Signature>
struct async_result<experimental::as_single_t<CompletionToken>, Signature>
{
- typedef typename async_result<CompletionToken,
- typename experimental::detail::as_single_signature<Signature>::type>
- ::return_type return_type;
-
template <typename Initiation>
struct init_wrapper
{
init_wrapper(Initiation init)
- : initiation_(ASIO_MOVE_CAST(Initiation)(init))
+ : initiation_(static_cast<Initiation&&>(init))
{
}
template <typename Handler, typename... Args>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Args)... args)
+ void operator()(Handler&& handler, Args&&... args)
{
- ASIO_MOVE_CAST(Initiation)(initiation_)(
- experimental::detail::as_single_handler<
- typename decay<Handler>::type>(
- ASIO_MOVE_CAST(Handler)(handler)),
- ASIO_MOVE_CAST(Args)(args)...);
+ 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>
- static return_type initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token,
- ASIO_MOVE_ARG(Args)... args)
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename experimental::detail::as_single_signature<Signature>::type>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...))
{
return async_initiate<CompletionToken,
typename experimental::detail::as_single_signature<Signature>::type>(
- init_wrapper<typename decay<Initiation>::type>(
- ASIO_MOVE_CAST(Initiation)(initiation)),
- token.token_, ASIO_MOVE_CAST(Args)(args)...);
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...);
}
};
@@ -213,8 +154,14 @@ struct associator<Associator,
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const experimental::detail::as_single_handler<Handler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const experimental::detail::as_single_handler<Handler>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const experimental::detail::as_single_handler<Handler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
diff --git a/3rdparty/asio/include/asio/experimental/impl/as_tuple.hpp b/3rdparty/asio/include/asio/experimental/impl/as_tuple.hpp
deleted file mode 100644
index a1135de49dc..00000000000
--- a/3rdparty/asio/include/asio/experimental/impl/as_tuple.hpp
+++ /dev/null
@@ -1,246 +0,0 @@
-//
-// experimental/impl/as_tuple.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_IMPL_EXPERIMENTAL_AS_TUPLE_HPP
-#define ASIO_IMPL_EXPERIMENTAL_AS_TUPLE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#include <tuple>
-
-#include "asio/associator.hpp"
-#include "asio/async_result.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace experimental {
-namespace detail {
-
-// Class to adapt a as_tuple_t as a completion handler.
-template <typename Handler>
-class as_tuple_handler
-{
-public:
- typedef void result_type;
-
- template <typename CompletionToken>
- as_tuple_handler(as_tuple_t<CompletionToken> e)
- : handler_(ASIO_MOVE_CAST(CompletionToken)(e.token_))
- {
- }
-
- template <typename RedirectedHandler>
- as_tuple_handler(ASIO_MOVE_ARG(RedirectedHandler) h)
- : handler_(ASIO_MOVE_CAST(RedirectedHandler)(h))
- {
- }
-
- template <typename... Args>
- void operator()(ASIO_MOVE_ARG(Args)... args)
- {
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
- std::make_tuple(ASIO_MOVE_CAST(Args)(args)...));
- }
-
-//private:
- Handler handler_;
-};
-
-template <typename Handler>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- as_tuple_handler<Handler>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- as_tuple_handler<Handler>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
-inline bool asio_handler_is_continuation(
- as_tuple_handler<Handler>* this_handler)
-{
- return asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- as_tuple_handler<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- as_tuple_handler<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Signature>
-struct as_tuple_signature;
-
-template <typename R, typename... Args>
-struct as_tuple_signature<R(Args...)>
-{
- typedef R type(std::tuple<typename decay<Args>::type...>);
-};
-
-#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-template <typename R, typename... Args>
-struct as_tuple_signature<R(Args...) &>
-{
- typedef R type(std::tuple<typename decay<Args>::type...>) &;
-};
-
-template <typename R, typename... Args>
-struct as_tuple_signature<R(Args...) &&>
-{
- typedef R type(std::tuple<typename decay<Args>::type...>) &&;
-};
-
-# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-
-template <typename R, typename... Args>
-struct as_tuple_signature<R(Args...) noexcept>
-{
- typedef R type(std::tuple<typename decay<Args>::type...>) noexcept;
-};
-
-template <typename R, typename... Args>
-struct as_tuple_signature<R(Args...) & noexcept>
-{
- typedef R type(std::tuple<typename decay<Args>::type...>) & noexcept;
-};
-
-template <typename R, typename... Args>
-struct as_tuple_signature<R(Args...) && noexcept>
-{
- typedef R type(std::tuple<typename decay<Args>::type...>) && noexcept;
-};
-
-# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-} // namespace detail
-} // namespace experimental
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename CompletionToken, typename... Signatures>
-struct async_result<experimental::as_tuple_t<CompletionToken>, Signatures...>
- : async_result<CompletionToken,
- typename experimental::detail::as_tuple_signature<Signatures>::type...>
-{
- typedef async_result<CompletionToken,
- typename experimental::detail::as_tuple_signature<Signatures>::type...>
- base_async_result;
-
- template <typename Initiation>
- struct init_wrapper
- {
- init_wrapper(Initiation init)
- : initiation_(ASIO_MOVE_CAST(Initiation)(init))
- {
- }
-
- template <typename Handler, typename... Args>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Args)... args)
- {
- ASIO_MOVE_CAST(Initiation)(initiation_)(
- experimental::detail::as_tuple_handler<
- typename decay<Handler>::type>(
- ASIO_MOVE_CAST(Handler)(handler)),
- ASIO_MOVE_CAST(Args)(args)...);
- }
-
- Initiation initiation_;
- };
-
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static ASIO_INITFN_DEDUCED_RESULT_TYPE(CompletionToken,
- typename experimental::detail::as_tuple_signature<Signatures>::type...,
- (base_async_result::initiate(
- declval<init_wrapper<typename decay<Initiation>::type> >(),
- declval<CompletionToken>(),
- declval<ASIO_MOVE_ARG(Args)>()...)))
- initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token,
- ASIO_MOVE_ARG(Args)... args)
- {
- return base_async_result::initiate(
- init_wrapper<typename decay<Initiation>::type>(
- ASIO_MOVE_CAST(Initiation)(initiation)),
- token.token_, ASIO_MOVE_CAST(Args)(args)...);
- }
-};
-
-template <template <typename, typename> class Associator,
- typename Handler, typename DefaultCandidate>
-struct associator<Associator,
- experimental::detail::as_tuple_handler<Handler>, DefaultCandidate>
- : Associator<Handler, DefaultCandidate>
-{
- static typename Associator<Handler, DefaultCandidate>::type get(
- const experimental::detail::as_tuple_handler<Handler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
- {
- return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_EXPERIMENTAL_AS_TUPLE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/channel_error.ipp b/3rdparty/asio/include/asio/experimental/impl/channel_error.ipp
new file mode 100644
index 00000000000..3f4b9829774
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/channel_error.ipp
@@ -0,0 +1,61 @@
+//
+// experimental/impl/channel_error.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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 ASIO_EXPERIMENTAL_IMPL_CHANNEL_ERROR_IPP
+#define ASIO_EXPERIMENTAL_IMPL_CHANNEL_ERROR_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/experimental/channel_error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace error {
+namespace detail {
+
+class channel_category : public asio::error_category
+{
+public:
+ const char* name() const noexcept
+ {
+ return "asio.channel";
+ }
+
+ std::string message(int value) const
+ {
+ switch (value)
+ {
+ case channel_closed: return "Channel closed";
+ case channel_cancelled: return "Channel cancelled";
+ default: return "asio.channel error";
+ }
+ }
+};
+
+} // namespace detail
+
+const asio::error_category& get_channel_category()
+{
+ static detail::channel_category instance;
+ return instance;
+}
+
+} // namespace error
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_IMPL_CHANNEL_ERROR_IPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/co_composed.hpp b/3rdparty/asio/include/asio/experimental/impl/co_composed.hpp
new file mode 100644
index 00000000000..3eef2e2ee2c
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/co_composed.hpp
@@ -0,0 +1,1174 @@
+//
+// experimental/impl/co_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 ASIO_IMPL_EXPERIMENTAL_CO_COMPOSED_HPP
+#define ASIO_IMPL_EXPERIMENTAL_CO_COMPOSED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <new>
+#include <tuple>
+#include <variant>
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/cancellation_state.hpp"
+#include "asio/detail/composed_work.hpp"
+#include "asio/detail/recycling_allocator.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/error.hpp"
+
+#if defined(ASIO_HAS_STD_COROUTINE)
+# include <coroutine>
+#else // defined(ASIO_HAS_STD_COROUTINE)
+# include <experimental/coroutine>
+#endif // defined(ASIO_HAS_STD_COROUTINE)
+
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+# include "asio/detail/source_location.hpp"
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+namespace detail {
+
+#if defined(ASIO_HAS_STD_COROUTINE)
+using std::coroutine_handle;
+using std::suspend_always;
+using std::suspend_never;
+#else // defined(ASIO_HAS_STD_COROUTINE)
+using std::experimental::coroutine_handle;
+using std::experimental::suspend_always;
+using std::experimental::suspend_never;
+#endif // defined(ASIO_HAS_STD_COROUTINE)
+
+using asio::detail::composed_io_executors;
+using asio::detail::composed_work;
+using asio::detail::composed_work_guard;
+using asio::detail::get_composed_io_executor;
+using asio::detail::make_composed_io_executors;
+using asio::detail::recycling_allocator;
+using asio::detail::throw_error;
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_state;
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_handler_base;
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_promise;
+
+template <completion_signature... Signatures>
+class co_composed_returns
+{
+};
+
+struct co_composed_on_suspend
+{
+ void (*fn_)(void*) = nullptr;
+ void* arg_ = nullptr;
+};
+
+template <typename... T>
+struct co_composed_completion : std::tuple<T&&...>
+{
+ template <typename... U>
+ co_composed_completion(U&&... u) noexcept
+ : std::tuple<T&&...>(std::forward<U>(u)...)
+ {
+ }
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename Signature>
+class co_composed_state_return_overload;
+
+template <typename Executors, typename Handler,
+ typename Return, typename R, typename... Args>
+class co_composed_state_return_overload<
+ Executors, Handler, Return, R(Args...)>
+{
+public:
+ using derived_type = co_composed_state<Executors, Handler, Return>;
+ using promise_type = co_composed_promise<Executors, Handler, Return>;
+ using return_type = std::tuple<Args...>;
+
+ void on_cancellation_complete_with(Args... args)
+ {
+ derived_type& state = *static_cast<derived_type*>(this);
+ state.return_value_ = std::make_tuple(std::move(args)...);
+ state.cancellation_on_suspend_fn(
+ [](void* p)
+ {
+ auto& promise = *static_cast<promise_type*>(p);
+
+ co_composed_handler_base<Executors, Handler,
+ Return> composed_handler(promise);
+
+ Handler handler(std::move(promise.state().handler_));
+ return_type result(
+ std::move(std::get<return_type>(promise.state().return_value_)));
+
+ co_composed_handler_base<Executors, Handler,
+ Return>(std::move(composed_handler));
+
+ std::apply(std::move(handler), std::move(result));
+ });
+ }
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_state_return;
+
+template <typename Executors, typename Handler, typename... Signatures>
+class co_composed_state_return<
+ Executors, Handler, co_composed_returns<Signatures...>>
+ : public co_composed_state_return_overload<Executors,
+ Handler, co_composed_returns<Signatures...>, Signatures>...
+{
+public:
+ using co_composed_state_return_overload<Executors,
+ Handler, co_composed_returns<Signatures...>,
+ Signatures>::on_cancellation_complete_with...;
+
+private:
+ template <typename, typename, typename, typename>
+ friend class co_composed_promise_return_overload;
+ template <typename, typename, typename, typename>
+ friend class co_composed_state_return_overload;
+
+ std::variant<std::monostate,
+ typename co_composed_state_return_overload<
+ Executors, Handler, co_composed_returns<Signatures...>,
+ Signatures>::return_type...> return_value_;
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename... Signatures>
+struct co_composed_state_default_cancellation_on_suspend_impl;
+
+template <typename Executors, typename Handler, typename Return>
+struct co_composed_state_default_cancellation_on_suspend_impl<
+ Executors, Handler, Return>
+{
+ static constexpr void (*fn())(void*)
+ {
+ return nullptr;
+ }
+};
+
+template <typename Executors, typename Handler, typename Return,
+ typename R, typename... Args, typename... Signatures>
+struct co_composed_state_default_cancellation_on_suspend_impl<
+ Executors, Handler, Return, R(Args...), Signatures...>
+{
+ static constexpr void (*fn())(void*)
+ {
+ return co_composed_state_default_cancellation_on_suspend_impl<
+ Executors, Handler, Return, Signatures...>::fn();
+ }
+};
+
+template <typename Executors, typename Handler, typename Return,
+ typename R, typename... Args, typename... Signatures>
+struct co_composed_state_default_cancellation_on_suspend_impl<Executors,
+ Handler, Return, R(asio::error_code, Args...), Signatures...>
+{
+ using promise_type = co_composed_promise<Executors, Handler, Return>;
+ using return_type = std::tuple<asio::error_code, Args...>;
+
+ static constexpr void (*fn())(void*)
+ {
+ if constexpr ((is_constructible<Args>::value && ...))
+ {
+ return [](void* p)
+ {
+ auto& promise = *static_cast<promise_type*>(p);
+
+ co_composed_handler_base<Executors, Handler,
+ Return> composed_handler(promise);
+
+ Handler handler(std::move(promise.state().handler_));
+
+ co_composed_handler_base<Executors, Handler,
+ Return>(std::move(composed_handler));
+
+ std::move(handler)(
+ asio::error_code(asio::error::operation_aborted),
+ Args{}...);
+ };
+ }
+ else
+ {
+ return co_composed_state_default_cancellation_on_suspend_impl<
+ Executors, Handler, Return, Signatures...>::fn();
+ }
+ }
+};
+
+template <typename Executors, typename Handler, typename Return,
+ typename R, typename... Args, typename... Signatures>
+struct co_composed_state_default_cancellation_on_suspend_impl<Executors,
+ Handler, Return, R(std::exception_ptr, Args...), Signatures...>
+{
+ using promise_type = co_composed_promise<Executors, Handler, Return>;
+ using return_type = std::tuple<std::exception_ptr, Args...>;
+
+ static constexpr void (*fn())(void*)
+ {
+ if constexpr ((is_constructible<Args>::value && ...))
+ {
+ return [](void* p)
+ {
+ auto& promise = *static_cast<promise_type*>(p);
+
+ co_composed_handler_base<Executors, Handler,
+ Return> composed_handler(promise);
+
+ Handler handler(std::move(promise.state().handler_));
+
+ co_composed_handler_base<Executors, Handler,
+ Return>(std::move(composed_handler));
+
+ std::move(handler)(
+ std::make_exception_ptr(
+ asio::system_error(
+ asio::error::operation_aborted, "co_await")),
+ Args{}...);
+ };
+ }
+ else
+ {
+ return co_composed_state_default_cancellation_on_suspend_impl<
+ Executors, Handler, Return, Signatures...>::fn();
+ }
+ }
+};
+
+template <typename Executors, typename Handler, typename Return>
+struct co_composed_state_default_cancellation_on_suspend;
+
+template <typename Executors, typename Handler, typename... Signatures>
+struct co_composed_state_default_cancellation_on_suspend<
+ Executors, Handler, co_composed_returns<Signatures...>>
+ : co_composed_state_default_cancellation_on_suspend_impl<Executors,
+ Handler, co_composed_returns<Signatures...>, Signatures...>
+{
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_state_cancellation
+{
+public:
+ using cancellation_slot_type = cancellation_slot;
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return cancellation_state_.slot();
+ }
+
+ cancellation_state get_cancellation_state() const noexcept
+ {
+ return cancellation_state_;
+ }
+
+ void reset_cancellation_state()
+ {
+ cancellation_state_ = cancellation_state(
+ (get_associated_cancellation_slot)(
+ static_cast<co_composed_state<Executors, Handler, Return>*>(
+ this)->handler()));
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(Filter filter)
+ {
+ cancellation_state_ = cancellation_state(
+ (get_associated_cancellation_slot)(
+ static_cast<co_composed_state<Executors, Handler, Return>*>(
+ this)->handler()), filter, filter);
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter&& in_filter, OutFilter&& out_filter)
+ {
+ cancellation_state_ = cancellation_state(
+ (get_associated_cancellation_slot)(
+ static_cast<co_composed_state<Executors, Handler, Return>*>(
+ this)->handler()),
+ std::forward<InFilter>(in_filter),
+ std::forward<OutFilter>(out_filter));
+ }
+
+ cancellation_type_t cancelled() const noexcept
+ {
+ return cancellation_state_.cancelled();
+ }
+
+ void clear_cancellation_slot() noexcept
+ {
+ cancellation_state_.slot().clear();
+ }
+
+ [[nodiscard]] bool throw_if_cancelled() const noexcept
+ {
+ return throw_if_cancelled_;
+ }
+
+ void throw_if_cancelled(bool b) noexcept
+ {
+ throw_if_cancelled_ = b;
+ }
+
+ [[nodiscard]] bool complete_if_cancelled() const noexcept
+ {
+ return complete_if_cancelled_;
+ }
+
+ void complete_if_cancelled(bool b) noexcept
+ {
+ complete_if_cancelled_ = b;
+ }
+
+private:
+ template <typename, typename, typename>
+ friend class co_composed_promise;
+ template <typename, typename, typename, typename>
+ friend class co_composed_state_return_overload;
+
+ void cancellation_on_suspend_fn(void (*fn)(void*))
+ {
+ cancellation_on_suspend_fn_ = fn;
+ }
+
+ void check_for_cancellation_on_transform()
+ {
+ if (throw_if_cancelled_ && !!cancelled())
+ throw_error(asio::error::operation_aborted, "co_await");
+ }
+
+ bool check_for_cancellation_on_suspend(
+ co_composed_promise<Executors, Handler, Return>& promise) noexcept
+ {
+ if (complete_if_cancelled_ && !!cancelled() && cancellation_on_suspend_fn_)
+ {
+ promise.state().work_.reset();
+ promise.state().on_suspend_->fn_ = cancellation_on_suspend_fn_;
+ promise.state().on_suspend_->arg_ = &promise;
+ return false;
+ }
+ return true;
+ }
+
+ cancellation_state cancellation_state_;
+ void (*cancellation_on_suspend_fn_)(void*) =
+ co_composed_state_default_cancellation_on_suspend<
+ Executors, Handler, Return>::fn();
+ bool throw_if_cancelled_ = false;
+ bool complete_if_cancelled_ = true;
+};
+
+template <typename Executors, typename Handler, typename Return>
+ requires is_same<
+ typename associated_cancellation_slot<
+ Handler, cancellation_slot
+ >::asio_associated_cancellation_slot_is_unspecialised,
+ void>::value
+class co_composed_state_cancellation<Executors, Handler, Return>
+{
+public:
+ void reset_cancellation_state()
+ {
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(Filter)
+ {
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter&&, OutFilter&&)
+ {
+ }
+
+ cancellation_type_t cancelled() const noexcept
+ {
+ return cancellation_type::none;
+ }
+
+ void clear_cancellation_slot() noexcept
+ {
+ }
+
+ [[nodiscard]] bool throw_if_cancelled() const noexcept
+ {
+ return false;
+ }
+
+ void throw_if_cancelled(bool) noexcept
+ {
+ }
+
+ [[nodiscard]] bool complete_if_cancelled() const noexcept
+ {
+ return false;
+ }
+
+ void complete_if_cancelled(bool) noexcept
+ {
+ }
+
+private:
+ template <typename, typename, typename>
+ friend class co_composed_promise;
+ template <typename, typename, typename, typename>
+ friend class co_composed_state_return_overload;
+
+ void cancellation_on_suspend_fn(void (*)(void*))
+ {
+ }
+
+ void check_for_cancellation_on_transform() noexcept
+ {
+ }
+
+ bool check_for_cancellation_on_suspend(
+ co_composed_promise<Executors, Handler, Return>&) noexcept
+ {
+ return true;
+ }
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_state
+ : public co_composed_state_return<Executors, Handler, Return>,
+ public co_composed_state_cancellation<Executors, Handler, Return>
+{
+public:
+ using io_executor_type = typename composed_work_guard<
+ typename composed_work<Executors>::head_type>::executor_type;
+
+ template <typename H>
+ co_composed_state(composed_io_executors<Executors>&& executors,
+ H&& h, co_composed_on_suspend& on_suspend)
+ : work_(std::move(executors)),
+ handler_(std::forward<H>(h)),
+ on_suspend_(&on_suspend)
+ {
+ this->reset_cancellation_state(enable_terminal_cancellation());
+ }
+
+ io_executor_type get_io_executor() const noexcept
+ {
+ return work_.head_.get_executor();
+ }
+
+ template <typename... Args>
+ [[nodiscard]] co_composed_completion<Args...> complete(Args&&... args)
+ requires requires { declval<Handler>()(std::forward<Args>(args)...); }
+ {
+ return co_composed_completion<Args...>(std::forward<Args>(args)...);
+ }
+
+ const Handler& handler() const noexcept
+ {
+ return handler_;
+ }
+
+private:
+ template <typename, typename, typename>
+ friend class co_composed_handler_base;
+ template <typename, typename, typename>
+ friend class co_composed_promise;
+ template <typename, typename, typename, typename>
+ friend class co_composed_promise_return_overload;
+ template <typename, typename, typename>
+ friend class co_composed_state_cancellation;
+ template <typename, typename, typename, typename>
+ friend class co_composed_state_return_overload;
+ template <typename, typename, typename, typename...>
+ friend struct co_composed_state_default_cancellation_on_suspend_impl;
+
+ composed_work<Executors> work_;
+ Handler handler_;
+ co_composed_on_suspend* on_suspend_;
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_handler_cancellation
+{
+public:
+ using cancellation_slot_type = cancellation_slot;
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return static_cast<
+ const co_composed_handler_base<Executors, Handler, Return>*>(
+ this)->promise().state().get_cancellation_slot();
+ }
+};
+
+template <typename Executors, typename Handler, typename Return>
+ requires is_same<
+ typename associated_cancellation_slot<
+ Handler, cancellation_slot
+ >::asio_associated_cancellation_slot_is_unspecialised,
+ void>::value
+class co_composed_handler_cancellation<Executors, Handler, Return>
+{
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_handler_base :
+ public co_composed_handler_cancellation<Executors, Handler, Return>
+{
+public:
+ co_composed_handler_base(
+ co_composed_promise<Executors, Handler, Return>& p) noexcept
+ : p_(&p)
+ {
+ }
+
+ co_composed_handler_base(co_composed_handler_base&& other) noexcept
+ : p_(std::exchange(other.p_, nullptr))
+ {
+ }
+
+ ~co_composed_handler_base()
+ {
+ if (p_) [[unlikely]]
+ p_->destroy();
+ }
+
+ co_composed_promise<Executors, Handler, Return>& promise() const noexcept
+ {
+ return *p_;
+ }
+
+protected:
+ void resume(void* result)
+ {
+ co_composed_on_suspend on_suspend{};
+ std::exchange(p_, nullptr)->resume(p_, result, on_suspend);
+ if (on_suspend.fn_)
+ on_suspend.fn_(on_suspend.arg_);
+ }
+
+private:
+ co_composed_promise<Executors, Handler, Return>* p_;
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename Signature>
+class co_composed_handler;
+
+template <typename Executors, typename Handler,
+ typename Return, typename R, typename... Args>
+class co_composed_handler<Executors, Handler, Return, R(Args...)>
+ : public co_composed_handler_base<Executors, Handler, Return>
+{
+public:
+ using co_composed_handler_base<Executors,
+ Handler, Return>::co_composed_handler_base;
+
+ using result_type = std::tuple<decay_t<Args>...>;
+
+ template <typename... T>
+ void operator()(T&&... args)
+ {
+ result_type result(std::forward<T>(args)...);
+ this->resume(&result);
+ }
+
+ static auto on_resume(void* result)
+ {
+ auto& args = *static_cast<result_type*>(result);
+ if constexpr (sizeof...(Args) == 0)
+ return;
+ else if constexpr (sizeof...(Args) == 1)
+ return std::move(std::get<0>(args));
+ else
+ return std::move(args);
+ }
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename R, typename... Args>
+class co_composed_handler<Executors, Handler,
+ Return, R(asio::error_code, Args...)>
+ : public co_composed_handler_base<Executors, Handler, Return>
+{
+public:
+ using co_composed_handler_base<Executors,
+ Handler, Return>::co_composed_handler_base;
+
+ using args_type = std::tuple<decay_t<Args>...>;
+ using result_type = std::tuple<asio::error_code, args_type>;
+
+ template <typename... T>
+ void operator()(const asio::error_code& ec, T&&... args)
+ {
+ result_type result(ec, args_type(std::forward<T>(args)...));
+ this->resume(&result);
+ }
+
+ static auto on_resume(void* result)
+ {
+ auto& [ec, args] = *static_cast<result_type*>(result);
+ throw_error(ec);
+ if constexpr (sizeof...(Args) == 0)
+ return;
+ else if constexpr (sizeof...(Args) == 1)
+ return std::move(std::get<0>(args));
+ else
+ return std::move(args);
+ }
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename R, typename... Args>
+class co_composed_handler<Executors, Handler,
+ Return, R(std::exception_ptr, Args...)>
+ : public co_composed_handler_base<Executors, Handler, Return>
+{
+public:
+ using co_composed_handler_base<Executors,
+ Handler, Return>::co_composed_handler_base;
+
+ using args_type = std::tuple<decay_t<Args>...>;
+ using result_type = std::tuple<std::exception_ptr, args_type>;
+
+ template <typename... T>
+ void operator()(std::exception_ptr ex, T&&... args)
+ {
+ result_type result(std::move(ex), args_type(std::forward<T>(args)...));
+ this->resume(&result);
+ }
+
+ static auto on_resume(void* result)
+ {
+ auto& [ex, args] = *static_cast<result_type*>(result);
+ if (ex)
+ std::rethrow_exception(ex);
+ if constexpr (sizeof...(Args) == 0)
+ return;
+ else if constexpr (sizeof...(Args) == 1)
+ return std::move(std::get<0>(args));
+ else
+ return std::move(args);
+ }
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_promise_return;
+
+template <typename Executors, typename Handler>
+class co_composed_promise_return<Executors, Handler, co_composed_returns<>>
+{
+public:
+ auto final_suspend() noexcept
+ {
+ return suspend_never();
+ }
+
+ void return_void() noexcept
+ {
+ }
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename Signature>
+class co_composed_promise_return_overload;
+
+template <typename Executors, typename Handler,
+ typename Return, typename R, typename... Args>
+class co_composed_promise_return_overload<
+ Executors, Handler, Return, R(Args...)>
+{
+public:
+ using derived_type = co_composed_promise<Executors, Handler, Return>;
+ using return_type = std::tuple<Args...>;
+
+ void return_value(std::tuple<Args...>&& value)
+ {
+ derived_type& promise = *static_cast<derived_type*>(this);
+ promise.state().return_value_ = std::move(value);
+ promise.state().work_.reset();
+ promise.state().on_suspend_->arg_ = this;
+ promise.state().on_suspend_->fn_ =
+ [](void* p)
+ {
+ auto& promise = *static_cast<derived_type*>(p);
+
+ co_composed_handler_base<Executors, Handler,
+ Return> composed_handler(promise);
+
+ Handler handler(std::move(promise.state().handler_));
+ return_type result(
+ std::move(std::get<return_type>(promise.state().return_value_)));
+
+ co_composed_handler_base<Executors, Handler,
+ Return>(std::move(composed_handler));
+
+ std::apply(std::move(handler), std::move(result));
+ };
+ }
+};
+
+template <typename Executors, typename Handler, typename... Signatures>
+class co_composed_promise_return<Executors,
+ Handler, co_composed_returns<Signatures...>>
+ : public co_composed_promise_return_overload<Executors,
+ Handler, co_composed_returns<Signatures...>, Signatures>...
+{
+public:
+ auto final_suspend() noexcept
+ {
+ return suspend_always();
+ }
+
+ using co_composed_promise_return_overload<Executors, Handler,
+ co_composed_returns<Signatures...>, Signatures>::return_value...;
+
+private:
+ template <typename, typename, typename, typename>
+ friend class co_composed_promise_return_overload;
+};
+
+template <typename Executors, typename Handler, typename Return>
+class co_composed_promise
+ : public co_composed_promise_return<Executors, Handler, Return>
+{
+public:
+ template <typename... Args>
+ void* operator new(std::size_t size,
+ co_composed_state<Executors, Handler, Return>& state, Args&&...)
+ {
+ block_allocator_type allocator(
+ (get_associated_allocator)(state.handler_,
+ recycling_allocator<void>()));
+
+ block* base_ptr = std::allocator_traits<block_allocator_type>::allocate(
+ allocator, blocks(sizeof(allocator_type)) + blocks(size));
+
+ new (static_cast<void*>(base_ptr)) allocator_type(std::move(allocator));
+
+ return base_ptr + blocks(sizeof(allocator_type));
+ }
+
+ template <typename C, typename... Args>
+ void* operator new(std::size_t size, C&&,
+ co_composed_state<Executors, Handler, Return>& state, Args&&...)
+ {
+ return co_composed_promise::operator new(size, state);
+ }
+
+ void operator delete(void* ptr, std::size_t size)
+ {
+ block* base_ptr = static_cast<block*>(ptr) - blocks(sizeof(allocator_type));
+
+ allocator_type* allocator_ptr = std::launder(
+ static_cast<allocator_type*>(static_cast<void*>(base_ptr)));
+
+ block_allocator_type block_allocator(std::move(*allocator_ptr));
+ allocator_ptr->~allocator_type();
+
+ std::allocator_traits<block_allocator_type>::deallocate(block_allocator,
+ base_ptr, blocks(sizeof(allocator_type)) + blocks(size));
+ }
+
+ template <typename... Args>
+ co_composed_promise(
+ co_composed_state<Executors, Handler, Return>& state, Args&&...)
+ : state_(state)
+ {
+ }
+
+ template <typename C, typename... Args>
+ co_composed_promise(C&&,
+ co_composed_state<Executors, Handler, Return>& state, Args&&...)
+ : state_(state)
+ {
+ }
+
+ void destroy() noexcept
+ {
+ coroutine_handle<co_composed_promise>::from_promise(*this).destroy();
+ }
+
+ void resume(co_composed_promise*& owner, void* result,
+ co_composed_on_suspend& on_suspend)
+ {
+ state_.on_suspend_ = &on_suspend;
+ state_.clear_cancellation_slot();
+ owner_ = &owner;
+ result_ = result;
+ coroutine_handle<co_composed_promise>::from_promise(*this).resume();
+ }
+
+ co_composed_state<Executors, Handler, Return>& state() noexcept
+ {
+ return state_;
+ }
+
+ void get_return_object() noexcept
+ {
+ }
+
+ auto initial_suspend() noexcept
+ {
+ return suspend_never();
+ }
+
+ void unhandled_exception()
+ {
+ if (owner_)
+ *owner_ = this;
+ throw;
+ }
+
+ template <async_operation Op>
+ auto await_transform(Op&& op
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , asio::detail::source_location location
+ = asio::detail::source_location::current()
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ )
+ {
+ class [[nodiscard]] awaitable
+ {
+ public:
+ awaitable(Op&& op, co_composed_promise& promise
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , const asio::detail::source_location& location
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ )
+ : op_(std::forward<Op>(op)),
+ promise_(promise)
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , location_(location)
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ {
+ }
+
+ constexpr bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<co_composed_promise>)
+ {
+ if (promise_.state_.check_for_cancellation_on_suspend(promise_))
+ {
+ promise_.state_.on_suspend_->arg_ = this;
+ promise_.state_.on_suspend_->fn_ =
+ [](void* p)
+ {
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ ASIO_HANDLER_LOCATION((
+ static_cast<awaitable*>(p)->location_.file_name(),
+ static_cast<awaitable*>(p)->location_.line(),
+ static_cast<awaitable*>(p)->location_.function_name()));
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ std::forward<Op>(static_cast<awaitable*>(p)->op_)(
+ co_composed_handler<Executors, Handler,
+ Return, completion_signature_of_t<Op>>(
+ static_cast<awaitable*>(p)->promise_));
+ };
+ }
+ }
+
+ auto await_resume()
+ {
+ return co_composed_handler<Executors, Handler, Return,
+ completion_signature_of_t<Op>>::on_resume(promise_.result_);
+ }
+
+ private:
+ Op&& op_;
+ co_composed_promise& promise_;
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ asio::detail::source_location location_;
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ };
+
+ state_.check_for_cancellation_on_transform();
+ return awaitable{std::forward<Op>(op), *this
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , location
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ };
+ }
+
+ template <typename... Args>
+ auto yield_value(co_composed_completion<Args...>&& result)
+ {
+ class [[nodiscard]] awaitable
+ {
+ public:
+ awaitable(co_composed_completion<Args...>&& result,
+ co_composed_promise& promise)
+ : result_(std::move(result)),
+ promise_(promise)
+ {
+ }
+
+ constexpr bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<co_composed_promise>)
+ {
+ promise_.state_.work_.reset();
+ promise_.state_.on_suspend_->arg_ = this;
+ promise_.state_.on_suspend_->fn_ =
+ [](void* p)
+ {
+ awaitable& a = *static_cast<awaitable*>(p);
+
+ co_composed_handler_base<Executors, Handler,
+ Return> composed_handler(a.promise_);
+
+ Handler handler(std::move(a.promise_.state_.handler_));
+ std::tuple<decay_t<Args>...> result(
+ std::move(static_cast<std::tuple<Args&&...>>(a.result_)));
+
+ co_composed_handler_base<Executors, Handler,
+ Return>(std::move(composed_handler));
+
+ std::apply(std::move(handler), std::move(result));
+ };
+ }
+
+ void await_resume() noexcept
+ {
+ }
+
+ private:
+ co_composed_completion<Args...> result_;
+ co_composed_promise& promise_;
+ };
+
+ return awaitable{std::move(result), *this};
+ }
+
+private:
+ using allocator_type =
+ associated_allocator_t<Handler, recycling_allocator<void>>;
+
+ union block
+ {
+ std::max_align_t max_align;
+ alignas(allocator_type) char pad[alignof(allocator_type)];
+ };
+
+ using block_allocator_type =
+ typename std::allocator_traits<allocator_type>
+ ::template rebind_alloc<block>;
+
+ static constexpr std::size_t blocks(std::size_t size)
+ {
+ return (size + sizeof(block) - 1) / sizeof(block);
+ }
+
+ co_composed_state<Executors, Handler, Return>& state_;
+ co_composed_promise** owner_ = nullptr;
+ void* result_ = nullptr;
+};
+
+template <typename Implementation, typename Executors, typename... Signatures>
+class initiate_co_composed
+{
+public:
+ using executor_type = typename composed_io_executors<Executors>::head_type;
+
+ template <typename I>
+ initiate_co_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... 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<Executors, handler_type, returns_type>(
+ executors_, std::forward<Handler>(handler), on_suspend),
+ std::forward<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<Executors, handler_type, returns_type>(
+ std::move(executors_), std::forward<Handler>(handler), on_suspend),
+ std::forward<InitArgs>(init_args)...);
+ if (on_suspend.fn_)
+ on_suspend.fn_(on_suspend.arg_);
+ }
+
+private:
+ Implementation implementation_;
+ composed_io_executors<Executors> executors_;
+};
+
+template <typename... Signatures, typename Implementation, typename Executors>
+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...>(
+ 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,
+ experimental::detail::co_composed_handler<
+ Executors, Handler, Return, Signature>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const experimental::detail::co_composed_handler<
+ Executors, Handler, Return, Signature>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(
+ h.promise().state().handler());
+ }
+
+ static auto get(
+ const experimental::detail::co_composed_handler<
+ Executors, Handler, Return, Signature>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(
+ Associator<Handler, DefaultCandidate>::get(
+ h.promise().state().handler(), c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(
+ h.promise().state().handler(), c);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#if !defined(GENERATING_DOCUMENTATION)
+# if defined(ASIO_HAS_STD_COROUTINE)
+namespace std {
+# else // defined(ASIO_HAS_STD_COROUTINE)
+namespace std { namespace experimental {
+# endif // defined(ASIO_HAS_STD_COROUTINE)
+
+template <typename C, typename Executors,
+ typename Handler, typename Return, typename... Args>
+struct coroutine_traits<void, C&,
+ asio::experimental::detail::co_composed_state<
+ Executors, Handler, Return>,
+ Args...>
+{
+ using promise_type =
+ 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&&,
+ asio::experimental::detail::co_composed_state<
+ Executors, Handler, Return>,
+ Args...>
+{
+ using promise_type =
+ asio::experimental::detail::co_composed_promise<
+ Executors, Handler, Return>;
+};
+
+template <typename Executors, typename Handler,
+ typename Return, typename... Args>
+struct coroutine_traits<void,
+ asio::experimental::detail::co_composed_state<
+ Executors, Handler, Return>,
+ Args...>
+{
+ using promise_type =
+ asio::experimental::detail::co_composed_promise<
+ Executors, Handler, Return>;
+};
+
+# if defined(ASIO_HAS_STD_COROUTINE)
+} // namespace std
+# else // defined(ASIO_HAS_STD_COROUTINE)
+}} // namespace std::experimental
+# endif // defined(ASIO_HAS_STD_COROUTINE)
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_EXPERIMENTAL_CO_COMPOSED_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/coro.hpp b/3rdparty/asio/include/asio/experimental/impl/coro.hpp
new file mode 100644
index 00000000000..872d1a0255c
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/coro.hpp
@@ -0,0 +1,1222 @@
+//
+// experimental/impl/coro.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_IMPL_CORO_HPP
+#define ASIO_EXPERIMENTAL_IMPL_CORO_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/append.hpp"
+#include "asio/associated_cancellation_slot.hpp"
+#include "asio/bind_allocator.hpp"
+#include "asio/deferred.hpp"
+#include "asio/experimental/detail/coro_completion_handler.hpp"
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+template <typename Yield, typename Return,
+ typename Executor, typename Allocator>
+struct coro;
+
+namespace detail {
+
+struct coro_cancellation_source
+{
+ cancellation_slot slot;
+ cancellation_state state;
+ bool throw_if_cancelled_ = true;
+
+ void reset_cancellation_state()
+ {
+ state = cancellation_state(slot);
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(Filter&& filter)
+ {
+ state = cancellation_state(slot, static_cast<Filter&&>(filter));
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter&& in_filter,
+ OutFilter&& out_filter)
+ {
+ state = cancellation_state(slot,
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
+ }
+
+ bool throw_if_cancelled() const
+ {
+ return throw_if_cancelled_;
+ }
+
+ void throw_if_cancelled(bool value)
+ {
+ throw_if_cancelled_ = value;
+ }
+};
+
+template <typename Signature, typename Return,
+ typename Executor, typename Allocator>
+struct coro_promise;
+
+template <typename T>
+struct is_noexcept : std::false_type
+{
+};
+
+template <typename Return, typename... Args>
+struct is_noexcept<Return(Args...)> : std::false_type
+{
+};
+
+template <typename Return, typename... Args>
+struct is_noexcept<Return(Args...) noexcept> : std::true_type
+{
+};
+
+template <typename T>
+constexpr bool is_noexcept_v = is_noexcept<T>::value;
+
+template <typename T>
+struct coro_error;
+
+template <>
+struct coro_error<asio::error_code>
+{
+ static asio::error_code invalid()
+ {
+ return asio::error::fault;
+ }
+
+ static asio::error_code cancelled()
+ {
+ return asio::error::operation_aborted;
+ }
+
+ static asio::error_code interrupted()
+ {
+ return asio::error::interrupted;
+ }
+
+ static asio::error_code done()
+ {
+ return asio::error::broken_pipe;
+ }
+};
+
+template <>
+struct coro_error<std::exception_ptr>
+{
+ static std::exception_ptr invalid()
+ {
+ return std::make_exception_ptr(
+ asio::system_error(
+ coro_error<asio::error_code>::invalid()));
+ }
+
+ static std::exception_ptr cancelled()
+ {
+ return std::make_exception_ptr(
+ asio::system_error(
+ coro_error<asio::error_code>::cancelled()));
+ }
+
+ static std::exception_ptr interrupted()
+ {
+ return std::make_exception_ptr(
+ asio::system_error(
+ coro_error<asio::error_code>::interrupted()));
+ }
+
+ static std::exception_ptr done()
+ {
+ return std::make_exception_ptr(
+ asio::system_error(
+ coro_error<asio::error_code>::done()));
+ }
+};
+
+template <typename T, typename Coroutine >
+struct coro_with_arg
+{
+ using coro_t = Coroutine;
+ T value;
+ coro_t& coro;
+
+ struct awaitable_t
+ {
+ T value;
+ coro_t& coro;
+
+ constexpr static bool await_ready() { return false; }
+
+ template <typename Y, typename R, typename E, typename A>
+ auto await_suspend(coroutine_handle<coro_promise<Y, R, E, A>> h)
+ -> coroutine_handle<>
+ {
+ auto& hp = h.promise();
+
+ if constexpr (!coro_promise<Y, R, E, A>::is_noexcept)
+ {
+ if ((hp.cancel->state.cancelled() != cancellation_type::none)
+ && hp.cancel->throw_if_cancelled_)
+ {
+ asio::detail::throw_error(
+ asio::error::operation_aborted, "coro-cancelled");
+ }
+ }
+
+ if (hp.get_executor() == coro.get_executor())
+ {
+ coro.coro_->awaited_from = h;
+ coro.coro_->reset_error();
+ coro.coro_->input_ = std::move(value);
+ coro.coro_->cancel = hp.cancel;
+ return coro.coro_->get_handle();
+ }
+ else
+ {
+ coro.coro_->awaited_from =
+ dispatch_coroutine(
+ asio::prefer(hp.get_executor(),
+ execution::outstanding_work.tracked),
+ [h]() mutable { h.resume(); }).handle;
+
+ coro.coro_->reset_error();
+ coro.coro_->input_ = std::move(value);
+
+ struct cancel_handler
+ {
+ using src = std::pair<cancellation_signal,
+ detail::coro_cancellation_source>;
+
+ std::shared_ptr<src> st = std::make_shared<src>();
+
+ cancel_handler(E e, coro_t& coro) : e(e), coro_(coro.coro_)
+ {
+ st->second.state =
+ cancellation_state(st->second.slot = st->first.slot());
+ }
+
+ E e;
+ typename coro_t::promise_type* coro_;
+
+ void operator()(cancellation_type ct)
+ {
+ asio::dispatch(e, [ct, st = st]() mutable
+ {
+ auto & [sig, state] = *st;
+ sig.emit(ct);
+ });
+ }
+ };
+
+ if (hp.cancel->state.slot().is_connected())
+ {
+ hp.cancel->state.slot().template emplace<cancel_handler>(
+ coro.get_executor(), coro);
+ }
+
+ auto hh = detail::coroutine_handle<
+ typename coro_t::promise_type>::from_promise(*coro.coro_);
+
+ return dispatch_coroutine(
+ coro.coro_->get_executor(), [hh]() mutable { hh.resume(); }).handle;
+ }
+ }
+
+ auto await_resume() -> typename coro_t::result_type
+ {
+ coro.coro_->cancel = nullptr;
+ coro.coro_->rethrow_if();
+ return std::move(coro.coro_->result_);
+ }
+ };
+
+ template <typename CompletionToken>
+ auto async_resume(CompletionToken&& token) &&
+ {
+ return coro.async_resume(std::move(value),
+ std::forward<CompletionToken>(token));
+ }
+
+ auto operator co_await() &&
+ {
+ return awaitable_t{std::move(value), coro};
+ }
+};
+
+template <bool IsNoexcept>
+struct coro_promise_error;
+
+template <>
+struct coro_promise_error<false>
+{
+ std::exception_ptr error_;
+
+ void reset_error()
+ {
+ error_ = std::exception_ptr{};
+ }
+
+ void unhandled_exception()
+ {
+ error_ = std::current_exception();
+ }
+
+ void rethrow_if()
+ {
+ if (error_)
+ std::rethrow_exception(error_);
+ }
+};
+
+#if defined(__GNUC__)
+# pragma GCC diagnostic push
+# if defined(__clang__)
+# pragma GCC diagnostic ignored "-Wexceptions"
+# else
+# pragma GCC diagnostic ignored "-Wterminate"
+# endif
+#elif defined(_MSC_VER)
+# pragma warning(push)
+# pragma warning (disable:4297)
+#endif
+
+template <>
+struct coro_promise_error<true>
+{
+ void reset_error()
+ {
+ }
+
+ void unhandled_exception() noexcept
+ {
+ throw;
+ }
+
+ void rethrow_if()
+ {
+ }
+};
+
+#if defined(__GNUC__)
+# pragma GCC diagnostic pop
+#elif defined(_MSC_VER)
+# pragma warning(pop)
+#endif
+
+template <typename T = void>
+struct yield_input
+{
+ T& value;
+ coroutine_handle<> awaited_from{noop_coroutine()};
+
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ template <typename U>
+ coroutine_handle<> await_suspend(coroutine_handle<U>) noexcept
+ {
+ return std::exchange(awaited_from, noop_coroutine());
+ }
+
+ T await_resume() const noexcept
+ {
+ return std::move(value);
+ }
+};
+
+template <>
+struct yield_input<void>
+{
+ coroutine_handle<> awaited_from{noop_coroutine()};
+
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ auto await_suspend(coroutine_handle<>) noexcept
+ {
+ return std::exchange(awaited_from, noop_coroutine());
+ }
+
+ constexpr void await_resume() const noexcept
+ {
+ }
+};
+
+struct coro_awaited_from
+{
+ coroutine_handle<> awaited_from{noop_coroutine()};
+
+ auto final_suspend() noexcept
+ {
+ struct suspendor
+ {
+ coroutine_handle<> awaited_from;
+
+ constexpr static bool await_ready() noexcept
+ {
+ return false;
+ }
+
+ auto await_suspend(coroutine_handle<>) noexcept
+ {
+ return std::exchange(awaited_from, noop_coroutine());
+ }
+
+ constexpr static void await_resume() noexcept
+ {
+ }
+ };
+
+ return suspendor{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ ~coro_awaited_from()
+ {
+ awaited_from.resume();
+ }//must be on the right executor
+};
+
+template <typename Yield, typename Input, typename Return>
+struct coro_promise_exchange : coro_awaited_from
+{
+ using result_type = coro_result_t<Yield, Return>;
+
+ result_type result_;
+ Input input_;
+
+ auto yield_value(Yield&& y)
+ {
+ result_ = std::move(y);
+ return yield_input<Input>{std::move(input_),
+ std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ auto yield_value(const Yield& y)
+ {
+ result_ = y;
+ return yield_input<Input>{std::move(input_),
+ std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ void return_value(const Return& r)
+ {
+ result_ = r;
+ }
+
+ void return_value(Return&& r)
+ {
+ result_ = std::move(r);
+ }
+};
+
+template <typename YieldReturn>
+struct coro_promise_exchange<YieldReturn, void, YieldReturn> : coro_awaited_from
+{
+ using result_type = coro_result_t<YieldReturn, YieldReturn>;
+
+ result_type result_;
+
+ auto yield_value(const YieldReturn& y)
+ {
+ result_ = y;
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ auto yield_value(YieldReturn&& y)
+ {
+ result_ = std::move(y);
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ void return_value(const YieldReturn& r)
+ {
+ result_ = r;
+ }
+
+ void return_value(YieldReturn&& r)
+ {
+ result_ = std::move(r);
+ }
+};
+
+template <typename Yield, typename Return>
+struct coro_promise_exchange<Yield, void, Return> : coro_awaited_from
+{
+ using result_type = coro_result_t<Yield, Return>;
+
+ result_type result_;
+
+ auto yield_value(const Yield& y)
+ {
+ result_.template emplace<0>(y);
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ auto yield_value(Yield&& y)
+ {
+ result_.template emplace<0>(std::move(y));
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ void return_value(const Return& r)
+ {
+ result_.template emplace<1>(r);
+ }
+
+ void return_value(Return&& r)
+ {
+ result_.template emplace<1>(std::move(r));
+ }
+};
+
+template <typename Yield, typename Input>
+struct coro_promise_exchange<Yield, Input, void> : coro_awaited_from
+{
+ using result_type = coro_result_t<Yield, void>;
+
+ result_type result_;
+ Input input_;
+
+ auto yield_value(Yield&& y)
+ {
+ result_ = std::move(y);
+ return yield_input<Input>{input_,
+ std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ auto yield_value(const Yield& y)
+ {
+ result_ = y;
+ return yield_input<Input>{input_,
+ std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ void return_void()
+ {
+ result_.reset();
+ }
+};
+
+template <typename Return>
+struct coro_promise_exchange<void, void, Return> : coro_awaited_from
+{
+ using result_type = coro_result_t<void, Return>;
+
+ result_type result_;
+
+ void yield_value();
+
+ void return_value(const Return& r)
+ {
+ result_ = r;
+ }
+
+ void return_value(Return&& r)
+ {
+ result_ = std::move(r);
+ }
+};
+
+template <>
+struct coro_promise_exchange<void, void, void> : coro_awaited_from
+{
+ void return_void() {}
+
+ void yield_value();
+};
+
+template <typename Yield>
+struct coro_promise_exchange<Yield, void, void> : coro_awaited_from
+{
+ using result_type = coro_result_t<Yield, void>;
+
+ result_type result_;
+
+ auto yield_value(const Yield& y)
+ {
+ result_ = y;
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ auto yield_value(Yield&& y)
+ {
+ result_ = std::move(y);
+ return yield_input<void>{std::exchange(awaited_from, noop_coroutine())};
+ }
+
+ void return_void()
+ {
+ result_.reset();
+ }
+};
+
+template <typename Yield, typename Return,
+ typename Executor, typename Allocator>
+struct coro_promise final :
+ coro_promise_allocator<Allocator>,
+ coro_promise_error<coro_traits<Yield, Return, Executor>::is_noexcept>,
+ coro_promise_exchange<
+ typename coro_traits<Yield, Return, Executor>::yield_type,
+ typename coro_traits<Yield, Return, Executor>::input_type,
+ typename coro_traits<Yield, Return, Executor>::return_type>
+{
+ using coro_type = coro<Yield, Return, Executor, Allocator>;
+
+ auto handle()
+ {
+ return coroutine_handle<coro_promise>::from_promise(this);
+ }
+
+ using executor_type = Executor;
+
+ executor_type executor_;
+
+ std::optional<coro_cancellation_source> cancel_source;
+ coro_cancellation_source * cancel;
+
+ using cancellation_slot_type = asio::cancellation_slot;
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return cancel ? cancel->slot : cancellation_slot_type{};
+ }
+
+ using allocator_type =
+ typename std::allocator_traits<associated_allocator_t<Executor>>::
+ template rebind_alloc<std::byte>;
+ using traits = coro_traits<Yield, Return, Executor>;
+
+ using input_type = typename traits::input_type;
+ using yield_type = typename traits::yield_type;
+ using return_type = typename traits::return_type;
+ using error_type = typename traits::error_type;
+ using result_type = typename traits::result_type;
+ constexpr static bool is_noexcept = traits::is_noexcept;
+
+ auto get_executor() const -> Executor
+ {
+ return executor_;
+ }
+
+ auto get_handle()
+ {
+ return coroutine_handle<coro_promise>::from_promise(*this);
+ }
+
+ template <typename... Args>
+ coro_promise(Executor executor, Args&&... args) noexcept
+ : coro_promise_allocator<Allocator>(
+ executor, std::forward<Args>(args)...),
+ executor_(std::move(executor))
+ {
+ }
+
+ template <typename First, typename... Args>
+ coro_promise(First&& f, Executor executor, Args&&... args) noexcept
+ : coro_promise_allocator<Allocator>(
+ f, executor, std::forward<Args>(args)...),
+ executor_(std::move(executor))
+ {
+ }
+
+ template <typename First, detail::execution_context Context, typename... Args>
+ coro_promise(First&& f, Context&& ctx, Args&&... args) noexcept
+ : coro_promise_allocator<Allocator>(
+ f, ctx, std::forward<Args>(args)...),
+ executor_(ctx.get_executor())
+ {
+ }
+
+ template <detail::execution_context Context, typename... Args>
+ coro_promise(Context&& ctx, Args&&... args) noexcept
+ : coro_promise_allocator<Allocator>(
+ ctx, std::forward<Args>(args)...),
+ executor_(ctx.get_executor())
+ {
+ }
+
+ auto get_return_object()
+ {
+ return coro<Yield, Return, Executor, Allocator>{this};
+ }
+
+ auto initial_suspend() noexcept
+ {
+ return suspend_always{};
+ }
+
+ using coro_promise_exchange<
+ typename coro_traits<Yield, Return, Executor>::yield_type,
+ typename coro_traits<Yield, Return, Executor>::input_type,
+ typename coro_traits<Yield, Return, Executor>::return_type>::yield_value;
+
+ auto await_transform(this_coro::executor_t) const
+ {
+ struct exec_helper
+ {
+ const executor_type& value;
+
+ constexpr static bool await_ready() noexcept
+ {
+ return true;
+ }
+
+ constexpr static void await_suspend(coroutine_handle<>) noexcept
+ {
+ }
+
+ executor_type await_resume() const noexcept
+ {
+ return value;
+ }
+ };
+
+ return exec_helper{executor_};
+ }
+
+ auto await_transform(this_coro::cancellation_state_t) const
+ {
+ struct exec_helper
+ {
+ const asio::cancellation_state& value;
+
+ constexpr static bool await_ready() noexcept
+ {
+ return true;
+ }
+
+ constexpr static void await_suspend(coroutine_handle<>) noexcept
+ {
+ }
+
+ asio::cancellation_state await_resume() const noexcept
+ {
+ return value;
+ }
+ };
+ assert(cancel);
+ return exec_helper{cancel->state};
+ }
+
+ // This await transformation resets the associated cancellation state.
+ auto await_transform(this_coro::reset_cancellation_state_0_t) noexcept
+ {
+ struct result
+ {
+ detail::coro_cancellation_source * src_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume() const
+ {
+ return src_->reset_cancellation_state();
+ }
+ };
+
+ return result{cancel};
+ }
+
+ // This await transformation resets the associated cancellation state.
+ template <typename Filter>
+ auto await_transform(
+ this_coro::reset_cancellation_state_1_t<Filter> reset) noexcept
+ {
+ struct result
+ {
+ detail::coro_cancellation_source* src_;
+ Filter filter_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ return src_->reset_cancellation_state(
+ static_cast<Filter&&>(filter_));
+ }
+ };
+
+ return result{cancel, static_cast<Filter&&>(reset.filter)};
+ }
+
+ // This await transformation resets the associated cancellation state.
+ template <typename InFilter, typename OutFilter>
+ auto await_transform(
+ this_coro::reset_cancellation_state_2_t<InFilter, OutFilter> reset)
+ noexcept
+ {
+ struct result
+ {
+ detail::coro_cancellation_source* src_;
+ InFilter in_filter_;
+ OutFilter out_filter_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ return src_->reset_cancellation_state(
+ static_cast<InFilter&&>(in_filter_),
+ static_cast<OutFilter&&>(out_filter_));
+ }
+ };
+
+ return result{cancel,
+ static_cast<InFilter&&>(reset.in_filter),
+ static_cast<OutFilter&&>(reset.out_filter)};
+ }
+
+ // This await transformation determines whether cancellation is propagated as
+ // an exception.
+ auto await_transform(this_coro::throw_if_cancelled_0_t) noexcept
+ requires (!is_noexcept)
+ {
+ struct result
+ {
+ detail::coro_cancellation_source* src_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ return src_->throw_if_cancelled();
+ }
+ };
+
+ return result{cancel};
+ }
+
+ // This await transformation sets whether cancellation is propagated as an
+ // exception.
+ auto await_transform(
+ this_coro::throw_if_cancelled_1_t throw_if_cancelled) noexcept
+ requires (!is_noexcept)
+ {
+ struct result
+ {
+ detail::coro_cancellation_source* src_;
+ bool value_;
+
+ bool await_ready() const noexcept
+ {
+ return true;
+ }
+
+ void await_suspend(coroutine_handle<void>) noexcept
+ {
+ }
+
+ auto await_resume()
+ {
+ src_->throw_if_cancelled(value_);
+ }
+ };
+
+ return result{cancel, throw_if_cancelled.value};
+ }
+
+ template <typename Yield_, typename Return_,
+ typename Executor_, typename Allocator_>
+ auto await_transform(coro<Yield_, Return_, Executor_, Allocator_>& kr)
+ -> decltype(auto)
+ {
+ return kr;
+ }
+
+ template <typename Yield_, typename Return_,
+ typename Executor_, typename Allocator_>
+ auto await_transform(coro<Yield_, Return_, Executor_, Allocator_>&& kr)
+ {
+ return std::move(kr);
+ }
+
+ template <typename T_, typename Coroutine >
+ auto await_transform(coro_with_arg<T_, Coroutine>&& kr) -> decltype(auto)
+ {
+ return std::move(kr);
+ }
+
+ template <typename T_>
+ requires requires(T_ t) {{ t.async_wait(deferred) }; }
+ auto await_transform(T_& t) -> decltype(auto)
+ {
+ return await_transform(t.async_wait(deferred));
+ }
+
+ template <typename Op>
+ auto await_transform(Op&& op,
+ constraint_t<is_async_operation<Op>::value> = 0)
+ {
+ if ((cancel->state.cancelled() != cancellation_type::none)
+ && cancel->throw_if_cancelled_)
+ {
+ asio::detail::throw_error(
+ asio::error::operation_aborted, "coro-cancelled");
+ }
+ using signature = completion_signature_of_t<Op>;
+ using result_type = detail::coro_completion_handler_type_t<signature>;
+ using handler_type =
+ typename detail::coro_completion_handler_type<signature>::template
+ completion_handler<coro_promise>;
+
+ struct aw_t
+ {
+ Op op;
+ std::optional<result_type> result;
+
+ constexpr static bool await_ready()
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<coro_promise> h)
+ {
+ std::move(op)(handler_type{h, result});
+ }
+
+ auto await_resume()
+ {
+ if constexpr (is_noexcept)
+ {
+ if constexpr (std::tuple_size_v<result_type> == 0u)
+ return;
+ else if constexpr (std::tuple_size_v<result_type> == 1u)
+ return std::get<0>(std::move(result).value());
+ else
+ return std::move(result).value();
+ }
+ else
+ return detail::coro_interpret_result(std::move(result).value());
+ }
+ };
+
+ return aw_t{std::move(op), {}};
+ }
+};
+
+} // namespace detail
+
+template <typename Yield, typename Return,
+ typename Executor, typename Allocator>
+struct coro<Yield, Return, Executor, Allocator>::awaitable_t
+{
+ coro& coro_;
+
+ constexpr static bool await_ready() { return false; }
+
+ template <typename Y, typename R, typename E, typename A>
+ auto await_suspend(
+ detail::coroutine_handle<detail::coro_promise<Y, R, E, A>> h)
+ -> detail::coroutine_handle<>
+ {
+ auto& hp = h.promise();
+
+ if constexpr (!detail::coro_promise<Y, R, E, A>::is_noexcept)
+ {
+ if ((hp.cancel->state.cancelled() != cancellation_type::none)
+ && hp.cancel->throw_if_cancelled_)
+ {
+ asio::detail::throw_error(
+ asio::error::operation_aborted, "coro-cancelled");
+ }
+ }
+
+ if (hp.get_executor() == coro_.get_executor())
+ {
+ coro_.coro_->awaited_from = h;
+ coro_.coro_->cancel = hp.cancel;
+ coro_.coro_->reset_error();
+
+ return coro_.coro_->get_handle();
+ }
+ else
+ {
+ coro_.coro_->awaited_from = detail::dispatch_coroutine(
+ asio::prefer(hp.get_executor(),
+ execution::outstanding_work.tracked),
+ [h]() mutable
+ {
+ h.resume();
+ }).handle;
+
+ coro_.coro_->reset_error();
+
+ struct cancel_handler
+ {
+ std::shared_ptr<std::pair<cancellation_signal,
+ detail::coro_cancellation_source>> st = std::make_shared<
+ std::pair<cancellation_signal, detail::coro_cancellation_source>>();
+
+ cancel_handler(E e, coro& coro) : e(e), coro_(coro.coro_)
+ {
+ st->second.state = cancellation_state(
+ st->second.slot = st->first.slot());
+ }
+
+ E e;
+ typename coro::promise_type* coro_;
+
+ void operator()(cancellation_type ct)
+ {
+ asio::dispatch(e,
+ [ct, st = st]() mutable
+ {
+ auto & [sig, state] = *st;
+ sig.emit(ct);
+ });
+ }
+ };
+
+ if (hp.cancel->state.slot().is_connected())
+ {
+ hp.cancel->state.slot().template emplace<cancel_handler>(
+ coro_.get_executor(), coro_);
+ }
+
+ auto hh = detail::coroutine_handle<
+ detail::coro_promise<Yield, Return, Executor, Allocator>>::from_promise(
+ *coro_.coro_);
+
+ return detail::dispatch_coroutine(
+ coro_.coro_->get_executor(),
+ [hh]() mutable { hh.resume(); }).handle;
+ }
+ }
+
+ auto await_resume() -> result_type
+ {
+ coro_.coro_->cancel = nullptr;
+ coro_.coro_->rethrow_if();
+ if constexpr (!std::is_void_v<result_type>)
+ return std::move(coro_.coro_->result_);
+ }
+};
+
+template <typename Yield, typename Return,
+ typename Executor, typename Allocator>
+struct coro<Yield, Return, Executor, Allocator>::initiate_async_resume
+{
+ typedef Executor executor_type;
+ typedef Allocator allocator_type;
+ typedef asio::cancellation_slot cancellation_slot_type;
+
+ explicit initiate_async_resume(coro* self)
+ : coro_(self->coro_)
+ {
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return coro_->get_executor();
+ }
+
+ allocator_type get_allocator() const noexcept
+ {
+ return coro_->get_allocator();
+ }
+
+ template <typename E, typename WaitHandler>
+ auto handle(E exec, WaitHandler&& handler,
+ std::true_type /* error is noexcept */,
+ std::true_type /* result is void */) //noexcept
+ {
+ return [this, the_coro = coro_,
+ h = std::forward<WaitHandler>(handler),
+ exec = std::move(exec)]() mutable
+ {
+ assert(the_coro);
+
+ auto ch = detail::coroutine_handle<promise_type>::from_promise(*the_coro);
+ assert(ch && !ch.done());
+
+ the_coro->awaited_from = post_coroutine(std::move(exec), std::move(h));
+ the_coro->reset_error();
+ ch.resume();
+ };
+ }
+
+ template <typename E, typename WaitHandler>
+ requires (!std::is_void_v<result_type>)
+ auto handle(E exec, WaitHandler&& handler,
+ std::true_type /* error is noexcept */,
+ std::false_type /* result is void */) //noexcept
+ {
+ return [the_coro = coro_,
+ h = std::forward<WaitHandler>(handler),
+ exec = std::move(exec)]() mutable
+ {
+ assert(the_coro);
+
+ auto ch = detail::coroutine_handle<promise_type>::from_promise(*the_coro);
+ assert(ch && !ch.done());
+
+ the_coro->awaited_from = detail::post_coroutine(
+ exec, std::move(h), the_coro->result_).handle;
+ the_coro->reset_error();
+ ch.resume();
+ };
+ }
+
+ template <typename E, typename WaitHandler>
+ auto handle(E exec, WaitHandler&& handler,
+ std::false_type /* error is noexcept */,
+ std::true_type /* result is void */)
+ {
+ return [the_coro = coro_,
+ h = std::forward<WaitHandler>(handler),
+ exec = std::move(exec)]() mutable
+ {
+ if (!the_coro)
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::invalid()));
+
+ auto ch = detail::coroutine_handle<promise_type>::from_promise(*the_coro);
+ if (!ch)
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::invalid()));
+ else if (ch.done())
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::done()));
+ else
+ {
+ the_coro->awaited_from = detail::post_coroutine(
+ exec, std::move(h), the_coro->error_).handle;
+ the_coro->reset_error();
+ ch.resume();
+ }
+ };
+ }
+
+ template <typename E, typename WaitHandler>
+ auto handle(E exec, WaitHandler&& handler,
+ std::false_type /* error is noexcept */,
+ std::false_type /* result is void */)
+ {
+ return [the_coro = coro_,
+ h = std::forward<WaitHandler>(handler),
+ exec = std::move(exec)]() mutable
+ {
+ if (!the_coro)
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::invalid(), result_type{}));
+
+ auto ch =
+ detail::coroutine_handle<promise_type>::from_promise(*the_coro);
+ if (!ch)
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::invalid(), result_type{}));
+ else if (ch.done())
+ return asio::post(exec,
+ asio::append(std::move(h),
+ detail::coro_error<error_type>::done(), result_type{}));
+ else
+ {
+ the_coro->awaited_from = detail::post_coroutine(
+ exec, std::move(h), the_coro->error_, the_coro->result_).handle;
+ the_coro->reset_error();
+ ch.resume();
+ }
+ };
+ }
+
+ template <typename WaitHandler>
+ void operator()(WaitHandler&& handler)
+ {
+ const auto exec = asio::prefer(
+ get_associated_executor(handler, get_executor()),
+ execution::outstanding_work.tracked);
+
+ coro_->cancel = &coro_->cancel_source.emplace();
+ coro_->cancel->state = cancellation_state(
+ coro_->cancel->slot = get_associated_cancellation_slot(handler));
+ asio::dispatch(get_executor(),
+ handle(exec, std::forward<WaitHandler>(handler),
+ std::integral_constant<bool, is_noexcept>{},
+ std::is_void<result_type>{}));
+ }
+
+ template <typename WaitHandler, typename Input>
+ void operator()(WaitHandler&& handler, Input&& input)
+ {
+ const auto exec = asio::prefer(
+ get_associated_executor(handler, get_executor()),
+ execution::outstanding_work.tracked);
+
+ coro_->cancel = &coro_->cancel_source.emplace();
+ coro_->cancel->state = cancellation_state(
+ coro_->cancel->slot = get_associated_cancellation_slot(handler));
+ asio::dispatch(get_executor(),
+ [h = handle(exec, std::forward<WaitHandler>(handler),
+ std::integral_constant<bool, is_noexcept>{},
+ std::is_void<result_type>{}),
+ in = std::forward<Input>(input), the_coro = coro_]() mutable
+ {
+ the_coro->input_ = std::move(in);
+ std::move(h)();
+ });
+ }
+
+private:
+ typename coro::promise_type* coro_;
+};
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_IMPL_CORO_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/deferred.hpp b/3rdparty/asio/include/asio/experimental/impl/deferred.hpp
deleted file mode 100644
index e9b9b29fa2f..00000000000
--- a/3rdparty/asio/include/asio/experimental/impl/deferred.hpp
+++ /dev/null
@@ -1,104 +0,0 @@
-//
-// experimental/impl/deferred.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_EXPERIMENTAL_IMPL_DEFERRED_HPP
-#define ASIO_EXPERIMENTAL_IMPL_DEFERRED_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename R, typename... Args>
-class async_result<
- experimental::detail::deferred_signature_probe, R(Args...)>
-{
-public:
- typedef experimental::detail::deferred_signature_probe_result<void(Args...)>
- return_type;
-
- template <typename Initiation, typename... InitArgs>
- static return_type initiate(
- ASIO_MOVE_ARG(Initiation),
- experimental::detail::deferred_signature_probe,
- ASIO_MOVE_ARG(InitArgs)...)
- {
- return return_type{};
- }
-};
-
-template <typename Signature>
-class async_result<experimental::deferred_t, Signature>
-{
-public:
- template <typename Initiation, typename... InitArgs>
- static experimental::deferred_async_operation<
- Signature, Initiation, InitArgs...>
- initiate(ASIO_MOVE_ARG(Initiation) initiation,
- experimental::deferred_t, ASIO_MOVE_ARG(InitArgs)... args)
- {
- return experimental::deferred_async_operation<
- Signature, Initiation, InitArgs...>(
- experimental::deferred_init_tag{},
- ASIO_MOVE_CAST(Initiation)(initiation),
- ASIO_MOVE_CAST(InitArgs)(args)...);
- }
-};
-
-template <typename Function, typename R, typename... Args>
-class async_result<
- experimental::deferred_function<Function>, R(Args...)>
-{
-public:
- template <typename Initiation, typename... InitArgs>
- static auto initiate(ASIO_MOVE_ARG(Initiation) initiation,
- experimental::deferred_function<Function> token,
- ASIO_MOVE_ARG(InitArgs)... init_args)
- {
- return experimental::deferred_sequence<
- experimental::deferred_async_operation<
- R(Args...), Initiation, InitArgs...>,
- Function>(experimental::deferred_init_tag{},
- experimental::deferred_async_operation<
- R(Args...), Initiation, InitArgs...>(
- experimental::deferred_init_tag{},
- ASIO_MOVE_CAST(Initiation)(initiation),
- ASIO_MOVE_CAST(InitArgs)(init_args)...),
- ASIO_MOVE_CAST(Function)(token.function_));
- }
-};
-
-template <template <typename, typename> class Associator,
- typename Handler, typename Tail, typename DefaultCandidate>
-struct associator<Associator,
- experimental::detail::deferred_sequence_handler<Handler, Tail>,
- DefaultCandidate>
- : Associator<Handler, DefaultCandidate>
-{
- static typename Associator<Handler, DefaultCandidate>::type get(
- const experimental::detail::deferred_sequence_handler<Handler, Tail>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
- {
- return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_EXPERIMENTAL_IMPL_DEFERRED_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/parallel_group.hpp b/3rdparty/asio/include/asio/experimental/impl/parallel_group.hpp
index e1cfc1e2c98..75e8a151876 100644
--- a/3rdparty/asio/include/asio/experimental/impl/parallel_group.hpp
+++ b/3rdparty/asio/include/asio/experimental/impl/parallel_group.hpp
@@ -2,7 +2,7 @@
// experimental/impl/parallel_group.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,6 +17,7 @@
#include "asio/detail/config.hpp"
#include <atomic>
+#include <deque>
#include <memory>
#include <new>
#include <tuple>
@@ -83,12 +84,12 @@ private:
template <typename Handler, typename... Ops>
struct parallel_group_completion_handler
{
- typedef typename decay<
- typename prefer_result<
- typename associated_executor<Handler>::type,
+ typedef decay_t<
+ prefer_result_t<
+ associated_executor_t<Handler>,
execution::outstanding_work_t::tracked_t
- >::type
- >::type executor_type;
+ >
+ > executor_type;
parallel_group_completion_handler(Handler&& h)
: handler_(std::move(h)),
@@ -106,11 +107,11 @@ struct parallel_group_completion_handler
void operator()()
{
- this->invoke(std::make_index_sequence<sizeof...(Ops)>());
+ this->invoke(asio::detail::make_index_sequence<sizeof...(Ops)>());
}
template <std::size_t... I>
- void invoke(std::index_sequence<I...>)
+ void invoke(asio::detail::index_sequence<I...>)
{
this->invoke(std::tuple_cat(std::move(std::get<I>(args_).get())...));
}
@@ -118,11 +119,13 @@ struct parallel_group_completion_handler
template <typename... Args>
void invoke(std::tuple<Args...>&& args)
{
- this->invoke(std::move(args), std::make_index_sequence<sizeof...(Args)>());
+ this->invoke(std::move(args),
+ asio::detail::index_sequence_for<Args...>());
}
template <typename... Args, std::size_t... I>
- void invoke(std::tuple<Args...>&& args, std::index_sequence<I...>)
+ void invoke(std::tuple<Args...>&& args,
+ asio::detail::index_sequence<I...>)
{
std::move(handler_)(completion_order_, std::move(std::get<I>(args))...);
}
@@ -133,7 +136,7 @@ struct parallel_group_completion_handler
std::tuple<
parallel_group_op_result<
typename parallel_op_signature_as_tuple<
- typename parallel_op_signature<Ops>::type
+ completion_signature_of_t<Ops>
>::type
>...
> args_{};
@@ -186,7 +189,7 @@ struct parallel_group_op_handler
typedef asio::cancellation_slot cancellation_slot_type;
parallel_group_op_handler(
- std::shared_ptr<parallel_group_state<Condition, Handler, Ops...> > state)
+ std::shared_ptr<parallel_group_state<Condition, Handler, Ops...>> state)
: state_(std::move(state))
{
}
@@ -227,7 +230,7 @@ struct parallel_group_op_handler
asio::dispatch(std::move(state_->handler_));
}
- std::shared_ptr<parallel_group_state<Condition, Handler, Ops...> > state_;
+ std::shared_ptr<parallel_group_state<Condition, Handler, Ops...>> state_;
};
// Handler for an individual operation within the parallel group that has an
@@ -242,7 +245,7 @@ struct parallel_group_op_handler_with_executor :
typedef Executor executor_type;
parallel_group_op_handler_with_executor(
- std::shared_ptr<parallel_group_state<Condition, Handler, Ops...> > state,
+ std::shared_ptr<parallel_group_state<Condition, Handler, Ops...>> state,
executor_type ex)
: parallel_group_op_handler<I, Condition, Handler, Ops...>(std::move(state))
{
@@ -266,7 +269,7 @@ struct parallel_group_op_handler_with_executor :
{
cancel_proxy(
std::shared_ptr<parallel_group_state<
- Condition, Handler, Ops...> > state,
+ Condition, Handler, Ops...>> state,
executor_type ex)
: state_(std::move(state)),
executor_(std::move(ex))
@@ -283,7 +286,7 @@ struct parallel_group_op_handler_with_executor :
}
}
- std::weak_ptr<parallel_group_state<Condition, Handler, Ops...> > state_;
+ std::weak_ptr<parallel_group_state<Condition, Handler, Ops...>> state_;
asio::cancellation_signal signal_;
executor_type executor_;
};
@@ -298,9 +301,9 @@ struct parallel_group_op_launcher
template <typename Condition, typename Handler, typename... Ops>
static void launch(Op& op,
const std::shared_ptr<parallel_group_state<
- Condition, Handler, Ops...> >& state)
+ Condition, Handler, Ops...>>& state)
{
- typedef typename associated_executor<Op>::type ex_type;
+ typedef associated_executor_t<Op> ex_type;
ex_type ex = asio::get_associated_executor(op);
std::move(op)(
parallel_group_op_handler_with_executor<ex_type, I,
@@ -311,18 +314,18 @@ struct parallel_group_op_launcher
// Specialised launcher for operations that specify no executor.
template <std::size_t I, typename Op>
struct parallel_group_op_launcher<I, Op,
- typename enable_if<
+ enable_if_t<
is_same<
typename associated_executor<
Op>::asio_associated_executor_is_unspecialised,
void
>::value
- >::type>
+ >>
{
template <typename Condition, typename Handler, typename... Ops>
static void launch(Op& op,
const std::shared_ptr<parallel_group_state<
- Condition, Handler, Ops...> >& state)
+ Condition, Handler, Ops...>>& state)
{
std::move(op)(
parallel_group_op_handler<I, Condition, Handler, Ops...>(state));
@@ -333,7 +336,7 @@ template <typename Condition, typename Handler, typename... Ops>
struct parallel_group_cancellation_handler
{
parallel_group_cancellation_handler(
- std::shared_ptr<parallel_group_state<Condition, Handler, Ops...> > state)
+ std::shared_ptr<parallel_group_state<Condition, Handler, Ops...>> state)
: state_(std::move(state))
{
}
@@ -344,22 +347,23 @@ struct parallel_group_cancellation_handler
// yet completed and requested cancellation, emit a signal for each
// operation in the group.
if (cancel_type != cancellation_type::none)
- if (state_->cancellations_requested_++ == 0)
- for (std::size_t i = 0; i < sizeof...(Ops); ++i)
- state_->cancellation_signals_[i].emit(cancel_type);
+ if (auto state = state_.lock())
+ if (state->cancellations_requested_++ == 0)
+ for (std::size_t i = 0; i < sizeof...(Ops); ++i)
+ state->cancellation_signals_[i].emit(cancel_type);
}
- std::shared_ptr<parallel_group_state<Condition, Handler, Ops...> > state_;
+ std::weak_ptr<parallel_group_state<Condition, Handler, Ops...>> state_;
};
template <typename Condition, typename Handler,
typename... Ops, std::size_t... I>
void parallel_group_launch(Condition cancellation_condition, Handler handler,
- std::tuple<Ops...>& ops, std::index_sequence<I...>)
+ std::tuple<Ops...>& ops, asio::detail::index_sequence<I...>)
{
// Get the user's completion handler's cancellation slot, so that we can allow
// cancellation of the entire group.
- typename associated_cancellation_slot<Handler>::type slot
+ associated_cancellation_slot_t<Handler> slot
= asio::get_associated_cancellation_slot(handler);
// Create the shared state for the operation.
@@ -386,29 +390,348 @@ void parallel_group_launch(Condition cancellation_condition, Handler handler,
if (slot.is_connected())
slot.template emplace<
parallel_group_cancellation_handler<
- Condition, Handler, Ops...> >(state);
+ Condition, Handler, Ops...>>(state);
}
-} // namespace detail
-} // namespace experimental
+// Proxy completion handler for the ranged group of parallel operatations.
+// Unpacks and recombines the individual operations' results, and invokes the
+// user's completion handler.
+template <typename Handler, typename Op, typename Allocator>
+struct ranged_parallel_group_completion_handler
+{
+ typedef decay_t<
+ prefer_result_t<
+ associated_executor_t<Handler>,
+ execution::outstanding_work_t::tracked_t
+ >
+ > executor_type;
+
+ typedef typename parallel_op_signature_as_tuple<
+ completion_signature_of_t<Op>
+ >::type op_tuple_type;
+
+ typedef parallel_group_op_result<op_tuple_type> op_result_type;
+
+ ranged_parallel_group_completion_handler(Handler&& h,
+ std::size_t size, const Allocator& allocator)
+ : handler_(std::move(h)),
+ executor_(
+ asio::prefer(
+ asio::get_associated_executor(handler_),
+ execution::outstanding_work.tracked)),
+ allocator_(allocator),
+ completion_order_(size, 0,
+ ASIO_REBIND_ALLOC(Allocator, std::size_t)(allocator)),
+ args_(ASIO_REBIND_ALLOC(Allocator, op_result_type)(allocator))
+ {
+ for (std::size_t i = 0; i < size; ++i)
+ args_.emplace_back();
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ void operator()()
+ {
+ this->invoke(
+ asio::detail::make_index_sequence<
+ std::tuple_size<op_tuple_type>::value>());
+ }
+
+ template <std::size_t... I>
+ void invoke(asio::detail::index_sequence<I...>)
+ {
+ typedef typename parallel_op_signature_as_tuple<
+ typename ranged_parallel_group_signature<
+ completion_signature_of_t<Op>,
+ Allocator
+ >::raw_type
+ >::type vectors_type;
+
+ // Construct all result vectors using the supplied allocator.
+ vectors_type vectors{
+ typename std::tuple_element<I, vectors_type>::type(
+ ASIO_REBIND_ALLOC(Allocator, int)(allocator_))...};
+
+ // Reserve sufficient space in each of the result vectors.
+ int reserve_fold[] = { 0,
+ ( std::get<I>(vectors).reserve(completion_order_.size()),
+ 0 )...
+ };
+ (void)reserve_fold;
+
+ // Copy the results from all operations into the result vectors.
+ for (std::size_t idx = 0; idx < completion_order_.size(); ++idx)
+ {
+ int pushback_fold[] = { 0,
+ ( std::get<I>(vectors).push_back(
+ std::move(std::get<I>(args_[idx].get()))),
+ 0 )...
+ };
+ (void)pushback_fold;
+ }
+
+ std::move(handler_)(std::move(completion_order_),
+ std::move(std::get<I>(vectors))...);
+ }
+
+ Handler handler_;
+ executor_type executor_;
+ Allocator allocator_;
+ std::vector<std::size_t,
+ ASIO_REBIND_ALLOC(Allocator, std::size_t)> completion_order_;
+ std::deque<op_result_type,
+ ASIO_REBIND_ALLOC(Allocator, op_result_type)> args_;
+};
-template <typename R, typename... Args>
-class async_result<
- experimental::detail::parallel_op_signature_probe,
- R(Args...)>
+// Shared state for the parallel group.
+template <typename Condition, typename Handler, typename Op, typename Allocator>
+struct ranged_parallel_group_state
{
-public:
- typedef experimental::detail::parallel_op_signature_probe_result<
- void(Args...)> return_type;
+ ranged_parallel_group_state(Condition&& c, Handler&& h,
+ std::size_t size, const Allocator& allocator)
+ : cancellations_requested_(size),
+ outstanding_(size),
+ cancellation_signals_(
+ ASIO_REBIND_ALLOC(Allocator,
+ asio::cancellation_signal)(allocator)),
+ cancellation_condition_(std::move(c)),
+ handler_(std::move(h), size, allocator)
+ {
+ for (std::size_t i = 0; i < size; ++i)
+ cancellation_signals_.emplace_back();
+ }
+
+ // The number of operations that have completed so far. Used to determine the
+ // order of completion.
+ std::atomic<unsigned int> completed_{0};
+
+ // The non-none cancellation type that resulted from a cancellation condition.
+ // Stored here for use by the group's initiating function.
+ std::atomic<cancellation_type_t> cancel_type_{cancellation_type::none};
+
+ // The number of cancellations that have been requested, either on completion
+ // of the operations within the group, or via the cancellation slot for the
+ // group operation. Initially set to the number of operations to prevent
+ // cancellation signals from being emitted until after all of the group's
+ // operations' initiating functions have completed.
+ std::atomic<unsigned int> cancellations_requested_;
- template <typename Initiation, typename... InitArgs>
- static return_type initiate(Initiation&&,
- experimental::detail::parallel_op_signature_probe, InitArgs&&...)
+ // The number of operations that are yet to complete. Used to determine when
+ // it is safe to invoke the user's completion handler.
+ std::atomic<unsigned int> outstanding_;
+
+ // The cancellation signals for each operation in the group.
+ std::deque<asio::cancellation_signal,
+ ASIO_REBIND_ALLOC(Allocator, asio::cancellation_signal)>
+ cancellation_signals_;
+
+ // The cancellation condition is used to determine whether the results from an
+ // individual operation warrant a cancellation request for the whole group.
+ Condition cancellation_condition_;
+
+ // The proxy handler to be invoked once all operations in the group complete.
+ ranged_parallel_group_completion_handler<Handler, Op, Allocator> handler_;
+};
+
+// Handler for an individual operation within the parallel group.
+template <typename Condition, typename Handler, typename Op, typename Allocator>
+struct ranged_parallel_group_op_handler
+{
+ typedef asio::cancellation_slot cancellation_slot_type;
+
+ ranged_parallel_group_op_handler(
+ std::shared_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state,
+ std::size_t idx)
+ : state_(std::move(state)),
+ idx_(idx)
{
- return return_type{};
}
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return state_->cancellation_signals_[idx_].slot();
+ }
+
+ template <typename... Args>
+ void operator()(Args... args)
+ {
+ // Capture this operation into the completion order.
+ state_->handler_.completion_order_[state_->completed_++] = idx_;
+
+ // Determine whether the results of this operation require cancellation of
+ // the whole group.
+ cancellation_type_t cancel_type = state_->cancellation_condition_(args...);
+
+ // Capture the result of the operation into the proxy completion handler.
+ state_->handler_.args_[idx_].emplace(std::move(args)...);
+
+ if (cancel_type != cancellation_type::none)
+ {
+ // Save the type for potential use by the group's initiating function.
+ state_->cancel_type_ = cancel_type;
+
+ // If we are the first operation to request cancellation, emit a signal
+ // for each operation in the group.
+ if (state_->cancellations_requested_++ == 0)
+ for (std::size_t i = 0; i < state_->cancellation_signals_.size(); ++i)
+ if (i != idx_)
+ state_->cancellation_signals_[i].emit(cancel_type);
+ }
+
+ // If this is the last outstanding operation, invoke the user's handler.
+ if (--state_->outstanding_ == 0)
+ asio::dispatch(std::move(state_->handler_));
+ }
+
+ std::shared_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state_;
+ std::size_t idx_;
};
+// Handler for an individual operation within the parallel group that has an
+// explicitly specified executor.
+template <typename Executor, typename Condition,
+ typename Handler, typename Op, typename Allocator>
+struct ranged_parallel_group_op_handler_with_executor :
+ ranged_parallel_group_op_handler<Condition, Handler, Op, Allocator>
+{
+ typedef ranged_parallel_group_op_handler<
+ Condition, Handler, Op, Allocator> base_type;
+ typedef asio::cancellation_slot cancellation_slot_type;
+ typedef Executor executor_type;
+
+ ranged_parallel_group_op_handler_with_executor(
+ std::shared_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state,
+ executor_type ex, std::size_t idx)
+ : ranged_parallel_group_op_handler<Condition, Handler, Op, Allocator>(
+ std::move(state), idx)
+ {
+ cancel_proxy_ =
+ &this->state_->cancellation_signals_[idx].slot().template
+ emplace<cancel_proxy>(this->state_, std::move(ex));
+ }
+
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return cancel_proxy_->signal_.slot();
+ }
+
+ executor_type get_executor() const noexcept
+ {
+ return cancel_proxy_->executor_;
+ }
+
+ // Proxy handler that forwards the emitted signal to the correct executor.
+ struct cancel_proxy
+ {
+ cancel_proxy(
+ std::shared_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state,
+ executor_type ex)
+ : state_(std::move(state)),
+ executor_(std::move(ex))
+ {
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ if (auto state = state_.lock())
+ {
+ asio::cancellation_signal* sig = &signal_;
+ asio::dispatch(executor_,
+ [state, sig, type]{ sig->emit(type); });
+ }
+ }
+
+ std::weak_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state_;
+ asio::cancellation_signal signal_;
+ executor_type executor_;
+ };
+
+ cancel_proxy* cancel_proxy_;
+};
+
+template <typename Condition, typename Handler, typename Op, typename Allocator>
+struct ranged_parallel_group_cancellation_handler
+{
+ ranged_parallel_group_cancellation_handler(
+ std::shared_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state)
+ : state_(std::move(state))
+ {
+ }
+
+ void operator()(cancellation_type_t cancel_type)
+ {
+ // If we are the first place to request cancellation, i.e. no operation has
+ // yet completed and requested cancellation, emit a signal for each
+ // operation in the group.
+ if (cancel_type != cancellation_type::none)
+ if (auto state = state_.lock())
+ if (state->cancellations_requested_++ == 0)
+ for (std::size_t i = 0; i < state->cancellation_signals_.size(); ++i)
+ state->cancellation_signals_[i].emit(cancel_type);
+ }
+
+ std::weak_ptr<ranged_parallel_group_state<
+ Condition, Handler, Op, Allocator>> state_;
+};
+
+template <typename Condition, typename Handler,
+ typename Range, typename Allocator>
+void ranged_parallel_group_launch(Condition cancellation_condition,
+ Handler handler, Range&& range, const Allocator& allocator)
+{
+ // Get the user's completion handler's cancellation slot, so that we can allow
+ // cancellation of the entire group.
+ associated_cancellation_slot_t<Handler> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ // The type of the asynchronous operation.
+ typedef decay_t<decltype(*declval<typename Range::iterator>())> op_type;
+
+ // Create the shared state for the operation.
+ typedef ranged_parallel_group_state<Condition,
+ Handler, op_type, Allocator> state_type;
+ std::shared_ptr<state_type> state = std::allocate_shared<state_type>(
+ asio::detail::recycling_allocator<state_type,
+ asio::detail::thread_info_base::parallel_group_tag>(),
+ std::move(cancellation_condition),
+ std::move(handler), range.size(), allocator);
+
+ std::size_t idx = 0;
+ for (auto&& op : std::forward<Range>(range))
+ {
+ typedef associated_executor_t<op_type> ex_type;
+ ex_type ex = asio::get_associated_executor(op);
+ std::move(op)(
+ ranged_parallel_group_op_handler_with_executor<
+ ex_type, Condition, Handler, op_type, Allocator>(
+ state, std::move(ex), idx++));
+ }
+
+ // Check if any of the operations has already requested cancellation, and if
+ // so, emit a signal for each operation in the group.
+ if ((state->cancellations_requested_ -= range.size()) > 0)
+ for (auto& signal : state->cancellation_signals_)
+ signal.emit(state->cancel_type_);
+
+ // Register a handler with the user's completion handler's cancellation slot.
+ if (slot.is_connected())
+ slot.template emplace<
+ ranged_parallel_group_cancellation_handler<
+ Condition, Handler, op_type, Allocator>>(state);
+}
+
+} // namespace detail
+} // namespace experimental
+
template <template <typename, typename> class Associator,
typename Handler, typename... Ops, typename DefaultCandidate>
struct associator<Associator,
@@ -418,8 +741,41 @@ struct associator<Associator,
{
static typename Associator<Handler, DefaultCandidate>::type get(
const experimental::detail::parallel_group_completion_handler<
+ Handler, Ops...>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const experimental::detail::parallel_group_completion_handler<
Handler, Ops...>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ }
+};
+
+template <template <typename, typename> class Associator, typename Handler,
+ typename Op, typename Allocator, typename DefaultCandidate>
+struct associator<Associator,
+ experimental::detail::ranged_parallel_group_completion_handler<
+ Handler, Op, Allocator>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const experimental::detail::ranged_parallel_group_completion_handler<
+ Handler, Op, Allocator>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const experimental::detail::ranged_parallel_group_completion_handler<
+ Handler, Op, Allocator>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
diff --git a/3rdparty/asio/include/asio/experimental/impl/prepend.hpp b/3rdparty/asio/include/asio/experimental/impl/prepend.hpp
deleted file mode 100644
index 73978348f7a..00000000000
--- a/3rdparty/asio/include/asio/experimental/impl/prepend.hpp
+++ /dev/null
@@ -1,217 +0,0 @@
-//
-// experimental/impl/prepend.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_IMPL_EXPERIMENTAL_PREPEND_HPP
-#define ASIO_IMPL_EXPERIMENTAL_PREPEND_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#include "asio/associator.hpp"
-#include "asio/async_result.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace experimental {
-namespace detail {
-
-// Class to adapt a prepend_t as a completion handler.
-template <typename Handler, typename... Values>
-class prepend_handler
-{
-public:
- typedef void result_type;
-
- template <typename H>
- prepend_handler(ASIO_MOVE_ARG(H) handler, std::tuple<Values...> values)
- : handler_(ASIO_MOVE_CAST(H)(handler)),
- values_(ASIO_MOVE_CAST(std::tuple<Values...>)(values))
- {
- }
-
- template <typename... Args>
- void operator()(ASIO_MOVE_ARG(Args)... args)
- {
- this->invoke(
- std::make_index_sequence<sizeof...(Values)>{},
- ASIO_MOVE_CAST(Args)(args)...);
- }
-
- template <std::size_t... I, typename... Args>
- void invoke(std::index_sequence<I...>, ASIO_MOVE_ARG(Args)... args)
- {
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
- ASIO_MOVE_CAST(Values)(std::get<I>(values_))...,
- ASIO_MOVE_CAST(Args)(args)...);
- }
-
-//private:
- Handler handler_;
- std::tuple<Values...> values_;
-};
-
-template <typename Handler>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- prepend_handler<Handler>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- prepend_handler<Handler>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
-inline bool asio_handler_is_continuation(
- prepend_handler<Handler>* this_handler)
-{
- return asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
-}
-
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- prepend_handler<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- prepend_handler<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Signature, typename... Values>
-struct prepend_signature;
-
-template <typename R, typename... Args, typename... Values>
-struct prepend_signature<R(Args...), Values...>
-{
- typedef R type(Values..., typename decay<Args>::type...);
-};
-
-} // namespace detail
-} // namespace experimental
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename CompletionToken, typename... Values, typename Signature>
-struct async_result<
- experimental::prepend_t<CompletionToken, Values...>, Signature>
- : async_result<CompletionToken,
- typename experimental::detail::prepend_signature<
- Signature, Values...>::type>
-{
- typedef typename experimental::detail::prepend_signature<
- Signature, Values...>::type signature;
-
- template <typename Initiation>
- struct init_wrapper
- {
- init_wrapper(Initiation init)
- : initiation_(ASIO_MOVE_CAST(Initiation)(init))
- {
- }
-
- template <typename Handler, typename... Args>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler,
- std::tuple<Values...> values,
- ASIO_MOVE_ARG(Args)... args)
- {
- ASIO_MOVE_CAST(Initiation)(initiation_)(
- experimental::detail::prepend_handler<
- typename decay<Handler>::type, Values...>(
- ASIO_MOVE_CAST(Handler)(handler),
- ASIO_MOVE_CAST(std::tuple<Values...>)(values)),
- ASIO_MOVE_CAST(Args)(args)...);
- }
-
- Initiation initiation_;
- };
-
- template <typename Initiation, typename RawCompletionToken, typename... Args>
- static ASIO_INITFN_DEDUCED_RESULT_TYPE(CompletionToken, signature,
- (async_initiate<CompletionToken, signature>(
- declval<init_wrapper<typename decay<Initiation>::type> >(),
- declval<CompletionToken&>(),
- declval<std::tuple<Values...> >(),
- declval<ASIO_MOVE_ARG(Args)>()...)))
- initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token,
- ASIO_MOVE_ARG(Args)... args)
- {
- return async_initiate<CompletionToken, signature>(
- init_wrapper<typename decay<Initiation>::type>(
- ASIO_MOVE_CAST(Initiation)(initiation)),
- token.token_,
- ASIO_MOVE_CAST(std::tuple<Values...>)(token.values_),
- ASIO_MOVE_CAST(Args)(args)...);
- }
-};
-
-template <template <typename, typename> class Associator,
- typename Handler, typename DefaultCandidate>
-struct associator<Associator,
- experimental::detail::prepend_handler<Handler>, DefaultCandidate>
- : Associator<Handler, DefaultCandidate>
-{
- static typename Associator<Handler, DefaultCandidate>::type get(
- const experimental::detail::prepend_handler<Handler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
- {
- return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_EXPERIMENTAL_PREPEND_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/promise.hpp b/3rdparty/asio/include/asio/experimental/impl/promise.hpp
index 803b41e1a27..a80cf110baa 100644
--- a/3rdparty/asio/include/asio/experimental/impl/promise.hpp
+++ b/3rdparty/asio/include/asio/experimental/impl/promise.hpp
@@ -2,8 +2,8 @@
// experimental/impl/promise.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -11,61 +11,199 @@
#ifndef ASIO_EXPERIMENTAL_IMPL_PROMISE_HPP
#define ASIO_EXPERIMENTAL_IMPL_PROMISE_HPP
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
#include "asio/cancellation_signal.hpp"
-#include "asio/experimental/detail/completion_handler_erasure.hpp"
+#include "asio/detail/utility.hpp"
+#include "asio/error.hpp"
+#include "asio/system_error.hpp"
#include <tuple>
-#include <optional>
#include "asio/detail/push_options.hpp"
namespace asio {
namespace experimental {
-template<typename Signature = void(), typename Executor = any_io_executor>
+template<typename Signature = void(),
+ typename Executor = asio::any_io_executor,
+ typename Allocator = std::allocator<void>>
struct promise;
namespace detail {
-template<typename Signature, typename Executor>
+template<typename Signature, typename Executor, typename Allocator>
struct promise_impl;
-template<typename ... Ts, typename Executor>
-struct promise_impl<void(Ts...), Executor>
+template<typename... Ts, typename Executor, typename Allocator>
+struct promise_impl<void(Ts...), Executor, Allocator>
{
using result_type = std::tuple<Ts...>;
- promise_impl(Executor executor = {})
- : executor(std::move(executor))
+ promise_impl(Allocator allocator, Executor executor)
+ : allocator(std::move(allocator)), executor(std::move(executor))
{
}
- std::optional<result_type> result;
- bool done{false};
- detail::completion_handler_erasure<void(Ts...), Executor> completion;
+ promise_impl(const promise_impl&) = delete;
+
+ ~promise_impl()
+ {
+ if (completion)
+ this->cancel_();
+
+ if (done)
+ reinterpret_cast<result_type*>(&result)->~result_type();
+ }
+
+ aligned_storage_t<sizeof(result_type), alignof(result_type)> result;
+ std::atomic<bool> done{false};
cancellation_signal cancel;
+ Allocator allocator;
Executor executor;
-};
-template<typename Signature = void(), typename Executor = any_io_executor>
-struct promise_handler;
+ template<typename Func, std::size_t... Idx>
+ void apply_impl(Func f, asio::detail::index_sequence<Idx...>)
+ {
+ auto& result_type = *reinterpret_cast<promise_impl::result_type*>(&result);
+ f(std::get<Idx>(std::move(result_type))...);
+ }
+
+ using allocator_type = Allocator;
+ allocator_type get_allocator() {return allocator;}
+
+ using executor_type = Executor;
+ executor_type get_executor() {return executor;}
+
+ template<typename Func>
+ void apply(Func f)
+ {
+ apply_impl(std::forward<Func>(f),
+ asio::detail::make_index_sequence<sizeof...(Ts)>{});
+ }
+
+ struct completion_base
+ {
+ virtual void invoke(Ts&&...ts) = 0;
+ };
+
+ template<typename Alloc, typename WaitHandler_>
+ struct completion_impl final : completion_base
+ {
+ WaitHandler_ handler;
+ Alloc allocator;
+ void invoke(Ts&&... ts)
+ {
+ auto h = std::move(handler);
+
+ using alloc_t = typename std::allocator_traits<
+ typename asio::decay<Alloc>::type>::template
+ rebind_alloc<completion_impl>;
+
+ alloc_t alloc_{allocator};
+ this->~completion_impl();
+ std::allocator_traits<alloc_t>::deallocate(alloc_, this, 1u);
+ std::move(h)(std::forward<Ts>(ts)...);
+ }
+
+ template<typename Alloc_, typename Handler_>
+ completion_impl(Alloc_&& alloc, Handler_&& wh)
+ : handler(std::forward<Handler_>(wh)),
+ allocator(std::forward<Alloc_>(alloc))
+ {
+ }
+ };
+
+ completion_base* completion = nullptr;
+ typename asio::aligned_storage<sizeof(void*) * 4,
+ alignof(completion_base)>::type completion_opt;
+
+ template<typename Alloc, typename Handler>
+ void set_completion(Alloc&& alloc, Handler&& handler)
+ {
+ if (completion)
+ cancel_();
+
+ using impl_t = completion_impl<
+ typename asio::decay<Alloc>::type, Handler>;
+ using alloc_t = typename std::allocator_traits<
+ typename asio::decay<Alloc>::type>::template rebind_alloc<impl_t>;
+
+ alloc_t alloc_{alloc};
+ auto p = std::allocator_traits<alloc_t>::allocate(alloc_, 1u);
+ completion = new (p) impl_t(std::forward<Alloc>(alloc),
+ std::forward<Handler>(handler));
+ }
+
+ template<typename... T_>
+ void complete(T_&&... ts)
+ {
+ assert(completion);
+ std::exchange(completion, nullptr)->invoke(std::forward<T_>(ts)...);
+ }
+
+ template<std::size_t... Idx>
+ void complete_with_result_impl(asio::detail::index_sequence<Idx...>)
+ {
+ auto& result_type = *reinterpret_cast<promise_impl::result_type*>(&result);
+ this->complete(std::get<Idx>(std::move(result_type))...);
+ }
-template<typename Signature, typename Executor>
+ void complete_with_result()
+ {
+ complete_with_result_impl(
+ asio::detail::make_index_sequence<sizeof...(Ts)>{});
+ }
+
+ template<typename... T_>
+ void cancel_impl_(std::exception_ptr*, T_*...)
+ {
+ complete(
+ std::make_exception_ptr(
+ asio::system_error(
+ asio::error::operation_aborted)),
+ T_{}...);
+ }
+
+ template<typename... T_>
+ void cancel_impl_(asio::error_code*, T_*...)
+ {
+ complete(asio::error::operation_aborted, T_{}...);
+ }
+
+ template<typename... T_>
+ void cancel_impl_(T_*...)
+ {
+ complete(T_{}...);
+ }
+
+ void cancel_()
+ {
+ cancel_impl_(static_cast<Ts*>(nullptr)...);
+ }
+};
+
+template<typename Signature = void(),
+ typename Executor = asio::any_io_executor,
+ typename Allocator = any_io_executor>
struct promise_handler;
-template<typename ... Ts, typename Executor>
-struct promise_handler<void(Ts...), Executor>
+template<typename... Ts, typename Executor, typename Allocator>
+struct promise_handler<void(Ts...), Executor, Allocator>
{
- using promise_type = promise<void(Ts...), Executor>;
+ using promise_type = promise<void(Ts...), Executor, Allocator>;
- promise_handler(Executor executor) // get_associated_allocator(exec)
- : impl_{
- std::allocate_shared<promise_impl<void(Ts...), Executor>>(
- get_associated_allocator(executor))}
+ promise_handler(
+ Allocator allocator, Executor executor) // get_associated_allocator(exec)
+ : impl_(
+ std::allocate_shared<promise_impl<void(Ts...), Executor, Allocator>>(
+ allocator, allocator, executor))
{
- impl_->executor = std::move(executor);
}
- std::shared_ptr<promise_impl<void(Ts...), Executor>> impl_;
+ std::shared_ptr<promise_impl<void(Ts...), Executor, Allocator>> impl_;
using cancellation_slot_type = cancellation_slot;
@@ -74,18 +212,37 @@ struct promise_handler<void(Ts...), Executor>
return impl_->cancel.slot();
}
- auto make_promise() -> promise<void(Ts...), Executor>
+ using allocator_type = Allocator;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return impl_->get_allocator();
+ }
+
+ using executor_type = Executor;
+
+ Executor get_executor() const noexcept
{
- return {impl_};
+ return impl_->get_executor();
+ }
+
+ auto make_promise() -> promise<void(Ts...), executor_type, allocator_type>
+ {
+ return promise<void(Ts...), executor_type, allocator_type>{impl_};
}
void operator()(std::remove_reference_t<Ts>... ts)
{
assert(impl_);
- impl_->result.emplace(std::move(ts)...);
+
+ using result_type = typename promise_impl<
+ void(Ts...), allocator_type, executor_type>::result_type ;
+
+ new (&impl_->result) result_type(std::move(ts)...);
impl_->done = true;
- if (auto f = std::exchange(impl_->completion, nullptr); f != nullptr)
- std::apply(std::move(f), std::move(*impl_->result));
+
+ if (impl_->completion)
+ impl_->complete_with_result();
}
};
diff --git a/3rdparty/asio/include/asio/experimental/impl/use_coro.hpp b/3rdparty/asio/include/asio/experimental/impl/use_coro.hpp
new file mode 100644
index 00000000000..ab5a2e68959
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/use_coro.hpp
@@ -0,0 +1,214 @@
+//
+// experimental/impl/use_coro.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_IMPL_USE_CORO_HPP
+#define ASIO_EXPERIMENTAL_IMPL_USE_CORO_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/deferred.hpp"
+#include "asio/experimental/coro.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Allocator, typename R>
+struct async_result<experimental::use_coro_t<Allocator>, R()>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void() noexcept, void,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_await deferred_async_operation<R(), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(asio::detail::initiation_archetype<R()>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), void,
+ asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+template <typename Allocator, typename R>
+struct async_result<
+ experimental::use_coro_t<Allocator>, R(asio::error_code)>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void() noexcept, void,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_await deferred_async_operation<
+ R(asio::error_code), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(
+ asio::detail::initiation_archetype<R(asio::error_code)>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), void,
+ asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+template <typename Allocator, typename R>
+struct async_result<
+ experimental::use_coro_t<Allocator>, R(std::exception_ptr)>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), void,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_await deferred_async_operation<
+ R(std::exception_ptr), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(
+ asio::detail::initiation_archetype<R(std::exception_ptr)>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), void,
+ asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+template <typename Allocator, typename R, typename T>
+struct async_result<experimental::use_coro_t<Allocator>, R(T)>
+{
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void() noexcept, T,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_return co_await deferred_async_operation<R(T), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(asio::detail::initiation_archetype<R(T)>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void() noexcept, T,
+ asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+template <typename Allocator, typename R, typename T>
+struct async_result<
+ experimental::use_coro_t<Allocator>, R(asio::error_code, T)>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), T,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_return co_await deferred_async_operation<
+ R(asio::error_code, T), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(
+ asio::detail::initiation_archetype<
+ R(asio::error_code, T)>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), T, asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+template <typename Allocator, typename R, typename T>
+struct async_result<
+ experimental::use_coro_t<Allocator>, R(std::exception_ptr, T)>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate_impl(Initiation initiation,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), T,
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ co_return co_await deferred_async_operation<
+ R(std::exception_ptr, T), Initiation, InitArgs...>(
+ deferred_init_tag{}, std::move(initiation), std::move(args)...);
+ }
+
+ template <typename... InitArgs>
+ static auto initiate_impl(
+ asio::detail::initiation_archetype<R(std::exception_ptr, T)>,
+ std::allocator_arg_t, Allocator, InitArgs... args)
+ -> experimental::coro<void(), T, asio::any_io_executor, Allocator>;
+
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_coro_t<Allocator> tk, InitArgs&&... args)
+ {
+ return initiate_impl(std::move(initiation), std::allocator_arg,
+ tk.get_allocator(), std::forward<InitArgs>(args)...);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_IMPL_USE_CORO_HPP
diff --git a/3rdparty/asio/include/asio/experimental/impl/use_promise.hpp b/3rdparty/asio/include/asio/experimental/impl/use_promise.hpp
new file mode 100644
index 00000000000..259edb394bf
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/impl/use_promise.hpp
@@ -0,0 +1,66 @@
+//
+// experimental/impl/use_promise.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_IMPL_USE_PROMISE_HPP
+#define ASIO_EXPERIMENTAL_IMPL_USE_PROMISE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <memory>
+#include "asio/async_result.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+template <typename Allocator>
+struct use_promise_t;
+
+namespace detail {
+
+template<typename Signature, typename Executor, typename Allocator>
+struct promise_handler;
+
+} // namespace detail
+} // namespace experimental
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Allocator, typename R, typename... Args>
+struct async_result<experimental::use_promise_t<Allocator>, R(Args...)>
+{
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation initiation,
+ experimental::use_promise_t<Allocator> up, InitArgs... args)
+ -> experimental::promise<void(decay_t<Args>...),
+ asio::associated_executor_t<Initiation>, Allocator>
+ {
+ using handler_type = experimental::detail::promise_handler<
+ void(decay_t<Args>...),
+ asio::associated_executor_t<Initiation>, Allocator>;
+
+ handler_type ht{up.get_allocator(), get_associated_executor(initiation)};
+ std::move(initiation)(ht, std::move(args)...);
+ return ht.make_promise();
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_EXPERIMENTAL_IMPL_USE_PROMISE_HPP
diff --git a/3rdparty/asio/include/asio/experimental/parallel_group.hpp b/3rdparty/asio/include/asio/experimental/parallel_group.hpp
index 8a097286199..967fc8802db 100644
--- a/3rdparty/asio/include/asio/experimental/parallel_group.hpp
+++ b/3rdparty/asio/include/asio/experimental/parallel_group.hpp
@@ -2,7 +2,7 @@
// experimental/parallel_group.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,8 +16,12 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include <utility>
+#include <vector>
+#include "asio/async_result.hpp"
#include "asio/detail/array.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
#include "asio/experimental/cancellation_condition.hpp"
#include "asio/detail/push_options.hpp"
@@ -26,23 +30,6 @@ namespace asio {
namespace experimental {
namespace detail {
-// Helper trait for getting the completion signature from an async operation.
-
-struct parallel_op_signature_probe {};
-
-template <typename T>
-struct parallel_op_signature_probe_result
-{
- typedef T type;
-};
-
-template <typename Op>
-struct parallel_op_signature
-{
- typedef typename decltype(declval<Op>()(
- declval<parallel_op_signature_probe>()))::type type;
-};
-
// Helper trait for getting a tuple from a completion signature.
template <typename Signature>
@@ -51,7 +38,7 @@ struct parallel_op_signature_as_tuple;
template <typename R, typename... Args>
struct parallel_op_signature_as_tuple<R(Args...)>
{
- typedef std::tuple<typename decay<Args>::type...> type;
+ typedef std::tuple<decay_t<Args>...> type;
};
// Helper trait for concatenating completion signatures.
@@ -93,10 +80,59 @@ struct parallel_group_signature<N, Sig0, Sig1, SigN...>
template <typename Condition, typename Handler,
typename... Ops, std::size_t... I>
void parallel_group_launch(Condition cancellation_condition, Handler handler,
- std::tuple<Ops...>& ops, std::index_sequence<I...>);
+ std::tuple<Ops...>& ops, asio::detail::index_sequence<I...>);
+
+// Helper trait for determining ranged parallel group completion signatures.
+
+template <typename Signature, typename Allocator>
+struct ranged_parallel_group_signature;
+
+template <typename R, typename... Args, typename Allocator>
+struct ranged_parallel_group_signature<R(Args...), Allocator>
+{
+ typedef std::vector<std::size_t,
+ ASIO_REBIND_ALLOC(Allocator, std::size_t)> order_type;
+ typedef R raw_type(
+ std::vector<Args, ASIO_REBIND_ALLOC(Allocator, Args)>...);
+ typedef R type(order_type,
+ std::vector<Args, ASIO_REBIND_ALLOC(Allocator, Args)>...);
+};
+
+template <typename Condition, typename Handler,
+ typename Range, typename Allocator>
+void ranged_parallel_group_launch(Condition cancellation_condition,
+ Handler handler, Range&& range, const Allocator& allocator);
+
+char (&parallel_group_has_iterator_helper(...))[2];
+
+template <typename T>
+char parallel_group_has_iterator_helper(T*, typename T::iterator* = 0);
+
+template <typename T>
+struct parallel_group_has_iterator_typedef
+{
+ enum { value = (sizeof((parallel_group_has_iterator_helper)((T*)(0))) == 1) };
+};
} // namespace detail
+/// Type trait used to determine whether a type is a range of asynchronous
+/// operations that can be used with with @c make_parallel_group.
+template <typename T>
+struct is_async_operation_range
+{
+#if defined(GENERATING_DOCUMENTATION)
+ /// The value member is true if the type may be used as a range of
+ /// asynchronous operations.
+ static const bool value;
+#else
+ enum
+ {
+ value = detail::parallel_group_has_iterator_typedef<T>::value
+ };
+#endif
+};
+
/// A group of asynchronous operations that may be launched in parallel.
/**
* See the documentation for asio::experimental::make_parallel_group for
@@ -105,6 +141,20 @@ void parallel_group_launch(Condition cancellation_condition, Handler handler,
template <typename... Ops>
class parallel_group
{
+private:
+ struct initiate_async_wait
+ {
+ template <typename Handler, typename Condition>
+ void operator()(Handler&& h, Condition&& c, std::tuple<Ops...>&& ops) const
+ {
+ detail::parallel_group_launch(
+ std::forward<Condition>(c), std::forward<Handler>(h),
+ ops, asio::detail::index_sequence_for<Ops...>());
+ }
+ };
+
+ std::tuple<Ops...> ops_;
+
public:
/// Constructor.
explicit parallel_group(Ops... ops)
@@ -114,7 +164,7 @@ public:
/// The completion signature for the group of operations.
typedef typename detail::parallel_group_signature<sizeof...(Ops),
- typename detail::parallel_op_signature<Ops>::type...>::type signature;
+ completion_signature_of_t<Ops>...>::type signature;
/// Initiate an asynchronous wait for the group of operations.
/**
@@ -127,7 +177,7 @@ public:
* operations, it must return a asio::cancellation_type value other
* than <tt>asio::cancellation_type::none</tt>.
*
- * @param token A completion token whose signature is comprised of
+ * @param token A @ref completion_token whose signature is comprised of
* a @c std::array<std::size_t, N> indicating the completion order of the
* operations, followed by all operations' completion handler arguments.
*
@@ -142,24 +192,15 @@ public:
ASIO_COMPLETION_TOKEN_FOR(signature) CompletionToken>
auto async_wait(CancellationCondition cancellation_condition,
CompletionToken&& token)
+ -> decltype(
+ asio::async_initiate<CompletionToken, signature>(
+ declval<initiate_async_wait>(), token,
+ std::move(cancellation_condition), std::move(ops_)))
{
return asio::async_initiate<CompletionToken, signature>(
initiate_async_wait(), token,
std::move(cancellation_condition), std::move(ops_));
}
-
-private:
- struct initiate_async_wait
- {
- template <typename Handler, typename Condition>
- void operator()(Handler&& h, Condition&& c, std::tuple<Ops...>&& ops) const
- {
- detail::parallel_group_launch(std::move(c), std::move(h),
- ops, std::make_index_sequence<sizeof...(Ops)>());
- }
- };
-
- std::tuple<Ops...> ops_;
};
/// Create a group of operations that may be launched in parallel.
@@ -200,11 +241,212 @@ private:
* @endcode
*/
template <typename... Ops>
-inline parallel_group<Ops...> make_parallel_group(Ops... ops)
+ASIO_NODISCARD inline parallel_group<Ops...>
+make_parallel_group(Ops... ops)
{
return parallel_group<Ops...>(std::move(ops)...);
}
+/// A range-based group of asynchronous operations that may be launched in
+/// parallel.
+/**
+ * See the documentation for asio::experimental::make_parallel_group for
+ * a usage example.
+ */
+template <typename Range, typename Allocator = std::allocator<void>>
+class ranged_parallel_group
+{
+private:
+ struct initiate_async_wait
+ {
+ template <typename Handler, typename Condition>
+ void operator()(Handler&& h, Condition&& c,
+ Range&& range, const Allocator& allocator) const
+ {
+ detail::ranged_parallel_group_launch(std::move(c),
+ std::move(h), std::forward<Range>(range), allocator);
+ }
+ };
+
+ Range range_;
+ Allocator allocator_;
+
+public:
+ /// Constructor.
+ explicit ranged_parallel_group(Range range,
+ const Allocator& allocator = Allocator())
+ : range_(std::move(range)),
+ allocator_(allocator)
+ {
+ }
+
+ /// The completion signature for the group of operations.
+ typedef typename detail::ranged_parallel_group_signature<
+ completion_signature_of_t<
+ decay_t<decltype(*std::declval<typename Range::iterator>())>>,
+ Allocator>::type signature;
+
+ /// Initiate an asynchronous wait for the group of operations.
+ /**
+ * Launches the group and asynchronously waits for completion.
+ *
+ * @param cancellation_condition A function object, called on completion of
+ * an operation within the group, that is used to determine whether to cancel
+ * the remaining operations. The function object is passed the arguments of
+ * the completed operation's handler. To trigger cancellation of the remaining
+ * operations, it must return a asio::cancellation_type value other
+ * than <tt>asio::cancellation_type::none</tt>.
+ *
+ * @param token A @ref completion_token whose signature is comprised of
+ * a @c std::vector<std::size_t, Allocator> indicating the completion order of
+ * the operations, followed by a vector for each of the completion signature's
+ * arguments.
+ *
+ * The library provides the following @c cancellation_condition types:
+ *
+ * @li asio::experimental::wait_for_all
+ * @li asio::experimental::wait_for_one
+ * @li asio::experimental::wait_for_one_error
+ * @li asio::experimental::wait_for_one_success
+ */
+ template <typename CancellationCondition,
+ ASIO_COMPLETION_TOKEN_FOR(signature) CompletionToken>
+ auto async_wait(CancellationCondition cancellation_condition,
+ CompletionToken&& token)
+ -> decltype(
+ asio::async_initiate<CompletionToken, signature>(
+ declval<initiate_async_wait>(), token,
+ std::move(cancellation_condition),
+ std::move(range_), allocator_))
+ {
+ return asio::async_initiate<CompletionToken, signature>(
+ initiate_async_wait(), token,
+ std::move(cancellation_condition),
+ std::move(range_), allocator_);
+ }
+};
+
+/// Create a group of operations that may be launched in parallel.
+/**
+ * @param range A range containing the operations to be launched.
+ *
+ * For example:
+ * @code
+ * using op_type = decltype(
+ * socket1.async_read_some(
+ * asio::buffer(data1),
+ * asio::deferred
+ * )
+ * );
+ *
+ * std::vector<op_type> ops;
+ *
+ * ops.push_back(
+ * socket1.async_read_some(
+ * asio::buffer(data1),
+ * asio::deferred
+ * )
+ * );
+ *
+ * ops.push_back(
+ * socket2.async_read_some(
+ * asio::buffer(data2),
+ * asio::deferred
+ * )
+ * );
+ *
+ * asio::experimental::make_parallel_group(ops).async_wait(
+ * asio::experimental::wait_for_all(),
+ * [](
+ * std::vector<std::size_t> completion_order,
+ * std::vector<std::error_code> e,
+ * std::vector<std::size_t> n
+ * )
+ * {
+ * for (std::size_t i = 0; i < completion_order.size(); ++i)
+ * {
+ * std::size_t idx = completion_order[i];
+ * std::cout << "socket " << idx << " finished: ";
+ * std::cout << e[idx] << ", " << n[idx] << "\n";
+ * }
+ * }
+ * );
+ * @endcode
+ */
+template <typename Range>
+ASIO_NODISCARD inline ranged_parallel_group<decay_t<Range>>
+make_parallel_group(Range&& range,
+ constraint_t<
+ is_async_operation_range<decay_t<Range>>::value
+ > = 0)
+{
+ return ranged_parallel_group<decay_t<Range>>(std::forward<Range>(range));
+}
+
+/// Create a group of operations that may be launched in parallel.
+/**
+ * @param allocator Specifies the allocator to be used with the result vectors.
+ *
+ * @param range A range containing the operations to be launched.
+ *
+ * For example:
+ * @code
+ * using op_type = decltype(
+ * socket1.async_read_some(
+ * asio::buffer(data1),
+ * asio::deferred
+ * )
+ * );
+ *
+ * std::vector<op_type> ops;
+ *
+ * ops.push_back(
+ * socket1.async_read_some(
+ * asio::buffer(data1),
+ * asio::deferred
+ * )
+ * );
+ *
+ * ops.push_back(
+ * socket2.async_read_some(
+ * asio::buffer(data2),
+ * asio::deferred
+ * )
+ * );
+ *
+ * asio::experimental::make_parallel_group(
+ * std::allocator_arg_t,
+ * my_allocator,
+ * ops
+ * ).async_wait(
+ * asio::experimental::wait_for_all(),
+ * [](
+ * std::vector<std::size_t> completion_order,
+ * std::vector<std::error_code> e,
+ * std::vector<std::size_t> n
+ * )
+ * {
+ * for (std::size_t i = 0; i < completion_order.size(); ++i)
+ * {
+ * std::size_t idx = completion_order[i];
+ * std::cout << "socket " << idx << " finished: ";
+ * std::cout << e[idx] << ", " << n[idx] << "\n";
+ * }
+ * }
+ * );
+ * @endcode
+ */
+template <typename Allocator, typename Range>
+ASIO_NODISCARD inline ranged_parallel_group<decay_t<Range>, Allocator>
+make_parallel_group(allocator_arg_t, const Allocator& allocator, Range&& range,
+ constraint_t<
+ is_async_operation_range<decay_t<Range>>::value
+ > = 0)
+{
+ return ranged_parallel_group<decay_t<Range>, Allocator>(
+ std::forward<Range>(range), allocator);
+}
+
} // namespace experimental
} // namespace asio
diff --git a/3rdparty/asio/include/asio/experimental/prepend.hpp b/3rdparty/asio/include/asio/experimental/prepend.hpp
index 4f892999e3e..503981f776f 100644
--- a/3rdparty/asio/include/asio/experimental/prepend.hpp
+++ b/3rdparty/asio/include/asio/experimental/prepend.hpp
@@ -2,7 +2,7 @@
// experimental/prepend.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,56 +16,21 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include <tuple>
-#include "asio/detail/type_traits.hpp"
+#include "asio/prepend.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
namespace experimental {
-/// Completion token type used to specify that the completion handler
-/// arguments should be passed additional values before the results of the
-/// operation.
-template <typename CompletionToken, typename... Values>
-class prepend_t
-{
-public:
- /// Constructor.
- template <typename T, typename... V>
- ASIO_CONSTEXPR explicit prepend_t(
- ASIO_MOVE_ARG(T) completion_token,
- ASIO_MOVE_ARG(V)... values)
- : token_(ASIO_MOVE_CAST(T)(completion_token)),
- values_(ASIO_MOVE_CAST(V)(values)...)
- {
- }
-
-//private:
- CompletionToken token_;
- std::tuple<Values...> values_;
-};
-
-/// Completion token type used to specify that the completion handler
-/// arguments should be passed additional values before the results of the
-/// operation.
-template <typename CompletionToken, typename... Values>
-inline ASIO_CONSTEXPR prepend_t<
- typename decay<CompletionToken>::type, typename decay<Values>::type...>
-prepend(ASIO_MOVE_ARG(CompletionToken) completion_token,
- ASIO_MOVE_ARG(Values)... values)
-{
- return prepend_t<
- typename decay<CompletionToken>::type, typename decay<Values>::type...>(
- ASIO_MOVE_CAST(CompletionToken)(completion_token),
- ASIO_MOVE_CAST(Values)(values)...);
-}
+#if !defined(ASIO_NO_DEPRECATED)
+using asio::prepend_t;
+using asio::prepend;
+#endif // !defined(ASIO_NO_DEPRECATED)
} // namespace experimental
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#include "asio/experimental/impl/prepend.hpp"
-
#endif // ASIO_EXPERIMENTAL_PREPEND_HPP
diff --git a/3rdparty/asio/include/asio/experimental/promise.hpp b/3rdparty/asio/include/asio/experimental/promise.hpp
index 89ca9c1b496..2bcf66b4e30 100644
--- a/3rdparty/asio/include/asio/experimental/promise.hpp
+++ b/3rdparty/asio/include/asio/experimental/promise.hpp
@@ -2,8 +2,8 @@
// experimental/promise.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -12,28 +12,28 @@
#ifndef ASIO_EXPERIMENTAL_PROMISE_HPP
#define ASIO_EXPERIMENTAL_PROMISE_HPP
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/any_io_executor.hpp"
#include "asio/associated_cancellation_slot.hpp"
+#include "asio/associated_executor.hpp"
#include "asio/bind_executor.hpp"
#include "asio/cancellation_signal.hpp"
-#include "asio/experimental/detail/completion_handler_erasure.hpp"
+#include "asio/dispatch.hpp"
#include "asio/experimental/impl/promise.hpp"
#include "asio/post.hpp"
-#include <variant>
+#include <algorithm>
#include "asio/detail/push_options.hpp"
namespace asio {
namespace experimental {
-template <typename Executor = any_io_executor>
-struct use_promise_t {};
-
-constexpr use_promise_t<> use_promise;
-
template <typename T>
struct is_promise : std::false_type {};
@@ -43,9 +43,6 @@ struct is_promise<promise<Ts...>> : std::true_type {};
template <typename T>
constexpr bool is_promise_v = is_promise<T>::value;
-template <typename T>
-concept is_promise_c = is_promise_v<std::remove_reference_t<T>>;
-
template <typename ... Ts>
struct promise_value_type
{
@@ -61,48 +58,70 @@ struct promise_value_type<T>
template <>
struct promise_value_type<>
{
- using type = std::monostate;
+ using type = std::tuple<>;
};
#if defined(GENERATING_DOCUMENTATION)
-/// The primary template is not defined.
-template<typename Signature = void(), typename Executor = any_io_executor>
+/// A disposable handle for an eager operation.
+/**
+ * @tparam Signature The signature of the operation.
+ *
+ * @tparam Executor The executor to be used by the promise (taken from the
+ * operation).
+ *
+ * @tparam Allocator The allocator used for the promise. Can be set through
+ * use_allocator.
+ *
+ * A promise can be used to initiate an asynchronous option that can be
+ * completed later. If the promise gets destroyed before completion, the
+ * operation gets a cancel signal and the result is ignored.
+ *
+ * A promise fulfills the requirements of async_operation.
+ *
+ * @par Examples
+ * Reading and writing from one coroutine.
+ * @code
+ * awaitable<void> read_write_some(asio::ip::tcp::socket & sock,
+ * asio::mutable_buffer read_buf, asio::const_buffer to_write)
+ * {
+ * auto p = asio::async_read(read_buf, asio::use_awaitable);
+ * co_await asio::async_write_some(to_write, asio::deferred);
+ * co_await p;
+ * }
+ * @endcode
+ */
+template<typename Signature = void(),
+ typename Executor = asio::any_io_executor,
+ typename Allocator = std::allocator<void>>
struct promise
-{
-};
+#else
+template <typename ... Ts, typename Executor, typename Allocator>
+struct promise<void(Ts...), Executor, Allocator>
#endif // defined(GENERATING_DOCUMENTATION)
-
-template <typename ... Ts, typename Executor>
-struct promise<void(Ts...), Executor>
{
+ /// The value that's returned by the promise.
using value_type = typename promise_value_type<Ts...>::type;
- using tuple_type = std::tuple<Ts...>;
- using executor_type = Executor;
-
- executor_type get_executor() const
- {
- if (impl_)
- return impl_->executor;
- else
- return {};
- }
+ /// Cancel the promise. Usually done through the destructor.
void cancel(cancellation_type level = cancellation_type::all)
{
if (impl_ && !impl_->done)
{
asio::dispatch(impl_->executor,
- [level, impl = impl_]{impl->cancel.emit(level);});
+ [level, impl = impl_]{ impl->cancel.emit(level); });
}
}
- bool complete() const noexcept
+ /// Check if the promise is completed already.
+ bool completed() const noexcept
{
return impl_ && impl_->done;
}
- template <typename CompletionToken>
- auto async_wait(CompletionToken&& token)
+ /// Wait for the promise to become ready.
+ template <ASIO_COMPLETION_TOKEN_FOR(void(Ts...)) CompletionToken>
+ inline ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void(Ts...))
+ operator()(CompletionToken&& token)
{
assert(impl_);
@@ -114,435 +133,52 @@ struct promise<void(Ts...), Executor>
promise(const promise& ) = delete;
promise(promise&& ) noexcept = default;
+ /// Destruct the promise and cancel the operation.
+ /**
+ * It is safe to destruct a promise of a promise that didn't complete.
+ */
~promise() { cancel(); }
- template <execution::executor Executor1, is_promise_c ... Ps>
- static auto race(Executor1 exec, Ps ... ps)
- -> promise<void(std::variant<typename Ps::value_type...>), Executor1>
- {
- using var_t = std::variant<typename Ps::value_type...>;
- using pi = detail::promise_impl<void(var_t), Executor1>;
-
- struct impl_t : pi
- {
- impl_t(Executor1 exec, Ps&& ... ps)
- : pi(std::move(exec)),
- tup(std::move(ps)...)
- {
- this->slot.template emplace<cancel_handler>(this);
- }
-
- struct cancel_handler
- {
- impl_t* self;
-
- cancel_handler(impl_t* self)
- : self(self)
- {
- }
-
- void operator()(cancellation_type ct)
- {
- [ct, s=self]<std::size_t... Idx>(std::index_sequence<Idx...>)
- {
- (std::get<Idx>(s->tup).cancel(ct), ... );
- }(std::make_index_sequence<sizeof...(Ps)>{});
- }
- };
-
- std::tuple<std::remove_reference_t<Ps>...> tup;
- cancellation_slot slot{this->cancel.slot()};
- };
-
- auto impl = std::allocate_shared<impl_t>(
- get_associated_allocator(exec), exec, std::move(ps)...);
-
- impl->executor = exec;
-
- [impl, exec]<std::size_t... Idx>(std::index_sequence<Idx...>)
- {
- auto step =
- [&]<std::size_t I>(std::integral_constant<std::size_t, I>)
- {
- return [impl]<typename... Args > (Args&& ... args)
- {
- if (impl->done)
- return;
- impl->result = var_t(std::in_place_index<I>,
- std::forward<Args>(args)...);
- impl->done = true;
- if (auto f = std::exchange(impl->completion, nullptr); !!f)
- std::apply(std::move(f), std::move(*impl->result));
-
- auto cancel =
- [&]<std::size_t Id>(std::integral_constant<std::size_t, Id>)
- {
- if constexpr (I != Id)
- get<I>(impl->tup).cancel();
- };
-
- (cancel(std::integral_constant<std::size_t, Idx>{}), ...);
- };
- };
-
- (
- std::get<Idx>(impl->tup).async_wait(
- bind_executor(exec,
- step(std::integral_constant<std::size_t, Idx>{}))),
- ...
- );
- }(std::make_index_sequence<sizeof...(Ps)>{});
-
- return {impl};
- }
-
- template <execution::executor Executor1, is_promise_c ... Ps>
- static auto all(Executor1 exec, Ps ... ps)
- -> promise<void(typename Ps::value_type...), Executor1>
- {
- using pi = detail::promise_impl<
- void(typename Ps::value_type...), Executor1>;
-
- struct impl_t : pi
- {
- impl_t(Executor1 exec, Ps&& ... ps)
- : pi(std::move(exec)),
- tup(std::move(ps)...)
- {
- this->slot.template emplace<cancel_handler>(this);
- }
-
- struct cancel_handler
- {
- impl_t* self;
-
- cancel_handler(impl_t* self)
- : self(self)
- {
- }
-
- void operator()(cancellation_type level)
- {
- [level, s=self]<std::size_t... Idx>(std::index_sequence<Idx...>)
- {
- (std::get<Idx>(s->tup).cancel(level), ... );
- }(std::make_index_sequence<sizeof...(Ps)>{});
- }
- };
-
- std::tuple<std::remove_reference_t<Ps>...> tup;
- std::tuple<std::optional<typename Ps::value_type>...> partial_result;
- cancellation_slot slot{this->cancel.slot()};
- };
-
- auto impl = std::allocate_shared<impl_t>(
- get_associated_allocator(exec), exec, std::move(ps)...);
- impl->executor = exec;
-
- [impl, exec]<std::size_t... Idx>(std::index_sequence<Idx...>)
- {
- auto step =
- [&]<std::size_t I>(std::integral_constant<std::size_t, I>)
- {
- return [impl]<typename... Args>(Args&& ... args)
- {
- std::get<I>(impl->partial_result).emplace(
- std::forward<Args>(args)...);
- if ((std::get<Idx>(impl->partial_result) && ...)) // we're done.
- {
- impl->result = {*std::get<Idx>(impl->partial_result)...};
-
- impl->done = true;
- if (auto f = std::exchange(impl->completion, nullptr); !!f)
- std::apply(std::move(f), std::move(*impl->result));
- }
- };
- };
-
- (
- std::get<Idx>(impl->tup).async_wait(
- bind_executor(exec,
- step(std::integral_constant<std::size_t, Idx>{}))),
- ...
- );
- }(std::make_index_sequence<sizeof...(Ps)>{});
-
- return {impl};
- }
-
- template <is_promise_c ... Ps>
- static auto race(Ps ... ps)
- {
- auto exec = get<0>(std::tie(ps...)).get_executor();
- return race(std::move(exec), std::move(ps)...);
- }
-
- template <is_promise_c ... Ps>
- static auto all(Ps ... ps)
- {
- auto exec = get<0>(std::tie(ps...)).get_executor();
- return all(std::move(exec), std::move(ps)...);
- }
-
- template <execution::executor Executor1, typename Range>
-#if !defined(GENERATING_DOCUMENTATION)
- requires requires (Range r)
- {
- {*std::begin(r)} -> is_promise_c;
- {*std:: end(r)} -> is_promise_c;
- }
-#endif // !defined(GENERATING_DOCUMENTATION)
- static auto race(Executor1 exec, Range range)
- {
- using var_t = typename std::decay_t<
- decltype(*std::begin(range))>::value_type;
- using signature_type = std::conditional_t<
- std::is_same_v<var_t, std::monostate>,
- void(std::size_t),
- void(std::size_t, var_t)>;
- using pi = detail::promise_impl<signature_type, Executor1>;
- using promise_t = promise<signature_type, Executor1>;
-
- struct impl_t : pi
- {
- impl_t(Executor1 exec, Range&& range)
- : pi(std::move(exec)),
- range(std::move(range))
- {
- this->slot.template emplace<cancel_handler>(this);
- }
-
- struct cancel_handler
- {
- impl_t* self;
-
- cancel_handler(impl_t* self)
- : self(self)
- {
- }
-
- void operator()(asio::cancellation_type ct)
- {
- for (auto& r : self->range)
- r.cancel(ct);
- }
- };
-
- Range range;
- cancellation_slot slot{this->cancel.slot()};
- };
-
- const auto size = std::distance(std::begin(range), std::end(range));
- auto impl = std::allocate_shared<impl_t>(
- get_associated_allocator(exec), exec, std::move(range));
- impl->executor = exec;
-
- if (size == 0u)
- {
- if constexpr (std::is_same_v<var_t, std::monostate>)
- impl->result = {-1};
- else
- impl->result = {-1, var_t{}};
-
- impl->done = true;
- if (auto f = std::exchange(impl->completion, nullptr); !!f)
- {
- asio::post(exec,
- [impl, f = std::move(f)]() mutable
- {
- std::apply(std::move(f), std::move(*impl->result));
- });
- }
- return promise_t{impl};
- }
- auto idx = 0u;
- for (auto& val : impl->range)
- {
- val.async_wait(
- bind_executor(exec,
- [idx, impl]<typename... Args>(Args&&... args)
- {
- if (impl->done)
- return;
- if constexpr (std::is_same_v<var_t, std::monostate>)
- impl->result = idx;
- else
- impl->result = std::make_tuple(idx,
- var_t(std::forward<Args>(args)...));
- impl->done = true;
- if (auto f = std::exchange(impl->completion, nullptr); !!f)
- std::apply(std::move(f), std::move(*impl->result));
-
- auto jdx = 0u;
-
- for (auto &tc : impl->range)
- if (jdx++ != idx)
- tc.cancel();
- }));
- idx++;
- }
- return promise_t{impl};
- }
-
-
- template <execution::executor Executor1, typename Range>
-#if !defined(GENERATING_DOCUMENTATION)
- requires requires (Range r)
- {
- {*std::begin(r)} -> is_promise_c;
- {*std:: end(r)} -> is_promise_c;
- }
-#endif // !defined(GENERATING_DOCUMENTATION)
- static auto all(Executor1 exec, Range range)
- -> promise<
- void(
- std::vector<
- typename std::decay_t<
- decltype(*std::begin(range))
- >::value_type
- >
- ), Executor1>
- {
- using var_t = typename std::decay_t<
- decltype(*std::begin(range))>::value_type;
- using pi = detail::promise_impl<void(std::vector<var_t>), Executor1>;
-
- struct impl_t : pi
- {
- impl_t(Executor1 exec, Range&& range)
- : pi(std::move(exec)),
- range(std::move(range))
- {
- this->slot.template emplace<cancel_handler>(this);
- }
-
- struct cancel_handler
- {
- impl_t* self;
-
- cancel_handler(impl_t* self)
- : self(self)
- {
- }
-
- void operator()(cancellation_type ct)
- {
- for (auto& r : self->range)
- r.cancel(ct);
- }
- };
-
- Range range;
- std::vector<std::optional<var_t>> partial_result;
- cancellation_slot slot{this->cancel.slot()};
- };
-
- const auto size = std::distance(std::begin(range), std::end(range));
- auto impl = std::allocate_shared<impl_t>(
- get_associated_allocator(exec), exec, std::move(range));
- impl->executor = exec;
- impl->partial_result.resize(size);
-
- if (size == 0u)
- {
- impl->result.emplace();
- impl->done = true;
- if (auto f = std::exchange(impl->completion, nullptr); !!f)
- asio::post(exec, [impl, f = std::move(f)]() mutable
- {
- std::apply(std::move(f), std::move(*impl->result));
- });
- return {impl};
- }
- auto idx = 0u;
- for (auto& val : impl->range) {
- val.async_wait(bind_executor(
- exec,
- [idx, impl]<typename... Args>(Args&&... args) {
-
- impl->partial_result[idx].emplace(std::forward<Args>(args)...);
- if (std::all_of(impl->partial_result.begin(),
- impl->partial_result.end(),
- [](auto &opt) {return opt.has_value();}))
- {
- impl->result.emplace();
- get<0>(*impl->result).reserve(impl->partial_result.size());
- for (auto& p : impl->partial_result)
- get<0>(*impl->result).push_back(std::move(*p));
-
- impl->done = true;
- if (auto f = std::exchange(impl->completion, nullptr); !!f)
- std::apply(std::move(f), std::move(*impl->result));
- }
-
- }));
- idx++;
- }
- return {impl};
- }
-
- template <typename Range>
-#if !defined(GENERATING_DOCUMENTATION)
- requires requires (Range r)
- {
- {*std::begin(r)} -> is_promise_c;
- {*std:: end(r)} -> is_promise_c;
- }
-#endif // !defined(GENERATING_DOCUMENTATION)
- static auto race(Range range)
- {
- if (std::begin(range) == std::end(range))
- throw std::logic_error(
- "Can't use race on an empty range with deduced executor");
- else
- return race(std::begin(range)->get_executor(), std::move(range));
- }
-
- template <typename Range>
-#if !defined(GENERATING_DOCUMENTATION)
- requires requires (Range&& r)
- {
- {*std::begin(r)} -> is_promise_c;
- {*std:: end(r)} -> is_promise_c;
- }
-#endif // !defined(GENERATING_DOCUMENTATION)
- static auto all(Range range)
- {
- if (std::begin(range) == std::end(range))
- throw std::logic_error(
- "Can't use all on an empty range with deduced executor");
- else
- return all(std::begin(range)->get_executor(), std::move(range));
- }
private:
#if !defined(GENERATING_DOCUMENTATION)
- template <typename, typename> friend struct promise;
- friend struct detail::promise_handler<void(Ts...)>;
+ template <typename, typename, typename> friend struct promise;
+ friend struct detail::promise_handler<void(Ts...), Executor, Allocator>;
#endif // !defined(GENERATING_DOCUMENTATION)
- std::shared_ptr<detail::promise_impl<void(Ts...), Executor>> impl_;
- promise(std::shared_ptr<detail::promise_impl<void(Ts...), Executor>> impl)
+ std::shared_ptr<detail::promise_impl<
+ void(Ts...), Executor, Allocator>> impl_;
+
+ promise(
+ std::shared_ptr<detail::promise_impl<
+ void(Ts...), Executor, Allocator>> impl)
: impl_(impl)
{
}
struct initiate_async_wait
{
- std::shared_ptr<detail::promise_impl<void(Ts...), Executor>> self_;
+ std::shared_ptr<detail::promise_impl<
+ void(Ts...), Executor, Allocator>> self_;
template <typename WaitHandler>
void operator()(WaitHandler&& handler) const
{
- const auto exec = get_associated_executor(handler, self_->executor);
+ const auto alloc = get_associated_allocator(
+ handler, self_->get_allocator());
+
auto cancel = get_associated_cancellation_slot(handler);
+
if (self_->done)
{
+ auto exec = asio::get_associated_executor(
+ handler, self_->get_executor());
+
asio::post(exec,
- [self = self_, h = std::forward<WaitHandler>(handler)]() mutable
+ [self = std::move(self_),
+ handler = std::forward<WaitHandler>(handler)]() mutable
{
- std::apply(std::forward<WaitHandler>(h),
- std::move(*self->result));
+ self->apply(std::move(handler));
});
}
else
@@ -551,26 +187,29 @@ private:
{
struct cancel_handler
{
- std::weak_ptr<detail::promise_impl<void(Ts...), Executor>> self;
+ std::weak_ptr<detail::promise_impl<
+ void(Ts...), Executor, Allocator>> self;
cancel_handler(
- std::weak_ptr<detail::promise_impl<void(Ts...), Executor>> self)
+ std::weak_ptr<detail::promise_impl<
+ void(Ts...), Executor, Allocator>> self)
: self(std::move(self))
{
}
void operator()(cancellation_type level) const
{
- if (auto p = self.lock(); p != nullptr)
+ if (auto p = self.lock())
+ {
p->cancel.emit(level);
-
+ p->cancel_();
+ }
}
};
-
cancel.template emplace<cancel_handler>(self_);
}
- self_->completion = {exec, std::forward<WaitHandler>(handler)};
+ self_->set_completion(alloc, std::forward<WaitHandler>(handler));
}
}
};
@@ -578,27 +217,6 @@ private:
} // namespace experimental
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename Executor, typename R, typename... Args>
-struct async_result<experimental::use_promise_t<Executor>, R(Args...)>
-{
- using handler_type = experimental::detail::promise_handler<
- void(typename decay<Args>::type...), Executor>;
-
- template <typename Initiation, typename... InitArgs>
- static auto initiate(Initiation initiation,
- experimental::use_promise_t<Executor>, InitArgs... args)
- -> typename handler_type::promise_type
- {
- handler_type ht{get_associated_executor(initiation)};
- std::move(initiation)(ht, std::move(args)...);
- return ht.make_promise();
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/experimental/use_coro.hpp b/3rdparty/asio/include/asio/experimental/use_coro.hpp
index a94d3ae5191..d9e0544106c 100644
--- a/3rdparty/asio/include/asio/experimental/use_coro.hpp
+++ b/3rdparty/asio/include/asio/experimental/use_coro.hpp
@@ -2,8 +2,8 @@
// experimental/use_coro.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -12,12 +12,14 @@
#ifndef ASIO_EXPERIMENTAL_USE_CORO_HPP
#define ASIO_EXPERIMENTAL_USE_CORO_HPP
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
#include "asio/detail/config.hpp"
-#include <optional>
-#include "asio/bind_cancellation_slot.hpp"
-#include "asio/bind_executor.hpp"
-#include "asio/error_code.hpp"
-#include "asio/experimental/detail/partial_promise.hpp"
+#include <memory>
+#include "asio/deferred.hpp"
+#include "asio/detail/source_location.hpp"
#include "asio/detail/push_options.hpp"
@@ -27,256 +29,161 @@ class any_io_executor;
namespace experimental {
-template <typename Executor = any_io_executor>
+/// A @ref completion_token that creates another coro for the task completion.
+/**
+ * The @c use_coro_t class, with its value @c use_coro, is used to represent an
+ * operation that can be awaited by the current resumable coroutine. This
+ * completion token may be passed as a handler to an asynchronous operation.
+ * For example:
+ *
+ * @code coro<void> my_coroutine(tcp::socket my_socket)
+ * {
+ * std::size_t n = co_await my_socket.async_read_some(buffer, use_coro);
+ * ...
+ * } @endcode
+ *
+ * When used with co_await, the initiating function (@c async_read_some in the
+ * above example) suspends the current coroutine. The coroutine is resumed when
+ * the asynchronous operation completes, and the result of the operation is
+ * returned.
+ *
+ * Note that this token is not the most efficient (use @c 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
{
-};
-
-constexpr use_coro_t<> use_coro;
-
-template <typename Yield, typename Return, typename Executor>
-struct coro;
-
-namespace detail {
-template <typename Yield, typename Return, typename Executor>
-struct coro_promise;
-
-template <typename Executor, typename... Ts>
-struct coro_init_handler
-{
- struct handler_t
+ /// The allocator type. The allocator is used when constructing the
+ /// @c std::promise object for a given asynchronous operation.
+ typedef Allocator allocator_type;
+
+ /// Default constructor.
+ constexpr use_coro_t(
+ allocator_type allocator = allocator_type{}
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , asio::detail::source_location location =
+ asio::detail::source_location::current()
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ )
+ : allocator_(allocator)
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , file_name_(location.file_name()),
+ line_(location.line()),
+ function_name_(location.function_name())
+# else // defined(ASIO_HAS_SOURCE_LOCATION)
+ , file_name_(0),
+ line_(0),
+ function_name_(0)
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
{
- };
-
- constexpr static handler_t handler{};
+ }
- struct init_helper;
- struct promise_type
+ /// Specify an alternate allocator.
+ template <typename OtherAllocator>
+ use_coro_t<OtherAllocator> rebind(const OtherAllocator& allocator) const
{
- auto initial_suspend() noexcept { return suspend_always{}; }
-
- auto final_suspend() noexcept { return suspend_always(); }
-
- void return_void() {}
-
- void unhandled_exception() { assert(false); }
-
- auto await_transform(handler_t)
- {
- assert(executor);
- assert(h);
- return init_helper{this};
- }
-
- std::optional<Executor> executor;
- std::optional<std::tuple<Ts...>> result;
- coroutine_handle<> h;
-
- coro_init_handler get_return_object() { return coro_init_handler{this}; }
-
- cancellation_slot cancel_slot;
- };
-
- struct init_helper
- {
- promise_type *self_;
-
- constexpr static bool await_ready() noexcept { return true; }
-
- constexpr static void await_suspend(coroutine_handle<>) noexcept {}
-
- auto await_resume() const noexcept
- {
- assert(self_);
- return bind_cancellation_slot(self_->cancel_slot,
- bind_executor(*self_->executor, [self = self_](Ts... ts)
- {
- self->result.emplace(std::move(ts)...);
- self->h.resume();
- }));
- }
- };
-
- promise_type* promise;
+ return use_future_t<OtherAllocator>(allocator);
+ }
- void unhandled_exception() noexcept
+ /// Obtain allocator.
+ allocator_type get_allocator() const
{
- throw;
+ return allocator_;
}
- struct noexcept_version
+ /// Constructor used to specify file name, line, and function name.
+ constexpr use_coro_t(const char* file_name,
+ int line, const char* function_name,
+ allocator_type allocator = allocator_type{}) :
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+ file_name_(file_name),
+ line_(line),
+ function_name_(function_name),
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ allocator_(allocator)
{
- promise_type *promise;
-
- constexpr static bool await_ready() noexcept { return false; }
-
- template <typename Yield, typename Return,
- convertible_to<Executor> Executor1>
- auto await_suspend(
- coroutine_handle<coro_promise<Yield, Return, Executor1> > h) noexcept
- {
- promise->executor = h.promise().get_executor();
- promise->h = h;
- return coroutine_handle<promise_type>::from_promise(*promise);
- }
-
- template <typename... Args>
- static auto resume_impl(std::tuple<Args...>&& tup)
- {
- return std::move(tup);
- }
-
- template <typename Arg>
- static auto resume_impl(std::tuple<Arg>&& tup)
- {
- return get<0>(std::move(tup));
- }
-
- static void resume_impl(std::tuple<>&&) {}
-
- auto await_resume() const noexcept
- {
- auto res = std::move(promise->result.value());
- coroutine_handle<promise_type>::from_promise(*promise).destroy();
- return resume_impl(std::move(res));
- }
- };
+#if !defined(ASIO_ENABLE_HANDLER_TRACKING)
+ (void)file_name;
+ (void)line;
+ (void)function_name;
+#endif // !defined(ASIO_ENABLE_HANDLER_TRACKING)
+ }
- struct throwing_version
+ /// Adapts an executor to add the @c use_coro_t completion token as the
+ /// default.
+ template <typename InnerExecutor>
+ struct executor_with_default : InnerExecutor
{
- promise_type *promise;
-
- constexpr static bool await_ready() noexcept { return false; }
-
- template <typename Yield, typename Return,
- convertible_to<Executor> Executor1>
- auto await_suspend(
- coroutine_handle<coro_promise<Yield, Return, Executor1> > h) noexcept
- {
- promise->executor = h.promise().get_executor();
- promise->h = h;
- return coroutine_handle<promise_type>::from_promise(*promise);
- }
-
- template <typename... Args>
- static auto resume_impl(std::tuple<Args...>&& tup)
- {
- return std::move(tup);
- }
-
- static void resume_impl(std::tuple<>&&) {}
-
- template <typename Arg>
- static auto resume_impl(std::tuple<Arg>&& tup)
- {
- return get<0>(std::move(tup));
- }
-
- template <typename... Args>
- static auto resume_impl(std::tuple<std::exception_ptr, Args...>&& tup)
- {
- auto ex = get<0>(std::move(tup));
- if (ex)
- std::rethrow_exception(ex);
-
- if constexpr (sizeof...(Args) == 0u)
- return;
- else if constexpr (sizeof...(Args) == 1u)
- return get<1>(std::move(tup));
- else
- {
- return
- [&]<std::size_t... Idx>(std::index_sequence<Idx...>)
- {
- return std::make_tuple(std::get<Idx + 1>(std::move(tup))...);
- }(std::make_index_sequence<sizeof...(Args) - 1>{});
- }
- }
-
- template <typename... Args>
- static auto resume_impl(
- std::tuple<asio::error_code, Args...>&& tup)
- {
- auto ec = get<0>(std::move(tup));
- if (ec)
- asio::detail::throw_exception(
- asio::system_error(ec, "error_code in use_coro"));
-
- if constexpr (sizeof...(Args) == 0u)
- return;
- else if constexpr (sizeof...(Args) == 1u)
- return get<1>(std::move(tup));
- else
- return
- [&]<std::size_t... Idx>(std::index_sequence<Idx...>)
- {
- return std::make_tuple(std::get<Idx + 1>(std::move(tup))...);
- }(std::make_index_sequence<sizeof...(Args) - 1>{});
- }
-
- static auto resume_impl(std::tuple<std::exception_ptr>&& tup)
- {
- auto ex = get<0>(std::move(tup));
- if (ex)
- std::rethrow_exception(ex);
- }
-
- static auto resume_impl(
- std::tuple<asio::error_code>&& tup)
+ /// Specify @c use_coro_t as the default completion token type.
+ typedef use_coro_t default_completion_token_type;
+
+ /// Construct the adapted executor from the inner executor type.
+ template <typename InnerExecutor1>
+ executor_with_default(const InnerExecutor1& ex,
+ constraint_t<
+ conditional_t<
+ !is_same<InnerExecutor1, executor_with_default>::value,
+ is_convertible<InnerExecutor1, InnerExecutor>,
+ false_type
+ >::value
+ > = 0) noexcept
+ : InnerExecutor(ex)
{
- auto ec = get<0>(std::move(tup));
- if (ec)
- asio::detail::throw_error(ec, "error_code in use_coro");
- }
-
- auto await_resume() const
- {
- auto res = std::move(promise->result.value());
- coroutine_handle<promise_type>::from_promise(*promise).destroy();
- return resume_impl(std::move(res));
}
};
- auto as_noexcept(cancellation_slot&& sl) && noexcept
+ /// Type alias to adapt an I/O object to use @c use_coro_t as its
+ /// default completion token type.
+ template <typename T>
+ using as_default_on_t = typename T::template rebind_executor<
+ executor_with_default<typename T::executor_type>>::other;
+
+ /// Function helper to adapt an I/O object to use @c use_coro_t as its
+ /// default completion token type.
+ template <typename T>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other
+ as_default_on(T&& object)
{
- promise->cancel_slot = std::move(sl);
- return noexcept_version{promise};
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
}
- auto as_throwing(cancellation_slot&& sl) && noexcept
- {
- promise->cancel_slot = std::move(sl);
- return throwing_version{promise};
- }
-};
-
-} // namespace detail
-} // namespace experimental
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename Executor, typename R, typename... Args>
-struct async_result<experimental::use_coro_t<Executor>, R(Args...)>
-{
- using return_type = experimental::detail::coro_init_handler<
- Executor, typename decay<Args>::type...>;
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+ const char* file_name_;
+ int line_;
+ const char* function_name_;
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
- template <typename Initiation, typename... InitArgs>
- static return_type initiate(Initiation initiation,
- experimental::use_coro_t<Executor>, InitArgs... args)
- {
- std::move(initiation)(co_await return_type::handler, std::move(args)...);
- }
+private:
+ Allocator allocator_;
};
-#endif // !defined(GENERATING_DOCUMENTATION)
+/// A @ref completion_token object that represents the currently executing
+/// resumable coroutine.
+/**
+ * See the documentation for asio::use_coro_t for a usage example.
+ */
+#if defined(GENERATING_DOCUMENTATION)
+constexpr use_coro_t<> use_coro;
+#else
+constexpr use_coro_t<> use_coro(0, 0, 0);
+#endif
+} // namespace experimental
} // namespace asio
#include "asio/detail/pop_options.hpp"
+#include "asio/experimental/impl/use_coro.hpp"
#include "asio/experimental/coro.hpp"
#endif // ASIO_EXPERIMENTAL_USE_CORO_HPP
diff --git a/3rdparty/asio/include/asio/experimental/use_promise.hpp b/3rdparty/asio/include/asio/experimental/use_promise.hpp
new file mode 100644
index 00000000000..cf19aca59d5
--- /dev/null
+++ b/3rdparty/asio/include/asio/experimental/use_promise.hpp
@@ -0,0 +1,111 @@
+//
+// experimental/use_promise.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_EXPERIMENTAL_USE_PROMISE_HPP
+#define ASIO_EXPERIMENTAL_USE_PROMISE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <memory>
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace experimental {
+
+template <typename Allocator = std::allocator<void>>
+struct use_promise_t
+{
+ /// The allocator type. The allocator is used when constructing the
+ /// @c promise object for a given asynchronous operation.
+ typedef Allocator allocator_type;
+
+ /// Construct using default-constructed allocator.
+ constexpr use_promise_t()
+ {
+ }
+
+ /// Construct using specified allocator.
+ explicit use_promise_t(const Allocator& allocator)
+ : allocator_(allocator)
+ {
+ }
+
+ /// Obtain allocator.
+ allocator_type get_allocator() const noexcept
+ {
+ return allocator_;
+ }
+
+ /// Adapts an executor to add the @c use_promise_t completion token as the
+ /// default.
+ template <typename InnerExecutor>
+ struct executor_with_default : InnerExecutor
+ {
+ /// Specify @c use_promise_t as the default completion token type.
+ typedef use_promise_t<Allocator> default_completion_token_type;
+
+ /// Construct the adapted executor from the inner executor type.
+ executor_with_default(const InnerExecutor& ex) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+
+ /// Convert the specified executor to the inner executor type, then use
+ /// that to construct the adapted executor.
+ template <typename OtherExecutor>
+ executor_with_default(const OtherExecutor& ex,
+ constraint_t<
+ is_convertible<OtherExecutor, InnerExecutor>::value
+ > = 0) noexcept
+ : InnerExecutor(ex)
+ {
+ }
+ };
+
+ /// Function helper to adapt an I/O object to use @c use_promise_t as its
+ /// default completion token type.
+ template <typename T>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other
+ as_default_on(T&& object)
+ {
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
+ }
+
+ /// Specify an alternate allocator.
+ template <typename OtherAllocator>
+ use_promise_t<OtherAllocator> rebind(const OtherAllocator& allocator) const
+ {
+ return use_promise_t<OtherAllocator>(allocator);
+ }
+
+private:
+ Allocator allocator_;
+};
+
+constexpr use_promise_t<> use_promise;
+
+} // namespace experimental
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/experimental/impl/use_promise.hpp"
+
+#endif // ASIO_EXPERIMENTAL_USE_CORO_HPP
diff --git a/3rdparty/asio/include/asio/file_base.hpp b/3rdparty/asio/include/asio/file_base.hpp
new file mode 100644
index 00000000000..5e8ac4f2ed5
--- /dev/null
+++ b/3rdparty/asio/include/asio/file_base.hpp
@@ -0,0 +1,166 @@
+//
+// file_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 ASIO_FILE_BASE_HPP
+#define ASIO_FILE_BASE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#if !defined(ASIO_WINDOWS)
+# include <fcntl.h>
+#endif // !defined(ASIO_WINDOWS)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// The file_base class is used as a base for the basic_stream_file and
+/// basic_random_access_file class templates so that we have a common place to
+/// define flags.
+class file_base
+{
+public:
+#if defined(GENERATING_DOCUMENTATION)
+ /// A bitmask type (C++ Std [lib.bitmask.types]).
+ typedef unspecified flags;
+
+ /// Open the file for reading.
+ static const flags read_only = implementation_defined;
+
+ /// Open the file for writing.
+ static const flags write_only = implementation_defined;
+
+ /// Open the file for reading and writing.
+ static const flags read_write = implementation_defined;
+
+ /// Open the file in append mode.
+ static const flags append = implementation_defined;
+
+ /// Create the file if it does not exist.
+ static const flags create = implementation_defined;
+
+ /// Ensure a new file is created. Must be combined with @c create.
+ static const flags exclusive = implementation_defined;
+
+ /// Open the file with any existing contents truncated.
+ static const flags truncate = implementation_defined;
+
+ /// Open the file so that write operations automatically synchronise the file
+ /// data and metadata to disk.
+ static const flags sync_all_on_write = implementation_defined;
+#else
+ enum flags
+ {
+#if defined(ASIO_WINDOWS)
+ read_only = 1,
+ write_only = 2,
+ read_write = 4,
+ append = 8,
+ create = 16,
+ exclusive = 32,
+ truncate = 64,
+ sync_all_on_write = 128
+#else // defined(ASIO_WINDOWS)
+ read_only = O_RDONLY,
+ write_only = O_WRONLY,
+ read_write = O_RDWR,
+ append = O_APPEND,
+ create = O_CREAT,
+ exclusive = O_EXCL,
+ truncate = O_TRUNC,
+ sync_all_on_write = O_SYNC
+#endif // defined(ASIO_WINDOWS)
+ };
+
+ // Implement bitmask operations as shown in C++ Std [lib.bitmask.types].
+
+ friend flags operator&(flags x, flags y)
+ {
+ return static_cast<flags>(
+ static_cast<unsigned int>(x) & static_cast<unsigned int>(y));
+ }
+
+ friend flags operator|(flags x, flags y)
+ {
+ return static_cast<flags>(
+ static_cast<unsigned int>(x) | static_cast<unsigned int>(y));
+ }
+
+ friend flags operator^(flags x, flags y)
+ {
+ return static_cast<flags>(
+ static_cast<unsigned int>(x) ^ static_cast<unsigned int>(y));
+ }
+
+ friend flags operator~(flags x)
+ {
+ return static_cast<flags>(~static_cast<unsigned int>(x));
+ }
+
+ friend flags& operator&=(flags& x, flags y)
+ {
+ x = x & y;
+ return x;
+ }
+
+ friend flags& operator|=(flags& x, flags y)
+ {
+ x = x | y;
+ return x;
+ }
+
+ friend flags& operator^=(flags& x, flags y)
+ {
+ x = x ^ y;
+ return x;
+ }
+#endif
+
+ /// Basis for seeking in a file.
+ enum seek_basis
+ {
+#if defined(GENERATING_DOCUMENTATION)
+ /// Seek to an absolute position.
+ seek_set = implementation_defined,
+
+ /// Seek to an offset relative to the current file position.
+ seek_cur = implementation_defined,
+
+ /// Seek to an offset relative to the end of the file.
+ seek_end = implementation_defined
+#else
+ seek_set = SEEK_SET,
+ seek_cur = SEEK_CUR,
+ seek_end = SEEK_END
+#endif
+ };
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ ~file_base()
+ {
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_FILE_BASE_HPP
diff --git a/3rdparty/asio/include/asio/generic/basic_endpoint.hpp b/3rdparty/asio/include/asio/generic/basic_endpoint.hpp
index 64dd940026e..e7e1f6d4103 100644
--- a/3rdparty/asio/include/asio/generic/basic_endpoint.hpp
+++ b/3rdparty/asio/include/asio/generic/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// generic/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -54,7 +54,7 @@ public:
#endif
/// Default constructor.
- basic_endpoint() ASIO_NOEXCEPT
+ basic_endpoint() noexcept
{
}
@@ -78,13 +78,11 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
basic_endpoint(basic_endpoint&& other)
: impl_(other.impl_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assign from another endpoint.
basic_endpoint& operator=(const basic_endpoint& other)
@@ -93,14 +91,12 @@ public:
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another endpoint.
basic_endpoint& operator=(basic_endpoint&& other)
{
impl_ = other.impl_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// The protocol associated with the endpoint.
protocol_type protocol() const
diff --git a/3rdparty/asio/include/asio/generic/datagram_protocol.hpp b/3rdparty/asio/include/asio/generic/datagram_protocol.hpp
index 6bb711b9d24..6e81cd6a084 100644
--- a/3rdparty/asio/include/asio/generic/datagram_protocol.hpp
+++ b/3rdparty/asio/include/asio/generic/datagram_protocol.hpp
@@ -2,7 +2,7 @@
// generic/datagram_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -73,19 +73,19 @@ public:
}
/// Obtain an identifier for the type of the protocol.
- int type() const ASIO_NOEXCEPT
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_DGRAM);
}
/// Obtain an identifier for the protocol.
- int protocol() const ASIO_NOEXCEPT
+ int protocol() const noexcept
{
return protocol_;
}
/// Obtain an identifier for the protocol family.
- int family() const ASIO_NOEXCEPT
+ int family() const noexcept
{
return family_;
}
diff --git a/3rdparty/asio/include/asio/generic/detail/endpoint.hpp b/3rdparty/asio/include/asio/generic/detail/endpoint.hpp
index e58271a660a..fdbcde92e5a 100644
--- a/3rdparty/asio/include/asio/generic/detail/endpoint.hpp
+++ b/3rdparty/asio/include/asio/generic/detail/endpoint.hpp
@@ -2,7 +2,7 @@
// generic/detail/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/generic/detail/impl/endpoint.ipp b/3rdparty/asio/include/asio/generic/detail/impl/endpoint.ipp
index 6a1124a791a..3e88c21098b 100644
--- a/3rdparty/asio/include/asio/generic/detail/impl/endpoint.ipp
+++ b/3rdparty/asio/include/asio/generic/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
// generic/detail/impl/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/generic/raw_protocol.hpp b/3rdparty/asio/include/asio/generic/raw_protocol.hpp
index 69abfc190b5..fc81cdd1ee9 100644
--- a/3rdparty/asio/include/asio/generic/raw_protocol.hpp
+++ b/3rdparty/asio/include/asio/generic/raw_protocol.hpp
@@ -2,7 +2,7 @@
// generic/raw_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -73,19 +73,19 @@ public:
}
/// Obtain an identifier for the type of the protocol.
- int type() const ASIO_NOEXCEPT
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_RAW);
}
/// Obtain an identifier for the protocol.
- int protocol() const ASIO_NOEXCEPT
+ int protocol() const noexcept
{
return protocol_;
}
/// Obtain an identifier for the protocol family.
- int family() const ASIO_NOEXCEPT
+ int family() const noexcept
{
return family_;
}
diff --git a/3rdparty/asio/include/asio/generic/seq_packet_protocol.hpp b/3rdparty/asio/include/asio/generic/seq_packet_protocol.hpp
index 1734cb0b9f1..e0342a47836 100644
--- a/3rdparty/asio/include/asio/generic/seq_packet_protocol.hpp
+++ b/3rdparty/asio/include/asio/generic/seq_packet_protocol.hpp
@@ -2,7 +2,7 @@
// generic/seq_packet_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -72,19 +72,19 @@ public:
}
/// Obtain an identifier for the type of the protocol.
- int type() const ASIO_NOEXCEPT
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_SEQPACKET);
}
/// Obtain an identifier for the protocol.
- int protocol() const ASIO_NOEXCEPT
+ int protocol() const noexcept
{
return protocol_;
}
/// Obtain an identifier for the protocol family.
- int family() const ASIO_NOEXCEPT
+ int family() const noexcept
{
return family_;
}
diff --git a/3rdparty/asio/include/asio/generic/stream_protocol.hpp b/3rdparty/asio/include/asio/generic/stream_protocol.hpp
index 78c92eead89..270006e60ed 100644
--- a/3rdparty/asio/include/asio/generic/stream_protocol.hpp
+++ b/3rdparty/asio/include/asio/generic/stream_protocol.hpp
@@ -2,7 +2,7 @@
// generic/stream_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -74,19 +74,19 @@ public:
}
/// Obtain an identifier for the type of the protocol.
- int type() const ASIO_NOEXCEPT
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_STREAM);
}
/// Obtain an identifier for the protocol.
- int protocol() const ASIO_NOEXCEPT
+ int protocol() const noexcept
{
return protocol_;
}
/// Obtain an identifier for the protocol family.
- int family() const ASIO_NOEXCEPT
+ int family() const noexcept
{
return family_;
}
diff --git a/3rdparty/asio/include/asio/handler_alloc_hook.hpp b/3rdparty/asio/include/asio/handler_alloc_hook.hpp
deleted file mode 100644
index 16f4f5a5b2a..00000000000
--- a/3rdparty/asio/include/asio/handler_alloc_hook.hpp
+++ /dev/null
@@ -1,104 +0,0 @@
-//
-// handler_alloc_hook.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_HANDLER_ALLOC_HOOK_HPP
-#define ASIO_HANDLER_ALLOC_HOOK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include <cstddef>
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-#if defined(ASIO_NO_DEPRECATED)
-
-// Places in asio that would have previously called the allocate or deallocate
-// hooks to manage memory, now call them only to check whether the result types
-// are these types. If the result is not the correct type, it indicates that
-// the user code still has the old hooks in place, and if so we want to trigger
-// a compile error.
-enum asio_handler_allocate_is_no_longer_used {};
-enum asio_handler_deallocate_is_no_longer_used {};
-
-typedef asio_handler_allocate_is_no_longer_used
- asio_handler_allocate_is_deprecated;
-typedef asio_handler_deallocate_is_no_longer_used
- asio_handler_deallocate_is_deprecated;
-
-#else // defined(ASIO_NO_DEPRECATED)
-
-typedef void* asio_handler_allocate_is_deprecated;
-typedef void asio_handler_deallocate_is_deprecated;
-
-#endif // defined(ASIO_NO_DEPRECATED)
-
-/// (Deprecated: Use the associated_allocator trait.) Default allocation
-/// function for handlers.
-/**
- * Asynchronous operations may need to allocate temporary objects. Since
- * asynchronous operations have a handler function object, these temporary
- * objects can be said to be associated with the handler.
- *
- * Implement asio_handler_allocate and asio_handler_deallocate for your own
- * handlers to provide custom allocation for these temporary objects.
- *
- * The default implementation of these allocation hooks uses <tt>::operator
- * new</tt> and <tt>::operator delete</tt>.
- *
- * @note All temporary objects associated with a handler will be deallocated
- * before the upcall to the handler is performed. This allows the same memory to
- * be reused for a subsequent asynchronous operation initiated by the handler.
- *
- * @par Example
- * @code
- * class my_handler;
- *
- * void* asio_handler_allocate(std::size_t size, my_handler* context)
- * {
- * return ::operator new(size);
- * }
- *
- * void asio_handler_deallocate(void* pointer, std::size_t size,
- * my_handler* context)
- * {
- * ::operator delete(pointer);
- * }
- * @endcode
- */
-ASIO_DECL asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size, ...);
-
-/// Default deallocation function for handlers.
-/**
- * Implement asio_handler_allocate and asio_handler_deallocate for your own
- * handlers to provide custom allocation for the associated temporary objects.
- *
- * The default implementation of these allocation hooks uses <tt>::operator
- * new</tt> and <tt>::operator delete</tt>.
- *
- * @sa asio_handler_allocate.
- */
-ASIO_DECL asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size, ...);
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#if defined(ASIO_HEADER_ONLY)
-# include "asio/impl/handler_alloc_hook.ipp"
-#endif // defined(ASIO_HEADER_ONLY)
-
-#endif // ASIO_HANDLER_ALLOC_HOOK_HPP
diff --git a/3rdparty/asio/include/asio/handler_continuation_hook.hpp b/3rdparty/asio/include/asio/handler_continuation_hook.hpp
index 40199f45054..8c5c65243de 100644
--- a/3rdparty/asio/include/asio/handler_continuation_hook.hpp
+++ b/3rdparty/asio/include/asio/handler_continuation_hook.hpp
@@ -2,7 +2,7 @@
// handler_continuation_hook.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/handler_invoke_hook.hpp b/3rdparty/asio/include/asio/handler_invoke_hook.hpp
deleted file mode 100644
index 238745218b2..00000000000
--- a/3rdparty/asio/include/asio/handler_invoke_hook.hpp
+++ /dev/null
@@ -1,111 +0,0 @@
-//
-// handler_invoke_hook.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_HANDLER_INVOKE_HOOK_HPP
-#define ASIO_HANDLER_INVOKE_HOOK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-/** @defgroup asio_handler_invoke asio::asio_handler_invoke
- *
- * @brief (Deprecated: Use the associated_executor trait.) Default invoke
- * function for handlers.
- *
- * Completion handlers for asynchronous operations are invoked by the
- * io_context associated with the corresponding object (e.g. a socket or
- * deadline_timer). Certain guarantees are made on when the handler may be
- * invoked, in particular that a handler can only be invoked from a thread that
- * is currently calling @c run() on the corresponding io_context object.
- * Handlers may subsequently be invoked through other objects (such as
- * io_context::strand objects) that provide additional guarantees.
- *
- * When asynchronous operations are composed from other asynchronous
- * operations, all intermediate handlers should be invoked using the same
- * method as the final handler. This is required to ensure that user-defined
- * objects are not accessed in a way that may violate the guarantees. This
- * hooking function ensures that the invoked method used for the final handler
- * is accessible at each intermediate step.
- *
- * Implement asio_handler_invoke for your own handlers to specify a custom
- * invocation strategy.
- *
- * This default implementation invokes the function object like so:
- * @code function(); @endcode
- * If necessary, the default implementation makes a copy of the function object
- * so that the non-const operator() can be used.
- *
- * @par Example
- * @code
- * class my_handler;
- *
- * template <typename Function>
- * void asio_handler_invoke(Function function, my_handler* context)
- * {
- * context->strand_.dispatch(function);
- * }
- * @endcode
- */
-/*@{*/
-
-#if defined(ASIO_NO_DEPRECATED)
-
-// Places in asio that would have previously called the invocation hook to
-// execute a handler, now call it only to check whether the result type is this
-// type. If the result is not this type, it indicates that the user code still
-// has the old hooks in place, and if so we want to trigger a compile error.
-enum asio_handler_invoke_is_no_longer_used {};
-
-typedef asio_handler_invoke_is_no_longer_used
- asio_handler_invoke_is_deprecated;
-
-#else // defined(ASIO_NO_DEPRECATED)
-
-typedef void asio_handler_invoke_is_deprecated;
-
-#endif // defined(ASIO_NO_DEPRECATED)
-
-/// Default handler invocation hook used for non-const function objects.
-template <typename Function>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function, ...)
-{
- function();
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-/// Default handler invocation hook used for const function objects.
-template <typename Function>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function, ...)
-{
- Function tmp(function);
- tmp();
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-/*@}*/
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_HANDLER_INVOKE_HOOK_HPP
diff --git a/3rdparty/asio/include/asio/high_resolution_timer.hpp b/3rdparty/asio/include/asio/high_resolution_timer.hpp
index 2bbc1a1ead5..50e8030a225 100644
--- a/3rdparty/asio/include/asio/high_resolution_timer.hpp
+++ b/3rdparty/asio/include/asio/high_resolution_timer.hpp
@@ -2,7 +2,7 @@
// high_resolution_timer.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#include "asio/basic_waitable_timer.hpp"
#include "asio/detail/chrono.hpp"
@@ -39,6 +36,4 @@ typedef basic_waitable_timer<
} // namespace asio
-#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#endif // ASIO_HIGH_RESOLUTION_TIMER_HPP
diff --git a/3rdparty/asio/include/asio/impl/any_completion_executor.ipp b/3rdparty/asio/include/asio/impl/any_completion_executor.ipp
new file mode 100644
index 00000000000..fdad007dab1
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/any_completion_executor.ipp
@@ -0,0 +1,126 @@
+//
+// impl/any_completion_executor.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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 ASIO_IMPL_ANY_COMPLETION_EXECUTOR_IPP
+#define ASIO_IMPL_ANY_COMPLETION_EXECUTOR_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#include "asio/any_completion_executor.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+any_completion_executor::any_completion_executor() noexcept
+ : base_type()
+{
+}
+
+any_completion_executor::any_completion_executor(nullptr_t) noexcept
+ : base_type(nullptr_t())
+{
+}
+
+any_completion_executor::any_completion_executor(
+ const any_completion_executor& e) noexcept
+ : base_type(static_cast<const base_type&>(e))
+{
+}
+
+any_completion_executor::any_completion_executor(std::nothrow_t,
+ const any_completion_executor& e) noexcept
+ : base_type(static_cast<const base_type&>(e))
+{
+}
+
+any_completion_executor::any_completion_executor(
+ any_completion_executor&& e) noexcept
+ : base_type(static_cast<base_type&&>(e))
+{
+}
+
+any_completion_executor::any_completion_executor(std::nothrow_t,
+ any_completion_executor&& e) noexcept
+ : base_type(static_cast<base_type&&>(e))
+{
+}
+
+any_completion_executor& any_completion_executor::operator=(
+ const any_completion_executor& e) noexcept
+{
+ base_type::operator=(static_cast<const base_type&>(e));
+ return *this;
+}
+
+any_completion_executor& any_completion_executor::operator=(
+ any_completion_executor&& e) noexcept
+{
+ base_type::operator=(static_cast<base_type&&>(e));
+ return *this;
+}
+
+any_completion_executor& any_completion_executor::operator=(nullptr_t)
+{
+ base_type::operator=(nullptr_t());
+ return *this;
+}
+
+any_completion_executor::~any_completion_executor()
+{
+}
+
+void any_completion_executor::swap(
+ any_completion_executor& other) noexcept
+{
+ static_cast<base_type&>(*this).swap(static_cast<base_type&>(other));
+}
+
+template <>
+any_completion_executor any_completion_executor::prefer(
+ const execution::outstanding_work_t::tracked_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_completion_executor any_completion_executor::prefer(
+ const execution::outstanding_work_t::untracked_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_completion_executor any_completion_executor::prefer(
+ const execution::relationship_t::fork_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_completion_executor any_completion_executor::prefer(
+ const execution::relationship_t::continuation_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#endif // ASIO_IMPL_ANY_COMPLETION_EXECUTOR_IPP
diff --git a/3rdparty/asio/include/asio/impl/any_io_executor.ipp b/3rdparty/asio/include/asio/impl/any_io_executor.ipp
new file mode 100644
index 00000000000..338ad4d3ae2
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/any_io_executor.ipp
@@ -0,0 +1,134 @@
+//
+// impl/any_io_executor.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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 ASIO_IMPL_ANY_IO_EXECUTOR_IPP
+#define ASIO_IMPL_ANY_IO_EXECUTOR_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#include "asio/any_io_executor.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+any_io_executor::any_io_executor() noexcept
+ : base_type()
+{
+}
+
+any_io_executor::any_io_executor(nullptr_t) noexcept
+ : base_type(nullptr_t())
+{
+}
+
+any_io_executor::any_io_executor(const any_io_executor& e) noexcept
+ : base_type(static_cast<const base_type&>(e))
+{
+}
+
+any_io_executor::any_io_executor(std::nothrow_t,
+ const any_io_executor& e) noexcept
+ : base_type(static_cast<const base_type&>(e))
+{
+}
+
+any_io_executor::any_io_executor(any_io_executor&& e) noexcept
+ : base_type(static_cast<base_type&&>(e))
+{
+}
+
+any_io_executor::any_io_executor(std::nothrow_t, any_io_executor&& e) noexcept
+ : base_type(static_cast<base_type&&>(e))
+{
+}
+
+any_io_executor& any_io_executor::operator=(const any_io_executor& e) noexcept
+{
+ base_type::operator=(static_cast<const base_type&>(e));
+ return *this;
+}
+
+any_io_executor& any_io_executor::operator=(any_io_executor&& e) noexcept
+{
+ base_type::operator=(static_cast<base_type&&>(e));
+ return *this;
+}
+
+any_io_executor& any_io_executor::operator=(nullptr_t)
+{
+ base_type::operator=(nullptr_t());
+ return *this;
+}
+
+any_io_executor::~any_io_executor()
+{
+}
+
+void any_io_executor::swap(any_io_executor& other) noexcept
+{
+ static_cast<base_type&>(*this).swap(static_cast<base_type&>(other));
+}
+
+template <>
+any_io_executor any_io_executor::require(
+ const execution::blocking_t::never_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).require(p);
+}
+
+template <>
+any_io_executor any_io_executor::prefer(
+ const execution::blocking_t::possibly_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_io_executor any_io_executor::prefer(
+ const execution::outstanding_work_t::tracked_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_io_executor any_io_executor::prefer(
+ const execution::outstanding_work_t::untracked_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_io_executor any_io_executor::prefer(
+ const execution::relationship_t::fork_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+template <>
+any_io_executor any_io_executor::prefer(
+ const execution::relationship_t::continuation_t& p, int) const
+{
+ return static_cast<const base_type&>(*this).prefer(p);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // !defined(ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+
+#endif // ASIO_IMPL_ANY_IO_EXECUTOR_IPP
diff --git a/3rdparty/asio/include/asio/impl/append.hpp b/3rdparty/asio/include/asio/impl/append.hpp
new file mode 100644
index 00000000000..cfa54191fcd
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/append.hpp
@@ -0,0 +1,162 @@
+//
+// impl/append.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 ASIO_IMPL_APPEND_HPP
+#define ASIO_IMPL_APPEND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Class to adapt an append_t as a completion handler.
+template <typename Handler, typename... Values>
+class append_handler
+{
+public:
+ typedef void result_type;
+
+ template <typename H>
+ append_handler(H&& handler, std::tuple<Values...> values)
+ : handler_(static_cast<H&&>(handler)),
+ values_(static_cast<std::tuple<Values...>&&>(values))
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ this->invoke(
+ index_sequence_for<Values...>{},
+ static_cast<Args&&>(args)...);
+ }
+
+ template <std::size_t... I, typename... Args>
+ void invoke(index_sequence<I...>, Args&&... args)
+ {
+ static_cast<Handler&&>(handler_)(
+ static_cast<Args&&>(args)...,
+ static_cast<Values&&>(std::get<I>(values_))...);
+ }
+
+//private:
+ Handler handler_;
+ std::tuple<Values...> values_;
+};
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ append_handler<Handler>* this_handler)
+{
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Signature, typename... Values>
+struct append_signature;
+
+template <typename R, typename... Args, typename... Values>
+struct append_signature<R(Args...), Values...>
+{
+ typedef R type(decay_t<Args>..., Values...);
+};
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename... Values, typename Signature>
+struct async_result<append_t<CompletionToken, Values...>, Signature>
+ : async_result<CompletionToken,
+ typename detail::append_signature<
+ Signature, Values...>::type>
+{
+ typedef typename detail::append_signature<
+ Signature, Values...>::type signature;
+
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler,
+ std::tuple<Values...> values, Args&&... args)
+ {
+ 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>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<CompletionToken, signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.token_,
+ static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...))
+ {
+ return async_initiate<CompletionToken, signature>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_,
+ static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename... Values, typename DefaultCandidate>
+struct associator<Associator,
+ detail::append_handler<Handler, Values...>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::append_handler<Handler, Values...>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::append_handler<Handler, Values...>& 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)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_APPEND_HPP
diff --git a/3rdparty/asio/include/asio/impl/as_tuple.hpp b/3rdparty/asio/include/asio/impl/as_tuple.hpp
new file mode 100644
index 00000000000..6d47510b997
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/as_tuple.hpp
@@ -0,0 +1,245 @@
+//
+// impl/as_tuple.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 ASIO_IMPL_AS_TUPLE_HPP
+#define ASIO_IMPL_AS_TUPLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Class to adapt a as_tuple_t as a completion handler.
+template <typename Handler>
+class as_tuple_handler
+{
+public:
+ typedef void result_type;
+
+ template <typename CompletionToken>
+ as_tuple_handler(as_tuple_t<CompletionToken> e)
+ : handler_(static_cast<CompletionToken&&>(e.token_))
+ {
+ }
+
+ template <typename RedirectedHandler>
+ as_tuple_handler(RedirectedHandler&& h)
+ : handler_(static_cast<RedirectedHandler&&>(h))
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ static_cast<Handler&&>(handler_)(
+ std::make_tuple(static_cast<Args&&>(args)...));
+ }
+
+//private:
+ Handler handler_;
+};
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ as_tuple_handler<Handler>* this_handler)
+{
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Signature>
+struct as_tuple_signature;
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...)>
+{
+ typedef R type(std::tuple<decay_t<Args>...>);
+};
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...) &>
+{
+ typedef R type(std::tuple<decay_t<Args>...>) &;
+};
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...) &&>
+{
+ typedef R type(std::tuple<decay_t<Args>...>) &&;
+};
+
+#if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...) noexcept>
+{
+ typedef R type(std::tuple<decay_t<Args>...>) noexcept;
+};
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...) & noexcept>
+{
+ typedef R type(std::tuple<decay_t<Args>...>) & noexcept;
+};
+
+template <typename R, typename... Args>
+struct as_tuple_signature<R(Args...) && noexcept>
+{
+ typedef R type(std::tuple<decay_t<Args>...>) && noexcept;
+};
+
+#endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename... Signatures>
+struct async_result<as_tuple_t<CompletionToken>, Signatures...>
+ : async_result<CompletionToken,
+ typename detail::as_tuple_signature<Signatures>::type...>
+{
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args)
+ {
+ 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>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<
+ conditional_t<
+ is_const<remove_reference_t<RawCompletionToken>>::value,
+ const CompletionToken, CompletionToken>,
+ typename detail::as_tuple_signature<Signatures>::type...>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...))
+ {
+ return async_initiate<
+ conditional_t<
+ is_const<remove_reference_t<RawCompletionToken>>::value,
+ const CompletionToken, CompletionToken>,
+ typename detail::as_tuple_signature<Signatures>::type...>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...);
+ }
+};
+
+#if defined(ASIO_MSVC)
+
+// Workaround for MSVC internal compiler error.
+
+template <typename CompletionToken, typename Signature>
+struct async_result<as_tuple_t<CompletionToken>, Signature>
+ : async_result<CompletionToken,
+ typename detail::as_tuple_signature<Signature>::type>
+{
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler, Args&&... args)
+ {
+ 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>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<
+ conditional_t<
+ is_const<remove_reference_t<RawCompletionToken>>::value,
+ const CompletionToken, CompletionToken>,
+ typename detail::as_tuple_signature<Signature>::type>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...))
+ {
+ return async_initiate<
+ conditional_t<
+ is_const<remove_reference_t<RawCompletionToken>>::value,
+ const CompletionToken, CompletionToken>,
+ typename detail::as_tuple_signature<Signature>::type>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<Args&&>(args)...);
+ }
+};
+
+#endif // defined(ASIO_MSVC)
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename DefaultCandidate>
+struct associator<Associator,
+ detail::as_tuple_handler<Handler>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::as_tuple_handler<Handler>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::as_tuple_handler<Handler>& 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)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_AS_TUPLE_HPP
diff --git a/3rdparty/asio/include/asio/impl/awaitable.hpp b/3rdparty/asio/include/asio/impl/awaitable.hpp
index 598b00baf68..c5ea2649171 100644
--- a/3rdparty/asio/include/asio/impl/awaitable.hpp
+++ b/3rdparty/asio/include/asio/impl/awaitable.hpp
@@ -2,7 +2,7 @@
// impl/awaitable.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,7 +19,6 @@
#include <exception>
#include <new>
#include <tuple>
-#include <utility>
#include "asio/cancellation_signal.hpp"
#include "asio/cancellation_state.hpp"
#include "asio/detail/thread_context.hpp"
@@ -31,12 +30,20 @@
#include "asio/system_error.hpp"
#include "asio/this_coro.hpp"
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+# include "asio/detail/source_location.hpp"
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
struct awaitable_thread_has_context_switched {};
+template <typename, typename> class awaitable_async_op_handler;
+template <typename, typename, typename> class awaitable_async_op;
// An awaitable_thread represents a thread-of-execution that is composed of one
// or more "stack frames", with each frame represented by an awaitable_frame.
@@ -162,10 +169,35 @@ public:
{
if (attached_thread_->entry_point()->throw_if_cancelled_)
if (!!attached_thread_->get_cancellation_state().cancelled())
- do_throw_error(asio::error::operation_aborted, "co_await");
+ throw_error(asio::error::operation_aborted, "co_await");
return a;
}
+ template <typename Op>
+ auto await_transform(Op&& op,
+ constraint_t<is_async_operation<Op>::value> = 0
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , detail::source_location location = detail::source_location::current()
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ )
+ {
+ if (attached_thread_->entry_point()->throw_if_cancelled_)
+ if (!!attached_thread_->get_cancellation_state().cancelled())
+ throw_error(asio::error::operation_aborted, "co_await");
+
+ return awaitable_async_op<
+ completion_signature_of_t<Op>, decay_t<Op>, Executor>{
+ std::forward<Op>(op), this
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , location
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ };
+ }
+
// This await transformation obtains the associated executor of the thread of
// execution.
auto await_transform(this_coro::executor_t) noexcept
@@ -265,11 +297,11 @@ public:
auto await_resume()
{
return this_->attached_thread_->reset_cancellation_state(
- ASIO_MOVE_CAST(Filter)(filter_));
+ static_cast<Filter&&>(filter_));
}
};
- return result{this, ASIO_MOVE_CAST(Filter)(reset.filter)};
+ return result{this, static_cast<Filter&&>(reset.filter)};
}
// This await transformation resets the associated cancellation state.
@@ -296,14 +328,14 @@ public:
auto await_resume()
{
return this_->attached_thread_->reset_cancellation_state(
- ASIO_MOVE_CAST(InFilter)(in_filter_),
- ASIO_MOVE_CAST(OutFilter)(out_filter_));
+ static_cast<InFilter&&>(in_filter_),
+ static_cast<OutFilter&&>(out_filter_));
}
};
return result{this,
- ASIO_MOVE_CAST(InFilter)(reset.in_filter),
- ASIO_MOVE_CAST(OutFilter)(reset.out_filter)};
+ static_cast<InFilter&&>(reset.in_filter),
+ static_cast<OutFilter&&>(reset.out_filter)};
}
// This await transformation determines whether cancellation is propagated as
@@ -367,12 +399,12 @@ public:
// race condition.
template <typename Function>
auto await_transform(Function f,
- typename enable_if<
+ enable_if_t<
is_convertible<
- typename result_of<Function(awaitable_frame_base*)>::type,
+ result_of_t<Function(awaitable_frame_base*)>,
awaitable_thread<Executor>*
>::value
- >::type* = 0)
+ >* = nullptr)
{
struct result
{
@@ -386,7 +418,12 @@ public:
void await_suspend(coroutine_handle<void>) noexcept
{
- function_(this_);
+ this_->after_suspend(
+ [](void* arg)
+ {
+ result* r = static_cast<result*>(arg);
+ r->function_(r->this_);
+ }, this);
}
void await_resume() const noexcept
@@ -450,9 +487,25 @@ public:
caller_ = nullptr;
}
+ struct resume_context
+ {
+ void (*after_suspend_fn_)(void*) = nullptr;
+ void *after_suspend_arg_ = nullptr;
+ };
+
void resume()
{
+ resume_context context;
+ resume_context_ = &context;
coro_.resume();
+ if (context.after_suspend_fn_)
+ context.after_suspend_fn_(context.after_suspend_arg_);
+ }
+
+ void after_suspend(void (*fn)(void*), void* arg)
+ {
+ resume_context_->after_suspend_fn_ = fn;
+ resume_context_->after_suspend_arg_ = arg;
}
void destroy()
@@ -465,6 +518,7 @@ protected:
awaitable_thread<Executor>* attached_thread_ = nullptr;
awaitable_frame_base<Executor>* caller_ = nullptr;
std::exception_ptr pending_exception_ = nullptr;
+ resume_context* resume_context_ = nullptr;
};
template <typename T, typename Executor>
@@ -484,7 +538,7 @@ public:
~awaitable_frame()
{
if (has_result_)
- static_cast<T*>(static_cast<void*>(result_))->~T();
+ std::launder(static_cast<T*>(static_cast<void*>(result_)))->~T();
}
awaitable<T, Executor> get_return_object() noexcept
@@ -510,7 +564,8 @@ public:
{
this->caller_ = nullptr;
this->rethrow_exception();
- return std::move(*static_cast<T*>(static_cast<void*>(result_)));
+ return std::move(*std::launder(
+ static_cast<T*>(static_cast<void*>(result_))));
}
private:
@@ -579,6 +634,7 @@ public:
private:
template <typename> friend class awaitable_frame_base;
+ template <typename, typename> friend class awaitable_async_op_handler;
template <typename, typename> friend class awaitable_handler_base;
template <typename> friend class awaitable_thread;
@@ -663,21 +719,21 @@ public:
}
template <typename Filter>
- void reset_cancellation_state(ASIO_MOVE_ARG(Filter) filter)
+ void reset_cancellation_state(Filter&& filter)
{
bottom_of_stack_.frame_->cancellation_state_ =
cancellation_state(bottom_of_stack_.frame_->parent_cancellation_slot_,
- ASIO_MOVE_CAST(Filter)(filter));
+ static_cast<Filter&&>(filter));
}
template <typename InFilter, typename OutFilter>
- void reset_cancellation_state(ASIO_MOVE_ARG(InFilter) in_filter,
- ASIO_MOVE_ARG(OutFilter) out_filter)
+ void reset_cancellation_state(InFilter&& in_filter,
+ OutFilter&& out_filter)
{
bottom_of_stack_.frame_->cancellation_state_ =
cancellation_state(bottom_of_stack_.frame_->parent_cancellation_slot_,
- ASIO_MOVE_CAST(InFilter)(in_filter),
- ASIO_MOVE_CAST(OutFilter)(out_filter));
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
}
bool throw_if_cancelled() const
@@ -724,6 +780,386 @@ protected:
awaitable<awaitable_thread_entry_point, Executor> bottom_of_stack_;
};
+template <typename Signature, typename Executor>
+class awaitable_async_op_handler;
+
+template <typename R, typename Executor>
+class awaitable_async_op_handler<R(), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ struct result_type {};
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type&)
+ : awaitable_thread<Executor>(std::move(*h))
+ {
+ }
+
+ void operator()()
+ {
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static void resume(result_type&)
+ {
+ }
+};
+
+template <typename R, typename Executor>
+class awaitable_async_op_handler<R(asio::error_code), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ typedef asio::error_code* result_type;
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ void operator()(asio::error_code ec)
+ {
+ result_ = &ec;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static void resume(result_type& result)
+ {
+ throw_error(*result);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename Executor>
+class awaitable_async_op_handler<R(std::exception_ptr), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ typedef std::exception_ptr* result_type;
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ void operator()(std::exception_ptr ex)
+ {
+ result_ = &ex;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static void resume(result_type& result)
+ {
+ if (*result)
+ {
+ std::exception_ptr ex = std::exchange(*result, nullptr);
+ std::rethrow_exception(ex);
+ }
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename T, typename Executor>
+class awaitable_async_op_handler<R(T), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ typedef T* result_type;
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ void operator()(T result)
+ {
+ result_ = &result;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static T resume(result_type& result)
+ {
+ return std::move(*result);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename T, typename Executor>
+class awaitable_async_op_handler<R(asio::error_code, T), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ struct result_type
+ {
+ asio::error_code* ec_;
+ T* value_;
+ };
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ void operator()(asio::error_code ec, T value)
+ {
+ result_.ec_ = &ec;
+ result_.value_ = &value;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static T resume(result_type& result)
+ {
+ throw_error(*result.ec_);
+ return std::move(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename T, typename Executor>
+class awaitable_async_op_handler<R(std::exception_ptr, T), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ struct result_type
+ {
+ std::exception_ptr* ex_;
+ T* value_;
+ };
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ void operator()(std::exception_ptr ex, T value)
+ {
+ result_.ex_ = &ex;
+ result_.value_ = &value;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static T resume(result_type& result)
+ {
+ if (*result.ex_)
+ {
+ std::exception_ptr ex = std::exchange(*result.ex_, nullptr);
+ std::rethrow_exception(ex);
+ }
+ return std::move(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename... Ts, typename Executor>
+class awaitable_async_op_handler<R(Ts...), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ typedef std::tuple<Ts...>* result_type;
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ std::tuple<Ts...> result(std::forward<Args>(args)...);
+ result_ = &result;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static std::tuple<Ts...> resume(result_type& result)
+ {
+ return std::move(*result);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename... Ts, typename Executor>
+class awaitable_async_op_handler<R(asio::error_code, Ts...), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ struct result_type
+ {
+ asio::error_code* ec_;
+ std::tuple<Ts...>* value_;
+ };
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(asio::error_code ec, Args&&... args)
+ {
+ result_.ec_ = &ec;
+ std::tuple<Ts...> value(std::forward<Args>(args)...);
+ result_.value_ = &value;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static std::tuple<Ts...> resume(result_type& result)
+ {
+ throw_error(*result.ec_);
+ return std::move(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename R, typename... Ts, typename Executor>
+class awaitable_async_op_handler<R(std::exception_ptr, Ts...), Executor>
+ : public awaitable_thread<Executor>
+{
+public:
+ struct result_type
+ {
+ std::exception_ptr* ex_;
+ std::tuple<Ts...>* value_;
+ };
+
+ awaitable_async_op_handler(
+ awaitable_thread<Executor>* h, result_type& result)
+ : awaitable_thread<Executor>(std::move(*h)),
+ result_(result)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(std::exception_ptr ex, Args&&... args)
+ {
+ result_.ex_ = &ex;
+ std::tuple<Ts...> value(std::forward<Args>(args)...);
+ result_.value_ = &value;
+ this->entry_point()->top_of_stack_->attach_thread(this);
+ this->entry_point()->top_of_stack_->clear_cancellation_slot();
+ this->pump();
+ }
+
+ static std::tuple<Ts...> resume(result_type& result)
+ {
+ if (*result.ex_)
+ {
+ std::exception_ptr ex = std::exchange(*result.ex_, nullptr);
+ std::rethrow_exception(ex);
+ }
+ return std::move(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename Signature, typename Op, typename Executor>
+class awaitable_async_op
+{
+public:
+ typedef awaitable_async_op_handler<Signature, Executor> handler_type;
+
+ awaitable_async_op(Op&& o, awaitable_frame_base<Executor>* frame
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , const detail::source_location& location
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ )
+ : op_(std::forward<Op>(o)),
+ frame_(frame),
+ result_()
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ , location_(location)
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ {
+ }
+
+ bool await_ready() const noexcept
+ {
+ return false;
+ }
+
+ void await_suspend(coroutine_handle<void>)
+ {
+ frame_->after_suspend(
+ [](void* arg)
+ {
+ awaitable_async_op* self = static_cast<awaitable_async_op*>(arg);
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ ASIO_HANDLER_LOCATION((self->location_.file_name(),
+ self->location_.line(), self->location_.function_name()));
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+ std::forward<Op&&>(self->op_)(
+ handler_type(self->frame_->detach_thread(), self->result_));
+ }, this);
+ }
+
+ auto await_resume()
+ {
+ return handler_type::resume(result_);
+ }
+
+private:
+ Op&& op_;
+ awaitable_frame_base<Executor>* frame_;
+ typename handler_type::result_type result_;
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# if defined(ASIO_HAS_SOURCE_LOCATION)
+ detail::source_location location_;
+# endif // defined(ASIO_HAS_SOURCE_LOCATION)
+#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
+};
+
} // namespace detail
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/buffered_read_stream.hpp b/3rdparty/asio/include/asio/impl/buffered_read_stream.hpp
index a25beeedce0..9a1d78b465e 100644
--- a/3rdparty/asio/include/asio/impl/buffered_read_stream.hpp
+++ b/3rdparty/asio/include/asio/impl/buffered_read_stream.hpp
@@ -2,7 +2,7 @@
// impl/buffered_read_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/associator.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/type_traits.hpp"
@@ -66,11 +64,10 @@ namespace detail
std::size_t previous_size, ReadHandler& handler)
: storage_(storage),
previous_size_(previous_size),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
buffered_fill_handler(const buffered_fill_handler& other)
: storage_(other.storage_),
previous_size_(other.previous_size_),
@@ -81,16 +78,15 @@ namespace detail
buffered_fill_handler(buffered_fill_handler&& other)
: storage_(other.storage_),
previous_size_(other.previous_size_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(const asio::error_code& ec,
const std::size_t bytes_transferred)
{
storage_.resize(previous_size_ + bytes_transferred);
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(ec, bytes_transferred);
+ static_cast<ReadHandler&&>(handler_)(ec, bytes_transferred);
}
//private:
@@ -100,32 +96,6 @@ namespace detail
};
template <typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- buffered_fill_handler<ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_fill_handler<ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename ReadHandler>
inline bool asio_handler_is_continuation(
buffered_fill_handler<ReadHandler>* this_handler)
{
@@ -133,50 +103,26 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- buffered_fill_handler<ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- buffered_fill_handler<ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename Stream>
class initiate_async_buffered_fill
{
public:
- typedef typename remove_reference<
- Stream>::type::lowest_layer_type::executor_type executor_type;
+ typedef typename remove_reference_t<
+ Stream>::lowest_layer_type::executor_type executor_type;
explicit initiate_async_buffered_fill(
- typename remove_reference<Stream>::type& next_layer)
+ remove_reference_t<Stream>& next_layer)
: next_layer_(next_layer)
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return next_layer_.lowest_layer().get_executor();
}
template <typename ReadHandler>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
buffered_stream_storage* storage) const
{
// If you get an error on the following line it means that your handler
@@ -190,12 +136,12 @@ namespace detail
buffer(
storage->data() + previous_size,
storage->size() - previous_size),
- buffered_fill_handler<typename decay<ReadHandler>::type>(
+ buffered_fill_handler<decay_t<ReadHandler>>(
*storage, previous_size, handler2.value));
}
private:
- typename remove_reference<Stream>::type& next_layer_;
+ remove_reference_t<Stream>& next_layer_;
};
} // namespace detail
@@ -209,8 +155,14 @@ struct associator<Associator,
: Associator<ReadHandler, DefaultCandidate>
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
- const detail::buffered_fill_handler<ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::buffered_fill_handler<ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::buffered_fill_handler<ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -222,10 +174,12 @@ template <typename Stream>
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
std::size_t)) ReadHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-buffered_read_stream<Stream>::async_fill(
- ASIO_MOVE_ARG(ReadHandler) handler)
+inline auto buffered_read_stream<Stream>::async_fill(ReadHandler&& handler)
+ -> decltype(
+ async_initiate<ReadHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_fill<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>()))
{
return async_initiate<ReadHandler,
void (asio::error_code, std::size_t)>(
@@ -275,39 +229,37 @@ namespace detail
const MutableBufferSequence& buffers, ReadHandler& handler)
: storage_(storage),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
- buffered_read_some_handler(const buffered_read_some_handler& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- handler_(other.handler_)
- {
- }
+ buffered_read_some_handler(const buffered_read_some_handler& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ handler_(other.handler_)
+ {
+ }
- buffered_read_some_handler(buffered_read_some_handler&& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
+ buffered_read_some_handler(buffered_read_some_handler&& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ handler_(static_cast<ReadHandler&&>(other.handler_))
+ {
+ }
void operator()(const asio::error_code& ec, std::size_t)
{
if (ec || storage_.empty())
{
const std::size_t length = 0;
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(ec, length);
+ static_cast<ReadHandler&&>(handler_)(ec, length);
}
else
{
const std::size_t bytes_copied = asio::buffer_copy(
buffers_, storage_.data(), storage_.size());
storage_.consume(bytes_copied);
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(ec, bytes_copied);
+ static_cast<ReadHandler&&>(handler_)(ec, bytes_copied);
}
}
@@ -318,34 +270,6 @@ namespace detail
};
template <typename MutableBufferSequence, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename MutableBufferSequence, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename MutableBufferSequence, typename ReadHandler>
inline bool asio_handler_is_continuation(
buffered_read_some_handler<
MutableBufferSequence, ReadHandler>* this_handler)
@@ -354,54 +278,26 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename MutableBufferSequence,
- typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename MutableBufferSequence,
- typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- buffered_read_some_handler<
- MutableBufferSequence, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename Stream>
class initiate_async_buffered_read_some
{
public:
- typedef typename remove_reference<
- Stream>::type::lowest_layer_type::executor_type executor_type;
+ typedef typename remove_reference_t<
+ Stream>::lowest_layer_type::executor_type executor_type;
explicit initiate_async_buffered_read_some(
- typename remove_reference<Stream>::type& next_layer)
+ remove_reference_t<Stream>& next_layer)
: next_layer_(next_layer)
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return next_layer_.lowest_layer().get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
buffered_stream_storage* storage,
const MutableBufferSequence& buffers) const
{
@@ -415,21 +311,21 @@ namespace detail
{
next_layer_.async_read_some(ASIO_MUTABLE_BUFFER(0, 0),
buffered_read_some_handler<MutableBufferSequence,
- typename decay<ReadHandler>::type>(
+ decay_t<ReadHandler>>(
*storage, buffers, handler2.value));
}
else
{
initiate_async_buffered_fill<Stream>(this->next_layer_)(
buffered_read_some_handler<MutableBufferSequence,
- typename decay<ReadHandler>::type>(
+ decay_t<ReadHandler>>(
*storage, buffers, handler2.value),
storage);
}
}
private:
- typename remove_reference<Stream>::type& next_layer_;
+ remove_reference_t<Stream>& next_layer_;
};
} // namespace detail
@@ -445,8 +341,16 @@ struct associator<Associator,
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::buffered_read_some_handler<
+ MutableBufferSequence, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::buffered_read_some_handler<
MutableBufferSequence, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -458,11 +362,13 @@ template <typename Stream>
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
std::size_t)) ReadHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-buffered_read_stream<Stream>::async_read_some(
- const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+inline auto buffered_read_stream<Stream>::async_read_some(
+ const MutableBufferSequence& buffers, ReadHandler&& handler)
+ -> decltype(
+ async_initiate<ReadHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_read_some<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>(), buffers))
{
return async_initiate<ReadHandler,
void (asio::error_code, std::size_t)>(
diff --git a/3rdparty/asio/include/asio/impl/buffered_write_stream.hpp b/3rdparty/asio/include/asio/impl/buffered_write_stream.hpp
index efb30a684c9..5bf58278ca6 100644
--- a/3rdparty/asio/include/asio/impl/buffered_write_stream.hpp
+++ b/3rdparty/asio/include/asio/impl/buffered_write_stream.hpp
@@ -2,7 +2,7 @@
// impl/buffered_write_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/associator.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/non_const_lvalue.hpp"
@@ -54,11 +52,10 @@ namespace detail
buffered_flush_handler(detail::buffered_stream_storage& storage,
WriteHandler& handler)
: storage_(storage),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
buffered_flush_handler(const buffered_flush_handler& other)
: storage_(other.storage_),
handler_(other.handler_)
@@ -67,16 +64,15 @@ namespace detail
buffered_flush_handler(buffered_flush_handler&& other)
: storage_(other.storage_),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ handler_(static_cast<WriteHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(const asio::error_code& ec,
const std::size_t bytes_written)
{
storage_.consume(bytes_written);
- ASIO_MOVE_OR_LVALUE(WriteHandler)(handler_)(ec, bytes_written);
+ static_cast<WriteHandler&&>(handler_)(ec, bytes_written);
}
//private:
@@ -85,32 +81,6 @@ namespace detail
};
template <typename WriteHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- buffered_flush_handler<WriteHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename WriteHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_flush_handler<WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename WriteHandler>
inline bool asio_handler_is_continuation(
buffered_flush_handler<WriteHandler>* this_handler)
{
@@ -118,50 +88,26 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- buffered_flush_handler<WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- buffered_flush_handler<WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename Stream>
class initiate_async_buffered_flush
{
public:
- typedef typename remove_reference<
- Stream>::type::lowest_layer_type::executor_type executor_type;
+ typedef typename remove_reference_t<
+ Stream>::lowest_layer_type::executor_type executor_type;
explicit initiate_async_buffered_flush(
- typename remove_reference<Stream>::type& next_layer)
+ remove_reference_t<Stream>& next_layer)
: next_layer_(next_layer)
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return next_layer_.lowest_layer().get_executor();
}
template <typename WriteHandler>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
buffered_stream_storage* storage) const
{
// If you get an error on the following line it means that your handler
@@ -170,12 +116,12 @@ namespace detail
non_const_lvalue<WriteHandler> handler2(handler);
async_write(next_layer_, buffer(storage->data(), storage->size()),
- buffered_flush_handler<typename decay<WriteHandler>::type>(
+ buffered_flush_handler<decay_t<WriteHandler>>(
*storage, handler2.value));
}
private:
- typename remove_reference<Stream>::type& next_layer_;
+ remove_reference_t<Stream>& next_layer_;
};
} // namespace detail
@@ -189,8 +135,14 @@ struct associator<Associator,
: Associator<WriteHandler, DefaultCandidate>
{
static typename Associator<WriteHandler, DefaultCandidate>::type get(
- const detail::buffered_flush_handler<WriteHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::buffered_flush_handler<WriteHandler>& h) noexcept
+ {
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::buffered_flush_handler<WriteHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -202,10 +154,12 @@ template <typename Stream>
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
std::size_t)) WriteHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-buffered_write_stream<Stream>::async_flush(
- ASIO_MOVE_ARG(WriteHandler) handler)
+inline auto buffered_write_stream<Stream>::async_flush(WriteHandler&& handler)
+ -> decltype(
+ async_initiate<WriteHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_flush<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>()))
{
return async_initiate<WriteHandler,
void (asio::error_code, std::size_t)>(
@@ -255,32 +209,30 @@ namespace detail
const ConstBufferSequence& buffers, WriteHandler& handler)
: storage_(storage),
buffers_(buffers),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
- buffered_write_some_handler(const buffered_write_some_handler& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- handler_(other.handler_)
- {
- }
+ buffered_write_some_handler(const buffered_write_some_handler& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ handler_(other.handler_)
+ {
+ }
- buffered_write_some_handler(buffered_write_some_handler&& other)
- : storage_(other.storage_),
- buffers_(other.buffers_),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
+ buffered_write_some_handler(buffered_write_some_handler&& other)
+ : storage_(other.storage_),
+ buffers_(other.buffers_),
+ handler_(static_cast<WriteHandler&&>(other.handler_))
+ {
+ }
void operator()(const asio::error_code& ec, std::size_t)
{
if (ec)
{
const std::size_t length = 0;
- ASIO_MOVE_OR_LVALUE(WriteHandler)(handler_)(ec, length);
+ static_cast<WriteHandler&&>(handler_)(ec, length);
}
else
{
@@ -293,7 +245,7 @@ namespace detail
storage_.resize(orig_size + length);
const std::size_t bytes_copied = asio::buffer_copy(
storage_.data() + orig_size, buffers_, length);
- ASIO_MOVE_OR_LVALUE(WriteHandler)(handler_)(ec, bytes_copied);
+ static_cast<WriteHandler&&>(handler_)(ec, bytes_copied);
}
}
@@ -304,34 +256,6 @@ namespace detail
};
template <typename ConstBufferSequence, typename WriteHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename ConstBufferSequence, typename WriteHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename ConstBufferSequence, typename WriteHandler>
inline bool asio_handler_is_continuation(
buffered_write_some_handler<
ConstBufferSequence, WriteHandler>* this_handler)
@@ -340,54 +264,26 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename ConstBufferSequence,
- typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename ConstBufferSequence,
- typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- buffered_write_some_handler<
- ConstBufferSequence, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename Stream>
class initiate_async_buffered_write_some
{
public:
- typedef typename remove_reference<
- Stream>::type::lowest_layer_type::executor_type executor_type;
+ typedef typename remove_reference_t<
+ Stream>::lowest_layer_type::executor_type executor_type;
explicit initiate_async_buffered_write_some(
- typename remove_reference<Stream>::type& next_layer)
+ remove_reference_t<Stream>& next_layer)
: next_layer_(next_layer)
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return next_layer_.lowest_layer().get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
buffered_stream_storage* storage,
const ConstBufferSequence& buffers) const
{
@@ -401,21 +297,21 @@ namespace detail
{
next_layer_.async_write_some(ASIO_CONST_BUFFER(0, 0),
buffered_write_some_handler<ConstBufferSequence,
- typename decay<WriteHandler>::type>(
+ decay_t<WriteHandler>>(
*storage, buffers, handler2.value));
}
else
{
initiate_async_buffered_flush<Stream>(this->next_layer_)(
buffered_write_some_handler<ConstBufferSequence,
- typename decay<WriteHandler>::type>(
+ decay_t<WriteHandler>>(
*storage, buffers, handler2.value),
storage);
}
}
private:
- typename remove_reference<Stream>::type& next_layer_;
+ remove_reference_t<Stream>& next_layer_;
};
} // namespace detail
@@ -431,8 +327,16 @@ struct associator<Associator,
{
static typename Associator<WriteHandler, DefaultCandidate>::type get(
const detail::buffered_write_some_handler<
+ ConstBufferSequence, WriteHandler>& h) noexcept
+ {
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::buffered_write_some_handler<
ConstBufferSequence, WriteHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -444,11 +348,13 @@ template <typename Stream>
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
std::size_t)) WriteHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-buffered_write_stream<Stream>::async_write_some(
- const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+inline auto buffered_write_stream<Stream>::async_write_some(
+ const ConstBufferSequence& buffers, WriteHandler&& handler)
+ -> decltype(
+ async_initiate<WriteHandler,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_buffered_write_some<Stream>>(),
+ handler, declval<detail::buffered_stream_storage*>(), buffers))
{
return async_initiate<WriteHandler,
void (asio::error_code, std::size_t)>(
diff --git a/3rdparty/asio/include/asio/impl/cancellation_signal.ipp b/3rdparty/asio/include/asio/impl/cancellation_signal.ipp
new file mode 100644
index 00000000000..f63ab8de0f3
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/cancellation_signal.ipp
@@ -0,0 +1,96 @@
+//
+// impl/cancellation_signal.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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 ASIO_IMPL_CANCELLATION_SIGNAL_IPP
+#define ASIO_IMPL_CANCELLATION_SIGNAL_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/cancellation_signal.hpp"
+#include "asio/detail/thread_context.hpp"
+#include "asio/detail/thread_info_base.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+cancellation_signal::~cancellation_signal()
+{
+ if (handler_)
+ {
+ std::pair<void*, std::size_t> mem = handler_->destroy();
+ detail::thread_info_base::deallocate(
+ detail::thread_info_base::cancellation_signal_tag(),
+ detail::thread_context::top_of_thread_call_stack(),
+ mem.first, mem.second);
+ }
+}
+
+void cancellation_slot::clear()
+{
+ if (handler_ != 0 && *handler_ != 0)
+ {
+ std::pair<void*, std::size_t> mem = (*handler_)->destroy();
+ detail::thread_info_base::deallocate(
+ detail::thread_info_base::cancellation_signal_tag(),
+ detail::thread_context::top_of_thread_call_stack(),
+ mem.first, mem.second);
+ *handler_ = 0;
+ }
+}
+
+std::pair<void*, std::size_t> cancellation_slot::prepare_memory(
+ std::size_t size, std::size_t align)
+{
+ assert(handler_);
+ std::pair<void*, std::size_t> mem;
+ if (*handler_)
+ {
+ mem = (*handler_)->destroy();
+ *handler_ = 0;
+ }
+ if (size > mem.second
+ || reinterpret_cast<std::size_t>(mem.first) % align != 0)
+ {
+ if (mem.first)
+ {
+ detail::thread_info_base::deallocate(
+ detail::thread_info_base::cancellation_signal_tag(),
+ detail::thread_context::top_of_thread_call_stack(),
+ mem.first, mem.second);
+ }
+ mem.first = detail::thread_info_base::allocate(
+ detail::thread_info_base::cancellation_signal_tag(),
+ detail::thread_context::top_of_thread_call_stack(),
+ size, align);
+ mem.second = size;
+ }
+ return mem;
+}
+
+cancellation_slot::auto_delete_helper::~auto_delete_helper()
+{
+ if (mem.first)
+ {
+ detail::thread_info_base::deallocate(
+ detail::thread_info_base::cancellation_signal_tag(),
+ detail::thread_context::top_of_thread_call_stack(),
+ mem.first, mem.second);
+ }
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_CANCELLATION_SIGNAL_IPP
diff --git a/3rdparty/asio/include/asio/impl/co_spawn.hpp b/3rdparty/asio/include/asio/impl/co_spawn.hpp
index b235e5c4495..3eba7d86db8 100644
--- a/3rdparty/asio/include/asio/impl/co_spawn.hpp
+++ b/3rdparty/asio/include/asio/impl/co_spawn.hpp
@@ -2,7 +2,7 @@
// impl/co_spawn.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,6 +18,8 @@
#include "asio/detail/config.hpp"
#include "asio/associated_cancellation_slot.hpp"
#include "asio/awaitable.hpp"
+#include "asio/detail/memory.hpp"
+#include "asio/detail/recycling_allocator.hpp"
#include "asio/dispatch.hpp"
#include "asio/execution/outstanding_work.hpp"
#include "asio/post.hpp"
@@ -33,18 +35,18 @@ template <typename Executor, typename = void>
class co_spawn_work_guard
{
public:
- typedef typename decay<
- typename prefer_result<Executor,
+ typedef decay_t<
+ prefer_result_t<Executor,
execution::outstanding_work_t::tracked_t
- >::type
- >::type executor_type;
+ >
+ > executor_type;
co_spawn_work_guard(const Executor& ex)
: executor_(asio::prefer(ex, execution::outstanding_work.tracked))
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return executor_;
}
@@ -57,9 +59,9 @@ private:
template <typename Executor>
struct co_spawn_work_guard<Executor,
- typename enable_if<
+ enable_if_t<
!execution::is_executor<Executor>::value
- >::type> : executor_work_guard<Executor>
+ >> : executor_work_guard<Executor>
{
co_spawn_work_guard(const Executor& ex)
: executor_work_guard<Executor>(ex)
@@ -69,50 +71,96 @@ struct co_spawn_work_guard<Executor,
#endif // !defined(ASIO_NO_TS_EXECUTORS)
-template <typename Executor>
-inline co_spawn_work_guard<Executor>
-make_co_spawn_work_guard(const Executor& ex)
+template <typename Handler, typename Executor,
+ typename Function, typename = void>
+struct co_spawn_state
{
- return co_spawn_work_guard<Executor>(ex);
-}
+ template <typename H, typename F>
+ co_spawn_state(H&& h, const Executor& ex, F&& f)
+ : handler(std::forward<H>(h)),
+ spawn_work(ex),
+ handler_work(asio::get_associated_executor(handler, ex)),
+ function(std::forward<F>(f))
+ {
+ }
-template <typename T, typename Executor, typename F, typename Handler>
-awaitable<awaitable_thread_entry_point, Executor> co_spawn_entry_point(
- awaitable<T, Executor>*, Executor ex, F f, Handler handler)
+ Handler handler;
+ co_spawn_work_guard<Executor> spawn_work;
+ co_spawn_work_guard<associated_executor_t<Handler, Executor>> handler_work;
+ Function function;
+};
+
+template <typename Handler, typename Executor, typename Function>
+struct co_spawn_state<Handler, Executor, Function,
+ enable_if_t<
+ is_same<
+ typename associated_executor<Handler,
+ Executor>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >>
{
- auto spawn_work = make_co_spawn_work_guard(ex);
- auto handler_work = make_co_spawn_work_guard(
- asio::get_associated_executor(handler, ex));
+ template <typename H, typename F>
+ co_spawn_state(H&& h, const Executor& ex, F&& f)
+ : handler(std::forward<H>(h)),
+ handler_work(ex),
+ function(std::forward<F>(f))
+ {
+ }
- (void) co_await (dispatch)(
- use_awaitable_t<Executor>{__FILE__, __LINE__, "co_spawn_entry_point"});
+ Handler handler;
+ co_spawn_work_guard<Executor> handler_work;
+ Function function;
+};
+
+struct co_spawn_dispatch
+{
+ template <typename CompletionToken>
+ auto operator()(CompletionToken&& token) const
+ -> decltype(asio::dispatch(std::forward<CompletionToken>(token)))
+ {
+ return asio::dispatch(std::forward<CompletionToken>(token));
+ }
+};
+
+struct co_spawn_post
+{
+ template <typename CompletionToken>
+ auto operator()(CompletionToken&& token) const
+ -> decltype(asio::post(std::forward<CompletionToken>(token)))
+ {
+ return asio::post(std::forward<CompletionToken>(token));
+ }
+};
+
+template <typename T, typename Handler, typename Executor, typename Function>
+awaitable<awaitable_thread_entry_point, Executor> co_spawn_entry_point(
+ awaitable<T, Executor>*, co_spawn_state<Handler, Executor, Function> s)
+{
+ (void) co_await co_spawn_dispatch{};
(co_await awaitable_thread_has_context_switched{}) = false;
std::exception_ptr e = nullptr;
bool done = false;
try
{
- T t = co_await f();
+ T t = co_await s.function();
done = true;
- if (co_await awaitable_thread_has_context_switched{})
+ bool switched = (co_await awaitable_thread_has_context_switched{});
+ if (!switched)
{
- (dispatch)(handler_work.get_executor(),
- [handler = std::move(handler), t = std::move(t)]() mutable
- {
- std::move(handler)(std::exception_ptr(), std::move(t));
- });
- }
- else
- {
- (post)(handler_work.get_executor(),
- [handler = std::move(handler), t = std::move(t)]() mutable
- {
- std::move(handler)(std::exception_ptr(), std::move(t));
- });
+ co_await this_coro::throw_if_cancelled(false);
+ (void) co_await co_spawn_post();
}
+ (dispatch)(s.handler_work.get_executor(),
+ [handler = std::move(s.handler), t = std::move(t)]() mutable
+ {
+ std::move(handler)(std::exception_ptr(), std::move(t));
+ });
+
co_return;
}
catch (...)
@@ -123,62 +171,49 @@ awaitable<awaitable_thread_entry_point, Executor> co_spawn_entry_point(
e = std::current_exception();
}
- if (co_await awaitable_thread_has_context_switched{})
+ bool switched = (co_await awaitable_thread_has_context_switched{});
+ if (!switched)
{
- (dispatch)(handler_work.get_executor(),
- [handler = std::move(handler), e]() mutable
- {
- std::move(handler)(e, T());
- });
- }
- else
- {
- (post)(handler_work.get_executor(),
- [handler = std::move(handler), e]() mutable
- {
- std::move(handler)(e, T());
- });
+ co_await this_coro::throw_if_cancelled(false);
+ (void) co_await co_spawn_post();
}
+
+ (dispatch)(s.handler_work.get_executor(),
+ [handler = std::move(s.handler), e]() mutable
+ {
+ std::move(handler)(e, T());
+ });
}
-template <typename Executor, typename F, typename Handler>
+template <typename Handler, typename Executor, typename Function>
awaitable<awaitable_thread_entry_point, Executor> co_spawn_entry_point(
- awaitable<void, Executor>*, Executor ex, F f, Handler handler)
+ awaitable<void, Executor>*, co_spawn_state<Handler, Executor, Function> s)
{
- auto spawn_work = make_co_spawn_work_guard(ex);
- auto handler_work = make_co_spawn_work_guard(
- asio::get_associated_executor(handler, ex));
-
- (void) co_await (dispatch)(
- use_awaitable_t<Executor>{__FILE__, __LINE__, "co_spawn_entry_point"});
+ (void) co_await co_spawn_dispatch{};
(co_await awaitable_thread_has_context_switched{}) = false;
std::exception_ptr e = nullptr;
try
{
- co_await f();
+ co_await s.function();
}
catch (...)
{
e = std::current_exception();
}
- if (co_await awaitable_thread_has_context_switched{})
+ bool switched = (co_await awaitable_thread_has_context_switched{});
+ if (!switched)
{
- (dispatch)(handler_work.get_executor(),
- [handler = std::move(handler), e]() mutable
- {
- std::move(handler)(e);
- });
- }
- else
- {
- (post)(handler_work.get_executor(),
- [handler = std::move(handler), e]() mutable
- {
- std::move(handler)(e);
- });
+ co_await this_coro::throw_if_cancelled(false);
+ (void) co_await co_spawn_post();
}
+
+ (dispatch)(s.handler_work.get_executor(),
+ [handler = std::move(s.handler), e]() mutable
+ {
+ std::move(handler)(e);
+ });
}
template <typename T, typename Executor>
@@ -199,6 +234,63 @@ private:
awaitable<T, Executor> awaitable_;
};
+template <typename Handler, typename Executor, typename = void>
+class co_spawn_cancellation_handler
+{
+public:
+ co_spawn_cancellation_handler(const Handler&, const Executor& ex)
+ : signal_(detail::allocate_shared<cancellation_signal>(
+ detail::recycling_allocator<cancellation_signal,
+ detail::thread_info_base::cancellation_signal_tag>())),
+ ex_(ex)
+ {
+ }
+
+ cancellation_slot slot()
+ {
+ return signal_->slot();
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ shared_ptr<cancellation_signal> sig = signal_;
+ asio::dispatch(ex_, [sig, type]{ sig->emit(type); });
+ }
+
+private:
+ shared_ptr<cancellation_signal> signal_;
+ Executor ex_;
+};
+
+template <typename Handler, typename Executor>
+class co_spawn_cancellation_handler<Handler, Executor,
+ enable_if_t<
+ is_same<
+ typename associated_executor<Handler,
+ Executor>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >>
+{
+public:
+ co_spawn_cancellation_handler(const Handler&, const Executor&)
+ {
+ }
+
+ cancellation_slot slot()
+ {
+ return signal_.slot();
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ signal_.emit(type);
+ }
+
+private:
+ cancellation_signal signal_;
+};
+
template <typename Executor>
class initiate_co_spawn
{
@@ -211,7 +303,7 @@ public:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return ex_;
}
@@ -219,18 +311,29 @@ public:
template <typename Handler, typename F>
void operator()(Handler&& handler, F&& f) const
{
- typedef typename result_of<F()>::type awaitable_type;
+ typedef result_of_t<F()> awaitable_type;
+ typedef decay_t<Handler> handler_type;
+ typedef decay_t<F> function_type;
+ typedef co_spawn_cancellation_handler<
+ handler_type, Executor> cancel_handler_type;
+
+ auto slot = asio::get_associated_cancellation_slot(handler);
+ cancel_handler_type* cancel_handler = slot.is_connected()
+ ? &slot.template emplace<cancel_handler_type>(handler, ex_)
+ : nullptr;
- cancellation_state proxy_cancel_state(
- asio::get_associated_cancellation_slot(handler),
- enable_total_cancellation());
+ cancellation_slot proxy_slot(
+ cancel_handler
+ ? cancel_handler->slot()
+ : cancellation_slot());
- cancellation_state cancel_state(proxy_cancel_state.slot());
+ cancellation_state cancel_state(proxy_slot);
auto a = (co_spawn_entry_point)(static_cast<awaitable_type*>(nullptr),
- ex_, std::forward<F>(f), std::forward<Handler>(handler));
- awaitable_handler<executor_type, void>(std::move(a), ex_,
- proxy_cancel_state.slot(), cancel_state).launch();
+ co_spawn_state<handler_type, Executor, function_type>(
+ std::forward<Handler>(handler), ex_, std::forward<F>(f)));
+ awaitable_handler<executor_type, void>(std::move(a),
+ ex_, proxy_slot, cancel_state).launch();
}
private:
@@ -246,10 +349,10 @@ inline ASIO_INITFN_AUTO_RESULT_TYPE(
CompletionToken, void(std::exception_ptr, T))
co_spawn(const Executor& ex,
awaitable<T, AwaitableExecutor> a, CompletionToken&& token,
- typename constraint<
+ constraint_t<
(is_executor<Executor>::value || execution::is_executor<Executor>::value)
&& is_convertible<Executor, AwaitableExecutor>::value
- >::type)
+ >)
{
return async_initiate<CompletionToken, void(std::exception_ptr, T)>(
detail::initiate_co_spawn<AwaitableExecutor>(AwaitableExecutor(ex)),
@@ -263,10 +366,10 @@ inline ASIO_INITFN_AUTO_RESULT_TYPE(
CompletionToken, void(std::exception_ptr))
co_spawn(const Executor& ex,
awaitable<void, AwaitableExecutor> a, CompletionToken&& token,
- typename constraint<
+ constraint_t<
(is_executor<Executor>::value || execution::is_executor<Executor>::value)
&& is_convertible<Executor, AwaitableExecutor>::value
- >::type)
+ >)
{
return async_initiate<CompletionToken, void(std::exception_ptr)>(
detail::initiate_co_spawn<AwaitableExecutor>(AwaitableExecutor(ex)),
@@ -281,11 +384,11 @@ inline ASIO_INITFN_AUTO_RESULT_TYPE(
CompletionToken, void(std::exception_ptr, T))
co_spawn(ExecutionContext& ctx,
awaitable<T, AwaitableExecutor> a, CompletionToken&& token,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
&& is_convertible<typename ExecutionContext::executor_type,
AwaitableExecutor>::value
- >::type)
+ >)
{
return (co_spawn)(ctx.get_executor(), std::move(a),
std::forward<CompletionToken>(token));
@@ -298,11 +401,11 @@ inline ASIO_INITFN_AUTO_RESULT_TYPE(
CompletionToken, void(std::exception_ptr))
co_spawn(ExecutionContext& ctx,
awaitable<void, AwaitableExecutor> a, CompletionToken&& token,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
&& is_convertible<typename ExecutionContext::executor_type,
AwaitableExecutor>::value
- >::type)
+ >)
{
return (co_spawn)(ctx.get_executor(), std::move(a),
std::forward<CompletionToken>(token));
@@ -310,30 +413,30 @@ co_spawn(ExecutionContext& ctx,
template <typename Executor, typename F,
ASIO_COMPLETION_TOKEN_FOR(typename detail::awaitable_signature<
- typename result_of<F()>::type>::type) CompletionToken>
+ result_of_t<F()>>::type) CompletionToken>
inline ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
- typename detail::awaitable_signature<typename result_of<F()>::type>::type)
+ typename detail::awaitable_signature<result_of_t<F()>>::type)
co_spawn(const Executor& ex, F&& f, CompletionToken&& token,
- typename constraint<
+ constraint_t<
is_executor<Executor>::value || execution::is_executor<Executor>::value
- >::type)
+ >)
{
return async_initiate<CompletionToken,
- typename detail::awaitable_signature<typename result_of<F()>::type>::type>(
+ typename detail::awaitable_signature<result_of_t<F()>>::type>(
detail::initiate_co_spawn<
- typename result_of<F()>::type::executor_type>(ex),
+ typename result_of_t<F()>::executor_type>(ex),
token, std::forward<F>(f));
}
template <typename ExecutionContext, typename F,
ASIO_COMPLETION_TOKEN_FOR(typename detail::awaitable_signature<
- typename result_of<F()>::type>::type) CompletionToken>
+ result_of_t<F()>>::type) CompletionToken>
inline ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken,
- typename detail::awaitable_signature<typename result_of<F()>::type>::type)
+ typename detail::awaitable_signature<result_of_t<F()>>::type)
co_spawn(ExecutionContext& ctx, F&& f, CompletionToken&& token,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type)
+ >)
{
return (co_spawn)(ctx.get_executor(), std::forward<F>(f),
std::forward<CompletionToken>(token));
diff --git a/3rdparty/asio/include/asio/impl/compose.hpp b/3rdparty/asio/include/asio/impl/compose.hpp
deleted file mode 100644
index 586911ea708..00000000000
--- a/3rdparty/asio/include/asio/impl/compose.hpp
+++ /dev/null
@@ -1,687 +0,0 @@
-//
-// impl/compose.hpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_IMPL_COMPOSE_HPP
-#define ASIO_IMPL_COMPOSE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/associated_executor.hpp"
-#include "asio/detail/base_from_cancellation_state.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
-#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
-#include "asio/execution/executor.hpp"
-#include "asio/execution/outstanding_work.hpp"
-#include "asio/executor_work_guard.hpp"
-#include "asio/is_executor.hpp"
-#include "asio/system_executor.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-namespace detail
-{
- template <typename Executor, typename = void>
- class composed_work_guard
- {
- public:
- typedef typename decay<
- typename prefer_result<Executor,
- execution::outstanding_work_t::tracked_t
- >::type
- >::type executor_type;
-
- composed_work_guard(const Executor& ex)
- : executor_(asio::prefer(ex, execution::outstanding_work.tracked))
- {
- }
-
- void reset()
- {
- }
-
- executor_type get_executor() const ASIO_NOEXCEPT
- {
- return executor_;
- }
-
- private:
- executor_type executor_;
- };
-
-#if !defined(ASIO_NO_TS_EXECUTORS)
-
- template <typename Executor>
- struct composed_work_guard<Executor,
- typename enable_if<
- !execution::is_executor<Executor>::value
- >::type> : executor_work_guard<Executor>
- {
- composed_work_guard(const Executor& ex)
- : executor_work_guard<Executor>(ex)
- {
- }
- };
-
-#endif // !defined(ASIO_NO_TS_EXECUTORS)
-
- template <typename>
- struct composed_io_executors;
-
- template <>
- struct composed_io_executors<void()>
- {
- composed_io_executors() ASIO_NOEXCEPT
- : head_(system_executor())
- {
- }
-
- typedef system_executor head_type;
- system_executor head_;
- };
-
- inline composed_io_executors<void()> make_composed_io_executors()
- {
- return composed_io_executors<void()>();
- }
-
- template <typename Head>
- struct composed_io_executors<void(Head)>
- {
- explicit composed_io_executors(const Head& ex) ASIO_NOEXCEPT
- : head_(ex)
- {
- }
-
- typedef Head head_type;
- Head head_;
- };
-
- template <typename Head>
- inline composed_io_executors<void(Head)>
- make_composed_io_executors(const Head& head)
- {
- return composed_io_executors<void(Head)>(head);
- }
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Head, typename... Tail>
- struct composed_io_executors<void(Head, Tail...)>
- {
- explicit composed_io_executors(const Head& head,
- const Tail&... tail) ASIO_NOEXCEPT
- : head_(head),
- tail_(tail...)
- {
- }
-
- void reset()
- {
- head_.reset();
- tail_.reset();
- }
-
- typedef Head head_type;
- Head head_;
- composed_io_executors<void(Tail...)> tail_;
- };
-
- template <typename Head, typename... Tail>
- inline composed_io_executors<void(Head, Tail...)>
- make_composed_io_executors(const Head& head, const Tail&... tail)
- {
- return composed_io_executors<void(Head, Tail...)>(head, tail...);
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_COMPOSED_IO_EXECUTORS_DEF(n) \
- template <typename Head, ASIO_VARIADIC_TPARAMS(n)> \
- struct composed_io_executors<void(Head, ASIO_VARIADIC_TARGS(n))> \
- { \
- explicit composed_io_executors(const Head& head, \
- ASIO_VARIADIC_CONSTREF_PARAMS(n)) ASIO_NOEXCEPT \
- : head_(head), \
- tail_(ASIO_VARIADIC_BYVAL_ARGS(n)) \
- { \
- } \
- \
- void reset() \
- { \
- head_.reset(); \
- tail_.reset(); \
- } \
- \
- typedef Head head_type; \
- Head head_; \
- composed_io_executors<void(ASIO_VARIADIC_TARGS(n))> tail_; \
- }; \
- \
- template <typename Head, ASIO_VARIADIC_TPARAMS(n)> \
- inline composed_io_executors<void(Head, ASIO_VARIADIC_TARGS(n))> \
- make_composed_io_executors(const Head& head, \
- ASIO_VARIADIC_CONSTREF_PARAMS(n)) \
- { \
- return composed_io_executors< \
- void(Head, ASIO_VARIADIC_TARGS(n))>( \
- head, ASIO_VARIADIC_BYVAL_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_COMPOSED_IO_EXECUTORS_DEF)
-#undef ASIO_PRIVATE_COMPOSED_IO_EXECUTORS_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename>
- struct composed_work;
-
- template <>
- struct composed_work<void()>
- {
- typedef composed_io_executors<void()> executors_type;
-
- composed_work(const executors_type&) ASIO_NOEXCEPT
- : head_(system_executor())
- {
- }
-
- void reset()
- {
- head_.reset();
- }
-
- typedef system_executor head_type;
- composed_work_guard<system_executor> head_;
- };
-
- template <typename Head>
- struct composed_work<void(Head)>
- {
- typedef composed_io_executors<void(Head)> executors_type;
-
- explicit composed_work(const executors_type& ex) ASIO_NOEXCEPT
- : head_(ex.head_)
- {
- }
-
- void reset()
- {
- head_.reset();
- }
-
- typedef Head head_type;
- composed_work_guard<Head> head_;
- };
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Head, typename... Tail>
- struct composed_work<void(Head, Tail...)>
- {
- typedef composed_io_executors<void(Head, Tail...)> executors_type;
-
- explicit composed_work(const executors_type& ex) ASIO_NOEXCEPT
- : head_(ex.head_),
- tail_(ex.tail_)
- {
- }
-
- void reset()
- {
- head_.reset();
- tail_.reset();
- }
-
- typedef Head head_type;
- composed_work_guard<Head> head_;
- composed_work<void(Tail...)> tail_;
- };
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_COMPOSED_WORK_DEF(n) \
- template <typename Head, ASIO_VARIADIC_TPARAMS(n)> \
- struct composed_work<void(Head, ASIO_VARIADIC_TARGS(n))> \
- { \
- typedef composed_io_executors<void(Head, \
- ASIO_VARIADIC_TARGS(n))> executors_type; \
- \
- explicit composed_work(const executors_type& ex) ASIO_NOEXCEPT \
- : head_(ex.head_), \
- tail_(ex.tail_) \
- { \
- } \
- \
- void reset() \
- { \
- head_.reset(); \
- tail_.reset(); \
- } \
- \
- typedef Head head_type; \
- composed_work_guard<Head> head_; \
- composed_work<void(ASIO_VARIADIC_TARGS(n))> tail_; \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_COMPOSED_WORK_DEF)
-#undef ASIO_PRIVATE_COMPOSED_WORK_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
- 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...)>
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- template <typename Impl, typename Work, typename Handler, typename Signature>
- class composed_op
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- : public base_from_cancellation_state<Handler>
- {
- public:
- template <typename I, typename W, typename H>
- composed_op(ASIO_MOVE_ARG(I) impl,
- ASIO_MOVE_ARG(W) work,
- ASIO_MOVE_ARG(H) handler)
- : base_from_cancellation_state<Handler>(
- handler, enable_terminal_cancellation()),
- impl_(ASIO_MOVE_CAST(I)(impl)),
- work_(ASIO_MOVE_CAST(W)(work)),
- handler_(ASIO_MOVE_CAST(H)(handler)),
- invocations_(0)
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- composed_op(composed_op&& other)
- : base_from_cancellation_state<Handler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- Handler>)(other)),
- impl_(ASIO_MOVE_CAST(Impl)(other.impl_)),
- work_(ASIO_MOVE_CAST(Work)(other.work_)),
- handler_(ASIO_MOVE_CAST(Handler)(other.handler_)),
- invocations_(other.invocations_)
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- typedef typename associated_executor<Handler,
- typename composed_work_guard<
- typename Work::head_type
- >::executor_type
- >::type executor_type;
-
- executor_type get_executor() const ASIO_NOEXCEPT
- {
- return (get_associated_executor)(handler_, work_.head_.get_executor());
- }
-
- typedef typename associated_allocator<Handler,
- std::allocator<void> >::type allocator_type;
-
- allocator_type get_allocator() const ASIO_NOEXCEPT
- {
- return (get_associated_allocator)(handler_, std::allocator<void>());
- }
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template<typename... T>
- void operator()(ASIO_MOVE_ARG(T)... t)
- {
- if (invocations_ < ~0u)
- ++invocations_;
- this->get_cancellation_state().slot().clear();
- impl_(*this, ASIO_MOVE_CAST(T)(t)...);
- }
-
- void complete(Args... args)
- {
- this->work_.reset();
- ASIO_MOVE_OR_LVALUE(Handler)(this->handler_)(
- ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- void operator()()
- {
- if (invocations_ < ~0u)
- ++invocations_;
- this->get_cancellation_state().slot().clear();
- impl_(*this);
- }
-
- void complete()
- {
- this->work_.reset();
- ASIO_MOVE_OR_LVALUE(Handler)(this->handler_)();
- }
-
-#define ASIO_PRIVATE_COMPOSED_OP_DEF(n) \
- template<ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- if (invocations_ < ~0u) \
- ++invocations_; \
- this->get_cancellation_state().slot().clear(); \
- impl_(*this, ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template<ASIO_VARIADIC_TPARAMS(n)> \
- void complete(ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- this->work_.reset(); \
- ASIO_MOVE_OR_LVALUE(Handler)(this->handler_)( \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_COMPOSED_OP_DEF)
-#undef ASIO_PRIVATE_COMPOSED_OP_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- void reset_cancellation_state()
- {
- base_from_cancellation_state<Handler>::reset_cancellation_state(handler_);
- }
-
- template <typename Filter>
- void reset_cancellation_state(ASIO_MOVE_ARG(Filter) filter)
- {
- base_from_cancellation_state<Handler>::reset_cancellation_state(handler_,
- ASIO_MOVE_CAST(Filter)(filter));
- }
-
- template <typename InFilter, typename OutFilter>
- void reset_cancellation_state(ASIO_MOVE_ARG(InFilter) in_filter,
- ASIO_MOVE_ARG(OutFilter) out_filter)
- {
- base_from_cancellation_state<Handler>::reset_cancellation_state(handler_,
- ASIO_MOVE_CAST(InFilter)(in_filter),
- ASIO_MOVE_CAST(OutFilter)(out_filter));
- }
-
- //private:
- Impl impl_;
- Work work_;
- Handler handler_;
- unsigned invocations_;
- };
-
- template <typename Impl, typename Work, typename Handler, typename Signature>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- composed_op<Impl, Work, Handler, Signature>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Impl, typename Work, typename Handler, typename Signature>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- composed_op<Impl, Work, Handler, Signature>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- 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
- : asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename Impl,
- typename Work, typename Handler, typename Signature>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- composed_op<Impl, Work, Handler, Signature>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename Impl,
- typename Work, typename Handler, typename Signature>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- composed_op<Impl, Work, Handler, Signature>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- 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, ASIO_MOVE_ARG(T) executors)
- : executors_(ASIO_MOVE_CAST(T)(executors))
- {
- }
-
- executor_type get_executor() const ASIO_NOEXCEPT
- {
- return executors_.head_;
- }
-
- template <typename Handler, typename Impl>
- void operator()(ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Impl) impl) const
- {
- composed_op<typename decay<Impl>::type, composed_work<Executors>,
- typename decay<Handler>::type, Signature>(
- ASIO_MOVE_CAST(Impl)(impl),
- composed_work<Executors>(executors_),
- ASIO_MOVE_CAST(Handler)(handler))();
- }
-
- private:
- composed_io_executors<Executors> executors_;
- };
-
- template <typename Signature, typename Executors>
- inline initiate_composed_op<Signature, Executors> make_initiate_composed_op(
- ASIO_MOVE_ARG(composed_io_executors<Executors>) executors)
- {
- return initiate_composed_op<Signature, Executors>(0,
- ASIO_MOVE_CAST(composed_io_executors<Executors>)(executors));
- }
-
- template <typename IoObject>
- inline typename IoObject::executor_type
- get_composed_io_executor(IoObject& io_object,
- typename enable_if<
- !is_executor<IoObject>::value
- >::type* = 0,
- typename enable_if<
- !execution::is_executor<IoObject>::value
- >::type* = 0)
- {
- return io_object.get_executor();
- }
-
- template <typename Executor>
- inline const Executor& get_composed_io_executor(const Executor& ex,
- typename enable_if<
- is_executor<Executor>::value
- || execution::is_executor<Executor>::value
- >::type* = 0)
- {
- return ex;
- }
-} // 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,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
- {
- return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
- }
-};
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename CompletionToken, typename Signature,
- typename Implementation, typename... IoObjectsOrExecutors>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, Signature)
-async_compose(ASIO_MOVE_ARG(Implementation) implementation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token,
- ASIO_MOVE_ARG(IoObjectsOrExecutors)... io_objects_or_executors)
-{
- return async_initiate<CompletionToken, Signature>(
- detail::make_initiate_composed_op<Signature>(
- detail::make_composed_io_executors(
- detail::get_composed_io_executor(
- ASIO_MOVE_CAST(IoObjectsOrExecutors)(
- io_objects_or_executors))...)),
- token, ASIO_MOVE_CAST(Implementation)(implementation));
-}
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename CompletionToken, typename Signature, typename Implementation>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, Signature)
-async_compose(ASIO_MOVE_ARG(Implementation) implementation,
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token)
-{
- return async_initiate<CompletionToken, Signature>(
- detail::make_initiate_composed_op<Signature>(
- detail::make_composed_io_executors()),
- token, ASIO_MOVE_CAST(Implementation)(implementation));
-}
-
-# define ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR(n) \
- ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_##n
-
-# define ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_1 \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T1)(x1))
-# define ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_2 \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T1)(x1)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T2)(x2))
-# define ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_3 \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T1)(x1)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T2)(x2)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T3)(x3))
-# define ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_4 \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T1)(x1)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T2)(x2)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T3)(x3)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T4)(x4))
-# define ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_5 \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T1)(x1)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T2)(x2)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T3)(x3)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T4)(x4)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T5)(x5))
-# define ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_6 \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T1)(x1)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T2)(x2)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T3)(x3)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T4)(x4)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T5)(x5)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T6)(x6))
-# define ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_7 \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T1)(x1)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T2)(x2)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T3)(x3)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T4)(x4)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T5)(x5)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T6)(x6)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T7)(x7))
-# define ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_8 \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T1)(x1)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T2)(x2)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T3)(x3)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T4)(x4)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T5)(x5)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T6)(x6)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T7)(x7)), \
- detail::get_composed_io_executor(ASIO_MOVE_CAST(T8)(x8))
-
-#define ASIO_PRIVATE_ASYNC_COMPOSE_DEF(n) \
- template <typename CompletionToken, typename Signature, \
- typename Implementation, ASIO_VARIADIC_TPARAMS(n)> \
- ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, Signature) \
- async_compose(ASIO_MOVE_ARG(Implementation) implementation, \
- ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return async_initiate<CompletionToken, Signature>( \
- detail::make_initiate_composed_op<Signature>( \
- detail::make_composed_io_executors( \
- ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR(n))), \
- token, ASIO_MOVE_CAST(Implementation)(implementation)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ASYNC_COMPOSE_DEF)
-#undef ASIO_PRIVATE_ASYNC_COMPOSE_DEF
-
-#undef ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR
-#undef ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_1
-#undef ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_2
-#undef ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_3
-#undef ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_4
-#undef ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_5
-#undef ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_6
-#undef ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_7
-#undef ASIO_PRIVATE_GET_COMPOSED_IO_EXECUTOR_8
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_COMPOSE_HPP
diff --git a/3rdparty/asio/include/asio/impl/connect.hpp b/3rdparty/asio/include/asio/impl/connect.hpp
index 31ec4e165b4..ac74ae0a782 100644
--- a/3rdparty/asio/include/asio/impl/connect.hpp
+++ b/3rdparty/asio/include/asio/impl/connect.hpp
@@ -2,7 +2,7 @@
// impl/connect.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,13 +19,12 @@
#include "asio/associator.hpp"
#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/non_const_lvalue.hpp"
#include "asio/detail/throw_error.hpp"
+#include "asio/detail/type_traits.hpp"
#include "asio/error.hpp"
#include "asio/post.hpp"
@@ -73,16 +72,16 @@ namespace detail
static const bool value =
sizeof(asio_connect_condition_check(
- (*static_cast<legacy_connect_condition_helper<T, Iterator>*>(0))(
- *static_cast<const asio::error_code*>(0),
- *static_cast<const Iterator*>(0)))) != 1;
+ (declval<legacy_connect_condition_helper<T, Iterator>>())(
+ declval<const asio::error_code>(),
+ declval<const Iterator>()))) != 1;
};
template <typename ConnectCondition, typename Iterator>
inline Iterator call_connect_condition(ConnectCondition& connect_condition,
const asio::error_code& ec, Iterator next, Iterator end,
- typename enable_if<is_legacy_connect_condition<
- ConnectCondition, Iterator>::value>::type* = 0)
+ enable_if_t<is_legacy_connect_condition<
+ ConnectCondition, Iterator>::value>* = 0)
{
if (next != end)
return connect_condition(ec, next);
@@ -92,8 +91,8 @@ namespace detail
template <typename ConnectCondition, typename Iterator>
inline Iterator call_connect_condition(ConnectCondition& connect_condition,
const asio::error_code& ec, Iterator next, Iterator end,
- typename enable_if<!is_legacy_connect_condition<
- ConnectCondition, Iterator>::value>::type* = 0)
+ enable_if_t<!is_legacy_connect_condition<
+ ConnectCondition, Iterator>::value>* = 0)
{
for (;next != end; ++next)
if (connect_condition(ec, *next))
@@ -105,8 +104,7 @@ namespace detail
template <typename Protocol, typename Executor, typename EndpointSequence>
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints,
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
asio::error_code ec;
typename Protocol::endpoint result = connect(s, endpoints, ec);
@@ -117,8 +115,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, asio::error_code& ec,
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
return detail::deref_connect_result<Protocol>(
connect(s, endpoints.begin(), endpoints.end(),
@@ -128,7 +125,7 @@ typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
#if !defined(ASIO_NO_DEPRECATED)
template <typename Protocol, typename Executor, typename Iterator>
Iterator connect(basic_socket<Protocol, Executor>& s, Iterator begin,
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type)
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
asio::error_code ec;
Iterator result = connect(s, begin, ec);
@@ -139,7 +136,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, asio::error_code& ec,
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type)
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
return connect(s, begin, Iterator(), detail::default_connect_condition(), ec);
}
@@ -166,8 +163,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,
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
asio::error_code ec;
typename Protocol::endpoint result = connect(
@@ -181,8 +177,7 @@ template <typename Protocol, typename Executor,
typename Protocol::endpoint connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
asio::error_code& ec,
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type)
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
{
return detail::deref_connect_result<Protocol>(
connect(s, endpoints.begin(), endpoints.end(),
@@ -194,7 +189,7 @@ template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition>
Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, ConnectCondition connect_condition,
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type)
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
asio::error_code ec;
Iterator result = connect(s, begin, connect_condition, ec);
@@ -207,7 +202,7 @@ template <typename Protocol, typename Executor,
inline Iterator connect(basic_socket<Protocol, Executor>& s,
Iterator begin, ConnectCondition connect_condition,
asio::error_code& ec,
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type)
+ constraint_t<!is_endpoint_sequence<Iterator>::value>)
{
return connect(s, begin, Iterator(), connect_condition, ec);
}
@@ -310,11 +305,10 @@ namespace detail
endpoints_(endpoints),
index_(0),
start_(0),
- handler_(ASIO_MOVE_CAST(RangeConnectHandler)(handler))
+ handler_(static_cast<RangeConnectHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
range_connect_op(const range_connect_op& other)
: base_from_cancellation_state<RangeConnectHandler>(other),
base_from_connect_condition<ConnectCondition>(other),
@@ -328,17 +322,16 @@ namespace detail
range_connect_op(range_connect_op&& other)
: base_from_cancellation_state<RangeConnectHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- RangeConnectHandler>)(other)),
+ static_cast<base_from_cancellation_state<RangeConnectHandler>&&>(
+ other)),
base_from_connect_condition<ConnectCondition>(other),
socket_(other.socket_),
endpoints_(other.endpoints_),
index_(other.index_),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(RangeConnectHandler)(other.handler_))
+ handler_(static_cast<RangeConnectHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec, int start = 0)
{
@@ -368,7 +361,7 @@ namespace detail
socket_.close(ec);
ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_connect"));
socket_.async_connect(*iter,
- ASIO_MOVE_CAST(range_connect_op)(*this));
+ static_cast<range_connect_op&&>(*this));
return;
}
@@ -378,7 +371,7 @@ namespace detail
ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_connect"));
asio::post(socket_.get_executor(),
detail::bind_handler(
- ASIO_MOVE_CAST(range_connect_op)(*this), ec));
+ static_cast<range_connect_op&&>(*this), ec));
return;
}
@@ -406,7 +399,7 @@ namespace detail
++index_;
}
- ASIO_MOVE_OR_LVALUE(RangeConnectHandler)(handler_)(
+ static_cast<RangeConnectHandler&&>(handler_)(
static_cast<const asio::error_code&>(ec),
static_cast<const typename Protocol::endpoint&>(
ec || iter == end ? typename Protocol::endpoint() : *iter));
@@ -422,36 +415,6 @@ namespace detail
template <typename Protocol, typename Executor, typename EndpointSequence,
typename ConnectCondition, typename RangeConnectHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- range_connect_op<Protocol, Executor, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Protocol, typename Executor, typename EndpointSequence,
- typename ConnectCondition, typename RangeConnectHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- range_connect_op<Protocol, Executor, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Protocol, typename Executor, typename EndpointSequence,
- typename ConnectCondition, typename RangeConnectHandler>
inline bool asio_handler_is_continuation(
range_connect_op<Protocol, Executor, EndpointSequence,
ConnectCondition, RangeConnectHandler>* this_handler)
@@ -460,36 +423,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename Executor, typename Protocol,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- range_connect_op<Protocol, Executor, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename Executor, typename Protocol,
- typename EndpointSequence, typename ConnectCondition,
- typename RangeConnectHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- range_connect_op<Protocol, Executor, EndpointSequence,
- ConnectCondition, RangeConnectHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename Protocol, typename Executor>
class initiate_async_range_connect
{
@@ -501,14 +434,14 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return socket_.get_executor();
}
template <typename RangeConnectHandler,
typename EndpointSequence, typename ConnectCondition>
- void operator()(ASIO_MOVE_ARG(RangeConnectHandler) handler,
+ void operator()(RangeConnectHandler&& handler,
const EndpointSequence& endpoints,
const ConnectCondition& connect_condition) const
{
@@ -520,7 +453,7 @@ namespace detail
non_const_lvalue<RangeConnectHandler> handler2(handler);
range_connect_op<Protocol, Executor, EndpointSequence, ConnectCondition,
- typename decay<RangeConnectHandler>::type>(socket_, endpoints,
+ decay_t<RangeConnectHandler>>(socket_, endpoints,
connect_condition, handler2.value)(asio::error_code(), 1);
}
@@ -546,11 +479,10 @@ namespace detail
iter_(begin),
end_(end),
start_(0),
- handler_(ASIO_MOVE_CAST(IteratorConnectHandler)(handler))
+ handler_(static_cast<IteratorConnectHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
iterator_connect_op(const iterator_connect_op& other)
: base_from_cancellation_state<IteratorConnectHandler>(other),
base_from_connect_condition<ConnectCondition>(other),
@@ -564,17 +496,16 @@ namespace detail
iterator_connect_op(iterator_connect_op&& other)
: base_from_cancellation_state<IteratorConnectHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- IteratorConnectHandler>)(other)),
+ static_cast<base_from_cancellation_state<IteratorConnectHandler>&&>(
+ other)),
base_from_connect_condition<ConnectCondition>(other),
socket_(other.socket_),
iter_(other.iter_),
end_(other.end_),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(IteratorConnectHandler)(other.handler_))
+ handler_(static_cast<IteratorConnectHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec, int start = 0)
{
@@ -590,7 +521,7 @@ namespace detail
socket_.close(ec);
ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_connect"));
socket_.async_connect(*iter_,
- ASIO_MOVE_CAST(iterator_connect_op)(*this));
+ static_cast<iterator_connect_op&&>(*this));
return;
}
@@ -600,7 +531,7 @@ namespace detail
ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_connect"));
asio::post(socket_.get_executor(),
detail::bind_handler(
- ASIO_MOVE_CAST(iterator_connect_op)(*this), ec));
+ static_cast<iterator_connect_op&&>(*this), ec));
return;
}
@@ -627,7 +558,7 @@ namespace detail
++iter_;
}
- ASIO_MOVE_OR_LVALUE(IteratorConnectHandler)(handler_)(
+ static_cast<IteratorConnectHandler&&>(handler_)(
static_cast<const asio::error_code&>(ec),
static_cast<const Iterator&>(iter_));
}
@@ -643,36 +574,6 @@ namespace detail
template <typename Protocol, typename Executor, typename Iterator,
typename ConnectCondition, typename IteratorConnectHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- iterator_connect_op<Protocol, Executor, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Protocol, typename Executor, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- iterator_connect_op<Protocol, Executor, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Protocol, typename Executor, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
inline bool asio_handler_is_continuation(
iterator_connect_op<Protocol, Executor, Iterator,
ConnectCondition, IteratorConnectHandler>* this_handler)
@@ -681,36 +582,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename Executor, typename Protocol,
- typename Iterator, typename ConnectCondition,
- typename IteratorConnectHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- iterator_connect_op<Protocol, Executor, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename Executor, typename Protocol,
- typename Iterator, typename ConnectCondition,
- typename IteratorConnectHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- iterator_connect_op<Protocol, Executor, Iterator,
- ConnectCondition, IteratorConnectHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename Protocol, typename Executor>
class initiate_async_iterator_connect
{
@@ -723,14 +594,14 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return socket_.get_executor();
}
template <typename IteratorConnectHandler,
typename Iterator, typename ConnectCondition>
- void operator()(ASIO_MOVE_ARG(IteratorConnectHandler) handler,
+ void operator()(IteratorConnectHandler&& handler,
Iterator begin, Iterator end,
const ConnectCondition& connect_condition) const
{
@@ -742,7 +613,7 @@ namespace detail
non_const_lvalue<IteratorConnectHandler> handler2(handler);
iterator_connect_op<Protocol, Executor, Iterator, ConnectCondition,
- typename decay<IteratorConnectHandler>::type>(socket_, begin, end,
+ decay_t<IteratorConnectHandler>>(socket_, begin, end,
connect_condition, handler2.value)(asio::error_code(), 1);
}
@@ -764,9 +635,19 @@ struct associator<Associator,
: Associator<RangeConnectHandler, DefaultCandidate>
{
static typename Associator<RangeConnectHandler, DefaultCandidate>::type get(
+ const detail::range_connect_op<Protocol, Executor, EndpointSequence,
+ ConnectCondition, RangeConnectHandler>& h) noexcept
+ {
+ return Associator<RangeConnectHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
const detail::range_connect_op<Protocol, Executor,
EndpointSequence, ConnectCondition, RangeConnectHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(
+ Associator<RangeConnectHandler, DefaultCandidate>::get(
+ h.handler_, c))
{
return Associator<RangeConnectHandler, DefaultCandidate>::get(
h.handler_, c);
@@ -784,10 +665,20 @@ struct associator<Associator,
: Associator<IteratorConnectHandler, DefaultCandidate>
{
static typename Associator<IteratorConnectHandler, DefaultCandidate>::type
- get(
+ get(const detail::iterator_connect_op<Protocol, Executor, Iterator,
+ ConnectCondition, IteratorConnectHandler>& h) noexcept
+ {
+ return Associator<IteratorConnectHandler, DefaultCandidate>::get(
+ h.handler_);
+ }
+
+ static auto get(
const detail::iterator_connect_op<Protocol, Executor,
Iterator, ConnectCondition, IteratorConnectHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(
+ Associator<IteratorConnectHandler, DefaultCandidate>::get(
+ h.handler_, c))
{
return Associator<IteratorConnectHandler, DefaultCandidate>::get(
h.handler_, c);
@@ -798,103 +689,117 @@ struct associator<Associator,
template <typename Protocol, typename Executor, typename EndpointSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- typename Protocol::endpoint)) RangeConnectHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol, Executor>& s,
- const EndpointSequence& endpoints,
- ASIO_MOVE_ARG(RangeConnectHandler) handler,
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type)
+ 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 (asio::error_code, typename Protocol::endpoint)>(
+ declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
+ token, endpoints, declval<detail::default_connect_condition>()))
{
- return async_initiate<RangeConnectHandler,
+ return async_initiate<RangeConnectToken,
void (asio::error_code, typename Protocol::endpoint)>(
detail::initiate_async_range_connect<Protocol, Executor>(s),
- handler, endpoints, detail::default_connect_condition());
+ token, endpoints, detail::default_connect_condition());
}
#if !defined(ASIO_NO_DEPRECATED)
template <typename Protocol, typename Executor, typename Iterator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- Iterator)) IteratorConnectHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler,
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type)
+ 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 (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, Iterator(), declval<detail::default_connect_condition>()))
{
- return async_initiate<IteratorConnectHandler,
+ return async_initiate<IteratorConnectToken,
void (asio::error_code, Iterator)>(
detail::initiate_async_iterator_connect<Protocol, Executor>(s),
- handler, begin, Iterator(), detail::default_connect_condition());
+ token, begin, Iterator(), detail::default_connect_condition());
}
#endif // !defined(ASIO_NO_DEPRECATED)
template <typename Protocol, typename Executor, typename Iterator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- Iterator)) IteratorConnectHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, Executor>& s, Iterator begin, Iterator end,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler)
+ Iterator)) IteratorConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
+ Iterator begin, Iterator end, IteratorConnectToken&& token)
+ -> decltype(
+ async_initiate<IteratorConnectToken,
+ void (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, end, declval<detail::default_connect_condition>()))
{
- return async_initiate<IteratorConnectHandler,
+ return async_initiate<IteratorConnectToken,
void (asio::error_code, Iterator)>(
detail::initiate_async_iterator_connect<Protocol, Executor>(s),
- handler, begin, end, detail::default_connect_condition());
+ token, begin, end, detail::default_connect_condition());
}
template <typename Protocol, typename Executor,
typename EndpointSequence, typename ConnectCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- typename Protocol::endpoint)) RangeConnectHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(RangeConnectHandler,
- void (asio::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol, Executor>& s,
+ typename Protocol::endpoint)) RangeConnectToken>
+inline auto async_connect(basic_socket<Protocol, Executor>& s,
const EndpointSequence& endpoints, ConnectCondition connect_condition,
- ASIO_MOVE_ARG(RangeConnectHandler) handler,
- typename constraint<is_endpoint_sequence<
- EndpointSequence>::value>::type)
+ RangeConnectToken&& token,
+ constraint_t<is_endpoint_sequence<EndpointSequence>::value>)
+ -> decltype(
+ async_initiate<RangeConnectToken,
+ void (asio::error_code, typename Protocol::endpoint)>(
+ declval<detail::initiate_async_range_connect<Protocol, Executor>>(),
+ token, endpoints, connect_condition))
{
- return async_initiate<RangeConnectHandler,
+ return async_initiate<RangeConnectToken,
void (asio::error_code, typename Protocol::endpoint)>(
detail::initiate_async_range_connect<Protocol, Executor>(s),
- handler, endpoints, connect_condition);
+ token, endpoints, connect_condition);
}
#if !defined(ASIO_NO_DEPRECATED)
template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- Iterator)) IteratorConnectHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
- ConnectCondition connect_condition,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler,
- typename constraint<!is_endpoint_sequence<Iterator>::value>::type)
+ 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 (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, Iterator(), connect_condition))
{
- return async_initiate<IteratorConnectHandler,
+ return async_initiate<IteratorConnectToken,
void (asio::error_code, Iterator)>(
detail::initiate_async_iterator_connect<Protocol, Executor>(s),
- handler, begin, Iterator(), connect_condition);
+ token, begin, Iterator(), connect_condition);
}
#endif // !defined(ASIO_NO_DEPRECATED)
template <typename Protocol, typename Executor,
typename Iterator, typename ConnectCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- Iterator)) IteratorConnectHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler,
- void (asio::error_code, Iterator))
-async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
- Iterator end, ConnectCondition connect_condition,
- ASIO_MOVE_ARG(IteratorConnectHandler) handler)
+ 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 (asio::error_code, Iterator)>(
+ declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+ token, begin, end, connect_condition))
{
- return async_initiate<IteratorConnectHandler,
+ return async_initiate<IteratorConnectToken,
void (asio::error_code, Iterator)>(
detail::initiate_async_iterator_connect<Protocol, Executor>(s),
- handler, begin, end, connect_condition);
+ token, begin, end, connect_condition);
}
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/connect_pipe.hpp b/3rdparty/asio/include/asio/impl/connect_pipe.hpp
new file mode 100644
index 00000000000..e40b3c9433c
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/connect_pipe.hpp
@@ -0,0 +1,73 @@
+//
+// impl/connect_pipe.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 ASIO_IMPL_CONNECT_PIPE_HPP
+#define ASIO_IMPL_CONNECT_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE)
+
+#include "asio/connect_pipe.hpp"
+#include "asio/detail/throw_error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+template <typename Executor1, typename Executor2>
+void connect_pipe(basic_readable_pipe<Executor1>& read_end,
+ basic_writable_pipe<Executor2>& write_end)
+{
+ asio::error_code ec;
+ asio::connect_pipe(read_end, write_end, ec);
+ asio::detail::throw_error(ec, "connect_pipe");
+}
+
+template <typename Executor1, typename Executor2>
+ASIO_SYNC_OP_VOID connect_pipe(basic_readable_pipe<Executor1>& read_end,
+ basic_writable_pipe<Executor2>& write_end, asio::error_code& ec)
+{
+ detail::native_pipe_handle p[2];
+ detail::create_pipe(p, ec);
+ if (ec)
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+
+ read_end.assign(p[0], ec);
+ if (ec)
+ {
+ detail::close_pipe(p[0]);
+ detail::close_pipe(p[1]);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ write_end.assign(p[1], ec);
+ if (ec)
+ {
+ asio::error_code temp_ec;
+ read_end.close(temp_ec);
+ detail::close_pipe(p[1]);
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_PIPE)
+
+#endif // ASIO_IMPL_CONNECT_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/impl/connect_pipe.ipp b/3rdparty/asio/include/asio/impl/connect_pipe.ipp
new file mode 100644
index 00000000000..6efe790d713
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/connect_pipe.ipp
@@ -0,0 +1,149 @@
+//
+// impl/connect_pipe.ipp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2021 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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 ASIO_IMPL_CONNECT_PIPE_IPP
+#define ASIO_IMPL_CONNECT_PIPE_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE)
+
+#include "asio/connect_pipe.hpp"
+
+#if defined(ASIO_HAS_IOCP)
+# include <cstdio>
+# if _WIN32_WINNT >= 0x601
+# include <bcrypt.h>
+# if !defined(ASIO_NO_DEFAULT_LINKED_LIBS)
+# if defined(_MSC_VER)
+# pragma comment(lib, "bcrypt.lib")
+# endif // defined(_MSC_VER)
+# endif // !defined(ASIO_NO_DEFAULT_LINKED_LIBS)
+# endif // _WIN32_WINNT >= 0x601
+#else // defined(ASIO_HAS_IOCP)
+# include "asio/detail/descriptor_ops.hpp"
+#endif // defined(ASIO_HAS_IOCP)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+void create_pipe(native_pipe_handle p[2], asio::error_code& ec)
+{
+#if defined(ASIO_HAS_IOCP)
+ using namespace std; // For sprintf and memcmp.
+
+ static long counter1 = 0;
+ static long counter2 = 0;
+
+ long n1 = ::InterlockedIncrement(&counter1);
+ long n2 = (static_cast<unsigned long>(n1) % 0x10000000) == 0
+ ? ::InterlockedIncrement(&counter2)
+ : ::InterlockedExchangeAdd(&counter2, 0);
+
+ wchar_t pipe_name[128];
+#if defined(ASIO_HAS_SECURE_RTL)
+ swprintf_s(
+#else // defined(ASIO_HAS_SECURE_RTL)
+ _snwprintf(
+#endif // defined(ASIO_HAS_SECURE_RTL)
+ pipe_name, 128,
+ L"\\\\.\\pipe\\asio-A0812896-741A-484D-AF23-BE51BF620E22-%u-%ld-%ld",
+ static_cast<unsigned int>(::GetCurrentProcessId()), n1, n2);
+
+ p[0] = ::CreateNamedPipeW(pipe_name,
+ PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED,
+ 0, 1, 8192, 8192, 0, 0);
+
+ if (p[0] == INVALID_HANDLE_VALUE)
+ {
+ DWORD last_error = ::GetLastError();
+ ec.assign(last_error, asio::error::get_system_category());
+ return;
+ }
+
+ p[1] = ::CreateFileW(pipe_name, GENERIC_WRITE, 0,
+ 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
+
+ if (p[1] == INVALID_HANDLE_VALUE)
+ {
+ DWORD last_error = ::GetLastError();
+ ::CloseHandle(p[0]);
+ ec.assign(last_error, asio::error::get_system_category());
+ return;
+ }
+
+# if _WIN32_WINNT >= 0x601
+ unsigned char nonce[16];
+ if (::BCryptGenRandom(0, nonce, sizeof(nonce),
+ BCRYPT_USE_SYSTEM_PREFERRED_RNG) != 0)
+ {
+ ec = asio::error::connection_aborted;
+ ::CloseHandle(p[0]);
+ ::CloseHandle(p[1]);
+ return;
+ }
+
+ DWORD bytes_written = 0;
+ BOOL ok = ::WriteFile(p[1], nonce, sizeof(nonce), &bytes_written, 0);
+ if (!ok || bytes_written != sizeof(nonce))
+ {
+ ec = asio::error::connection_aborted;
+ ::CloseHandle(p[0]);
+ ::CloseHandle(p[1]);
+ return;
+ }
+
+ unsigned char nonce_check[sizeof(nonce)];
+ DWORD bytes_read = 0;
+ ok = ::ReadFile(p[0], nonce_check, sizeof(nonce), &bytes_read, 0);
+ if (!ok || bytes_read != sizeof(nonce)
+ || memcmp(nonce, nonce_check, sizeof(nonce)) != 0)
+ {
+ ec = asio::error::connection_aborted;
+ ::CloseHandle(p[0]);
+ ::CloseHandle(p[1]);
+ return;
+ }
+#endif // _WIN32_WINNT >= 0x601
+
+ asio::error::clear(ec);
+#else // defined(ASIO_HAS_IOCP)
+ int result = ::pipe(p);
+ detail::descriptor_ops::get_last_error(ec, result != 0);
+#endif // defined(ASIO_HAS_IOCP)
+}
+
+void close_pipe(native_pipe_handle p)
+{
+#if defined(ASIO_HAS_IOCP)
+ ::CloseHandle(p);
+#else // defined(ASIO_HAS_IOCP)
+ asio::error_code ignored_ec;
+ detail::descriptor_ops::state_type state = 0;
+ detail::descriptor_ops::close(p, state, ignored_ec);
+#endif // defined(ASIO_HAS_IOCP)
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_PIPE)
+
+#endif // ASIO_IMPL_CONNECT_PIPE_IPP
diff --git a/3rdparty/asio/include/asio/impl/consign.hpp b/3rdparty/asio/include/asio/impl/consign.hpp
new file mode 100644
index 00000000000..3b753c10fd0
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/consign.hpp
@@ -0,0 +1,137 @@
+//
+// impl/consign.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 ASIO_IMPL_CONSIGN_HPP
+#define ASIO_IMPL_CONSIGN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Class to adapt a consign_t as a completion handler.
+template <typename Handler, typename... Values>
+class consign_handler
+{
+public:
+ typedef void result_type;
+
+ template <typename H>
+ consign_handler(H&& handler, std::tuple<Values...> values)
+ : handler_(static_cast<H&&>(handler)),
+ values_(static_cast<std::tuple<Values...>&&>(values))
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ static_cast<Handler&&>(handler_)(static_cast<Args&&>(args)...);
+ }
+
+//private:
+ Handler handler_;
+ std::tuple<Values...> values_;
+};
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ consign_handler<Handler>* this_handler)
+{
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename... Values, typename... Signatures>
+struct async_result<consign_t<CompletionToken, Values...>, Signatures...>
+ : async_result<CompletionToken, Signatures...>
+{
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler,
+ std::tuple<Values...> values, Args&&... args)
+ {
+ 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>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<CompletionToken, Signatures...>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...))
+ {
+ return async_initiate<CompletionToken, Signatures...>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_, static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename... Values, typename DefaultCandidate>
+struct associator<Associator,
+ detail::consign_handler<Handler, Values...>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::consign_handler<Handler, Values...>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::consign_handler<Handler, Values...>& 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)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_CONSIGN_HPP
diff --git a/3rdparty/asio/include/asio/impl/defer.hpp b/3rdparty/asio/include/asio/impl/defer.hpp
deleted file mode 100644
index 129d8684a94..00000000000
--- a/3rdparty/asio/include/asio/impl/defer.hpp
+++ /dev/null
@@ -1,256 +0,0 @@
-//
-// impl/defer.hpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_IMPL_DEFER_HPP
-#define ASIO_IMPL_DEFER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
-#include "asio/detail/work_dispatcher.hpp"
-#include "asio/execution/allocator.hpp"
-#include "asio/execution/blocking.hpp"
-#include "asio/execution/relationship.hpp"
-#include "asio/prefer.hpp"
-#include "asio/require.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class initiate_defer
-{
-public:
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- execution::is_executor<
- typename associated_executor<
- typename decay<CompletionHandler>::type
- >::type
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_executor<handler_t>::type ex(
- (get_associated_executor)(handler));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- execution::execute(
- asio::prefer(
- asio::require(ex, execution::blocking.never),
- execution::relationship.continuation,
- execution::allocator(alloc)),
- asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)));
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- !execution::is_executor<
- typename associated_executor<
- typename decay<CompletionHandler>::type
- >::type
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_executor<handler_t>::type ex(
- (get_associated_executor)(handler));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- ex.defer(asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)), alloc);
- }
-};
-
-template <typename Executor>
-class initiate_defer_with_executor
-{
-public:
- typedef Executor executor_type;
-
- explicit initiate_defer_with_executor(const Executor& ex)
- : ex_(ex)
- {
- }
-
- executor_type get_executor() const ASIO_NOEXCEPT
- {
- return ex_;
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- !detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- execution::execute(
- asio::prefer(
- asio::require(ex_, execution::blocking.never),
- execution::relationship.continuation,
- execution::allocator(alloc)),
- asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)));
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typedef typename associated_executor<
- handler_t, Executor>::type handler_ex_t;
- handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- execution::execute(
- asio::prefer(
- asio::require(ex_, execution::blocking.never),
- execution::relationship.continuation,
- execution::allocator(alloc)),
- detail::work_dispatcher<handler_t, handler_ex_t>(
- ASIO_MOVE_CAST(CompletionHandler)(handler), handler_ex));
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- !execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- !detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- ex_.defer(asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)), alloc);
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- !execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typedef typename associated_executor<
- handler_t, Executor>::type handler_ex_t;
- handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- ex_.defer(detail::work_dispatcher<handler_t, handler_ex_t>(
- ASIO_MOVE_CAST(CompletionHandler)(handler),
- handler_ex), alloc);
- }
-
-private:
- Executor ex_;
-};
-
-} // namespace detail
-
-template <ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) defer(
- ASIO_MOVE_ARG(CompletionToken) token)
-{
- return async_initiate<CompletionToken, void()>(
- detail::initiate_defer(), token);
-}
-
-template <typename Executor,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) defer(
- const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
- typename constraint<
- execution::is_executor<Executor>::value || is_executor<Executor>::value
- >::type)
-{
- return async_initiate<CompletionToken, void()>(
- detail::initiate_defer_with_executor<Executor>(ex), token);
-}
-
-template <typename ExecutionContext,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) defer(
- ExecutionContext& ctx, ASIO_MOVE_ARG(CompletionToken) token,
- typename constraint<is_convertible<
- ExecutionContext&, execution_context&>::value>::type)
-{
- return async_initiate<CompletionToken, void()>(
- detail::initiate_defer_with_executor<
- typename ExecutionContext::executor_type>(
- ctx.get_executor()), token);
-}
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_DEFER_HPP
diff --git a/3rdparty/asio/include/asio/impl/deferred.hpp b/3rdparty/asio/include/asio/impl/deferred.hpp
new file mode 100644
index 00000000000..defc34fb3e7
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/deferred.hpp
@@ -0,0 +1,147 @@
+//
+// impl/deferred.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 ASIO_IMPL_DEFERRED_HPP
+#define ASIO_IMPL_DEFERRED_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename Signature>
+class async_result<deferred_t, Signature>
+{
+public:
+ template <typename Initiation, typename... InitArgs>
+ static deferred_async_operation<Signature, Initiation, InitArgs...>
+ initiate(Initiation&& initiation, deferred_t, InitArgs&&... args)
+ {
+ return deferred_async_operation<Signature, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(args)...);
+ }
+};
+
+template <typename... Signatures>
+class async_result<deferred_t, Signatures...>
+{
+public:
+ template <typename Initiation, typename... InitArgs>
+ static deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>
+ initiate(Initiation&& initiation, deferred_t, InitArgs&&... args)
+ {
+ return deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(args)...);
+ }
+};
+
+template <typename Function, typename Signature>
+class async_result<deferred_function<Function>, Signature>
+{
+public:
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation&& initiation,
+ deferred_function<Function> token, InitArgs&&... init_args)
+ -> decltype(
+ deferred_sequence<
+ deferred_async_operation<
+ Signature, Initiation, InitArgs...>,
+ Function>(deferred_init_tag{},
+ deferred_async_operation<
+ Signature, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(init_args)...),
+ static_cast<Function&&>(token.function_)))
+ {
+ return deferred_sequence<
+ deferred_async_operation<
+ Signature, Initiation, InitArgs...>,
+ Function>(deferred_init_tag{},
+ deferred_async_operation<
+ Signature, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(init_args)...),
+ static_cast<Function&&>(token.function_));
+ }
+};
+
+template <typename Function, typename... Signatures>
+class async_result<deferred_function<Function>, Signatures...>
+{
+public:
+ template <typename Initiation, typename... InitArgs>
+ static auto initiate(Initiation&& initiation,
+ deferred_function<Function> token, InitArgs&&... init_args)
+ -> decltype(
+ deferred_sequence<
+ deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>,
+ Function>(deferred_init_tag{},
+ deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(init_args)...),
+ static_cast<Function&&>(token.function_)))
+ {
+ return deferred_sequence<
+ deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>,
+ Function>(deferred_init_tag{},
+ deferred_async_operation<
+ deferred_signatures<Signatures...>, Initiation, InitArgs...>(
+ deferred_init_tag{},
+ static_cast<Initiation&&>(initiation),
+ static_cast<InitArgs&&>(init_args)...),
+ static_cast<Function&&>(token.function_));
+ }
+};
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename Tail, typename DefaultCandidate>
+struct associator<Associator,
+ detail::deferred_sequence_handler<Handler, Tail>,
+ DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::deferred_sequence_handler<Handler, Tail>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::deferred_sequence_handler<Handler, Tail>& 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)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_DEFERRED_HPP
diff --git a/3rdparty/asio/include/asio/impl/detached.hpp b/3rdparty/asio/include/asio/impl/detached.hpp
index f159b1ffbaa..774e52b1e01 100644
--- a/3rdparty/asio/include/asio/impl/detached.hpp
+++ b/3rdparty/asio/include/asio/impl/detached.hpp
@@ -2,7 +2,7 @@
// impl/detached.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,7 +17,6 @@
#include "asio/detail/config.hpp"
#include "asio/async_result.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/detail/push_options.hpp"
@@ -34,29 +33,10 @@ namespace detail {
{
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... Args>
void operator()(Args...)
{
}
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- void operator()()
- {
- }
-
-#define ASIO_PRIVATE_DETACHED_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(ASIO_VARIADIC_TARGS(n)) \
- { \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_DETACHED_DEF)
-#undef ASIO_PRIVATE_DETACHED_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
};
} // namespace detail
@@ -78,47 +58,14 @@ struct async_result<detached_t, Signature>
{
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Initiation, typename RawCompletionToken, typename... Args>
- static return_type initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken),
- ASIO_MOVE_ARG(Args)... args)
+ static return_type initiate(Initiation&& initiation,
+ RawCompletionToken&&, Args&&... args)
{
- ASIO_MOVE_CAST(Initiation)(initiation)(
+ static_cast<Initiation&&>(initiation)(
detail::detached_handler(detached_t()),
- ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Initiation, typename RawCompletionToken>
- static return_type initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken))
- {
- ASIO_MOVE_CAST(Initiation)(initiation)(
- detail::detached_handler(detached_t()));
+ static_cast<Args&&>(args)...);
}
-
-#define ASIO_PRIVATE_INITIATE_DEF(n) \
- template <typename Initiation, typename RawCompletionToken, \
- ASIO_VARIADIC_TPARAMS(n)> \
- static return_type initiate( \
- ASIO_MOVE_ARG(Initiation) initiation, \
- ASIO_MOVE_ARG(RawCompletionToken), \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- ASIO_MOVE_CAST(Initiation)(initiation)( \
- detail::detached_handler(detached_t()), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INITIATE_DEF)
-#undef ASIO_PRIVATE_INITIATE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
};
#endif // !defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/impl/dispatch.hpp b/3rdparty/asio/include/asio/impl/dispatch.hpp
deleted file mode 100644
index b602f6fcf41..00000000000
--- a/3rdparty/asio/include/asio/impl/dispatch.hpp
+++ /dev/null
@@ -1,251 +0,0 @@
-//
-// impl/dispatch.hpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_IMPL_DISPATCH_HPP
-#define ASIO_IMPL_DISPATCH_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
-#include "asio/detail/work_dispatcher.hpp"
-#include "asio/execution/allocator.hpp"
-#include "asio/execution/blocking.hpp"
-#include "asio/prefer.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class initiate_dispatch
-{
-public:
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- execution::is_executor<
- typename associated_executor<
- typename decay<CompletionHandler>::type
- >::type
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_executor<handler_t>::type ex(
- (get_associated_executor)(handler));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- execution::execute(
- asio::prefer(ex,
- execution::blocking.possibly,
- execution::allocator(alloc)),
- asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)));
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- !execution::is_executor<
- typename associated_executor<
- typename decay<CompletionHandler>::type
- >::type
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_executor<handler_t>::type ex(
- (get_associated_executor)(handler));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- ex.dispatch(asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)), alloc);
- }
-};
-
-template <typename Executor>
-class initiate_dispatch_with_executor
-{
-public:
- typedef Executor executor_type;
-
- explicit initiate_dispatch_with_executor(const Executor& ex)
- : ex_(ex)
- {
- }
-
- executor_type get_executor() const ASIO_NOEXCEPT
- {
- return ex_;
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- !detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- execution::execute(
- asio::prefer(ex_,
- execution::blocking.possibly,
- execution::allocator(alloc)),
- asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)));
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typedef typename associated_executor<
- handler_t, Executor>::type handler_ex_t;
- handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- execution::execute(
- asio::prefer(ex_,
- execution::blocking.possibly,
- execution::allocator(alloc)),
- detail::work_dispatcher<handler_t, handler_ex_t>(
- ASIO_MOVE_CAST(CompletionHandler)(handler), handler_ex));
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- !execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- !detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- ex_.dispatch(asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)), alloc);
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- !execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typedef typename associated_executor<
- handler_t, Executor>::type handler_ex_t;
- handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- ex_.dispatch(detail::work_dispatcher<handler_t, handler_ex_t>(
- ASIO_MOVE_CAST(CompletionHandler)(handler),
- handler_ex), alloc);
- }
-
-private:
- Executor ex_;
-};
-
-} // namespace detail
-
-template <ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch(
- ASIO_MOVE_ARG(CompletionToken) token)
-{
- return async_initiate<CompletionToken, void()>(
- detail::initiate_dispatch(), token);
-}
-
-template <typename Executor,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch(
- const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
- typename constraint<
- execution::is_executor<Executor>::value || is_executor<Executor>::value
- >::type)
-{
- return async_initiate<CompletionToken, void()>(
- detail::initiate_dispatch_with_executor<Executor>(ex), token);
-}
-
-template <typename ExecutionContext,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch(
- ExecutionContext& ctx, ASIO_MOVE_ARG(CompletionToken) token,
- typename constraint<is_convertible<
- ExecutionContext&, execution_context&>::value>::type)
-{
- return async_initiate<CompletionToken, void()>(
- detail::initiate_dispatch_with_executor<
- typename ExecutionContext::executor_type>(
- ctx.get_executor()), token);
-}
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_DISPATCH_HPP
diff --git a/3rdparty/asio/include/asio/impl/error.ipp b/3rdparty/asio/include/asio/impl/error.ipp
index 1dbb408f240..b564a8c68e2 100644
--- a/3rdparty/asio/include/asio/impl/error.ipp
+++ b/3rdparty/asio/include/asio/impl/error.ipp
@@ -2,7 +2,7 @@
// impl/error.ipp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -31,7 +31,7 @@ namespace detail {
class netdb_category : public asio::error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.netdb";
}
@@ -63,7 +63,7 @@ namespace detail {
class addrinfo_category : public asio::error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.addrinfo";
}
@@ -93,7 +93,7 @@ namespace detail {
class misc_category : public asio::error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.misc";
}
diff --git a/3rdparty/asio/include/asio/impl/error_code.ipp b/3rdparty/asio/include/asio/impl/error_code.ipp
index 8c2253051dd..caeb1967caa 100644
--- a/3rdparty/asio/include/asio/impl/error_code.ipp
+++ b/3rdparty/asio/include/asio/impl/error_code.ipp
@@ -2,7 +2,7 @@
// impl/error_code.ipp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -37,7 +37,7 @@ namespace detail {
class system_category : public error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.system";
}
@@ -108,7 +108,7 @@ public:
#if defined(ASIO_HAS_STD_ERROR_CODE)
std::error_condition default_error_condition(
- int ev) const ASIO_ERROR_CATEGORY_NOEXCEPT
+ int ev) const noexcept
{
switch (ev)
{
diff --git a/3rdparty/asio/include/asio/impl/execution_context.hpp b/3rdparty/asio/include/asio/impl/execution_context.hpp
index ddbb99deba3..35dda80417f 100644
--- a/3rdparty/asio/include/asio/impl/execution_context.hpp
+++ b/3rdparty/asio/include/asio/impl/execution_context.hpp
@@ -2,7 +2,7 @@
// impl/execution_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -34,49 +34,17 @@ inline Service& use_service(execution_context& e)
return e.service_registry_->template use_service<Service>();
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Service, typename... Args>
-Service& make_service(execution_context& e, ASIO_MOVE_ARG(Args)... args)
+Service& make_service(execution_context& e, Args&&... args)
{
detail::scoped_ptr<Service> svc(
- new Service(e, ASIO_MOVE_CAST(Args)(args)...));
+ new Service(e, static_cast<Args&&>(args)...));
e.service_registry_->template add_service<Service>(svc.get());
Service& result = *svc;
svc.release();
return result;
}
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Service>
-Service& make_service(execution_context& e)
-{
- detail::scoped_ptr<Service> svc(new Service(e));
- e.service_registry_->template add_service<Service>(svc.get());
- Service& result = *svc;
- svc.release();
- return result;
-}
-
-#define ASIO_PRIVATE_MAKE_SERVICE_DEF(n) \
- template <typename Service, ASIO_VARIADIC_TPARAMS(n)> \
- Service& make_service(execution_context& e, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- detail::scoped_ptr<Service> svc( \
- new Service(e, ASIO_VARIADIC_MOVE_ARGS(n))); \
- e.service_registry_->template add_service<Service>(svc.get()); \
- Service& result = *svc; \
- svc.release(); \
- return result; \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_MAKE_SERVICE_DEF)
-#undef ASIO_PRIVATE_MAKE_SERVICE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Service>
inline void add_service(execution_context& e, Service* svc)
{
diff --git a/3rdparty/asio/include/asio/impl/execution_context.ipp b/3rdparty/asio/include/asio/impl/execution_context.ipp
index 21adf8ef6ff..ed2603c9011 100644
--- a/3rdparty/asio/include/asio/impl/execution_context.ipp
+++ b/3rdparty/asio/include/asio/impl/execution_context.ipp
@@ -2,7 +2,7 @@
// impl/execution_context.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/impl/executor.hpp b/3rdparty/asio/include/asio/impl/executor.hpp
index 3b473f32c1c..8bf76ccd183 100644
--- a/3rdparty/asio/include/asio/impl/executor.hpp
+++ b/3rdparty/asio/include/asio/impl/executor.hpp
@@ -2,7 +2,7 @@
// impl/executor.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,6 +19,7 @@
#if !defined(ASIO_NO_TS_EXECUTORS)
+#include <new>
#include "asio/detail/atomic_count.hpp"
#include "asio/detail/global.hpp"
#include "asio/detail/memory.hpp"
@@ -47,7 +48,12 @@ public:
return p;
}
- impl(const Executor& e, const Allocator& a) ASIO_NOEXCEPT
+ static impl_base* create(std::nothrow_t, const Executor& e) noexcept
+ {
+ return new (std::nothrow) impl(e, std::allocator<void>());
+ }
+
+ impl(const Executor& e, const Allocator& a) noexcept
: impl_base(false),
ref_count_(1),
executor_(e),
@@ -55,13 +61,13 @@ public:
{
}
- impl_base* clone() const ASIO_NOEXCEPT
+ impl_base* clone() const noexcept
{
detail::ref_count_up(ref_count_);
return const_cast<impl_base*>(static_cast<const impl_base*>(this));
}
- void destroy() ASIO_NOEXCEPT
+ void destroy() noexcept
{
if (detail::ref_count_down(ref_count_))
{
@@ -72,52 +78,52 @@ public:
}
}
- void on_work_started() ASIO_NOEXCEPT
+ void on_work_started() noexcept
{
executor_.on_work_started();
}
- void on_work_finished() ASIO_NOEXCEPT
+ void on_work_finished() noexcept
{
executor_.on_work_finished();
}
- execution_context& context() ASIO_NOEXCEPT
+ execution_context& context() noexcept
{
return executor_.context();
}
- void dispatch(ASIO_MOVE_ARG(function) f)
+ void dispatch(function&& f)
{
- executor_.dispatch(ASIO_MOVE_CAST(function)(f), allocator_);
+ executor_.dispatch(static_cast<function&&>(f), allocator_);
}
- void post(ASIO_MOVE_ARG(function) f)
+ void post(function&& f)
{
- executor_.post(ASIO_MOVE_CAST(function)(f), allocator_);
+ executor_.post(static_cast<function&&>(f), allocator_);
}
- void defer(ASIO_MOVE_ARG(function) f)
+ void defer(function&& f)
{
- executor_.defer(ASIO_MOVE_CAST(function)(f), allocator_);
+ executor_.defer(static_cast<function&&>(f), allocator_);
}
- type_id_result_type target_type() const ASIO_NOEXCEPT
+ type_id_result_type target_type() const noexcept
{
return type_id<Executor>();
}
- void* target() ASIO_NOEXCEPT
+ void* target() noexcept
{
return &executor_;
}
- const void* target() const ASIO_NOEXCEPT
+ const void* target() const noexcept
{
return &executor_;
}
- bool equals(const impl_base* e) const ASIO_NOEXCEPT
+ bool equals(const impl_base* e) const noexcept
{
if (this == e)
return true;
@@ -164,7 +170,12 @@ public:
static impl_base* create(const system_executor&,
const Allocator& = Allocator())
{
- return &detail::global<impl<system_executor, std::allocator<void> > >();
+ return &detail::global<impl<system_executor, std::allocator<void>> >();
+ }
+
+ static impl_base* create(std::nothrow_t, const system_executor&) noexcept
+ {
+ return &detail::global<impl<system_executor, std::allocator<void>> >();
}
impl()
@@ -172,64 +183,64 @@ public:
{
}
- impl_base* clone() const ASIO_NOEXCEPT
+ impl_base* clone() const noexcept
{
return const_cast<impl_base*>(static_cast<const impl_base*>(this));
}
- void destroy() ASIO_NOEXCEPT
+ void destroy() noexcept
{
}
- void on_work_started() ASIO_NOEXCEPT
+ void on_work_started() noexcept
{
executor_.on_work_started();
}
- void on_work_finished() ASIO_NOEXCEPT
+ void on_work_finished() noexcept
{
executor_.on_work_finished();
}
- execution_context& context() ASIO_NOEXCEPT
+ execution_context& context() noexcept
{
return executor_.context();
}
- void dispatch(ASIO_MOVE_ARG(function) f)
+ void dispatch(function&& f)
{
- executor_.dispatch(ASIO_MOVE_CAST(function)(f),
+ executor_.dispatch(static_cast<function&&>(f),
std::allocator<void>());
}
- void post(ASIO_MOVE_ARG(function) f)
+ void post(function&& f)
{
- executor_.post(ASIO_MOVE_CAST(function)(f),
+ executor_.post(static_cast<function&&>(f),
std::allocator<void>());
}
- void defer(ASIO_MOVE_ARG(function) f)
+ void defer(function&& f)
{
- executor_.defer(ASIO_MOVE_CAST(function)(f),
+ executor_.defer(static_cast<function&&>(f),
std::allocator<void>());
}
- type_id_result_type target_type() const ASIO_NOEXCEPT
+ type_id_result_type target_type() const noexcept
{
return type_id<system_executor>();
}
- void* target() ASIO_NOEXCEPT
+ void* target() noexcept
{
return &executor_;
}
- const void* target() const ASIO_NOEXCEPT
+ const void* target() const noexcept
{
return &executor_;
}
- bool equals(const impl_base* e) const ASIO_NOEXCEPT
+ bool equals(const impl_base* e) const noexcept
{
return this == e;
}
@@ -240,7 +251,13 @@ private:
template <typename Executor>
executor::executor(Executor e)
- : impl_(impl<Executor, std::allocator<void> >::create(e))
+ : impl_(impl<Executor, std::allocator<void>>::create(e))
+{
+}
+
+template <typename Executor>
+executor::executor(std::nothrow_t, Executor e) noexcept
+ : impl_(impl<Executor, std::allocator<void>>::create(std::nothrow, e))
{
}
@@ -251,39 +268,39 @@ executor::executor(allocator_arg_t, const Allocator& a, Executor e)
}
template <typename Function, typename Allocator>
-void executor::dispatch(ASIO_MOVE_ARG(Function) f,
+void executor::dispatch(Function&& f,
const Allocator& a) const
{
impl_base* i = get_impl();
if (i->fast_dispatch_)
- system_executor().dispatch(ASIO_MOVE_CAST(Function)(f), a);
+ system_executor().dispatch(static_cast<Function&&>(f), a);
else
- i->dispatch(function(ASIO_MOVE_CAST(Function)(f), a));
+ i->dispatch(function(static_cast<Function&&>(f), a));
}
template <typename Function, typename Allocator>
-void executor::post(ASIO_MOVE_ARG(Function) f,
+void executor::post(Function&& f,
const Allocator& a) const
{
- get_impl()->post(function(ASIO_MOVE_CAST(Function)(f), a));
+ get_impl()->post(function(static_cast<Function&&>(f), a));
}
template <typename Function, typename Allocator>
-void executor::defer(ASIO_MOVE_ARG(Function) f,
+void executor::defer(Function&& f,
const Allocator& a) const
{
- get_impl()->defer(function(ASIO_MOVE_CAST(Function)(f), a));
+ get_impl()->defer(function(static_cast<Function&&>(f), a));
}
template <typename Executor>
-Executor* executor::target() ASIO_NOEXCEPT
+Executor* executor::target() noexcept
{
return impl_ && impl_->target_type() == type_id<Executor>()
? static_cast<Executor*>(impl_->target()) : 0;
}
template <typename Executor>
-const Executor* executor::target() const ASIO_NOEXCEPT
+const Executor* executor::target() const noexcept
{
return impl_ && impl_->target_type() == type_id<Executor>()
? static_cast<Executor*>(impl_->target()) : 0;
diff --git a/3rdparty/asio/include/asio/impl/executor.ipp b/3rdparty/asio/include/asio/impl/executor.ipp
index 393f79249c5..4153a171e09 100644
--- a/3rdparty/asio/include/asio/impl/executor.ipp
+++ b/3rdparty/asio/include/asio/impl/executor.ipp
@@ -2,7 +2,7 @@
// impl/executor.ipp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -25,11 +25,11 @@
namespace asio {
-bad_executor::bad_executor() ASIO_NOEXCEPT
+bad_executor::bad_executor() noexcept
{
}
-const char* bad_executor::what() const ASIO_NOEXCEPT_OR_NOTHROW
+const char* bad_executor::what() const noexcept
{
return "bad executor";
}
diff --git a/3rdparty/asio/include/asio/impl/handler_alloc_hook.ipp b/3rdparty/asio/include/asio/impl/handler_alloc_hook.ipp
deleted file mode 100644
index 531002b318e..00000000000
--- a/3rdparty/asio/include/asio/impl/handler_alloc_hook.ipp
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// impl/handler_alloc_hook.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP
-#define ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/memory.hpp"
-#include "asio/detail/thread_context.hpp"
-#include "asio/detail/thread_info_base.hpp"
-#include "asio/handler_alloc_hook.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-
-asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size, ...)
-{
-#if defined(ASIO_NO_DEPRECATED)
- (void)size;
- return asio_handler_allocate_is_no_longer_used();
-#elif !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- return detail::thread_info_base::allocate(
- detail::thread_context::top_of_thread_call_stack(), size);
-#else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- return aligned_new(ASIO_DEFAULT_ALIGN, size);
-#endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
-}
-
-asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size, ...)
-{
-#if defined(ASIO_NO_DEPRECATED)
- (void)pointer;
- (void)size;
- return asio_handler_deallocate_is_no_longer_used();
-#elif !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- detail::thread_info_base::deallocate(
- detail::thread_context::top_of_thread_call_stack(), pointer, size);
-#else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
- (void)size;
- aligned_delete(pointer)
-#endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING)
-}
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP
diff --git a/3rdparty/asio/include/asio/impl/io_context.hpp b/3rdparty/asio/include/asio/impl/io_context.hpp
index 7e624844aa8..002b585502d 100644
--- a/3rdparty/asio/include/asio/impl/io_context.hpp
+++ b/3rdparty/asio/include/asio/impl/io_context.hpp
@@ -2,7 +2,7 @@
// impl/io_context.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -50,13 +50,11 @@ inline detail::io_context_impl& use_service<detail::io_context_impl>(
#endif // !defined(GENERATING_DOCUMENTATION)
inline io_context::executor_type
-io_context::get_executor() ASIO_NOEXCEPT
+io_context::get_executor() noexcept
{
return executor_type(*this);
}
-#if defined(ASIO_HAS_CHRONO)
-
template <typename Rep, typename Period>
std::size_t io_context::run_for(
const chrono::duration<Rep, Period>& rel_time)
@@ -108,8 +106,6 @@ std::size_t io_context::run_one_until(
return 0;
}
-#endif // defined(ASIO_HAS_CHRONO)
-
#if !defined(ASIO_NO_DEPRECATED)
inline void io_context::reset()
@@ -120,7 +116,7 @@ inline void io_context::reset()
struct io_context::initiate_dispatch
{
template <typename LegacyCompletionHandler>
- void operator()(ASIO_MOVE_ARG(LegacyCompletionHandler) handler,
+ void operator()(LegacyCompletionHandler&& handler,
io_context* self) const
{
// If you get an error on the following line it means that your handler does
@@ -132,14 +128,13 @@ struct io_context::initiate_dispatch
if (self->impl_.can_dispatch())
{
detail::fenced_block b(detail::fenced_block::full);
- asio_handler_invoke_helpers::invoke(
- handler2.value, handler2.value);
+ static_cast<decay_t<LegacyCompletionHandler>&&>(handler2.value)();
}
else
{
// Allocate and construct an operation to wrap the handler.
typedef detail::completion_handler<
- typename decay<LegacyCompletionHandler>::type, executor_type> op;
+ decay_t<LegacyCompletionHandler>, executor_type> op;
typename op::ptr p = { detail::addressof(handler2.value),
op::ptr::allocate(handler2.value), 0 };
p.p = new (p.v) op(handler2.value, self->get_executor());
@@ -154,8 +149,10 @@ struct io_context::initiate_dispatch
};
template <typename LegacyCompletionHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(LegacyCompletionHandler, void ())
-io_context::dispatch(ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
+auto io_context::dispatch(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_dispatch>(), handler, this))
{
return async_initiate<LegacyCompletionHandler, void ()>(
initiate_dispatch(), handler, this);
@@ -164,7 +161,7 @@ io_context::dispatch(ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
struct io_context::initiate_post
{
template <typename LegacyCompletionHandler>
- void operator()(ASIO_MOVE_ARG(LegacyCompletionHandler) handler,
+ void operator()(LegacyCompletionHandler&& handler,
io_context* self) const
{
// If you get an error on the following line it means that your handler does
@@ -179,7 +176,7 @@ struct io_context::initiate_post
// Allocate and construct an operation to wrap the handler.
typedef detail::completion_handler<
- typename decay<LegacyCompletionHandler>::type, executor_type> op;
+ decay_t<LegacyCompletionHandler>, executor_type> op;
typename op::ptr p = { detail::addressof(handler2.value),
op::ptr::allocate(handler2.value), 0 };
p.p = new (p.v) op(handler2.value, self->get_executor());
@@ -193,8 +190,10 @@ struct io_context::initiate_post
};
template <typename LegacyCompletionHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(LegacyCompletionHandler, void ())
-io_context::post(ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
+auto io_context::post(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_post>(), handler, this))
{
return async_initiate<LegacyCompletionHandler, void ()>(
initiate_post(), handler, this);
@@ -213,21 +212,20 @@ io_context::wrap(Handler handler)
#endif // !defined(ASIO_NO_DEPRECATED)
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
io_context::basic_executor_type<Allocator, Bits>&
io_context::basic_executor_type<Allocator, Bits>::operator=(
- const basic_executor_type& other) ASIO_NOEXCEPT
+ const basic_executor_type& other) noexcept
{
if (this != &other)
{
- io_context* old_io_context = io_context_;
- io_context_ = other.io_context_;
- allocator_ = other.allocator_;
- bits_ = other.bits_;
+ static_cast<Allocator&>(*this) = static_cast<const Allocator&>(other);
+ io_context* old_io_context = context_ptr();
+ target_ = other.target_;
if (Bits & outstanding_work_tracked)
{
- if (io_context_)
- io_context_->impl_.work_started();
+ if (context_ptr())
+ context_ptr()->impl_.work_started();
if (old_io_context)
old_io_context->impl_.work_finished();
}
@@ -235,122 +233,117 @@ io_context::basic_executor_type<Allocator, Bits>::operator=(
return *this;
}
-#if defined(ASIO_HAS_MOVE)
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
io_context::basic_executor_type<Allocator, Bits>&
io_context::basic_executor_type<Allocator, Bits>::operator=(
- basic_executor_type&& other) ASIO_NOEXCEPT
+ basic_executor_type&& other) noexcept
{
if (this != &other)
{
- io_context* old_io_context = io_context_;
- io_context_ = other.io_context_;
- allocator_ = std::move(other.allocator_);
- bits_ = other.bits_;
+ static_cast<Allocator&>(*this) = static_cast<Allocator&&>(other);
+ io_context* old_io_context = context_ptr();
+ target_ = other.target_;
if (Bits & outstanding_work_tracked)
{
- other.io_context_ = 0;
+ other.target_ = 0;
if (old_io_context)
old_io_context->impl_.work_finished();
}
}
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
inline bool io_context::basic_executor_type<Allocator,
- Bits>::running_in_this_thread() const ASIO_NOEXCEPT
+ Bits>::running_in_this_thread() const noexcept
{
- return io_context_->impl_.can_dispatch();
+ return context_ptr()->impl_.can_dispatch();
}
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
template <typename Function>
void io_context::basic_executor_type<Allocator, Bits>::execute(
- ASIO_MOVE_ARG(Function) f) const
+ Function&& f) const
{
- typedef typename decay<Function>::type function_type;
+ typedef decay_t<Function> function_type;
// Invoke immediately if the blocking.possibly property is enabled and we are
// already inside the thread pool.
- if ((bits_ & blocking_never) == 0 && io_context_->impl_.can_dispatch())
+ if ((bits() & blocking_never) == 0 && context_ptr()->impl_.can_dispatch())
{
// Make a local, non-const copy of the function.
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
+ function_type tmp(static_cast<Function&&>(f));
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR) \
- && !defined(ASIO_NO_EXCEPTIONS)
+#if !defined(ASIO_NO_EXCEPTIONS)
try
{
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- // && !defined(ASIO_NO_EXCEPTIONS)
+#endif // !defined(ASIO_NO_EXCEPTIONS)
detail::fenced_block b(detail::fenced_block::full);
- asio_handler_invoke_helpers::invoke(tmp, tmp);
+ static_cast<function_type&&>(tmp)();
return;
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR) \
- && !defined(ASIO_NO_EXCEPTIONS)
+#if !defined(ASIO_NO_EXCEPTIONS)
}
catch (...)
{
- io_context_->impl_.capture_current_exception();
+ context_ptr()->impl_.capture_current_exception();
return;
}
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- // && !defined(ASIO_NO_EXCEPTIONS)
+#endif // !defined(ASIO_NO_EXCEPTIONS)
}
// Allocate and construct an operation to wrap the function.
typedef detail::executor_op<function_type, Allocator, detail::operation> op;
- typename op::ptr p = { detail::addressof(allocator_),
- op::ptr::allocate(allocator_), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), allocator_);
+ typename op::ptr p = {
+ detail::addressof(static_cast<const Allocator&>(*this)),
+ op::ptr::allocate(static_cast<const Allocator&>(*this)), 0 };
+ p.p = new (p.v) op(static_cast<Function&&>(f),
+ static_cast<const Allocator&>(*this));
- ASIO_HANDLER_CREATION((*io_context_, *p.p,
- "io_context", io_context_, 0, "execute"));
+ ASIO_HANDLER_CREATION((*context_ptr(), *p.p,
+ "io_context", context_ptr(), 0, "execute"));
- io_context_->impl_.post_immediate_completion(p.p,
- (bits_ & relationship_continuation) != 0);
+ context_ptr()->impl_.post_immediate_completion(p.p,
+ (bits() & relationship_continuation) != 0);
p.v = p.p = 0;
}
#if !defined(ASIO_NO_TS_EXECUTORS)
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
inline io_context& io_context::basic_executor_type<
- Allocator, Bits>::context() const ASIO_NOEXCEPT
+ Allocator, Bits>::context() const noexcept
{
- return *io_context_;
+ return *context_ptr();
}
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
inline void io_context::basic_executor_type<Allocator,
- Bits>::on_work_started() const ASIO_NOEXCEPT
+ Bits>::on_work_started() const noexcept
{
- io_context_->impl_.work_started();
+ context_ptr()->impl_.work_started();
}
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
inline void io_context::basic_executor_type<Allocator,
- Bits>::on_work_finished() const ASIO_NOEXCEPT
+ Bits>::on_work_finished() const noexcept
{
- io_context_->impl_.work_finished();
+ context_ptr()->impl_.work_finished();
}
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
template <typename Function, typename OtherAllocator>
void io_context::basic_executor_type<Allocator, Bits>::dispatch(
- ASIO_MOVE_ARG(Function) f, const OtherAllocator& a) const
+ Function&& f, const OtherAllocator& a) const
{
- typedef typename decay<Function>::type function_type;
+ typedef decay_t<Function> function_type;
// Invoke immediately if we are already inside the thread pool.
- if (io_context_->impl_.can_dispatch())
+ if (context_ptr()->impl_.can_dispatch())
{
// Make a local, non-const copy of the function.
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
+ function_type tmp(static_cast<Function&&>(f));
detail::fenced_block b(detail::fenced_block::full);
- asio_handler_invoke_helpers::invoke(tmp, tmp);
+ static_cast<function_type&&>(tmp)();
return;
}
@@ -358,52 +351,48 @@ void io_context::basic_executor_type<Allocator, Bits>::dispatch(
typedef detail::executor_op<function_type,
OtherAllocator, detail::operation> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), a);
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
- ASIO_HANDLER_CREATION((*io_context_, *p.p,
- "io_context", io_context_, 0, "dispatch"));
+ ASIO_HANDLER_CREATION((*context_ptr(), *p.p,
+ "io_context", context_ptr(), 0, "dispatch"));
- io_context_->impl_.post_immediate_completion(p.p, false);
+ context_ptr()->impl_.post_immediate_completion(p.p, false);
p.v = p.p = 0;
}
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
template <typename Function, typename OtherAllocator>
void io_context::basic_executor_type<Allocator, Bits>::post(
- ASIO_MOVE_ARG(Function) f, const OtherAllocator& a) const
+ Function&& f, const OtherAllocator& a) const
{
- typedef typename decay<Function>::type function_type;
-
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type,
+ typedef detail::executor_op<decay_t<Function>,
OtherAllocator, detail::operation> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), a);
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
- ASIO_HANDLER_CREATION((*io_context_, *p.p,
- "io_context", io_context_, 0, "post"));
+ ASIO_HANDLER_CREATION((*context_ptr(), *p.p,
+ "io_context", context_ptr(), 0, "post"));
- io_context_->impl_.post_immediate_completion(p.p, false);
+ context_ptr()->impl_.post_immediate_completion(p.p, false);
p.v = p.p = 0;
}
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
template <typename Function, typename OtherAllocator>
void io_context::basic_executor_type<Allocator, Bits>::defer(
- ASIO_MOVE_ARG(Function) f, const OtherAllocator& a) const
+ Function&& f, const OtherAllocator& a) const
{
- typedef typename decay<Function>::type function_type;
-
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type,
+ typedef detail::executor_op<decay_t<Function>,
OtherAllocator, detail::operation> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), a);
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
- ASIO_HANDLER_CREATION((*io_context_, *p.p,
- "io_context", io_context_, 0, "defer"));
+ ASIO_HANDLER_CREATION((*context_ptr(), *p.p,
+ "io_context", context_ptr(), 0, "defer"));
- io_context_->impl_.post_immediate_completion(p.p, true);
+ context_ptr()->impl_.post_immediate_completion(p.p, true);
p.v = p.p = 0;
}
#endif // !defined(ASIO_NO_TS_EXECUTORS)
diff --git a/3rdparty/asio/include/asio/impl/io_context.ipp b/3rdparty/asio/include/asio/impl/io_context.ipp
index 3eb2b4576e5..14c8736c7b2 100644
--- a/3rdparty/asio/include/asio/impl/io_context.ipp
+++ b/3rdparty/asio/include/asio/impl/io_context.ipp
@@ -2,7 +2,7 @@
// impl/io_context.ipp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -54,6 +54,7 @@ io_context::impl_type& io_context::add_impl(io_context::impl_type* impl)
io_context::~io_context()
{
+ shutdown();
}
io_context::count_type io_context::run()
diff --git a/3rdparty/asio/include/asio/impl/multiple_exceptions.ipp b/3rdparty/asio/include/asio/impl/multiple_exceptions.ipp
index fd2177f1f07..c922c27a055 100644
--- a/3rdparty/asio/include/asio/impl/multiple_exceptions.ipp
+++ b/3rdparty/asio/include/asio/impl/multiple_exceptions.ipp
@@ -2,7 +2,7 @@
// impl/multiple_exceptions.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,15 +22,13 @@
namespace asio {
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR)
-
multiple_exceptions::multiple_exceptions(
- std::exception_ptr first) ASIO_NOEXCEPT
- : first_(ASIO_MOVE_CAST(std::exception_ptr)(first))
+ std::exception_ptr first) noexcept
+ : first_(static_cast<std::exception_ptr&&>(first))
{
}
-const char* multiple_exceptions::what() const ASIO_NOEXCEPT_OR_NOTHROW
+const char* multiple_exceptions::what() const noexcept
{
return "multiple exceptions";
}
@@ -40,8 +38,6 @@ std::exception_ptr multiple_exceptions::first_exception() const
return first_;
}
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/impl/post.hpp b/3rdparty/asio/include/asio/impl/post.hpp
deleted file mode 100644
index ec96a6cb903..00000000000
--- a/3rdparty/asio/include/asio/impl/post.hpp
+++ /dev/null
@@ -1,256 +0,0 @@
-//
-// impl/post.hpp
-// ~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_IMPL_POST_HPP
-#define ASIO_IMPL_POST_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/associated_allocator.hpp"
-#include "asio/associated_executor.hpp"
-#include "asio/detail/work_dispatcher.hpp"
-#include "asio/execution/allocator.hpp"
-#include "asio/execution/blocking.hpp"
-#include "asio/execution/relationship.hpp"
-#include "asio/prefer.hpp"
-#include "asio/require.hpp"
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace detail {
-
-class initiate_post
-{
-public:
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- execution::is_executor<
- typename associated_executor<
- typename decay<CompletionHandler>::type
- >::type
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_executor<handler_t>::type ex(
- (get_associated_executor)(handler));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- execution::execute(
- asio::prefer(
- asio::require(ex, execution::blocking.never),
- execution::relationship.fork,
- execution::allocator(alloc)),
- asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)));
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- !execution::is_executor<
- typename associated_executor<
- typename decay<CompletionHandler>::type
- >::type
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_executor<handler_t>::type ex(
- (get_associated_executor)(handler));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- ex.post(asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)), alloc);
- }
-};
-
-template <typename Executor>
-class initiate_post_with_executor
-{
-public:
- typedef Executor executor_type;
-
- explicit initiate_post_with_executor(const Executor& ex)
- : ex_(ex)
- {
- }
-
- executor_type get_executor() const ASIO_NOEXCEPT
- {
- return ex_;
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- !detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- execution::execute(
- asio::prefer(
- asio::require(ex_, execution::blocking.never),
- execution::relationship.fork,
- execution::allocator(alloc)),
- asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)));
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typedef typename associated_executor<
- handler_t, Executor>::type handler_ex_t;
- handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- execution::execute(
- asio::prefer(
- asio::require(ex_, execution::blocking.never),
- execution::relationship.fork,
- execution::allocator(alloc)),
- detail::work_dispatcher<handler_t, handler_ex_t>(
- ASIO_MOVE_CAST(CompletionHandler)(handler), handler_ex));
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- !execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- !detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- ex_.post(asio::detail::bind_handler(
- ASIO_MOVE_CAST(CompletionHandler)(handler)), alloc);
- }
-
- template <typename CompletionHandler>
- void operator()(ASIO_MOVE_ARG(CompletionHandler) handler,
- typename enable_if<
- !execution::is_executor<
- typename conditional<true, executor_type, CompletionHandler>::type
- >::value
- >::type* = 0,
- typename enable_if<
- detail::is_work_dispatcher_required<
- typename decay<CompletionHandler>::type,
- Executor
- >::value
- >::type* = 0) const
- {
- typedef typename decay<CompletionHandler>::type handler_t;
-
- typedef typename associated_executor<
- handler_t, Executor>::type handler_ex_t;
- handler_ex_t handler_ex((get_associated_executor)(handler, ex_));
-
- typename associated_allocator<handler_t>::type alloc(
- (get_associated_allocator)(handler));
-
- ex_.post(detail::work_dispatcher<handler_t, handler_ex_t>(
- ASIO_MOVE_CAST(CompletionHandler)(handler),
- handler_ex), alloc);
- }
-
-private:
- Executor ex_;
-};
-
-} // namespace detail
-
-template <ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) post(
- ASIO_MOVE_ARG(CompletionToken) token)
-{
- return async_initiate<CompletionToken, void()>(
- detail::initiate_post(), token);
-}
-
-template <typename Executor,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) post(
- const Executor& ex, ASIO_MOVE_ARG(CompletionToken) token,
- typename constraint<
- execution::is_executor<Executor>::value || is_executor<Executor>::value
- >::type)
-{
- return async_initiate<CompletionToken, void()>(
- detail::initiate_post_with_executor<Executor>(ex), token);
-}
-
-template <typename ExecutionContext,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) post(
- ExecutionContext& ctx, ASIO_MOVE_ARG(CompletionToken) token,
- typename constraint<is_convertible<
- ExecutionContext&, execution_context&>::value>::type)
-{
- return async_initiate<CompletionToken, void()>(
- detail::initiate_post_with_executor<
- typename ExecutionContext::executor_type>(
- ctx.get_executor()), token);
-}
-
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_IMPL_POST_HPP
diff --git a/3rdparty/asio/include/asio/impl/prepend.hpp b/3rdparty/asio/include/asio/impl/prepend.hpp
new file mode 100644
index 00000000000..f336d55d825
--- /dev/null
+++ b/3rdparty/asio/include/asio/impl/prepend.hpp
@@ -0,0 +1,163 @@
+//
+// impl/prepend.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 ASIO_IMPL_PREPEND_HPP
+#define ASIO_IMPL_PREPEND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/associator.hpp"
+#include "asio/async_result.hpp"
+#include "asio/detail/handler_cont_helpers.hpp"
+#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+// Class to adapt a prepend_t as a completion handler.
+template <typename Handler, typename... Values>
+class prepend_handler
+{
+public:
+ typedef void result_type;
+
+ template <typename H>
+ prepend_handler(H&& handler, std::tuple<Values...> values)
+ : handler_(static_cast<H&&>(handler)),
+ values_(static_cast<std::tuple<Values...>&&>(values))
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ this->invoke(
+ index_sequence_for<Values...>{},
+ static_cast<Args&&>(args)...);
+ }
+
+ template <std::size_t... I, typename... Args>
+ void invoke(index_sequence<I...>, Args&&... args)
+ {
+ static_cast<Handler&&>(handler_)(
+ static_cast<Values&&>(std::get<I>(values_))...,
+ static_cast<Args&&>(args)...);
+ }
+
+//private:
+ Handler handler_;
+ std::tuple<Values...> values_;
+};
+
+template <typename Handler>
+inline bool asio_handler_is_continuation(
+ prepend_handler<Handler>* this_handler)
+{
+ return asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+}
+
+template <typename Signature, typename... Values>
+struct prepend_signature;
+
+template <typename R, typename... Args, typename... Values>
+struct prepend_signature<R(Args...), Values...>
+{
+ typedef R type(Values..., decay_t<Args>...);
+};
+
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename CompletionToken, typename... Values, typename Signature>
+struct async_result<
+ prepend_t<CompletionToken, Values...>, Signature>
+ : async_result<CompletionToken,
+ typename detail::prepend_signature<
+ Signature, Values...>::type>
+{
+ typedef typename detail::prepend_signature<
+ Signature, Values...>::type signature;
+
+ template <typename Initiation>
+ struct init_wrapper
+ {
+ init_wrapper(Initiation init)
+ : initiation_(static_cast<Initiation&&>(init))
+ {
+ }
+
+ template <typename Handler, typename... Args>
+ void operator()(Handler&& handler,
+ std::tuple<Values...> values, Args&&... args)
+ {
+ 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>
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<CompletionToken, signature>(
+ declval<init_wrapper<decay_t<Initiation>>>(),
+ token.token_,
+ static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...))
+ {
+ return async_initiate<CompletionToken, signature>(
+ init_wrapper<decay_t<Initiation>>(
+ static_cast<Initiation&&>(initiation)),
+ token.token_,
+ static_cast<std::tuple<Values...>&&>(token.values_),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+template <template <typename, typename> class Associator,
+ typename Handler, typename... Values, typename DefaultCandidate>
+struct associator<Associator,
+ detail::prepend_handler<Handler, Values...>, DefaultCandidate>
+ : Associator<Handler, DefaultCandidate>
+{
+ static typename Associator<Handler, DefaultCandidate>::type get(
+ const detail::prepend_handler<Handler, Values...>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::prepend_handler<Handler, Values...>& 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)
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IMPL_PREPEND_HPP
diff --git a/3rdparty/asio/include/asio/impl/read.hpp b/3rdparty/asio/include/asio/impl/read.hpp
index fb176d4343c..d86fb6467b1 100644
--- a/3rdparty/asio/include/asio/impl/read.hpp
+++ b/3rdparty/asio/include/asio/impl/read.hpp
@@ -2,7 +2,7 @@
// impl/read.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,16 +18,13 @@
#include <algorithm>
#include "asio/associator.hpp"
#include "asio/buffer.hpp"
-#include "asio/completion_condition.hpp"
#include "asio/detail/array_fwd.hpp"
#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/base_from_completion_cond.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/consuming_buffers.hpp"
#include "asio/detail/dependent_type.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/non_const_lvalue.hpp"
@@ -42,7 +39,7 @@ namespace detail
{
template <typename SyncReadStream, typename MutableBufferSequence,
typename MutableBufferIterator, typename CompletionCondition>
- std::size_t read_buffer_sequence(SyncReadStream& s,
+ std::size_t read_buffer_seq(SyncReadStream& s,
const MutableBufferSequence& buffers, const MutableBufferIterator&,
CompletionCondition completion_condition, asio::error_code& ec)
{
@@ -65,20 +62,20 @@ template <typename SyncReadStream, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type)
+ >)
{
- return detail::read_buffer_sequence(s, buffers,
+ return detail::read_buffer_seq(s, buffers,
asio::buffer_sequence_begin(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncReadStream, typename MutableBufferSequence>
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
- typename constraint<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read(s, buffers, transfer_all(), ec);
@@ -89,9 +86,9 @@ inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
template <typename SyncReadStream, typename MutableBufferSequence>
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type)
+ >)
{
return read(s, buffers, transfer_all(), ec);
}
@@ -100,13 +97,13 @@ template <typename SyncReadStream, typename MutableBufferSequence,
typename CompletionCondition>
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
- typename constraint<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read(s, buffers,
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
@@ -116,17 +113,17 @@ inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
template <typename SyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer_v1>::type b(
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
ec = asio::error_code();
std::size_t total_transferred = 0;
@@ -151,52 +148,52 @@ std::size_t read(SyncReadStream& s,
template <typename SyncReadStream, typename DynamicBuffer_v1>
inline std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ DynamicBuffer_v1&& buffers,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read(s,
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), transfer_all(), ec);
+ static_cast<DynamicBuffer_v1&&>(buffers), transfer_all(), ec);
asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
template <typename SyncReadStream, typename DynamicBuffer_v1>
inline std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- return read(s, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ return read(s, static_cast<DynamicBuffer_v1&&>(buffers),
transfer_all(), ec);
}
template <typename SyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition>
inline std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read(s,
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
@@ -211,7 +208,7 @@ inline std::size_t read(SyncReadStream& s,
CompletionCondition completion_condition, asio::error_code& ec)
{
return read(s, basic_streambuf_ref<Allocator>(b),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncReadStream, typename Allocator>
@@ -236,7 +233,7 @@ inline std::size_t read(SyncReadStream& s,
CompletionCondition completion_condition)
{
return read(s, basic_streambuf_ref<Allocator>(b),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ static_cast<CompletionCondition&&>(completion_condition));
}
#endif // !defined(ASIO_NO_IOSTREAM)
@@ -247,9 +244,9 @@ template <typename SyncReadStream, typename DynamicBuffer_v2,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
DynamicBuffer_v2& b = buffers;
@@ -279,13 +276,13 @@ std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
template <typename SyncReadStream, typename DynamicBuffer_v2>
inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read(s,
- ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), transfer_all(), ec);
+ static_cast<DynamicBuffer_v2&&>(buffers), transfer_all(), ec);
asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
@@ -293,11 +290,11 @@ inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
template <typename SyncReadStream, typename DynamicBuffer_v2>
inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
- return read(s, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ return read(s, static_cast<DynamicBuffer_v2&&>(buffers),
transfer_all(), ec);
}
@@ -305,14 +302,14 @@ template <typename SyncReadStream, typename DynamicBuffer_v2,
typename CompletionCondition>
inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read(s,
- ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
@@ -335,11 +332,10 @@ namespace detail
stream_(stream),
buffers_(buffers),
start_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_op(const read_op& other)
: base_from_cancellation_state<ReadHandler>(other),
base_from_completion_cond<CompletionCondition>(other),
@@ -352,18 +348,15 @@ namespace detail
read_op(read_op&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
base_from_completion_cond<CompletionCondition>(
- ASIO_MOVE_CAST(base_from_completion_cond<
- CompletionCondition>)(other)),
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(buffers_type)(other.buffers_)),
+ buffers_(static_cast<buffers_type&&>(other.buffers_)),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -378,7 +371,7 @@ namespace detail
{
ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_read"));
stream_.async_read_some(buffers_.prepare(max_size),
- ASIO_MOVE_CAST(read_op)(*this));
+ static_cast<read_op&&>(*this));
}
return; default:
buffers_.consume(bytes_transferred);
@@ -394,7 +387,7 @@ namespace detail
}
}
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(
+ static_cast<ReadHandler&&>(handler_)(
static_cast<const asio::error_code&>(ec),
static_cast<const std::size_t&>(buffers_.total_consumed()));
}
@@ -413,38 +406,6 @@ namespace detail
template <typename AsyncReadStream, typename MutableBufferSequence,
typename MutableBufferIterator, typename CompletionCondition,
typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename MutableBufferSequence,
- typename MutableBufferIterator, typename CompletionCondition,
- typename ReadHandler>
inline bool asio_handler_is_continuation(
read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
CompletionCondition, ReadHandler>* this_handler)
@@ -454,70 +415,40 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncReadStream,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_op<AsyncReadStream, MutableBufferSequence, MutableBufferIterator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncReadStream, typename MutableBufferSequence,
typename MutableBufferIterator, typename CompletionCondition,
typename ReadHandler>
- inline void start_read_buffer_sequence_op(AsyncReadStream& stream,
+ inline void start_read_op(AsyncReadStream& stream,
const MutableBufferSequence& buffers, const MutableBufferIterator&,
CompletionCondition& completion_condition, ReadHandler& handler)
{
- detail::read_op<AsyncReadStream, MutableBufferSequence,
+ read_op<AsyncReadStream, MutableBufferSequence,
MutableBufferIterator, CompletionCondition, ReadHandler>(
stream, buffers, completion_condition, handler)(
asio::error_code(), 0, 1);
}
template <typename AsyncReadStream>
- class initiate_async_read_buffer_sequence
+ class initiate_async_read
{
public:
typedef typename AsyncReadStream::executor_type executor_type;
- explicit initiate_async_read_buffer_sequence(AsyncReadStream& stream)
+ explicit initiate_async_read(AsyncReadStream& stream)
: stream_(stream)
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence,
typename CompletionCondition>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ CompletionCondition&& completion_cond) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a ReadHandler.
@@ -525,7 +456,7 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
- start_read_buffer_sequence_op(stream_, buffers,
+ start_read_op(stream_, buffers,
asio::buffer_sequence_begin(buffers),
completion_cond2.value, handler2.value);
}
@@ -549,8 +480,16 @@ struct associator<Associator,
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_op<AsyncReadStream, MutableBufferSequence,
+ MutableBufferIterator, CompletionCondition, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_op<AsyncReadStream, MutableBufferSequence,
MutableBufferIterator, CompletionCondition, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -561,37 +500,42 @@ struct associator<Associator,
template <typename AsyncReadStream,
typename MutableBufferSequence, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
+ 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
- >::type)
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read<AsyncReadStream>>(), token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- detail::initiate_async_read_buffer_sequence<AsyncReadStream>(s), handler,
- buffers, ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ detail::initiate_async_read<AsyncReadStream>(s), token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncReadStream, typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s,
+ const MutableBufferSequence& buffers, ReadToken&& token,
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type)
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read<AsyncReadStream>>(),
+ token, buffers, transfer_all()))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- detail::initiate_async_read_buffer_sequence<AsyncReadStream>(s),
- handler, buffers, transfer_all());
+ detail::initiate_async_read<AsyncReadStream>(s),
+ token, buffers, transfer_all());
}
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -607,20 +551,19 @@ namespace detail
public:
template <typename BufferSequence>
read_dynbuf_v1_op(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ BufferSequence&& buffers,
CompletionCondition& completion_condition, ReadHandler& handler)
: base_from_cancellation_state<ReadHandler>(
handler, enable_partial_cancellation()),
base_from_completion_cond<CompletionCondition>(completion_condition),
stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
start_(0),
total_transferred_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_dynbuf_v1_op(const read_dynbuf_v1_op& other)
: base_from_cancellation_state<ReadHandler>(other),
base_from_completion_cond<CompletionCondition>(other),
@@ -634,19 +577,16 @@ namespace detail
read_dynbuf_v1_op(read_dynbuf_v1_op&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
base_from_completion_cond<CompletionCondition>(
- ASIO_MOVE_CAST(base_from_completion_cond<
- CompletionCondition>)(other)),
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
start_(other.start_),
total_transferred_(other.total_transferred_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -666,7 +606,7 @@ namespace detail
{
ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_read"));
stream_.async_read_some(buffers_.prepare(bytes_available),
- ASIO_MOVE_CAST(read_dynbuf_v1_op)(*this));
+ static_cast<read_dynbuf_v1_op&&>(*this));
}
return; default:
total_transferred_ += bytes_transferred;
@@ -686,7 +626,7 @@ namespace detail
}
}
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(
+ static_cast<ReadHandler&&>(handler_)(
static_cast<const asio::error_code&>(ec),
static_cast<const std::size_t&>(total_transferred_));
}
@@ -702,36 +642,6 @@ namespace detail
template <typename AsyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
- CompletionCondition, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v1,
- typename CompletionCondition, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v1,
- typename CompletionCondition, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
CompletionCondition, ReadHandler>* this_handler)
@@ -741,36 +651,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v1, typename CompletionCondition,
- typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v1, typename CompletionCondition,
- typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncReadStream>
class initiate_async_read_dynbuf_v1
{
@@ -782,16 +662,16 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename ReadHandler, typename DynamicBuffer_v1,
typename CompletionCondition>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v1&& buffers,
+ CompletionCondition&& completion_cond) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a ReadHandler.
@@ -799,9 +679,9 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
- read_dynbuf_v1_op<AsyncReadStream, typename decay<DynamicBuffer_v1>::type,
- CompletionCondition, typename decay<ReadHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ read_dynbuf_v1_op<AsyncReadStream, decay_t<DynamicBuffer_v1>,
+ CompletionCondition, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
completion_cond2.value, handler2.value)(
asio::error_code(), 0, 1);
}
@@ -824,9 +704,17 @@ struct associator<Associator,
: Associator<ReadHandler, DefaultCandidate>
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_dynbuf_v1_op<AsyncReadStream, DynamicBuffer_v1,
+ CompletionCondition, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
const detail::read_dynbuf_v1_op<AsyncReadStream,
DynamicBuffer_v1, CompletionCondition, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -836,46 +724,51 @@ struct associator<Associator,
template <typename AsyncReadStream, typename DynamicBuffer_v1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ 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 (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), transfer_all()))
{
- return async_read(s,
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
- transfer_all(), ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::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,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ 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 (asio::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<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_read_dynbuf_v1<AsyncReadStream>(s),
- handler, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
}
#if !defined(ASIO_NO_EXTENSIONS)
@@ -883,29 +776,39 @@ async_read(AsyncReadStream& s,
template <typename AsyncReadStream, typename Allocator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s,
+ basic_streambuf<Allocator>& b, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all()))
{
- return async_read(s, basic_streambuf_ref<Allocator>(b),
- ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::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,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::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_read(s, basic_streambuf_ref<Allocator>(b),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition),
- ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::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(ASIO_NO_IOSTREAM)
@@ -923,21 +826,20 @@ namespace detail
public:
template <typename BufferSequence>
read_dynbuf_v2_op(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ BufferSequence&& buffers,
CompletionCondition& completion_condition, ReadHandler& handler)
: base_from_cancellation_state<ReadHandler>(
handler, enable_partial_cancellation()),
base_from_completion_cond<CompletionCondition>(completion_condition),
stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
start_(0),
total_transferred_(0),
bytes_available_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_dynbuf_v2_op(const read_dynbuf_v2_op& other)
: base_from_cancellation_state<ReadHandler>(other),
base_from_completion_cond<CompletionCondition>(other),
@@ -952,20 +854,17 @@ namespace detail
read_dynbuf_v2_op(read_dynbuf_v2_op&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
base_from_completion_cond<CompletionCondition>(
- ASIO_MOVE_CAST(base_from_completion_cond<
- CompletionCondition>)(other)),
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
start_(other.start_),
total_transferred_(other.total_transferred_),
bytes_available_(other.bytes_available_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -987,7 +886,7 @@ namespace detail
{
ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_read"));
stream_.async_read_some(buffers_.data(pos, bytes_available_),
- ASIO_MOVE_CAST(read_dynbuf_v2_op)(*this));
+ static_cast<read_dynbuf_v2_op&&>(*this));
}
return; default:
total_transferred_ += bytes_transferred;
@@ -1007,7 +906,7 @@ namespace detail
}
}
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(
+ static_cast<ReadHandler&&>(handler_)(
static_cast<const asio::error_code&>(ec),
static_cast<const std::size_t&>(total_transferred_));
}
@@ -1024,36 +923,6 @@ namespace detail
template <typename AsyncReadStream, typename DynamicBuffer_v2,
typename CompletionCondition, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
- CompletionCondition, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v2,
- typename CompletionCondition, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v2,
- typename CompletionCondition, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
CompletionCondition, ReadHandler>* this_handler)
@@ -1063,36 +932,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v2, typename CompletionCondition,
- typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v2, typename CompletionCondition,
- typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncReadStream>
class initiate_async_read_dynbuf_v2
{
@@ -1104,16 +943,16 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename ReadHandler, typename DynamicBuffer_v2,
typename CompletionCondition>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
- ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v2&& buffers,
+ CompletionCondition&& completion_cond) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a ReadHandler.
@@ -1121,9 +960,9 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
- read_dynbuf_v2_op<AsyncReadStream, typename decay<DynamicBuffer_v2>::type,
- CompletionCondition, typename decay<ReadHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ read_dynbuf_v2_op<AsyncReadStream, decay_t<DynamicBuffer_v2>,
+ CompletionCondition, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
completion_cond2.value, handler2.value)(
asio::error_code(), 0, 1);
}
@@ -1146,9 +985,17 @@ struct associator<Associator,
: Associator<ReadHandler, DefaultCandidate>
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
+ const detail::read_dynbuf_v2_op<AsyncReadStream, DynamicBuffer_v2,
+ CompletionCondition, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
const detail::read_dynbuf_v2_op<AsyncReadStream,
DynamicBuffer_v2, CompletionCondition, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -1158,38 +1005,45 @@ struct associator<Associator,
template <typename AsyncReadStream, typename DynamicBuffer_v2,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
+ std::size_t)) ReadToken>
+inline auto async_read(AsyncReadStream& s,
+ DynamicBuffer_v2 buffers, ReadToken&& token,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), transfer_all()))
{
- return async_read(s,
- ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
- transfer_all(), ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::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,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
+ 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
- >::type)
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::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<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_read_dynbuf_v2<AsyncReadStream>(s),
- handler, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
}
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/read_at.hpp b/3rdparty/asio/include/asio/impl/read_at.hpp
index 7d37c4ddfa4..7c668a03f46 100644
--- a/3rdparty/asio/include/asio/impl/read_at.hpp
+++ b/3rdparty/asio/include/asio/impl/read_at.hpp
@@ -2,7 +2,7 @@
// impl/read_at.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,16 +18,13 @@
#include <algorithm>
#include "asio/associator.hpp"
#include "asio/buffer.hpp"
-#include "asio/completion_condition.hpp"
#include "asio/detail/array_fwd.hpp"
#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/base_from_completion_cond.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/consuming_buffers.hpp"
#include "asio/detail/dependent_type.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/non_const_lvalue.hpp"
@@ -73,7 +70,7 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
{
return detail::read_at_buffer_sequence(d, offset, buffers,
asio::buffer_sequence_begin(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
@@ -103,7 +100,7 @@ inline std::size_t read_at(SyncRandomAccessReadDevice& d,
{
asio::error_code ec;
std::size_t bytes_transferred = read_at(d, offset, buffers,
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "read_at");
return bytes_transferred;
}
@@ -162,7 +159,7 @@ inline std::size_t read_at(SyncRandomAccessReadDevice& d,
{
asio::error_code ec;
std::size_t bytes_transferred = read_at(d, offset, b,
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "read_at");
return bytes_transferred;
}
@@ -190,11 +187,10 @@ namespace detail
offset_(offset),
buffers_(buffers),
start_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_at_op(const read_at_op& other)
: base_from_cancellation_state<ReadHandler>(other),
base_from_completion_cond<CompletionCondition>(other),
@@ -208,19 +204,16 @@ namespace detail
read_at_op(read_at_op&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
base_from_completion_cond<CompletionCondition>(
- ASIO_MOVE_CAST(base_from_completion_cond<
- CompletionCondition>)(other)),
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
device_(other.device_),
offset_(other.offset_),
- buffers_(ASIO_MOVE_CAST(buffers_type)(other.buffers_)),
+ buffers_(static_cast<buffers_type&&>(other.buffers_)),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -236,7 +229,7 @@ namespace detail
ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_read_at"));
device_.async_read_some_at(
offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
- ASIO_MOVE_CAST(read_at_op)(*this));
+ static_cast<read_at_op&&>(*this));
}
return; default:
buffers_.consume(bytes_transferred);
@@ -252,7 +245,7 @@ namespace detail
}
}
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(
+ static_cast<ReadHandler&&>(handler_)(
static_cast<const asio::error_code&>(ec),
static_cast<const std::size_t&>(buffers_.total_consumed()));
}
@@ -272,38 +265,6 @@ namespace detail
template <typename AsyncRandomAccessReadDevice,
typename MutableBufferSequence, typename MutableBufferIterator,
typename CompletionCondition, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
@@ -313,40 +274,10 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename MutableBufferSequence, typename MutableBufferIterator,
- typename CompletionCondition, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_at_op<AsyncRandomAccessReadDevice, MutableBufferSequence,
- MutableBufferIterator, CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncRandomAccessReadDevice,
typename MutableBufferSequence, typename MutableBufferIterator,
typename CompletionCondition, typename ReadHandler>
- inline void start_read_at_buffer_sequence_op(AsyncRandomAccessReadDevice& d,
+ inline void start_read_at_op(AsyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
const MutableBufferIterator&, CompletionCondition& completion_condition,
ReadHandler& handler)
@@ -358,27 +289,26 @@ namespace detail
}
template <typename AsyncRandomAccessReadDevice>
- class initiate_async_read_at_buffer_sequence
+ class initiate_async_read_at
{
public:
typedef typename AsyncRandomAccessReadDevice::executor_type executor_type;
- explicit initiate_async_read_at_buffer_sequence(
- AsyncRandomAccessReadDevice& device)
+ explicit initiate_async_read_at(AsyncRandomAccessReadDevice& device)
: device_(device)
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return device_.get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence,
typename CompletionCondition>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
uint64_t offset, const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ CompletionCondition&& completion_cond) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a ReadHandler.
@@ -386,7 +316,7 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
- start_read_at_buffer_sequence_op(device_, offset, buffers,
+ start_read_at_op(device_, offset, buffers,
asio::buffer_sequence_begin(buffers),
completion_cond2.value, handler2.value);
}
@@ -411,8 +341,17 @@ struct associator<Associator,
static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_at_op<AsyncRandomAccessReadDevice,
MutableBufferSequence, MutableBufferIterator,
+ CompletionCondition, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_at_op<AsyncRandomAccessReadDevice,
+ MutableBufferSequence, MutableBufferIterator,
CompletionCondition, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -423,36 +362,39 @@ struct associator<Associator,
template <typename AsyncRandomAccessReadDevice,
typename MutableBufferSequence, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ CompletionCondition completion_condition, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- detail::initiate_async_read_at_buffer_sequence<
- AsyncRandomAccessReadDevice>(d),
- handler, offset, buffers,
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ detail::initiate_async_read_at<AsyncRandomAccessReadDevice>(d),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
+ token, offset, buffers, transfer_all()))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- detail::initiate_async_read_at_buffer_sequence<
- AsyncRandomAccessReadDevice>(d),
- handler, offset, buffers, transfer_all());
+ detail::initiate_async_read_at<AsyncRandomAccessReadDevice>(d),
+ token, offset, buffers, transfer_all());
}
#if !defined(ASIO_NO_EXTENSIONS)
@@ -478,11 +420,10 @@ namespace detail
streambuf_(streambuf),
start_(0),
total_transferred_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_at_streambuf_op(const read_at_streambuf_op& other)
: base_from_cancellation_state<ReadHandler>(other),
base_from_completion_cond<CompletionCondition>(other),
@@ -497,20 +438,17 @@ namespace detail
read_at_streambuf_op(read_at_streambuf_op&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
base_from_completion_cond<CompletionCondition>(
- ASIO_MOVE_CAST(base_from_completion_cond<
- CompletionCondition>)(other)),
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
device_(other.device_),
offset_(other.offset_),
streambuf_(other.streambuf_),
start_(other.start_),
total_transferred_(other.total_transferred_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -527,7 +465,7 @@ namespace detail
ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_read_at"));
device_.async_read_some_at(offset_ + total_transferred_,
streambuf_.prepare(bytes_available),
- ASIO_MOVE_CAST(read_at_streambuf_op)(*this));
+ static_cast<read_at_streambuf_op&&>(*this));
}
return; default:
total_transferred_ += bytes_transferred;
@@ -543,7 +481,7 @@ namespace detail
}
}
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(
+ static_cast<ReadHandler&&>(handler_)(
static_cast<const asio::error_code&>(ec),
static_cast<const std::size_t&>(total_transferred_));
}
@@ -560,36 +498,6 @@ namespace detail
template <typename AsyncRandomAccessReadDevice, typename Allocator,
typename CompletionCondition, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
CompletionCondition, ReadHandler>* this_handler)
@@ -599,34 +507,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename Allocator, typename CompletionCondition, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncRandomAccessReadDevice,
- typename Allocator, typename CompletionCondition, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncRandomAccessReadDevice>
class initiate_async_read_at_streambuf
{
@@ -639,16 +519,16 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return device_.get_executor();
}
template <typename ReadHandler,
typename Allocator, typename CompletionCondition>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
uint64_t offset, basic_streambuf<Allocator>* b,
- ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ CompletionCondition&& completion_cond) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a ReadHandler.
@@ -657,7 +537,7 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
read_at_streambuf_op<AsyncRandomAccessReadDevice, Allocator,
- CompletionCondition, typename decay<ReadHandler>::type>(
+ CompletionCondition, decay_t<ReadHandler>>(
device_, offset, *b, completion_cond2.value, handler2.value)(
asio::error_code(), 0, 1);
}
@@ -681,8 +561,16 @@ struct associator<Associator,
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
+ Executor, CompletionCondition, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_at_streambuf_op<AsyncRandomAccessReadDevice,
Executor, CompletionCondition, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -693,34 +581,41 @@ struct associator<Associator,
template <typename AsyncRandomAccessReadDevice,
typename Allocator, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d,
uint64_t offset, asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ CompletionCondition completion_condition, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at_streambuf<
+ AsyncRandomAccessReadDevice>>(),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_read_at_streambuf<AsyncRandomAccessReadDevice>(d),
- handler, offset, &b,
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncRandomAccessReadDevice, typename Allocator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
- uint64_t offset, asio::basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ std::size_t)) ReadToken>
+inline auto async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
+ asio::basic_streambuf<Allocator>& b, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at_streambuf<
+ AsyncRandomAccessReadDevice>>(),
+ token, offset, &b, transfer_all()))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_read_at_streambuf<AsyncRandomAccessReadDevice>(d),
- handler, offset, &b, transfer_all());
+ token, offset, &b, transfer_all());
}
#endif // !defined(ASIO_NO_IOSTREAM)
diff --git a/3rdparty/asio/include/asio/impl/read_until.hpp b/3rdparty/asio/include/asio/impl/read_until.hpp
index d3a6f259933..7592263723f 100644
--- a/3rdparty/asio/include/asio/impl/read_until.hpp
+++ b/3rdparty/asio/include/asio/impl/read_until.hpp
@@ -2,7 +2,7 @@
// impl/read_until.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -24,9 +24,7 @@
#include "asio/buffers_iterator.hpp"
#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/bind_handler.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/limits.hpp"
@@ -76,34 +74,34 @@ namespace detail
template <typename SyncReadStream, typename DynamicBuffer_v1>
inline std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, char delim,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ DynamicBuffer_v1&& buffers, char delim,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), delim, ec);
+ static_cast<DynamicBuffer_v1&&>(buffers), delim, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
char delim, asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer_v1>::type b(
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
std::size_t search_position = 0;
for (;;)
@@ -149,35 +147,35 @@ std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream, typename DynamicBuffer_v1>
inline std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
ASIO_STRING_VIEW_PARAM delim,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), delim, ec);
+ static_cast<DynamicBuffer_v1&&>(buffers), delim, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
ASIO_STRING_VIEW_PARAM delim, asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer_v1>::type b(
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
std::size_t search_position = 0;
for (;;)
@@ -233,37 +231,48 @@ std::size_t read_until(SyncReadStream& s,
#if !defined(ASIO_NO_EXTENSIONS)
#if defined(ASIO_HAS_BOOST_REGEX)
-template <typename SyncReadStream, typename DynamicBuffer_v1>
-inline std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- const boost::regex& expr,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+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,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), expr, ec);
+ static_cast<DynamicBuffer_v1&&>(buffers), expr, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
-template <typename SyncReadStream, typename DynamicBuffer_v1>
-std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- const boost::regex& expr, asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+template <typename SyncReadStream, typename DynamicBuffer_v1, typename Traits>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v1&& buffers,
+ const boost::basic_regex<char, Traits>& expr, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer_v1>::type b(
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
std::size_t search_position = 0;
for (;;)
@@ -278,10 +287,10 @@ std::size_t read_until(SyncReadStream& s,
// Look for a match.
boost::match_results<iterator,
- typename std::vector<boost::sub_match<iterator> >::allocator_type>
+ typename std::vector<boost::sub_match<iterator>>::allocator_type>
match_results;
- if (regex_search(start_pos, end, match_results, expr,
- boost::match_default | boost::match_partial))
+ if (regex_search(start_pos, end, match_results,
+ expr, detail::regex_match_flags()))
{
if (match_results[0].matched)
{
@@ -323,21 +332,21 @@ std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream,
typename DynamicBuffer_v1, typename MatchCondition>
inline std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
MatchCondition match_condition,
- typename constraint<
+ constraint_t<
is_match_condition<MatchCondition>::value
- >::type,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ >,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ static_cast<DynamicBuffer_v1&&>(buffers),
match_condition, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
@@ -346,20 +355,20 @@ inline std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream,
typename DynamicBuffer_v1, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
MatchCondition match_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_match_condition<MatchCondition>::value
- >::type,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ >,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer_v1>::type b(
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
std::size_t search_position = 0;
for (;;)
@@ -443,16 +452,18 @@ inline std::size_t read_until(SyncReadStream& s,
#if defined(ASIO_HAS_BOOST_REGEX)
-template <typename SyncReadStream, typename Allocator>
+template <typename SyncReadStream, typename Allocator, typename Traits>
inline std::size_t read_until(SyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr)
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr)
{
return read_until(s, basic_streambuf_ref<Allocator>(b), expr);
}
-template <typename SyncReadStream, typename Allocator>
+template <typename SyncReadStream, typename Allocator, typename Traits>
inline std::size_t read_until(SyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr,
asio::error_code& ec)
{
return read_until(s, basic_streambuf_ref<Allocator>(b), expr, ec);
@@ -463,7 +474,7 @@ inline std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream, typename Allocator, typename MatchCondition>
inline std::size_t read_until(SyncReadStream& s,
asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
- typename constraint<is_match_condition<MatchCondition>::value>::type)
+ constraint_t<is_match_condition<MatchCondition>::value>)
{
return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition);
}
@@ -472,7 +483,7 @@ template <typename SyncReadStream, typename Allocator, typename MatchCondition>
inline std::size_t read_until(SyncReadStream& s,
asio::basic_streambuf<Allocator>& b,
MatchCondition match_condition, asio::error_code& ec,
- typename constraint<is_match_condition<MatchCondition>::value>::type)
+ constraint_t<is_match_condition<MatchCondition>::value>)
{
return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition, ec);
}
@@ -484,13 +495,13 @@ inline std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream, typename DynamicBuffer_v2>
inline std::size_t read_until(SyncReadStream& s,
DynamicBuffer_v2 buffers, char delim,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), delim, ec);
+ static_cast<DynamicBuffer_v2&&>(buffers), delim, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
@@ -498,9 +509,9 @@ inline std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream, typename DynamicBuffer_v2>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
char delim, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
DynamicBuffer_v2& b = buffers;
@@ -553,13 +564,13 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
template <typename SyncReadStream, typename DynamicBuffer_v2>
inline std::size_t read_until(SyncReadStream& s,
DynamicBuffer_v2 buffers, ASIO_STRING_VIEW_PARAM delim,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), delim, ec);
+ static_cast<DynamicBuffer_v2&&>(buffers), delim, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
@@ -567,9 +578,9 @@ inline std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream, typename DynamicBuffer_v2>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
ASIO_STRING_VIEW_PARAM delim, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
DynamicBuffer_v2& b = buffers;
@@ -631,26 +642,26 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
#if !defined(ASIO_NO_EXTENSIONS)
#if defined(ASIO_HAS_BOOST_REGEX)
-template <typename SyncReadStream, typename DynamicBuffer_v2>
-inline std::size_t read_until(SyncReadStream& s,
- DynamicBuffer_v2 buffers, const boost::regex& expr,
- typename constraint<
+template <typename SyncReadStream, typename DynamicBuffer_v2, typename Traits>
+inline std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
+ const boost::basic_regex<char, Traits>& expr,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), expr, ec);
+ static_cast<DynamicBuffer_v2&&>(buffers), expr, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
-template <typename SyncReadStream, typename DynamicBuffer_v2>
+template <typename SyncReadStream, typename DynamicBuffer_v2, typename Traits>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
- const boost::regex& expr, asio::error_code& ec,
- typename constraint<
+ const boost::basic_regex<char, Traits>& expr, asio::error_code& ec,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
DynamicBuffer_v2& b = buffers;
@@ -668,10 +679,10 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
// Look for a match.
boost::match_results<iterator,
- typename std::vector<boost::sub_match<iterator> >::allocator_type>
+ typename std::vector<boost::sub_match<iterator>>::allocator_type>
match_results;
- if (regex_search(start_pos, end, match_results, expr,
- boost::match_default | boost::match_partial))
+ if (regex_search(start_pos, end, match_results,
+ expr, detail::regex_match_flags()))
{
if (match_results[0].matched)
{
@@ -717,16 +728,16 @@ template <typename SyncReadStream,
typename DynamicBuffer_v2, typename MatchCondition>
inline std::size_t read_until(SyncReadStream& s,
DynamicBuffer_v2 buffers, MatchCondition match_condition,
- typename constraint<
+ constraint_t<
is_match_condition<MatchCondition>::value
- >::type,
- typename constraint<
+ >,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
- ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ static_cast<DynamicBuffer_v2&&>(buffers),
match_condition, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
@@ -736,12 +747,12 @@ template <typename SyncReadStream,
typename DynamicBuffer_v2, typename MatchCondition>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
MatchCondition match_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_match_condition<MatchCondition>::value
- >::type,
- typename constraint<
+ >,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
DynamicBuffer_v2& b = buffers;
@@ -810,20 +821,19 @@ namespace detail
public:
template <typename BufferSequence>
read_until_delim_op_v1(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ BufferSequence&& buffers,
char delim, ReadHandler& handler)
: base_from_cancellation_state<ReadHandler>(
handler, enable_partial_cancellation()),
stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
delim_(delim),
start_(0),
search_position_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_until_delim_op_v1(const read_until_delim_op_v1& other)
: base_from_cancellation_state<ReadHandler>(other),
stream_(other.stream_),
@@ -837,17 +847,15 @@ namespace detail
read_until_delim_op_v1(read_until_delim_op_v1&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
delim_(other.delim_),
start_(other.start_),
search_position_(other.search_position_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -907,7 +915,7 @@ namespace detail
ASIO_HANDLER_LOCATION((
__FILE__, __LINE__, "async_read_until"));
stream_.async_read_some(buffers_.prepare(bytes_to_read),
- ASIO_MOVE_CAST(read_until_delim_op_v1)(*this));
+ static_cast<read_until_delim_op_v1&&>(*this));
}
return; default:
buffers_.commit(bytes_transferred);
@@ -928,7 +936,7 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
@@ -943,36 +951,6 @@ namespace detail
template <typename AsyncReadStream,
typename DynamicBuffer_v1, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_until_delim_op_v1<AsyncReadStream,
- DynamicBuffer_v1, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer_v1, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_delim_op_v1<AsyncReadStream,
- DynamicBuffer_v1, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer_v1, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_delim_op_v1<AsyncReadStream,
DynamicBuffer_v1, ReadHandler>* this_handler)
@@ -982,34 +960,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v1, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_until_delim_op_v1<AsyncReadStream,
- DynamicBuffer_v1, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v1, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_until_delim_op_v1<AsyncReadStream,
- DynamicBuffer_v1, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncReadStream>
class initiate_async_read_until_delim_v1
{
@@ -1021,14 +971,14 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename ReadHandler, typename DynamicBuffer_v1>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v1&& buffers,
char delim) const
{
// If you get an error on the following line it means that your handler
@@ -1037,9 +987,9 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
read_until_delim_op_v1<AsyncReadStream,
- typename decay<DynamicBuffer_v1>::type,
- typename decay<ReadHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ decay_t<DynamicBuffer_v1>,
+ decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
delim, handler2.value)(asio::error_code(), 0, 1);
}
@@ -1061,8 +1011,16 @@ struct associator<Associator,
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_until_delim_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_until_delim_op_v1<AsyncReadStream,
DynamicBuffer_v1, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -1072,23 +1030,25 @@ struct associator<Associator,
template <typename AsyncReadStream, typename DynamicBuffer_v1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- char delim, ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ 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 (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), delim))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_read_until_delim_v1<AsyncReadStream>(s),
- handler, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), delim);
+ token, static_cast<DynamicBuffer_v1&&>(buffers), delim);
}
namespace detail
@@ -1101,20 +1061,19 @@ namespace detail
public:
template <typename BufferSequence>
read_until_delim_string_op_v1(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ BufferSequence&& buffers,
const std::string& delim, ReadHandler& handler)
: base_from_cancellation_state<ReadHandler>(
handler, enable_partial_cancellation()),
stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
delim_(delim),
start_(0),
search_position_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_until_delim_string_op_v1(const read_until_delim_string_op_v1& other)
: base_from_cancellation_state<ReadHandler>(other),
stream_(other.stream_),
@@ -1128,17 +1087,15 @@ namespace detail
read_until_delim_string_op_v1(read_until_delim_string_op_v1&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
- delim_(ASIO_MOVE_CAST(std::string)(other.delim_)),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
+ delim_(static_cast<std::string&&>(other.delim_)),
start_(other.start_),
search_position_(other.search_position_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -1209,7 +1166,7 @@ namespace detail
ASIO_HANDLER_LOCATION((
__FILE__, __LINE__, "async_read_until"));
stream_.async_read_some(buffers_.prepare(bytes_to_read),
- ASIO_MOVE_CAST(read_until_delim_string_op_v1)(*this));
+ static_cast<read_until_delim_string_op_v1&&>(*this));
}
return; default:
buffers_.commit(bytes_transferred);
@@ -1230,7 +1187,7 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
@@ -1245,36 +1202,6 @@ namespace detail
template <typename AsyncReadStream,
typename DynamicBuffer_v1, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_until_delim_string_op_v1<AsyncReadStream,
- DynamicBuffer_v1, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer_v1, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_delim_string_op_v1<AsyncReadStream,
- DynamicBuffer_v1, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer_v1, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_delim_string_op_v1<AsyncReadStream,
DynamicBuffer_v1, ReadHandler>* this_handler)
@@ -1284,34 +1211,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v1, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_until_delim_string_op_v1<AsyncReadStream,
- DynamicBuffer_v1, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v1, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_until_delim_string_op_v1<AsyncReadStream,
- DynamicBuffer_v1, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncReadStream>
class initiate_async_read_until_delim_string_v1
{
@@ -1323,14 +1222,14 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename ReadHandler, typename DynamicBuffer_v1>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v1&& buffers,
const std::string& delim) const
{
// If you get an error on the following line it means that your handler
@@ -1339,9 +1238,9 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
read_until_delim_string_op_v1<AsyncReadStream,
- typename decay<DynamicBuffer_v1>::type,
- typename decay<ReadHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ decay_t<DynamicBuffer_v1>,
+ decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
delim, handler2.value)(asio::error_code(), 0, 1);
}
@@ -1362,9 +1261,17 @@ struct associator<Associator,
: Associator<ReadHandler, DefaultCandidate>
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
- const detail::read_until_delim_string_op_v1<AsyncReadStream,
- DynamicBuffer_v1, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::read_until_delim_string_op_v1<
+ AsyncReadStream, DynamicBuffer_v1, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_until_delim_string_op_v1<
+ AsyncReadStream, DynamicBuffer_v1, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -1374,24 +1281,27 @@ struct associator<Associator,
template <typename AsyncReadStream, typename DynamicBuffer_v1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- ASIO_STRING_VIEW_PARAM delim,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ 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 (asio::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<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_read_until_delim_string_v1<AsyncReadStream>(s),
- handler, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
static_cast<std::string>(delim));
}
@@ -1406,22 +1316,20 @@ namespace detail
: public base_from_cancellation_state<ReadHandler>
{
public:
- template <typename BufferSequence>
- read_until_expr_op_v1(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
- const boost::regex& expr, ReadHandler& handler)
+ template <typename BufferSequence, typename Traits>
+ read_until_expr_op_v1(AsyncReadStream& stream, BufferSequence&& buffers,
+ const boost::basic_regex<char, Traits>& expr, ReadHandler& handler)
: base_from_cancellation_state<ReadHandler>(
handler, enable_partial_cancellation()),
stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
expr_(expr),
start_(0),
search_position_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_until_expr_op_v1(const read_until_expr_op_v1& other)
: base_from_cancellation_state<ReadHandler>(other),
stream_(other.stream_),
@@ -1435,17 +1343,15 @@ namespace detail
read_until_expr_op_v1(read_until_expr_op_v1&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
expr_(other.expr_),
start_(other.start_),
search_position_(other.search_position_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -1469,10 +1375,10 @@ namespace detail
// Look for a match.
boost::match_results<iterator,
- typename std::vector<boost::sub_match<iterator> >::allocator_type>
+ typename std::vector<boost::sub_match<iterator>>::allocator_type>
match_results;
- bool match = regex_search(start_pos, end, match_results, expr_,
- boost::match_default | boost::match_partial);
+ bool match = regex_search(start_pos, end,
+ match_results, expr_, regex_match_flags());
if (match && match_results[0].matched)
{
// Full match. We're done.
@@ -1519,7 +1425,7 @@ namespace detail
ASIO_HANDLER_LOCATION((
__FILE__, __LINE__, "async_read_until"));
stream_.async_read_some(buffers_.prepare(bytes_to_read),
- ASIO_MOVE_CAST(read_until_expr_op_v1)(*this));
+ static_cast<read_until_expr_op_v1&&>(*this));
}
return; default:
buffers_.commit(bytes_transferred);
@@ -1540,7 +1446,7 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
@@ -1555,36 +1461,6 @@ namespace detail
template <typename AsyncReadStream, typename DynamicBuffer_v1,
typename RegEx, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_until_expr_op_v1<AsyncReadStream,
- DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v1,
- typename RegEx, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_expr_op_v1<AsyncReadStream,
- DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v1,
- typename RegEx, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_expr_op_v1<AsyncReadStream,
DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
@@ -1594,34 +1470,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v1, typename RegEx, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_until_expr_op_v1<AsyncReadStream,
- DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v1, typename RegEx, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_until_expr_op_v1<AsyncReadStream,
- DynamicBuffer_v1, RegEx, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncReadStream>
class initiate_async_read_until_expr_v1
{
@@ -1633,14 +1481,14 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename ReadHandler, typename DynamicBuffer_v1, typename RegEx>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, const RegEx& expr) const
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v1&& buffers, const RegEx& expr) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a ReadHandler.
@@ -1648,9 +1496,9 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
read_until_expr_op_v1<AsyncReadStream,
- typename decay<DynamicBuffer_v1>::type,
- RegEx, typename decay<ReadHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ decay_t<DynamicBuffer_v1>,
+ RegEx, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
expr, handler2.value)(asio::error_code(), 0, 1);
}
@@ -1672,8 +1520,16 @@ struct associator<Associator,
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_until_expr_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, RegEx, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_until_expr_op_v1<AsyncReadStream,
DynamicBuffer_v1, RegEx, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -1681,26 +1537,27 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream, typename DynamicBuffer_v1,
+template <typename AsyncReadStream, typename DynamicBuffer_v1, typename Traits,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- const boost::regex& expr,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ 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 (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), expr))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_read_until_expr_v1<AsyncReadStream>(s),
- handler, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), expr);
+ token, static_cast<DynamicBuffer_v1&&>(buffers), expr);
}
#endif // defined(ASIO_HAS_BOOST_REGEX)
@@ -1715,20 +1572,19 @@ namespace detail
public:
template <typename BufferSequence>
read_until_match_op_v1(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ BufferSequence&& buffers,
MatchCondition match_condition, ReadHandler& handler)
: base_from_cancellation_state<ReadHandler>(
handler, enable_partial_cancellation()),
stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
match_condition_(match_condition),
start_(0),
search_position_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_until_match_op_v1(const read_until_match_op_v1& other)
: base_from_cancellation_state<ReadHandler>(other),
stream_(other.stream_),
@@ -1742,17 +1598,15 @@ namespace detail
read_until_match_op_v1(read_until_match_op_v1&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
match_condition_(other.match_condition_),
start_(other.start_),
search_position_(other.search_position_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -1822,7 +1676,7 @@ namespace detail
ASIO_HANDLER_LOCATION((
__FILE__, __LINE__, "async_read_until"));
stream_.async_read_some(buffers_.prepare(bytes_to_read),
- ASIO_MOVE_CAST(read_until_match_op_v1)(*this));
+ static_cast<read_until_match_op_v1&&>(*this));
}
return; default:
buffers_.commit(bytes_transferred);
@@ -1843,7 +1697,7 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
@@ -1858,36 +1712,6 @@ namespace detail
template <typename AsyncReadStream, typename DynamicBuffer_v1,
typename MatchCondition, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
- MatchCondition, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v1,
- typename MatchCondition, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
- MatchCondition, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v1,
- typename MatchCondition, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
MatchCondition, ReadHandler>* this_handler)
@@ -1897,36 +1721,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v1, typename MatchCondition,
- typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
- MatchCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v1, typename MatchCondition,
- typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_until_match_op_v1<AsyncReadStream, DynamicBuffer_v1,
- MatchCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncReadStream>
class initiate_async_read_until_match_v1
{
@@ -1938,15 +1732,15 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename ReadHandler,
typename DynamicBuffer_v1, typename MatchCondition>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v1&& buffers,
MatchCondition match_condition) const
{
// If you get an error on the following line it means that your handler
@@ -1955,9 +1749,9 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
read_until_match_op_v1<AsyncReadStream,
- typename decay<DynamicBuffer_v1>::type,
- MatchCondition, typename decay<ReadHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ decay_t<DynamicBuffer_v1>,
+ MatchCondition, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
match_condition, handler2.value)(asio::error_code(), 0, 1);
}
@@ -1979,8 +1773,16 @@ struct associator<Associator,
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_until_match_op_v1<AsyncReadStream,
+ DynamicBuffer_v1, MatchCondition, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_until_match_op_v1<AsyncReadStream,
DynamicBuffer_v1, MatchCondition, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -1991,86 +1793,111 @@ struct associator<Associator,
template <typename AsyncReadStream,
typename DynamicBuffer_v1, typename MatchCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
+ 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
- >::type,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ >,
+ 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 (asio::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<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- detail::initiate_async_read_until_match_v1<AsyncReadStream>(s), handler,
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), match_condition);
+ detail::initiate_async_read_until_match_v1<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ match_condition);
}
#if !defined(ASIO_NO_IOSTREAM)
template <typename AsyncReadStream, typename Allocator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- asio::basic_streambuf<Allocator>& b,
- char delim, ASIO_MOVE_ARG(ReadHandler) handler)
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ asio::basic_streambuf<Allocator>& b, char delim, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), delim))
{
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
- delim, ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::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,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
asio::basic_streambuf<Allocator>& b,
- ASIO_STRING_VIEW_PARAM delim,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ ASIO_STRING_VIEW_PARAM delim, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::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_read_until(s, basic_streambuf_ref<Allocator>(b),
- delim, ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::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(ASIO_HAS_BOOST_REGEX)
-template <typename AsyncReadStream, typename Allocator,
+template <typename AsyncReadStream, typename Allocator, typename Traits,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
- ASIO_MOVE_ARG(ReadHandler) handler)
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr, ReadToken&& token)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), expr))
{
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
- expr, ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_expr_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), expr);
}
#endif // defined(ASIO_HAS_BOOST_REGEX)
template <typename AsyncReadStream, typename Allocator, typename MatchCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s,
asio::basic_streambuf<Allocator>& b,
- MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<is_match_condition<MatchCondition>::value>::type)
+ MatchCondition match_condition, ReadToken&& token,
+ constraint_t<is_match_condition<MatchCondition>::value>)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), match_condition))
{
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
- match_condition, ASIO_MOVE_CAST(ReadHandler)(handler));
+ return async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ detail::initiate_async_read_until_match_v1<AsyncReadStream>(s),
+ token, basic_streambuf_ref<Allocator>(b), match_condition);
}
#endif // !defined(ASIO_NO_IOSTREAM)
@@ -2087,21 +1914,20 @@ namespace detail
public:
template <typename BufferSequence>
read_until_delim_op_v2(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ BufferSequence&& buffers,
char delim, ReadHandler& handler)
: base_from_cancellation_state<ReadHandler>(
handler, enable_partial_cancellation()),
stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
delim_(delim),
start_(0),
search_position_(0),
bytes_to_read_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_until_delim_op_v2(const read_until_delim_op_v2& other)
: base_from_cancellation_state<ReadHandler>(other),
stream_(other.stream_),
@@ -2116,18 +1942,16 @@ namespace detail
read_until_delim_op_v2(read_until_delim_op_v2&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
delim_(other.delim_),
start_(other.start_),
search_position_(other.search_position_),
bytes_to_read_(other.bytes_to_read_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -2191,7 +2015,7 @@ namespace detail
ASIO_HANDLER_LOCATION((
__FILE__, __LINE__, "async_read_until"));
stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
- ASIO_MOVE_CAST(read_until_delim_op_v2)(*this));
+ static_cast<read_until_delim_op_v2&&>(*this));
}
return; default:
buffers_.shrink(bytes_to_read_ - bytes_transferred);
@@ -2212,7 +2036,7 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
@@ -2228,36 +2052,6 @@ namespace detail
template <typename AsyncReadStream,
typename DynamicBuffer_v2, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_until_delim_op_v2<AsyncReadStream,
- DynamicBuffer_v2, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer_v2, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_delim_op_v2<AsyncReadStream,
- DynamicBuffer_v2, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer_v2, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_delim_op_v2<AsyncReadStream,
DynamicBuffer_v2, ReadHandler>* this_handler)
@@ -2267,34 +2061,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v2, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_until_delim_op_v2<AsyncReadStream,
- DynamicBuffer_v2, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v2, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_until_delim_op_v2<AsyncReadStream,
- DynamicBuffer_v2, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncReadStream>
class initiate_async_read_until_delim_v2
{
@@ -2306,14 +2072,14 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename ReadHandler, typename DynamicBuffer_v2>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v2) buffers, char delim) const
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v2&& buffers, char delim) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a ReadHandler.
@@ -2321,9 +2087,9 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
read_until_delim_op_v2<AsyncReadStream,
- typename decay<DynamicBuffer_v2>::type,
- typename decay<ReadHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ decay_t<DynamicBuffer_v2>,
+ decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
delim, handler2.value)(asio::error_code(), 0, 1);
}
@@ -2345,8 +2111,16 @@ struct associator<Associator,
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_until_delim_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_until_delim_op_v2<AsyncReadStream,
DynamicBuffer_v2, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -2356,19 +2130,22 @@ struct associator<Associator,
template <typename AsyncReadStream, typename DynamicBuffer_v2,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
- char delim, ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
+ 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
- >::type)
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), delim))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_read_until_delim_v2<AsyncReadStream>(s),
- handler, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), delim);
+ token, static_cast<DynamicBuffer_v2&&>(buffers), delim);
}
namespace detail
@@ -2381,21 +2158,20 @@ namespace detail
public:
template <typename BufferSequence>
read_until_delim_string_op_v2(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ BufferSequence&& buffers,
const std::string& delim, ReadHandler& handler)
: base_from_cancellation_state<ReadHandler>(
handler, enable_partial_cancellation()),
stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
delim_(delim),
start_(0),
search_position_(0),
bytes_to_read_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_until_delim_string_op_v2(const read_until_delim_string_op_v2& other)
: base_from_cancellation_state<ReadHandler>(other),
stream_(other.stream_),
@@ -2410,18 +2186,16 @@ namespace detail
read_until_delim_string_op_v2(read_until_delim_string_op_v2&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
- delim_(ASIO_MOVE_CAST(std::string)(other.delim_)),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
+ delim_(static_cast<std::string&&>(other.delim_)),
start_(other.start_),
search_position_(other.search_position_),
bytes_to_read_(other.bytes_to_read_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -2496,7 +2270,7 @@ namespace detail
ASIO_HANDLER_LOCATION((
__FILE__, __LINE__, "async_read_until"));
stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
- ASIO_MOVE_CAST(read_until_delim_string_op_v2)(*this));
+ static_cast<read_until_delim_string_op_v2&&>(*this));
}
return; default:
buffers_.shrink(bytes_to_read_ - bytes_transferred);
@@ -2517,7 +2291,7 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
@@ -2533,36 +2307,6 @@ namespace detail
template <typename AsyncReadStream,
typename DynamicBuffer_v2, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_until_delim_string_op_v2<AsyncReadStream,
- DynamicBuffer_v2, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer_v2, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_delim_string_op_v2<AsyncReadStream,
- DynamicBuffer_v2, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer_v2, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_delim_string_op_v2<AsyncReadStream,
DynamicBuffer_v2, ReadHandler>* this_handler)
@@ -2572,34 +2316,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v2, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_until_delim_string_op_v2<AsyncReadStream,
- DynamicBuffer_v2, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v2, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_until_delim_string_op_v2<AsyncReadStream,
- DynamicBuffer_v2, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncReadStream>
class initiate_async_read_until_delim_string_v2
{
@@ -2611,14 +2327,14 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename ReadHandler, typename DynamicBuffer_v2>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v2&& buffers,
const std::string& delim) const
{
// If you get an error on the following line it means that your handler
@@ -2627,9 +2343,9 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
read_until_delim_string_op_v2<AsyncReadStream,
- typename decay<DynamicBuffer_v2>::type,
- typename decay<ReadHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ decay_t<DynamicBuffer_v2>,
+ decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
delim, handler2.value)(asio::error_code(), 0, 1);
}
@@ -2650,9 +2366,17 @@ struct associator<Associator,
: Associator<ReadHandler, DefaultCandidate>
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
- const detail::read_until_delim_string_op_v2<AsyncReadStream,
- DynamicBuffer_v2, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::read_until_delim_string_op_v2<
+ AsyncReadStream, DynamicBuffer_v2, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_until_delim_string_op_v2<
+ AsyncReadStream, DynamicBuffer_v2, ReadHandler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -2663,20 +2387,24 @@ struct associator<Associator,
template <typename AsyncReadStream,
typename DynamicBuffer_v2,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- DynamicBuffer_v2 buffers, ASIO_STRING_VIEW_PARAM delim,
- ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
+ std::size_t)) ReadToken>
+inline auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ ASIO_STRING_VIEW_PARAM delim, ReadToken&& token,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::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<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_read_until_delim_string_v2<AsyncReadStream>(s),
- handler, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
static_cast<std::string>(delim));
}
@@ -2691,23 +2419,21 @@ namespace detail
: public base_from_cancellation_state<ReadHandler>
{
public:
- template <typename BufferSequence>
- read_until_expr_op_v2(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
- const boost::regex& expr, ReadHandler& handler)
+ template <typename BufferSequence, typename Traits>
+ read_until_expr_op_v2(AsyncReadStream& stream, BufferSequence&& buffers,
+ const boost::basic_regex<char, Traits>& expr, ReadHandler& handler)
: base_from_cancellation_state<ReadHandler>(
handler, enable_partial_cancellation()),
stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
expr_(expr),
start_(0),
search_position_(0),
bytes_to_read_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_until_expr_op_v2(const read_until_expr_op_v2& other)
: base_from_cancellation_state<ReadHandler>(other),
stream_(other.stream_),
@@ -2722,18 +2448,16 @@ namespace detail
read_until_expr_op_v2(read_until_expr_op_v2&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
expr_(other.expr_),
start_(other.start_),
search_position_(other.search_position_),
bytes_to_read_(other.bytes_to_read_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -2759,10 +2483,10 @@ namespace detail
// Look for a match.
boost::match_results<iterator,
- typename std::vector<boost::sub_match<iterator> >::allocator_type>
+ typename std::vector<boost::sub_match<iterator>>::allocator_type>
match_results;
- bool match = regex_search(start_pos, end, match_results, expr_,
- boost::match_default | boost::match_partial);
+ bool match = regex_search(start_pos, end,
+ match_results, expr_, regex_match_flags());
if (match && match_results[0].matched)
{
// Full match. We're done.
@@ -2811,7 +2535,7 @@ namespace detail
ASIO_HANDLER_LOCATION((
__FILE__, __LINE__, "async_read_until"));
stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
- ASIO_MOVE_CAST(read_until_expr_op_v2)(*this));
+ static_cast<read_until_expr_op_v2&&>(*this));
}
return; default:
buffers_.shrink(bytes_to_read_ - bytes_transferred);
@@ -2832,7 +2556,7 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
@@ -2848,36 +2572,6 @@ namespace detail
template <typename AsyncReadStream, typename DynamicBuffer_v2,
typename RegEx, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_until_expr_op_v2<AsyncReadStream,
- DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v2,
- typename RegEx, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_expr_op_v2<AsyncReadStream,
- DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v2,
- typename RegEx, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_expr_op_v2<AsyncReadStream,
DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
@@ -2887,34 +2581,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v2, typename RegEx, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_until_expr_op_v2<AsyncReadStream,
- DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v2, typename RegEx, typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_until_expr_op_v2<AsyncReadStream,
- DynamicBuffer_v2, RegEx, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncReadStream>
class initiate_async_read_until_expr_v2
{
@@ -2926,14 +2592,14 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename ReadHandler, typename DynamicBuffer_v2, typename RegEx>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v2&& buffers,
const RegEx& expr) const
{
// If you get an error on the following line it means that your handler
@@ -2942,9 +2608,9 @@ namespace detail
non_const_lvalue<ReadHandler> handler2(handler);
read_until_expr_op_v2<AsyncReadStream,
- typename decay<DynamicBuffer_v2>::type,
- RegEx, typename decay<ReadHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ decay_t<DynamicBuffer_v2>,
+ RegEx, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
expr, handler2.value)(asio::error_code(), 0, 1);
}
@@ -2966,8 +2632,16 @@ struct associator<Associator,
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_until_expr_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, RegEx, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_until_expr_op_v2<AsyncReadStream,
DynamicBuffer_v2, RegEx, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -2975,21 +2649,24 @@ struct associator<Associator,
#endif // !defined(GENERATING_DOCUMENTATION)
-template <typename AsyncReadStream, typename DynamicBuffer_v2,
+template <typename AsyncReadStream, typename DynamicBuffer_v2, typename Traits,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
- const boost::regex& expr, ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
+ 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
- >::type)
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), expr))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_read_until_expr_v2<AsyncReadStream>(s),
- handler, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), expr);
+ token, static_cast<DynamicBuffer_v2&&>(buffers), expr);
}
#endif // defined(ASIO_HAS_BOOST_REGEX)
@@ -3004,21 +2681,20 @@ namespace detail
public:
template <typename BufferSequence>
read_until_match_op_v2(AsyncReadStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ BufferSequence&& buffers,
MatchCondition match_condition, ReadHandler& handler)
: base_from_cancellation_state<ReadHandler>(
handler, enable_partial_cancellation()),
stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
match_condition_(match_condition),
start_(0),
search_position_(0),
bytes_to_read_(0),
- handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
+ handler_(static_cast<ReadHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
read_until_match_op_v2(const read_until_match_op_v2& other)
: base_from_cancellation_state<ReadHandler>(other),
stream_(other.stream_),
@@ -3033,18 +2709,16 @@ namespace detail
read_until_match_op_v2(read_until_match_op_v2&& other)
: base_from_cancellation_state<ReadHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- ReadHandler>)(other)),
+ static_cast<base_from_cancellation_state<ReadHandler>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
match_condition_(other.match_condition_),
start_(other.start_),
search_position_(other.search_position_),
bytes_to_read_(other.bytes_to_read_),
- handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ handler_(static_cast<ReadHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -3118,7 +2792,7 @@ namespace detail
ASIO_HANDLER_LOCATION((
__FILE__, __LINE__, "async_read_until"));
stream_.async_read_some(buffers_.data(pos, bytes_to_read_),
- ASIO_MOVE_CAST(read_until_match_op_v2)(*this));
+ static_cast<read_until_match_op_v2&&>(*this));
}
return; default:
buffers_.shrink(bytes_to_read_ - bytes_transferred);
@@ -3139,7 +2813,7 @@ namespace detail
(ec || search_position_ == not_found)
? 0 : search_position_;
- ASIO_MOVE_OR_LVALUE(ReadHandler)(handler_)(result_ec, result_n);
+ static_cast<ReadHandler&&>(handler_)(result_ec, result_n);
}
}
@@ -3155,36 +2829,6 @@ namespace detail
template <typename AsyncReadStream, typename DynamicBuffer_v2,
typename MatchCondition, typename ReadHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
- MatchCondition, ReadHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v2,
- typename MatchCondition, typename ReadHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
- MatchCondition, ReadHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer_v2,
- typename MatchCondition, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
MatchCondition, ReadHandler>* this_handler)
@@ -3194,36 +2838,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v2, typename MatchCondition,
- typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
- MatchCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer_v2, typename MatchCondition,
- typename ReadHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- read_until_match_op_v2<AsyncReadStream, DynamicBuffer_v2,
- MatchCondition, ReadHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncReadStream>
class initiate_async_read_until_match_v2
{
@@ -3235,15 +2849,15 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename ReadHandler,
typename DynamicBuffer_v2, typename MatchCondition>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
+ void operator()(ReadHandler&& handler,
+ DynamicBuffer_v2&& buffers,
MatchCondition match_condition) const
{
// If you get an error on the following line it means that your handler
@@ -3251,11 +2865,10 @@ namespace detail
ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
non_const_lvalue<ReadHandler> handler2(handler);
- read_until_match_op_v2<AsyncReadStream,
- typename decay<DynamicBuffer_v2>::type,
- MatchCondition, typename decay<ReadHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
- match_condition, handler2.value)(asio::error_code(), 0, 1);
+ read_until_match_op_v2<AsyncReadStream, decay_t<DynamicBuffer_v2>,
+ MatchCondition, decay_t<ReadHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
+ match_condition, handler2.value)(asio::error_code(), 0, 1);
}
private:
@@ -3276,8 +2889,16 @@ struct associator<Associator,
{
static typename Associator<ReadHandler, DefaultCandidate>::type get(
const detail::read_until_match_op_v2<AsyncReadStream,
+ DynamicBuffer_v2, MatchCondition, ReadHandler>& h) noexcept
+ {
+ return Associator<ReadHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::read_until_match_op_v2<AsyncReadStream,
DynamicBuffer_v2, MatchCondition, ReadHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<ReadHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -3288,22 +2909,27 @@ struct associator<Associator,
template <typename AsyncReadStream,
typename DynamicBuffer_v2, typename MatchCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
- MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler,
- typename constraint<
+ 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
- >::type,
- typename constraint<
+ >,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::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<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- detail::initiate_async_read_until_match_v2<AsyncReadStream>(s), handler,
- ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), match_condition);
+ detail::initiate_async_read_until_match_v2<AsyncReadStream>(s),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ match_condition);
}
#endif // !defined(ASIO_NO_EXTENSIONS)
diff --git a/3rdparty/asio/include/asio/impl/redirect_error.hpp b/3rdparty/asio/include/asio/impl/redirect_error.hpp
index 79162868959..e75aa0f706c 100644
--- a/3rdparty/asio/include/asio/impl/redirect_error.hpp
+++ b/3rdparty/asio/include/asio/impl/redirect_error.hpp
@@ -2,7 +2,7 @@
// impl/redirect_error.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,11 +18,8 @@
#include "asio/detail/config.hpp"
#include "asio/associator.hpp"
#include "asio/async_result.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/system_error.hpp"
#include "asio/detail/push_options.hpp"
@@ -40,121 +37,47 @@ public:
template <typename CompletionToken>
redirect_error_handler(redirect_error_t<CompletionToken> e)
: ec_(e.ec_),
- handler_(ASIO_MOVE_CAST(CompletionToken)(e.token_))
+ handler_(static_cast<CompletionToken&&>(e.token_))
{
}
template <typename RedirectedHandler>
redirect_error_handler(asio::error_code& ec,
- ASIO_MOVE_ARG(RedirectedHandler) h)
+ RedirectedHandler&& h)
: ec_(ec),
- handler_(ASIO_MOVE_CAST(RedirectedHandler)(h))
+ handler_(static_cast<RedirectedHandler&&>(h))
{
}
void operator()()
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)();
+ static_cast<Handler&&>(handler_)();
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Arg, typename... Args>
- typename enable_if<
- !is_same<typename decay<Arg>::type, asio::error_code>::value
- >::type
- operator()(ASIO_MOVE_ARG(Arg) arg, ASIO_MOVE_ARG(Args)... args)
+ enable_if_t<
+ !is_same<decay_t<Arg>, asio::error_code>::value
+ >
+ operator()(Arg&& arg, Args&&... args)
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
- ASIO_MOVE_CAST(Arg)(arg),
- ASIO_MOVE_CAST(Args)(args)...);
+ static_cast<Handler&&>(handler_)(
+ static_cast<Arg&&>(arg),
+ static_cast<Args&&>(args)...);
}
template <typename... Args>
- void operator()(const asio::error_code& ec,
- ASIO_MOVE_ARG(Args)... args)
- {
- ec_ = ec;
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
- ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Arg>
- typename enable_if<
- !is_same<typename decay<Arg>::type, asio::error_code>::value
- >::type
- operator()(ASIO_MOVE_ARG(Arg) arg)
- {
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)(
- ASIO_MOVE_CAST(Arg)(arg));
- }
-
- void operator()(const asio::error_code& ec)
+ void operator()(const asio::error_code& ec, Args&&... args)
{
ec_ = ec;
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)();
+ static_cast<Handler&&>(handler_)(static_cast<Args&&>(args)...);
}
-#define ASIO_PRIVATE_REDIRECT_ERROR_DEF(n) \
- template <typename Arg, ASIO_VARIADIC_TPARAMS(n)> \
- typename enable_if< \
- !is_same<typename decay<Arg>::type, asio::error_code>::value \
- >::type \
- operator()(ASIO_MOVE_ARG(Arg) arg, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)( \
- ASIO_MOVE_CAST(Arg)(arg), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(const asio::error_code& ec, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- ec_ = ec; \
- ASIO_MOVE_OR_LVALUE(Handler)(handler_)( \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_REDIRECT_ERROR_DEF)
-#undef ASIO_PRIVATE_REDIRECT_ERROR_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
//private:
asio::error_code& ec_;
Handler handler_;
};
template <typename Handler>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- redirect_error_handler<Handler>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- redirect_error_handler<Handler>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Handler>
inline bool asio_handler_is_continuation(
redirect_error_handler<Handler>* this_handler)
{
@@ -162,38 +85,12 @@ inline bool asio_handler_is_continuation(
this_handler->handler_);
}
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- redirect_error_handler<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- redirect_error_handler<Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
template <typename Signature>
struct redirect_error_signature
{
typedef Signature type;
};
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename R, typename... Args>
struct redirect_error_signature<R(asio::error_code, Args...)>
{
@@ -206,8 +103,6 @@ struct redirect_error_signature<R(const asio::error_code&, Args...)>
typedef R type(Args...);
};
-# if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
template <typename R, typename... Args>
struct redirect_error_signature<R(asio::error_code, Args...) &>
{
@@ -232,7 +127,7 @@ struct redirect_error_signature<R(const asio::error_code&, Args...) &&>
typedef R type(Args...) &&;
};
-# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
+#if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
template <typename R, typename... Args>
struct redirect_error_signature<
@@ -276,196 +171,7 @@ struct redirect_error_signature<
typedef R type(Args...) && noexcept;
};
-# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-# endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename R>
-struct redirect_error_signature<R(asio::error_code)>
-{
- typedef R type();
-};
-
-template <typename R>
-struct redirect_error_signature<R(const asio::error_code&)>
-{
- typedef R type();
-};
-
-#define ASIO_PRIVATE_REDIRECT_ERROR_DEF(n) \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(asio::error_code, ASIO_VARIADIC_TARGS(n))> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)); \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(const asio::error_code&, ASIO_VARIADIC_TARGS(n))> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)); \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_REDIRECT_ERROR_DEF)
-#undef ASIO_PRIVATE_REDIRECT_ERROR_DEF
-
-# if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-
-template <typename R>
-struct redirect_error_signature<R(asio::error_code) &>
-{
- typedef R type() &;
-};
-
-template <typename R>
-struct redirect_error_signature<R(const asio::error_code&) &>
-{
- typedef R type() &;
-};
-
-template <typename R>
-struct redirect_error_signature<R(asio::error_code) &&>
-{
- typedef R type() &&;
-};
-
-template <typename R>
-struct redirect_error_signature<R(const asio::error_code&) &&>
-{
- typedef R type() &&;
-};
-
-#define ASIO_PRIVATE_REDIRECT_ERROR_DEF(n) \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(asio::error_code, ASIO_VARIADIC_TARGS(n)) &> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)) &; \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(const asio::error_code&, ASIO_VARIADIC_TARGS(n)) &> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)) &; \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(asio::error_code, ASIO_VARIADIC_TARGS(n)) &&> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)) &&; \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(const asio::error_code&, ASIO_VARIADIC_TARGS(n)) &&> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)) &&; \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_REDIRECT_ERROR_DEF)
-#undef ASIO_PRIVATE_REDIRECT_ERROR_DEF
-
-# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-
-template <typename R>
-struct redirect_error_signature<
- R(asio::error_code) noexcept>
-{
- typedef R type() noexcept;
-};
-
-template <typename R>
-struct redirect_error_signature<
- R(const asio::error_code&) noexcept>
-{
- typedef R type() noexcept;
-};
-
-template <typename R>
-struct redirect_error_signature<
- R(asio::error_code) & noexcept>
-{
- typedef R type() & noexcept;
-};
-
-template <typename R>
-struct redirect_error_signature<
- R(const asio::error_code&) & noexcept>
-{
- typedef R type() & noexcept;
-};
-
-template <typename R>
-struct redirect_error_signature<
- R(asio::error_code) && noexcept>
-{
- typedef R type() && noexcept;
-};
-
-template <typename R>
-struct redirect_error_signature<
- R(const asio::error_code&) && noexcept>
-{
- typedef R type() && noexcept;
-};
-
-#define ASIO_PRIVATE_REDIRECT_ERROR_DEF(n) \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(asio::error_code, ASIO_VARIADIC_TARGS(n)) noexcept> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)) noexcept; \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(const asio::error_code&, \
- ASIO_VARIADIC_TARGS(n)) noexcept> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)) noexcept; \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(asio::error_code, \
- ASIO_VARIADIC_TARGS(n)) & noexcept> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)) & noexcept; \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(const asio::error_code&, \
- ASIO_VARIADIC_TARGS(n)) & noexcept> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)) & noexcept; \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(asio::error_code, \
- ASIO_VARIADIC_TARGS(n)) && noexcept> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)) && noexcept; \
- }; \
- \
- template <typename R, ASIO_VARIADIC_TPARAMS(n)> \
- struct redirect_error_signature< \
- R(const asio::error_code&, \
- ASIO_VARIADIC_TARGS(n)) && noexcept> \
- { \
- typedef R type(ASIO_VARIADIC_TARGS(n)) && noexcept; \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_REDIRECT_ERROR_DEF)
-#undef ASIO_PRIVATE_REDIRECT_ERROR_DEF
-
-# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
-# endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS)
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+#endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE)
} // namespace detail
@@ -473,117 +179,46 @@ struct redirect_error_signature<
template <typename CompletionToken, typename Signature>
struct async_result<redirect_error_t<CompletionToken>, Signature>
+ : async_result<CompletionToken,
+ typename detail::redirect_error_signature<Signature>::type>
{
- typedef typename async_result<CompletionToken,
- typename detail::redirect_error_signature<Signature>::type>
- ::return_type return_type;
- template <typename Initiation>
struct init_wrapper
{
- template <typename Init>
- init_wrapper(asio::error_code& ec, ASIO_MOVE_ARG(Init) init)
- : ec_(ec),
- initiation_(ASIO_MOVE_CAST(Init)(init))
+ explicit init_wrapper(asio::error_code& ec)
+ : ec_(ec)
{
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Handler, typename... Args>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Args)... args)
+ template <typename Handler, typename Initiation, typename... Args>
+ void operator()(Handler&& handler,
+ Initiation&& initiation, Args&&... args) const
{
- ASIO_MOVE_CAST(Initiation)(initiation_)(
- detail::redirect_error_handler<
- typename decay<Handler>::type>(
- ec_, ASIO_MOVE_CAST(Handler)(handler)),
- ASIO_MOVE_CAST(Args)(args)...);
+ static_cast<Initiation&&>(initiation)(
+ detail::redirect_error_handler<decay_t<Handler>>(
+ ec_, static_cast<Handler&&>(handler)),
+ static_cast<Args&&>(args)...);
}
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Handler>
- void operator()(
- ASIO_MOVE_ARG(Handler) handler)
- {
- ASIO_MOVE_CAST(Initiation)(initiation_)(
- detail::redirect_error_handler<
- typename decay<Handler>::type>(
- ec_, ASIO_MOVE_CAST(Handler)(handler)));
- }
-
-#define ASIO_PRIVATE_INIT_WRAPPER_DEF(n) \
- template <typename Handler, ASIO_VARIADIC_TPARAMS(n)> \
- void operator()( \
- ASIO_MOVE_ARG(Handler) handler, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- ASIO_MOVE_CAST(Initiation)(initiation_)( \
- detail::redirect_error_handler< \
- typename decay<Handler>::type>( \
- ec_, ASIO_MOVE_CAST(Handler)(handler)), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INIT_WRAPPER_DEF)
-#undef ASIO_PRIVATE_INIT_WRAPPER_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
asio::error_code& ec_;
- Initiation initiation_;
};
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Initiation, typename RawCompletionToken, typename... Args>
- static return_type initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token,
- ASIO_MOVE_ARG(Args)... args)
+ static auto initiate(Initiation&& initiation,
+ RawCompletionToken&& token, Args&&... args)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::redirect_error_signature<Signature>::type>(
+ declval<init_wrapper>(), token.token_,
+ static_cast<Initiation&&>(initiation),
+ static_cast<Args&&>(args)...))
{
return async_initiate<CompletionToken,
typename detail::redirect_error_signature<Signature>::type>(
- init_wrapper<typename decay<Initiation>::type>(
- token.ec_, ASIO_MOVE_CAST(Initiation)(initiation)),
- token.token_, ASIO_MOVE_CAST(Args)(args)...);
+ init_wrapper(token.ec_), token.token_,
+ static_cast<Initiation&&>(initiation),
+ static_cast<Args&&>(args)...);
}
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Initiation, typename RawCompletionToken>
- static return_type initiate(
- ASIO_MOVE_ARG(Initiation) initiation,
- ASIO_MOVE_ARG(RawCompletionToken) token)
- {
- return async_initiate<CompletionToken,
- typename detail::redirect_error_signature<Signature>::type>(
- init_wrapper<typename decay<Initiation>::type>(
- token.ec_, ASIO_MOVE_CAST(Initiation)(initiation)),
- token.token_);
- }
-
-#define ASIO_PRIVATE_INITIATE_DEF(n) \
- template <typename Initiation, typename RawCompletionToken, \
- ASIO_VARIADIC_TPARAMS(n)> \
- static return_type initiate( \
- ASIO_MOVE_ARG(Initiation) initiation, \
- ASIO_MOVE_ARG(RawCompletionToken) token, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- return async_initiate<CompletionToken, \
- typename detail::redirect_error_signature<Signature>::type>( \
- init_wrapper<typename decay<Initiation>::type>( \
- token.ec_, ASIO_MOVE_CAST(Initiation)(initiation)), \
- token.token_, ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INITIATE_DEF)
-#undef ASIO_PRIVATE_INITIATE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
};
template <template <typename, typename> class Associator,
@@ -593,8 +228,14 @@ struct associator<Associator,
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::redirect_error_handler<Handler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::redirect_error_handler<Handler>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const detail::redirect_error_handler<Handler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
diff --git a/3rdparty/asio/include/asio/impl/serial_port_base.hpp b/3rdparty/asio/include/asio/impl/serial_port_base.hpp
index 6ba9168d2ea..1fa2af66f73 100644
--- a/3rdparty/asio/include/asio/impl/serial_port_base.hpp
+++ b/3rdparty/asio/include/asio/impl/serial_port_base.hpp
@@ -2,7 +2,7 @@
// impl/serial_port_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/impl/serial_port_base.ipp b/3rdparty/asio/include/asio/impl/serial_port_base.ipp
index ebb38870a34..646af3453d6 100644
--- a/3rdparty/asio/include/asio/impl/serial_port_base.ipp
+++ b/3rdparty/asio/include/asio/impl/serial_port_base.ipp
@@ -2,7 +2,7 @@
// impl/serial_port_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/impl/spawn.hpp b/3rdparty/asio/include/asio/impl/spawn.hpp
index 7b510cebd42..38a96406ed4 100644
--- a/3rdparty/asio/include/asio/impl/spawn.hpp
+++ b/3rdparty/asio/include/asio/impl/spawn.hpp
@@ -2,7 +2,7 @@
// impl/spawn.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,499 +16,1382 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <tuple>
#include "asio/associated_allocator.hpp"
+#include "asio/associated_cancellation_slot.hpp"
#include "asio/associated_executor.hpp"
#include "asio/async_result.hpp"
#include "asio/bind_executor.hpp"
#include "asio/detail/atomic_count.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
+#include "asio/detail/bind_handler.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/noncopyable.hpp"
#include "asio/detail/type_traits.hpp"
+#include "asio/detail/utility.hpp"
#include "asio/system_error.hpp"
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+# include <boost/context/fiber.hpp>
+#endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
#include "asio/detail/push_options.hpp"
namespace asio {
namespace detail {
- template <typename Handler, typename T>
- class coro_handler
+#if !defined(ASIO_NO_EXCEPTIONS)
+inline void spawned_thread_rethrow(void* ex)
+{
+ if (*static_cast<exception_ptr*>(ex))
+ rethrow_exception(*static_cast<exception_ptr*>(ex));
+}
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+
+// Spawned thread implementation using Boost.Coroutine.
+class spawned_coroutine_thread : public spawned_thread_base
+{
+public:
+#if defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2)
+ typedef boost::coroutines::pull_coroutine<void> callee_type;
+ typedef boost::coroutines::push_coroutine<void> caller_type;
+#else
+ typedef boost::coroutines::coroutine<void()> callee_type;
+ typedef boost::coroutines::coroutine<void()> caller_type;
+#endif
+
+ spawned_coroutine_thread(caller_type& caller)
+ : caller_(caller),
+ on_suspend_fn_(0),
+ on_suspend_arg_(0)
+ {
+ }
+
+ template <typename F>
+ static spawned_thread_base* spawn(F&& f,
+ const boost::coroutines::attributes& attributes,
+ cancellation_slot parent_cancel_slot = cancellation_slot(),
+ cancellation_state cancel_state = cancellation_state())
{
- public:
- coro_handler(basic_yield_context<Handler> ctx)
- : coro_(ctx.coro_.lock()),
- ca_(ctx.ca_),
- handler_(ctx.handler_),
- ready_(0),
- ec_(ctx.ec_),
- value_(0)
+ spawned_coroutine_thread* spawned_thread = 0;
+ callee_type callee(entry_point<decay_t<F>>(
+ static_cast<F&&>(f), &spawned_thread), attributes);
+ spawned_thread->callee_.swap(callee);
+ spawned_thread->parent_cancellation_slot_ = parent_cancel_slot;
+ spawned_thread->cancellation_state_ = cancel_state;
+ return spawned_thread;
+ }
+
+ template <typename F>
+ static spawned_thread_base* spawn(F&& f,
+ cancellation_slot parent_cancel_slot = cancellation_slot(),
+ cancellation_state cancel_state = cancellation_state())
+ {
+ return spawn(static_cast<F&&>(f), boost::coroutines::attributes(),
+ parent_cancel_slot, cancel_state);
+ }
+
+ void resume()
+ {
+ callee_();
+ if (on_suspend_fn_)
{
+ void (*fn)(void*) = on_suspend_fn_;
+ void* arg = on_suspend_arg_;
+ on_suspend_fn_ = 0;
+ fn(arg);
}
+ }
+
+ void suspend_with(void (*fn)(void*), void* arg)
+ {
+ if (throw_if_cancelled_)
+ if (!!cancellation_state_.cancelled())
+ throw_error(asio::error::operation_aborted, "yield");
+ has_context_switched_ = true;
+ on_suspend_fn_ = fn;
+ on_suspend_arg_ = arg;
+ caller_();
+ }
+
+ void destroy()
+ {
+ callee_type callee;
+ callee.swap(callee_);
+ if (terminal_)
+ callee();
+ }
- void operator()(T value)
+private:
+ template <typename Function>
+ class entry_point
+ {
+ public:
+ template <typename F>
+ entry_point(F&& f,
+ spawned_coroutine_thread** spawned_thread_out)
+ : function_(static_cast<F&&>(f)),
+ spawned_thread_out_(spawned_thread_out)
{
- *ec_ = asio::error_code();
- *value_ = ASIO_MOVE_CAST(T)(value);
- if (--*ready_ == 0)
- (*coro_)();
}
- void operator()(asio::error_code ec, T value)
+ void operator()(caller_type& caller)
{
- *ec_ = ec;
- *value_ = ASIO_MOVE_CAST(T)(value);
- if (--*ready_ == 0)
- (*coro_)();
+ Function function(static_cast<Function&&>(function_));
+ spawned_coroutine_thread spawned_thread(caller);
+ *spawned_thread_out_ = &spawned_thread;
+ spawned_thread_out_ = 0;
+ spawned_thread.suspend();
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ {
+ function(&spawned_thread);
+ spawned_thread.terminal_ = true;
+ spawned_thread.suspend();
+ }
+#if !defined(ASIO_NO_EXCEPTIONS)
+ catch (const boost::coroutines::detail::forced_unwind&)
+ {
+ throw;
+ }
+ catch (...)
+ {
+ exception_ptr ex = current_exception();
+ spawned_thread.terminal_ = true;
+ spawned_thread.suspend_with(spawned_thread_rethrow, &ex);
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
}
- //private:
- shared_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- Handler handler_;
- atomic_count* ready_;
- asio::error_code* ec_;
- T* value_;
+ private:
+ Function function_;
+ spawned_coroutine_thread** spawned_thread_out_;
};
- template <typename Handler>
- class coro_handler<Handler, void>
+ caller_type& caller_;
+ callee_type callee_;
+ void (*on_suspend_fn_)(void*);
+ void* on_suspend_arg_;
+};
+
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+// Spawned thread implementation using Boost.Context's fiber.
+class spawned_fiber_thread : public spawned_thread_base
+{
+public:
+ typedef boost::context::fiber fiber_type;
+
+ spawned_fiber_thread(fiber_type&& caller)
+ : caller_(static_cast<fiber_type&&>(caller)),
+ on_suspend_fn_(0),
+ on_suspend_arg_(0)
{
- public:
- coro_handler(basic_yield_context<Handler> ctx)
- : coro_(ctx.coro_.lock()),
- ca_(ctx.ca_),
- handler_(ctx.handler_),
- ready_(0),
- ec_(ctx.ec_)
+ }
+
+ template <typename StackAllocator, typename F>
+ static spawned_thread_base* spawn(allocator_arg_t,
+ StackAllocator&& stack_allocator,
+ F&& f,
+ cancellation_slot parent_cancel_slot = cancellation_slot(),
+ cancellation_state cancel_state = cancellation_state())
+ {
+ spawned_fiber_thread* spawned_thread = 0;
+ fiber_type callee(allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ entry_point<decay_t<F>>(
+ static_cast<F&&>(f), &spawned_thread));
+ callee = fiber_type(static_cast<fiber_type&&>(callee)).resume();
+ spawned_thread->callee_ = static_cast<fiber_type&&>(callee);
+ spawned_thread->parent_cancellation_slot_ = parent_cancel_slot;
+ spawned_thread->cancellation_state_ = cancel_state;
+ return spawned_thread;
+ }
+
+ template <typename F>
+ static spawned_thread_base* spawn(F&& f,
+ cancellation_slot parent_cancel_slot = cancellation_slot(),
+ cancellation_state cancel_state = cancellation_state())
+ {
+ return spawn(allocator_arg_t(), boost::context::fixedsize_stack(),
+ static_cast<F&&>(f), parent_cancel_slot, cancel_state);
+ }
+
+ void resume()
+ {
+ callee_ = fiber_type(static_cast<fiber_type&&>(callee_)).resume();
+ if (on_suspend_fn_)
{
+ void (*fn)(void*) = on_suspend_fn_;
+ void* arg = on_suspend_arg_;
+ on_suspend_fn_ = 0;
+ fn(arg);
}
+ }
- void operator()()
+ void suspend_with(void (*fn)(void*), void* arg)
+ {
+ if (throw_if_cancelled_)
+ if (!!cancellation_state_.cancelled())
+ throw_error(asio::error::operation_aborted, "yield");
+ has_context_switched_ = true;
+ on_suspend_fn_ = fn;
+ on_suspend_arg_ = arg;
+ caller_ = fiber_type(static_cast<fiber_type&&>(caller_)).resume();
+ }
+
+ void destroy()
+ {
+ fiber_type callee = static_cast<fiber_type&&>(callee_);
+ if (terminal_)
+ fiber_type(static_cast<fiber_type&&>(callee)).resume();
+ }
+
+private:
+ template <typename Function>
+ class entry_point
+ {
+ public:
+ template <typename F>
+ entry_point(F&& f,
+ spawned_fiber_thread** spawned_thread_out)
+ : function_(static_cast<F&&>(f)),
+ spawned_thread_out_(spawned_thread_out)
{
- *ec_ = asio::error_code();
- if (--*ready_ == 0)
- (*coro_)();
}
- void operator()(asio::error_code ec)
+ fiber_type operator()(fiber_type&& caller)
{
- *ec_ = ec;
- if (--*ready_ == 0)
- (*coro_)();
+ Function function(static_cast<Function&&>(function_));
+ spawned_fiber_thread spawned_thread(
+ static_cast<fiber_type&&>(caller));
+ *spawned_thread_out_ = &spawned_thread;
+ spawned_thread_out_ = 0;
+ spawned_thread.suspend();
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ {
+ function(&spawned_thread);
+ spawned_thread.terminal_ = true;
+ spawned_thread.suspend();
+ }
+#if !defined(ASIO_NO_EXCEPTIONS)
+ catch (const boost::context::detail::forced_unwind&)
+ {
+ throw;
+ }
+ catch (...)
+ {
+ exception_ptr ex = current_exception();
+ spawned_thread.terminal_ = true;
+ spawned_thread.suspend_with(spawned_thread_rethrow, &ex);
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ return static_cast<fiber_type&&>(spawned_thread.caller_);
}
- //private:
- shared_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- Handler handler_;
- atomic_count* ready_;
- asio::error_code* ec_;
+ private:
+ Function function_;
+ spawned_fiber_thread** spawned_thread_out_;
};
- template <typename Handler, typename T>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- coro_handler<Handler, T>* this_handler)
+ fiber_type caller_;
+ fiber_type callee_;
+ void (*on_suspend_fn_)(void*);
+ void* on_suspend_arg_;
+};
+
+#endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+typedef spawned_fiber_thread default_spawned_thread_type;
+#elif defined(ASIO_HAS_BOOST_COROUTINE)
+typedef spawned_coroutine_thread default_spawned_thread_type;
+#else
+# error No spawn() implementation available
+#endif
+
+// Helper class to perform the initial resume on the correct executor.
+class spawned_thread_resumer
+{
+public:
+ explicit spawned_thread_resumer(spawned_thread_base* spawned_thread)
+ : spawned_thread_(spawned_thread)
{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
}
- template <typename Handler, typename T>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- coro_handler<Handler, T>* this_handler)
+ spawned_thread_resumer(spawned_thread_resumer&& other) noexcept
+ : spawned_thread_(other.spawned_thread_)
{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
+ other.spawned_thread_ = 0;
}
- template <typename Handler, typename T>
- inline bool asio_handler_is_continuation(coro_handler<Handler, T>*)
+ ~spawned_thread_resumer()
{
- return true;
+ if (spawned_thread_)
+ spawned_thread_->destroy();
}
- template <typename Function, typename Handler, typename T>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- coro_handler<Handler, T>* this_handler)
+ void operator()()
+ {
+ spawned_thread_->attach(&spawned_thread_);
+ spawned_thread_->resume();
+ }
+
+private:
+ spawned_thread_base* spawned_thread_;
+};
+
+// Helper class to ensure spawned threads are destroyed on the correct executor.
+class spawned_thread_destroyer
+{
+public:
+ explicit spawned_thread_destroyer(spawned_thread_base* spawned_thread)
+ : spawned_thread_(spawned_thread)
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
+ spawned_thread->detach();
}
- template <typename Function, typename Handler, typename T>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- coro_handler<Handler, T>* this_handler)
+ spawned_thread_destroyer(spawned_thread_destroyer&& other) noexcept
+ : spawned_thread_(other.spawned_thread_)
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
+ other.spawned_thread_ = 0;
}
- template <typename Handler, typename T>
- class coro_async_result
+ ~spawned_thread_destroyer()
{
- public:
- typedef coro_handler<Handler, T> completion_handler_type;
- typedef T return_type;
+ if (spawned_thread_)
+ spawned_thread_->destroy();
+ }
- explicit coro_async_result(completion_handler_type& h)
- : handler_(h),
- ca_(h.ca_),
- ready_(2)
+ void operator()()
+ {
+ if (spawned_thread_)
{
- h.ready_ = &ready_;
- out_ec_ = h.ec_;
- if (!out_ec_) h.ec_ = &ec_;
- h.value_ = &value_;
+ spawned_thread_->destroy();
+ spawned_thread_ = 0;
}
+ }
- return_type get()
- {
- // Must not hold shared_ptr to coro while suspended.
- handler_.coro_.reset();
+private:
+ spawned_thread_base* spawned_thread_;
+};
- if (--ready_ != 0)
- ca_();
- if (!out_ec_ && ec_) throw asio::system_error(ec_);
- return ASIO_MOVE_CAST(return_type)(value_);
- }
+// Base class for all completion handlers associated with a spawned thread.
+template <typename Executor>
+class spawn_handler_base
+{
+public:
+ typedef Executor executor_type;
+ typedef cancellation_slot cancellation_slot_type;
- private:
- completion_handler_type& handler_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- atomic_count ready_;
- asio::error_code* out_ec_;
- asio::error_code ec_;
- return_type value_;
- };
+ spawn_handler_base(const basic_yield_context<Executor>& yield)
+ : yield_(yield),
+ spawned_thread_(yield.spawned_thread_)
+ {
+ spawned_thread_->detach();
+ }
+
+ spawn_handler_base(spawn_handler_base&& other) noexcept
+ : yield_(other.yield_),
+ spawned_thread_(other.spawned_thread_)
- template <typename Handler>
- class coro_async_result<Handler, void>
{
- public:
- typedef coro_handler<Handler, void> completion_handler_type;
- typedef void return_type;
+ other.spawned_thread_ = 0;
+ }
- explicit coro_async_result(completion_handler_type& h)
- : handler_(h),
- ca_(h.ca_),
- ready_(2)
- {
- h.ready_ = &ready_;
- out_ec_ = h.ec_;
- if (!out_ec_) h.ec_ = &ec_;
- }
+ ~spawn_handler_base()
+ {
+ if (spawned_thread_)
+ (post)(yield_.executor_, spawned_thread_destroyer(spawned_thread_));
+ }
- void get()
- {
- // Must not hold shared_ptr to coro while suspended.
- handler_.coro_.reset();
+ executor_type get_executor() const noexcept
+ {
+ return yield_.executor_;
+ }
- if (--ready_ != 0)
- ca_();
- if (!out_ec_ && ec_) throw asio::system_error(ec_);
- }
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return spawned_thread_->get_cancellation_slot();
+ }
- private:
- completion_handler_type& handler_;
- typename basic_yield_context<Handler>::caller_type& ca_;
- atomic_count ready_;
- asio::error_code* out_ec_;
- asio::error_code ec_;
- };
+ void resume()
+ {
+ spawned_thread_resumer resumer(spawned_thread_);
+ spawned_thread_ = 0;
+ resumer();
+ }
-} // namespace detail
+protected:
+ const basic_yield_context<Executor>& yield_;
+ spawned_thread_base* spawned_thread_;
+};
-#if !defined(GENERATING_DOCUMENTATION)
+// Completion handlers for when basic_yield_context is used as a token.
+template <typename Executor, typename Signature>
+class spawn_handler;
-template <typename Handler, typename ReturnType>
-class async_result<basic_yield_context<Handler>, ReturnType()>
- : public detail::coro_async_result<Handler, void>
+template <typename Executor, typename R>
+class spawn_handler<Executor, R()>
+ : public spawn_handler_base<Executor>
{
public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- void>::completion_handler_type& h)
- : detail::coro_async_result<Handler, void>(h)
+ typedef void return_type;
+
+ struct result_type {};
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type&)
+ : spawn_handler_base<Executor>(yield)
+ {
+ }
+
+ void operator()()
+ {
+ this->resume();
+ }
+
+ static return_type on_resume(result_type&)
{
}
};
-template <typename Handler, typename ReturnType, typename Arg1>
-class async_result<basic_yield_context<Handler>, ReturnType(Arg1)>
- : public detail::coro_async_result<Handler, typename decay<Arg1>::type>
+template <typename Executor, typename R>
+class spawn_handler<Executor, R(asio::error_code)>
+ : public spawn_handler_base<Executor>
{
public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- typename decay<Arg1>::type>::completion_handler_type& h)
- : detail::coro_async_result<Handler, typename decay<Arg1>::type>(h)
+ typedef void return_type;
+ typedef asio::error_code* result_type;
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
+
+ void operator()(asio::error_code ec)
+ {
+ if (this->yield_.ec_)
+ {
+ *this->yield_.ec_ = ec;
+ result_ = 0;
+ }
+ else
+ result_ = &ec;
+ this->resume();
+ }
+
+ static return_type on_resume(result_type& result)
{
+ if (result)
+ throw_error(*result);
}
+
+private:
+ result_type& result_;
};
-template <typename Handler, typename ReturnType>
-class async_result<basic_yield_context<Handler>,
- ReturnType(asio::error_code)>
- : public detail::coro_async_result<Handler, void>
+template <typename Executor, typename R>
+class spawn_handler<Executor, R(exception_ptr)>
+ : public spawn_handler_base<Executor>
{
public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- void>::completion_handler_type& h)
- : detail::coro_async_result<Handler, void>(h)
+ typedef void return_type;
+ typedef exception_ptr* result_type;
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
+
+ void operator()(exception_ptr ex)
{
+ result_ = &ex;
+ this->resume();
}
+
+ static return_type on_resume(result_type& result)
+ {
+ if (*result)
+ rethrow_exception(*result);
+ }
+
+private:
+ result_type& result_;
};
-template <typename Handler, typename ReturnType, typename Arg2>
-class async_result<basic_yield_context<Handler>,
- ReturnType(asio::error_code, Arg2)>
- : public detail::coro_async_result<Handler, typename decay<Arg2>::type>
+template <typename Executor, typename R, typename T>
+class spawn_handler<Executor, R(T)>
+ : public spawn_handler_base<Executor>
{
public:
- explicit async_result(
- typename detail::coro_async_result<Handler,
- typename decay<Arg2>::type>::completion_handler_type& h)
- : detail::coro_async_result<Handler, typename decay<Arg2>::type>(h)
+ typedef T return_type;
+ typedef return_type* result_type;
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
{
}
-};
-template <template <typename, typename> class Associator,
- typename Handler, typename T, typename DefaultCandidate>
-struct associator<Associator,
- detail::coro_handler<Handler, T>,
- DefaultCandidate>
- : Associator<Handler, DefaultCandidate>
-{
- static typename Associator<Handler, DefaultCandidate>::type get(
- const detail::coro_handler<Handler, T>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ void operator()(T value)
{
- return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
+ result_ = &value;
+ this->resume();
}
+
+ static return_type on_resume(result_type& result)
+ {
+ return static_cast<return_type&&>(*result);
+ }
+
+private:
+ result_type& result_;
};
-namespace detail {
+template <typename Executor, typename R, typename T>
+class spawn_handler<Executor, R(asio::error_code, T)>
+ : public spawn_handler_base<Executor>
+{
+public:
+ typedef T return_type;
+
+ struct result_type
+ {
+ asio::error_code* ec_;
+ return_type* value_;
+ };
- template <typename Handler, typename Function>
- struct spawn_data : private noncopyable
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
{
- template <typename Hand, typename Func>
- spawn_data(ASIO_MOVE_ARG(Hand) handler,
- bool call_handler, ASIO_MOVE_ARG(Func) function)
- : handler_(ASIO_MOVE_CAST(Hand)(handler)),
- call_handler_(call_handler),
- function_(ASIO_MOVE_CAST(Func)(function))
+ }
+
+ void operator()(asio::error_code ec, T value)
+ {
+ if (this->yield_.ec_)
{
+ *this->yield_.ec_ = ec;
+ result_.ec_ = 0;
}
+ else
+ result_.ec_ = &ec;
+ result_.value_ = &value;
+ this->resume();
+ }
- weak_ptr<typename basic_yield_context<Handler>::callee_type> coro_;
- Handler handler_;
- bool call_handler_;
- Function function_;
+ static return_type on_resume(result_type& result)
+ {
+ if (result.ec_)
+ throw_error(*result.ec_);
+ return static_cast<return_type&&>(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename Executor, typename R, typename T>
+class spawn_handler<Executor, R(exception_ptr, T)>
+ : public spawn_handler_base<Executor>
+{
+public:
+ typedef T return_type;
+
+ struct result_type
+ {
+ exception_ptr* ex_;
+ return_type* value_;
};
- template <typename Handler, typename Function>
- struct coro_entry_point
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
+
+ void operator()(exception_ptr ex, T value)
{
- void operator()(typename basic_yield_context<Handler>::caller_type& ca)
+ result_.ex_ = &ex;
+ result_.value_ = &value;
+ this->resume();
+ }
+
+ static return_type on_resume(result_type& result)
+ {
+ if (*result.ex_)
+ rethrow_exception(*result.ex_);
+ return static_cast<return_type&&>(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename Executor, typename R, typename... Ts>
+class spawn_handler<Executor, R(Ts...)>
+ : public spawn_handler_base<Executor>
+{
+public:
+ typedef std::tuple<Ts...> return_type;
+
+ typedef return_type* result_type;
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(Args&&... args)
+ {
+ return_type value(static_cast<Args&&>(args)...);
+ result_ = &value;
+ this->resume();
+ }
+
+ static return_type on_resume(result_type& result)
+ {
+ return static_cast<return_type&&>(*result);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename Executor, typename R, typename... Ts>
+class spawn_handler<Executor, R(asio::error_code, Ts...)>
+ : public spawn_handler_base<Executor>
+{
+public:
+ typedef std::tuple<Ts...> return_type;
+
+ struct result_type
+ {
+ asio::error_code* ec_;
+ return_type* value_;
+ };
+
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(asio::error_code ec,
+ Args&&... args)
+ {
+ return_type value(static_cast<Args&&>(args)...);
+ if (this->yield_.ec_)
{
- shared_ptr<spawn_data<Handler, Function> > data(data_);
-#if !defined(BOOST_COROUTINES_UNIDIRECT) && !defined(BOOST_COROUTINES_V2)
- ca(); // Yield until coroutine pointer has been initialised.
-#endif // !defined(BOOST_COROUTINES_UNIDIRECT) && !defined(BOOST_COROUTINES_V2)
- const basic_yield_context<Handler> yield(
- data->coro_, ca, data->handler_);
-
- (data->function_)(yield);
- if (data->call_handler_)
- ASIO_MOVE_OR_LVALUE(Handler)(data->handler_)();
+ *this->yield_.ec_ = ec;
+ result_.ec_ = 0;
}
+ else
+ result_.ec_ = &ec;
+ result_.value_ = &value;
+ this->resume();
+ }
- shared_ptr<spawn_data<Handler, Function> > data_;
+ static return_type on_resume(result_type& result)
+ {
+ if (result.ec_)
+ throw_error(*result.ec_);
+ return static_cast<return_type&&>(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename Executor, typename R, typename... Ts>
+class spawn_handler<Executor, R(exception_ptr, Ts...)>
+ : public spawn_handler_base<Executor>
+{
+public:
+ typedef std::tuple<Ts...> return_type;
+
+ struct result_type
+ {
+ exception_ptr* ex_;
+ return_type* value_;
};
- template <typename Handler, typename Function>
- struct spawn_helper
+ spawn_handler(const basic_yield_context<Executor>& yield, result_type& result)
+ : spawn_handler_base<Executor>(yield),
+ result_(result)
+ {
+ }
+
+ template <typename... Args>
+ void operator()(exception_ptr ex, Args&&... args)
+ {
+ return_type value(static_cast<Args&&>(args)...);
+ result_.ex_ = &ex;
+ result_.value_ = &value;
+ this->resume();
+ }
+
+ static return_type on_resume(result_type& result)
{
- typedef typename associated_allocator<Handler>::type allocator_type;
+ if (*result.ex_)
+ rethrow_exception(*result.ex_);
+ return static_cast<return_type&&>(*result.value_);
+ }
+
+private:
+ result_type& result_;
+};
+
+template <typename Executor, typename Signature>
+inline bool asio_handler_is_continuation(spawn_handler<Executor, Signature>*)
+{
+ return true;
+}
+
+} // namespace detail
- allocator_type get_allocator() const ASIO_NOEXCEPT
+template <typename Executor, typename Signature>
+class async_result<basic_yield_context<Executor>, Signature>
+{
+public:
+ typedef typename detail::spawn_handler<Executor, Signature> handler_type;
+ typedef typename handler_type::return_type return_type;
+
+#if defined(ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
+
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation&& init,
+ const basic_yield_context<Executor>& yield,
+ InitArgs&&... init_args)
+ {
+ typename handler_type::result_type result
+ = typename handler_type::result_type();
+
+ yield.spawned_thread_->suspend_with(
+ [&]()
+ {
+ static_cast<Initiation&&>(init)(
+ handler_type(yield, result),
+ static_cast<InitArgs&&>(init_args)...);
+ });
+
+ return handler_type::on_resume(result);
+ }
+
+#else // defined(ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
+
+ template <typename Initiation, typename... InitArgs>
+ struct suspend_with_helper
+ {
+ typename handler_type::result_type& result_;
+ Initiation&& init_;
+ const basic_yield_context<Executor>& yield_;
+ std::tuple<InitArgs&&...> init_args_;
+
+ template <std::size_t... I>
+ void do_invoke(detail::index_sequence<I...>)
{
- return (get_associated_allocator)(data_->handler_);
+ static_cast<Initiation&&>(init_)(
+ handler_type(yield_, result_),
+ static_cast<InitArgs&&>(std::get<I>(init_args_))...);
}
- typedef typename associated_executor<Handler>::type executor_type;
+ void operator()()
+ {
+ this->do_invoke(detail::make_index_sequence<sizeof...(InitArgs)>());
+ }
+ };
+
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation&& init,
+ const basic_yield_context<Executor>& yield,
+ InitArgs&&... init_args)
+ {
+ typename handler_type::result_type result
+ = typename handler_type::result_type();
+
+ yield.spawned_thread_->suspend_with(
+ suspend_with_helper<Initiation, InitArgs...>{
+ result, static_cast<Initiation&&>(init), yield,
+ std::tuple<InitArgs&&...>(
+ static_cast<InitArgs&&>(init_args)...)});
+
+ return handler_type::on_resume(result);
+ }
+
+#endif // defined(ASIO_HAS_VARIADIC_LAMBDA_CAPTURES)
+};
+
+namespace detail {
- executor_type get_executor() const ASIO_NOEXCEPT
+template <typename Executor, typename Function, typename Handler>
+class spawn_entry_point
+{
+public:
+ template <typename F, typename H>
+ spawn_entry_point(const Executor& ex,
+ F&& f, H&& h)
+ : executor_(ex),
+ function_(static_cast<F&&>(f)),
+ handler_(static_cast<H&&>(h)),
+ work_(handler_, executor_)
+ {
+ }
+
+ void operator()(spawned_thread_base* spawned_thread)
+ {
+ const basic_yield_context<Executor> yield(spawned_thread, executor_);
+ this->call(yield,
+ void_type<result_of_t<Function(basic_yield_context<Executor>)>>());
+ }
+
+private:
+ void call(const basic_yield_context<Executor>& yield, void_type<void>)
+ {
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ {
+ function_(yield);
+ if (!yield.spawned_thread_->has_context_switched())
+ (post)(yield);
+ detail::binder1<Handler, exception_ptr>
+ handler(handler_, exception_ptr());
+ work_.complete(handler, handler.handler_);
+ }
+#if !defined(ASIO_NO_EXCEPTIONS)
+# if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+ catch (const boost::context::detail::forced_unwind&)
{
- return (get_associated_executor)(data_->handler_);
+ throw;
}
+# endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+# if defined(ASIO_HAS_BOOST_COROUTINE)
+ catch (const boost::coroutines::detail::forced_unwind&)
+ {
+ throw;
+ }
+# endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ catch (...)
+ {
+ exception_ptr ex = current_exception();
+ if (!yield.spawned_thread_->has_context_switched())
+ (post)(yield);
+ detail::binder1<Handler, exception_ptr> handler(handler_, ex);
+ work_.complete(handler, handler.handler_);
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ }
- void operator()()
+ template <typename T>
+ void call(const basic_yield_context<Executor>& yield, void_type<T>)
+ {
+#if !defined(ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ {
+ T result(function_(yield));
+ if (!yield.spawned_thread_->has_context_switched())
+ (post)(yield);
+ detail::binder2<Handler, exception_ptr, T>
+ handler(handler_, exception_ptr(), static_cast<T&&>(result));
+ work_.complete(handler, handler.handler_);
+ }
+#if !defined(ASIO_NO_EXCEPTIONS)
+# if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+ catch (const boost::context::detail::forced_unwind&)
+ {
+ throw;
+ }
+# endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+# if defined(ASIO_HAS_BOOST_COROUTINE)
+ catch (const boost::coroutines::detail::forced_unwind&)
{
- typedef typename basic_yield_context<Handler>::callee_type callee_type;
- coro_entry_point<Handler, Function> entry_point = { data_ };
- shared_ptr<callee_type> coro(new callee_type(entry_point, attributes_));
- data_->coro_ = coro;
- (*coro)();
+ throw;
}
+# endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ catch (...)
+ {
+ exception_ptr ex = current_exception();
+ if (!yield.spawned_thread_->has_context_switched())
+ (post)(yield);
+ detail::binder2<Handler, exception_ptr, T> handler(handler_, ex, T());
+ work_.complete(handler, handler.handler_);
+ }
+#endif // !defined(ASIO_NO_EXCEPTIONS)
+ }
- shared_ptr<spawn_data<Handler, Function> > data_;
- boost::coroutines::attributes attributes_;
- };
+ Executor executor_;
+ Function function_;
+ Handler handler_;
+ handler_work<Handler, Executor> work_;
+};
+
+struct spawn_cancellation_signal_emitter
+{
+ cancellation_signal* signal_;
+ cancellation_type_t type_;
+
+ void operator()()
+ {
+ signal_->emit(type_);
+ }
+};
- template <typename Function, typename Handler, typename Function1>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- spawn_helper<Handler, Function1>* this_handler)
+template <typename Handler, typename Executor, typename = void>
+class spawn_cancellation_handler
+{
+public:
+ spawn_cancellation_handler(const Handler&, const Executor& ex)
+ : ex_(ex)
+ {
+ }
+
+ cancellation_slot slot()
+ {
+ return signal_.slot();
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ spawn_cancellation_signal_emitter emitter = { &signal_, type };
+ (dispatch)(ex_, emitter);
+ }
+
+private:
+ cancellation_signal signal_;
+ Executor ex_;
+};
+
+
+template <typename Handler, typename Executor>
+class spawn_cancellation_handler<Handler, Executor,
+ enable_if_t<
+ is_same<
+ typename associated_executor<Handler,
+ Executor>::asio_associated_executor_is_unspecialised,
+ void
+ >::value
+ >>
+{
+public:
+ spawn_cancellation_handler(const Handler&, const Executor&)
+ {
+ }
+
+ cancellation_slot slot()
+ {
+ return signal_.slot();
+ }
+
+ void operator()(cancellation_type_t type)
+ {
+ signal_.emit(type);
+ }
+
+private:
+ cancellation_signal signal_;
+};
+
+template <typename Executor>
+class initiate_spawn
+{
+public:
+ typedef Executor executor_type;
+
+ explicit initiate_spawn(const executor_type& ex)
+ : executor_(ex)
+ {
+ }
+
+ executor_type get_executor() const noexcept
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->data_->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
+ return executor_;
}
- template <typename Function, typename Handler, typename Function1>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- spawn_helper<Handler, Function1>* this_handler)
+ template <typename Handler, typename F>
+ void operator()(Handler&& handler,
+ F&& f) const
{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->data_->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
+ typedef decay_t<Handler> handler_type;
+ typedef decay_t<F> function_type;
+ typedef spawn_cancellation_handler<
+ handler_type, Executor> cancel_handler_type;
+
+ associated_cancellation_slot_t<handler_type> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ cancel_handler_type* cancel_handler = slot.is_connected()
+ ? &slot.template emplace<cancel_handler_type>(handler, executor_)
+ : 0;
+
+ cancellation_slot proxy_slot(
+ cancel_handler
+ ? cancel_handler->slot()
+ : cancellation_slot());
+
+ cancellation_state cancel_state(proxy_slot);
+
+ (dispatch)(executor_,
+ spawned_thread_resumer(
+ default_spawned_thread_type::spawn(
+ spawn_entry_point<Executor, function_type, handler_type>(
+ executor_, static_cast<F&&>(f),
+ static_cast<Handler&&>(handler)),
+ proxy_slot, cancel_state)));
}
- inline void default_spawn_handler() {}
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+ template <typename Handler, typename StackAllocator, typename F>
+ void operator()(Handler&& handler, allocator_arg_t,
+ StackAllocator&& stack_allocator,
+ F&& f) const
+ {
+ typedef decay_t<Handler> handler_type;
+ typedef decay_t<F> function_type;
+ typedef spawn_cancellation_handler<
+ handler_type, Executor> cancel_handler_type;
+
+ associated_cancellation_slot_t<handler_type> slot
+ = asio::get_associated_cancellation_slot(handler);
+
+ cancel_handler_type* cancel_handler = slot.is_connected()
+ ? &slot.template emplace<cancel_handler_type>(handler, executor_)
+ : 0;
+
+ cancellation_slot proxy_slot(
+ cancel_handler
+ ? cancel_handler->slot()
+ : cancellation_slot());
+
+ cancellation_state cancel_state(proxy_slot);
+
+ (dispatch)(executor_,
+ spawned_thread_resumer(
+ spawned_fiber_thread::spawn(allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ spawn_entry_point<Executor, function_type, handler_type>(
+ executor_, static_cast<F&&>(f),
+ static_cast<Handler&&>(handler)),
+ proxy_slot, cancel_state)));
+ }
+
+#endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+private:
+ executor_type executor_;
+};
+
+} // namespace detail
+
+template <typename Executor, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type) CompletionToken>
+inline auto spawn(const Executor& ex, F&& function, CompletionToken&& token,
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ >,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, static_cast<F&&>(function)))
+{
+ return async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ detail::initiate_spawn<Executor>(ex),
+ token, static_cast<F&&>(function));
+}
+
+template <typename ExecutionContext, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type) CompletionToken>
+inline auto spawn(ExecutionContext& ctx, F&& function, CompletionToken&& token,
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ >,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type>(
+ declval<detail::initiate_spawn<
+ typename ExecutionContext::executor_type>>(),
+ token, static_cast<F&&>(function)))
+{
+ return (spawn)(ctx.get_executor(), static_cast<F&&>(function),
+ static_cast<CompletionToken&&>(token));
+}
+
+template <typename Executor, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken>
+inline auto spawn(const basic_yield_context<Executor>& ctx,
+ F&& function, CompletionToken&& token,
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ >,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, static_cast<F&&>(function)))
+{
+ return (spawn)(ctx.get_executor(), static_cast<F&&>(function),
+ static_cast<CompletionToken&&>(token));
+}
+
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+template <typename Executor, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken>
+inline auto spawn(const Executor& ex, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function, CompletionToken&& token,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)))
+{
+ return async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ detail::initiate_spawn<Executor>(ex), token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function));
+}
+
+template <typename ExecutionContext, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type) CompletionToken>
+inline auto spawn(ExecutionContext& ctx, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function, CompletionToken&& token,
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type>(
+ declval<detail::initiate_spawn<
+ typename ExecutionContext::executor_type>>(),
+ token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)))
+{
+ return (spawn)(ctx.get_executor(), allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function), static_cast<CompletionToken&&>(token));
+}
+
+template <typename Executor, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type) CompletionToken>
+inline auto spawn(const basic_yield_context<Executor>& ctx, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function, CompletionToken&& token,
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ >)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(), token,
+ allocator_arg_t(), static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)))
+{
+ return (spawn)(ctx.get_executor(), allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function), static_cast<CompletionToken&&>(token));
+}
+
+#endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+
+namespace detail {
+
+template <typename Executor, typename Function, typename Handler>
+class old_spawn_entry_point
+{
+public:
+ template <typename F, typename H>
+ old_spawn_entry_point(const Executor& ex, F&& f, H&& h)
+ : executor_(ex),
+ function_(static_cast<F&&>(f)),
+ handler_(static_cast<H&&>(h))
+ {
+ }
+
+ void operator()(spawned_thread_base* spawned_thread)
+ {
+ const basic_yield_context<Executor> yield(spawned_thread, executor_);
+ this->call(yield,
+ void_type<result_of_t<Function(basic_yield_context<Executor>)>>());
+ }
+
+private:
+ void call(const basic_yield_context<Executor>& yield, void_type<void>)
+ {
+ function_(yield);
+ static_cast<Handler&&>(handler_)();
+ }
+
+ template <typename T>
+ void call(const basic_yield_context<Executor>& yield, void_type<T>)
+ {
+ static_cast<Handler&&>(handler_)(function_(yield));
+ }
+
+ Executor executor_;
+ Function function_;
+ Handler handler_;
+};
+
+inline void default_spawn_handler() {}
} // namespace detail
template <typename Function>
-inline void spawn(ASIO_MOVE_ARG(Function) function,
+inline void spawn(Function&& function,
const boost::coroutines::attributes& attributes)
{
- typedef typename decay<Function>::type function_type;
-
- typename associated_executor<function_type>::type ex(
+ associated_executor_t<decay_t<Function>> ex(
(get_associated_executor)(function));
- asio::spawn(ex, ASIO_MOVE_CAST(Function)(function), attributes);
+ asio::spawn(ex, static_cast<Function&&>(function), attributes);
}
template <typename Handler, typename Function>
-void spawn(ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Function) function,
+void spawn(Handler&& handler, Function&& function,
const boost::coroutines::attributes& attributes,
- typename constraint<
- !is_executor<typename decay<Handler>::type>::value &&
- !execution::is_executor<typename decay<Handler>::type>::value &&
- !is_convertible<Handler&, execution_context&>::value>::type)
-{
- typedef typename decay<Handler>::type handler_type;
- typedef typename decay<Function>::type function_type;
-
- detail::spawn_helper<handler_type, function_type> helper;
- helper.data_.reset(
- new detail::spawn_data<handler_type, function_type>(
- ASIO_MOVE_CAST(Handler)(handler), true,
- ASIO_MOVE_CAST(Function)(function)));
- helper.attributes_ = attributes;
-
- asio::dispatch(helper);
+ constraint_t<
+ !is_executor<decay_t<Handler>>::value &&
+ !execution::is_executor<decay_t<Handler>>::value &&
+ !is_convertible<Handler&, execution_context&>::value>)
+{
+ typedef associated_executor_t<decay_t<Handler>> executor_type;
+ executor_type ex((get_associated_executor)(handler));
+
+ (dispatch)(ex,
+ detail::spawned_thread_resumer(
+ detail::spawned_coroutine_thread::spawn(
+ detail::old_spawn_entry_point<executor_type,
+ decay_t<Function>, void (*)()>(
+ ex, static_cast<Function&&>(function),
+ &detail::default_spawn_handler), attributes)));
}
-template <typename Handler, typename Function>
-void spawn(basic_yield_context<Handler> ctx,
- ASIO_MOVE_ARG(Function) function,
+template <typename Executor, typename Function>
+void spawn(basic_yield_context<Executor> ctx, Function&& function,
const boost::coroutines::attributes& attributes)
{
- typedef typename decay<Function>::type function_type;
-
- Handler handler(ctx.handler_); // Explicit copy that might be moved from.
-
- detail::spawn_helper<Handler, function_type> helper;
- helper.data_.reset(
- new detail::spawn_data<Handler, function_type>(
- ASIO_MOVE_CAST(Handler)(handler), false,
- ASIO_MOVE_CAST(Function)(function)));
- helper.attributes_ = attributes;
-
- asio::dispatch(helper);
+ (dispatch)(ctx.get_executor(),
+ detail::spawned_thread_resumer(
+ detail::spawned_coroutine_thread::spawn(
+ detail::old_spawn_entry_point<Executor,
+ decay_t<Function>, void (*)()>(
+ ctx.get_executor(), static_cast<Function&&>(function),
+ &detail::default_spawn_handler), attributes)));
}
template <typename Function, typename Executor>
-inline void spawn(const Executor& ex,
- ASIO_MOVE_ARG(Function) function,
+inline void spawn(const Executor& ex, Function&& function,
const boost::coroutines::attributes& attributes,
- typename constraint<
+ constraint_t<
is_executor<Executor>::value || execution::is_executor<Executor>::value
- >::type)
+ >)
{
asio::spawn(asio::strand<Executor>(ex),
- ASIO_MOVE_CAST(Function)(function), attributes);
+ static_cast<Function&&>(function), attributes);
}
template <typename Function, typename Executor>
-inline void spawn(const strand<Executor>& ex,
- ASIO_MOVE_ARG(Function) function,
+inline void spawn(const strand<Executor>& ex, Function&& function,
const boost::coroutines::attributes& attributes)
{
asio::spawn(asio::bind_executor(
ex, &detail::default_spawn_handler),
- ASIO_MOVE_CAST(Function)(function), attributes);
+ static_cast<Function&&>(function), attributes);
}
#if !defined(ASIO_NO_TS_EXECUTORS)
template <typename Function>
-inline void spawn(const asio::io_context::strand& s,
- ASIO_MOVE_ARG(Function) function,
+inline void spawn(const asio::io_context::strand& s, Function&& function,
const boost::coroutines::attributes& attributes)
{
asio::spawn(asio::bind_executor(
s, &detail::default_spawn_handler),
- ASIO_MOVE_CAST(Function)(function), attributes);
+ static_cast<Function&&>(function), attributes);
}
#endif // !defined(ASIO_NO_TS_EXECUTORS)
template <typename Function, typename ExecutionContext>
-inline void spawn(ExecutionContext& ctx,
- ASIO_MOVE_ARG(Function) function,
+inline void spawn(ExecutionContext& ctx, Function&& function,
const boost::coroutines::attributes& attributes,
- typename constraint<is_convertible<
- ExecutionContext&, execution_context&>::value>::type)
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ >)
{
asio::spawn(ctx.get_executor(),
- ASIO_MOVE_CAST(Function)(function), attributes);
+ static_cast<Function&&>(function), attributes);
}
-#endif // !defined(GENERATING_DOCUMENTATION)
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/src.hpp b/3rdparty/asio/include/asio/impl/src.hpp
index 14ca9c252f4..28396195b06 100644
--- a/3rdparty/asio/include/asio/impl/src.hpp
+++ b/3rdparty/asio/include/asio/impl/src.hpp
@@ -2,7 +2,7 @@
// impl/src.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,11 +19,14 @@
# error Do not compile Asio library source with ASIO_HEADER_ONLY defined
#endif
+#include "asio/impl/any_completion_executor.ipp"
+#include "asio/impl/any_io_executor.ipp"
+#include "asio/impl/cancellation_signal.ipp"
+#include "asio/impl/connect_pipe.ipp"
#include "asio/impl/error.ipp"
#include "asio/impl/error_code.ipp"
#include "asio/impl/execution_context.ipp"
#include "asio/impl/executor.ipp"
-#include "asio/impl/handler_alloc_hook.ipp"
#include "asio/impl/io_context.ipp"
#include "asio/impl/multiple_exceptions.ipp"
#include "asio/impl/serial_port_base.ipp"
@@ -35,15 +38,19 @@
#include "asio/detail/impl/epoll_reactor.ipp"
#include "asio/detail/impl/eventfd_select_interrupter.ipp"
#include "asio/detail/impl/handler_tracking.ipp"
+#include "asio/detail/impl/io_uring_descriptor_service.ipp"
+#include "asio/detail/impl/io_uring_file_service.ipp"
+#include "asio/detail/impl/io_uring_socket_service_base.ipp"
+#include "asio/detail/impl/io_uring_service.ipp"
#include "asio/detail/impl/kqueue_reactor.ipp"
#include "asio/detail/impl/null_event.ipp"
#include "asio/detail/impl/pipe_select_interrupter.ipp"
#include "asio/detail/impl/posix_event.ipp"
#include "asio/detail/impl/posix_mutex.ipp"
+#include "asio/detail/impl/posix_serial_port_service.ipp"
#include "asio/detail/impl/posix_thread.ipp"
#include "asio/detail/impl/posix_tss_ptr.ipp"
#include "asio/detail/impl/reactive_descriptor_service.ipp"
-#include "asio/detail/impl/reactive_serial_port_service.ipp"
#include "asio/detail/impl/reactive_socket_service_base.ipp"
#include "asio/detail/impl/resolver_service_base.ipp"
#include "asio/detail/impl/scheduler.ipp"
@@ -58,6 +65,7 @@
#include "asio/detail/impl/throw_error.ipp"
#include "asio/detail/impl/timer_queue_ptime.ipp"
#include "asio/detail/impl/timer_queue_set.ipp"
+#include "asio/detail/impl/win_iocp_file_service.ipp"
#include "asio/detail/impl/win_iocp_handle_service.ipp"
#include "asio/detail/impl/win_iocp_io_context.ipp"
#include "asio/detail/impl/win_iocp_serial_port_service.ipp"
@@ -72,7 +80,7 @@
#include "asio/detail/impl/winrt_timer_scheduler.ipp"
#include "asio/detail/impl/winsock_init.ipp"
#include "asio/execution/impl/bad_executor.ipp"
-#include "asio/execution/impl/receiver_invocation_error.ipp"
+#include "asio/experimental/impl/channel_error.ipp"
#include "asio/generic/detail/impl/endpoint.ipp"
#include "asio/ip/impl/address.ipp"
#include "asio/ip/impl/address_v4.ipp"
diff --git a/3rdparty/asio/include/asio/impl/system_context.hpp b/3rdparty/asio/include/asio/impl/system_context.hpp
index 650b0ca57dc..34b5a3a0659 100644
--- a/3rdparty/asio/include/asio/impl/system_context.hpp
+++ b/3rdparty/asio/include/asio/impl/system_context.hpp
@@ -2,7 +2,7 @@
// impl/system_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,7 +22,7 @@
namespace asio {
inline system_context::executor_type
-system_context::get_executor() ASIO_NOEXCEPT
+system_context::get_executor() noexcept
{
return system_executor();
}
diff --git a/3rdparty/asio/include/asio/impl/system_context.ipp b/3rdparty/asio/include/asio/impl/system_context.ipp
index d12c5747277..95fda4804da 100644
--- a/3rdparty/asio/include/asio/impl/system_context.ipp
+++ b/3rdparty/asio/include/asio/impl/system_context.ipp
@@ -2,7 +2,7 @@
// impl/system_context.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -67,7 +67,7 @@ void system_context::stop()
scheduler_.stop();
}
-bool system_context::stopped() const ASIO_NOEXCEPT
+bool system_context::stopped() const noexcept
{
return scheduler_.stopped();
}
diff --git a/3rdparty/asio/include/asio/impl/system_executor.hpp b/3rdparty/asio/include/asio/impl/system_executor.hpp
index bee9e9ee8c9..099b2d63ef2 100644
--- a/3rdparty/asio/include/asio/impl/system_executor.hpp
+++ b/3rdparty/asio/include/asio/impl/system_executor.hpp
@@ -2,7 +2,7 @@
// impl/system_executor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -27,7 +27,7 @@ namespace asio {
template <typename Blocking, typename Relationship, typename Allocator>
inline system_context&
basic_system_executor<Blocking, Relationship, Allocator>::query(
- execution::context_t) ASIO_NOEXCEPT
+ execution::context_t) noexcept
{
return detail::global<system_context>();
}
@@ -35,7 +35,7 @@ basic_system_executor<Blocking, Relationship, Allocator>::query(
template <typename Blocking, typename Relationship, typename Allocator>
inline std::size_t
basic_system_executor<Blocking, Relationship, Allocator>::query(
- execution::occupancy_t) const ASIO_NOEXCEPT
+ execution::occupancy_t) const noexcept
{
return detail::global<system_context>().num_threads_;
}
@@ -44,7 +44,7 @@ template <typename Blocking, typename Relationship, typename Allocator>
template <typename Function>
inline void
basic_system_executor<Blocking, Relationship, Allocator>::do_execute(
- ASIO_MOVE_ARG(Function) f, execution::blocking_t::possibly_t) const
+ Function&& f, execution::blocking_t::possibly_t) const
{
// Obtain a non-const instance of the function.
detail::non_const_lvalue<Function> f2(f);
@@ -54,7 +54,7 @@ basic_system_executor<Blocking, Relationship, Allocator>::do_execute(
{
#endif// !defined(ASIO_NO_EXCEPTIONS)
detail::fenced_block b(detail::fenced_block::full);
- asio_handler_invoke_helpers::invoke(f2.value, f2.value);
+ static_cast<decay_t<Function>&&>(f2.value)();
#if !defined(ASIO_NO_EXCEPTIONS)
}
catch (...)
@@ -68,7 +68,7 @@ template <typename Blocking, typename Relationship, typename Allocator>
template <typename Function>
inline void
basic_system_executor<Blocking, Relationship, Allocator>::do_execute(
- ASIO_MOVE_ARG(Function) f, execution::blocking_t::always_t) const
+ Function&& f, execution::blocking_t::always_t) const
{
// Obtain a non-const instance of the function.
detail::non_const_lvalue<Function> f2(f);
@@ -78,7 +78,7 @@ basic_system_executor<Blocking, Relationship, Allocator>::do_execute(
{
#endif// !defined(ASIO_NO_EXCEPTIONS)
detail::fenced_block b(detail::fenced_block::full);
- asio_handler_invoke_helpers::invoke(f2.value, f2.value);
+ static_cast<decay_t<Function>&&>(f2.value)();
#if !defined(ASIO_NO_EXCEPTIONS)
}
catch (...)
@@ -91,16 +91,15 @@ basic_system_executor<Blocking, Relationship, Allocator>::do_execute(
template <typename Blocking, typename Relationship, typename Allocator>
template <typename Function>
void basic_system_executor<Blocking, Relationship, Allocator>::do_execute(
- ASIO_MOVE_ARG(Function) f, execution::blocking_t::never_t) const
+ Function&& f, execution::blocking_t::never_t) const
{
system_context& ctx = detail::global<system_context>();
// Allocate and construct an operation to wrap the function.
- typedef typename decay<Function>::type function_type;
- typedef detail::executor_op<function_type, Allocator> op;
+ typedef detail::executor_op<decay_t<Function>, Allocator> op;
typename op::ptr p = { detail::addressof(allocator_),
op::ptr::allocate(allocator_), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), allocator_);
+ p.p = new (p.v) op(static_cast<Function&&>(f), allocator_);
if (is_same<Relationship, execution::relationship_t::continuation_t>::value)
{
@@ -121,7 +120,7 @@ void basic_system_executor<Blocking, Relationship, Allocator>::do_execute(
#if !defined(ASIO_NO_TS_EXECUTORS)
template <typename Blocking, typename Relationship, typename Allocator>
inline system_context& basic_system_executor<
- Blocking, Relationship, Allocator>::context() const ASIO_NOEXCEPT
+ Blocking, Relationship, Allocator>::context() const noexcept
{
return detail::global<system_context>();
}
@@ -129,25 +128,22 @@ inline system_context& basic_system_executor<
template <typename Blocking, typename Relationship, typename Allocator>
template <typename Function, typename OtherAllocator>
void basic_system_executor<Blocking, Relationship, Allocator>::dispatch(
- ASIO_MOVE_ARG(Function) f, const OtherAllocator&) const
+ Function&& f, const OtherAllocator&) const
{
- typename decay<Function>::type tmp(ASIO_MOVE_CAST(Function)(f));
- asio_handler_invoke_helpers::invoke(tmp, tmp);
+ decay_t<Function>(static_cast<Function&&>(f))();
}
template <typename Blocking, typename Relationship, typename Allocator>
template <typename Function, typename OtherAllocator>
void basic_system_executor<Blocking, Relationship, Allocator>::post(
- ASIO_MOVE_ARG(Function) f, const OtherAllocator& a) const
+ Function&& f, const OtherAllocator& a) const
{
- typedef typename decay<Function>::type function_type;
-
system_context& ctx = detail::global<system_context>();
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, OtherAllocator> op;
+ typedef detail::executor_op<decay_t<Function>, OtherAllocator> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), a);
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
ASIO_HANDLER_CREATION((ctx, *p.p,
"system_executor", &this->context(), 0, "post"));
@@ -159,16 +155,14 @@ void basic_system_executor<Blocking, Relationship, Allocator>::post(
template <typename Blocking, typename Relationship, typename Allocator>
template <typename Function, typename OtherAllocator>
void basic_system_executor<Blocking, Relationship, Allocator>::defer(
- ASIO_MOVE_ARG(Function) f, const OtherAllocator& a) const
+ Function&& f, const OtherAllocator& a) const
{
- typedef typename decay<Function>::type function_type;
-
system_context& ctx = detail::global<system_context>();
// Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, OtherAllocator> op;
+ typedef detail::executor_op<decay_t<Function>, OtherAllocator> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), a);
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
ASIO_HANDLER_CREATION((ctx, *p.p,
"system_executor", &this->context(), 0, "defer"));
diff --git a/3rdparty/asio/include/asio/impl/thread_pool.hpp b/3rdparty/asio/include/asio/impl/thread_pool.hpp
index 4a6d9d4ca38..3aed249781a 100644
--- a/3rdparty/asio/include/asio/impl/thread_pool.hpp
+++ b/3rdparty/asio/include/asio/impl/thread_pool.hpp
@@ -2,7 +2,7 @@
// impl/thread_pool.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,7 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/blocking_executor_op.hpp"
-#include "asio/detail/bulk_executor_op.hpp"
#include "asio/detail/executor_op.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/non_const_lvalue.hpp"
@@ -28,27 +27,21 @@
namespace asio {
inline thread_pool::executor_type
-thread_pool::get_executor() ASIO_NOEXCEPT
+thread_pool::get_executor() noexcept
{
return executor_type(*this);
}
inline thread_pool::executor_type
-thread_pool::executor() ASIO_NOEXCEPT
+thread_pool::executor() noexcept
{
return executor_type(*this);
}
-inline thread_pool::scheduler_type
-thread_pool::scheduler() ASIO_NOEXCEPT
-{
- return scheduler_type(*this);
-}
-
template <typename Allocator, unsigned int Bits>
thread_pool::basic_executor_type<Allocator, Bits>&
thread_pool::basic_executor_type<Allocator, Bits>::operator=(
- const basic_executor_type& other) ASIO_NOEXCEPT
+ const basic_executor_type& other) noexcept
{
if (this != &other)
{
@@ -67,11 +60,10 @@ thread_pool::basic_executor_type<Allocator, Bits>::operator=(
return *this;
}
-#if defined(ASIO_HAS_MOVE)
template <typename Allocator, unsigned int Bits>
thread_pool::basic_executor_type<Allocator, Bits>&
thread_pool::basic_executor_type<Allocator, Bits>::operator=(
- basic_executor_type&& other) ASIO_NOEXCEPT
+ basic_executor_type&& other) noexcept
{
if (this != &other)
{
@@ -88,11 +80,10 @@ thread_pool::basic_executor_type<Allocator, Bits>::operator=(
}
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
template <typename Allocator, unsigned int Bits>
inline bool thread_pool::basic_executor_type<Allocator,
- Bits>::running_in_this_thread() const ASIO_NOEXCEPT
+ Bits>::running_in_this_thread() const noexcept
{
return pool_->scheduler_.can_dispatch();
}
@@ -100,43 +91,39 @@ inline bool thread_pool::basic_executor_type<Allocator,
template <typename Allocator, unsigned int Bits>
template <typename Function>
void thread_pool::basic_executor_type<Allocator,
- Bits>::do_execute(ASIO_MOVE_ARG(Function) f, false_type) const
+ Bits>::do_execute(Function&& f, false_type) const
{
- typedef typename decay<Function>::type function_type;
+ typedef decay_t<Function> function_type;
// Invoke immediately if the blocking.possibly property is enabled and we are
// already inside the thread pool.
if ((bits_ & blocking_never) == 0 && pool_->scheduler_.can_dispatch())
{
// Make a local, non-const copy of the function.
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
+ function_type tmp(static_cast<Function&&>(f));
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR) \
- && !defined(ASIO_NO_EXCEPTIONS)
+#if !defined(ASIO_NO_EXCEPTIONS)
try
{
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- // && !defined(ASIO_NO_EXCEPTIONS)
+#endif // !defined(ASIO_NO_EXCEPTIONS)
detail::fenced_block b(detail::fenced_block::full);
- asio_handler_invoke_helpers::invoke(tmp, tmp);
+ static_cast<function_type&&>(tmp)();
return;
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR) \
- && !defined(ASIO_NO_EXCEPTIONS)
+#if !defined(ASIO_NO_EXCEPTIONS)
}
catch (...)
{
pool_->scheduler_.capture_current_exception();
return;
}
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- // && !defined(ASIO_NO_EXCEPTIONS)
+#endif // !defined(ASIO_NO_EXCEPTIONS)
}
// Allocate and construct an operation to wrap the function.
typedef detail::executor_op<function_type, Allocator> op;
typename op::ptr p = { detail::addressof(allocator_),
op::ptr::allocate(allocator_), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), allocator_);
+ p.p = new (p.v) op(static_cast<Function&&>(f), allocator_);
if ((bits_ & relationship_continuation) != 0)
{
@@ -157,7 +144,7 @@ void thread_pool::basic_executor_type<Allocator,
template <typename Allocator, unsigned int Bits>
template <typename Function>
void thread_pool::basic_executor_type<Allocator,
- Bits>::do_execute(ASIO_MOVE_ARG(Function) f, true_type) const
+ Bits>::do_execute(Function&& f, true_type) const
{
// Obtain a non-const instance of the function.
detail::non_const_lvalue<Function> f2(f);
@@ -170,7 +157,7 @@ void thread_pool::basic_executor_type<Allocator,
{
#endif // !defined(ASIO_NO_EXCEPTIONS)
detail::fenced_block b(detail::fenced_block::full);
- asio_handler_invoke_helpers::invoke(f2.value, f2.value);
+ static_cast<decay_t<Function>&&>(f2.value)();
return;
#if !defined(ASIO_NO_EXCEPTIONS)
}
@@ -182,7 +169,7 @@ void thread_pool::basic_executor_type<Allocator,
}
// Construct an operation to wrap the function.
- typedef typename decay<Function>::type function_type;
+ typedef decay_t<Function> function_type;
detail::blocking_executor_op<function_type> op(f2.value);
ASIO_HANDLER_CREATION((*pool_, op,
@@ -192,88 +179,24 @@ void thread_pool::basic_executor_type<Allocator,
op.wait();
}
-template <typename Allocator, unsigned int Bits>
-template <typename Function>
-void thread_pool::basic_executor_type<Allocator, Bits>::do_bulk_execute(
- ASIO_MOVE_ARG(Function) f, std::size_t n, false_type) const
-{
- typedef typename decay<Function>::type function_type;
- typedef detail::bulk_executor_op<function_type, Allocator> op;
-
- // Allocate and construct operations to wrap the function.
- detail::op_queue<detail::scheduler_operation> ops;
- for (std::size_t i = 0; i < n; ++i)
- {
- typename op::ptr p = { detail::addressof(allocator_),
- op::ptr::allocate(allocator_), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), allocator_, i);
- ops.push(p.p);
-
- if ((bits_ & relationship_continuation) != 0)
- {
- ASIO_HANDLER_CREATION((*pool_, *p.p,
- "thread_pool", pool_, 0, "bulk_execute(blk=never,rel=cont)"));
- }
- else
- {
- ASIO_HANDLER_CREATION((*pool_, *p.p,
- "thread_pool", pool_, 0, "bulk)execute(blk=never,rel=fork)"));
- }
-
- p.v = p.p = 0;
- }
-
- pool_->scheduler_.post_immediate_completions(n,
- ops, (bits_ & relationship_continuation) != 0);
-}
-
-template <typename Function>
-struct thread_pool_always_blocking_function_adapter
-{
- typename decay<Function>::type* f;
- std::size_t n;
-
- void operator()()
- {
- for (std::size_t i = 0; i < n; ++i)
- {
- (*f)(i);
- }
- }
-};
-
-template <typename Allocator, unsigned int Bits>
-template <typename Function>
-void thread_pool::basic_executor_type<Allocator, Bits>::do_bulk_execute(
- ASIO_MOVE_ARG(Function) f, std::size_t n, true_type) const
-{
- // Obtain a non-const instance of the function.
- detail::non_const_lvalue<Function> f2(f);
-
- thread_pool_always_blocking_function_adapter<Function>
- adapter = { detail::addressof(f2.value), n };
-
- this->do_execute(adapter, true_type());
-}
-
#if !defined(ASIO_NO_TS_EXECUTORS)
template <typename Allocator, unsigned int Bits>
inline thread_pool& thread_pool::basic_executor_type<
- Allocator, Bits>::context() const ASIO_NOEXCEPT
+ Allocator, Bits>::context() const noexcept
{
return *pool_;
}
template <typename Allocator, unsigned int Bits>
inline void thread_pool::basic_executor_type<Allocator,
- Bits>::on_work_started() const ASIO_NOEXCEPT
+ Bits>::on_work_started() const noexcept
{
pool_->scheduler_.work_started();
}
template <typename Allocator, unsigned int Bits>
inline void thread_pool::basic_executor_type<Allocator,
- Bits>::on_work_finished() const ASIO_NOEXCEPT
+ Bits>::on_work_finished() const noexcept
{
pool_->scheduler_.work_finished();
}
@@ -281,25 +204,25 @@ inline void thread_pool::basic_executor_type<Allocator,
template <typename Allocator, unsigned int Bits>
template <typename Function, typename OtherAllocator>
void thread_pool::basic_executor_type<Allocator, Bits>::dispatch(
- ASIO_MOVE_ARG(Function) f, const OtherAllocator& a) const
+ Function&& f, const OtherAllocator& a) const
{
- typedef typename decay<Function>::type function_type;
+ typedef decay_t<Function> function_type;
// Invoke immediately if we are already inside the thread pool.
if (pool_->scheduler_.can_dispatch())
{
// Make a local, non-const copy of the function.
- function_type tmp(ASIO_MOVE_CAST(Function)(f));
+ function_type tmp(static_cast<Function&&>(f));
detail::fenced_block b(detail::fenced_block::full);
- asio_handler_invoke_helpers::invoke(tmp, tmp);
+ static_cast<function_type&&>(tmp)();
return;
}
// Allocate and construct an operation to wrap the function.
typedef detail::executor_op<function_type, OtherAllocator> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), a);
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
ASIO_HANDLER_CREATION((*pool_, *p.p,
"thread_pool", pool_, 0, "dispatch"));
@@ -311,14 +234,14 @@ void thread_pool::basic_executor_type<Allocator, Bits>::dispatch(
template <typename Allocator, unsigned int Bits>
template <typename Function, typename OtherAllocator>
void thread_pool::basic_executor_type<Allocator, Bits>::post(
- ASIO_MOVE_ARG(Function) f, const OtherAllocator& a) const
+ Function&& f, const OtherAllocator& a) const
{
- typedef typename decay<Function>::type function_type;
+ typedef decay_t<Function> function_type;
// Allocate and construct an operation to wrap the function.
typedef detail::executor_op<function_type, OtherAllocator> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), a);
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
ASIO_HANDLER_CREATION((*pool_, *p.p,
"thread_pool", pool_, 0, "post"));
@@ -330,14 +253,14 @@ void thread_pool::basic_executor_type<Allocator, Bits>::post(
template <typename Allocator, unsigned int Bits>
template <typename Function, typename OtherAllocator>
void thread_pool::basic_executor_type<Allocator, Bits>::defer(
- ASIO_MOVE_ARG(Function) f, const OtherAllocator& a) const
+ Function&& f, const OtherAllocator& a) const
{
- typedef typename decay<Function>::type function_type;
+ typedef decay_t<Function> function_type;
// Allocate and construct an operation to wrap the function.
typedef detail::executor_op<function_type, OtherAllocator> op;
typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), a);
+ p.p = new (p.v) op(static_cast<Function&&>(f), a);
ASIO_HANDLER_CREATION((*pool_, *p.p,
"thread_pool", pool_, 0, "defer"));
diff --git a/3rdparty/asio/include/asio/impl/thread_pool.ipp b/3rdparty/asio/include/asio/impl/thread_pool.ipp
index 2e04d2afffc..3f327e4610b 100644
--- a/3rdparty/asio/include/asio/impl/thread_pool.ipp
+++ b/3rdparty/asio/include/asio/impl/thread_pool.ipp
@@ -2,7 +2,7 @@
// impl/thread_pool.ipp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -98,6 +98,7 @@ thread_pool::~thread_pool()
{
stop();
join();
+ shutdown();
}
void thread_pool::stop()
@@ -114,11 +115,11 @@ void thread_pool::attach()
void thread_pool::join()
{
- if (!threads_.empty())
- {
+ if (num_threads_)
scheduler_.work_finished();
+
+ if (!threads_.empty())
threads_.join();
- }
}
detail::scheduler& thread_pool::add_scheduler(detail::scheduler* s)
diff --git a/3rdparty/asio/include/asio/impl/use_awaitable.hpp b/3rdparty/asio/include/asio/impl/use_awaitable.hpp
index 2f5449f5428..3cd95165c4f 100644
--- a/3rdparty/asio/include/asio/impl/use_awaitable.hpp
+++ b/3rdparty/asio/include/asio/impl/use_awaitable.hpp
@@ -2,7 +2,7 @@
// impl/use_awaitable.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -258,21 +258,31 @@ class async_result<use_awaitable_t<Executor>, R(Args...)>
{
public:
typedef typename detail::awaitable_handler<
- Executor, typename decay<Args>::type...> handler_type;
+ Executor, decay_t<Args>...> handler_type;
typedef typename handler_type::awaitable_type return_type;
template <typename Initiation, typename... InitArgs>
- static return_type initiate(Initiation initiation,
- use_awaitable_t<Executor> u, InitArgs... args)
+#if defined(__APPLE_CC__) && (__clang_major__ == 13)
+ __attribute__((noinline))
+#endif // defined(__APPLE_CC__) && (__clang_major__ == 13)
+ static handler_type* do_init(
+ detail::awaitable_frame_base<Executor>* frame, Initiation& initiation,
+ use_awaitable_t<Executor> u, InitArgs&... args)
{
(void)u;
+ ASIO_HANDLER_LOCATION((u.file_name_, u.line_, u.function_name_));
+ handler_type handler(frame->detach_thread());
+ std::move(initiation)(std::move(handler), std::move(args)...);
+ return nullptr;
+ }
- co_await [&](auto* frame)
+ template <typename Initiation, typename... InitArgs>
+ static return_type initiate(Initiation initiation,
+ use_awaitable_t<Executor> u, InitArgs... args)
+ {
+ co_await [&] (auto* frame)
{
- ASIO_HANDLER_LOCATION((u.file_name_, u.line_, u.function_name_));
- handler_type handler(frame->detach_thread());
- std::move(initiation)(std::move(handler), std::move(args)...);
- return static_cast<handler_type*>(nullptr);
+ return do_init(frame, initiation, u, args...);
};
for (;;) {} // Never reached.
diff --git a/3rdparty/asio/include/asio/impl/use_future.hpp b/3rdparty/asio/include/asio/impl/use_future.hpp
index 4a35ab4754d..579b93f5f30 100644
--- a/3rdparty/asio/include/asio/impl/use_future.hpp
+++ b/3rdparty/asio/include/asio/impl/use_future.hpp
@@ -2,7 +2,7 @@
// impl/use_future.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -31,17 +31,15 @@
namespace asio {
namespace detail {
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename T, typename F, typename... Args>
inline void promise_invoke_and_set(std::promise<T>& p,
- F& f, ASIO_MOVE_ARG(Args)... args)
+ F& f, Args&&... args)
{
#if !defined(ASIO_NO_EXCEPTIONS)
try
#endif // !defined(ASIO_NO_EXCEPTIONS)
{
- p.set_value(f(ASIO_MOVE_CAST(Args)(args)...));
+ p.set_value(f(static_cast<Args&&>(args)...));
}
#if !defined(ASIO_NO_EXCEPTIONS)
catch (...)
@@ -53,13 +51,13 @@ inline void promise_invoke_and_set(std::promise<T>& p,
template <typename F, typename... Args>
inline void promise_invoke_and_set(std::promise<void>& p,
- F& f, ASIO_MOVE_ARG(Args)... args)
+ F& f, Args&&... args)
{
#if !defined(ASIO_NO_EXCEPTIONS)
try
#endif // !defined(ASIO_NO_EXCEPTIONS)
{
- f(ASIO_MOVE_CAST(Args)(args)...);
+ f(static_cast<Args&&>(args)...);
p.set_value();
}
#if !defined(ASIO_NO_EXCEPTIONS)
@@ -70,112 +68,15 @@ inline void promise_invoke_and_set(std::promise<void>& p,
#endif // !defined(ASIO_NO_EXCEPTIONS)
}
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename F>
-inline void promise_invoke_and_set(std::promise<T>& p, F& f)
-{
-#if !defined(ASIO_NO_EXCEPTIONS)
- try
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- {
- p.set_value(f());
- }
-#if !defined(ASIO_NO_EXCEPTIONS)
- catch (...)
- {
- p.set_exception(std::current_exception());
- }
-#endif // !defined(ASIO_NO_EXCEPTIONS)
-}
-
-template <typename F, typename Args>
-inline void promise_invoke_and_set(std::promise<void>& p, F& f)
-{
-#if !defined(ASIO_NO_EXCEPTIONS)
- try
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- {
- f();
- p.set_value();
-#if !defined(ASIO_NO_EXCEPTIONS)
- }
- catch (...)
- {
- p.set_exception(std::current_exception());
- }
-#endif // !defined(ASIO_NO_EXCEPTIONS)
-}
-
-#if defined(ASIO_NO_EXCEPTIONS)
-
-#define ASIO_PRIVATE_PROMISE_INVOKE_DEF(n) \
- template <typename T, typename F, ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<T>& p, \
- F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- p.set_value(f(ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- \
- template <typename F, ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<void>& p, \
- F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- f(ASIO_VARIADIC_MOVE_ARGS(n)); \
- p.set_value(); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_PROMISE_INVOKE_DEF)
-#undef ASIO_PRIVATE_PROMISE_INVOKE_DEF
-
-#else // defined(ASIO_NO_EXCEPTIONS)
-
-#define ASIO_PRIVATE_PROMISE_INVOKE_DEF(n) \
- template <typename T, typename F, ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<T>& p, \
- F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- try \
- { \
- p.set_value(f(ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- catch (...) \
- { \
- p.set_exception(std::current_exception()); \
- } \
- } \
- \
- template <typename F, ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<void>& p, \
- F& f, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- try \
- { \
- f(ASIO_VARIADIC_MOVE_ARGS(n)); \
- p.set_value(); \
- } \
- catch (...) \
- { \
- p.set_exception(std::current_exception()); \
- } \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_PROMISE_INVOKE_DEF)
-#undef ASIO_PRIVATE_PROMISE_INVOKE_DEF
-
-#endif // defined(ASIO_NO_EXCEPTIONS)
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
// A function object adapter to invoke a nullary function object and capture
// any exception thrown into a promise.
template <typename T, typename F>
class promise_invoker
{
public:
- promise_invoker(const shared_ptr<std::promise<T> >& p,
- ASIO_MOVE_ARG(F) f)
- : p_(p), f_(ASIO_MOVE_CAST(F)(f))
+ promise_invoker(const shared_ptr<std::promise<T>>& p,
+ F&& f)
+ : p_(p), f_(static_cast<F&&>(f))
{
}
@@ -196,8 +97,8 @@ public:
}
private:
- shared_ptr<std::promise<T> > p_;
- typename decay<F>::type f_;
+ shared_ptr<std::promise<T>> p_;
+ decay_t<F> f_;
};
// An executor that adapts the system_executor to capture any exeption thrown
@@ -206,12 +107,17 @@ template <typename T, typename Blocking = execution::blocking_t::possibly_t>
class promise_executor
{
public:
- explicit promise_executor(const shared_ptr<std::promise<T> >& p)
+ explicit promise_executor(const shared_ptr<std::promise<T>>& p)
: p_(p)
{
}
- static ASIO_CONSTEXPR Blocking query(execution::blocking_t)
+ execution_context& query(execution::context_t) const noexcept
+ {
+ return asio::query(system_executor(), execution::context);
+ }
+
+ static constexpr Blocking query(execution::blocking_t)
{
return Blocking();
}
@@ -229,57 +135,56 @@ public:
}
template <typename F>
- void execute(ASIO_MOVE_ARG(F) f) const
+ void execute(F&& f) const
{
- execution::execute(
- asio::require(system_executor(), Blocking()),
- promise_invoker<T, F>(p_, ASIO_MOVE_CAST(F)(f)));
+ asio::require(system_executor(), Blocking()).execute(
+ promise_invoker<T, F>(p_, static_cast<F&&>(f)));
}
#if !defined(ASIO_NO_TS_EXECUTORS)
- execution_context& context() const ASIO_NOEXCEPT
+ execution_context& context() const noexcept
{
return system_executor().context();
}
- void on_work_started() const ASIO_NOEXCEPT {}
- void on_work_finished() const ASIO_NOEXCEPT {}
+ void on_work_started() const noexcept {}
+ void on_work_finished() const noexcept {}
template <typename F, typename A>
- void dispatch(ASIO_MOVE_ARG(F) f, const A&) const
+ void dispatch(F&& f, const A&) const
{
- promise_invoker<T, F>(p_, ASIO_MOVE_CAST(F)(f))();
+ promise_invoker<T, F>(p_, static_cast<F&&>(f))();
}
template <typename F, typename A>
- void post(ASIO_MOVE_ARG(F) f, const A& a) const
+ void post(F&& f, const A& a) const
{
system_executor().post(
- promise_invoker<T, F>(p_, ASIO_MOVE_CAST(F)(f)), a);
+ promise_invoker<T, F>(p_, static_cast<F&&>(f)), a);
}
template <typename F, typename A>
- void defer(ASIO_MOVE_ARG(F) f, const A& a) const
+ void defer(F&& f, const A& a) const
{
system_executor().defer(
- promise_invoker<T, F>(p_, ASIO_MOVE_CAST(F)(f)), a);
+ promise_invoker<T, F>(p_, static_cast<F&&>(f)), a);
}
#endif // !defined(ASIO_NO_TS_EXECUTORS)
friend bool operator==(const promise_executor& a,
- const promise_executor& b) ASIO_NOEXCEPT
+ const promise_executor& b) noexcept
{
return a.p_ == b.p_;
}
friend bool operator!=(const promise_executor& a,
- const promise_executor& b) ASIO_NOEXCEPT
+ const promise_executor& b) noexcept
{
return a.p_ != b.p_;
}
private:
- shared_ptr<std::promise<T> > p_;
+ shared_ptr<std::promise<T>> p_;
};
// The base class for all completion handlers that create promises.
@@ -289,7 +194,7 @@ class promise_creator
public:
typedef promise_executor<T> executor_type;
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return executor_type(p_);
}
@@ -309,7 +214,7 @@ protected:
p_ = std::allocate_shared<std::promise<T>>(b, std::allocator_arg, b);
}
- shared_ptr<std::promise<T> > p_;
+ shared_ptr<std::promise<T>> p_;
};
// For completion signature void().
@@ -368,9 +273,9 @@ class promise_handler_1
{
public:
template <typename Arg>
- void operator()(ASIO_MOVE_ARG(Arg) arg)
+ void operator()(Arg&& arg)
{
- this->p_->set_value(ASIO_MOVE_CAST(Arg)(arg));
+ this->p_->set_value(static_cast<Arg&&>(arg));
}
};
@@ -382,7 +287,7 @@ class promise_handler_ec_1
public:
template <typename Arg>
void operator()(const asio::error_code& ec,
- ASIO_MOVE_ARG(Arg) arg)
+ Arg&& arg)
{
if (ec)
{
@@ -391,7 +296,7 @@ public:
asio::system_error(ec)));
}
else
- this->p_->set_value(ASIO_MOVE_CAST(Arg)(arg));
+ this->p_->set_value(static_cast<Arg&&>(arg));
}
};
@@ -403,12 +308,12 @@ class promise_handler_ex_1
public:
template <typename Arg>
void operator()(const std::exception_ptr& ex,
- ASIO_MOVE_ARG(Arg) arg)
+ Arg&& arg)
{
if (ex)
this->p_->set_exception(ex);
else
- this->p_->set_value(ASIO_MOVE_CAST(Arg)(arg));
+ this->p_->set_value(static_cast<Arg&&>(arg));
}
};
@@ -418,31 +323,13 @@ class promise_handler_n
: public promise_creator<T>
{
public:
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... Args>
- void operator()(ASIO_MOVE_ARG(Args)... args)
+ void operator()(Args&&... args)
{
this->p_->set_value(
std::forward_as_tuple(
- ASIO_MOVE_CAST(Args)(args)...));
+ static_cast<Args&&>(args)...));
}
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- this->p_->set_value( \
- std::forward_as_tuple( \
- ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
-#undef ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
};
// For completion signature void(error_code, T1, ..., Tn);
@@ -451,11 +338,8 @@ class promise_handler_ec_n
: public promise_creator<T>
{
public:
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... Args>
- void operator()(const asio::error_code& ec,
- ASIO_MOVE_ARG(Args)... args)
+ void operator()(const asio::error_code& ec, Args&&... args)
{
if (ec)
{
@@ -467,35 +351,9 @@ public:
{
this->p_->set_value(
std::forward_as_tuple(
- ASIO_MOVE_CAST(Args)(args)...));
+ static_cast<Args&&>(args)...));
}
}
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(const asio::error_code& ec, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- if (ec) \
- { \
- this->p_->set_exception( \
- std::make_exception_ptr( \
- asio::system_error(ec))); \
- } \
- else \
- { \
- this->p_->set_value( \
- std::forward_as_tuple( \
- ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
-#undef ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
};
// For completion signature void(exception_ptr, T1, ..., Tn);
@@ -504,11 +362,9 @@ class promise_handler_ex_n
: public promise_creator<T>
{
public:
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... Args>
void operator()(const std::exception_ptr& ex,
- ASIO_MOVE_ARG(Args)... args)
+ Args&&... args)
{
if (ex)
this->p_->set_exception(ex);
@@ -516,31 +372,9 @@ public:
{
this->p_->set_value(
std::forward_as_tuple(
- ASIO_MOVE_CAST(Args)(args)...));
+ static_cast<Args&&>(args)...));
}
}
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(const std::exception_ptr& ex, \
- ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- if (ex) \
- this->p_->set_exception(ex); \
- else \
- { \
- this->p_->set_value( \
- std::forward_as_tuple( \
- ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
-#undef ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
};
// Helper template to choose the appropriate concrete promise handler
@@ -571,45 +405,17 @@ template <typename Arg>
class promise_handler_selector<void(std::exception_ptr, Arg)>
: public promise_handler_ex_1<Arg> {};
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... Arg>
class promise_handler_selector<void(Arg...)>
- : public promise_handler_n<std::tuple<Arg...> > {};
+ : public promise_handler_n<std::tuple<Arg...>> {};
template <typename... Arg>
class promise_handler_selector<void(asio::error_code, Arg...)>
- : public promise_handler_ec_n<std::tuple<Arg...> > {};
+ : public promise_handler_ec_n<std::tuple<Arg...>> {};
template <typename... Arg>
class promise_handler_selector<void(std::exception_ptr, Arg...)>
- : public promise_handler_ex_n<std::tuple<Arg...> > {};
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define ASIO_PRIVATE_PROMISE_SELECTOR_DEF(n) \
- template <typename Arg, ASIO_VARIADIC_TPARAMS(n)> \
- class promise_handler_selector< \
- void(Arg, ASIO_VARIADIC_TARGS(n))> \
- : public promise_handler_n< \
- std::tuple<Arg, ASIO_VARIADIC_TARGS(n)> > {}; \
- \
- template <typename Arg, ASIO_VARIADIC_TPARAMS(n)> \
- class promise_handler_selector< \
- void(asio::error_code, Arg, ASIO_VARIADIC_TARGS(n))> \
- : public promise_handler_ec_n< \
- std::tuple<Arg, ASIO_VARIADIC_TARGS(n)> > {}; \
- \
- template <typename Arg, ASIO_VARIADIC_TPARAMS(n)> \
- class promise_handler_selector< \
- void(std::exception_ptr, Arg, ASIO_VARIADIC_TARGS(n))> \
- : public promise_handler_ex_n< \
- std::tuple<Arg, ASIO_VARIADIC_TARGS(n)> > {}; \
- /**/
- ASIO_VARIADIC_GENERATE_5(ASIO_PRIVATE_PROMISE_SELECTOR_DEF)
-#undef ASIO_PRIVATE_PROMISE_SELECTOR_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+ : public promise_handler_ex_n<std::tuple<Arg...>> {};
// Completion handlers produced from the use_future completion token, when not
// using use_future::operator().
@@ -627,7 +433,7 @@ public:
this->create_promise(allocator_);
}
- allocator_type get_allocator() const ASIO_NOEXCEPT
+ allocator_type get_allocator() const noexcept
{
return allocator_;
}
@@ -640,7 +446,7 @@ template <typename Function>
struct promise_function_wrapper
{
explicit promise_function_wrapper(Function& f)
- : function_(ASIO_MOVE_CAST(Function)(f))
+ : function_(static_cast<Function&&>(f))
{
}
@@ -657,28 +463,6 @@ struct promise_function_wrapper
Function function_;
};
-#if !defined(ASIO_NO_DEPRECATED)
-
-template <typename Function, typename Signature, typename Allocator>
-inline void asio_handler_invoke(Function& f,
- promise_handler<Signature, Allocator>* h)
-{
- typename promise_handler<Signature, Allocator>::executor_type
- ex(h->get_executor());
- asio::dispatch(ex, promise_function_wrapper<Function>(f));
-}
-
-template <typename Function, typename Signature, typename Allocator>
-inline void asio_handler_invoke(const Function& f,
- promise_handler<Signature, Allocator>* h)
-{
- typename promise_handler<Signature, Allocator>::executor_type
- ex(h->get_executor());
- asio::dispatch(ex, promise_function_wrapper<Function>(f));
-}
-
-#endif // !defined(ASIO_NO_DEPRECATED)
-
// Helper base class for async_result specialisation.
template <typename Signature, typename Allocator>
class promise_async_result
@@ -694,7 +478,7 @@ public:
return_type get()
{
- return ASIO_MOVE_CAST(return_type)(future_);
+ return static_cast<return_type&&>(future_);
}
private:
@@ -707,7 +491,7 @@ class packaged_token
{
public:
packaged_token(Function f, const Allocator& a)
- : function_(ASIO_MOVE_CAST(Function)(f)),
+ : function_(static_cast<Function&&>(f)),
allocator_(a)
{
}
@@ -728,75 +512,29 @@ public:
typedef void result_type;
packaged_handler(packaged_token<Function, Allocator> t)
- : function_(ASIO_MOVE_CAST(Function)(t.function_)),
+ : function_(static_cast<Function&&>(t.function_)),
allocator_(t.allocator_)
{
this->create_promise(allocator_);
}
- allocator_type get_allocator() const ASIO_NOEXCEPT
+ allocator_type get_allocator() const noexcept
{
return allocator_;
}
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... Args>
- void operator()(ASIO_MOVE_ARG(Args)... args)
+ void operator()(Args&&... args)
{
(promise_invoke_and_set)(*this->p_,
- function_, ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- void operator()()
- {
- (promise_invoke_and_set)(*this->p_, function_);
+ function_, static_cast<Args&&>(args)...);
}
-#define ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- (promise_invoke_and_set)(*this->p_, \
- function_, ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_CALL_OP_DEF)
-#undef ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
private:
Function function_;
Allocator allocator_;
};
-#if !defined(ASIO_NO_DEPRECATED)
-
-template <typename Function,
- typename Function1, typename Allocator, typename Result>
-inline void asio_handler_invoke(Function& f,
- packaged_handler<Function1, Allocator, Result>* h)
-{
- typename packaged_handler<Function1, Allocator, Result>::executor_type
- ex(h->get_executor());
- asio::dispatch(ex, promise_function_wrapper<Function>(f));
-}
-
-template <typename Function,
- typename Function1, typename Allocator, typename Result>
-inline void asio_handler_invoke(const Function& f,
- packaged_handler<Function1, Allocator, Result>* h)
-{
- typename packaged_handler<Function1, Allocator, Result>::executor_type
- ex(h->get_executor());
- asio::dispatch(ex, promise_function_wrapper<Function>(f));
-}
-
-#endif // !defined(ASIO_NO_DEPRECATED)
-
// Helper base class for async_result specialisation.
template <typename Function, typename Allocator, typename Result>
class packaged_async_result
@@ -812,7 +550,7 @@ public:
return_type get()
{
- return ASIO_MOVE_CAST(return_type)(future_);
+ return static_cast<return_type&&>(future_);
}
private:
@@ -822,28 +560,26 @@ private:
} // namespace detail
template <typename Allocator> template <typename Function>
-inline detail::packaged_token<typename decay<Function>::type, Allocator>
-use_future_t<Allocator>::operator()(ASIO_MOVE_ARG(Function) f) const
+inline detail::packaged_token<decay_t<Function>, Allocator>
+use_future_t<Allocator>::operator()(Function&& f) const
{
- return detail::packaged_token<typename decay<Function>::type, Allocator>(
- ASIO_MOVE_CAST(Function)(f), allocator_);
+ return detail::packaged_token<decay_t<Function>, Allocator>(
+ static_cast<Function&&>(f), allocator_);
}
#if !defined(GENERATING_DOCUMENTATION)
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename Allocator, typename Result, typename... Args>
class async_result<use_future_t<Allocator>, Result(Args...)>
: public detail::promise_async_result<
- void(typename decay<Args>::type...), Allocator>
+ void(decay_t<Args>...), Allocator>
{
public:
explicit async_result(
- typename detail::promise_async_result<void(typename decay<Args>::type...),
+ typename detail::promise_async_result<void(decay_t<Args>...),
Allocator>::completion_handler_type& h)
: detail::promise_async_result<
- void(typename decay<Args>::type...), Allocator>(h)
+ void(decay_t<Args>...), Allocator>(h)
{
}
};
@@ -852,100 +588,28 @@ template <typename Function, typename Allocator,
typename Result, typename... Args>
class async_result<detail::packaged_token<Function, Allocator>, Result(Args...)>
: public detail::packaged_async_result<Function, Allocator,
- typename result_of<Function(Args...)>::type>
-{
-public:
- explicit async_result(
- typename detail::packaged_async_result<Function, Allocator,
- typename result_of<Function(Args...)>::type>::completion_handler_type& h)
- : detail::packaged_async_result<Function, Allocator,
- typename result_of<Function(Args...)>::type>(h)
- {
- }
-};
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Allocator, typename Result>
-class async_result<use_future_t<Allocator>, Result()>
- : public detail::promise_async_result<void(), Allocator>
-{
-public:
- explicit async_result(
- typename detail::promise_async_result<
- void(), Allocator>::completion_handler_type& h)
- : detail::promise_async_result<void(), Allocator>(h)
- {
- }
-};
-
-template <typename Function, typename Allocator, typename Result>
-class async_result<detail::packaged_token<Function, Allocator>, Result()>
- : public detail::packaged_async_result<Function, Allocator,
- typename result_of<Function()>::type>
+ result_of_t<Function(Args...)>>
{
public:
explicit async_result(
typename detail::packaged_async_result<Function, Allocator,
- typename result_of<Function()>::type>::completion_handler_type& h)
+ result_of_t<Function(Args...)>>::completion_handler_type& h)
: detail::packaged_async_result<Function, Allocator,
- typename result_of<Function()>::type>(h)
+ result_of_t<Function(Args...)>>(h)
{
}
};
-#define ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \
- template <typename Allocator, \
- typename Result, ASIO_VARIADIC_TPARAMS(n)> \
- class async_result<use_future_t<Allocator>, \
- Result(ASIO_VARIADIC_TARGS(n))> \
- : public detail::promise_async_result< \
- void(ASIO_VARIADIC_DECAY(n)), Allocator> \
- { \
- public: \
- explicit async_result( \
- typename detail::promise_async_result< \
- void(ASIO_VARIADIC_DECAY(n)), \
- Allocator>::completion_handler_type& h) \
- : detail::promise_async_result< \
- void(ASIO_VARIADIC_DECAY(n)), Allocator>(h) \
- { \
- } \
- }; \
- \
- template <typename Function, typename Allocator, \
- typename Result, ASIO_VARIADIC_TPARAMS(n)> \
- class async_result<detail::packaged_token<Function, Allocator>, \
- Result(ASIO_VARIADIC_TARGS(n))> \
- : public detail::packaged_async_result<Function, Allocator, \
- typename result_of<Function(ASIO_VARIADIC_TARGS(n))>::type> \
- { \
- public: \
- explicit async_result( \
- typename detail::packaged_async_result<Function, Allocator, \
- typename result_of<Function(ASIO_VARIADIC_TARGS(n))>::type \
- >::completion_handler_type& h) \
- : detail::packaged_async_result<Function, Allocator, \
- typename result_of<Function(ASIO_VARIADIC_TARGS(n))>::type>(h) \
- { \
- } \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ASYNC_RESULT_DEF)
-#undef ASIO_PRIVATE_ASYNC_RESULT_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
namespace traits {
#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
template <typename T, typename Blocking>
struct equality_comparable<
- asio::detail::promise_executor<T, Blocking> >
+ asio::detail::promise_executor<T, Blocking>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -956,14 +620,14 @@ template <typename T, typename Blocking, typename Function>
struct execute_member<
asio::detail::promise_executor<T, Blocking>, Function>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_TRAIT)
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
template <typename T, typename Blocking, typename Property>
struct query_static_constexpr_member<
@@ -977,17 +641,32 @@ struct query_static_constexpr_member<
>::type
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Blocking result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return Blocking();
}
};
-#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_TRAIT)
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <typename T, typename Blocking>
+struct query_member<
+ asio::detail::promise_executor<T, Blocking>,
+ execution::context_t
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef asio::system_context& result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
@@ -997,8 +676,8 @@ struct require_member<
execution::blocking_t::possibly_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::detail::promise_executor<T,
execution::blocking_t::possibly_t> result_type;
};
@@ -1009,8 +688,8 @@ struct require_member<
execution::blocking_t::never_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::detail::promise_executor<T,
execution::blocking_t::never_t> result_type;
};
diff --git a/3rdparty/asio/include/asio/impl/write.hpp b/3rdparty/asio/include/asio/impl/write.hpp
index 67eb093f894..af2bb5544bb 100644
--- a/3rdparty/asio/include/asio/impl/write.hpp
+++ b/3rdparty/asio/include/asio/impl/write.hpp
@@ -2,7 +2,7 @@
// impl/write.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,16 +17,13 @@
#include "asio/associator.hpp"
#include "asio/buffer.hpp"
-#include "asio/completion_condition.hpp"
#include "asio/detail/array_fwd.hpp"
#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/base_from_completion_cond.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/consuming_buffers.hpp"
#include "asio/detail/dependent_type.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/non_const_lvalue.hpp"
@@ -40,7 +37,7 @@ namespace detail
{
template <typename SyncWriteStream, typename ConstBufferSequence,
typename ConstBufferIterator, typename CompletionCondition>
- std::size_t write_buffer_sequence(SyncWriteStream& s,
+ std::size_t write(SyncWriteStream& s,
const ConstBufferSequence& buffers, const ConstBufferIterator&,
CompletionCondition completion_condition, asio::error_code& ec)
{
@@ -63,20 +60,20 @@ template <typename SyncWriteStream, typename ConstBufferSequence,
typename CompletionCondition>
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type)
+ >)
{
- return detail::write_buffer_sequence(s, buffers,
+ return detail::write(s, buffers,
asio::buffer_sequence_begin(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncWriteStream, typename ConstBufferSequence>
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
- typename constraint<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = write(s, buffers, transfer_all(), ec);
@@ -87,9 +84,9 @@ inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
template <typename SyncWriteStream, typename ConstBufferSequence>
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type)
+ >)
{
return write(s, buffers, transfer_all(), ec);
}
@@ -98,13 +95,13 @@ template <typename SyncWriteStream, typename ConstBufferSequence,
typename CompletionCondition>
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
- typename constraint<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = write(s, buffers,
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "write");
return bytes_transferred;
}
@@ -114,37 +111,37 @@ inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
template <typename SyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
- typename decay<DynamicBuffer_v1>::type b(
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers));
+ decay_t<DynamicBuffer_v1> b(
+ static_cast<DynamicBuffer_v1&&>(buffers));
std::size_t bytes_transferred = write(s, b.data(),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
b.consume(bytes_transferred);
return bytes_transferred;
}
template <typename SyncWriteStream, typename DynamicBuffer_v1>
inline std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ DynamicBuffer_v1&& buffers,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = write(s,
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ static_cast<DynamicBuffer_v1&&>(buffers),
transfer_all(), ec);
asio::detail::throw_error(ec, "write");
return bytes_transferred;
@@ -152,35 +149,35 @@ inline std::size_t write(SyncWriteStream& s,
template <typename SyncWriteStream, typename DynamicBuffer_v1>
inline std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
-{
- return write(s, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
+{
+ return write(s, static_cast<DynamicBuffer_v1&&>(buffers),
transfer_all(), ec);
}
template <typename SyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition>
inline std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ >,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = write(s,
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "write");
return bytes_transferred;
}
@@ -195,7 +192,7 @@ inline std::size_t write(SyncWriteStream& s,
CompletionCondition completion_condition, asio::error_code& ec)
{
return write(s, basic_streambuf_ref<Allocator>(b),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncWriteStream, typename Allocator>
@@ -220,7 +217,7 @@ inline std::size_t write(SyncWriteStream& s,
CompletionCondition completion_condition)
{
return write(s, basic_streambuf_ref<Allocator>(b),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ static_cast<CompletionCondition&&>(completion_condition));
}
#endif // !defined(ASIO_NO_IOSTREAM)
@@ -231,25 +228,25 @@ template <typename SyncWriteStream, typename DynamicBuffer_v2,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
std::size_t bytes_transferred = write(s, buffers.data(0, buffers.size()),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
buffers.consume(bytes_transferred);
return bytes_transferred;
}
template <typename SyncWriteStream, typename DynamicBuffer_v2>
inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = write(s,
- ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ static_cast<DynamicBuffer_v2&&>(buffers),
transfer_all(), ec);
asio::detail::throw_error(ec, "write");
return bytes_transferred;
@@ -258,11 +255,11 @@ inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
template <typename SyncWriteStream, typename DynamicBuffer_v2>
inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
- return write(s, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
+ return write(s, static_cast<DynamicBuffer_v2&&>(buffers),
transfer_all(), ec);
}
@@ -270,14 +267,14 @@ template <typename SyncWriteStream, typename DynamicBuffer_v2,
typename CompletionCondition>
inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
+ >)
{
asio::error_code ec;
std::size_t bytes_transferred = write(s,
- ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "write");
return bytes_transferred;
}
@@ -300,11 +297,10 @@ namespace detail
stream_(stream),
buffers_(buffers),
start_(0),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
write_op(const write_op& other)
: base_from_cancellation_state<WriteHandler>(other),
base_from_completion_cond<CompletionCondition>(other),
@@ -317,18 +313,15 @@ namespace detail
write_op(write_op&& other)
: base_from_cancellation_state<WriteHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- WriteHandler>)(other)),
+ static_cast<base_from_cancellation_state<WriteHandler>&&>(other)),
base_from_completion_cond<CompletionCondition>(
- ASIO_MOVE_CAST(base_from_completion_cond<
- CompletionCondition>)(other)),
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(buffers_type)(other.buffers_)),
+ buffers_(static_cast<buffers_type&&>(other.buffers_)),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ handler_(static_cast<WriteHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -343,7 +336,7 @@ namespace detail
{
ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_write"));
stream_.async_write_some(buffers_.prepare(max_size),
- ASIO_MOVE_CAST(write_op)(*this));
+ static_cast<write_op&&>(*this));
}
return; default:
buffers_.consume(bytes_transferred);
@@ -359,7 +352,7 @@ namespace detail
}
}
- ASIO_MOVE_OR_LVALUE(WriteHandler)(handler_)(
+ static_cast<WriteHandler&&>(handler_)(
static_cast<const asio::error_code&>(ec),
static_cast<const std::size_t&>(buffers_.total_consumed()));
}
@@ -378,38 +371,6 @@ namespace detail
template <typename AsyncWriteStream, typename ConstBufferSequence,
typename ConstBufferIterator, typename CompletionCondition,
typename WriteHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename ConstBufferIterator, typename CompletionCondition,
- typename WriteHandler>
inline bool asio_handler_is_continuation(
write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
CompletionCondition, WriteHandler>* this_handler)
@@ -419,40 +380,10 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncWriteStream,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncWriteStream,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncWriteStream, typename ConstBufferSequence,
typename ConstBufferIterator, typename CompletionCondition,
typename WriteHandler>
- inline void start_write_buffer_sequence_op(AsyncWriteStream& stream,
+ inline void start_write_op(AsyncWriteStream& stream,
const ConstBufferSequence& buffers, const ConstBufferIterator&,
CompletionCondition& completion_condition, WriteHandler& handler)
{
@@ -463,26 +394,26 @@ namespace detail
}
template <typename AsyncWriteStream>
- class initiate_async_write_buffer_sequence
+ class initiate_async_write
{
public:
typedef typename AsyncWriteStream::executor_type executor_type;
- explicit initiate_async_write_buffer_sequence(AsyncWriteStream& stream)
+ explicit initiate_async_write(AsyncWriteStream& stream)
: stream_(stream)
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence,
typename CompletionCondition>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ CompletionCondition&& completion_cond) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a WriteHandler.
@@ -490,7 +421,7 @@ namespace detail
non_const_lvalue<WriteHandler> handler2(handler);
non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
- start_write_buffer_sequence_op(stream_, buffers,
+ start_write_op(stream_, buffers,
asio::buffer_sequence_begin(buffers),
completion_cond2.value, handler2.value);
}
@@ -514,8 +445,16 @@ struct associator<Associator,
{
static typename Associator<WriteHandler, DefaultCandidate>::type get(
const detail::write_op<AsyncWriteStream, ConstBufferSequence,
+ ConstBufferIterator, CompletionCondition, WriteHandler>& h) noexcept
+ {
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::write_op<AsyncWriteStream, ConstBufferSequence,
ConstBufferIterator, CompletionCondition, WriteHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -526,38 +465,44 @@ struct associator<Associator,
template <typename AsyncWriteStream,
typename ConstBufferSequence, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename constraint<
+ 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
- >::type)
-{
- return async_initiate<WriteHandler,
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write<AsyncWriteStream>>(),
+ token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
+{
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- detail::initiate_async_write_buffer_sequence<AsyncWriteStream>(s),
- handler, buffers,
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ detail::initiate_async_write<AsyncWriteStream>(s),
+ token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncWriteStream, typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename constraint<
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
+ const ConstBufferSequence& buffers, WriteToken&& token,
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type)
-{
- return async_initiate<WriteHandler,
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write<AsyncWriteStream>>(),
+ token, buffers, transfer_all()))
+{
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- detail::initiate_async_write_buffer_sequence<AsyncWriteStream>(s),
- handler, buffers, transfer_all());
+ detail::initiate_async_write<AsyncWriteStream>(s),
+ token, buffers, transfer_all());
}
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -571,17 +516,16 @@ namespace detail
public:
template <typename BufferSequence>
write_dynbuf_v1_op(AsyncWriteStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ BufferSequence&& buffers,
CompletionCondition& completion_condition, WriteHandler& handler)
: stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
completion_condition_(
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition)),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ static_cast<CompletionCondition&&>(completion_condition)),
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
write_dynbuf_v1_op(const write_dynbuf_v1_op& other)
: stream_(other.stream_),
buffers_(other.buffers_),
@@ -592,14 +536,13 @@ namespace detail
write_dynbuf_v1_op(write_dynbuf_v1_op&& other)
: stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v1&&>(other.buffers_)),
completion_condition_(
- ASIO_MOVE_CAST(CompletionCondition)(
+ static_cast<CompletionCondition&&>(
other.completion_condition_)),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ handler_(static_cast<WriteHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(const asio::error_code& ec,
std::size_t bytes_transferred, int start = 0)
@@ -608,11 +551,11 @@ namespace detail
{
case 1:
async_write(stream_, buffers_.data(),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition_),
- ASIO_MOVE_CAST(write_dynbuf_v1_op)(*this));
+ static_cast<CompletionCondition&&>(completion_condition_),
+ static_cast<write_dynbuf_v1_op&&>(*this));
return; default:
buffers_.consume(bytes_transferred);
- ASIO_MOVE_OR_LVALUE(WriteHandler)(handler_)(ec,
+ static_cast<WriteHandler&&>(handler_)(ec,
static_cast<const std::size_t&>(bytes_transferred));
}
}
@@ -626,36 +569,6 @@ namespace detail
template <typename AsyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition, typename WriteHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
- CompletionCondition, WriteHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncWriteStream, typename DynamicBuffer_v1,
- typename CompletionCondition, typename WriteHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncWriteStream, typename DynamicBuffer_v1,
- typename CompletionCondition, typename WriteHandler>
inline bool asio_handler_is_continuation(
write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
CompletionCondition, WriteHandler>* this_handler)
@@ -664,36 +577,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncWriteStream,
- typename DynamicBuffer_v1, typename CompletionCondition,
- typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncWriteStream,
- typename DynamicBuffer_v1, typename CompletionCondition,
- typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncWriteStream>
class initiate_async_write_dynbuf_v1
{
@@ -705,16 +588,16 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename WriteHandler, typename DynamicBuffer_v1,
typename CompletionCondition>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ void operator()(WriteHandler&& handler,
+ DynamicBuffer_v1&& buffers,
+ CompletionCondition&& completion_cond) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a WriteHandler.
@@ -723,9 +606,9 @@ namespace detail
non_const_lvalue<WriteHandler> handler2(handler);
non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
write_dynbuf_v1_op<AsyncWriteStream,
- typename decay<DynamicBuffer_v1>::type,
- CompletionCondition, typename decay<WriteHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
+ decay_t<DynamicBuffer_v1>,
+ CompletionCondition, decay_t<WriteHandler>>(
+ stream_, static_cast<DynamicBuffer_v1&&>(buffers),
completion_cond2.value, handler2.value)(
asio::error_code(), 0, 1);
}
@@ -748,9 +631,17 @@ struct associator<Associator,
: Associator<WriteHandler, DefaultCandidate>
{
static typename Associator<WriteHandler, DefaultCandidate>::type get(
+ const detail::write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
+ CompletionCondition, WriteHandler>& h) noexcept
+ {
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
const detail::write_dynbuf_v1_op<AsyncWriteStream,
DynamicBuffer_v1, CompletionCondition, WriteHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -760,46 +651,53 @@ struct associator<Associator,
template <typename AsyncWriteStream, typename DynamicBuffer_v1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
-{
- return async_write(s,
- ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
- transfer_all(), ASIO_MOVE_CAST(WriteHandler)(handler));
+ 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 (asio::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 (asio::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,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type)
-{
- return async_initiate<WriteHandler,
+ 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 (asio::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 (asio::error_code, std::size_t)>(
detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>(s),
- handler, ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
}
#if !defined(ASIO_NO_EXTENSIONS)
@@ -807,31 +705,41 @@ async_write(AsyncWriteStream& s,
template <typename AsyncWriteStream, typename Allocator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
asio::basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(WriteHandler) handler)
-{
- return async_write(s, basic_streambuf_ref<Allocator>(b),
- ASIO_MOVE_CAST(WriteHandler)(handler));
+ WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::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 (asio::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,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler)
-{
- return async_write(s, basic_streambuf_ref<Allocator>(b),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition),
- ASIO_MOVE_CAST(WriteHandler)(handler));
+ CompletionCondition completion_condition, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::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 (asio::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(ASIO_NO_IOSTREAM)
@@ -847,17 +755,16 @@ namespace detail
public:
template <typename BufferSequence>
write_dynbuf_v2_op(AsyncWriteStream& stream,
- ASIO_MOVE_ARG(BufferSequence) buffers,
+ BufferSequence&& buffers,
CompletionCondition& completion_condition, WriteHandler& handler)
: stream_(stream),
- buffers_(ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ buffers_(static_cast<BufferSequence&&>(buffers)),
completion_condition_(
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition)),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ static_cast<CompletionCondition&&>(completion_condition)),
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
write_dynbuf_v2_op(const write_dynbuf_v2_op& other)
: stream_(other.stream_),
buffers_(other.buffers_),
@@ -868,14 +775,13 @@ namespace detail
write_dynbuf_v2_op(write_dynbuf_v2_op&& other)
: stream_(other.stream_),
- buffers_(ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)),
+ buffers_(static_cast<DynamicBuffer_v2&&>(other.buffers_)),
completion_condition_(
- ASIO_MOVE_CAST(CompletionCondition)(
+ static_cast<CompletionCondition&&>(
other.completion_condition_)),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ handler_(static_cast<WriteHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(const asio::error_code& ec,
std::size_t bytes_transferred, int start = 0)
@@ -884,11 +790,11 @@ namespace detail
{
case 1:
async_write(stream_, buffers_.data(0, buffers_.size()),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition_),
- ASIO_MOVE_CAST(write_dynbuf_v2_op)(*this));
+ static_cast<CompletionCondition&&>(completion_condition_),
+ static_cast<write_dynbuf_v2_op&&>(*this));
return; default:
buffers_.consume(bytes_transferred);
- ASIO_MOVE_OR_LVALUE(WriteHandler)(handler_)(ec,
+ static_cast<WriteHandler&&>(handler_)(ec,
static_cast<const std::size_t&>(bytes_transferred));
}
}
@@ -902,36 +808,6 @@ namespace detail
template <typename AsyncWriteStream, typename DynamicBuffer_v2,
typename CompletionCondition, typename WriteHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
- CompletionCondition, WriteHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncWriteStream, typename DynamicBuffer_v2,
- typename CompletionCondition, typename WriteHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncWriteStream, typename DynamicBuffer_v2,
- typename CompletionCondition, typename WriteHandler>
inline bool asio_handler_is_continuation(
write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
CompletionCondition, WriteHandler>* this_handler)
@@ -940,36 +816,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncWriteStream,
- typename DynamicBuffer_v2, typename CompletionCondition,
- typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncWriteStream,
- typename DynamicBuffer_v2, typename CompletionCondition,
- typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
- CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncWriteStream>
class initiate_async_write_dynbuf_v2
{
@@ -981,16 +827,16 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return stream_.get_executor();
}
template <typename WriteHandler, typename DynamicBuffer_v2,
typename CompletionCondition>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
- ASIO_MOVE_ARG(DynamicBuffer_v2) buffers,
- ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ void operator()(WriteHandler&& handler,
+ DynamicBuffer_v2&& buffers,
+ CompletionCondition&& completion_cond) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a WriteHandler.
@@ -998,12 +844,11 @@ namespace detail
non_const_lvalue<WriteHandler> handler2(handler);
non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
- write_dynbuf_v2_op<AsyncWriteStream,
- typename decay<DynamicBuffer_v2>::type,
- CompletionCondition, typename decay<WriteHandler>::type>(
- stream_, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
- completion_cond2.value, handler2.value)(
- asio::error_code(), 0, 1);
+ write_dynbuf_v2_op<AsyncWriteStream, decay_t<DynamicBuffer_v2>,
+ CompletionCondition, decay_t<WriteHandler>>(
+ stream_, static_cast<DynamicBuffer_v2&&>(buffers),
+ completion_cond2.value, handler2.value)(
+ asio::error_code(), 0, 1);
}
private:
@@ -1024,34 +869,19 @@ struct associator<Associator,
: Associator<WriteHandler, DefaultCandidate>
{
static typename Associator<WriteHandler, DefaultCandidate>::type get(
- const detail::write_dynbuf_v2_op<AsyncWriteStream,
- DynamicBuffer_v2, CompletionCondition, WriteHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const detail::write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
+ CompletionCondition, WriteHandler>& h) noexcept
{
- return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
}
-};
-template <typename AsyncWriteStream, typename DynamicBuffer_v2,
- typename CompletionCondition, typename WriteHandler,
- typename CancellationSlot>
-struct associated_cancellation_slot<
- detail::write_dynbuf_v2_op<AsyncWriteStream,
- DynamicBuffer_v2, CompletionCondition, WriteHandler>,
- CancellationSlot>
- : detail::associated_cancellation_slot_forwarding_base<
- WriteHandler, CancellationSlot>
-{
- typedef typename associated_cancellation_slot<
- WriteHandler, CancellationSlot>::type type;
-
- static type get(
+ static auto get(
const detail::write_dynbuf_v2_op<AsyncWriteStream,
DynamicBuffer_v2, CompletionCondition, WriteHandler>& h,
- const CancellationSlot& s = CancellationSlot()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
- return associated_cancellation_slot<WriteHandler,
- CancellationSlot>::get(h.handler_, s);
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
};
@@ -1059,38 +889,47 @@ struct associated_cancellation_slot<
template <typename AsyncWriteStream, typename DynamicBuffer_v2,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename constraint<
+ std::size_t)) WriteToken>
+inline auto async_write(AsyncWriteStream& s,
+ DynamicBuffer_v2 buffers, WriteToken&& token,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type)
-{
- return async_write(s,
- ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
- transfer_all(), ASIO_MOVE_CAST(WriteHandler)(handler));
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::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 (asio::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,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename constraint<
+ 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
- >::type)
-{
- return async_initiate<WriteHandler,
+ >)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::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 (asio::error_code, std::size_t)>(
detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>(s),
- handler, ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition));
}
} // namespace asio
diff --git a/3rdparty/asio/include/asio/impl/write_at.hpp b/3rdparty/asio/include/asio/impl/write_at.hpp
index 87780d552b6..b5a67e30051 100644
--- a/3rdparty/asio/include/asio/impl/write_at.hpp
+++ b/3rdparty/asio/include/asio/impl/write_at.hpp
@@ -2,7 +2,7 @@
// impl/write_at.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,16 +17,13 @@
#include "asio/associator.hpp"
#include "asio/buffer.hpp"
-#include "asio/completion_condition.hpp"
#include "asio/detail/array_fwd.hpp"
#include "asio/detail/base_from_cancellation_state.hpp"
#include "asio/detail/base_from_completion_cond.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/consuming_buffers.hpp"
#include "asio/detail/dependent_type.hpp"
-#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_cont_helpers.hpp"
-#include "asio/detail/handler_invoke_helpers.hpp"
#include "asio/detail/handler_tracking.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/non_const_lvalue.hpp"
@@ -71,7 +68,7 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d,
{
return detail::write_at_buffer_sequence(d, offset, buffers,
asio::buffer_sequence_begin(buffers),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
}
template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence>
@@ -101,7 +98,7 @@ inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
{
asio::error_code ec;
std::size_t bytes_transferred = write_at(d, offset, buffers,
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "write_at");
return bytes_transferred;
}
@@ -116,7 +113,7 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d,
CompletionCondition completion_condition, asio::error_code& ec)
{
std::size_t bytes_transferred = write_at(d, offset, b.data(),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
b.consume(bytes_transferred);
return bytes_transferred;
}
@@ -147,7 +144,7 @@ inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
{
asio::error_code ec;
std::size_t bytes_transferred = write_at(d, offset, b,
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
+ static_cast<CompletionCondition&&>(completion_condition), ec);
asio::detail::throw_error(ec, "write_at");
return bytes_transferred;
}
@@ -175,11 +172,10 @@ namespace detail
offset_(offset),
buffers_(buffers),
start_(0),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
write_at_op(const write_at_op& other)
: base_from_cancellation_state<WriteHandler>(other),
base_from_completion_cond<CompletionCondition>(other),
@@ -193,19 +189,16 @@ namespace detail
write_at_op(write_at_op&& other)
: base_from_cancellation_state<WriteHandler>(
- ASIO_MOVE_CAST(base_from_cancellation_state<
- WriteHandler>)(other)),
+ static_cast<base_from_cancellation_state<WriteHandler>&&>(other)),
base_from_completion_cond<CompletionCondition>(
- ASIO_MOVE_CAST(base_from_completion_cond<
- CompletionCondition>)(other)),
+ static_cast<base_from_completion_cond<CompletionCondition>&&>(other)),
device_(other.device_),
offset_(other.offset_),
- buffers_(ASIO_MOVE_CAST(buffers_type)(other.buffers_)),
+ buffers_(static_cast<buffers_type&&>(other.buffers_)),
start_(other.start_),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ handler_(static_cast<WriteHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred, int start = 0)
@@ -221,7 +214,7 @@ namespace detail
ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_write_at"));
device_.async_write_some_at(
offset_ + buffers_.total_consumed(), buffers_.prepare(max_size),
- ASIO_MOVE_CAST(write_at_op)(*this));
+ static_cast<write_at_op&&>(*this));
}
return; default:
buffers_.consume(bytes_transferred);
@@ -237,7 +230,7 @@ namespace detail
}
}
- ASIO_MOVE_OR_LVALUE(WriteHandler)(handler_)(
+ static_cast<WriteHandler&&>(handler_)(
static_cast<const asio::error_code&>(ec),
static_cast<const std::size_t&>(buffers_.total_consumed()));
}
@@ -257,38 +250,6 @@ namespace detail
template <typename AsyncRandomAccessWriteDevice,
typename ConstBufferSequence, typename ConstBufferIterator,
typename CompletionCondition, typename WriteHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
inline bool asio_handler_is_continuation(
write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
@@ -298,40 +259,10 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename AsyncRandomAccessWriteDevice,
- typename ConstBufferSequence, typename ConstBufferIterator,
- typename CompletionCondition, typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- write_at_op<AsyncRandomAccessWriteDevice, ConstBufferSequence,
- ConstBufferIterator, CompletionCondition, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncRandomAccessWriteDevice,
typename ConstBufferSequence, typename ConstBufferIterator,
typename CompletionCondition, typename WriteHandler>
- inline void start_write_at_buffer_sequence_op(AsyncRandomAccessWriteDevice& d,
+ inline void start_write_at_op(AsyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
const ConstBufferIterator&, CompletionCondition& completion_condition,
WriteHandler& handler)
@@ -343,27 +274,26 @@ namespace detail
}
template <typename AsyncRandomAccessWriteDevice>
- class initiate_async_write_at_buffer_sequence
+ class initiate_async_write_at
{
public:
typedef typename AsyncRandomAccessWriteDevice::executor_type executor_type;
- explicit initiate_async_write_at_buffer_sequence(
- AsyncRandomAccessWriteDevice& device)
+ explicit initiate_async_write_at(AsyncRandomAccessWriteDevice& device)
: device_(device)
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return device_.get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence,
typename CompletionCondition>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
uint64_t offset, const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(CompletionCondition) completion_cond) const
+ CompletionCondition&& completion_cond) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a WriteHandler.
@@ -371,7 +301,7 @@ namespace detail
non_const_lvalue<WriteHandler> handler2(handler);
non_const_lvalue<CompletionCondition> completion_cond2(completion_cond);
- start_write_at_buffer_sequence_op(device_, offset, buffers,
+ start_write_at_op(device_, offset, buffers,
asio::buffer_sequence_begin(buffers),
completion_cond2.value, handler2.value);
}
@@ -396,8 +326,17 @@ struct associator<Associator,
static typename Associator<WriteHandler, DefaultCandidate>::type get(
const detail::write_at_op<AsyncRandomAccessWriteDevice,
ConstBufferSequence, ConstBufferIterator,
+ CompletionCondition, WriteHandler>& h) noexcept
+ {
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
+ const detail::write_at_op<AsyncRandomAccessWriteDevice,
+ ConstBufferSequence, ConstBufferIterator,
CompletionCondition, WriteHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -408,36 +347,41 @@ struct associator<Associator,
template <typename AsyncRandomAccessWriteDevice,
typename ConstBufferSequence, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ CompletionCondition completion_condition, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- detail::initiate_async_write_at_buffer_sequence<
- AsyncRandomAccessWriteDevice>(d),
- handler, offset, buffers,
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ detail::initiate_async_write_at<AsyncRandomAccessWriteDevice>(d),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, buffers, transfer_all()))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- detail::initiate_async_write_at_buffer_sequence<
- AsyncRandomAccessWriteDevice>(d),
- handler, offset, buffers, transfer_all());
+ detail::initiate_async_write_at<AsyncRandomAccessWriteDevice>(d),
+ token, offset, buffers, transfer_all());
}
#if !defined(ASIO_NO_EXTENSIONS)
@@ -453,11 +397,10 @@ namespace detail
asio::basic_streambuf<Allocator>& streambuf,
WriteHandler& handler)
: streambuf_(streambuf),
- handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
+ handler_(static_cast<WriteHandler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
write_at_streambuf_op(const write_at_streambuf_op& other)
: streambuf_(other.streambuf_),
handler_(other.handler_)
@@ -466,16 +409,15 @@ namespace detail
write_at_streambuf_op(write_at_streambuf_op&& other)
: streambuf_(other.streambuf_),
- handler_(ASIO_MOVE_CAST(WriteHandler)(other.handler_))
+ handler_(static_cast<WriteHandler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(const asio::error_code& ec,
const std::size_t bytes_transferred)
{
streambuf_.consume(bytes_transferred);
- ASIO_MOVE_OR_LVALUE(WriteHandler)(handler_)(ec, bytes_transferred);
+ static_cast<WriteHandler&&>(handler_)(ec, bytes_transferred);
}
//private:
@@ -484,32 +426,6 @@ namespace detail
};
template <typename Allocator, typename WriteHandler>
- inline asio_handler_allocate_is_deprecated
- asio_handler_allocate(std::size_t size,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Allocator, typename WriteHandler>
- inline asio_handler_deallocate_is_deprecated
- asio_handler_deallocate(void* pointer, std::size_t size,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Allocator, typename WriteHandler>
inline bool asio_handler_is_continuation(
write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
{
@@ -517,30 +433,6 @@ namespace detail
this_handler->handler_);
}
- template <typename Function, typename Allocator, typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(Function& function,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
- template <typename Function, typename Allocator, typename WriteHandler>
- inline asio_handler_invoke_is_deprecated
- asio_handler_invoke(const Function& function,
- write_at_streambuf_op<Allocator, WriteHandler>* this_handler)
- {
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
- }
-
template <typename AsyncRandomAccessWriteDevice>
class initiate_async_write_at_streambuf
{
@@ -553,16 +445,16 @@ namespace detail
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return device_.get_executor();
}
template <typename WriteHandler,
typename Allocator, typename CompletionCondition>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
uint64_t offset, basic_streambuf<Allocator>* b,
- ASIO_MOVE_ARG(CompletionCondition) completion_condition) const
+ CompletionCondition&& completion_condition) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a WriteHandler.
@@ -570,8 +462,8 @@ namespace detail
non_const_lvalue<WriteHandler> handler2(handler);
async_write_at(device_, offset, b->data(),
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition),
- write_at_streambuf_op<Allocator, typename decay<WriteHandler>::type>(
+ static_cast<CompletionCondition&&>(completion_condition),
+ write_at_streambuf_op<Allocator, decay_t<WriteHandler>>(
*b, handler2.value));
}
@@ -590,8 +482,15 @@ struct associator<Associator,
: Associator<WriteHandler, DefaultCandidate>
{
static typename Associator<WriteHandler, DefaultCandidate>::type get(
+ const detail::write_at_streambuf_op<Executor, WriteHandler>& h) noexcept
+ {
+ return Associator<WriteHandler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(
const detail::write_at_streambuf_op<Executor, WriteHandler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<WriteHandler, DefaultCandidate>::get(h.handler_, c);
}
@@ -602,36 +501,44 @@ struct associator<Associator,
template <typename AsyncRandomAccessWriteDevice,
typename Allocator, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, asio::basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ CompletionCondition completion_condition, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition)))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_write_at_streambuf<
AsyncRandomAccessWriteDevice>(d),
- handler, offset, &b,
- ASIO_MOVE_CAST(CompletionCondition)(completion_condition));
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition));
}
template <typename AsyncRandomAccessWriteDevice, typename Allocator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-inline ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
+ std::size_t)) WriteToken>
+inline auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, asio::basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(WriteHandler) handler)
+ WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, &b, transfer_all()))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
detail::initiate_async_write_at_streambuf<
AsyncRandomAccessWriteDevice>(d),
- handler, offset, &b, transfer_all());
+ token, offset, &b, transfer_all());
}
#endif // !defined(ASIO_NO_IOSTREAM)
diff --git a/3rdparty/asio/include/asio/io_context.hpp b/3rdparty/asio/include/asio/io_context.hpp
index 7b69418c1b7..5de125685fc 100644
--- a/3rdparty/asio/include/asio/io_context.hpp
+++ b/3rdparty/asio/include/asio/io_context.hpp
@@ -2,7 +2,7 @@
// io_context.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,15 +20,14 @@
#include <stdexcept>
#include <typeinfo>
#include "asio/async_result.hpp"
+#include "asio/detail/chrono.hpp"
+#include "asio/detail/concurrency_hint.hpp"
+#include "asio/detail/cstdint.hpp"
#include "asio/detail/wrapped_handler.hpp"
#include "asio/error_code.hpp"
#include "asio/execution.hpp"
#include "asio/execution_context.hpp"
-#if defined(ASIO_HAS_CHRONO)
-# include "asio/detail/chrono.hpp"
-#endif // defined(ASIO_HAS_CHRONO)
-
#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
# include "asio/detail/winsock_init.hpp"
#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
@@ -56,9 +55,10 @@ namespace detail {
struct io_context_bits
{
- ASIO_STATIC_CONSTEXPR(unsigned int, blocking_never = 1);
- ASIO_STATIC_CONSTEXPR(unsigned int, relationship_continuation = 2);
- ASIO_STATIC_CONSTEXPR(unsigned int, outstanding_work_tracked = 4);
+ static constexpr uintptr_t blocking_never = 1;
+ static constexpr uintptr_t relationship_continuation = 2;
+ static constexpr uintptr_t outstanding_work_tracked = 4;
+ static constexpr uintptr_t runtime_bits = 3;
};
} // namespace detail
@@ -166,30 +166,12 @@ namespace detail {
* returning when there is no more work to do. For example, the io_context may
* be being run in a background thread that is launched prior to the
* application's asynchronous operations. The run() call may be kept running by
- * creating an executor that tracks work against the io_context:
- *
- * @code asio::io_context io_context;
- * auto work = asio::require(io_context.get_executor(),
- * asio::execution::outstanding_work.tracked);
- * ... @endcode
- *
- * If using C++03, which lacks automatic variable type deduction, you may
- * compute the return type of the require call:
+ * using the @ref make_work_guard function to create an object of type
+ * asio::executor_work_guard<io_context::executor_type>:
*
* @code asio::io_context io_context;
- * typename asio::require_result<
- * asio::io_context::executor_type,
- * asio::exeution::outstanding_work_t::tracked_t>
- * work = asio::require(io_context.get_executor(),
- * asio::execution::outstanding_work.tracked);
- * ... @endcode
- *
- * or store the result in the type-erasing executor wrapper, any_io_executor:
- *
- * @code asio::io_context io_context;
- * asio::any_io_executor work
- * = asio::require(io_context.get_executor(),
- * asio::execution::outstanding_work.tracked);
+ * asio::executor_work_guard<asio::io_context::executor_type>
+ * = asio::make_work_guard(io_context);
* ... @endcode
*
* To effect a shutdown, the application will then need to call the io_context
@@ -198,15 +180,13 @@ namespace detail {
* permitting ready handlers to be dispatched.
*
* Alternatively, if the application requires that all operations and handlers
- * be allowed to finish normally, store the work-tracking executor in an
- * any_io_executor object, so that it may be explicitly reset.
+ * be allowed to finish normally, the work object may be explicitly reset.
*
* @code asio::io_context io_context;
- * asio::any_io_executor work
- * = asio::require(io_context.get_executor(),
- * asio::execution::outstanding_work.tracked);
+ * asio::executor_work_guard<asio::io_context::executor_type>
+ * = asio::make_work_guard(io_context);
* ...
- * work = asio::any_io_executor(); // Allow run() to exit. @endcode
+ * work.reset(); // Allow run() to exit. @endcode
*/
class io_context
: public execution_context
@@ -217,11 +197,16 @@ private:
friend class detail::win_iocp_overlapped_ptr;
#endif
+#if !defined(ASIO_NO_DEPRECATED)
+ struct initiate_dispatch;
+ struct initiate_post;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
public:
- template <typename Allocator, unsigned int Bits>
+ template <typename Allocator, uintptr_t Bits>
class basic_executor_type;
- template <typename Allocator, unsigned int Bits>
+ template <typename Allocator, uintptr_t Bits>
friend class basic_executor_type;
/// Executor used to submit functions to an io_context.
@@ -290,7 +275,7 @@ public:
ASIO_DECL ~io_context();
/// Obtains the executor associated with the io_context.
- executor_type get_executor() ASIO_NOEXCEPT;
+ executor_type get_executor() noexcept;
/// Run the io_context object's event processing loop.
/**
@@ -351,7 +336,6 @@ public:
ASIO_DECL count_type run(asio::error_code& ec);
#endif // !defined(ASIO_NO_DEPRECATED)
-#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
/// Run the io_context object's event processing loop for a specified
/// duration.
/**
@@ -378,7 +362,6 @@ public:
*/
template <typename Clock, typename Duration>
std::size_t run_until(const chrono::time_point<Clock, Duration>& abs_time);
-#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
/// Run the io_context object's event processing loop to execute at most one
/// handler.
@@ -400,7 +383,7 @@ public:
ASIO_DECL count_type run_one();
#if !defined(ASIO_NO_DEPRECATED)
- /// (Deprecated: Use non-error_code overlaod.) Run the io_context object's
+ /// (Deprecated: Use non-error_code overload.) Run the io_context object's
/// event processing loop to execute at most one handler.
/**
* The run_one() function blocks until one handler has been dispatched, or
@@ -422,7 +405,6 @@ public:
ASIO_DECL count_type run_one(asio::error_code& ec);
#endif // !defined(ASIO_NO_DEPRECATED)
-#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
/// Run the io_context object's event processing loop for a specified duration
/// to execute at most one handler.
/**
@@ -451,7 +433,6 @@ public:
template <typename Clock, typename Duration>
std::size_t run_one_until(
const chrono::time_point<Clock, Duration>& abs_time);
-#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
/// Run the io_context object's event processing loop to execute ready
/// handlers.
@@ -566,15 +547,17 @@ public:
*
* @note This function throws an exception only if:
*
- * @li the handler's @c asio_handler_allocate function; or
+ * @li the handler's associated allocator; or
*
* @li the handler's copy constructor
*
* throws an exception.
*/
template <typename LegacyCompletionHandler>
- ASIO_INITFN_AUTO_RESULT_TYPE(LegacyCompletionHandler, void ())
- dispatch(ASIO_MOVE_ARG(LegacyCompletionHandler) handler);
+ auto dispatch(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_dispatch>(), handler, this));
/// (Deprecated: Use asio::post().) Request the io_context to invoke
/// the given handler and return immediately.
@@ -593,15 +576,17 @@ public:
*
* @note This function throws an exception only if:
*
- * @li the handler's @c asio_handler_allocate function; or
+ * @li the handler's associated allocator; or
*
* @li the handler's copy constructor
*
* throws an exception.
*/
template <typename LegacyCompletionHandler>
- ASIO_INITFN_AUTO_RESULT_TYPE(LegacyCompletionHandler, void ())
- post(ASIO_MOVE_ARG(LegacyCompletionHandler) handler);
+ auto post(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_post>(), handler, this));
/// (Deprecated: Use asio::bind_executor().) Create a new handler that
/// automatically dispatches the wrapped handler on the io_context.
@@ -635,13 +620,8 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
private:
- io_context(const io_context&) ASIO_DELETED;
- io_context& operator=(const io_context&) ASIO_DELETED;
-
-#if !defined(ASIO_NO_DEPRECATED)
- struct initiate_dispatch;
- struct initiate_post;
-#endif // !defined(ASIO_NO_DEPRECATED)
+ io_context(const io_context&) = delete;
+ io_context& operator=(const io_context&) = delete;
// Helper function to add the implementation.
ASIO_DECL impl_type& add_impl(impl_type* impl);
@@ -662,56 +642,44 @@ private:
impl_type& impl_;
};
-namespace detail {
-
-} // namespace detail
-
/// Executor implementation type used to submit functions to an io_context.
-template <typename Allocator, unsigned int Bits>
-class io_context::basic_executor_type : detail::io_context_bits
+template <typename Allocator, uintptr_t Bits>
+class io_context::basic_executor_type :
+ detail::io_context_bits, Allocator
{
public:
/// Copy constructor.
- basic_executor_type(
- const basic_executor_type& other) ASIO_NOEXCEPT
- : io_context_(other.io_context_),
- allocator_(other.allocator_),
- bits_(other.bits_)
+ basic_executor_type(const basic_executor_type& other) noexcept
+ : Allocator(static_cast<const Allocator&>(other)),
+ target_(other.target_)
{
if (Bits & outstanding_work_tracked)
- if (io_context_)
- io_context_->impl_.work_started();
+ if (context_ptr())
+ context_ptr()->impl_.work_started();
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
- basic_executor_type(basic_executor_type&& other) ASIO_NOEXCEPT
- : io_context_(other.io_context_),
- allocator_(ASIO_MOVE_CAST(Allocator)(other.allocator_)),
- bits_(other.bits_)
+ basic_executor_type(basic_executor_type&& other) noexcept
+ : Allocator(static_cast<Allocator&&>(other)),
+ target_(other.target_)
{
if (Bits & outstanding_work_tracked)
- other.io_context_ = 0;
+ other.target_ = 0;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destructor.
- ~basic_executor_type() ASIO_NOEXCEPT
+ ~basic_executor_type() noexcept
{
if (Bits & outstanding_work_tracked)
- if (io_context_)
- io_context_->impl_.work_finished();
+ if (context_ptr())
+ context_ptr()->impl_.work_finished();
}
/// Assignment operator.
- basic_executor_type& operator=(
- const basic_executor_type& other) ASIO_NOEXCEPT;
+ basic_executor_type& operator=(const basic_executor_type& other) noexcept;
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move assignment operator.
- basic_executor_type& operator=(
- basic_executor_type&& other) ASIO_NOEXCEPT;
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ basic_executor_type& operator=(basic_executor_type&& other) noexcept;
#if !defined(GENERATING_DOCUMENTATION)
private:
@@ -729,11 +697,10 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::blocking.possibly); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type require(
- execution::blocking_t::possibly_t) const
+ constexpr basic_executor_type require(execution::blocking_t::possibly_t) const
{
- return basic_executor_type(io_context_,
- allocator_, bits_ & ~blocking_never);
+ return basic_executor_type(context_ptr(),
+ *this, bits() & ~blocking_never);
}
/// Obtain an executor with the @c blocking.never property.
@@ -746,11 +713,10 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::blocking.never); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type require(
- execution::blocking_t::never_t) const
+ constexpr basic_executor_type require(execution::blocking_t::never_t) const
{
- return basic_executor_type(io_context_,
- allocator_, bits_ | blocking_never);
+ return basic_executor_type(context_ptr(),
+ *this, bits() | blocking_never);
}
/// Obtain an executor with the @c relationship.fork property.
@@ -763,11 +729,10 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::relationship.fork); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type require(
- execution::relationship_t::fork_t) const
+ constexpr basic_executor_type require(execution::relationship_t::fork_t) const
{
- return basic_executor_type(io_context_,
- allocator_, bits_ & ~relationship_continuation);
+ return basic_executor_type(context_ptr(),
+ *this, bits() & ~relationship_continuation);
}
/// Obtain an executor with the @c relationship.continuation property.
@@ -780,11 +745,11 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::relationship.continuation); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type require(
+ constexpr basic_executor_type require(
execution::relationship_t::continuation_t) const
{
- return basic_executor_type(io_context_,
- allocator_, bits_ | relationship_continuation);
+ return basic_executor_type(context_ptr(),
+ *this, bits() | relationship_continuation);
}
/// Obtain an executor with the @c outstanding_work.tracked property.
@@ -797,12 +762,12 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::outstanding_work.tracked); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type<Allocator,
+ constexpr basic_executor_type<Allocator,
ASIO_UNSPECIFIED(Bits | outstanding_work_tracked)>
require(execution::outstanding_work_t::tracked_t) const
{
return basic_executor_type<Allocator, Bits | outstanding_work_tracked>(
- io_context_, allocator_, bits_);
+ context_ptr(), *this, bits());
}
/// Obtain an executor with the @c outstanding_work.untracked property.
@@ -815,12 +780,12 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::outstanding_work.untracked); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type<Allocator,
+ constexpr basic_executor_type<Allocator,
ASIO_UNSPECIFIED(Bits & ~outstanding_work_tracked)>
require(execution::outstanding_work_t::untracked_t) const
{
return basic_executor_type<Allocator, Bits & ~outstanding_work_tracked>(
- io_context_, allocator_, bits_);
+ context_ptr(), *this, bits());
}
/// Obtain an executor with the specified @c allocator property.
@@ -834,11 +799,11 @@ private:
* asio::execution::allocator(my_allocator)); @endcode
*/
template <typename OtherAllocator>
- ASIO_CONSTEXPR basic_executor_type<OtherAllocator, Bits>
+ constexpr basic_executor_type<OtherAllocator, Bits>
require(execution::allocator_t<OtherAllocator> a) const
{
return basic_executor_type<OtherAllocator, Bits>(
- io_context_, a.value(), bits_);
+ context_ptr(), a.value(), bits());
}
/// Obtain an executor with the default @c allocator property.
@@ -851,11 +816,11 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::allocator); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type<std::allocator<void>, Bits>
+ constexpr basic_executor_type<std::allocator<void>, Bits>
require(execution::allocator_t<void>) const
{
return basic_executor_type<std::allocator<void>, Bits>(
- io_context_, std::allocator<void>(), bits_);
+ context_ptr(), std::allocator<void>(), bits());
}
#if !defined(GENERATING_DOCUMENTATION)
@@ -876,8 +841,7 @@ private:
* == asio::execution::mapping.thread)
* ... @endcode
*/
- static ASIO_CONSTEXPR execution::mapping_t query(
- execution::mapping_t) ASIO_NOEXCEPT
+ static constexpr execution::mapping_t query(execution::mapping_t) noexcept
{
return execution::mapping.thread;
}
@@ -892,9 +856,9 @@ private:
* asio::io_context& ctx = asio::query(
* ex, asio::execution::context); @endcode
*/
- io_context& query(execution::context_t) const ASIO_NOEXCEPT
+ io_context& query(execution::context_t) const noexcept
{
- return *io_context_;
+ return *context_ptr();
}
/// Query the current value of the @c blocking property.
@@ -908,10 +872,9 @@ private:
* == asio::execution::blocking.always)
* ... @endcode
*/
- ASIO_CONSTEXPR execution::blocking_t query(
- execution::blocking_t) const ASIO_NOEXCEPT
+ constexpr execution::blocking_t query(execution::blocking_t) const noexcept
{
- return (bits_ & blocking_never)
+ return (bits() & blocking_never)
? execution::blocking_t(execution::blocking.never)
: execution::blocking_t(execution::blocking.possibly);
}
@@ -927,10 +890,10 @@ private:
* == asio::execution::relationship.continuation)
* ... @endcode
*/
- ASIO_CONSTEXPR execution::relationship_t query(
- execution::relationship_t) const ASIO_NOEXCEPT
+ constexpr execution::relationship_t query(
+ execution::relationship_t) const noexcept
{
- return (bits_ & relationship_continuation)
+ return (bits() & relationship_continuation)
? execution::relationship_t(execution::relationship.continuation)
: execution::relationship_t(execution::relationship.fork);
}
@@ -946,8 +909,8 @@ private:
* == asio::execution::outstanding_work.tracked)
* ... @endcode
*/
- static ASIO_CONSTEXPR execution::outstanding_work_t query(
- execution::outstanding_work_t) ASIO_NOEXCEPT
+ static constexpr execution::outstanding_work_t query(
+ execution::outstanding_work_t) noexcept
{
return (Bits & outstanding_work_tracked)
? execution::outstanding_work_t(execution::outstanding_work.tracked)
@@ -965,10 +928,10 @@ private:
* asio::execution::allocator); @endcode
*/
template <typename OtherAllocator>
- ASIO_CONSTEXPR Allocator query(
- execution::allocator_t<OtherAllocator>) const ASIO_NOEXCEPT
+ constexpr Allocator query(
+ execution::allocator_t<OtherAllocator>) const noexcept
{
- return allocator_;
+ return static_cast<const Allocator&>(*this);
}
/// Query the current value of the @c allocator property.
@@ -981,10 +944,9 @@ private:
* auto alloc = asio::query(ex,
* asio::execution::allocator); @endcode
*/
- ASIO_CONSTEXPR Allocator query(
- execution::allocator_t<void>) const ASIO_NOEXCEPT
+ constexpr Allocator query(execution::allocator_t<void>) const noexcept
{
- return allocator_;
+ return static_cast<const Allocator&>(*this);
}
public:
@@ -993,18 +955,17 @@ public:
* @return @c true if the current thread is running the io_context. Otherwise
* returns @c false.
*/
- bool running_in_this_thread() const ASIO_NOEXCEPT;
+ bool running_in_this_thread() const noexcept;
/// Compare two executors for equality.
/**
* Two executors are equal if they refer to the same underlying io_context.
*/
friend bool operator==(const basic_executor_type& a,
- const basic_executor_type& b) ASIO_NOEXCEPT
+ const basic_executor_type& b) noexcept
{
- return a.io_context_ == b.io_context_
- && a.allocator_ == b.allocator_
- && a.bits_ == b.bits_;
+ return a.target_ == b.target_
+ && static_cast<const Allocator&>(a) == static_cast<const Allocator&>(b);
}
/// Compare two executors for inequality.
@@ -1012,34 +973,20 @@ public:
* Two executors are equal if they refer to the same underlying io_context.
*/
friend bool operator!=(const basic_executor_type& a,
- const basic_executor_type& b) ASIO_NOEXCEPT
+ const basic_executor_type& b) noexcept
{
- return a.io_context_ != b.io_context_
- || a.allocator_ != b.allocator_
- || a.bits_ != b.bits_;
+ return a.target_ != b.target_
+ || static_cast<const Allocator&>(a) != static_cast<const Allocator&>(b);
}
-#if !defined(GENERATING_DOCUMENTATION)
-private:
- friend struct asio_execution_execute_fn::impl;
-#endif // !defined(GENERATING_DOCUMENTATION)
-
/// Execution function.
- /**
- * Do not call this function directly. It is intended for use with the
- * execution::execute customisation point.
- *
- * For example:
- * @code auto ex = my_io_context.get_executor();
- * execution::execute(ex, my_function_object); @endcode
- */
template <typename Function>
- void execute(ASIO_MOVE_ARG(Function) f) const;
+ void execute(Function&& f) const;
#if !defined(ASIO_NO_TS_EXECUTORS)
public:
/// Obtain the underlying execution context.
- io_context& context() const ASIO_NOEXCEPT;
+ io_context& context() const noexcept;
/// Inform the io_context that it has some outstanding work to do.
/**
@@ -1047,7 +994,7 @@ public:
* This ensures that the io_context's run() and run_one() functions do not
* exit while the work is underway.
*/
- void on_work_started() const ASIO_NOEXCEPT;
+ void on_work_started() const noexcept;
/// Inform the io_context that some work is no longer outstanding.
/**
@@ -1055,7 +1002,7 @@ public:
* finished. Once the count of unfinished work reaches zero, the io_context
* is stopped and the run() and run_one() functions may exit.
*/
- void on_work_finished() const ASIO_NOEXCEPT;
+ void on_work_finished() const noexcept;
/// Request the io_context to invoke the given function object.
/**
@@ -1072,8 +1019,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename OtherAllocator>
- void dispatch(ASIO_MOVE_ARG(Function) f,
- const OtherAllocator& a) const;
+ void dispatch(Function&& f, const OtherAllocator& a) const;
/// Request the io_context to invoke the given function object.
/**
@@ -1089,8 +1035,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename OtherAllocator>
- void post(ASIO_MOVE_ARG(Function) f,
- const OtherAllocator& a) const;
+ void post(Function&& f, const OtherAllocator& a) const;
/// Request the io_context to invoke the given function object.
/**
@@ -1110,44 +1055,45 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename OtherAllocator>
- void defer(ASIO_MOVE_ARG(Function) f,
- const OtherAllocator& a) const;
+ void defer(Function&& f, const OtherAllocator& a) const;
#endif // !defined(ASIO_NO_TS_EXECUTORS)
private:
friend class io_context;
- template <typename, unsigned int> friend class basic_executor_type;
+ template <typename, uintptr_t> friend class basic_executor_type;
// Constructor used by io_context::get_executor().
- explicit basic_executor_type(io_context& i) ASIO_NOEXCEPT
- : io_context_(&i),
- allocator_(),
- bits_(0)
+ explicit basic_executor_type(io_context& i) noexcept
+ : Allocator(),
+ target_(reinterpret_cast<uintptr_t>(&i))
{
if (Bits & outstanding_work_tracked)
- io_context_->impl_.work_started();
+ context_ptr()->impl_.work_started();
}
// Constructor used by require().
basic_executor_type(io_context* i,
- const Allocator& a, unsigned int bits) ASIO_NOEXCEPT
- : io_context_(i),
- allocator_(a),
- bits_(bits)
+ const Allocator& a, uintptr_t bits) noexcept
+ : Allocator(a),
+ target_(reinterpret_cast<uintptr_t>(i) | bits)
{
if (Bits & outstanding_work_tracked)
- if (io_context_)
- io_context_->impl_.work_started();
+ if (context_ptr())
+ context_ptr()->impl_.work_started();
}
- // The underlying io_context.
- io_context* io_context_;
+ io_context* context_ptr() const noexcept
+ {
+ return reinterpret_cast<io_context*>(target_ & ~runtime_bits);
+ }
- // The allocator used for execution functions.
- Allocator allocator_;
+ uintptr_t bits() const noexcept
+ {
+ return target_ & runtime_bits;
+ }
- // The runtime-switched properties of the io_context executor.
- unsigned int bits_;
+ // The underlying io_context and runtime bits.
+ uintptr_t target_;
};
#if !defined(ASIO_NO_DEPRECATED)
@@ -1278,27 +1224,27 @@ namespace traits {
#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
struct equality_comparable<
asio::io_context::basic_executor_type<Allocator, Bits>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-template <typename Allocator, unsigned int Bits, typename Function>
+template <typename Allocator, uintptr_t Bits, typename Function>
struct execute_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
Function
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
@@ -1306,99 +1252,99 @@ struct execute_member<
#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
struct require_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
asio::execution::blocking_t::possibly_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::io_context::basic_executor_type<
Allocator, Bits> result_type;
};
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
struct require_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
asio::execution::blocking_t::never_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::io_context::basic_executor_type<
Allocator, Bits> result_type;
};
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
struct require_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
asio::execution::relationship_t::fork_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::io_context::basic_executor_type<
Allocator, Bits> result_type;
};
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
struct require_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
asio::execution::relationship_t::continuation_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::io_context::basic_executor_type<
Allocator, Bits> result_type;
};
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
struct require_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
asio::execution::outstanding_work_t::tracked_t
> : asio::detail::io_context_bits
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::io_context::basic_executor_type<
Allocator, Bits | outstanding_work_tracked> result_type;
};
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
struct require_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
asio::execution::outstanding_work_t::untracked_t
> : asio::detail::io_context_bits
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::io_context::basic_executor_type<
Allocator, Bits & ~outstanding_work_tracked> result_type;
};
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
struct require_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
asio::execution::allocator_t<void>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::io_context::basic_executor_type<
std::allocator<void>, Bits> result_type;
};
-template <unsigned int Bits,
+template <uintptr_t Bits,
typename Allocator, typename OtherAllocator>
struct require_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
asio::execution::allocator_t<OtherAllocator>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::io_context::basic_executor_type<
OtherAllocator, Bits> result_type;
};
@@ -1407,7 +1353,7 @@ struct require_member<
#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
-template <typename Allocator, unsigned int Bits, typename Property>
+template <typename Allocator, uintptr_t Bits, typename Property>
struct query_static_constexpr_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
Property,
@@ -1419,11 +1365,11 @@ struct query_static_constexpr_member<
>::type
> : asio::detail::io_context_bits
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::execution::outstanding_work_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return (Bits & outstanding_work_tracked)
? execution::outstanding_work_t(execution::outstanding_work.tracked)
@@ -1431,7 +1377,7 @@ struct query_static_constexpr_member<
}
};
-template <typename Allocator, unsigned int Bits, typename Property>
+template <typename Allocator, uintptr_t Bits, typename Property>
struct query_static_constexpr_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
Property,
@@ -1443,11 +1389,11 @@ struct query_static_constexpr_member<
>::type
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::execution::mapping_t::thread_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return result_type();
}
@@ -1457,7 +1403,7 @@ struct query_static_constexpr_member<
#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
-template <typename Allocator, unsigned int Bits, typename Property>
+template <typename Allocator, uintptr_t Bits, typename Property>
struct query_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
Property,
@@ -1469,12 +1415,12 @@ struct query_member<
>::type
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::execution::blocking_t result_type;
};
-template <typename Allocator, unsigned int Bits, typename Property>
+template <typename Allocator, uintptr_t Bits, typename Property>
struct query_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
Property,
@@ -1486,41 +1432,41 @@ struct query_member<
>::type
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::execution::relationship_t result_type;
};
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
struct query_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
asio::execution::context_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::io_context& result_type;
};
-template <typename Allocator, unsigned int Bits>
+template <typename Allocator, uintptr_t Bits>
struct query_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
asio::execution::allocator_t<void>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Allocator result_type;
};
-template <typename Allocator, unsigned int Bits, typename OtherAllocator>
+template <typename Allocator, uintptr_t Bits, typename OtherAllocator>
struct query_member<
asio::io_context::basic_executor_type<Allocator, Bits>,
asio::execution::allocator_t<OtherAllocator>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Allocator result_type;
};
@@ -1528,6 +1474,15 @@ struct query_member<
} // namespace traits
+namespace execution {
+
+template <>
+struct is_executor<io_context> : false_type
+{
+};
+
+} // namespace execution
+
#endif // !defined(GENERATING_DOCUMENTATION)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/io_context_strand.hpp b/3rdparty/asio/include/asio/io_context_strand.hpp
index 8cd17cfbfc5..288ac238feb 100644
--- a/3rdparty/asio/include/asio/io_context_strand.hpp
+++ b/3rdparty/asio/include/asio/io_context_strand.hpp
@@ -2,7 +2,7 @@
// io_context_strand.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -64,8 +64,7 @@ namespace asio {
* @li @c s.dispatch(a) happens-before @c s.dispatch(b), where both are
* performed outside the strand
*
- * then @c asio_handler_invoke(a1, &a1) happens-before
- * @c asio_handler_invoke(b1, &b1).
+ * then @c a() happens-before @c b()
*
* Note that in the following case:
* @code async_op_1(..., s.wrap(a));
@@ -88,6 +87,12 @@ namespace asio {
*/
class io_context::strand
{
+private:
+#if !defined(ASIO_NO_DEPRECATED)
+ struct initiate_dispatch;
+ struct initiate_post;
+#endif // !defined(ASIO_NO_DEPRECATED)
+
public:
/// Constructor.
/**
@@ -103,6 +108,17 @@ public:
service_.construct(impl_);
}
+ /// Copy constructor.
+ /**
+ * Creates a copy such that both strand objects share the same underlying
+ * state.
+ */
+ strand(const strand& other) noexcept
+ : service_(other.service_),
+ impl_(other.impl_)
+ {
+ }
+
/// Destructor.
/**
* Destroys a strand.
@@ -115,7 +131,7 @@ public:
}
/// Obtain the underlying execution context.
- asio::io_context& context() const ASIO_NOEXCEPT
+ asio::io_context& context() const noexcept
{
return service_.get_io_context();
}
@@ -124,7 +140,7 @@ public:
/**
* The strand delegates this call to its underlying io_context.
*/
- void on_work_started() const ASIO_NOEXCEPT
+ void on_work_started() const noexcept
{
context().get_executor().on_work_started();
}
@@ -133,7 +149,7 @@ public:
/**
* The strand delegates this call to its underlying io_context.
*/
- void on_work_finished() const ASIO_NOEXCEPT
+ void on_work_finished() const noexcept
{
context().get_executor().on_work_finished();
}
@@ -154,9 +170,9 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void dispatch(ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+ void dispatch(Function&& f, const Allocator& a) const
{
- typename decay<Function>::type tmp(ASIO_MOVE_CAST(Function)(f));
+ decay_t<Function> tmp(static_cast<Function&&>(f));
service_.dispatch(impl_, tmp);
(void)a;
}
@@ -183,8 +199,10 @@ public:
* @code void handler(); @endcode
*/
template <typename LegacyCompletionHandler>
- ASIO_INITFN_AUTO_RESULT_TYPE(LegacyCompletionHandler, void ())
- dispatch(ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
+ auto dispatch(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_dispatch>(), handler, this))
{
return async_initiate<LegacyCompletionHandler, void ()>(
initiate_dispatch(), handler, this);
@@ -205,9 +223,9 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void post(ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+ void post(Function&& f, const Allocator& a) const
{
- typename decay<Function>::type tmp(ASIO_MOVE_CAST(Function)(f));
+ decay_t<Function> tmp(static_cast<Function&&>(f));
service_.post(impl_, tmp);
(void)a;
}
@@ -230,8 +248,10 @@ public:
* @code void handler(); @endcode
*/
template <typename LegacyCompletionHandler>
- ASIO_INITFN_AUTO_RESULT_TYPE(LegacyCompletionHandler, void ())
- post(ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
+ auto post(LegacyCompletionHandler&& handler)
+ -> decltype(
+ async_initiate<LegacyCompletionHandler, void ()>(
+ declval<initiate_post>(), handler, this))
{
return async_initiate<LegacyCompletionHandler, void ()>(
initiate_post(), handler, this);
@@ -252,9 +272,9 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void defer(ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+ void defer(Function&& f, const Allocator& a) const
{
- typename decay<Function>::type tmp(ASIO_MOVE_CAST(Function)(f));
+ decay_t<Function> tmp(static_cast<Function&&>(f));
service_.post(impl_, tmp);
(void)a;
}
@@ -300,7 +320,7 @@ public:
* submitted to the strand using post(), dispatch() or wrap(). Otherwise
* returns @c false.
*/
- bool running_in_this_thread() const ASIO_NOEXCEPT
+ bool running_in_this_thread() const noexcept
{
return service_.running_in_this_thread(impl_);
}
@@ -310,7 +330,7 @@ public:
* Two strands are equal if they refer to the same ordered, non-concurrent
* state.
*/
- friend bool operator==(const strand& a, const strand& b) ASIO_NOEXCEPT
+ friend bool operator==(const strand& a, const strand& b) noexcept
{
return a.impl_ == b.impl_;
}
@@ -320,7 +340,7 @@ public:
* Two strands are equal if they refer to the same ordered, non-concurrent
* state.
*/
- friend bool operator!=(const strand& a, const strand& b) ASIO_NOEXCEPT
+ friend bool operator!=(const strand& a, const strand& b) noexcept
{
return a.impl_ != b.impl_;
}
@@ -330,7 +350,7 @@ private:
struct initiate_dispatch
{
template <typename LegacyCompletionHandler>
- void operator()(ASIO_MOVE_ARG(LegacyCompletionHandler) handler,
+ void operator()(LegacyCompletionHandler&& handler,
strand* self) const
{
// If you get an error on the following line it means that your
@@ -347,7 +367,7 @@ private:
struct initiate_post
{
template <typename LegacyCompletionHandler>
- void operator()(ASIO_MOVE_ARG(LegacyCompletionHandler) handler,
+ void operator()(LegacyCompletionHandler&& handler,
strand* self) const
{
// If you get an error on the following line it means that your
diff --git a/3rdparty/asio/include/asio/io_service.hpp b/3rdparty/asio/include/asio/io_service.hpp
index 7290ad159c5..748d8a6a323 100644
--- a/3rdparty/asio/include/asio/io_service.hpp
+++ b/3rdparty/asio/include/asio/io_service.hpp
@@ -2,7 +2,7 @@
// io_service.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/io_service_strand.hpp b/3rdparty/asio/include/asio/io_service_strand.hpp
index 46756a3106a..65bb8db2dd3 100644
--- a/3rdparty/asio/include/asio/io_service_strand.hpp
+++ b/3rdparty/asio/include/asio/io_service_strand.hpp
@@ -2,7 +2,7 @@
// io_service_strand.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/address.hpp b/3rdparty/asio/include/asio/ip/address.hpp
index 1b26c384df5..337abe7fd69 100644
--- a/3rdparty/asio/include/asio/ip/address.hpp
+++ b/3rdparty/asio/include/asio/ip/address.hpp
@@ -2,7 +2,7 @@
// ip/address.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,6 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <functional>
#include <string>
#include "asio/detail/throw_exception.hpp"
#include "asio/detail/string_view.hpp"
@@ -25,10 +26,6 @@
#include "asio/ip/address_v6.hpp"
#include "asio/ip/bad_address_cast.hpp"
-#if defined(ASIO_HAS_STD_HASH)
-# include <functional>
-#endif // defined(ASIO_HAS_STD_HASH)
-
#if !defined(ASIO_NO_IOSTREAM)
# include <iosfwd>
#endif // !defined(ASIO_NO_IOSTREAM)
@@ -51,48 +48,44 @@ class address
{
public:
/// Default constructor.
- ASIO_DECL address() ASIO_NOEXCEPT;
+ ASIO_DECL address() noexcept;
/// Construct an address from an IPv4 address.
ASIO_DECL address(
- const asio::ip::address_v4& ipv4_address) ASIO_NOEXCEPT;
+ const asio::ip::address_v4& ipv4_address) noexcept;
/// Construct an address from an IPv6 address.
ASIO_DECL address(
- const asio::ip::address_v6& ipv6_address) ASIO_NOEXCEPT;
+ const asio::ip::address_v6& ipv6_address) noexcept;
/// Copy constructor.
- ASIO_DECL address(const address& other) ASIO_NOEXCEPT;
+ ASIO_DECL address(const address& other) noexcept;
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- ASIO_DECL address(address&& other) ASIO_NOEXCEPT;
-#endif // defined(ASIO_HAS_MOVE)
+ ASIO_DECL address(address&& other) noexcept;
/// Assign from another address.
- ASIO_DECL address& operator=(const address& other) ASIO_NOEXCEPT;
+ ASIO_DECL address& operator=(const address& other) noexcept;
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another address.
- ASIO_DECL address& operator=(address&& other) ASIO_NOEXCEPT;
-#endif // defined(ASIO_HAS_MOVE)
+ ASIO_DECL address& operator=(address&& other) noexcept;
/// Assign from an IPv4 address.
ASIO_DECL address& operator=(
- const asio::ip::address_v4& ipv4_address) ASIO_NOEXCEPT;
+ const asio::ip::address_v4& ipv4_address) noexcept;
/// Assign from an IPv6 address.
ASIO_DECL address& operator=(
- const asio::ip::address_v6& ipv6_address) ASIO_NOEXCEPT;
+ const asio::ip::address_v6& ipv6_address) noexcept;
/// Get whether the address is an IP version 4 address.
- bool is_v4() const ASIO_NOEXCEPT
+ bool is_v4() const noexcept
{
return type_ == ipv4;
}
/// Get whether the address is an IP version 6 address.
- bool is_v6() const ASIO_NOEXCEPT
+ bool is_v6() const noexcept
{
return type_ == ipv6;
}
@@ -133,46 +126,46 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
/// Determine whether the address is a loopback address.
- ASIO_DECL bool is_loopback() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_loopback() const noexcept;
/// Determine whether the address is unspecified.
- ASIO_DECL bool is_unspecified() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_unspecified() const noexcept;
/// Determine whether the address is a multicast address.
- ASIO_DECL bool is_multicast() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_multicast() const noexcept;
/// Compare two addresses for equality.
ASIO_DECL friend bool operator==(const address& a1,
- const address& a2) ASIO_NOEXCEPT;
+ const address& a2) noexcept;
/// Compare two addresses for inequality.
friend bool operator!=(const address& a1,
- const address& a2) ASIO_NOEXCEPT
+ const address& a2) noexcept
{
return !(a1 == a2);
}
/// Compare addresses for ordering.
ASIO_DECL friend bool operator<(const address& a1,
- const address& a2) ASIO_NOEXCEPT;
+ const address& a2) noexcept;
/// Compare addresses for ordering.
friend bool operator>(const address& a1,
- const address& a2) ASIO_NOEXCEPT
+ const address& a2) noexcept
{
return a2 < a1;
}
/// Compare addresses for ordering.
friend bool operator<=(const address& a1,
- const address& a2) ASIO_NOEXCEPT
+ const address& a2) noexcept
{
return !(a2 < a1);
}
/// Compare addresses for ordering.
friend bool operator>=(const address& a1,
- const address& a2) ASIO_NOEXCEPT
+ const address& a2) noexcept
{
return !(a1 < a2);
}
@@ -201,7 +194,7 @@ ASIO_DECL address make_address(const char* str);
* @relates address
*/
ASIO_DECL address make_address(const char* str,
- asio::error_code& ec) ASIO_NOEXCEPT;
+ asio::error_code& ec) noexcept;
/// Create an address from an IPv4 address string in dotted decimal form,
/// or from an IPv6 address in hexadecimal notation.
@@ -216,7 +209,7 @@ ASIO_DECL address make_address(const std::string& str);
* @relates address
*/
ASIO_DECL address make_address(const std::string& str,
- asio::error_code& ec) ASIO_NOEXCEPT;
+ asio::error_code& ec) noexcept;
#if defined(ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
@@ -234,7 +227,7 @@ ASIO_DECL address make_address(string_view str);
* @relates address
*/
ASIO_DECL address make_address(string_view str,
- asio::error_code& ec) ASIO_NOEXCEPT;
+ asio::error_code& ec) noexcept;
#endif // defined(ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
@@ -262,14 +255,13 @@ std::basic_ostream<Elem, Traits>& operator<<(
} // namespace ip
} // namespace asio
-#if defined(ASIO_HAS_STD_HASH)
namespace std {
template <>
struct hash<asio::ip::address>
{
std::size_t operator()(const asio::ip::address& addr)
- const ASIO_NOEXCEPT
+ const noexcept
{
return addr.is_v4()
? std::hash<asio::ip::address_v4>()(addr.to_v4())
@@ -278,7 +270,6 @@ struct hash<asio::ip::address>
};
} // namespace std
-#endif // defined(ASIO_HAS_STD_HASH)
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/ip/address_v4.hpp b/3rdparty/asio/include/asio/ip/address_v4.hpp
index 8babd025d45..ccef6c80cda 100644
--- a/3rdparty/asio/include/asio/ip/address_v4.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v4.hpp
@@ -2,7 +2,7 @@
// ip/address_v4.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,6 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <functional>
#include <string>
#include "asio/detail/array.hpp"
#include "asio/detail/cstdint.hpp"
@@ -24,10 +25,6 @@
#include "asio/detail/winsock_init.hpp"
#include "asio/error_code.hpp"
-#if defined(ASIO_HAS_STD_HASH)
-# include <functional>
-#endif // defined(ASIO_HAS_STD_HASH)
-
#if !defined(ASIO_NO_IOSTREAM)
# include <iosfwd>
#endif // !defined(ASIO_NO_IOSTREAM)
@@ -64,55 +61,68 @@ public:
#endif
/// Default constructor.
- address_v4() ASIO_NOEXCEPT
+ /**
+ * Initialises the @c address_v4 object such that:
+ * @li <tt>to_bytes()</tt> yields <tt>{0, 0, 0, 0}</tt>; and
+ * @li <tt>to_uint() == 0</tt>.
+ */
+ address_v4() noexcept
{
addr_.s_addr = 0;
}
/// Construct an address from raw bytes.
+ /**
+ * Initialises the @c address_v4 object such that <tt>to_bytes() ==
+ * bytes</tt>.
+ *
+ * @throws out_of_range Thrown if any element in @c bytes is not in the range
+ * <tt>0 - 0xFF</tt>. Note that no range checking is required for platforms
+ * where <tt>std::numeric_limits<unsigned char>::max()</tt> is <tt>0xFF</tt>.
+ */
ASIO_DECL explicit address_v4(const bytes_type& bytes);
/// Construct an address from an unsigned integer in host byte order.
+ /**
+ * Initialises the @c address_v4 object such that <tt>to_uint() == addr</tt>.
+ */
ASIO_DECL explicit address_v4(uint_type addr);
/// Copy constructor.
- address_v4(const address_v4& other) ASIO_NOEXCEPT
+ address_v4(const address_v4& other) noexcept
: addr_(other.addr_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- address_v4(address_v4&& other) ASIO_NOEXCEPT
+ address_v4(address_v4&& other) noexcept
: addr_(other.addr_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assign from another address.
- address_v4& operator=(const address_v4& other) ASIO_NOEXCEPT
+ address_v4& operator=(const address_v4& other) noexcept
{
addr_ = other.addr_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another address.
- address_v4& operator=(address_v4&& other) ASIO_NOEXCEPT
+ address_v4& operator=(address_v4&& other) noexcept
{
addr_ = other.addr_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Get the address in bytes, in network byte order.
- ASIO_DECL bytes_type to_bytes() const ASIO_NOEXCEPT;
+ ASIO_DECL bytes_type to_bytes() const noexcept;
- /// Get the address as an unsigned integer in host byte order
- ASIO_DECL uint_type to_uint() const ASIO_NOEXCEPT;
+ /// Get the address as an unsigned integer in host byte order.
+ ASIO_DECL uint_type to_uint() const noexcept;
#if !defined(ASIO_NO_DEPRECATED)
- /// Get the address as an unsigned long in host byte order
+ /// (Deprecated: Use to_uint().) Get the address as an unsigned long in host
+ /// byte order.
ASIO_DECL unsigned long to_ulong() const;
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -144,10 +154,23 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
/// Determine whether the address is a loopback address.
- ASIO_DECL bool is_loopback() const ASIO_NOEXCEPT;
+ /**
+ * This function tests whether the address is in the address block
+ * <tt>127.0.0.0/8</tt>, which corresponds to the address range
+ * <tt>127.0.0.0 - 127.255.255.255</tt>.
+ *
+ * @returns <tt>(to_uint() & 0xFF000000) == 0x7F000000</tt>.
+ */
+ ASIO_DECL bool is_loopback() const noexcept;
/// Determine whether the address is unspecified.
- ASIO_DECL bool is_unspecified() const ASIO_NOEXCEPT;
+ /**
+ * This function tests whether the address is the unspecified address
+ * <tt>0.0.0.0</tt>.
+ *
+ * @returns <tt>to_uint() == 0</tt>.
+ */
+ ASIO_DECL bool is_unspecified() const noexcept;
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: Use network_v4 class.) Determine whether the address is a
@@ -164,64 +187,109 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
/// Determine whether the address is a multicast address.
- ASIO_DECL bool is_multicast() const ASIO_NOEXCEPT;
+ /**
+ * This function tests whether the address is in the multicast address block
+ * <tt>224.0.0.0/4</tt>, which corresponds to the address range
+ * <tt>224.0.0.0 - 239.255.255.255</tt>.
+ *
+ * @returns <tt>(to_uint() & 0xF0000000) == 0xE0000000</tt>.
+ */
+ ASIO_DECL bool is_multicast() const noexcept;
/// Compare two addresses for equality.
friend bool operator==(const address_v4& a1,
- const address_v4& a2) ASIO_NOEXCEPT
+ const address_v4& a2) noexcept
{
return a1.addr_.s_addr == a2.addr_.s_addr;
}
/// Compare two addresses for inequality.
friend bool operator!=(const address_v4& a1,
- const address_v4& a2) ASIO_NOEXCEPT
+ const address_v4& a2) noexcept
{
return a1.addr_.s_addr != a2.addr_.s_addr;
}
/// Compare addresses for ordering.
+ /**
+ * Compares two addresses in host byte order.
+ *
+ * @returns <tt>a1.to_uint() < a2.to_uint()</tt>.
+ */
friend bool operator<(const address_v4& a1,
- const address_v4& a2) ASIO_NOEXCEPT
+ const address_v4& a2) noexcept
{
return a1.to_uint() < a2.to_uint();
}
/// Compare addresses for ordering.
+ /**
+ * Compares two addresses in host byte order.
+ *
+ * @returns <tt>a1.to_uint() > a2.to_uint()</tt>.
+ */
friend bool operator>(const address_v4& a1,
- const address_v4& a2) ASIO_NOEXCEPT
+ const address_v4& a2) noexcept
{
return a1.to_uint() > a2.to_uint();
}
/// Compare addresses for ordering.
+ /**
+ * Compares two addresses in host byte order.
+ *
+ * @returns <tt>a1.to_uint() <= a2.to_uint()</tt>.
+ */
friend bool operator<=(const address_v4& a1,
- const address_v4& a2) ASIO_NOEXCEPT
+ const address_v4& a2) noexcept
{
return a1.to_uint() <= a2.to_uint();
}
/// Compare addresses for ordering.
+ /**
+ * Compares two addresses in host byte order.
+ *
+ * @returns <tt>a1.to_uint() >= a2.to_uint()</tt>.
+ */
friend bool operator>=(const address_v4& a1,
- const address_v4& a2) ASIO_NOEXCEPT
+ const address_v4& a2) noexcept
{
return a1.to_uint() >= a2.to_uint();
}
/// Obtain an address object that represents any address.
- static address_v4 any() ASIO_NOEXCEPT
+ /**
+ * This functions returns an address that represents the "any" address
+ * <tt>0.0.0.0</tt>.
+ *
+ * @returns A default-constructed @c address_v4 object.
+ */
+ static address_v4 any() noexcept
{
return address_v4();
}
/// Obtain an address object that represents the loopback address.
- static address_v4 loopback() ASIO_NOEXCEPT
+ /**
+ * This function returns an address that represents the well-known loopback
+ * address <tt>127.0.0.1</tt>.
+ *
+ * @returns <tt>address_v4(0x7F000001)</tt>.
+ */
+ static address_v4 loopback() noexcept
{
return address_v4(0x7F000001);
}
/// Obtain an address object that represents the broadcast address.
- static address_v4 broadcast() ASIO_NOEXCEPT
+ /**
+ * This function returns an address that represents the broadcast address
+ * <tt>255.255.255.255</tt>.
+ *
+ * @returns <tt>address_v4(0xFFFFFFFF)</tt>.
+ */
+ static address_v4 broadcast() noexcept
{
return address_v4(0xFFFFFFFF);
}
@@ -272,7 +340,7 @@ ASIO_DECL address_v4 make_address_v4(const char* str);
* @relates address_v4
*/
ASIO_DECL address_v4 make_address_v4(const char* str,
- asio::error_code& ec) ASIO_NOEXCEPT;
+ asio::error_code& ec) noexcept;
/// Create an IPv4 address from an IP address string in dotted decimal form.
/**
@@ -285,7 +353,7 @@ ASIO_DECL address_v4 make_address_v4(const std::string& str);
* @relates address_v4
*/
ASIO_DECL address_v4 make_address_v4(const std::string& str,
- asio::error_code& ec) ASIO_NOEXCEPT;
+ asio::error_code& ec) noexcept;
#if defined(ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
@@ -301,7 +369,7 @@ ASIO_DECL address_v4 make_address_v4(string_view str);
* @relates address_v4
*/
ASIO_DECL address_v4 make_address_v4(string_view str,
- asio::error_code& ec) ASIO_NOEXCEPT;
+ asio::error_code& ec) noexcept;
#endif // defined(ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
@@ -329,21 +397,19 @@ std::basic_ostream<Elem, Traits>& operator<<(
} // namespace ip
} // namespace asio
-#if defined(ASIO_HAS_STD_HASH)
namespace std {
template <>
struct hash<asio::ip::address_v4>
{
std::size_t operator()(const asio::ip::address_v4& addr)
- const ASIO_NOEXCEPT
+ const noexcept
{
return std::hash<unsigned int>()(addr.to_uint());
}
};
} // namespace std
-#endif // defined(ASIO_HAS_STD_HASH)
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/ip/address_v4_iterator.hpp b/3rdparty/asio/include/asio/ip/address_v4_iterator.hpp
index 1216956f156..5b91f400ac1 100644
--- a/3rdparty/asio/include/asio/ip/address_v4_iterator.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v4_iterator.hpp
@@ -2,7 +2,7 @@
// ip/address_v4_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -53,65 +53,59 @@ public:
typedef std::input_iterator_tag iterator_category;
/// Construct an iterator that points to the specified address.
- basic_address_iterator(const address_v4& addr) ASIO_NOEXCEPT
+ basic_address_iterator(const address_v4& addr) noexcept
: address_(addr)
{
}
/// Copy constructor.
- basic_address_iterator(
- const basic_address_iterator& other) ASIO_NOEXCEPT
+ basic_address_iterator(const basic_address_iterator& other) noexcept
: address_(other.address_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- basic_address_iterator(basic_address_iterator&& other) ASIO_NOEXCEPT
- : address_(ASIO_MOVE_CAST(address_v4)(other.address_))
+ basic_address_iterator(basic_address_iterator&& other) noexcept
+ : address_(static_cast<address_v4&&>(other.address_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assignment operator.
basic_address_iterator& operator=(
- const basic_address_iterator& other) ASIO_NOEXCEPT
+ const basic_address_iterator& other) noexcept
{
address_ = other.address_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move assignment operator.
- basic_address_iterator& operator=(
- basic_address_iterator&& other) ASIO_NOEXCEPT
+ basic_address_iterator& operator=(basic_address_iterator&& other) noexcept
{
- address_ = ASIO_MOVE_CAST(address_v4)(other.address_);
+ address_ = static_cast<address_v4&&>(other.address_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Dereference the iterator.
- const address_v4& operator*() const ASIO_NOEXCEPT
+ const address_v4& operator*() const noexcept
{
return address_;
}
/// Dereference the iterator.
- const address_v4* operator->() const ASIO_NOEXCEPT
+ const address_v4* operator->() const noexcept
{
return &address_;
}
/// Pre-increment operator.
- basic_address_iterator& operator++() ASIO_NOEXCEPT
+ basic_address_iterator& operator++() noexcept
{
address_ = address_v4((address_.to_uint() + 1) & 0xFFFFFFFF);
return *this;
}
/// Post-increment operator.
- basic_address_iterator operator++(int) ASIO_NOEXCEPT
+ basic_address_iterator operator++(int) noexcept
{
basic_address_iterator tmp(*this);
++*this;
@@ -119,7 +113,7 @@ public:
}
/// Pre-decrement operator.
- basic_address_iterator& operator--() ASIO_NOEXCEPT
+ basic_address_iterator& operator--() noexcept
{
address_ = address_v4((address_.to_uint() - 1) & 0xFFFFFFFF);
return *this;
diff --git a/3rdparty/asio/include/asio/ip/address_v4_range.hpp b/3rdparty/asio/include/asio/ip/address_v4_range.hpp
index 45a1d158902..5fb5e65e2aa 100644
--- a/3rdparty/asio/include/asio/ip/address_v4_range.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v4_range.hpp
@@ -2,7 +2,7 @@
// ip/address_v4_range.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -38,7 +38,7 @@ public:
typedef basic_address_iterator<address_v4> iterator;
/// Construct an empty range.
- basic_address_range() ASIO_NOEXCEPT
+ basic_address_range() noexcept
: begin_(address_v4()),
end_(address_v4())
{
@@ -46,74 +46,68 @@ public:
/// Construct an range that represents the given range of addresses.
explicit basic_address_range(const iterator& first,
- const iterator& last) ASIO_NOEXCEPT
+ const iterator& last) noexcept
: begin_(first),
end_(last)
{
}
/// Copy constructor.
- basic_address_range(const basic_address_range& other) ASIO_NOEXCEPT
+ basic_address_range(const basic_address_range& other) noexcept
: begin_(other.begin_),
end_(other.end_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- basic_address_range(basic_address_range&& other) ASIO_NOEXCEPT
- : begin_(ASIO_MOVE_CAST(iterator)(other.begin_)),
- end_(ASIO_MOVE_CAST(iterator)(other.end_))
+ basic_address_range(basic_address_range&& other) noexcept
+ : begin_(static_cast<iterator&&>(other.begin_)),
+ end_(static_cast<iterator&&>(other.end_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assignment operator.
- basic_address_range& operator=(
- const basic_address_range& other) ASIO_NOEXCEPT
+ basic_address_range& operator=(const basic_address_range& other) noexcept
{
begin_ = other.begin_;
end_ = other.end_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move assignment operator.
- basic_address_range& operator=(
- basic_address_range&& other) ASIO_NOEXCEPT
+ basic_address_range& operator=(basic_address_range&& other) noexcept
{
- begin_ = ASIO_MOVE_CAST(iterator)(other.begin_);
- end_ = ASIO_MOVE_CAST(iterator)(other.end_);
+ begin_ = static_cast<iterator&&>(other.begin_);
+ end_ = static_cast<iterator&&>(other.end_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Obtain an iterator that points to the start of the range.
- iterator begin() const ASIO_NOEXCEPT
+ iterator begin() const noexcept
{
return begin_;
}
/// Obtain an iterator that points to the end of the range.
- iterator end() const ASIO_NOEXCEPT
+ iterator end() const noexcept
{
return end_;
}
/// Determine whether the range is empty.
- bool empty() const ASIO_NOEXCEPT
+ bool empty() const noexcept
{
return size() == 0;
}
/// Return the size of the range.
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
return end_->to_uint() - begin_->to_uint();
}
/// Find an address in the range.
- iterator find(const address_v4& addr) const ASIO_NOEXCEPT
+ iterator find(const address_v4& addr) const noexcept
{
return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_;
}
diff --git a/3rdparty/asio/include/asio/ip/address_v6.hpp b/3rdparty/asio/include/asio/ip/address_v6.hpp
index 3d4070f1030..aa650825cf3 100644
--- a/3rdparty/asio/include/asio/ip/address_v6.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v6.hpp
@@ -2,7 +2,7 @@
// ip/address_v6.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,6 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <functional>
#include <string>
#include "asio/detail/array.hpp"
#include "asio/detail/cstdint.hpp"
@@ -25,10 +26,6 @@
#include "asio/error_code.hpp"
#include "asio/ip/address_v4.hpp"
-#if defined(ASIO_HAS_STD_HASH)
-# include <functional>
-#endif // defined(ASIO_HAS_STD_HASH)
-
#if !defined(ASIO_NO_IOSTREAM)
# include <iosfwd>
#endif // !defined(ASIO_NO_IOSTREAM)
@@ -67,34 +64,44 @@ public:
#endif
/// Default constructor.
- ASIO_DECL address_v6() ASIO_NOEXCEPT;
+ /**
+ * Initialises the @c address_v6 object such that:
+ * @li <tt>to_bytes()</tt> yields <tt>{0, 0, ..., 0}</tt>; and
+ * @li <tt>scope_id() == 0</tt>.
+ */
+ ASIO_DECL address_v6() noexcept;
/// Construct an address from raw bytes and scope ID.
+ /**
+ * Initialises the @c address_v6 object such that:
+ * @li <tt>to_bytes() == bytes</tt>; and
+ * @li <tt>this->scope_id() == scope_id</tt>.
+ *
+ * @throws out_of_range Thrown if any element in @c bytes is not in the range
+ * <tt>0 - 0xFF</tt>. Note that no range checking is required for platforms
+ * where <tt>std::numeric_limits<unsigned char>::max()</tt> is <tt>0xFF</tt>.
+ */
ASIO_DECL explicit address_v6(const bytes_type& bytes,
scope_id_type scope_id = 0);
/// Copy constructor.
- ASIO_DECL address_v6(const address_v6& other) ASIO_NOEXCEPT;
+ ASIO_DECL address_v6(const address_v6& other) noexcept;
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- ASIO_DECL address_v6(address_v6&& other) ASIO_NOEXCEPT;
-#endif // defined(ASIO_HAS_MOVE)
+ ASIO_DECL address_v6(address_v6&& other) noexcept;
/// Assign from another address.
ASIO_DECL address_v6& operator=(
- const address_v6& other) ASIO_NOEXCEPT;
+ const address_v6& other) noexcept;
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another address.
- ASIO_DECL address_v6& operator=(address_v6&& other) ASIO_NOEXCEPT;
-#endif // defined(ASIO_HAS_MOVE)
+ ASIO_DECL address_v6& operator=(address_v6&& other) noexcept;
/// The scope ID of the address.
/**
* Returns the scope ID associated with the IPv6 address.
*/
- scope_id_type scope_id() const ASIO_NOEXCEPT
+ scope_id_type scope_id() const noexcept
{
return scope_id_;
}
@@ -102,14 +109,16 @@ public:
/// The scope ID of the address.
/**
* Modifies the scope ID associated with the IPv6 address.
+ *
+ * @param id The new scope ID.
*/
- void scope_id(scope_id_type id) ASIO_NOEXCEPT
+ void scope_id(scope_id_type id) noexcept
{
scope_id_ = id;
}
/// Get the address in bytes, in network byte order.
- ASIO_DECL bytes_type to_bytes() const ASIO_NOEXCEPT;
+ ASIO_DECL bytes_type to_bytes() const noexcept;
/// Get the address as a string.
ASIO_DECL std::string to_string() const;
@@ -142,19 +151,27 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
/// Determine whether the address is a loopback address.
- ASIO_DECL bool is_loopback() const ASIO_NOEXCEPT;
+ /**
+ * This function tests whether the address is the loopback address
+ * <tt>::1</tt>.
+ */
+ ASIO_DECL bool is_loopback() const noexcept;
/// Determine whether the address is unspecified.
- ASIO_DECL bool is_unspecified() const ASIO_NOEXCEPT;
+ /**
+ * This function tests whether the address is the loopback address
+ * <tt>::</tt>.
+ */
+ ASIO_DECL bool is_unspecified() const noexcept;
/// Determine whether the address is link local.
- ASIO_DECL bool is_link_local() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_link_local() const noexcept;
/// Determine whether the address is site local.
- ASIO_DECL bool is_site_local() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_site_local() const noexcept;
/// Determine whether the address is a mapped IPv4 address.
- ASIO_DECL bool is_v4_mapped() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_v4_mapped() const noexcept;
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: No replacement.) Determine whether the address is an
@@ -163,67 +180,77 @@ public:
#endif // !defined(ASIO_NO_DEPRECATED)
/// Determine whether the address is a multicast address.
- ASIO_DECL bool is_multicast() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_multicast() const noexcept;
/// Determine whether the address is a global multicast address.
- ASIO_DECL bool is_multicast_global() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_multicast_global() const noexcept;
/// Determine whether the address is a link-local multicast address.
- ASIO_DECL bool is_multicast_link_local() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_multicast_link_local() const noexcept;
/// Determine whether the address is a node-local multicast address.
- ASIO_DECL bool is_multicast_node_local() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_multicast_node_local() const noexcept;
/// Determine whether the address is a org-local multicast address.
- ASIO_DECL bool is_multicast_org_local() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_multicast_org_local() const noexcept;
/// Determine whether the address is a site-local multicast address.
- ASIO_DECL bool is_multicast_site_local() const ASIO_NOEXCEPT;
+ ASIO_DECL bool is_multicast_site_local() const noexcept;
/// Compare two addresses for equality.
ASIO_DECL friend bool operator==(const address_v6& a1,
- const address_v6& a2) ASIO_NOEXCEPT;
+ const address_v6& a2) noexcept;
/// Compare two addresses for inequality.
friend bool operator!=(const address_v6& a1,
- const address_v6& a2) ASIO_NOEXCEPT
+ const address_v6& a2) noexcept
{
return !(a1 == a2);
}
/// Compare addresses for ordering.
ASIO_DECL friend bool operator<(const address_v6& a1,
- const address_v6& a2) ASIO_NOEXCEPT;
+ const address_v6& a2) noexcept;
/// Compare addresses for ordering.
friend bool operator>(const address_v6& a1,
- const address_v6& a2) ASIO_NOEXCEPT
+ const address_v6& a2) noexcept
{
return a2 < a1;
}
/// Compare addresses for ordering.
friend bool operator<=(const address_v6& a1,
- const address_v6& a2) ASIO_NOEXCEPT
+ const address_v6& a2) noexcept
{
return !(a2 < a1);
}
/// Compare addresses for ordering.
friend bool operator>=(const address_v6& a1,
- const address_v6& a2) ASIO_NOEXCEPT
+ const address_v6& a2) noexcept
{
return !(a1 < a2);
}
/// Obtain an address object that represents any address.
- static address_v6 any() ASIO_NOEXCEPT
+ /**
+ * This functions returns an address that represents the "any" address
+ * <tt>::</tt>.
+ *
+ * @returns A default-constructed @c address_v6 object.
+ */
+ static address_v6 any() noexcept
{
return address_v6();
}
/// Obtain an address object that represents the loopback address.
- ASIO_DECL static address_v6 loopback() ASIO_NOEXCEPT;
+ /**
+ * This function returns an address that represents the well-known loopback
+ * address <tt>::1</tt>.
+ */
+ ASIO_DECL static address_v6 loopback() noexcept;
#if !defined(ASIO_NO_DEPRECATED)
/// (Deprecated: Use make_address_v6().) Create an IPv4-mapped IPv6 address.
@@ -264,7 +291,7 @@ ASIO_DECL address_v6 make_address_v6(const char* str);
* @relates address_v6
*/
ASIO_DECL address_v6 make_address_v6(const char* str,
- asio::error_code& ec) ASIO_NOEXCEPT;
+ asio::error_code& ec) noexcept;
/// Createan IPv6 address from an IP address string.
/**
@@ -277,7 +304,7 @@ ASIO_DECL address_v6 make_address_v6(const std::string& str);
* @relates address_v6
*/
ASIO_DECL address_v6 make_address_v6(const std::string& str,
- asio::error_code& ec) ASIO_NOEXCEPT;
+ asio::error_code& ec) noexcept;
#if defined(ASIO_HAS_STRING_VIEW) \
|| defined(GENERATING_DOCUMENTATION)
@@ -293,7 +320,7 @@ ASIO_DECL address_v6 make_address_v6(string_view str);
* @relates address_v6
*/
ASIO_DECL address_v6 make_address_v6(string_view str,
- asio::error_code& ec) ASIO_NOEXCEPT;
+ asio::error_code& ec) noexcept;
#endif // defined(ASIO_HAS_STRING_VIEW)
// || defined(GENERATING_DOCUMENTATION)
@@ -339,14 +366,13 @@ std::basic_ostream<Elem, Traits>& operator<<(
} // namespace ip
} // namespace asio
-#if defined(ASIO_HAS_STD_HASH)
namespace std {
template <>
struct hash<asio::ip::address_v6>
{
std::size_t operator()(const asio::ip::address_v6& addr)
- const ASIO_NOEXCEPT
+ const noexcept
{
const asio::ip::address_v6::bytes_type bytes = addr.to_bytes();
std::size_t result = static_cast<std::size_t>(addr.scope_id());
@@ -370,7 +396,6 @@ private:
};
} // namespace std
-#endif // defined(ASIO_HAS_STD_HASH)
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/ip/address_v6_iterator.hpp b/3rdparty/asio/include/asio/ip/address_v6_iterator.hpp
index 5345d206cf5..5116f614f08 100644
--- a/3rdparty/asio/include/asio/ip/address_v6_iterator.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v6_iterator.hpp
@@ -2,7 +2,7 @@
// ip/address_v6_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -54,58 +54,53 @@ public:
typedef std::input_iterator_tag iterator_category;
/// Construct an iterator that points to the specified address.
- basic_address_iterator(const address_v6& addr) ASIO_NOEXCEPT
+ basic_address_iterator(const address_v6& addr) noexcept
: address_(addr)
{
}
/// Copy constructor.
basic_address_iterator(
- const basic_address_iterator& other) ASIO_NOEXCEPT
+ const basic_address_iterator& other) noexcept
: address_(other.address_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- basic_address_iterator(basic_address_iterator&& other) ASIO_NOEXCEPT
- : address_(ASIO_MOVE_CAST(address_v6)(other.address_))
+ basic_address_iterator(basic_address_iterator&& other) noexcept
+ : address_(static_cast<address_v6&&>(other.address_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assignment operator.
basic_address_iterator& operator=(
- const basic_address_iterator& other) ASIO_NOEXCEPT
+ const basic_address_iterator& other) noexcept
{
address_ = other.address_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move assignment operator.
- basic_address_iterator& operator=(
- basic_address_iterator&& other) ASIO_NOEXCEPT
+ basic_address_iterator& operator=(basic_address_iterator&& other) noexcept
{
- address_ = ASIO_MOVE_CAST(address_v6)(other.address_);
+ address_ = static_cast<address_v6&&>(other.address_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Dereference the iterator.
- const address_v6& operator*() const ASIO_NOEXCEPT
+ const address_v6& operator*() const noexcept
{
return address_;
}
/// Dereference the iterator.
- const address_v6* operator->() const ASIO_NOEXCEPT
+ const address_v6* operator->() const noexcept
{
return &address_;
}
/// Pre-increment operator.
- basic_address_iterator& operator++() ASIO_NOEXCEPT
+ basic_address_iterator& operator++() noexcept
{
for (int i = 15; i >= 0; --i)
{
@@ -122,7 +117,7 @@ public:
}
/// Post-increment operator.
- basic_address_iterator operator++(int) ASIO_NOEXCEPT
+ basic_address_iterator operator++(int) noexcept
{
basic_address_iterator tmp(*this);
++*this;
@@ -130,7 +125,7 @@ public:
}
/// Pre-decrement operator.
- basic_address_iterator& operator--() ASIO_NOEXCEPT
+ basic_address_iterator& operator--() noexcept
{
for (int i = 15; i >= 0; --i)
{
diff --git a/3rdparty/asio/include/asio/ip/address_v6_range.hpp b/3rdparty/asio/include/asio/ip/address_v6_range.hpp
index ecd9d7cd5a6..7f89773383d 100644
--- a/3rdparty/asio/include/asio/ip/address_v6_range.hpp
+++ b/3rdparty/asio/include/asio/ip/address_v6_range.hpp
@@ -2,7 +2,7 @@
// ip/address_v6_range.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -39,7 +39,7 @@ public:
typedef basic_address_iterator<address_v6> iterator;
/// Construct an empty range.
- basic_address_range() ASIO_NOEXCEPT
+ basic_address_range() noexcept
: begin_(address_v6()),
end_(address_v6())
{
@@ -47,68 +47,63 @@ public:
/// Construct an range that represents the given range of addresses.
explicit basic_address_range(const iterator& first,
- const iterator& last) ASIO_NOEXCEPT
+ const iterator& last) noexcept
: begin_(first),
end_(last)
{
}
/// Copy constructor.
- basic_address_range(const basic_address_range& other) ASIO_NOEXCEPT
+ basic_address_range(const basic_address_range& other) noexcept
: begin_(other.begin_),
end_(other.end_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- basic_address_range(basic_address_range&& other) ASIO_NOEXCEPT
- : begin_(ASIO_MOVE_CAST(iterator)(other.begin_)),
- end_(ASIO_MOVE_CAST(iterator)(other.end_))
+ basic_address_range(basic_address_range&& other) noexcept
+ : begin_(static_cast<iterator&&>(other.begin_)),
+ end_(static_cast<iterator&&>(other.end_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assignment operator.
basic_address_range& operator=(
- const basic_address_range& other) ASIO_NOEXCEPT
+ const basic_address_range& other) noexcept
{
begin_ = other.begin_;
end_ = other.end_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move assignment operator.
- basic_address_range& operator=(
- basic_address_range&& other) ASIO_NOEXCEPT
+ basic_address_range& operator=(basic_address_range&& other) noexcept
{
- begin_ = ASIO_MOVE_CAST(iterator)(other.begin_);
- end_ = ASIO_MOVE_CAST(iterator)(other.end_);
+ begin_ = static_cast<iterator&&>(other.begin_);
+ end_ = static_cast<iterator&&>(other.end_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Obtain an iterator that points to the start of the range.
- iterator begin() const ASIO_NOEXCEPT
+ iterator begin() const noexcept
{
return begin_;
}
/// Obtain an iterator that points to the end of the range.
- iterator end() const ASIO_NOEXCEPT
+ iterator end() const noexcept
{
return end_;
}
/// Determine whether the range is empty.
- bool empty() const ASIO_NOEXCEPT
+ bool empty() const noexcept
{
return begin_ == end_;
}
/// Find an address in the range.
- iterator find(const address_v6& addr) const ASIO_NOEXCEPT
+ iterator find(const address_v6& addr) const noexcept
{
return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_;
}
diff --git a/3rdparty/asio/include/asio/ip/bad_address_cast.hpp b/3rdparty/asio/include/asio/ip/bad_address_cast.hpp
index 105c350718d..3d242f07048 100644
--- a/3rdparty/asio/include/asio/ip/bad_address_cast.hpp
+++ b/3rdparty/asio/include/asio/ip/bad_address_cast.hpp
@@ -2,7 +2,7 @@
// ip/bad_address_cast.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -35,11 +35,21 @@ public:
/// Default constructor.
bad_address_cast() {}
+ /// Copy constructor.
+ bad_address_cast(const bad_address_cast& other) noexcept
+#if defined(ASIO_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
+ : std::exception(static_cast<const std::exception&>(other))
+#else
+ : std::bad_cast(static_cast<const std::bad_cast&>(other))
+#endif
+ {
+ }
+
/// Destructor.
- virtual ~bad_address_cast() ASIO_NOEXCEPT_OR_NOTHROW {}
+ virtual ~bad_address_cast() noexcept {}
/// Get the message associated with the exception.
- virtual const char* what() const ASIO_NOEXCEPT_OR_NOTHROW
+ virtual const char* what() const noexcept
{
return "bad address cast";
}
diff --git a/3rdparty/asio/include/asio/ip/basic_endpoint.hpp b/3rdparty/asio/include/asio/ip/basic_endpoint.hpp
index 10596702bb7..3dfb1248db7 100644
--- a/3rdparty/asio/include/asio/ip/basic_endpoint.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// ip/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,14 +16,11 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
+#include <functional>
#include "asio/detail/cstdint.hpp"
#include "asio/ip/address.hpp"
#include "asio/ip/detail/endpoint.hpp"
-#if defined(ASIO_HAS_STD_HASH)
-# include <functional>
-#endif // defined(ASIO_HAS_STD_HASH)
-
#if !defined(ASIO_NO_IOSTREAM)
# include <iosfwd>
#endif // !defined(ASIO_NO_IOSTREAM)
@@ -64,7 +61,7 @@ public:
#endif
/// Default constructor.
- basic_endpoint() ASIO_NOEXCEPT
+ basic_endpoint() noexcept
: impl_()
{
}
@@ -86,7 +83,7 @@ public:
* @endcode
*/
basic_endpoint(const InternetProtocol& internet_protocol,
- port_type port_num) ASIO_NOEXCEPT
+ port_type port_num) noexcept
: impl_(internet_protocol.family(), port_num)
{
}
@@ -95,43 +92,39 @@ public:
/// constructor may be used for accepting connections on a specific interface
/// or for making a connection to a remote endpoint.
basic_endpoint(const asio::ip::address& addr,
- port_type port_num) ASIO_NOEXCEPT
+ port_type port_num) noexcept
: impl_(addr, port_num)
{
}
/// Copy constructor.
- basic_endpoint(const basic_endpoint& other) ASIO_NOEXCEPT
+ basic_endpoint(const basic_endpoint& other) noexcept
: impl_(other.impl_)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
- basic_endpoint(basic_endpoint&& other) ASIO_NOEXCEPT
+ basic_endpoint(basic_endpoint&& other) noexcept
: impl_(other.impl_)
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Assign from another endpoint.
- basic_endpoint& operator=(const basic_endpoint& other) ASIO_NOEXCEPT
+ basic_endpoint& operator=(const basic_endpoint& other) noexcept
{
impl_ = other.impl_;
return *this;
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-assign from another endpoint.
- basic_endpoint& operator=(basic_endpoint&& other) ASIO_NOEXCEPT
+ basic_endpoint& operator=(basic_endpoint&& other) noexcept
{
impl_ = other.impl_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// The protocol associated with the endpoint.
- protocol_type protocol() const ASIO_NOEXCEPT
+ protocol_type protocol() const noexcept
{
if (impl_.is_v4())
return InternetProtocol::v4();
@@ -139,19 +132,19 @@ public:
}
/// Get the underlying endpoint in the native type.
- data_type* data() ASIO_NOEXCEPT
+ data_type* data() noexcept
{
return impl_.data();
}
/// Get the underlying endpoint in the native type.
- const data_type* data() const ASIO_NOEXCEPT
+ const data_type* data() const noexcept
{
return impl_.data();
}
/// Get the underlying size of the endpoint in the native type.
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
return impl_.size();
}
@@ -163,75 +156,75 @@ public:
}
/// Get the capacity of the endpoint in the native type.
- std::size_t capacity() const ASIO_NOEXCEPT
+ std::size_t capacity() const noexcept
{
return impl_.capacity();
}
/// Get the port associated with the endpoint. The port number is always in
/// the host's byte order.
- port_type port() const ASIO_NOEXCEPT
+ port_type port() const noexcept
{
return impl_.port();
}
/// Set the port associated with the endpoint. The port number is always in
/// the host's byte order.
- void port(port_type port_num) ASIO_NOEXCEPT
+ void port(port_type port_num) noexcept
{
impl_.port(port_num);
}
/// Get the IP address associated with the endpoint.
- asio::ip::address address() const ASIO_NOEXCEPT
+ asio::ip::address address() const noexcept
{
return impl_.address();
}
/// Set the IP address associated with the endpoint.
- void address(const asio::ip::address& addr) ASIO_NOEXCEPT
+ void address(const asio::ip::address& addr) noexcept
{
impl_.address(addr);
}
/// Compare two endpoints for equality.
friend bool operator==(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2) ASIO_NOEXCEPT
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return e1.impl_ == e2.impl_;
}
/// Compare two endpoints for inequality.
friend bool operator!=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2) ASIO_NOEXCEPT
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return !(e1 == e2);
}
/// Compare endpoints for ordering.
friend bool operator<(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2) ASIO_NOEXCEPT
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return e1.impl_ < e2.impl_;
}
/// Compare endpoints for ordering.
friend bool operator>(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2) ASIO_NOEXCEPT
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return e2.impl_ < e1.impl_;
}
/// Compare endpoints for ordering.
friend bool operator<=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2) ASIO_NOEXCEPT
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return !(e2 < e1);
}
/// Compare endpoints for ordering.
friend bool operator>=(const basic_endpoint<InternetProtocol>& e1,
- const basic_endpoint<InternetProtocol>& e2) ASIO_NOEXCEPT
+ const basic_endpoint<InternetProtocol>& e2) noexcept
{
return !(e1 < e2);
}
@@ -265,15 +258,14 @@ std::basic_ostream<Elem, Traits>& operator<<(
} // namespace ip
} // namespace asio
-#if defined(ASIO_HAS_STD_HASH)
namespace std {
template <typename InternetProtocol>
-struct hash<asio::ip::basic_endpoint<InternetProtocol> >
+struct hash<asio::ip::basic_endpoint<InternetProtocol>>
{
std::size_t operator()(
const asio::ip::basic_endpoint<InternetProtocol>& ep)
- const ASIO_NOEXCEPT
+ const noexcept
{
std::size_t hash1 = std::hash<asio::ip::address>()(ep.address());
std::size_t hash2 = std::hash<unsigned short>()(ep.port());
@@ -282,7 +274,6 @@ struct hash<asio::ip::basic_endpoint<InternetProtocol> >
};
} // namespace std
-#endif // defined(ASIO_HAS_STD_HASH)
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/ip/basic_resolver.hpp b/3rdparty/asio/include/asio/ip/basic_resolver.hpp
index cfadba4af9d..4d41bfde090 100644
--- a/3rdparty/asio/include/asio/ip/basic_resolver.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_resolver.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,6 +17,7 @@
#include "asio/detail/config.hpp"
#include <string>
+#include <utility>
#include "asio/any_io_executor.hpp"
#include "asio/async_result.hpp"
#include "asio/detail/handler_type_requirements.hpp"
@@ -36,10 +37,6 @@
# include "asio/detail/resolver_service.hpp"
#endif
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -67,6 +64,9 @@ template <typename InternetProtocol, typename Executor>
class basic_resolver
: public resolver_base
{
+private:
+ class initiate_async_resolve;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -119,14 +119,13 @@ public:
*/
template <typename ExecutionContext>
explicit basic_resolver(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_resolver from another.
/**
* This constructor moves a resolver from one object to another.
@@ -158,9 +157,9 @@ public:
*/
template <typename Executor1>
basic_resolver(basic_resolver<InternetProtocol, Executor1>&& other,
- typename constraint<
+ constraint_t<
is_convertible<Executor1, Executor>::value
- >::type = 0)
+ > = 0)
: impl_(std::move(other.impl_))
{
}
@@ -196,16 +195,15 @@ public:
* constructed using the @c basic_resolver(const executor_type&) constructor.
*/
template <typename Executor1>
- typename constraint<
+ constraint_t<
is_convertible<Executor1, Executor>::value,
basic_resolver&
- >::type operator=(basic_resolver<InternetProtocol, Executor1>&& other)
+ > operator=(basic_resolver<InternetProtocol, Executor1>&& other)
{
basic_resolver tmp(std::move(other));
impl_ = std::move(tmp.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destroys the resolver.
/**
@@ -218,7 +216,7 @@ public:
}
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return impl_.get_executor();
}
@@ -647,38 +645,44 @@ public:
/// Asynchronously perform forward resolution of a query to a list of entries.
/**
* This function is used to asynchronously resolve a query into a list of
- * endpoint entries.
+ * endpoint entries. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param q A query object that determines what endpoints will be returned.
*
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- results_type)) ResolveHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(const query& q,
- ASIO_MOVE_ARG(ResolveHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(const query& q,
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token, q))
{
- return asio::async_initiate<ResolveHandler,
+ return asio::async_initiate<ResolveToken,
void (asio::error_code, results_type)>(
- initiate_async_resolve(this), handler, q);
+ initiate_async_resolve(this), token, q);
}
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -698,21 +702,26 @@ public:
* be an empty string, in which case all resolved endpoints will have a port
* number of 0.
*
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
+ *
* @note On POSIX systems, host names may be locally defined in the file
* <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
* <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
@@ -726,23 +735,25 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- results_type)) ResolveHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(ASIO_STRING_VIEW_PARAM host,
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(ASIO_STRING_VIEW_PARAM host,
ASIO_STRING_VIEW_PARAM service,
- ASIO_MOVE_ARG(ResolveHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token,
+ declval<basic_resolver_query<protocol_type>&>()))
{
return async_resolve(host, service, resolver_base::flags(),
- ASIO_MOVE_CAST(ResolveHandler)(handler));
+ static_cast<ResolveToken&&>(token));
}
/// Asynchronously perform forward resolution of a query to a list of entries.
/**
* This function is used to resolve host and service names into a list of
- * endpoint entries.
+ * endpoint entries. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param host A string identifying a location. May be a descriptive name or
* a numeric address string. If an empty string and the passive flag has been
@@ -760,21 +771,26 @@ public:
* remote hosts. See the @ref resolver_base documentation for the set of
* available flags.
*
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
+ *
* @note On POSIX systems, host names may be locally defined in the file
* <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
* <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
@@ -788,28 +804,29 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- results_type)) ResolveHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(ASIO_STRING_VIEW_PARAM host,
- ASIO_STRING_VIEW_PARAM service,
- resolver_base::flags resolve_flags,
- ASIO_MOVE_ARG(ResolveHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(ASIO_STRING_VIEW_PARAM host,
+ ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags,
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token,
+ declval<basic_resolver_query<protocol_type>&>()))
{
basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
- return asio::async_initiate<ResolveHandler,
+ return asio::async_initiate<ResolveToken,
void (asio::error_code, results_type)>(
- initiate_async_resolve(this), handler, q);
+ initiate_async_resolve(this), token, q);
}
/// Asynchronously perform forward resolution of a query to a list of entries.
/**
* This function is used to resolve host and service names into a list of
- * endpoint entries.
+ * endpoint entries. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param protocol A protocol object, normally representing either the IPv4 or
* IPv6 version of an internet protocol.
@@ -825,21 +842,26 @@ public:
* be an empty string, in which case all resolved endpoints will have a port
* number of 0.
*
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
+ *
* @note On POSIX systems, host names may be locally defined in the file
* <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
* <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
@@ -853,23 +875,25 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- results_type)) ResolveHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(const protocol_type& protocol,
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(const protocol_type& protocol,
ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service,
- ASIO_MOVE_ARG(ResolveHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token,
+ declval<basic_resolver_query<protocol_type>&>()))
{
return async_resolve(protocol, host, service, resolver_base::flags(),
- ASIO_MOVE_CAST(ResolveHandler)(handler));
+ static_cast<ResolveToken&&>(token));
}
/// Asynchronously perform forward resolution of a query to a list of entries.
/**
* This function is used to resolve host and service names into a list of
- * endpoint entries.
+ * endpoint entries. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param protocol A protocol object, normally representing either the IPv4 or
* IPv6 version of an internet protocol.
@@ -890,21 +914,26 @@ public:
* remote hosts. See the @ref resolver_base documentation for the set of
* available flags.
*
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
+ *
* @note On POSIX systems, host names may be locally defined in the file
* <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
* <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
@@ -918,23 +947,24 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- results_type)) ResolveHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(const protocol_type& protocol,
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(const protocol_type& protocol,
ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service,
resolver_base::flags resolve_flags,
- ASIO_MOVE_ARG(ResolveHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token,
+ declval<basic_resolver_query<protocol_type>&>()))
{
basic_resolver_query<protocol_type> q(
protocol, static_cast<std::string>(host),
static_cast<std::string>(service), resolve_flags);
- return asio::async_initiate<ResolveHandler,
+ return asio::async_initiate<ResolveToken,
void (asio::error_code, results_type)>(
- initiate_async_resolve(this), handler, q);
+ initiate_async_resolve(this), token, q);
}
/// Perform reverse resolution of an endpoint to a list of entries.
@@ -983,45 +1013,51 @@ public:
/// entries.
/**
* This function is used to asynchronously resolve an endpoint into a list of
- * endpoint entries.
+ * endpoint entries. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param e An endpoint object that determines what endpoints will be
* returned.
*
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the resolve completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* resolver::results_type results // Resolved endpoints as a range.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
* A successful resolve operation is guaranteed to pass a non-empty range to
* the handler.
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, results_type) @endcode
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- results_type)) ResolveHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ResolveHandler,
- void (asio::error_code, results_type))
- async_resolve(const endpoint_type& e,
- ASIO_MOVE_ARG(ResolveHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ results_type)) ResolveToken = default_completion_token_t<executor_type>>
+ auto async_resolve(const endpoint_type& e,
+ ResolveToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ asio::async_initiate<ResolveToken,
+ void (asio::error_code, results_type)>(
+ declval<initiate_async_resolve>(), token, e))
{
- return asio::async_initiate<ResolveHandler,
+ return asio::async_initiate<ResolveToken,
void (asio::error_code, results_type)>(
- initiate_async_resolve(this), handler, e);
+ initiate_async_resolve(this), token, e);
}
private:
// Disallow copying and assignment.
- basic_resolver(const basic_resolver&) ASIO_DELETED;
- basic_resolver& operator=(const basic_resolver&) ASIO_DELETED;
+ basic_resolver(const basic_resolver&) = delete;
+ basic_resolver& operator=(const basic_resolver&) = delete;
class initiate_async_resolve
{
@@ -1033,13 +1069,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ResolveHandler, typename Query>
- void operator()(ASIO_MOVE_ARG(ResolveHandler) handler,
+ void operator()(ResolveHandler&& handler,
const Query& q) const
{
// If you get an error on the following line it means that your handler
diff --git a/3rdparty/asio/include/asio/ip/basic_resolver_entry.hpp b/3rdparty/asio/include/asio/ip/basic_resolver_entry.hpp
index 9f299491911..a65af27af50 100644
--- a/3rdparty/asio/include/asio/ip/basic_resolver_entry.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_resolver_entry.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_entry.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/basic_resolver_iterator.hpp b/3rdparty/asio/include/asio/ip/basic_resolver_iterator.hpp
index e93cf1f797b..b494f7ae02c 100644
--- a/3rdparty/asio/include/asio/ip/basic_resolver_iterator.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_resolver_iterator.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -79,15 +79,13 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
basic_resolver_iterator(basic_resolver_iterator&& other)
- : values_(ASIO_MOVE_CAST(values_ptr_type)(other.values_)),
+ : values_(static_cast<values_ptr_type&&>(other.values_)),
index_(other.index_)
{
other.index_ = 0;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Assignment operator.
basic_resolver_iterator& operator=(const basic_resolver_iterator& other)
@@ -97,20 +95,18 @@ public:
return *this;
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-assignment operator.
basic_resolver_iterator& operator=(basic_resolver_iterator&& other)
{
if (this != &other)
{
- values_ = ASIO_MOVE_CAST(values_ptr_type)(other.values_);
+ values_ = static_cast<values_ptr_type&&>(other.values_);
index_ = other.index_;
other.index_ = 0;
}
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Dereference an iterator.
const basic_resolver_entry<InternetProtocol>& operator*() const
@@ -178,7 +174,7 @@ protected:
return (*values_)[index_];
}
- typedef std::vector<basic_resolver_entry<InternetProtocol> > values_type;
+ typedef std::vector<basic_resolver_entry<InternetProtocol>> values_type;
typedef asio::detail::shared_ptr<values_type> values_ptr_type;
values_ptr_type values_;
std::size_t index_;
diff --git a/3rdparty/asio/include/asio/ip/basic_resolver_query.hpp b/3rdparty/asio/include/asio/ip/basic_resolver_query.hpp
index e0d2dedd7d9..ada5a4f3802 100644
--- a/3rdparty/asio/include/asio/ip/basic_resolver_query.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_resolver_query.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_query.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -212,6 +212,22 @@ public:
hints_.ai_next = 0;
}
+ /// Copy construct a @c basic_resolver_query from another.
+ basic_resolver_query(const basic_resolver_query& other)
+ : hints_(other.hints_),
+ host_name_(other.host_name_),
+ service_name_(other.service_name_)
+ {
+ }
+
+ /// Move construct a @c basic_resolver_query from another.
+ basic_resolver_query(basic_resolver_query&& other)
+ : hints_(other.hints_),
+ host_name_(static_cast<std::string&&>(other.host_name_)),
+ service_name_(static_cast<std::string&&>(other.service_name_))
+ {
+ }
+
/// Get the hints associated with the query.
const asio::detail::addrinfo_type& hints() const
{
diff --git a/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp b/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp
index fb7c4149b93..7a461f13bc4 100644
--- a/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp
+++ b/3rdparty/asio/include/asio/ip/basic_resolver_results.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_results.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -93,14 +93,12 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
basic_resolver_results(basic_resolver_results&& other)
: basic_resolver_iterator<InternetProtocol>(
- ASIO_MOVE_CAST(basic_resolver_results)(other))
+ static_cast<basic_resolver_results&&>(other))
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Assignment operator.
basic_resolver_results& operator=(const basic_resolver_results& other)
@@ -109,15 +107,13 @@ public:
return *this;
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-assignment operator.
basic_resolver_results& operator=(basic_resolver_results&& other)
{
basic_resolver_iterator<InternetProtocol>::operator=(
- ASIO_MOVE_CAST(basic_resolver_results)(other));
+ static_cast<basic_resolver_results&&>(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
#if !defined(GENERATING_DOCUMENTATION)
// Create results from an addrinfo list returned by getaddrinfo.
@@ -230,19 +226,19 @@ public:
#endif // !defined(GENERATING_DOCUMENTATION)
/// Get the number of entries in the results range.
- size_type size() const ASIO_NOEXCEPT
+ size_type size() const noexcept
{
return this->values_ ? this->values_->size() : 0;
}
/// Get the maximum number of entries permitted in a results range.
- size_type max_size() const ASIO_NOEXCEPT
+ size_type max_size() const noexcept
{
return this->values_ ? this->values_->max_size() : values_type().max_size();
}
/// Determine whether the results range is empty.
- bool empty() const ASIO_NOEXCEPT
+ bool empty() const noexcept
{
return this->values_ ? this->values_->empty() : true;
}
@@ -252,7 +248,7 @@ public:
{
basic_resolver_results tmp(*this);
tmp.index_ = 0;
- return ASIO_MOVE_CAST(basic_resolver_results)(tmp);
+ return static_cast<basic_resolver_results&&>(tmp);
}
/// Obtain an end iterator for the results range.
@@ -274,7 +270,7 @@ public:
}
/// Swap the results range with another.
- void swap(basic_resolver_results& that) ASIO_NOEXCEPT
+ void swap(basic_resolver_results& that) noexcept
{
if (this != &that)
{
@@ -300,7 +296,7 @@ public:
}
private:
- typedef std::vector<basic_resolver_entry<InternetProtocol> > values_type;
+ typedef std::vector<basic_resolver_entry<InternetProtocol>> values_type;
};
} // namespace ip
diff --git a/3rdparty/asio/include/asio/ip/detail/endpoint.hpp b/3rdparty/asio/include/asio/ip/detail/endpoint.hpp
index a19fa48e17f..2c4e3cd43f3 100644
--- a/3rdparty/asio/include/asio/ip/detail/endpoint.hpp
+++ b/3rdparty/asio/include/asio/ip/detail/endpoint.hpp
@@ -2,7 +2,7 @@
// ip/detail/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -33,43 +33,43 @@ class endpoint
{
public:
// Default constructor.
- ASIO_DECL endpoint() ASIO_NOEXCEPT;
+ ASIO_DECL endpoint() noexcept;
// Construct an endpoint using a family and port number.
ASIO_DECL endpoint(int family,
- unsigned short port_num) ASIO_NOEXCEPT;
+ unsigned short port_num) noexcept;
// Construct an endpoint using an address and port number.
ASIO_DECL endpoint(const asio::ip::address& addr,
- unsigned short port_num) ASIO_NOEXCEPT;
+ unsigned short port_num) noexcept;
// Copy constructor.
- endpoint(const endpoint& other) ASIO_NOEXCEPT
+ endpoint(const endpoint& other) noexcept
: data_(other.data_)
{
}
// Assign from another endpoint.
- endpoint& operator=(const endpoint& other) ASIO_NOEXCEPT
+ endpoint& operator=(const endpoint& other) noexcept
{
data_ = other.data_;
return *this;
}
// Get the underlying endpoint in the native type.
- asio::detail::socket_addr_type* data() ASIO_NOEXCEPT
+ asio::detail::socket_addr_type* data() noexcept
{
return &data_.base;
}
// Get the underlying endpoint in the native type.
- const asio::detail::socket_addr_type* data() const ASIO_NOEXCEPT
+ const asio::detail::socket_addr_type* data() const noexcept
{
return &data_.base;
}
// Get the underlying size of the endpoint in the native type.
- std::size_t size() const ASIO_NOEXCEPT
+ std::size_t size() const noexcept
{
if (is_v4())
return sizeof(asio::detail::sockaddr_in4_type);
@@ -81,34 +81,34 @@ public:
ASIO_DECL void resize(std::size_t new_size);
// Get the capacity of the endpoint in the native type.
- std::size_t capacity() const ASIO_NOEXCEPT
+ std::size_t capacity() const noexcept
{
return sizeof(data_);
}
// Get the port associated with the endpoint.
- ASIO_DECL unsigned short port() const ASIO_NOEXCEPT;
+ ASIO_DECL unsigned short port() const noexcept;
// Set the port associated with the endpoint.
- ASIO_DECL void port(unsigned short port_num) ASIO_NOEXCEPT;
+ ASIO_DECL void port(unsigned short port_num) noexcept;
// Get the IP address associated with the endpoint.
- ASIO_DECL asio::ip::address address() const ASIO_NOEXCEPT;
+ ASIO_DECL asio::ip::address address() const noexcept;
// Set the IP address associated with the endpoint.
ASIO_DECL void address(
- const asio::ip::address& addr) ASIO_NOEXCEPT;
+ const asio::ip::address& addr) noexcept;
// Compare two endpoints for equality.
ASIO_DECL friend bool operator==(const endpoint& e1,
- const endpoint& e2) ASIO_NOEXCEPT;
+ const endpoint& e2) noexcept;
// Compare endpoints for ordering.
ASIO_DECL friend bool operator<(const endpoint& e1,
- const endpoint& e2) ASIO_NOEXCEPT;
+ const endpoint& e2) noexcept;
// Determine whether the endpoint is IPv4.
- bool is_v4() const ASIO_NOEXCEPT
+ bool is_v4() const noexcept
{
return data_.base.sa_family == ASIO_OS_DEF(AF_INET);
}
diff --git a/3rdparty/asio/include/asio/ip/detail/impl/endpoint.ipp b/3rdparty/asio/include/asio/ip/detail/impl/endpoint.ipp
index 2a63996eb72..ef61208e234 100644
--- a/3rdparty/asio/include/asio/ip/detail/impl/endpoint.ipp
+++ b/3rdparty/asio/include/asio/ip/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
// ip/detail/impl/endpoint.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -31,7 +31,7 @@ namespace asio {
namespace ip {
namespace detail {
-endpoint::endpoint() ASIO_NOEXCEPT
+endpoint::endpoint() noexcept
: data_()
{
data_.v4.sin_family = ASIO_OS_DEF(AF_INET);
@@ -39,7 +39,7 @@ endpoint::endpoint() ASIO_NOEXCEPT
data_.v4.sin_addr.s_addr = ASIO_OS_DEF(INADDR_ANY);
}
-endpoint::endpoint(int family, unsigned short port_num) ASIO_NOEXCEPT
+endpoint::endpoint(int family, unsigned short port_num) noexcept
: data_()
{
using namespace std; // For memcpy.
@@ -69,7 +69,7 @@ endpoint::endpoint(int family, unsigned short port_num) ASIO_NOEXCEPT
}
endpoint::endpoint(const asio::ip::address& addr,
- unsigned short port_num) ASIO_NOEXCEPT
+ unsigned short port_num) noexcept
: data_()
{
using namespace std; // For memcpy.
@@ -106,7 +106,7 @@ void endpoint::resize(std::size_t new_size)
}
}
-unsigned short endpoint::port() const ASIO_NOEXCEPT
+unsigned short endpoint::port() const noexcept
{
if (is_v4())
{
@@ -120,7 +120,7 @@ unsigned short endpoint::port() const ASIO_NOEXCEPT
}
}
-void endpoint::port(unsigned short port_num) ASIO_NOEXCEPT
+void endpoint::port(unsigned short port_num) noexcept
{
if (is_v4())
{
@@ -134,7 +134,7 @@ void endpoint::port(unsigned short port_num) ASIO_NOEXCEPT
}
}
-asio::ip::address endpoint::address() const ASIO_NOEXCEPT
+asio::ip::address endpoint::address() const noexcept
{
using namespace std; // For memcpy.
if (is_v4())
@@ -146,27 +146,23 @@ asio::ip::address endpoint::address() const ASIO_NOEXCEPT
else
{
asio::ip::address_v6::bytes_type bytes;
-#if defined(ASIO_HAS_STD_ARRAY)
memcpy(bytes.data(), data_.v6.sin6_addr.s6_addr, 16);
-#else // defined(ASIO_HAS_STD_ARRAY)
- memcpy(bytes.elems, data_.v6.sin6_addr.s6_addr, 16);
-#endif // defined(ASIO_HAS_STD_ARRAY)
return asio::ip::address_v6(bytes, data_.v6.sin6_scope_id);
}
}
-void endpoint::address(const asio::ip::address& addr) ASIO_NOEXCEPT
+void endpoint::address(const asio::ip::address& addr) noexcept
{
endpoint tmp_endpoint(addr, port());
data_ = tmp_endpoint.data_;
}
-bool operator==(const endpoint& e1, const endpoint& e2) ASIO_NOEXCEPT
+bool operator==(const endpoint& e1, const endpoint& e2) noexcept
{
return e1.address() == e2.address() && e1.port() == e2.port();
}
-bool operator<(const endpoint& e1, const endpoint& e2) ASIO_NOEXCEPT
+bool operator<(const endpoint& e1, const endpoint& e2) noexcept
{
if (e1.address() < e2.address())
return true;
diff --git a/3rdparty/asio/include/asio/ip/detail/socket_option.hpp b/3rdparty/asio/include/asio/ip/detail/socket_option.hpp
index 87d6bd6c7e9..c9883ae033e 100644
--- a/3rdparty/asio/include/asio/ip/detail/socket_option.hpp
+++ b/3rdparty/asio/include/asio/ip/detail/socket_option.hpp
@@ -2,7 +2,7 @@
// detail/socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/host_name.hpp b/3rdparty/asio/include/asio/ip/host_name.hpp
index ab9f82e394f..f9cb1852cae 100644
--- a/3rdparty/asio/include/asio/ip/host_name.hpp
+++ b/3rdparty/asio/include/asio/ip/host_name.hpp
@@ -2,7 +2,7 @@
// ip/host_name.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/icmp.hpp b/3rdparty/asio/include/asio/ip/icmp.hpp
index f9ae9864d7b..9e4e8e4cb5b 100644
--- a/3rdparty/asio/include/asio/ip/icmp.hpp
+++ b/3rdparty/asio/include/asio/ip/icmp.hpp
@@ -2,7 +2,7 @@
// ip/icmp.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -46,33 +46,33 @@ public:
typedef basic_endpoint<icmp> endpoint;
/// Construct to represent the IPv4 ICMP protocol.
- static icmp v4() ASIO_NOEXCEPT
+ static icmp v4() noexcept
{
return icmp(ASIO_OS_DEF(IPPROTO_ICMP),
ASIO_OS_DEF(AF_INET));
}
/// Construct to represent the IPv6 ICMP protocol.
- static icmp v6() ASIO_NOEXCEPT
+ static icmp v6() noexcept
{
return icmp(ASIO_OS_DEF(IPPROTO_ICMPV6),
ASIO_OS_DEF(AF_INET6));
}
/// Obtain an identifier for the type of the protocol.
- int type() const ASIO_NOEXCEPT
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_RAW);
}
/// Obtain an identifier for the protocol.
- int protocol() const ASIO_NOEXCEPT
+ int protocol() const noexcept
{
return protocol_;
}
/// Obtain an identifier for the protocol family.
- int family() const ASIO_NOEXCEPT
+ int family() const noexcept
{
return family_;
}
@@ -97,7 +97,7 @@ public:
private:
// Construct with a specific family.
- explicit icmp(int protocol_id, int protocol_family) ASIO_NOEXCEPT
+ explicit icmp(int protocol_id, int protocol_family) noexcept
: protocol_(protocol_id),
family_(protocol_family)
{
diff --git a/3rdparty/asio/include/asio/ip/impl/address.hpp b/3rdparty/asio/include/asio/ip/impl/address.hpp
index 56e391914f6..5780f320067 100644
--- a/3rdparty/asio/include/asio/ip/impl/address.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/address.hpp
@@ -2,7 +2,7 @@
// ip/impl/address.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/address.ipp b/3rdparty/asio/include/asio/ip/impl/address.ipp
index 2e104e92a7b..9893b4ce9c2 100644
--- a/3rdparty/asio/include/asio/ip/impl/address.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/address.ipp
@@ -2,7 +2,7 @@
// ip/impl/address.ipp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -29,7 +29,7 @@
namespace asio {
namespace ip {
-address::address() ASIO_NOEXCEPT
+address::address() noexcept
: type_(ipv4),
ipv4_address_(),
ipv6_address_()
@@ -37,7 +37,7 @@ address::address() ASIO_NOEXCEPT
}
address::address(
- const asio::ip::address_v4& ipv4_address) ASIO_NOEXCEPT
+ const asio::ip::address_v4& ipv4_address) noexcept
: type_(ipv4),
ipv4_address_(ipv4_address),
ipv6_address_()
@@ -45,30 +45,28 @@ address::address(
}
address::address(
- const asio::ip::address_v6& ipv6_address) ASIO_NOEXCEPT
+ const asio::ip::address_v6& ipv6_address) noexcept
: type_(ipv6),
ipv4_address_(),
ipv6_address_(ipv6_address)
{
}
-address::address(const address& other) ASIO_NOEXCEPT
+address::address(const address& other) noexcept
: type_(other.type_),
ipv4_address_(other.ipv4_address_),
ipv6_address_(other.ipv6_address_)
{
}
-#if defined(ASIO_HAS_MOVE)
-address::address(address&& other) ASIO_NOEXCEPT
+address::address(address&& other) noexcept
: type_(other.type_),
ipv4_address_(other.ipv4_address_),
ipv6_address_(other.ipv6_address_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
-address& address::operator=(const address& other) ASIO_NOEXCEPT
+address& address::operator=(const address& other) noexcept
{
type_ = other.type_;
ipv4_address_ = other.ipv4_address_;
@@ -76,18 +74,16 @@ address& address::operator=(const address& other) ASIO_NOEXCEPT
return *this;
}
-#if defined(ASIO_HAS_MOVE)
-address& address::operator=(address&& other) ASIO_NOEXCEPT
+address& address::operator=(address&& other) noexcept
{
type_ = other.type_;
ipv4_address_ = other.ipv4_address_;
ipv6_address_ = other.ipv6_address_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
address& address::operator=(
- const asio::ip::address_v4& ipv4_address) ASIO_NOEXCEPT
+ const asio::ip::address_v4& ipv4_address) noexcept
{
type_ = ipv4;
ipv4_address_ = ipv4_address;
@@ -96,7 +92,7 @@ address& address::operator=(
}
address& address::operator=(
- const asio::ip::address_v6& ipv6_address) ASIO_NOEXCEPT
+ const asio::ip::address_v6& ipv6_address) noexcept
{
type_ = ipv6;
ipv4_address_ = asio::ip::address_v4();
@@ -113,7 +109,7 @@ address make_address(const char* str)
}
address make_address(const char* str,
- asio::error_code& ec) ASIO_NOEXCEPT
+ asio::error_code& ec) noexcept
{
asio::ip::address_v6 ipv6_address =
asio::ip::make_address_v6(str, ec);
@@ -134,7 +130,7 @@ address make_address(const std::string& str)
}
address make_address(const std::string& str,
- asio::error_code& ec) ASIO_NOEXCEPT
+ asio::error_code& ec) noexcept
{
return make_address(str.c_str(), ec);
}
@@ -147,7 +143,7 @@ address make_address(string_view str)
}
address make_address(string_view str,
- asio::error_code& ec) ASIO_NOEXCEPT
+ asio::error_code& ec) noexcept
{
return make_address(static_cast<std::string>(str), ec);
}
@@ -190,28 +186,28 @@ std::string address::to_string(asio::error_code& ec) const
}
#endif // !defined(ASIO_NO_DEPRECATED)
-bool address::is_loopback() const ASIO_NOEXCEPT
+bool address::is_loopback() const noexcept
{
return (type_ == ipv4)
? ipv4_address_.is_loopback()
: ipv6_address_.is_loopback();
}
-bool address::is_unspecified() const ASIO_NOEXCEPT
+bool address::is_unspecified() const noexcept
{
return (type_ == ipv4)
? ipv4_address_.is_unspecified()
: ipv6_address_.is_unspecified();
}
-bool address::is_multicast() const ASIO_NOEXCEPT
+bool address::is_multicast() const noexcept
{
return (type_ == ipv4)
? ipv4_address_.is_multicast()
: ipv6_address_.is_multicast();
}
-bool operator==(const address& a1, const address& a2) ASIO_NOEXCEPT
+bool operator==(const address& a1, const address& a2) noexcept
{
if (a1.type_ != a2.type_)
return false;
@@ -220,7 +216,7 @@ bool operator==(const address& a1, const address& a2) ASIO_NOEXCEPT
return a1.ipv4_address_ == a2.ipv4_address_;
}
-bool operator<(const address& a1, const address& a2) ASIO_NOEXCEPT
+bool operator<(const address& a1, const address& a2) noexcept
{
if (a1.type_ < a2.type_)
return true;
diff --git a/3rdparty/asio/include/asio/ip/impl/address_v4.hpp b/3rdparty/asio/include/asio/ip/impl/address_v4.hpp
index 8cb22ef0f96..5e29a249ba8 100644
--- a/3rdparty/asio/include/asio/ip/impl/address_v4.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/address_v4.hpp
@@ -2,7 +2,7 @@
// ip/impl/address_v4.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/address_v4.ipp b/3rdparty/asio/include/asio/ip/impl/address_v4.ipp
index 276b399497f..d7803271ac9 100644
--- a/3rdparty/asio/include/asio/ip/impl/address_v4.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/address_v4.ipp
@@ -2,7 +2,7 @@
// ip/impl/address_v4.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -57,19 +57,15 @@ address_v4::address_v4(address_v4::uint_type addr)
static_cast<asio::detail::u_long_type>(addr));
}
-address_v4::bytes_type address_v4::to_bytes() const ASIO_NOEXCEPT
+address_v4::bytes_type address_v4::to_bytes() const noexcept
{
using namespace std; // For memcpy.
bytes_type bytes;
-#if defined(ASIO_HAS_STD_ARRAY)
memcpy(bytes.data(), &addr_.s_addr, 4);
-#else // defined(ASIO_HAS_STD_ARRAY)
- memcpy(bytes.elems, &addr_.s_addr, 4);
-#endif // defined(ASIO_HAS_STD_ARRAY)
return bytes;
}
-address_v4::uint_type address_v4::to_uint() const ASIO_NOEXCEPT
+address_v4::uint_type address_v4::to_uint() const noexcept
{
return asio::detail::socket_ops::network_to_host_long(addr_.s_addr);
}
@@ -108,12 +104,12 @@ std::string address_v4::to_string(asio::error_code& ec) const
}
#endif // !defined(ASIO_NO_DEPRECATED)
-bool address_v4::is_loopback() const ASIO_NOEXCEPT
+bool address_v4::is_loopback() const noexcept
{
return (to_uint() & 0xFF000000) == 0x7F000000;
}
-bool address_v4::is_unspecified() const ASIO_NOEXCEPT
+bool address_v4::is_unspecified() const noexcept
{
return to_uint() == 0;
}
@@ -135,7 +131,7 @@ bool address_v4::is_class_c() const
}
#endif // !defined(ASIO_NO_DEPRECATED)
-bool address_v4::is_multicast() const ASIO_NOEXCEPT
+bool address_v4::is_multicast() const noexcept
{
return (to_uint() & 0xF0000000) == 0xE0000000;
}
@@ -167,7 +163,7 @@ address_v4 make_address_v4(const char* str)
}
address_v4 make_address_v4(const char* str,
- asio::error_code& ec) ASIO_NOEXCEPT
+ asio::error_code& ec) noexcept
{
address_v4::bytes_type bytes;
if (asio::detail::socket_ops::inet_pton(
@@ -182,7 +178,7 @@ address_v4 make_address_v4(const std::string& str)
}
address_v4 make_address_v4(const std::string& str,
- asio::error_code& ec) ASIO_NOEXCEPT
+ asio::error_code& ec) noexcept
{
return make_address_v4(str.c_str(), ec);
}
@@ -195,7 +191,7 @@ address_v4 make_address_v4(string_view str)
}
address_v4 make_address_v4(string_view str,
- asio::error_code& ec) ASIO_NOEXCEPT
+ asio::error_code& ec) noexcept
{
return make_address_v4(static_cast<std::string>(str), ec);
}
diff --git a/3rdparty/asio/include/asio/ip/impl/address_v6.hpp b/3rdparty/asio/include/asio/ip/impl/address_v6.hpp
index f65fab73488..b4b53abe069 100644
--- a/3rdparty/asio/include/asio/ip/impl/address_v6.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/address_v6.hpp
@@ -2,7 +2,7 @@
// ip/impl/address_v6.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/address_v6.ipp b/3rdparty/asio/include/asio/ip/impl/address_v6.ipp
index 0021a22d603..8d5b7d1fd09 100644
--- a/3rdparty/asio/include/asio/ip/impl/address_v6.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/address_v6.ipp
@@ -2,7 +2,7 @@
// ip/impl/address_v6.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -31,7 +31,7 @@
namespace asio {
namespace ip {
-address_v6::address_v6() ASIO_NOEXCEPT
+address_v6::address_v6() noexcept
: addr_(),
scope_id_(0)
{
@@ -56,45 +56,37 @@ address_v6::address_v6(const address_v6::bytes_type& bytes,
memcpy(addr_.s6_addr, bytes.data(), 16);
}
-address_v6::address_v6(const address_v6& other) ASIO_NOEXCEPT
+address_v6::address_v6(const address_v6& other) noexcept
: addr_(other.addr_),
scope_id_(other.scope_id_)
{
}
-#if defined(ASIO_HAS_MOVE)
-address_v6::address_v6(address_v6&& other) ASIO_NOEXCEPT
+address_v6::address_v6(address_v6&& other) noexcept
: addr_(other.addr_),
scope_id_(other.scope_id_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
-address_v6& address_v6::operator=(const address_v6& other) ASIO_NOEXCEPT
+address_v6& address_v6::operator=(const address_v6& other) noexcept
{
addr_ = other.addr_;
scope_id_ = other.scope_id_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
-address_v6& address_v6::operator=(address_v6&& other) ASIO_NOEXCEPT
+address_v6& address_v6::operator=(address_v6&& other) noexcept
{
addr_ = other.addr_;
scope_id_ = other.scope_id_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
-address_v6::bytes_type address_v6::to_bytes() const ASIO_NOEXCEPT
+address_v6::bytes_type address_v6::to_bytes() const noexcept
{
using namespace std; // For memcpy.
bytes_type bytes;
-#if defined(ASIO_HAS_STD_ARRAY)
memcpy(bytes.data(), addr_.s6_addr, 16);
-#else // defined(ASIO_HAS_STD_ARRAY)
- memcpy(bytes.elems, addr_.s6_addr, 16);
-#endif // defined(ASIO_HAS_STD_ARRAY)
return bytes;
}
@@ -138,7 +130,7 @@ address_v4 address_v6::to_v4() const
}
#endif // !defined(ASIO_NO_DEPRECATED)
-bool address_v6::is_loopback() const ASIO_NOEXCEPT
+bool address_v6::is_loopback() const noexcept
{
return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
&& (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
@@ -150,7 +142,7 @@ bool address_v6::is_loopback() const ASIO_NOEXCEPT
&& (addr_.s6_addr[14] == 0) && (addr_.s6_addr[15] == 1));
}
-bool address_v6::is_unspecified() const ASIO_NOEXCEPT
+bool address_v6::is_unspecified() const noexcept
{
return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
&& (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
@@ -162,17 +154,17 @@ bool address_v6::is_unspecified() const ASIO_NOEXCEPT
&& (addr_.s6_addr[14] == 0) && (addr_.s6_addr[15] == 0));
}
-bool address_v6::is_link_local() const ASIO_NOEXCEPT
+bool address_v6::is_link_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xfe) && ((addr_.s6_addr[1] & 0xc0) == 0x80));
}
-bool address_v6::is_site_local() const ASIO_NOEXCEPT
+bool address_v6::is_site_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xfe) && ((addr_.s6_addr[1] & 0xc0) == 0xc0));
}
-bool address_v6::is_v4_mapped() const ASIO_NOEXCEPT
+bool address_v6::is_v4_mapped() const noexcept
{
return ((addr_.s6_addr[0] == 0) && (addr_.s6_addr[1] == 0)
&& (addr_.s6_addr[2] == 0) && (addr_.s6_addr[3] == 0)
@@ -198,37 +190,37 @@ bool address_v6::is_v4_compatible() const
}
#endif // !defined(ASIO_NO_DEPRECATED)
-bool address_v6::is_multicast() const ASIO_NOEXCEPT
+bool address_v6::is_multicast() const noexcept
{
return (addr_.s6_addr[0] == 0xff);
}
-bool address_v6::is_multicast_global() const ASIO_NOEXCEPT
+bool address_v6::is_multicast_global() const noexcept
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x0e));
}
-bool address_v6::is_multicast_link_local() const ASIO_NOEXCEPT
+bool address_v6::is_multicast_link_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x02));
}
-bool address_v6::is_multicast_node_local() const ASIO_NOEXCEPT
+bool address_v6::is_multicast_node_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x01));
}
-bool address_v6::is_multicast_org_local() const ASIO_NOEXCEPT
+bool address_v6::is_multicast_org_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x08));
}
-bool address_v6::is_multicast_site_local() const ASIO_NOEXCEPT
+bool address_v6::is_multicast_site_local() const noexcept
{
return ((addr_.s6_addr[0] == 0xff) && ((addr_.s6_addr[1] & 0x0f) == 0x05));
}
-bool operator==(const address_v6& a1, const address_v6& a2) ASIO_NOEXCEPT
+bool operator==(const address_v6& a1, const address_v6& a2) noexcept
{
using namespace std; // For memcmp.
return memcmp(&a1.addr_, &a2.addr_,
@@ -236,7 +228,7 @@ bool operator==(const address_v6& a1, const address_v6& a2) ASIO_NOEXCEPT
&& a1.scope_id_ == a2.scope_id_;
}
-bool operator<(const address_v6& a1, const address_v6& a2) ASIO_NOEXCEPT
+bool operator<(const address_v6& a1, const address_v6& a2) noexcept
{
using namespace std; // For memcmp.
int memcmp_result = memcmp(&a1.addr_, &a2.addr_,
@@ -248,7 +240,7 @@ bool operator<(const address_v6& a1, const address_v6& a2) ASIO_NOEXCEPT
return a1.scope_id_ < a2.scope_id_;
}
-address_v6 address_v6::loopback() ASIO_NOEXCEPT
+address_v6 address_v6::loopback() noexcept
{
address_v6 tmp;
tmp.addr_.s6_addr[15] = 1;
@@ -282,7 +274,7 @@ address_v6 make_address_v6(const char* str)
}
address_v6 make_address_v6(const char* str,
- asio::error_code& ec) ASIO_NOEXCEPT
+ asio::error_code& ec) noexcept
{
address_v6::bytes_type bytes;
unsigned long scope_id = 0;
@@ -298,7 +290,7 @@ address_v6 make_address_v6(const std::string& str)
}
address_v6 make_address_v6(const std::string& str,
- asio::error_code& ec) ASIO_NOEXCEPT
+ asio::error_code& ec) noexcept
{
return make_address_v6(str.c_str(), ec);
}
@@ -311,7 +303,7 @@ address_v6 make_address_v6(string_view str)
}
address_v6 make_address_v6(string_view str,
- asio::error_code& ec) ASIO_NOEXCEPT
+ asio::error_code& ec) noexcept
{
return make_address_v6(static_cast<std::string>(str), ec);
}
diff --git a/3rdparty/asio/include/asio/ip/impl/basic_endpoint.hpp b/3rdparty/asio/include/asio/ip/impl/basic_endpoint.hpp
index 7cd90e6f42e..2da96c16547 100644
--- a/3rdparty/asio/include/asio/ip/impl/basic_endpoint.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// ip/impl/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/host_name.ipp b/3rdparty/asio/include/asio/ip/impl/host_name.ipp
index 84f5729246c..eb27829fdab 100644
--- a/3rdparty/asio/include/asio/ip/impl/host_name.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/host_name.ipp
@@ -2,7 +2,7 @@
// ip/impl/host_name.ipp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/network_v4.hpp b/3rdparty/asio/include/asio/ip/impl/network_v4.hpp
index ae0defa8836..2199c7da8ca 100644
--- a/3rdparty/asio/include/asio/ip/impl/network_v4.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/network_v4.hpp
@@ -2,7 +2,7 @@
// ip/impl/network_v4.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/ip/impl/network_v4.ipp b/3rdparty/asio/include/asio/ip/impl/network_v4.ipp
index 27f0519acf5..e7e68ed443a 100644
--- a/3rdparty/asio/include/asio/ip/impl/network_v4.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/network_v4.ipp
@@ -2,7 +2,7 @@
// ip/impl/network_v4.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -91,7 +91,7 @@ network_v4::network_v4(const address_v4& addr, const address_v4& mask)
}
}
-address_v4 network_v4::netmask() const ASIO_NOEXCEPT
+address_v4 network_v4::netmask() const noexcept
{
uint32_t nmbits = 0xffffffff;
if (prefix_length_ == 0)
@@ -101,7 +101,7 @@ address_v4 network_v4::netmask() const ASIO_NOEXCEPT
return address_v4(nmbits);
}
-address_v4_range network_v4::hosts() const ASIO_NOEXCEPT
+address_v4_range network_v4::hosts() const noexcept
{
return is_host()
? address_v4_range(address_, address_v4(address_.to_uint() + 1))
@@ -129,7 +129,9 @@ std::string network_v4::to_string(asio::error_code& ec) const
using namespace std; // For sprintf.
ec = asio::error_code();
char prefix_len[16];
-#if defined(ASIO_HAS_SECURE_RTL)
+#if defined(ASIO_HAS_SNPRINTF)
+ snprintf(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
+#elif defined(ASIO_HAS_SECURE_RTL)
sprintf_s(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
#else // defined(ASIO_HAS_SECURE_RTL)
sprintf(prefix_len, "/%u", prefix_length_);
diff --git a/3rdparty/asio/include/asio/ip/impl/network_v6.hpp b/3rdparty/asio/include/asio/ip/impl/network_v6.hpp
index f159f839b85..69c121813cb 100644
--- a/3rdparty/asio/include/asio/ip/impl/network_v6.hpp
+++ b/3rdparty/asio/include/asio/ip/impl/network_v6.hpp
@@ -2,7 +2,7 @@
// ip/impl/network_v6.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/impl/network_v6.ipp b/3rdparty/asio/include/asio/ip/impl/network_v6.ipp
index 1a4684bf03d..d85cd647e06 100644
--- a/3rdparty/asio/include/asio/ip/impl/network_v6.ipp
+++ b/3rdparty/asio/include/asio/ip/impl/network_v6.ipp
@@ -2,7 +2,7 @@
// ip/impl/network_v6.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -42,7 +42,7 @@ network_v6::network_v6(const address_v6& addr, unsigned short prefix_len)
}
}
-ASIO_DECL address_v6 network_v6::network() const ASIO_NOEXCEPT
+ASIO_DECL address_v6 network_v6::network() const noexcept
{
address_v6::bytes_type bytes(address_.to_bytes());
for (std::size_t i = 0; i < 16; ++i)
@@ -55,7 +55,7 @@ ASIO_DECL address_v6 network_v6::network() const ASIO_NOEXCEPT
return address_v6(bytes, address_.scope_id());
}
-address_v6_range network_v6::hosts() const ASIO_NOEXCEPT
+address_v6_range network_v6::hosts() const noexcept
{
address_v6::bytes_type begin_bytes(address_.to_bytes());
address_v6::bytes_type end_bytes(address_.to_bytes());
@@ -98,7 +98,9 @@ std::string network_v6::to_string(asio::error_code& ec) const
using namespace std; // For sprintf.
ec = asio::error_code();
char prefix_len[16];
-#if defined(ASIO_HAS_SECURE_RTL)
+#if defined(ASIO_HAS_SNPRINTF)
+ snprintf(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
+#elif defined(ASIO_HAS_SECURE_RTL)
sprintf_s(prefix_len, sizeof(prefix_len), "/%u", prefix_length_);
#else // defined(ASIO_HAS_SECURE_RTL)
sprintf(prefix_len, "/%u", prefix_length_);
diff --git a/3rdparty/asio/include/asio/ip/multicast.hpp b/3rdparty/asio/include/asio/ip/multicast.hpp
index 1b86351f095..363f5ed81d5 100644
--- a/3rdparty/asio/include/asio/ip/multicast.hpp
+++ b/3rdparty/asio/include/asio/ip/multicast.hpp
@@ -2,7 +2,7 @@
// ip/multicast.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/network_v4.hpp b/3rdparty/asio/include/asio/ip/network_v4.hpp
index 035dea89e79..1c29ebec143 100644
--- a/3rdparty/asio/include/asio/ip/network_v4.hpp
+++ b/3rdparty/asio/include/asio/ip/network_v4.hpp
@@ -2,7 +2,7 @@
// ip/network_v4.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -40,7 +40,7 @@ class network_v4
{
public:
/// Default constructor.
- network_v4() ASIO_NOEXCEPT
+ network_v4() noexcept
: address_(),
prefix_length_(0)
{
@@ -55,78 +55,74 @@ public:
const address_v4& mask);
/// Copy constructor.
- network_v4(const network_v4& other) ASIO_NOEXCEPT
+ network_v4(const network_v4& other) noexcept
: address_(other.address_),
prefix_length_(other.prefix_length_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- network_v4(network_v4&& other) ASIO_NOEXCEPT
- : address_(ASIO_MOVE_CAST(address_v4)(other.address_)),
+ network_v4(network_v4&& other) noexcept
+ : address_(static_cast<address_v4&&>(other.address_)),
prefix_length_(other.prefix_length_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assign from another network.
- network_v4& operator=(const network_v4& other) ASIO_NOEXCEPT
+ network_v4& operator=(const network_v4& other) noexcept
{
address_ = other.address_;
prefix_length_ = other.prefix_length_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another network.
- network_v4& operator=(network_v4&& other) ASIO_NOEXCEPT
+ network_v4& operator=(network_v4&& other) noexcept
{
- address_ = ASIO_MOVE_CAST(address_v4)(other.address_);
+ address_ = static_cast<address_v4&&>(other.address_);
prefix_length_ = other.prefix_length_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Obtain the address object specified when the network object was created.
- address_v4 address() const ASIO_NOEXCEPT
+ address_v4 address() const noexcept
{
return address_;
}
/// Obtain the prefix length that was specified when the network object was
/// created.
- unsigned short prefix_length() const ASIO_NOEXCEPT
+ unsigned short prefix_length() const noexcept
{
return prefix_length_;
}
/// Obtain the netmask that was specified when the network object was created.
- ASIO_DECL address_v4 netmask() const ASIO_NOEXCEPT;
+ ASIO_DECL address_v4 netmask() const noexcept;
/// Obtain an address object that represents the network address.
- address_v4 network() const ASIO_NOEXCEPT
+ address_v4 network() const noexcept
{
return address_v4(address_.to_uint() & netmask().to_uint());
}
/// Obtain an address object that represents the network's broadcast address.
- address_v4 broadcast() const ASIO_NOEXCEPT
+ address_v4 broadcast() const noexcept
{
return address_v4(network().to_uint() | (netmask().to_uint() ^ 0xFFFFFFFF));
}
/// Obtain an address range corresponding to the hosts in the network.
- ASIO_DECL address_v4_range hosts() const ASIO_NOEXCEPT;
+ ASIO_DECL address_v4_range hosts() const noexcept;
/// Obtain the true network address, omitting any host bits.
- network_v4 canonical() const ASIO_NOEXCEPT
+ network_v4 canonical() const noexcept
{
- return network_v4(network(), netmask());
+ return network_v4(network(), prefix_length());
}
/// Test if network is a valid host address.
- bool is_host() const ASIO_NOEXCEPT
+ bool is_host() const noexcept
{
return prefix_length_ == 32;
}
diff --git a/3rdparty/asio/include/asio/ip/network_v6.hpp b/3rdparty/asio/include/asio/ip/network_v6.hpp
index 44c0ff36305..942ed9d2f29 100644
--- a/3rdparty/asio/include/asio/ip/network_v6.hpp
+++ b/3rdparty/asio/include/asio/ip/network_v6.hpp
@@ -2,7 +2,7 @@
// ip/network_v6.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -40,7 +40,7 @@ class network_v6
{
public:
/// Default constructor.
- network_v6() ASIO_NOEXCEPT
+ network_v6() noexcept
: address_(),
prefix_length_(0)
{
@@ -51,66 +51,62 @@ public:
unsigned short prefix_len);
/// Copy constructor.
- network_v6(const network_v6& other) ASIO_NOEXCEPT
+ network_v6(const network_v6& other) noexcept
: address_(other.address_),
prefix_length_(other.prefix_length_)
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
- network_v6(network_v6&& other) ASIO_NOEXCEPT
- : address_(ASIO_MOVE_CAST(address_v6)(other.address_)),
+ network_v6(network_v6&& other) noexcept
+ : address_(static_cast<address_v6&&>(other.address_)),
prefix_length_(other.prefix_length_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assign from another network.
- network_v6& operator=(const network_v6& other) ASIO_NOEXCEPT
+ network_v6& operator=(const network_v6& other) noexcept
{
address_ = other.address_;
prefix_length_ = other.prefix_length_;
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another network.
- network_v6& operator=(network_v6&& other) ASIO_NOEXCEPT
+ network_v6& operator=(network_v6&& other) noexcept
{
- address_ = ASIO_MOVE_CAST(address_v6)(other.address_);
+ address_ = static_cast<address_v6&&>(other.address_);
prefix_length_ = other.prefix_length_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// Obtain the address object specified when the network object was created.
- address_v6 address() const ASIO_NOEXCEPT
+ address_v6 address() const noexcept
{
return address_;
}
/// Obtain the prefix length that was specified when the network object was
/// created.
- unsigned short prefix_length() const ASIO_NOEXCEPT
+ unsigned short prefix_length() const noexcept
{
return prefix_length_;
}
/// Obtain an address object that represents the network address.
- ASIO_DECL address_v6 network() const ASIO_NOEXCEPT;
+ ASIO_DECL address_v6 network() const noexcept;
/// Obtain an address range corresponding to the hosts in the network.
- ASIO_DECL address_v6_range hosts() const ASIO_NOEXCEPT;
+ ASIO_DECL address_v6_range hosts() const noexcept;
/// Obtain the true network address, omitting any host bits.
- network_v6 canonical() const ASIO_NOEXCEPT
+ network_v6 canonical() const noexcept
{
return network_v6(network(), prefix_length());
}
/// Test if network is a valid host address.
- bool is_host() const ASIO_NOEXCEPT
+ bool is_host() const noexcept
{
return prefix_length_ == 128;
}
diff --git a/3rdparty/asio/include/asio/ip/resolver_base.hpp b/3rdparty/asio/include/asio/ip/resolver_base.hpp
index 06e769c05b8..9fa01ca9107 100644
--- a/3rdparty/asio/include/asio/ip/resolver_base.hpp
+++ b/3rdparty/asio/include/asio/ip/resolver_base.hpp
@@ -2,7 +2,7 @@
// ip/resolver_base.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/resolver_query_base.hpp b/3rdparty/asio/include/asio/ip/resolver_query_base.hpp
index a96068cb3f3..892bc28e006 100644
--- a/3rdparty/asio/include/asio/ip/resolver_query_base.hpp
+++ b/3rdparty/asio/include/asio/ip/resolver_query_base.hpp
@@ -2,7 +2,7 @@
// ip/resolver_query_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/tcp.hpp b/3rdparty/asio/include/asio/ip/tcp.hpp
index df2b99c0f8c..b8319609ddb 100644
--- a/3rdparty/asio/include/asio/ip/tcp.hpp
+++ b/3rdparty/asio/include/asio/ip/tcp.hpp
@@ -2,7 +2,7 @@
// ip/tcp.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -49,31 +49,31 @@ public:
typedef basic_endpoint<tcp> endpoint;
/// Construct to represent the IPv4 TCP protocol.
- static tcp v4() ASIO_NOEXCEPT
+ static tcp v4() noexcept
{
return tcp(ASIO_OS_DEF(AF_INET));
}
/// Construct to represent the IPv6 TCP protocol.
- static tcp v6() ASIO_NOEXCEPT
+ static tcp v6() noexcept
{
return tcp(ASIO_OS_DEF(AF_INET6));
}
/// Obtain an identifier for the type of the protocol.
- int type() const ASIO_NOEXCEPT
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_STREAM);
}
/// Obtain an identifier for the protocol.
- int protocol() const ASIO_NOEXCEPT
+ int protocol() const noexcept
{
return ASIO_OS_DEF(IPPROTO_TCP);
}
/// Obtain an identifier for the protocol family.
- int family() const ASIO_NOEXCEPT
+ int family() const noexcept
{
return family_;
}
@@ -139,7 +139,7 @@ public:
private:
// Construct with a specific family.
- explicit tcp(int protocol_family) ASIO_NOEXCEPT
+ explicit tcp(int protocol_family) noexcept
: family_(protocol_family)
{
}
diff --git a/3rdparty/asio/include/asio/ip/udp.hpp b/3rdparty/asio/include/asio/ip/udp.hpp
index 796de061229..50c667a5371 100644
--- a/3rdparty/asio/include/asio/ip/udp.hpp
+++ b/3rdparty/asio/include/asio/ip/udp.hpp
@@ -2,7 +2,7 @@
// ip/udp.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -46,31 +46,31 @@ public:
typedef basic_endpoint<udp> endpoint;
/// Construct to represent the IPv4 UDP protocol.
- static udp v4() ASIO_NOEXCEPT
+ static udp v4() noexcept
{
return udp(ASIO_OS_DEF(AF_INET));
}
/// Construct to represent the IPv6 UDP protocol.
- static udp v6() ASIO_NOEXCEPT
+ static udp v6() noexcept
{
return udp(ASIO_OS_DEF(AF_INET6));
}
/// Obtain an identifier for the type of the protocol.
- int type() const ASIO_NOEXCEPT
+ int type() const noexcept
{
return ASIO_OS_DEF(SOCK_DGRAM);
}
/// Obtain an identifier for the protocol.
- int protocol() const ASIO_NOEXCEPT
+ int protocol() const noexcept
{
return ASIO_OS_DEF(IPPROTO_UDP);
}
/// Obtain an identifier for the protocol family.
- int family() const ASIO_NOEXCEPT
+ int family() const noexcept
{
return family_;
}
@@ -95,7 +95,7 @@ public:
private:
// Construct with a specific family.
- explicit udp(int protocol_family) ASIO_NOEXCEPT
+ explicit udp(int protocol_family) noexcept
: family_(protocol_family)
{
}
diff --git a/3rdparty/asio/include/asio/ip/unicast.hpp b/3rdparty/asio/include/asio/ip/unicast.hpp
index a0b78516372..4d68af877bc 100644
--- a/3rdparty/asio/include/asio/ip/unicast.hpp
+++ b/3rdparty/asio/include/asio/ip/unicast.hpp
@@ -2,7 +2,7 @@
// ip/unicast.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ip/v6_only.hpp b/3rdparty/asio/include/asio/ip/v6_only.hpp
index ff93767f3f2..0fc61213bda 100644
--- a/3rdparty/asio/include/asio/ip/v6_only.hpp
+++ b/3rdparty/asio/include/asio/ip/v6_only.hpp
@@ -2,7 +2,7 @@
// ip/v6_only.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -26,7 +26,7 @@ namespace ip {
/// Socket option for determining whether an IPv6 socket supports IPv6
/// communication only.
/**
- * Implements the IPPROTO_IPV6/IP_V6ONLY socket option.
+ * Implements the IPPROTO_IPV6/IPV6_V6ONLY socket option.
*
* @par Examples
* Setting the option:
diff --git a/3rdparty/asio/include/asio/is_applicable_property.hpp b/3rdparty/asio/include/asio/is_applicable_property.hpp
index c0100e0b1f1..20ca981ad02 100644
--- a/3rdparty/asio/include/asio/is_applicable_property.hpp
+++ b/3rdparty/asio/include/asio/is_applicable_property.hpp
@@ -2,7 +2,7 @@
// is_applicable_property.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -30,11 +30,11 @@ struct is_applicable_property_trait : false_type
template <typename T, typename Property>
struct is_applicable_property_trait<T, Property,
- typename void_type<
- typename enable_if<
+ void_t<
+ enable_if_t<
!!Property::template is_applicable_property_v<T>
- >::type
- >::type> : true_type
+ >
+ >> : true_type
{
};
@@ -51,7 +51,7 @@ struct is_applicable_property :
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T, typename Property>
-ASIO_CONSTEXPR const bool is_applicable_property_v
+constexpr const bool is_applicable_property_v
= is_applicable_property<T, Property>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
diff --git a/3rdparty/asio/include/asio/is_contiguous_iterator.hpp b/3rdparty/asio/include/asio/is_contiguous_iterator.hpp
new file mode 100644
index 00000000000..a120d4d3761
--- /dev/null
+++ b/3rdparty/asio/include/asio/is_contiguous_iterator.hpp
@@ -0,0 +1,45 @@
+//
+// is_contiguous_iterator.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 ASIO_IS_CONTIGUOUS_ITERATOR_HPP
+#define ASIO_IS_CONTIGUOUS_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <iterator>
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// The is_contiguous_iterator class is a traits class that may be used to
+/// determine whether a type is a contiguous iterator.
+template <typename T>
+struct is_contiguous_iterator :
+#if defined(ASIO_HAS_STD_CONCEPTS) \
+ || defined(GENERATING_DOCUMENTATION)
+ integral_constant<bool, std::contiguous_iterator<T>>
+#else // defined(ASIO_HAS_STD_CONCEPTS)
+ // || defined(GENERATING_DOCUMENTATION)
+ is_pointer<T>
+#endif // defined(ASIO_HAS_STD_CONCEPTS)
+ // || defined(GENERATING_DOCUMENTATION)
+{
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IS_CONTIGUOUS_ITERATOR_HPP
diff --git a/3rdparty/asio/include/asio/is_executor.hpp b/3rdparty/asio/include/asio/is_executor.hpp
index 0d5d703be35..2c933a3949c 100644
--- a/3rdparty/asio/include/asio/is_executor.hpp
+++ b/3rdparty/asio/include/asio/is_executor.hpp
@@ -2,7 +2,7 @@
// is_executor.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/is_read_buffered.hpp b/3rdparty/asio/include/asio/is_read_buffered.hpp
index aed333249c3..768f70fb7e1 100644
--- a/3rdparty/asio/include/asio/is_read_buffered.hpp
+++ b/3rdparty/asio/include/asio/is_read_buffered.hpp
@@ -2,7 +2,7 @@
// is_read_buffered.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/is_write_buffered.hpp b/3rdparty/asio/include/asio/is_write_buffered.hpp
index b091d9a05bc..1818fd4b2d5 100644
--- a/3rdparty/asio/include/asio/is_write_buffered.hpp
+++ b/3rdparty/asio/include/asio/is_write_buffered.hpp
@@ -2,7 +2,7 @@
// is_write_buffered.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/local/basic_endpoint.hpp b/3rdparty/asio/include/asio/local/basic_endpoint.hpp
index 11a3c9b5a1f..d363f352531 100644
--- a/3rdparty/asio/include/asio/local/basic_endpoint.hpp
+++ b/3rdparty/asio/include/asio/local/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// local/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Derived from a public domain implementation written by Daniel Casimiro.
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -60,7 +60,7 @@ public:
#endif
/// Default constructor.
- basic_endpoint() ASIO_NOEXCEPT
+ basic_endpoint() noexcept
{
}
@@ -90,13 +90,11 @@ public:
{
}
-#if defined(ASIO_HAS_MOVE)
/// Move constructor.
basic_endpoint(basic_endpoint&& other)
: impl_(other.impl_)
{
}
-#endif // defined(ASIO_HAS_MOVE)
/// Assign from another endpoint.
basic_endpoint& operator=(const basic_endpoint& other)
@@ -105,14 +103,12 @@ public:
return *this;
}
-#if defined(ASIO_HAS_MOVE)
/// Move-assign from another endpoint.
basic_endpoint& operator=(basic_endpoint&& other)
{
impl_ = other.impl_;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
/// The protocol associated with the endpoint.
protocol_type protocol() const
diff --git a/3rdparty/asio/include/asio/local/connect_pair.hpp b/3rdparty/asio/include/asio/local/connect_pair.hpp
index 0b22ef44780..b8608e40de5 100644
--- a/3rdparty/asio/include/asio/local/connect_pair.hpp
+++ b/3rdparty/asio/include/asio/local/connect_pair.hpp
@@ -2,7 +2,7 @@
// local/connect_pair.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/local/datagram_protocol.hpp b/3rdparty/asio/include/asio/local/datagram_protocol.hpp
index a147eb8c7f4..6bf18a46e49 100644
--- a/3rdparty/asio/include/asio/local/datagram_protocol.hpp
+++ b/3rdparty/asio/include/asio/local/datagram_protocol.hpp
@@ -2,7 +2,7 @@
// local/datagram_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -45,19 +45,19 @@ class datagram_protocol
{
public:
/// Obtain an identifier for the type of the protocol.
- int type() const ASIO_NOEXCEPT
+ int type() const noexcept
{
return SOCK_DGRAM;
}
/// Obtain an identifier for the protocol.
- int protocol() const ASIO_NOEXCEPT
+ int protocol() const noexcept
{
return 0;
}
/// Obtain an identifier for the protocol family.
- int family() const ASIO_NOEXCEPT
+ int family() const noexcept
{
return AF_UNIX;
}
diff --git a/3rdparty/asio/include/asio/local/detail/endpoint.hpp b/3rdparty/asio/include/asio/local/detail/endpoint.hpp
index 699c225d5a6..5e94c3d0aeb 100644
--- a/3rdparty/asio/include/asio/local/detail/endpoint.hpp
+++ b/3rdparty/asio/include/asio/local/detail/endpoint.hpp
@@ -2,7 +2,7 @@
// local/detail/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Derived from a public domain implementation written by Daniel Casimiro.
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/local/detail/impl/endpoint.ipp b/3rdparty/asio/include/asio/local/detail/impl/endpoint.ipp
index 8a254ed6da1..55b403e8ed6 100644
--- a/3rdparty/asio/include/asio/local/detail/impl/endpoint.ipp
+++ b/3rdparty/asio/include/asio/local/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
// local/detail/impl/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Derived from a public domain implementation written by Daniel Casimiro.
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/local/seq_packet_protocol.hpp b/3rdparty/asio/include/asio/local/seq_packet_protocol.hpp
new file mode 100644
index 00000000000..c5a231fe859
--- /dev/null
+++ b/3rdparty/asio/include/asio/local/seq_packet_protocol.hpp
@@ -0,0 +1,84 @@
+//
+// local/seq_packet_protocol.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 ASIO_LOCAL_SEQ_PACKET_PROTOCOL_HPP
+#define ASIO_LOCAL_SEQ_PACKET_PROTOCOL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_LOCAL_SOCKETS) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_socket_acceptor.hpp"
+#include "asio/basic_seq_packet_socket.hpp"
+#include "asio/detail/socket_types.hpp"
+#include "asio/local/basic_endpoint.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace local {
+
+/// Encapsulates the flags needed for seq_packet UNIX sockets.
+/**
+ * The asio::local::seq_packet_protocol class contains flags necessary
+ * for sequenced packet UNIX domain sockets.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe.
+ *
+ * @par Concepts:
+ * Protocol.
+ */
+class seq_packet_protocol
+{
+public:
+ /// Obtain an identifier for the type of the protocol.
+ int type() const noexcept
+ {
+ return SOCK_SEQPACKET;
+ }
+
+ /// Obtain an identifier for the protocol.
+ int protocol() const noexcept
+ {
+ return 0;
+ }
+
+ /// Obtain an identifier for the protocol family.
+ int family() const noexcept
+ {
+ return AF_UNIX;
+ }
+
+ /// The type of a UNIX domain endpoint.
+ typedef basic_endpoint<seq_packet_protocol> endpoint;
+
+ /// The UNIX domain socket type.
+ typedef basic_seq_packet_socket<seq_packet_protocol> socket;
+
+ /// The UNIX domain acceptor type.
+ typedef basic_socket_acceptor<seq_packet_protocol> acceptor;
+};
+
+} // namespace local
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_LOCAL_SEQ_PACKET_PROTOCOL_HPP
diff --git a/3rdparty/asio/include/asio/local/stream_protocol.hpp b/3rdparty/asio/include/asio/local/stream_protocol.hpp
index 5f39f2cc3c7..4cbad450fc5 100644
--- a/3rdparty/asio/include/asio/local/stream_protocol.hpp
+++ b/3rdparty/asio/include/asio/local/stream_protocol.hpp
@@ -2,7 +2,7 @@
// local/stream_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -47,19 +47,19 @@ class stream_protocol
{
public:
/// Obtain an identifier for the type of the protocol.
- int type() const ASIO_NOEXCEPT
+ int type() const noexcept
{
return SOCK_STREAM;
}
/// Obtain an identifier for the protocol.
- int protocol() const ASIO_NOEXCEPT
+ int protocol() const noexcept
{
return 0;
}
/// Obtain an identifier for the protocol family.
- int family() const ASIO_NOEXCEPT
+ int family() const noexcept
{
return AF_UNIX;
}
diff --git a/3rdparty/asio/include/asio/multiple_exceptions.hpp b/3rdparty/asio/include/asio/multiple_exceptions.hpp
index f66f8e67132..2fd0455a91a 100644
--- a/3rdparty/asio/include/asio/multiple_exceptions.hpp
+++ b/3rdparty/asio/include/asio/multiple_exceptions.hpp
@@ -2,7 +2,7 @@
// multiple_exceptions.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -21,9 +21,6 @@
namespace asio {
-#if defined(ASIO_HAS_STD_EXCEPTION_PTR) \
- || defined(GENERATING_DOCUMENTATION)
-
/// Exception thrown when there are multiple pending exceptions to rethrow.
class multiple_exceptions
: public std::exception
@@ -31,11 +28,11 @@ class multiple_exceptions
public:
/// Constructor.
ASIO_DECL multiple_exceptions(
- std::exception_ptr first) ASIO_NOEXCEPT;
+ std::exception_ptr first) noexcept;
/// Obtain message associated with exception.
ASIO_DECL virtual const char* what() const
- ASIO_NOEXCEPT_OR_NOTHROW;
+ noexcept;
/// Obtain a pointer to the first exception.
ASIO_DECL std::exception_ptr first_exception() const;
@@ -44,9 +41,6 @@ private:
std::exception_ptr first_;
};
-#endif // defined(ASIO_HAS_STD_EXCEPTION_PTR)
- // || defined(GENERATING_DOCUMENTATION)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/packaged_task.hpp b/3rdparty/asio/include/asio/packaged_task.hpp
index cd47f66d833..68e5b9b175a 100644
--- a/3rdparty/asio/include/asio/packaged_task.hpp
+++ b/3rdparty/asio/include/asio/packaged_task.hpp
@@ -2,7 +2,7 @@
// packaged_task.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,15 +23,11 @@
#include "asio/async_result.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
-
/// Partial specialisation of @c async_result for @c std::packaged_task.
template <typename Result, typename... Args, typename Signature>
class async_result<std::packaged_task<Result(Args...)>, Signature>
@@ -60,62 +56,6 @@ private:
return_type future_;
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
-template <typename Result, typename Signature>
-struct async_result<std::packaged_task<Result()>, Signature>
-{
- typedef std::packaged_task<Result()> completion_handler_type;
- typedef std::future<Result> return_type;
-
- explicit async_result(completion_handler_type& h)
- : future_(h.get_future())
- {
- }
-
- return_type get()
- {
- return std::move(future_);
- }
-
-private:
- return_type future_;
-};
-
-#define ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \
- template <typename Result, \
- ASIO_VARIADIC_TPARAMS(n), typename Signature> \
- class async_result< \
- std::packaged_task<Result(ASIO_VARIADIC_TARGS(n))>, Signature> \
- { \
- public: \
- typedef std::packaged_task< \
- Result(ASIO_VARIADIC_TARGS(n))> \
- completion_handler_type; \
- \
- typedef std::future<Result> return_type; \
- \
- explicit async_result(completion_handler_type& h) \
- : future_(h.get_future()) \
- { \
- } \
- \
- return_type get() \
- { \
- return std::move(future_); \
- } \
- \
- private: \
- return_type future_; \
- }; \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_ASYNC_RESULT_DEF)
-#undef ASIO_PRIVATE_ASYNC_RESULT_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/placeholders.hpp b/3rdparty/asio/include/asio/placeholders.hpp
index 9c4a7053fdc..21da545fe9e 100644
--- a/3rdparty/asio/include/asio/placeholders.hpp
+++ b/3rdparty/asio/include/asio/placeholders.hpp
@@ -2,7 +2,7 @@
// placeholders.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,10 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/arg.hpp>
-#endif // defined(ASIO_HAS_BOOST_BIND)
+#include "asio/detail/functional.hpp"
#include "asio/detail/push_options.hpp"
@@ -28,119 +25,46 @@ namespace placeholders {
#if defined(GENERATING_DOCUMENTATION)
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the error argument of a handler for any of the asynchronous functions.
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the error argument of a handler for any of the asynchronous
+/// functions.
unspecified error;
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the bytes_transferred argument of a handler for asynchronous functions such
-/// as asio::basic_stream_socket::async_write_some or
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the bytes_transferred argument of a handler for asynchronous
+/// functions such as asio::basic_stream_socket::async_write_some or
/// asio::async_write.
unspecified bytes_transferred;
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the iterator argument of a handler for asynchronous functions such as
-/// asio::async_connect.
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the iterator argument of a handler for asynchronous functions
+/// such as asio::async_connect.
unspecified iterator;
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the results argument of a handler for asynchronous functions such as
-/// asio::basic_resolver::async_resolve.
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the results argument of a handler for asynchronous functions
+/// such as asio::basic_resolver::async_resolve.
unspecified results;
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the results argument of a handler for asynchronous functions such as
-/// asio::async_connect.
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the results argument of a handler for asynchronous functions
+/// such as asio::async_connect.
unspecified endpoint;
-/// An argument placeholder, for use with boost::bind(), that corresponds to
-/// the signal_number argument of a handler for asynchronous functions such as
-/// asio::signal_set::async_wait.
+/// An argument placeholder, for use with std::bind() or boost::bind(), that
+/// corresponds to the signal_number argument of a handler for asynchronous
+/// functions such as asio::signal_set::async_wait.
unspecified signal_number;
-#elif defined(ASIO_HAS_BOOST_BIND)
-# if defined(__BORLANDC__) || defined(__GNUC__)
-
-inline boost::arg<1> error()
-{
- return boost::arg<1>();
-}
-
-inline boost::arg<2> bytes_transferred()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> iterator()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> results()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> endpoint()
-{
- return boost::arg<2>();
-}
-
-inline boost::arg<2> signal_number()
-{
- return boost::arg<2>();
-}
-
-# else
-
-namespace detail
-{
- template <int Number>
- struct placeholder
- {
- static boost::arg<Number>& get()
- {
- static boost::arg<Number> result;
- return result;
- }
- };
-}
-
-# if defined(ASIO_MSVC) && (ASIO_MSVC < 1400)
-
-static boost::arg<1>& error
- = asio::placeholders::detail::placeholder<1>::get();
-static boost::arg<2>& bytes_transferred
- = asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& iterator
- = asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& results
- = asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& endpoint
- = asio::placeholders::detail::placeholder<2>::get();
-static boost::arg<2>& signal_number
- = asio::placeholders::detail::placeholder<2>::get();
-
-# else
-
-namespace
-{
- boost::arg<1>& error
- = asio::placeholders::detail::placeholder<1>::get();
- boost::arg<2>& bytes_transferred
- = asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& iterator
- = asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& results
- = asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& endpoint
- = asio::placeholders::detail::placeholder<2>::get();
- boost::arg<2>& signal_number
- = asio::placeholders::detail::placeholder<2>::get();
-} // namespace
-
-# endif
-# endif
+#else
+
+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
} // namespace placeholders
diff --git a/3rdparty/asio/include/asio/posix/basic_descriptor.hpp b/3rdparty/asio/include/asio/posix/basic_descriptor.hpp
index e7152798a4e..fa47d6a0949 100644
--- a/3rdparty/asio/include/asio/posix/basic_descriptor.hpp
+++ b/3rdparty/asio/include/asio/posix/basic_descriptor.hpp
@@ -2,7 +2,7 @@
// posix/basic_descriptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,20 +20,22 @@
#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \
|| defined(GENERATING_DOCUMENTATION)
+#include <utility>
#include "asio/any_io_executor.hpp"
#include "asio/async_result.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/io_object_impl.hpp"
#include "asio/detail/non_const_lvalue.hpp"
-#include "asio/detail/reactive_descriptor_service.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
#include "asio/execution_context.hpp"
#include "asio/posix/descriptor_base.hpp"
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/io_uring_descriptor_service.hpp"
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+# include "asio/detail/reactive_descriptor_service.hpp"
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
#include "asio/detail/push_options.hpp"
@@ -53,6 +55,9 @@ template <typename Executor = any_io_executor>
class basic_descriptor
: public descriptor_base
{
+private:
+ class initiate_async_wait;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -68,10 +73,13 @@ public:
/// The native representation of a descriptor.
#if defined(GENERATING_DOCUMENTATION)
typedef implementation_defined native_handle_type;
-#else
+#elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ typedef detail::io_uring_descriptor_service::native_handle_type
+ native_handle_type;
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
typedef detail::reactive_descriptor_service::native_handle_type
native_handle_type;
-#endif
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
/// A descriptor is always the lowest layer.
typedef basic_descriptor lowest_layer_type;
@@ -99,10 +107,10 @@ public:
*/
template <typename ExecutionContext>
explicit basic_descriptor(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: impl_(0, 0, context)
{
}
@@ -146,9 +154,9 @@ public:
template <typename ExecutionContext>
basic_descriptor(ExecutionContext& context,
const native_handle_type& native_descriptor,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -157,7 +165,6 @@ public:
asio::detail::throw_error(ec, "assign");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a descriptor from another.
/**
* This constructor moves a descriptor from one object to another.
@@ -169,7 +176,7 @@ public:
* constructed using the @c basic_descriptor(const executor_type&)
* constructor.
*/
- basic_descriptor(basic_descriptor&& other) ASIO_NOEXCEPT
+ basic_descriptor(basic_descriptor&& other) noexcept
: impl_(std::move(other.impl_))
{
}
@@ -190,10 +197,57 @@ public:
impl_ = std::move(other.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ // All descriptors have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_descriptor;
+
+ /// Move-construct a basic_descriptor from a descriptor of another executor
+ /// type.
+ /**
+ * This constructor moves a descriptor from one object to another.
+ *
+ * @param other The other basic_descriptor object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_descriptor(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_descriptor(basic_descriptor<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign a basic_descriptor from a descriptor of another executor type.
+ /**
+ * This assignment operator moves a descriptor from one object to another.
+ *
+ * @param other The other basic_descriptor object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_descriptor(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_descriptor&
+ > operator=(basic_descriptor<Executor1> && other)
+ {
+ basic_descriptor tmp(std::move(other));
+ impl_ = std::move(tmp.impl_);
+ return *this;
+ }
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
return impl_.get_executor();
}
@@ -589,21 +643,28 @@ public:
/// write, or to have pending error conditions.
/**
* This function is used to perform an asynchronous wait for a descriptor to
- * enter a ready to read, write or error condition state.
+ * enter a ready to read, write or error condition state. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns
+ * immediately.
*
* @param w Specifies the desired descriptor state.
*
- * @param handler The handler to be called when the wait operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the wait completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error // Result of operation
+ * const asio::error_code& error // Result of operation.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
+ *
* @par Example
* @code
* void wait_handler(const asio::error_code& error)
@@ -635,15 +696,15 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
- WaitHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(wait_type w,
- ASIO_MOVE_ARG(WaitHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
- {
- return async_initiate<WaitHandler, void (asio::error_code)>(
- initiate_async_wait(this), handler, w);
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(wait_type w,
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token, w))
+ {
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token, w);
}
protected:
@@ -657,12 +718,16 @@ protected:
{
}
+#if defined(ASIO_HAS_IO_URING_AS_DEFAULT)
+ detail::io_object_impl<detail::io_uring_descriptor_service, Executor> impl_;
+#else // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
detail::io_object_impl<detail::reactive_descriptor_service, Executor> impl_;
+#endif // defined(ASIO_HAS_IO_URING_AS_DEFAULT)
private:
// Disallow copying and assignment.
- basic_descriptor(const basic_descriptor&) ASIO_DELETED;
- basic_descriptor& operator=(const basic_descriptor&) ASIO_DELETED;
+ basic_descriptor(const basic_descriptor&) = delete;
+ basic_descriptor& operator=(const basic_descriptor&) = delete;
class initiate_async_wait
{
@@ -674,13 +739,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WaitHandler>
- void operator()(ASIO_MOVE_ARG(WaitHandler) handler, wait_type w) const
+ void operator()(WaitHandler&& handler, wait_type w) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a WaitHandler.
diff --git a/3rdparty/asio/include/asio/posix/basic_stream_descriptor.hpp b/3rdparty/asio/include/asio/posix/basic_stream_descriptor.hpp
index 7bf4b361020..9868dee1259 100644
--- a/3rdparty/asio/include/asio/posix/basic_stream_descriptor.hpp
+++ b/3rdparty/asio/include/asio/posix/basic_stream_descriptor.hpp
@@ -2,7 +2,7 @@
// posix/basic_stream_descriptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -48,6 +48,10 @@ template <typename Executor = any_io_executor>
class basic_stream_descriptor
: public basic_descriptor<Executor>
{
+private:
+ class initiate_async_write_some;
+ class initiate_async_read_some;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -91,10 +95,10 @@ public:
*/
template <typename ExecutionContext>
explicit basic_stream_descriptor(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: basic_descriptor<Executor>(context)
{
}
@@ -134,14 +138,13 @@ public:
template <typename ExecutionContext>
basic_stream_descriptor(ExecutionContext& context,
const native_handle_type& native_descriptor,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_descriptor<Executor>(context, native_descriptor)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a stream descriptor from another.
/**
* This constructor moves a stream descriptor from one object to another.
@@ -153,7 +156,7 @@ public:
* constructed using the @c basic_stream_descriptor(const executor_type&)
* constructor.
*/
- basic_stream_descriptor(basic_stream_descriptor&& other) ASIO_NOEXCEPT
+ basic_stream_descriptor(basic_stream_descriptor&& other) noexcept
: basic_descriptor<Executor>(std::move(other))
{
}
@@ -175,7 +178,50 @@ public:
basic_descriptor<Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Move-construct a basic_stream_descriptor from a descriptor of another
+ /// executor type.
+ /**
+ * This constructor moves a descriptor from one object to another.
+ *
+ * @param other The other basic_stream_descriptor object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_stream_descriptor(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ basic_stream_descriptor(basic_stream_descriptor<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_descriptor<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_stream_descriptor from a descriptor of another
+ /// executor type.
+ /**
+ * This assignment operator moves a descriptor from one object to another.
+ *
+ * @param other The other basic_stream_descriptor object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_stream_descriptor(const executor_type&)
+ * constructor.
+ */
+ template <typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_stream_descriptor&
+ > operator=(basic_stream_descriptor<Executor1> && other)
+ {
+ basic_descriptor<Executor>::operator=(std::move(other));
+ return *this;
+ }
/// Write some data to the descriptor.
/**
@@ -241,25 +287,31 @@ public:
/// Start an asynchronous write.
/**
* This function is used to asynchronously write data to the stream
- * descriptor. The function call always returns immediately.
+ * descriptor. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more data buffers to be written to the descriptor.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The write operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
* data is written before the asynchronous operation completes.
@@ -285,17 +337,17 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ initiate_async_write_some(this), token, buffers))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_write_some(this), handler, buffers);
+ initiate_async_write_some(this), token, buffers);
}
/// Read some data from the descriptor.
@@ -364,25 +416,31 @@ public:
/// Start an asynchronous read.
/**
* This function is used to asynchronously read data from the stream
- * descriptor. The function call always returns immediately.
+ * descriptor. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers One or more buffers into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The read operation may not read all of the requested number of bytes.
* Consider using the @ref async_read function if you need to ensure that the
* requested amount of data is read before the asynchronous operation
@@ -409,17 +467,17 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_read_some(this), handler, buffers);
+ initiate_async_read_some(this), token, buffers);
}
private:
@@ -433,13 +491,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
const ConstBufferSequence& buffers) const
{
// If you get an error on the following line it means that your handler
@@ -466,13 +524,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
const MutableBufferSequence& buffers) const
{
// If you get an error on the following line it means that your handler
diff --git a/3rdparty/asio/include/asio/posix/descriptor.hpp b/3rdparty/asio/include/asio/posix/descriptor.hpp
index 891daa6be68..57b5b2522fd 100644
--- a/3rdparty/asio/include/asio/posix/descriptor.hpp
+++ b/3rdparty/asio/include/asio/posix/descriptor.hpp
@@ -2,7 +2,7 @@
// posix/descriptor.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/posix/descriptor_base.hpp b/3rdparty/asio/include/asio/posix/descriptor_base.hpp
index 0f1541abc1f..7bc3bc1e8f6 100644
--- a/3rdparty/asio/include/asio/posix/descriptor_base.hpp
+++ b/3rdparty/asio/include/asio/posix/descriptor_base.hpp
@@ -2,7 +2,7 @@
// posix/descriptor_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/posix/stream_descriptor.hpp b/3rdparty/asio/include/asio/posix/stream_descriptor.hpp
index b07fb035def..4855f10777e 100644
--- a/3rdparty/asio/include/asio/posix/stream_descriptor.hpp
+++ b/3rdparty/asio/include/asio/posix/stream_descriptor.hpp
@@ -2,7 +2,7 @@
// posix/stream_descriptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/post.hpp b/3rdparty/asio/include/asio/post.hpp
index f7e93489349..6b534dfae4a 100644
--- a/3rdparty/asio/include/asio/post.hpp
+++ b/3rdparty/asio/include/asio/post.hpp
@@ -2,7 +2,7 @@
// post.hpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,10 +17,13 @@
#include "asio/detail/config.hpp"
#include "asio/async_result.hpp"
+#include "asio/detail/initiate_post.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/execution_context.hpp"
+#include "asio/execution/blocking.hpp"
#include "asio/execution/executor.hpp"
#include "asio/is_executor.hpp"
+#include "asio/require.hpp"
#include "asio/detail/push_options.hpp"
@@ -35,27 +38,53 @@ namespace asio {
* The use of @c post(), rather than @ref defer(), indicates the caller's
* preference that the function object be eagerly queued for execution.
*
- * This function has the following effects:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{}, token)</tt>, where @c Init is a function object type defined
+ * as:
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * }; @endcode
*
- * @li Obtains the handler's associated executor object @c ex by performing
- * <tt>get_associated_executor(handler)</tt>.
+ * The function call operator of @c Init:
*
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
- *
- * @li Performs <tt>ex.post(std::move(handler), alloc)</tt>.
+ * @li Obtains the handler's associated executor object @c ex of type @c Ex by
+ * performing @code auto ex = get_associated_executor(handler); @endcode
*
- * @li Returns <tt>result.get()</tt>.
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(
+ * require(ex, execution::blocking.never),
+ * execution::relationship.fork,
+ * execution::allocator(alloc)
+ * ).execute(std::forward<CompletionHandler>(completion_handler)); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.post(
+ * std::forward<CompletionHandler>(completion_handler),
+ * alloc); @endcode
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
-template <ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) post(
- ASIO_MOVE_ARG(CompletionToken) token);
+template <ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken>
+inline auto post(NullaryToken&& token)
+ -> decltype(
+ async_initiate<NullaryToken, void()>(
+ declval<detail::initiate_post>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_post(), token);
+}
/// Submits a completion token or function object for execution.
/**
@@ -66,61 +95,119 @@ ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) post(
* The use of @c post(), rather than @ref defer(), indicates the caller's
* preference that the function object be eagerly queued for execution.
*
- * This function has the following effects:
+ * @param ex The target executor.
*
- * @li Constructs a function object handler of type @c Handler, initialized
- * with <tt>handler(forward<CompletionToken>(token))</tt>.
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
*
- * @li Constructs an object @c result of type <tt>async_result<Handler></tt>,
- * initializing the object as <tt>result(handler)</tt>.
+ * @returns This function returns <tt>async_initiate<NullaryToken,
+ * void()>(Init{ex}, token)</tt>, where @c Init is a function object type
+ * defined as:
*
- * @li Obtains the handler's associated executor object @c ex1 by performing
- * <tt>get_associated_executor(handler)</tt>.
- *
- * @li Creates a work object @c w by performing <tt>make_work(ex1)</tt>.
- *
- * @li Obtains the handler's associated allocator object @c alloc by performing
- * <tt>get_associated_allocator(handler)</tt>.
+ * @code class Init
+ * {
+ * public:
+ * using executor_type = Executor;
+ * explicit Init(const Executor& ex) : ex_(ex) {}
+ * executor_type get_executor() const noexcept { return ex_; }
+ * template <typename CompletionHandler>
+ * void operator()(CompletionHandler&& completion_handler) const;
+ * private:
+ * Executor ex_; // exposition only
+ * }; @endcode
*
- * @li Constructs a function object @c f with a function call operator that
- * performs <tt>ex1.dispatch(std::move(handler), alloc)</tt> followed by
- * <tt>w.reset()</tt>.
+ * The function call operator of @c Init:
*
- * @li Performs <tt>Executor(ex).post(std::move(f), alloc)</tt>.
+ * @li Obtains the handler's associated executor object @c ex1 of type @c Ex1 by
+ * performing @code auto ex1 = get_associated_executor(handler, ex); @endcode
*
- * @li Returns <tt>result.get()</tt>.
+ * @li Obtains the handler's associated allocator object @c alloc by performing
+ * @code auto alloc = get_associated_allocator(handler); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is true, constructs a
+ * function object @c f with a member @c executor_ that is initialised with
+ * <tt>prefer(ex1, execution::outstanding_work.tracked)</tt>, a member @c
+ * handler_ that is a decay-copy of @c completion_handler, and a function call
+ * operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * prefer(executor_, execution::allocator(a)).execute(std::move(handler_));
+ * @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex1>::value</tt> is false, constructs a
+ * function object @c f with a member @c work_ that is initialised with
+ * <tt>make_work_guard(ex1)</tt>, a member @c handler_ that is a decay-copy of
+ * @c completion_handler, and a function call operator that performs:
+ * @code auto a = get_associated_allocator(handler_);
+ * work_.get_executor().dispatch(std::move(handler_), a);
+ * work_.reset(); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is true, performs
+ * @code prefer(
+ * require(ex, execution::blocking.never),
+ * execution::relationship.fork,
+ * execution::allocator(alloc)
+ * ).execute(std::move(f)); @endcode
+ *
+ * @li If <tt>execution::is_executor<Ex>::value</tt> is false, performs
+ * @code ex.post(std::move(f), alloc); @endcode
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
template <typename Executor,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) post(
- const Executor& ex,
- ASIO_MOVE_ARG(CompletionToken) token
- ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<
- execution::is_executor<Executor>::value || is_executor<Executor>::value
- >::type = 0);
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<Executor>>
+inline auto post(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_post_with_executor<Executor>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_post_with_executor<Executor>(ex), token);
+}
/// Submits a completion token or function object for execution.
/**
- * @returns <tt>post(ctx.get_executor(), forward<CompletionToken>(token))</tt>.
+ * @param ctx An execution context, from which the target executor is obtained.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler. The function signature of the completion handler must be:
+ * @code void handler(); @endcode
+ *
+ * @returns <tt>post(ctx.get_executor(), forward<NullaryToken>(token))</tt>.
+ *
+ * @par Completion Signature
+ * @code void() @endcode
*/
template <typename ExecutionContext,
- ASIO_COMPLETION_TOKEN_FOR(void()) CompletionToken
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename ExecutionContext::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) post(
- ExecutionContext& ctx,
- ASIO_MOVE_ARG(CompletionToken) token
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename ExecutionContext::executor_type),
- typename constraint<is_convertible<
- ExecutionContext&, execution_context&>::value>::type = 0);
+ ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
+ = default_completion_token_t<typename ExecutionContext::executor_type>>
+inline auto post(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_post_with_executor<
+ typename ExecutionContext::executor_type>>(), token))
+{
+ return async_initiate<NullaryToken, void()>(
+ detail::initiate_post_with_executor<
+ typename ExecutionContext::executor_type>(
+ ctx.get_executor()), token);
+}
} // namespace asio
#include "asio/detail/pop_options.hpp"
-#include "asio/impl/post.hpp"
-
#endif // ASIO_POST_HPP
diff --git a/3rdparty/asio/include/asio/prefer.hpp b/3rdparty/asio/include/asio/prefer.hpp
index 504392cd5d1..3b13d4123bf 100644
--- a/3rdparty/asio/include/asio/prefer.hpp
+++ b/3rdparty/asio/include/asio/prefer.hpp
@@ -2,7 +2,7 @@
// prefer.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -118,10 +118,10 @@ struct prefer_result
namespace asio_prefer_fn {
-using asio::conditional;
-using asio::decay;
+using asio::conditional_t;
+using asio::decay_t;
using asio::declval;
-using asio::enable_if;
+using asio::enable_if_t;
using asio::is_applicable_property;
using asio::traits::prefer_free;
using asio::traits::prefer_member;
@@ -149,195 +149,187 @@ template <typename Impl, typename T, typename Properties,
typename = void, typename = void, typename = void>
struct call_traits
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr overload_type overload = ill_formed;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_preferable
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
static_require<T, Property>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = identity);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
-#if defined(ASIO_HAS_MOVE)
- typedef ASIO_MOVE_ARG(T) result_type;
-#else // defined(ASIO_HAS_MOVE)
- typedef ASIO_MOVE_ARG(typename decay<T>::type) result_type;
-#endif // defined(ASIO_HAS_MOVE)
+ static constexpr overload_type overload = identity;
+ static constexpr bool is_noexcept = true;
+
+ typedef T&& result_type;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_preferable
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
!static_require<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
require_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type> :
+ >> :
require_member<typename Impl::template proxy<T>::type, Property>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_require_member);
+ static constexpr overload_type overload = call_require_member;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_preferable
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
!static_require<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!require_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
require_free<T, Property>::is_valid
- >::type> :
+ >> :
require_free<T, Property>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_require_free);
+ static constexpr overload_type overload = call_require_free;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_preferable
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
!static_require<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!require_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!require_free<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
prefer_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type> :
+ >> :
prefer_member<typename Impl::template proxy<T>::type, Property>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_prefer_member);
+ static constexpr overload_type overload = call_prefer_member;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_preferable
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
!static_require<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!require_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!require_free<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!prefer_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
prefer_free<T, Property>::is_valid
- >::type> :
+ >> :
prefer_free<T, Property>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_prefer_free);
+ static constexpr overload_type overload = call_prefer_free;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_preferable
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_preferable
+ >,
+ enable_if_t<
!static_require<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!require_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!require_free<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!prefer_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!prefer_free<T, Property>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = identity);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
-#if defined(ASIO_HAS_MOVE)
- typedef ASIO_MOVE_ARG(T) result_type;
-#else // defined(ASIO_HAS_MOVE)
- typedef ASIO_MOVE_ARG(typename decay<T>::type) result_type;
-#endif // defined(ASIO_HAS_MOVE)
+ static constexpr overload_type overload = identity;
+ static constexpr bool is_noexcept = true;
+
+ typedef T&& result_type;
};
template <typename Impl, typename T, typename P0, typename P1>
struct call_traits<Impl, T, void(P0, P1),
- typename enable_if<
+ enable_if_t<
call_traits<Impl, T, void(P0)>::overload != ill_formed
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
call_traits<
Impl,
typename call_traits<Impl, T, void(P0)>::result_type,
void(P1)
>::overload != ill_formed
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = two_props);
+ static constexpr overload_type overload = two_props;
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
+ static constexpr bool is_noexcept =
(
call_traits<Impl, T, void(P0)>::is_noexcept
&&
@@ -346,51 +338,51 @@ struct call_traits<Impl, T, void(P0, P1),
typename call_traits<Impl, T, void(P0)>::result_type,
void(P1)
>::is_noexcept
- ));
+ );
- typedef typename decay<
+ typedef decay_t<
typename call_traits<
Impl,
typename call_traits<Impl, T, void(P0)>::result_type,
void(P1)
>::result_type
- >::type result_type;
+ > result_type;
};
template <typename Impl, typename T, typename P0,
- typename P1, typename ASIO_ELLIPSIS PN>
-struct call_traits<Impl, T, void(P0, P1, PN ASIO_ELLIPSIS),
- typename enable_if<
+ typename P1, typename... PN>
+struct call_traits<Impl, T, void(P0, P1, PN...),
+ enable_if_t<
call_traits<Impl, T, void(P0)>::overload != ill_formed
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
call_traits<
Impl,
typename call_traits<Impl, T, void(P0)>::result_type,
- void(P1, PN ASIO_ELLIPSIS)
+ void(P1, PN...)
>::overload != ill_formed
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = n_props);
+ static constexpr overload_type overload = n_props;
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
+ static constexpr bool is_noexcept =
(
call_traits<Impl, T, void(P0)>::is_noexcept
&&
call_traits<
Impl,
typename call_traits<Impl, T, void(P0)>::result_type,
- void(P1, PN ASIO_ELLIPSIS)
+ void(P1, PN...)
>::is_noexcept
- ));
+ );
- typedef typename decay<
+ typedef decay_t<
typename call_traits<
Impl,
typename call_traits<Impl, T, void(P0)>::result_type,
- void(P1, PN ASIO_ELLIPSIS)
+ void(P1, PN...)
>::result_type
- >::type result_type;
+ > result_type;
};
struct impl
@@ -403,29 +395,25 @@ struct impl
struct type
{
template <typename P>
- auto require(ASIO_MOVE_ARG(P) p)
+ auto require(P&& p)
noexcept(
noexcept(
- declval<typename conditional<true, T, P>::type>().require(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().require(static_cast<P&&>(p))
)
)
-> decltype(
- declval<typename conditional<true, T, P>::type>().require(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().require(static_cast<P&&>(p))
);
template <typename P>
- auto prefer(ASIO_MOVE_ARG(P) p)
+ auto prefer(P&& p)
noexcept(
noexcept(
- declval<typename conditional<true, T, P>::type>().prefer(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().prefer(static_cast<P&&>(p))
)
)
-> decltype(
- declval<typename conditional<true, T, P>::type>().prefer(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().prefer(static_cast<P&&>(p))
);
};
#else // defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
@@ -436,122 +424,85 @@ struct impl
};
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == identity,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property)) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&&) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return ASIO_MOVE_CAST(T)(t);
+ return static_cast<T&&>(t);
}
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == call_require_member,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property) p) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return ASIO_MOVE_CAST(T)(t).require(
- ASIO_MOVE_CAST(Property)(p));
+ return static_cast<T&&>(t).require(static_cast<Property&&>(p));
}
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == call_require_free,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property) p) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return require(
- ASIO_MOVE_CAST(T)(t),
- ASIO_MOVE_CAST(Property)(p));
+ return require(static_cast<T&&>(t), static_cast<Property&&>(p));
}
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == call_prefer_member,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property) p) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return ASIO_MOVE_CAST(T)(t).prefer(
- ASIO_MOVE_CAST(Property)(p));
+ return static_cast<T&&>(t).prefer(static_cast<Property&&>(p));
}
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == call_prefer_free,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property) p) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return prefer(
- ASIO_MOVE_CAST(T)(t),
- ASIO_MOVE_CAST(Property)(p));
+ return prefer(static_cast<T&&>(t), static_cast<Property&&>(p));
}
template <typename T, typename P0, typename P1>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(P0, P1)>::overload == two_props,
typename call_traits<impl, T, void(P0, P1)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(P0) p0,
- ASIO_MOVE_ARG(P1) p1) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(P0, P1)>::is_noexcept))
+ >
+ operator()(T&& t, P0&& p0, P1&& p1) const
+ noexcept(call_traits<impl, T, void(P0, P1)>::is_noexcept)
{
return (*this)(
- (*this)(
- ASIO_MOVE_CAST(T)(t),
- ASIO_MOVE_CAST(P0)(p0)),
- ASIO_MOVE_CAST(P1)(p1));
+ (*this)(static_cast<T&&>(t), static_cast<P0&&>(p0)),
+ static_cast<P1&&>(p1));
}
template <typename T, typename P0, typename P1,
- typename ASIO_ELLIPSIS PN>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
- call_traits<impl, T,
- void(P0, P1, PN ASIO_ELLIPSIS)>::overload == n_props,
- typename call_traits<impl, T,
- void(P0, P1, PN ASIO_ELLIPSIS)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(P0) p0,
- ASIO_MOVE_ARG(P1) p1,
- ASIO_MOVE_ARG(PN) ASIO_ELLIPSIS pn) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(P0, P1, PN ASIO_ELLIPSIS)>::is_noexcept))
+ typename... PN>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(P0, P1, PN...)>::overload == n_props,
+ typename call_traits<impl, T, void(P0, P1, PN...)>::result_type
+ >
+ operator()(T&& t, P0&& p0, P1&& p1, PN&&... pn) const
+ noexcept(call_traits<impl, T, void(P0, P1, PN...)>::is_noexcept)
{
return (*this)(
- (*this)(
- ASIO_MOVE_CAST(T)(t),
- ASIO_MOVE_CAST(P0)(p0)),
- ASIO_MOVE_CAST(P1)(p1),
- ASIO_MOVE_CAST(PN)(pn) ASIO_ELLIPSIS);
+ (*this)(static_cast<T&&>(t), static_cast<P0&&>(p0)),
+ static_cast<P1&&>(p1), static_cast<PN&&>(pn)...);
}
};
@@ -568,15 +519,13 @@ const T static_instance<T>::instance = {};
namespace asio {
namespace {
-static ASIO_CONSTEXPR const asio_prefer_fn::impl&
+static constexpr const asio_prefer_fn::impl&
prefer = asio_prefer_fn::static_instance<>::instance;
} // namespace
typedef asio_prefer_fn::impl prefer_t;
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename T, typename... Properties>
struct can_prefer :
integral_constant<bool,
@@ -586,54 +535,14 @@ struct can_prefer :
{
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename P0 = void,
- typename P1 = void, typename P2 = void>
-struct can_prefer :
- integral_constant<bool,
- asio_prefer_fn::call_traits<
- prefer_t, T, void(P0, P1, P2)>::overload
- != asio_prefer_fn::ill_formed>
-{
-};
-
-template <typename T, typename P0, typename P1>
-struct can_prefer<T, P0, P1> :
- integral_constant<bool,
- asio_prefer_fn::call_traits<
- prefer_t, T, void(P0, P1)>::overload
- != asio_prefer_fn::ill_formed>
-{
-};
-
-template <typename T, typename P0>
-struct can_prefer<T, P0> :
- integral_constant<bool,
- asio_prefer_fn::call_traits<
- prefer_t, T, void(P0)>::overload
- != asio_prefer_fn::ill_formed>
-{
-};
-
-template <typename T>
-struct can_prefer<T> :
- false_type
-{
-};
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-template <typename T, typename ASIO_ELLIPSIS Properties>
+template <typename T, typename... Properties>
constexpr bool can_prefer_v
- = can_prefer<T, Properties ASIO_ELLIPSIS>::value;
+ = can_prefer<T, Properties...>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename T, typename... Properties>
struct is_nothrow_prefer :
integral_constant<bool,
@@ -642,51 +551,13 @@ struct is_nothrow_prefer :
{
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename P0 = void,
- typename P1 = void, typename P2 = void>
-struct is_nothrow_prefer :
- integral_constant<bool,
- asio_prefer_fn::call_traits<
- prefer_t, T, void(P0, P1, P2)>::is_noexcept>
-{
-};
-
-template <typename T, typename P0, typename P1>
-struct is_nothrow_prefer<T, P0, P1> :
- integral_constant<bool,
- asio_prefer_fn::call_traits<
- prefer_t, T, void(P0, P1)>::is_noexcept>
-{
-};
-
-template <typename T, typename P0>
-struct is_nothrow_prefer<T, P0> :
- integral_constant<bool,
- asio_prefer_fn::call_traits<
- prefer_t, T, void(P0)>::is_noexcept>
-{
-};
-
-template <typename T>
-struct is_nothrow_prefer<T> :
- false_type
-{
-};
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-template <typename T, typename ASIO_ELLIPSIS Properties>
-constexpr bool is_nothrow_prefer_v
- = is_nothrow_prefer<T, Properties ASIO_ELLIPSIS>::value;
+template <typename T, typename... Properties>
+constexpr bool is_nothrow_prefer_v = is_nothrow_prefer<T, Properties...>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename T, typename... Properties>
struct prefer_result
{
@@ -694,36 +565,8 @@ struct prefer_result
prefer_t, T, void(Properties...)>::result_type type;
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename P0 = void,
- typename P1 = void, typename P2 = void>
-struct prefer_result
-{
- typedef typename asio_prefer_fn::call_traits<
- prefer_t, T, void(P0, P1, P2)>::result_type type;
-};
-
-template <typename T, typename P0, typename P1>
-struct prefer_result<T, P0, P1>
-{
- typedef typename asio_prefer_fn::call_traits<
- prefer_t, T, void(P0, P1)>::result_type type;
-};
-
-template <typename T, typename P0>
-struct prefer_result<T, P0>
-{
- typedef typename asio_prefer_fn::call_traits<
- prefer_t, T, void(P0)>::result_type type;
-};
-
-template <typename T>
-struct prefer_result<T>
-{
-};
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+template <typename T, typename... Properties>
+using prefer_result_t = typename prefer_result<T, Properties...>::type;
} // namespace asio
diff --git a/3rdparty/asio/include/asio/prepend.hpp b/3rdparty/asio/include/asio/prepend.hpp
new file mode 100644
index 00000000000..972b47fd300
--- /dev/null
+++ b/3rdparty/asio/include/asio/prepend.hpp
@@ -0,0 +1,66 @@
+//
+// prepend.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 ASIO_PREPEND_HPP
+#define ASIO_PREPEND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <tuple>
+#include "asio/detail/type_traits.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// Completion token type used to specify that the completion handler
+/// arguments should be passed additional values before the results of the
+/// operation.
+template <typename CompletionToken, typename... Values>
+class prepend_t
+{
+public:
+ /// Constructor.
+ template <typename T, typename... V>
+ constexpr explicit prepend_t(T&& completion_token, V&&... values)
+ : token_(static_cast<T&&>(completion_token)),
+ values_(static_cast<V&&>(values)...)
+ {
+ }
+
+//private:
+ CompletionToken token_;
+ std::tuple<Values...> values_;
+};
+
+/// Completion token type used to specify that the completion handler
+/// arguments should be passed additional values before the results of the
+/// operation.
+template <typename CompletionToken, typename... Values>
+ASIO_NODISCARD inline constexpr
+prepend_t<decay_t<CompletionToken>, decay_t<Values>...>
+prepend(CompletionToken&& completion_token,
+ Values&&... values)
+{
+ return prepend_t<decay_t<CompletionToken>, decay_t<Values>...>(
+ static_cast<CompletionToken&&>(completion_token),
+ static_cast<Values&&>(values)...);
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/prepend.hpp"
+
+#endif // ASIO_PREPEND_HPP
diff --git a/3rdparty/asio/include/asio/query.hpp b/3rdparty/asio/include/asio/query.hpp
index 2312b60320d..c27d26a4030 100644
--- a/3rdparty/asio/include/asio/query.hpp
+++ b/3rdparty/asio/include/asio/query.hpp
@@ -2,7 +2,7 @@
// query.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -100,10 +100,10 @@ struct query_result
namespace asio_query_fn {
-using asio::conditional;
-using asio::decay;
+using asio::conditional_t;
+using asio::decay_t;
using asio::declval;
-using asio::enable_if;
+using asio::enable_if_t;
using asio::is_applicable_property;
using asio::traits::query_free;
using asio::traits::query_member;
@@ -123,66 +123,66 @@ template <typename Impl, typename T, typename Properties,
typename = void, typename = void, typename = void, typename = void>
struct call_traits
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr overload_type overload = ill_formed;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
static_query<T, Property>::is_valid
- >::type> :
+ >> :
static_query<T, Property>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = static_value);
+ static constexpr overload_type overload = static_value;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!static_query<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
query_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type> :
+ >> :
query_member<typename Impl::template proxy<T>::type, Property>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
+ static constexpr overload_type overload = call_member;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!static_query<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!query_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
query_free<T, Property>::is_valid
- >::type> :
+ >> :
query_free<T, Property>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
+ static constexpr overload_type overload = call_free;
};
struct impl
@@ -194,16 +194,14 @@ struct impl
struct type
{
template <typename P>
- auto query(ASIO_MOVE_ARG(P) p)
+ auto query(P&& p)
noexcept(
noexcept(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
)
)
-> decltype(
- declval<typename conditional<true, T, P>::type>().query(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().query(static_cast<P&&>(p))
);
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
@@ -212,48 +210,36 @@ struct impl
};
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == static_value,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T),
- ASIO_MOVE_ARG(Property)) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&&, Property&&) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return static_query<
- typename decay<T>::type,
- typename decay<Property>::type
- >::value();
+ return static_query<decay_t<T>, decay_t<Property>>::value();
}
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == call_member,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property) p) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return ASIO_MOVE_CAST(T)(t).query(ASIO_MOVE_CAST(Property)(p));
+ return static_cast<T&&>(t).query(static_cast<Property&&>(p));
}
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == call_free,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property) p) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return query(ASIO_MOVE_CAST(T)(t), ASIO_MOVE_CAST(Property)(p));
+ return query(static_cast<T&&>(t), static_cast<Property&&>(p));
}
};
@@ -270,7 +256,7 @@ const T static_instance<T>::instance = {};
namespace asio {
namespace {
-static ASIO_CONSTEXPR const asio_query_fn::impl&
+static constexpr const asio_query_fn::impl&
query = asio_query_fn::static_instance<>::instance;
} // namespace
@@ -288,8 +274,7 @@ struct can_query :
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T, typename Property>
-constexpr bool can_query_v
- = can_query<T, Property>::value;
+constexpr bool can_query_v = can_query<T, Property>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
@@ -303,8 +288,7 @@ struct is_nothrow_query :
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T, typename Property>
-constexpr bool is_nothrow_query_v
- = is_nothrow_query<T, Property>::value;
+constexpr bool is_nothrow_query_v = is_nothrow_query<T, Property>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
@@ -315,6 +299,9 @@ struct query_result
query_t, T, void(Property)>::result_type type;
};
+template <typename T, typename Property>
+using query_result_t = typename query_result<T, Property>::type;
+
} // namespace asio
#endif // defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/random_access_file.hpp b/3rdparty/asio/include/asio/random_access_file.hpp
new file mode 100644
index 00000000000..c638e336394
--- /dev/null
+++ b/3rdparty/asio/include/asio/random_access_file.hpp
@@ -0,0 +1,35 @@
+//
+// random_access_file.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 ASIO_RANDOM_ACCESS_FILE_HPP
+#define ASIO_RANDOM_ACCESS_FILE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_random_access_file.hpp"
+
+namespace asio {
+
+/// Typedef for the typical usage of a random-access file.
+typedef basic_random_access_file<> random_access_file;
+
+} // namespace asio
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_RANDOM_ACCESS_FILE_HPP
diff --git a/3rdparty/asio/include/asio/read.hpp b/3rdparty/asio/include/asio/read.hpp
index 3d666adb8d3..0eb966af36f 100644
--- a/3rdparty/asio/include/asio/read.hpp
+++ b/3rdparty/asio/include/asio/read.hpp
@@ -2,7 +2,7 @@
// read.hpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,6 +19,7 @@
#include <cstddef>
#include "asio/async_result.hpp"
#include "asio/buffer.hpp"
+#include "asio/completion_condition.hpp"
#include "asio/error.hpp"
#if !defined(ASIO_NO_EXTENSIONS)
@@ -28,6 +29,15 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_read;
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_read_dynbuf_v1;
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_read_dynbuf_v2;
+
+} // namespace detail
/**
* @defgroup read asio::read
@@ -75,9 +85,9 @@ namespace asio {
*/
template <typename SyncReadStream, typename MutableBufferSequence>
std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
- typename constraint<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type = 0);
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -118,9 +128,9 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
template <typename SyncReadStream, typename MutableBufferSequence>
std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type = 0);
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -172,9 +182,9 @@ template <typename SyncReadStream, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
- typename constraint<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type = 0);
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -219,9 +229,9 @@ template <typename SyncReadStream, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type = 0);
+ > = 0);
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -254,13 +264,13 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
*/
template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ DynamicBuffer_v1&& buffers,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -290,14 +300,14 @@ std::size_t read(SyncReadStream& s,
*/
template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -338,14 +348,14 @@ std::size_t read(SyncReadStream& s,
template <typename SyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -387,14 +397,14 @@ std::size_t read(SyncReadStream& s,
template <typename SyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t read(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -572,9 +582,9 @@ std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
*/
template <typename SyncReadStream, typename DynamicBuffer_v2>
std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -605,9 +615,9 @@ std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
template <typename SyncReadStream, typename DynamicBuffer_v2>
std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -649,9 +659,9 @@ template <typename SyncReadStream, typename DynamicBuffer_v2,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/// Attempt to read a certain amount of data from a stream before returning.
/**
@@ -694,9 +704,9 @@ template <typename SyncReadStream, typename DynamicBuffer_v2,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/*@}*/
/**
@@ -711,9 +721,9 @@ std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The supplied buffers are full. That is, the bytes transferred is equal to
* the sum of the buffer sizes.
@@ -733,25 +743,30 @@ std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
* of the buffer sizes indicates the maximum number of bytes to read from the
* stream. Although the buffers object may be copied as necessary, ownership of
* the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To read into a single data buffer use the @ref buffer function as follows:
* @code
@@ -780,26 +795,27 @@ std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers,
*/
template <typename AsyncReadStream, typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+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
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read<AsyncReadStream>>(),
+ token, buffers, transfer_all()));
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The supplied buffers are full. That is, the bytes transferred is equal to
* the sum of the buffer sizes.
@@ -813,7 +829,7 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
* of the buffer sizes indicates the maximum number of bytes to read from the
* stream. Although the buffers object may be copied as necessary, ownership of
* the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the read operation is complete. The signature of the function object
@@ -829,23 +845,28 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
* return value indicates the maximum number of bytes to be read on the next
* call to the stream's async_read_some function.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To read into a single data buffer use the @ref buffer function as follows:
* @code asio::async_read(s,
@@ -870,19 +891,21 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
template <typename AsyncReadStream,
typename MutableBufferSequence, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read<AsyncReadStream>>(),
+ token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -890,9 +913,9 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The specified dynamic buffer sequence is full (that is, it has reached
* maximum size).
@@ -911,25 +934,30 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note This overload is equivalent to calling:
* @code asio::async_read(
* s, buffers,
@@ -949,30 +977,30 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
*/
template <typename AsyncReadStream, typename DynamicBuffer_v1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), transfer_all()));
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The specified dynamic buffer sequence is full (that is, it has reached
* maximum size).
@@ -991,7 +1019,7 @@ async_read(AsyncReadStream& s,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the read operation is complete. The signature of the function object
@@ -1007,23 +1035,28 @@ async_read(AsyncReadStream& s,
* return value indicates the maximum number of bytes to be read on the next
* call to the stream's async_read_some function.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -1038,23 +1071,24 @@ async_read(AsyncReadStream& s,
template <typename AsyncReadStream,
typename DynamicBuffer_v1, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -1063,9 +1097,9 @@ async_read(AsyncReadStream& s,
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The supplied buffer is full (that is, it has reached maximum size).
*
@@ -1082,25 +1116,30 @@ async_read(AsyncReadStream& s,
*
* @param b A basic_streambuf object into which the data will be read. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note This overload is equivalent to calling:
* @code asio::async_read(
* s, b,
@@ -1120,23 +1159,24 @@ async_read(AsyncReadStream& s,
*/
template <typename AsyncReadStream, typename Allocator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type));
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all()));
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The supplied buffer is full (that is, it has reached maximum size).
*
@@ -1153,7 +1193,7 @@ async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
*
* @param b A basic_streambuf object into which the data will be read. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the read operation is complete. The signature of the function object
@@ -1169,23 +1209,28 @@ async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
* return value indicates the maximum number of bytes to be read on the next
* call to the stream's async_read_some function.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -1200,16 +1245,18 @@ async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
template <typename AsyncReadStream,
typename Allocator, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type));
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
@@ -1219,9 +1266,9 @@ async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The specified dynamic buffer sequence is full (that is, it has reached
* maximum size).
@@ -1240,25 +1287,30 @@ async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note This overload is equivalent to calling:
* @code asio::async_read(
* s, buffers,
@@ -1278,26 +1330,27 @@ async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
*/
template <typename AsyncReadStream, typename DynamicBuffer_v2,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+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
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), transfer_all()));
/// Start an asynchronous operation to read a certain amount of data from a
/// stream.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
+ * data from a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The specified dynamic buffer sequence is full (that is, it has reached
* maximum size).
@@ -1316,7 +1369,7 @@ async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the read operation is complete. The signature of the function object
@@ -1332,23 +1385,28 @@ async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* return value indicates the maximum number of bytes to be read on the next
* call to the stream's async_read_some function.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -1363,19 +1421,21 @@ async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
template <typename AsyncReadStream,
typename DynamicBuffer_v2, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_dynbuf_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)));
/*@}*/
diff --git a/3rdparty/asio/include/asio/read_at.hpp b/3rdparty/asio/include/asio/read_at.hpp
index 2b94845c581..09a0b22e12e 100644
--- a/3rdparty/asio/include/asio/read_at.hpp
+++ b/3rdparty/asio/include/asio/read_at.hpp
@@ -2,7 +2,7 @@
// read_at.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,6 +18,7 @@
#include "asio/detail/config.hpp"
#include <cstddef>
#include "asio/async_result.hpp"
+#include "asio/completion_condition.hpp"
#include "asio/detail/cstdint.hpp"
#include "asio/error.hpp"
@@ -28,6 +29,14 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_read_at;
+#if !defined(ASIO_NO_IOSTREAM)
+template <typename> class initiate_async_read_at_streambuf;
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+} // namespace detail
/**
* @defgroup read_at asio::read_at
@@ -403,9 +412,10 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
/// specified offset.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data from a random access device at the specified offset. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately. The asynchronous operation will continue until one of the
+ * following conditions is true:
*
* @li The supplied buffers are full. That is, the bytes transferred is equal to
* the sum of the buffer sizes.
@@ -424,11 +434,13 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
* of the buffer sizes indicates the maximum number of bytes to read from the
* device. Although the buffers object may be copied as necessary, ownership of
* the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -439,10 +451,13 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To read into a single data buffer use the @ref buffer function as follows:
* @code
@@ -471,24 +486,26 @@ std::size_t read_at(SyncRandomAccessReadDevice& d,
*/
template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncRandomAccessReadDevice::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
- const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncRandomAccessReadDevice::executor_type));
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>>
+auto async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
+ token, offset, buffers, transfer_all()));
/// Start an asynchronous operation to read a certain amount of data at the
/// specified offset.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data from a random access device at the specified offset. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately. The asynchronous operation will continue until one of the
+ * following conditions is true:
*
* @li The supplied buffers are full. That is, the bytes transferred is equal to
* the sum of the buffer sizes.
@@ -504,7 +521,7 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
* of the buffer sizes indicates the maximum number of bytes to read from the
* device. Although the buffers object may be copied as necessary, ownership of
* the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the read operation is complete. The signature of the function object
@@ -520,9 +537,11 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
* return value indicates the maximum number of bytes to be read on the next
* call to the device's async_read_some_at function.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -533,10 +552,13 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To read into a single data buffer use the @ref buffer function as follows:
* @code asio::async_read_at(d, 42,
@@ -561,17 +583,19 @@ async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
template <typename AsyncRandomAccessReadDevice,
typename MutableBufferSequence, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncRandomAccessReadDevice::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>>
+auto async_read_at(AsyncRandomAccessReadDevice& d,
uint64_t offset, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncRandomAccessReadDevice::executor_type));
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at<AsyncRandomAccessReadDevice>>(),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -580,9 +604,10 @@ async_read_at(AsyncRandomAccessReadDevice& d,
/// specified offset.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data from a random access device at the specified offset. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately. The asynchronous operation will continue until one of the
+ * following conditions is true:
*
* @li An error occurred.
*
@@ -596,11 +621,13 @@ async_read_at(AsyncRandomAccessReadDevice& d,
*
* @param b A basic_streambuf object into which the data will be read. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -611,10 +638,13 @@ async_read_at(AsyncRandomAccessReadDevice& d,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note This overload is equivalent to calling:
* @code asio::async_read_at(
* d, 42, b,
@@ -634,24 +664,27 @@ async_read_at(AsyncRandomAccessReadDevice& d,
*/
template <typename AsyncRandomAccessReadDevice, typename Allocator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncRandomAccessReadDevice::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>>
+auto async_read_at(AsyncRandomAccessReadDevice& d,
uint64_t offset, basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncRandomAccessReadDevice::executor_type));
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at_streambuf<
+ AsyncRandomAccessReadDevice>>(),
+ token, offset, &b, transfer_all()));
/// Start an asynchronous operation to read a certain amount of data at the
/// specified offset.
/**
* This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data from a random access device at the specified offset. It is an
+ * initiating function for an @ref asynchronous_operation, and always returns
+ * immediately. The asynchronous operation will continue until one of the
+ * following conditions is true:
*
* @li The completion_condition function object returns 0.
*
@@ -665,7 +698,7 @@ async_read_at(AsyncRandomAccessReadDevice& d,
*
* @param b A basic_streambuf object into which the data will be read. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the read operation is complete. The signature of the function object
@@ -681,9 +714,11 @@ async_read_at(AsyncRandomAccessReadDevice& d,
* return value indicates the maximum number of bytes to be read on the next
* call to the device's async_read_some_at function.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -694,10 +729,13 @@ async_read_at(AsyncRandomAccessReadDevice& d,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -712,17 +750,19 @@ async_read_at(AsyncRandomAccessReadDevice& d,
template <typename AsyncRandomAccessReadDevice,
typename Allocator, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncRandomAccessReadDevice::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
- uint64_t offset, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncRandomAccessReadDevice::executor_type));
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncRandomAccessReadDevice::executor_type>>
+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>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_at_streambuf<
+ AsyncRandomAccessReadDevice>>(),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
diff --git a/3rdparty/asio/include/asio/read_until.hpp b/3rdparty/asio/include/asio/read_until.hpp
index bb1767ed6a6..97abbdbf0ea 100644
--- a/3rdparty/asio/include/asio/read_until.hpp
+++ b/3rdparty/asio/include/asio/read_until.hpp
@@ -2,7 +2,7 @@
// read_until.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -32,19 +32,34 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
-namespace detail
+char (&has_result_type_helper(...))[2];
+
+template <typename T>
+char has_result_type_helper(T*, typename T::result_type* = 0);
+
+template <typename T>
+struct has_result_type
{
- char (&has_result_type_helper(...))[2];
+ enum { value = (sizeof((has_result_type_helper)((T*)(0))) == 1) };
+};
- template <typename T>
- char has_result_type_helper(T*, typename T::result_type* = 0);
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_read_until_delim_v1;
+template <typename> class initiate_async_read_until_delim_string_v1;
+#if defined(ASIO_HAS_BOOST_REGEX)
+template <typename> class initiate_async_read_until_expr_v1;
+#endif // defined(ASIO_HAS_BOOST_REGEX)
+template <typename> class initiate_async_read_until_match_v1;
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_read_until_delim_v2;
+template <typename> class initiate_async_read_until_delim_string_v2;
+#if defined(ASIO_HAS_BOOST_REGEX)
+template <typename> class initiate_async_read_until_expr_v2;
+#endif // defined(ASIO_HAS_BOOST_REGEX)
+template <typename> class initiate_async_read_until_match_v2;
- template <typename T>
- struct has_result_type
- {
- enum { value = (sizeof((has_result_type_helper)((T*)(0))) == 1) };
- };
} // namespace detail
/// Type trait used to determine whether a type can be used as a match condition
@@ -58,8 +73,7 @@ struct is_match_condition
#else
enum
{
- value = asio::is_function<
- typename asio::remove_pointer<T>::type>::value
+ value = asio::is_function<remove_pointer_t<T>>::value
|| detail::has_result_type<T>::value
};
#endif
@@ -132,13 +146,13 @@ struct is_match_condition
*/
template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, char delim,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ DynamicBuffer_v1&& buffers, char delim,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Read data into a dynamic buffer sequence until it contains a specified
/// delimiter.
@@ -176,14 +190,14 @@ std::size_t read_until(SyncReadStream& s,
*/
template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
char delim, asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Read data into a dynamic buffer sequence until it contains a specified
/// delimiter.
@@ -238,14 +252,14 @@ std::size_t read_until(SyncReadStream& s,
*/
template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
ASIO_STRING_VIEW_PARAM delim,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Read data into a dynamic buffer sequence until it contains a specified
/// delimiter.
@@ -283,15 +297,15 @@ std::size_t read_until(SyncReadStream& s,
*/
template <typename SyncReadStream, typename DynamicBuffer_v1>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
ASIO_STRING_VIEW_PARAM delim,
asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
#if !defined(ASIO_NO_EXTENSIONS)
#if defined(ASIO_HAS_BOOST_REGEX) \
@@ -351,16 +365,15 @@ std::size_t read_until(SyncReadStream& s,
* This data may be the start of a new line, to be extracted by a subsequent
* @c read_until operation.
*/
-template <typename SyncReadStream, typename DynamicBuffer_v1>
-std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- const boost::regex& expr,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+template <typename SyncReadStream, typename DynamicBuffer_v1, typename Traits>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v1&& buffers,
+ const boost::basic_regex<char, Traits>& expr,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Read data into a dynamic buffer sequence until some part of the data it
/// contains matches a regular expression.
@@ -398,16 +411,15 @@ std::size_t read_until(SyncReadStream& s,
* expression. An application will typically leave that data in the dynamic
* buffer sequence for a subsequent read_until operation to examine.
*/
-template <typename SyncReadStream, typename DynamicBuffer_v1>
-std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- const boost::regex& expr, asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+template <typename SyncReadStream, typename DynamicBuffer_v1, typename Traits>
+std::size_t read_until(SyncReadStream& s, DynamicBuffer_v1&& buffers,
+ const boost::basic_regex<char, Traits>& expr, asio::error_code& ec,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
#endif // defined(ASIO_HAS_BOOST_REGEX)
// || defined(GENERATING_DOCUMENTATION)
@@ -517,17 +529,17 @@ std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream,
typename DynamicBuffer_v1, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
MatchCondition match_condition,
- typename constraint<
+ constraint_t<
is_match_condition<MatchCondition>::value
- >::type = 0,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ > = 0,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Read data into a dynamic buffer sequence until a function object indicates a
/// match.
@@ -585,17 +597,17 @@ std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream,
typename DynamicBuffer_v1, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
MatchCondition match_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_match_condition<MatchCondition>::value
- >::type = 0,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ > = 0,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
#if !defined(ASIO_NO_IOSTREAM)
@@ -827,9 +839,10 @@ std::size_t read_until(SyncReadStream& s,
* This data may be the start of a new line, to be extracted by a subsequent
* @c read_until operation.
*/
-template <typename SyncReadStream, typename Allocator>
+template <typename SyncReadStream, typename Allocator, typename Traits>
std::size_t read_until(SyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr);
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr);
/// Read data into a streambuf until some part of the data it contains matches
/// a regular expression.
@@ -864,9 +877,10 @@ std::size_t read_until(SyncReadStream& s,
* application will typically leave that data in the streambuf for a subsequent
* read_until operation to examine.
*/
-template <typename SyncReadStream, typename Allocator>
+template <typename SyncReadStream, typename Allocator, typename Traits>
std::size_t read_until(SyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr,
asio::error_code& ec);
#endif // defined(ASIO_HAS_BOOST_REGEX)
@@ -975,7 +989,7 @@ std::size_t read_until(SyncReadStream& s,
template <typename SyncReadStream, typename Allocator, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
- typename constraint<is_match_condition<MatchCondition>::value>::type = 0);
+ constraint_t<is_match_condition<MatchCondition>::value> = 0);
/// Read data into a streambuf until a function object indicates a match.
/**
@@ -1032,7 +1046,7 @@ template <typename SyncReadStream, typename Allocator, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
asio::basic_streambuf<Allocator>& b,
MatchCondition match_condition, asio::error_code& ec,
- typename constraint<is_match_condition<MatchCondition>::value>::type = 0);
+ constraint_t<is_match_condition<MatchCondition>::value> = 0);
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
@@ -1093,9 +1107,9 @@ std::size_t read_until(SyncReadStream& s,
*/
template <typename SyncReadStream, typename DynamicBuffer_v2>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, char delim,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/// Read data into a dynamic buffer sequence until it contains a specified
/// delimiter.
@@ -1134,9 +1148,9 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, char delim,
template <typename SyncReadStream, typename DynamicBuffer_v2>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
char delim, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/// Read data into a dynamic buffer sequence until it contains a specified
/// delimiter.
@@ -1192,9 +1206,9 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
template <typename SyncReadStream, typename DynamicBuffer_v2>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
ASIO_STRING_VIEW_PARAM delim,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/// Read data into a dynamic buffer sequence until it contains a specified
/// delimiter.
@@ -1233,9 +1247,9 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
template <typename SyncReadStream, typename DynamicBuffer_v2>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
ASIO_STRING_VIEW_PARAM delim, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
#if !defined(ASIO_NO_EXTENSIONS)
#if defined(ASIO_HAS_BOOST_REGEX) \
@@ -1295,12 +1309,12 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
* This data may be the start of a new line, to be extracted by a subsequent
* @c read_until operation.
*/
-template <typename SyncReadStream, typename DynamicBuffer_v2>
+template <typename SyncReadStream, typename DynamicBuffer_v2, typename Traits>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
- const boost::regex& expr,
- typename constraint<
+ const boost::basic_regex<char, Traits>& expr,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/// Read data into a dynamic buffer sequence until some part of the data it
/// contains matches a regular expression.
@@ -1338,12 +1352,12 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
* expression. An application will typically leave that data in the dynamic
* buffer sequence for a subsequent read_until operation to examine.
*/
-template <typename SyncReadStream, typename DynamicBuffer_v2>
+template <typename SyncReadStream, typename DynamicBuffer_v2, typename Traits>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
- const boost::regex& expr, asio::error_code& ec,
- typename constraint<
+ const boost::basic_regex<char, Traits>& expr, asio::error_code& ec,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
#endif // defined(ASIO_HAS_BOOST_REGEX)
// || defined(GENERATING_DOCUMENTATION)
@@ -1454,12 +1468,12 @@ template <typename SyncReadStream,
typename DynamicBuffer_v2, typename MatchCondition>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
MatchCondition match_condition,
- typename constraint<
+ constraint_t<
is_match_condition<MatchCondition>::value
- >::type = 0,
- typename constraint<
+ > = 0,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/// Read data into a dynamic buffer sequence until a function object indicates a
/// match.
@@ -1518,12 +1532,12 @@ template <typename SyncReadStream,
typename DynamicBuffer_v2, typename MatchCondition>
std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
MatchCondition match_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_match_condition<MatchCondition>::value
- >::type = 0,
- typename constraint<
+ > = 0,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
#endif // !defined(ASIO_NO_EXTENSIONS)
@@ -1545,9 +1559,9 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
/**
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until the dynamic buffer sequence's get area contains the
- * specified delimiter. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * specified delimiter. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The get area of the dynamic buffer sequence contains the specified
* delimiter.
@@ -1568,27 +1582,31 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param delim The delimiter character.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
*
* // The number of bytes in the dynamic buffer sequence's
* // get area up to and including the delimiter.
- * // 0 if an error occurred.
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond the delimiter. An application
* will typically leave that data in the dynamic buffer sequence for a
@@ -1635,31 +1653,32 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
*/
template <typename AsyncReadStream, typename DynamicBuffer_v1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, char delim,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v1&& buffers, char delim,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
+ 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.
/**
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until the dynamic buffer sequence's get area contains the
- * specified delimiter. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * specified delimiter. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The get area of the dynamic buffer sequence contains the specified
* delimiter.
@@ -1680,27 +1699,31 @@ async_read_until(AsyncReadStream& s,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param delim The delimiter string.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
*
* // The number of bytes in the dynamic buffer sequence's
* // get area up to and including the delimiter.
- * // 0 if an error occurred.
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond the delimiter. An application
* will typically leave that data in the dynamic buffer sequence for a
@@ -1747,23 +1770,26 @@ async_read_until(AsyncReadStream& s,
*/
template <typename AsyncReadStream, typename DynamicBuffer_v1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v1&& buffers,
ASIO_STRING_VIEW_PARAM delim,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::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)));
#if !defined(ASIO_NO_EXTENSIONS)
#if defined(ASIO_HAS_BOOST_REGEX) \
@@ -1774,9 +1800,10 @@ async_read_until(AsyncReadStream& s,
/**
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until the dynamic buffer sequence's get area contains some
- * data that matches a regular expression. The function call always returns
- * immediately. The asynchronous operation will continue until one of the
- * following conditions is true:
+ * data that matches a regular expression. It is an initiating function for an
+ * @ref asynchronous_operation, and always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
*
* @li A substring of the dynamic buffer sequence's get area matches the regular
* expression.
@@ -1798,13 +1825,15 @@ async_read_until(AsyncReadStream& s,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param expr The regular expression.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -1816,10 +1845,13 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond that which matched the regular
* expression. An application will typically leave that data in the dynamic
@@ -1865,25 +1897,25 @@ async_read_until(AsyncReadStream& s,
* if they are also supported by the @c AsyncReadStream type's
* @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename DynamicBuffer_v1,
+template <typename AsyncReadStream, typename DynamicBuffer_v1, typename Traits,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- const boost::regex& expr,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+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>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers), expr));
#endif // defined(ASIO_HAS_BOOST_REGEX)
// || defined(GENERATING_DOCUMENTATION)
@@ -1894,9 +1926,9 @@ async_read_until(AsyncReadStream& s,
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until a user-defined match condition function object, when
* applied to the data contained in the dynamic buffer sequence, indicates a
- * successful match. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * successful match. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The match condition function object returns a std::pair where the second
* element evaluates to true.
@@ -1917,7 +1949,7 @@ async_read_until(AsyncReadStream& s,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param match_condition The function object to be called to determine whether
* a match exists. The signature of the function object must be:
@@ -1934,9 +1966,11 @@ async_read_until(AsyncReadStream& s,
* @c second member of the return value is true if a match has been found, false
* otherwise.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -1947,8 +1981,8 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
* @note After a successful async_read_until operation, the dynamic buffer
@@ -1956,6 +1990,9 @@ async_read_until(AsyncReadStream& s,
* object. An application will typically leave that data in the dynamic buffer
* sequence for a subsequent async_read_until operation to examine.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The default implementation of the @c is_match_condition type trait
* evaluates to true for function pointers and function objects with a
* @c result_type typedef. It must be specialised for other user-defined
@@ -2030,26 +2067,27 @@ async_read_until(AsyncReadStream& s,
template <typename AsyncReadStream,
typename DynamicBuffer_v1, typename MatchCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- MatchCondition match_condition,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v1&& buffers, MatchCondition match_condition,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
is_match_condition<MatchCondition>::value
- >::type = 0,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ > = 0,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v1<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ match_condition));
#if !defined(ASIO_NO_IOSTREAM)
@@ -2058,8 +2096,9 @@ async_read_until(AsyncReadStream& s,
/**
* This function is used to asynchronously read data into the specified
* streambuf until the streambuf's get area contains the specified delimiter.
- * The function call always returns immediately. The asynchronous operation
- * will continue until one of the following conditions is true:
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately. The asynchronous operation will continue until one of
+ * the following conditions is true:
*
* @li The get area of the streambuf contains the specified delimiter.
*
@@ -2078,13 +2117,15 @@ async_read_until(AsyncReadStream& s,
*
* @param b A streambuf object into which the data will be read. Ownership of
* the streambuf is retained by the caller, which must guarantee that it remains
- * valid until the handler is called.
+ * valid until the completion handler is called.
*
* @param delim The delimiter character.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -2095,10 +2136,13 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note After a successful async_read_until operation, the streambuf may
* contain additional data beyond the delimiter. An application will typically
* leave that data in the streambuf for a subsequent async_read_until operation
@@ -2144,24 +2188,26 @@ async_read_until(AsyncReadStream& s,
*/
template <typename AsyncReadStream, typename Allocator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
asio::basic_streambuf<Allocator>& b, char delim,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type));
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), delim));
/// Start an asynchronous operation to read data into a streambuf until it
/// contains a specified delimiter.
/**
* This function is used to asynchronously read data into the specified
* streambuf until the streambuf's get area contains the specified delimiter.
- * The function call always returns immediately. The asynchronous operation
- * will continue until one of the following conditions is true:
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately. The asynchronous operation will continue until one of
+ * the following conditions is true:
*
* @li The get area of the streambuf contains the specified delimiter.
*
@@ -2180,13 +2226,15 @@ async_read_until(AsyncReadStream& s,
*
* @param b A streambuf object into which the data will be read. Ownership of
* the streambuf is retained by the caller, which must guarantee that it remains
- * valid until the handler is called.
+ * valid until the completion handler is called.
*
* @param delim The delimiter string.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -2197,10 +2245,13 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note After a successful async_read_until operation, the streambuf may
* contain additional data beyond the delimiter. An application will typically
* leave that data in the streambuf for a subsequent async_read_until operation
@@ -2246,17 +2297,20 @@ async_read_until(AsyncReadStream& s,
*/
template <typename AsyncReadStream, typename Allocator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
asio::basic_streambuf<Allocator>& b,
ASIO_STRING_VIEW_PARAM delim,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type));
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::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)));
#if defined(ASIO_HAS_BOOST_REGEX) \
|| defined(GENERATING_DOCUMENTATION)
@@ -2266,9 +2320,9 @@ async_read_until(AsyncReadStream& s,
/**
* This function is used to asynchronously read data into the specified
* streambuf until the streambuf's get area contains some data that matches a
- * regular expression. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * regular expression. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li A substring of the streambuf's get area matches the regular expression.
*
@@ -2288,13 +2342,15 @@ async_read_until(AsyncReadStream& s,
*
* @param b A streambuf object into which the data will be read. Ownership of
* the streambuf is retained by the caller, which must guarantee that it remains
- * valid until the handler is called.
+ * valid until the completion handler is called.
*
* @param expr The regular expression.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -2306,10 +2362,13 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note After a successful async_read_until operation, the streambuf may
* contain additional data beyond that which matched the regular expression. An
* application will typically leave that data in the streambuf for a subsequent
@@ -2354,18 +2413,20 @@ async_read_until(AsyncReadStream& s,
* if they are also supported by the @c AsyncReadStream type's
* @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename Allocator,
+template <typename AsyncReadStream, typename Allocator, typename Traits,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type));
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ asio::basic_streambuf<Allocator>& b,
+ const boost::basic_regex<char, Traits>& expr,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), expr));
#endif // defined(ASIO_HAS_BOOST_REGEX)
// || defined(GENERATING_DOCUMENTATION)
@@ -2375,9 +2436,10 @@ async_read_until(AsyncReadStream& s,
/**
* This function is used to asynchronously read data into the specified
* streambuf until a user-defined match condition function object, when applied
- * to the data contained in the streambuf, indicates a successful match. The
- * function call always returns immediately. The asynchronous operation will
- * continue until one of the following conditions is true:
+ * to the data contained in the streambuf, indicates a successful match. It is
+ * an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately. The asynchronous operation will continue until one of
+ * the following conditions is true:
*
* @li The match condition function object returns a std::pair where the second
* element evaluates to true.
@@ -2412,9 +2474,11 @@ async_read_until(AsyncReadStream& s,
* @c second member of the return value is true if a match has been found, false
* otherwise.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -2425,8 +2489,8 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
* @note After a successful async_read_until operation, the streambuf may
@@ -2434,6 +2498,9 @@ async_read_until(AsyncReadStream& s,
* application will typically leave that data in the streambuf for a subsequent
* async_read_until operation to examine.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The default implementation of the @c is_match_condition type trait
* evaluates to true for function pointers and function objects with a
* @c result_type typedef. It must be specialised for other user-defined
@@ -2506,18 +2573,18 @@ async_read_until(AsyncReadStream& s,
*/
template <typename AsyncReadStream, typename Allocator, typename MatchCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- asio::basic_streambuf<Allocator>& b,
- MatchCondition match_condition,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<is_match_condition<MatchCondition>::value>::type = 0);
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<is_match_condition<MatchCondition>::value> = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v1<AsyncReadStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), match_condition));
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
@@ -2528,9 +2595,9 @@ async_read_until(AsyncReadStream& s,
/**
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until the dynamic buffer sequence's get area contains the
- * specified delimiter. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * specified delimiter. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The get area of the dynamic buffer sequence contains the specified
* delimiter.
@@ -2551,13 +2618,15 @@ async_read_until(AsyncReadStream& s,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param delim The delimiter character.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -2568,10 +2637,13 @@ async_read_until(AsyncReadStream& s,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond the delimiter. An application
* will typically leave that data in the dynamic buffer sequence for a
@@ -2618,27 +2690,28 @@ async_read_until(AsyncReadStream& s,
*/
template <typename AsyncReadStream, typename DynamicBuffer_v2,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, char delim,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, char delim,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_delim_v2<AsyncReadStream>>(),
+ 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.
/**
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until the dynamic buffer sequence's get area contains the
- * specified delimiter. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * specified delimiter. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The get area of the dynamic buffer sequence contains the specified
* delimiter.
@@ -2659,27 +2732,31 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, char delim,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param delim The delimiter string.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
*
* // The number of bytes in the dynamic buffer sequence's
* // get area up to and including the delimiter.
- * // 0 if an error occurred.
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond the delimiter. An application
* will typically leave that data in the dynamic buffer sequence for a
@@ -2726,19 +2803,22 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, char delim,
*/
template <typename AsyncReadStream, typename DynamicBuffer_v2,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
ASIO_STRING_VIEW_PARAM delim,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::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)));
#if !defined(ASIO_NO_EXTENSIONS)
#if defined(ASIO_HAS_BOOST_REGEX) \
@@ -2749,9 +2829,10 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
/**
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until the dynamic buffer sequence's get area contains some
- * data that matches a regular expression. The function call always returns
- * immediately. The asynchronous operation will continue until one of the
- * following conditions is true:
+ * data that matches a regular expression. It is an initiating function for an
+ * @ref asynchronous_operation, and always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
*
* @li A substring of the dynamic buffer sequence's get area matches the regular
* expression.
@@ -2773,13 +2854,15 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param expr The regular expression.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -2791,10 +2874,13 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note After a successful async_read_until operation, the dynamic buffer
* sequence may contain additional data beyond that which matched the regular
* expression. An application will typically leave that data in the dynamic
@@ -2840,21 +2926,22 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* if they are also supported by the @c AsyncReadStream type's
* @c async_read_some operation.
*/
-template <typename AsyncReadStream, typename DynamicBuffer_v2,
+template <typename AsyncReadStream, typename DynamicBuffer_v2, typename Traits,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
- const boost::regex& expr,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+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>(),
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_expr_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), expr));
#endif // defined(ASIO_HAS_BOOST_REGEX)
// || defined(GENERATING_DOCUMENTATION)
@@ -2865,9 +2952,9 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* This function is used to asynchronously read data into the specified dynamic
* buffer sequence until a user-defined match condition function object, when
* applied to the data contained in the dynamic buffer sequence, indicates a
- * successful match. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * successful match. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li The match condition function object returns a std::pair where the second
* element evaluates to true.
@@ -2888,7 +2975,7 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* @param buffers The dynamic buffer sequence into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param match_condition The function object to be called to determine whether
* a match exists. The signature of the function object must be:
@@ -2905,9 +2992,11 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* @c second member of the return value is true if a match has been found, false
* otherwise.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -2918,8 +3007,8 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
* @note After a successful async_read_until operation, the dynamic buffer
@@ -2927,6 +3016,9 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
* object. An application will typically leave that data in the dynamic buffer
* sequence for a subsequent async_read_until operation to examine.
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The default implementation of the @c is_match_condition type trait
* evaluates to true for function pointers and function objects with a
* @c result_type typedef. It must be specialised for other user-defined
@@ -3001,22 +3093,23 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
template <typename AsyncReadStream,
typename DynamicBuffer_v2, typename MatchCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncReadStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
-async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
- MatchCondition match_condition,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncReadStream::executor_type),
- typename constraint<
+ std::size_t)) ReadToken = default_completion_token_t<
+ typename AsyncReadStream::executor_type>>
+auto async_read_until(AsyncReadStream& s,
+ DynamicBuffer_v2 buffers, MatchCondition match_condition,
+ ReadToken&& token = default_completion_token_t<
+ typename AsyncReadStream::executor_type>(),
+ constraint_t<
is_match_condition<MatchCondition>::value
- >::type = 0,
- typename constraint<
+ > = 0,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_read_until_match_v2<AsyncReadStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers), match_condition));
#endif // !defined(ASIO_NO_EXTENSIONS)
diff --git a/3rdparty/asio/include/asio/readable_pipe.hpp b/3rdparty/asio/include/asio/readable_pipe.hpp
new file mode 100644
index 00000000000..19101c28702
--- /dev/null
+++ b/3rdparty/asio/include/asio/readable_pipe.hpp
@@ -0,0 +1,35 @@
+//
+// readable_pipe.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 ASIO_READABLE_PIPE_HPP
+#define ASIO_READABLE_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_readable_pipe.hpp"
+
+namespace asio {
+
+/// Typedef for the typical usage of a readable pipe.
+typedef basic_readable_pipe<> readable_pipe;
+
+} // namespace asio
+
+#endif // defined(ASIO_HAS_PIPE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_READABLE_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/recycling_allocator.hpp b/3rdparty/asio/include/asio/recycling_allocator.hpp
new file mode 100644
index 00000000000..b3986c0242e
--- /dev/null
+++ b/3rdparty/asio/include/asio/recycling_allocator.hpp
@@ -0,0 +1,138 @@
+//
+// recycling_allocator.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 ASIO_RECYCLING_ALLOCATOR_HPP
+#define ASIO_RECYCLING_ALLOCATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/recycling_allocator.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// An allocator that caches memory blocks in thread-local storage for reuse.
+/**
+ * The @recycling_allocator uses a simple strategy where a limited number of
+ * small memory blocks are cached in thread-local storage, if the current
+ * thread is running an @c io_context or is part of a @c thread_pool.
+ */
+template <typename T>
+class recycling_allocator
+{
+public:
+ /// The type of object allocated by the recycling allocator.
+ typedef T value_type;
+
+ /// Rebind the allocator to another value_type.
+ template <typename U>
+ struct rebind
+ {
+ /// The rebound @c allocator type.
+ typedef recycling_allocator<U> other;
+ };
+
+ /// Default constructor.
+ constexpr recycling_allocator() noexcept
+ {
+ }
+
+ /// Converting constructor.
+ template <typename U>
+ constexpr recycling_allocator(
+ const recycling_allocator<U>&) noexcept
+ {
+ }
+
+ /// Equality operator. Always returns true.
+ constexpr bool operator==(
+ const recycling_allocator&) const noexcept
+ {
+ return true;
+ }
+
+ /// Inequality operator. Always returns false.
+ constexpr bool operator!=(
+ const recycling_allocator&) const noexcept
+ {
+ return false;
+ }
+
+ /// Allocate memory for the specified number of values.
+ T* allocate(std::size_t n)
+ {
+ return detail::recycling_allocator<T>().allocate(n);
+ }
+
+ /// Deallocate memory for the specified number of values.
+ void deallocate(T* p, std::size_t n)
+ {
+ detail::recycling_allocator<T>().deallocate(p, n);
+ }
+};
+
+/// A proto-allocator that caches memory blocks in thread-local storage for
+/// reuse.
+/**
+ * The @recycling_allocator uses a simple strategy where a limited number of
+ * small memory blocks are cached in thread-local storage, if the current
+ * thread is running an @c io_context or is part of a @c thread_pool.
+ */
+template <>
+class recycling_allocator<void>
+{
+public:
+ /// No values are allocated by a proto-allocator.
+ typedef void value_type;
+
+ /// Rebind the allocator to another value_type.
+ template <typename U>
+ struct rebind
+ {
+ /// The rebound @c allocator type.
+ typedef recycling_allocator<U> other;
+ };
+
+ /// Default constructor.
+ constexpr recycling_allocator() noexcept
+ {
+ }
+
+ /// Converting constructor.
+ template <typename U>
+ constexpr recycling_allocator(
+ const recycling_allocator<U>&) noexcept
+ {
+ }
+
+ /// Equality operator. Always returns true.
+ constexpr bool operator==(
+ const recycling_allocator&) const noexcept
+ {
+ return true;
+ }
+
+ /// Inequality operator. Always returns false.
+ constexpr bool operator!=(
+ const recycling_allocator&) const noexcept
+ {
+ return false;
+ }
+};
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_RECYCLING_ALLOCATOR_HPP
diff --git a/3rdparty/asio/include/asio/redirect_error.hpp b/3rdparty/asio/include/asio/redirect_error.hpp
index 57389dd97af..524bd0b99a1 100644
--- a/3rdparty/asio/include/asio/redirect_error.hpp
+++ b/3rdparty/asio/include/asio/redirect_error.hpp
@@ -2,7 +2,7 @@
// redirect_error.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -23,7 +23,7 @@
namespace asio {
-/// Completion token type used to specify that an error produced by an
+/// A @ref completion_token adapter used to specify that an error produced by an
/// asynchronous operation is captured to an error_code variable.
/**
* The redirect_error_t class is used to indicate that any error_code produced
@@ -35,9 +35,8 @@ class redirect_error_t
public:
/// Constructor.
template <typename T>
- redirect_error_t(ASIO_MOVE_ARG(T) completion_token,
- asio::error_code& ec)
- : token_(ASIO_MOVE_CAST(T)(completion_token)),
+ redirect_error_t(T&& completion_token, asio::error_code& ec)
+ : token_(static_cast<T&&>(completion_token)),
ec_(ec)
{
}
@@ -47,14 +46,13 @@ public:
asio::error_code& ec_;
};
-/// Create a completion token to capture error_code values to a variable.
+/// Adapt a @ref completion_token to capture error_code values to a variable.
template <typename CompletionToken>
-inline redirect_error_t<typename decay<CompletionToken>::type> redirect_error(
- ASIO_MOVE_ARG(CompletionToken) completion_token,
- asio::error_code& ec)
+inline redirect_error_t<decay_t<CompletionToken>> redirect_error(
+ CompletionToken&& completion_token, asio::error_code& ec)
{
- return redirect_error_t<typename decay<CompletionToken>::type>(
- ASIO_MOVE_CAST(CompletionToken)(completion_token), ec);
+ return redirect_error_t<decay_t<CompletionToken>>(
+ static_cast<CompletionToken&&>(completion_token), ec);
}
} // namespace asio
diff --git a/3rdparty/asio/include/asio/registered_buffer.hpp b/3rdparty/asio/include/asio/registered_buffer.hpp
new file mode 100644
index 00000000000..f563277b30a
--- /dev/null
+++ b/3rdparty/asio/include/asio/registered_buffer.hpp
@@ -0,0 +1,344 @@
+//
+// registered_buffer.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 ASIO_REGISTERED_BUFFER_HPP
+#define ASIO_REGISTERED_BUFFER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/buffer.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+class buffer_registration_base;
+
+} // namespace detail
+
+class const_registered_buffer;
+
+/// Type used to identify a registered buffer.
+class registered_buffer_id
+{
+public:
+ /// The native buffer identifier type.
+ typedef int native_handle_type;
+
+ /// Default constructor creates an invalid registered buffer identifier.
+ registered_buffer_id() noexcept
+ : scope_(0),
+ index_(-1)
+ {
+ }
+
+ /// Get the native buffer identifier type.
+ native_handle_type native_handle() const noexcept
+ {
+ return index_;
+ }
+
+ /// Compare two IDs for equality.
+ friend bool operator==(const registered_buffer_id& lhs,
+ const registered_buffer_id& rhs) noexcept
+ {
+ return lhs.scope_ == rhs.scope_ && lhs.index_ == rhs.index_;
+ }
+
+ /// Compare two IDs for equality.
+ friend bool operator!=(const registered_buffer_id& lhs,
+ const registered_buffer_id& rhs) noexcept
+ {
+ return lhs.scope_ != rhs.scope_ || lhs.index_ != rhs.index_;
+ }
+
+private:
+ friend class detail::buffer_registration_base;
+
+ // Hidden constructor used by buffer registration.
+ registered_buffer_id(const void* scope, int index) noexcept
+ : scope_(scope),
+ index_(index)
+ {
+ }
+
+ const void* scope_;
+ int index_;
+};
+
+/// Holds a registered buffer over modifiable data.
+/**
+ * Satisfies the @c MutableBufferSequence type requirements.
+ */
+class mutable_registered_buffer
+{
+public:
+ /// Default constructor creates an invalid registered buffer.
+ mutable_registered_buffer() noexcept
+ : buffer_(),
+ id_()
+ {
+ }
+
+ /// Get the underlying mutable buffer.
+ const mutable_buffer& buffer() const noexcept
+ {
+ return buffer_;
+ }
+
+ /// Get a pointer to the beginning of the memory range.
+ /**
+ * @returns <tt>buffer().data()</tt>.
+ */
+ void* data() const noexcept
+ {
+ return buffer_.data();
+ }
+
+ /// Get the size of the memory range.
+ /**
+ * @returns <tt>buffer().size()</tt>.
+ */
+ std::size_t size() const noexcept
+ {
+ return buffer_.size();
+ }
+
+ /// Get the registered buffer identifier.
+ const registered_buffer_id& id() const noexcept
+ {
+ return id_;
+ }
+
+ /// Move the start of the buffer by the specified number of bytes.
+ mutable_registered_buffer& operator+=(std::size_t n) noexcept
+ {
+ buffer_ += n;
+ return *this;
+ }
+
+private:
+ friend class detail::buffer_registration_base;
+
+ // Hidden constructor used by buffer registration and operators.
+ mutable_registered_buffer(const mutable_buffer& b,
+ const registered_buffer_id& i) noexcept
+ : buffer_(b),
+ id_(i)
+ {
+ }
+
+#if !defined(GENERATING_DOCUMENTATION)
+ friend mutable_registered_buffer buffer(
+ const mutable_registered_buffer& b, std::size_t n) noexcept;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ mutable_buffer buffer_;
+ registered_buffer_id id_;
+};
+
+/// Holds a registered buffer over non-modifiable data.
+/**
+ * Satisfies the @c ConstBufferSequence type requirements.
+ */
+class const_registered_buffer
+{
+public:
+ /// Default constructor creates an invalid registered buffer.
+ const_registered_buffer() noexcept
+ : buffer_(),
+ id_()
+ {
+ }
+
+ /// Construct a non-modifiable buffer from a modifiable one.
+ const_registered_buffer(
+ const mutable_registered_buffer& b) noexcept
+ : buffer_(b.buffer()),
+ id_(b.id())
+ {
+ }
+
+ /// Get the underlying constant buffer.
+ const const_buffer& buffer() const noexcept
+ {
+ return buffer_;
+ }
+
+ /// Get a pointer to the beginning of the memory range.
+ /**
+ * @returns <tt>buffer().data()</tt>.
+ */
+ const void* data() const noexcept
+ {
+ return buffer_.data();
+ }
+
+ /// Get the size of the memory range.
+ /**
+ * @returns <tt>buffer().size()</tt>.
+ */
+ std::size_t size() const noexcept
+ {
+ return buffer_.size();
+ }
+
+ /// Get the registered buffer identifier.
+ const registered_buffer_id& id() const noexcept
+ {
+ return id_;
+ }
+
+ /// Move the start of the buffer by the specified number of bytes.
+ const_registered_buffer& operator+=(std::size_t n) noexcept
+ {
+ buffer_ += n;
+ return *this;
+ }
+
+private:
+ // Hidden constructor used by operators.
+ const_registered_buffer(const const_buffer& b,
+ const registered_buffer_id& i) noexcept
+ : buffer_(b),
+ id_(i)
+ {
+ }
+
+#if !defined(GENERATING_DOCUMENTATION)
+ friend const_registered_buffer buffer(
+ const const_registered_buffer& b, std::size_t n) noexcept;
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ const_buffer buffer_;
+ registered_buffer_id id_;
+};
+
+/** @addtogroup buffer_sequence_begin */
+
+/// Get an iterator to the first element in a buffer sequence.
+inline const mutable_buffer* buffer_sequence_begin(
+ const mutable_registered_buffer& b) noexcept
+{
+ return &b.buffer();
+}
+
+/// Get an iterator to the first element in a buffer sequence.
+inline const const_buffer* buffer_sequence_begin(
+ const const_registered_buffer& b) noexcept
+{
+ return &b.buffer();
+}
+
+/** @} */
+/** @addtogroup buffer_sequence_end */
+
+/// Get an iterator to one past the end element in a buffer sequence.
+inline const mutable_buffer* buffer_sequence_end(
+ const mutable_registered_buffer& b) noexcept
+{
+ return &b.buffer() + 1;
+}
+
+/// Get an iterator to one past the end element in a buffer sequence.
+inline const const_buffer* buffer_sequence_end(
+ const const_registered_buffer& b) noexcept
+{
+ return &b.buffer() + 1;
+}
+
+/** @} */
+/** @addtogroup buffer */
+
+/// Obtain a buffer representing the entire registered buffer.
+inline mutable_registered_buffer buffer(
+ const mutable_registered_buffer& b) noexcept
+{
+ return b;
+}
+
+/// Obtain a buffer representing the entire registered buffer.
+inline const_registered_buffer buffer(
+ const const_registered_buffer& b) noexcept
+{
+ return b;
+}
+
+/// Obtain a buffer representing part of a registered buffer.
+inline mutable_registered_buffer buffer(
+ const mutable_registered_buffer& b, std::size_t n) noexcept
+{
+ return mutable_registered_buffer(buffer(b.buffer_, n), b.id_);
+}
+
+/// Obtain a buffer representing part of a registered buffer.
+inline const_registered_buffer buffer(
+ const const_registered_buffer& b, std::size_t n) noexcept
+{
+ return const_registered_buffer(buffer(b.buffer_, n), b.id_);
+}
+
+/** @} */
+
+/// Create a new modifiable registered buffer that is offset from the start of
+/// another.
+/**
+ * @relates mutable_registered_buffer
+ */
+inline mutable_registered_buffer operator+(
+ const mutable_registered_buffer& b, std::size_t n) noexcept
+{
+ mutable_registered_buffer tmp(b);
+ tmp += n;
+ return tmp;
+}
+
+/// Create a new modifiable buffer that is offset from the start of another.
+/**
+ * @relates mutable_registered_buffer
+ */
+inline mutable_registered_buffer operator+(std::size_t n,
+ const mutable_registered_buffer& b) noexcept
+{
+ return b + n;
+}
+
+/// Create a new non-modifiable registered buffer that is offset from the start
+/// of another.
+/**
+ * @relates const_registered_buffer
+ */
+inline const_registered_buffer operator+(const const_registered_buffer& b,
+ std::size_t n) noexcept
+{
+ const_registered_buffer tmp(b);
+ tmp += n;
+ return tmp;
+}
+
+/// Create a new non-modifiable buffer that is offset from the start of another.
+/**
+ * @relates const_registered_buffer
+ */
+inline const_registered_buffer operator+(std::size_t n,
+ const const_registered_buffer& b) noexcept
+{
+ return b + n;
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_REGISTERED_BUFFER_HPP
diff --git a/3rdparty/asio/include/asio/require.hpp b/3rdparty/asio/include/asio/require.hpp
index c8b40fce959..609e54fcaa3 100644
--- a/3rdparty/asio/include/asio/require.hpp
+++ b/3rdparty/asio/include/asio/require.hpp
@@ -2,7 +2,7 @@
// require.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -107,10 +107,10 @@ struct require_result
namespace asio_require_fn {
-using asio::conditional;
-using asio::decay;
+using asio::conditional_t;
+using asio::decay_t;
using asio::declval;
-using asio::enable_if;
+using asio::enable_if_t;
using asio::is_applicable_property;
using asio::traits::require_free;
using asio::traits::require_member;
@@ -132,99 +132,95 @@ template <typename Impl, typename T, typename Properties, typename = void,
typename = void, typename = void, typename = void, typename = void>
struct call_traits
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr overload_type overload = ill_formed;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_requirable
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable
+ >,
+ enable_if_t<
static_require<T, Property>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = identity);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
-#if defined(ASIO_HAS_MOVE)
- typedef ASIO_MOVE_ARG(T) result_type;
-#else // defined(ASIO_HAS_MOVE)
- typedef ASIO_MOVE_ARG(typename decay<T>::type) result_type;
-#endif // defined(ASIO_HAS_MOVE)
+ static constexpr overload_type overload = identity;
+ static constexpr bool is_noexcept = true;
+
+ typedef T&& result_type;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_requirable
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable
+ >,
+ enable_if_t<
!static_require<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
require_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type> :
+ >> :
require_member<typename Impl::template proxy<T>::type, Property>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
+ static constexpr overload_type overload = call_member;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_requirable
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable
+ >,
+ enable_if_t<
!static_require<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!require_member<typename Impl::template proxy<T>::type, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
require_free<T, Property>::is_valid
- >::type> :
+ >> :
require_free<T, Property>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
+ static constexpr overload_type overload = call_free;
};
template <typename Impl, typename T, typename P0, typename P1>
struct call_traits<Impl, T, void(P0, P1),
- typename enable_if<
+ enable_if_t<
call_traits<Impl, T, void(P0)>::overload != ill_formed
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
call_traits<
Impl,
typename call_traits<Impl, T, void(P0)>::result_type,
void(P1)
>::overload != ill_formed
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = two_props);
+ static constexpr overload_type overload = two_props;
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
+ static constexpr bool is_noexcept =
(
call_traits<Impl, T, void(P0)>::is_noexcept
&&
@@ -233,51 +229,51 @@ struct call_traits<Impl, T, void(P0, P1),
typename call_traits<Impl, T, void(P0)>::result_type,
void(P1)
>::is_noexcept
- ));
+ );
- typedef typename decay<
+ typedef decay_t<
typename call_traits<
Impl,
typename call_traits<Impl, T, void(P0)>::result_type,
void(P1)
>::result_type
- >::type result_type;
+ > result_type;
};
template <typename Impl, typename T, typename P0,
- typename P1, typename ASIO_ELLIPSIS PN>
-struct call_traits<Impl, T, void(P0, P1, PN ASIO_ELLIPSIS),
- typename enable_if<
+ typename P1, typename... PN>
+struct call_traits<Impl, T, void(P0, P1, PN...),
+ enable_if_t<
call_traits<Impl, T, void(P0)>::overload != ill_formed
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
call_traits<
Impl,
typename call_traits<Impl, T, void(P0)>::result_type,
- void(P1, PN ASIO_ELLIPSIS)
+ void(P1, PN...)
>::overload != ill_formed
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = n_props);
+ static constexpr overload_type overload = n_props;
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
+ static constexpr bool is_noexcept =
(
call_traits<Impl, T, void(P0)>::is_noexcept
&&
call_traits<
Impl,
typename call_traits<Impl, T, void(P0)>::result_type,
- void(P1, PN ASIO_ELLIPSIS)
+ void(P1, PN...)
>::is_noexcept
- ));
+ );
- typedef typename decay<
+ typedef decay_t<
typename call_traits<
Impl,
typename call_traits<Impl, T, void(P0)>::result_type,
- void(P1, PN ASIO_ELLIPSIS)
+ void(P1, PN...)
>::result_type
- >::type result_type;
+ > result_type;
};
struct impl
@@ -289,16 +285,14 @@ struct impl
struct type
{
template <typename P>
- auto require(ASIO_MOVE_ARG(P) p)
+ auto require(P&& p)
noexcept(
noexcept(
- declval<typename conditional<true, T, P>::type>().require(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().require(static_cast<P&&>(p))
)
)
-> decltype(
- declval<typename conditional<true, T, P>::type>().require(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().require(static_cast<P&&>(p))
);
};
#else // defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
@@ -307,91 +301,63 @@ struct impl
};
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == identity,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property)) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&&) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return ASIO_MOVE_CAST(T)(t);
+ return static_cast<T&&>(t);
}
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == call_member,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property) p) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return ASIO_MOVE_CAST(T)(t).require(
- ASIO_MOVE_CAST(Property)(p));
+ return static_cast<T&&>(t).require(static_cast<Property&&>(p));
}
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == call_free,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property) p) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return require(
- ASIO_MOVE_CAST(T)(t),
- ASIO_MOVE_CAST(Property)(p));
+ return require(static_cast<T&&>(t), static_cast<Property&&>(p));
}
template <typename T, typename P0, typename P1>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(P0, P1)>::overload == two_props,
typename call_traits<impl, T, void(P0, P1)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(P0) p0,
- ASIO_MOVE_ARG(P1) p1) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(P0, P1)>::is_noexcept))
+ >
+ operator()(T&& t, P0&& p0, P1&& p1) const
+ noexcept(call_traits<impl, T, void(P0, P1)>::is_noexcept)
{
return (*this)(
- (*this)(
- ASIO_MOVE_CAST(T)(t),
- ASIO_MOVE_CAST(P0)(p0)),
- ASIO_MOVE_CAST(P1)(p1));
+ (*this)(static_cast<T&&>(t), static_cast<P0&&>(p0)),
+ static_cast<P1&&>(p1));
}
template <typename T, typename P0, typename P1,
- typename ASIO_ELLIPSIS PN>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
- call_traits<impl, T,
- void(P0, P1, PN ASIO_ELLIPSIS)>::overload == n_props,
- typename call_traits<impl, T,
- void(P0, P1, PN ASIO_ELLIPSIS)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(P0) p0,
- ASIO_MOVE_ARG(P1) p1,
- ASIO_MOVE_ARG(PN) ASIO_ELLIPSIS pn) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(P0, P1, PN ASIO_ELLIPSIS)>::is_noexcept))
+ typename... PN>
+ ASIO_NODISCARD constexpr enable_if_t<
+ call_traits<impl, T, void(P0, P1, PN...)>::overload == n_props,
+ typename call_traits<impl, T, void(P0, P1, PN...)>::result_type
+ >
+ operator()(T&& t, P0&& p0, P1&& p1, PN&&... pn) const
+ noexcept(call_traits<impl, T, void(P0, P1, PN...)>::is_noexcept)
{
return (*this)(
- (*this)(
- ASIO_MOVE_CAST(T)(t),
- ASIO_MOVE_CAST(P0)(p0)),
- ASIO_MOVE_CAST(P1)(p1),
- ASIO_MOVE_CAST(PN)(pn) ASIO_ELLIPSIS);
+ (*this)(static_cast<T&&>(t), static_cast<P0&&>(p0)),
+ static_cast<P1&&>(p1), static_cast<PN&&>(pn)...);
}
};
@@ -408,15 +374,13 @@ const T static_instance<T>::instance = {};
namespace asio {
namespace {
-static ASIO_CONSTEXPR const asio_require_fn::impl&
+static constexpr const asio_require_fn::impl&
require = asio_require_fn::static_instance<>::instance;
} // namespace
typedef asio_require_fn::impl require_t;
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename T, typename... Properties>
struct can_require :
integral_constant<bool,
@@ -426,51 +390,14 @@ struct can_require :
{
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename P0 = void,
- typename P1 = void, typename P2 = void>
-struct can_require :
- integral_constant<bool,
- asio_require_fn::call_traits<require_t, T, void(P0, P1, P2)>::overload
- != asio_require_fn::ill_formed>
-{
-};
-
-template <typename T, typename P0, typename P1>
-struct can_require<T, P0, P1> :
- integral_constant<bool,
- asio_require_fn::call_traits<require_t, T, void(P0, P1)>::overload
- != asio_require_fn::ill_formed>
-{
-};
-
-template <typename T, typename P0>
-struct can_require<T, P0> :
- integral_constant<bool,
- asio_require_fn::call_traits<require_t, T, void(P0)>::overload
- != asio_require_fn::ill_formed>
-{
-};
-
-template <typename T>
-struct can_require<T> :
- false_type
-{
-};
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-template <typename T, typename ASIO_ELLIPSIS Properties>
+template <typename T, typename... Properties>
constexpr bool can_require_v
- = can_require<T, Properties ASIO_ELLIPSIS>::value;
+ = can_require<T, Properties...>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename T, typename... Properties>
struct is_nothrow_require :
integral_constant<bool,
@@ -479,51 +406,14 @@ struct is_nothrow_require :
{
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename P0 = void,
- typename P1 = void, typename P2 = void>
-struct is_nothrow_require :
- integral_constant<bool,
- asio_require_fn::call_traits<
- require_t, T, void(P0, P1, P2)>::is_noexcept>
-{
-};
-
-template <typename T, typename P0, typename P1>
-struct is_nothrow_require<T, P0, P1> :
- integral_constant<bool,
- asio_require_fn::call_traits<
- require_t, T, void(P0, P1)>::is_noexcept>
-{
-};
-
-template <typename T, typename P0>
-struct is_nothrow_require<T, P0> :
- integral_constant<bool,
- asio_require_fn::call_traits<
- require_t, T, void(P0)>::is_noexcept>
-{
-};
-
-template <typename T>
-struct is_nothrow_require<T> :
- false_type
-{
-};
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
-template <typename T, typename ASIO_ELLIPSIS Properties>
+template <typename T, typename... Properties>
constexpr bool is_nothrow_require_v
- = is_nothrow_require<T, Properties ASIO_ELLIPSIS>::value;
+ = is_nothrow_require<T, Properties...>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename T, typename... Properties>
struct require_result
{
@@ -531,36 +421,8 @@ struct require_result
require_t, T, void(Properties...)>::result_type type;
};
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename P0 = void,
- typename P1 = void, typename P2 = void>
-struct require_result
-{
- typedef typename asio_require_fn::call_traits<
- require_t, T, void(P0, P1, P2)>::result_type type;
-};
-
-template <typename T, typename P0, typename P1>
-struct require_result<T, P0, P1>
-{
- typedef typename asio_require_fn::call_traits<
- require_t, T, void(P0, P1)>::result_type type;
-};
-
-template <typename T, typename P0>
-struct require_result<T, P0>
-{
- typedef typename asio_require_fn::call_traits<
- require_t, T, void(P0)>::result_type type;
-};
-
-template <typename T>
-struct require_result<T>
-{
-};
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
+template <typename T, typename... Properties>
+using require_result_t = typename require_result<T, Properties...>::type;
} // namespace asio
diff --git a/3rdparty/asio/include/asio/require_concept.hpp b/3rdparty/asio/include/asio/require_concept.hpp
index 1238d6b6158..b735b669952 100644
--- a/3rdparty/asio/include/asio/require_concept.hpp
+++ b/3rdparty/asio/include/asio/require_concept.hpp
@@ -2,7 +2,7 @@
// require_concept.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -107,10 +107,10 @@ struct require_concept_result
namespace asio_require_concept_fn {
-using asio::conditional;
-using asio::decay;
+using asio::conditional_t;
+using asio::decay_t;
using asio::declval;
-using asio::enable_if;
+using asio::enable_if_t;
using asio::is_applicable_property;
using asio::traits::require_concept_free;
using asio::traits::require_concept_member;
@@ -130,85 +130,85 @@ template <typename Impl, typename T, typename Properties, typename = void,
typename = void, typename = void, typename = void, typename = void>
struct call_traits
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr overload_type overload = ill_formed;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_requirable_concept
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable_concept
+ >,
+ enable_if_t<
static_require_concept<T, Property>::is_valid
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = identity);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef ASIO_MOVE_ARG(T) result_type;
+ static constexpr overload_type overload = identity;
+ static constexpr bool is_noexcept = true;
+ typedef T&& result_type;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_requirable_concept
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable_concept
+ >,
+ enable_if_t<
!static_require_concept<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
require_concept_member<
typename Impl::template proxy<T>::type,
Property
>::is_valid
- >::type> :
+ >> :
require_concept_member<
typename Impl::template proxy<T>::type,
Property
>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member);
+ static constexpr overload_type overload = call_member;
};
template <typename Impl, typename T, typename Property>
struct call_traits<Impl, T, void(Property),
- typename enable_if<
+ enable_if_t<
is_applicable_property<
- typename decay<T>::type,
- typename decay<Property>::type
+ decay_t<T>,
+ decay_t<Property>
>::value
- >::type,
- typename enable_if<
- decay<Property>::type::is_requirable_concept
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
+ decay_t<Property>::is_requirable_concept
+ >,
+ enable_if_t<
!static_require_concept<T, Property>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
!require_concept_member<
typename Impl::template proxy<T>::type,
Property
>::is_valid
- >::type,
- typename enable_if<
+ >,
+ enable_if_t<
require_concept_free<T, Property>::is_valid
- >::type> :
+ >> :
require_concept_free<T, Property>
{
- ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free);
+ static constexpr overload_type overload = call_free;
};
struct impl
@@ -220,16 +220,16 @@ struct impl
struct type
{
template <typename P>
- auto require_concept(ASIO_MOVE_ARG(P) p)
+ auto require_concept(P&& p)
noexcept(
noexcept(
- declval<typename conditional<true, T, P>::type>().require_concept(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().require_concept(
+ static_cast<P&&>(p))
)
)
-> decltype(
- declval<typename conditional<true, T, P>::type>().require_concept(
- ASIO_MOVE_CAST(P)(p))
+ declval<conditional_t<true, T, P>>().require_concept(
+ static_cast<P&&>(p))
);
};
#else // defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT)
@@ -238,48 +238,36 @@ struct impl
};
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == identity,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property)) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&&) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return ASIO_MOVE_CAST(T)(t);
+ return static_cast<T&&>(t);
}
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == call_member,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property) p) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return ASIO_MOVE_CAST(T)(t).require_concept(
- ASIO_MOVE_CAST(Property)(p));
+ return static_cast<T&&>(t).require_concept(static_cast<Property&&>(p));
}
template <typename T, typename Property>
- ASIO_NODISCARD ASIO_CONSTEXPR typename enable_if<
+ ASIO_NODISCARD constexpr enable_if_t<
call_traits<impl, T, void(Property)>::overload == call_free,
typename call_traits<impl, T, void(Property)>::result_type
- >::type
- operator()(
- ASIO_MOVE_ARG(T) t,
- ASIO_MOVE_ARG(Property) p) const
- ASIO_NOEXCEPT_IF((
- call_traits<impl, T, void(Property)>::is_noexcept))
+ >
+ operator()(T&& t, Property&& p) const
+ noexcept(call_traits<impl, T, void(Property)>::is_noexcept)
{
- return require_concept(
- ASIO_MOVE_CAST(T)(t),
- ASIO_MOVE_CAST(Property)(p));
+ return require_concept(static_cast<T&&>(t), static_cast<Property&&>(p));
}
};
@@ -296,7 +284,7 @@ const T static_instance<T>::instance = {};
namespace asio {
namespace {
-static ASIO_CONSTEXPR const asio_require_concept_fn::impl&
+static constexpr const asio_require_concept_fn::impl&
require_concept = asio_require_concept_fn::static_instance<>::instance;
} // namespace
@@ -315,8 +303,7 @@ struct can_require_concept :
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template <typename T, typename Property>
-constexpr bool can_require_concept_v
- = can_require_concept<T, Property>::value;
+constexpr bool can_require_concept_v = can_require_concept<T, Property>::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
@@ -343,6 +330,10 @@ struct require_concept_result
require_concept_t, T, void(Property)>::result_type type;
};
+template <typename T, typename Property>
+using require_concept_result_t =
+ typename require_concept_result<T, Property>::type;
+
} // namespace asio
#endif // defined(GENERATING_DOCUMENTATION)
diff --git a/3rdparty/asio/include/asio/serial_port.hpp b/3rdparty/asio/include/asio/serial_port.hpp
index bc5c552c23e..61e893769bf 100644
--- a/3rdparty/asio/include/asio/serial_port.hpp
+++ b/3rdparty/asio/include/asio/serial_port.hpp
@@ -2,7 +2,7 @@
// serial_port.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/serial_port_base.hpp b/3rdparty/asio/include/asio/serial_port_base.hpp
index 6d4b047124c..479d69796e7 100644
--- a/3rdparty/asio/include/asio/serial_port_base.hpp
+++ b/3rdparty/asio/include/asio/serial_port_base.hpp
@@ -2,7 +2,7 @@
// serial_port_base.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/signal_set.hpp b/3rdparty/asio/include/asio/signal_set.hpp
index 24cd8bfd4f2..b2e189d01d7 100644
--- a/3rdparty/asio/include/asio/signal_set.hpp
+++ b/3rdparty/asio/include/asio/signal_set.hpp
@@ -2,7 +2,7 @@
// signal_set.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/signal_set_base.hpp b/3rdparty/asio/include/asio/signal_set_base.hpp
new file mode 100644
index 00000000000..9863a1598a3
--- /dev/null
+++ b/3rdparty/asio/include/asio/signal_set_base.hpp
@@ -0,0 +1,171 @@
+//
+// signal_set_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 ASIO_SIGNAL_SET_BASE_HPP
+#define ASIO_SIGNAL_SET_BASE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/socket_types.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+/// The signal_set_base class is used as a base for the basic_signal_set class
+/// templates so that we have a common place to define the flags enum.
+class signal_set_base
+{
+public:
+# if defined(GENERATING_DOCUMENTATION)
+ /// Enumeration representing the different types of flags that may specified
+ /// when adding a signal to a set.
+ enum flags
+ {
+ /// Bitmask representing no flags.
+ none = 0,
+
+ /// Affects the behaviour of interruptible functions such that, if the
+ /// function would have failed with error::interrupted when interrupted by
+ /// the specified signal, the function shall instead be restarted and not
+ /// fail with error::interrupted.
+ restart = implementation_defined,
+
+ /// Do not generate SIGCHLD when child processes stop or stopped child
+ /// processes continue.
+ no_child_stop = implementation_defined,
+
+ /// Do not transform child processes into zombies when they terminate.
+ no_child_wait = implementation_defined,
+
+ /// Special value to indicate that the signal registration does not care
+ /// which flags are set, and so will not conflict with any prior
+ /// registrations of the same signal.
+ dont_care = -1
+ };
+
+ /// Portability typedef.
+ typedef flags flags_t;
+
+#else // defined(GENERATING_DOCUMENTATION)
+
+ enum class flags : int
+ {
+ none = 0,
+ restart = ASIO_OS_DEF(SA_RESTART),
+ no_child_stop = ASIO_OS_DEF(SA_NOCLDSTOP),
+ no_child_wait = ASIO_OS_DEF(SA_NOCLDWAIT),
+ dont_care = -1
+ };
+
+ typedef flags flags_t;
+
+#endif // defined(GENERATING_DOCUMENTATION)
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ ~signal_set_base()
+ {
+ }
+};
+
+/// Negation operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline constexpr bool operator!(signal_set_base::flags_t x)
+{
+ return static_cast<int>(x) == 0;
+}
+
+/// Bitwise and operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline constexpr signal_set_base::flags_t operator&(
+ signal_set_base::flags_t x, signal_set_base::flags_t y)
+{
+ return static_cast<signal_set_base::flags_t>(
+ static_cast<int>(x) & static_cast<int>(y));
+}
+
+/// Bitwise or operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline constexpr signal_set_base::flags_t operator|(
+ signal_set_base::flags_t x, signal_set_base::flags_t y)
+{
+ return static_cast<signal_set_base::flags_t>(
+ static_cast<int>(x) | static_cast<int>(y));
+}
+
+/// Bitwise xor operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline constexpr signal_set_base::flags_t operator^(
+ signal_set_base::flags_t x, signal_set_base::flags_t y)
+{
+ return static_cast<signal_set_base::flags_t>(
+ static_cast<int>(x) ^ static_cast<int>(y));
+}
+
+/// Bitwise negation operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline constexpr signal_set_base::flags_t operator~(
+ signal_set_base::flags_t x)
+{
+ return static_cast<signal_set_base::flags_t>(~static_cast<int>(x));
+}
+
+/// Bitwise and-assignment operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline signal_set_base::flags_t& operator&=(
+ signal_set_base::flags_t& x, signal_set_base::flags_t y)
+{
+ x = x & y;
+ return x;
+}
+
+/// Bitwise or-assignment operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline signal_set_base::flags_t& operator|=(
+ signal_set_base::flags_t& x, signal_set_base::flags_t y)
+{
+ x = x | y;
+ return x;
+}
+
+/// Bitwise xor-assignment operator.
+/**
+ * @relates signal_set_base::flags
+ */
+inline signal_set_base::flags_t& operator^=(
+ signal_set_base::flags_t& x, signal_set_base::flags_t y)
+{
+ x = x ^ y;
+ return x;
+}
+
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_SIGNAL_SET_BASE_HPP
diff --git a/3rdparty/asio/include/asio/socket_base.hpp b/3rdparty/asio/include/asio/socket_base.hpp
index e43790cc8b7..5d509790d3d 100644
--- a/3rdparty/asio/include/asio/socket_base.hpp
+++ b/3rdparty/asio/include/asio/socket_base.hpp
@@ -2,7 +2,7 @@
// socket_base.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/spawn.hpp b/3rdparty/asio/include/asio/spawn.hpp
index 780de6b7284..eeacb49de6d 100644
--- a/3rdparty/asio/include/asio/spawn.hpp
+++ b/3rdparty/asio/include/asio/spawn.hpp
@@ -2,7 +2,7 @@
// spawn.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,28 +16,162 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-#include <boost/coroutine/all.hpp>
#include "asio/any_io_executor.hpp"
-#include "asio/bind_executor.hpp"
+#include "asio/cancellation_signal.hpp"
+#include "asio/cancellation_state.hpp"
+#include "asio/detail/exception.hpp"
#include "asio/detail/memory.hpp"
#include "asio/detail/type_traits.hpp"
-#include "asio/detail/wrapped_handler.hpp"
#include "asio/io_context.hpp"
#include "asio/is_executor.hpp"
#include "asio/strand.hpp"
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+# include <boost/coroutine/all.hpp>
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+// Base class for all spawn()-ed thread implementations.
+class spawned_thread_base
+{
+public:
+ spawned_thread_base()
+ : owner_(0),
+ has_context_switched_(false),
+ throw_if_cancelled_(false),
+ terminal_(false)
+ {
+ }
+
+ virtual ~spawned_thread_base() {}
+ virtual void resume() = 0;
+ virtual void suspend_with(void (*fn)(void*), void* arg) = 0;
+ virtual void destroy() = 0;
+
+ void attach(spawned_thread_base** owner)
+ {
+ owner_ = owner;
+ *owner_ = this;
+ }
+
+ void detach()
+ {
+ if (owner_)
+ *owner_ = 0;
+ owner_ = 0;
+ }
+
+ void suspend()
+ {
+ suspend_with(0, 0);
+ }
+
+ template <typename F>
+ void suspend_with(F f)
+ {
+ suspend_with(&spawned_thread_base::call<F>, &f);
+ }
+
+ cancellation_slot get_cancellation_slot() const noexcept
+ {
+ return cancellation_state_.slot();
+ }
-/// Context object the represents the currently executing coroutine.
+ cancellation_state get_cancellation_state() const noexcept
+ {
+ return cancellation_state_;
+ }
+
+ void reset_cancellation_state()
+ {
+ cancellation_state_ = cancellation_state(parent_cancellation_slot_);
+ }
+
+ template <typename Filter>
+ void reset_cancellation_state(Filter filter)
+ {
+ cancellation_state_ = cancellation_state(
+ parent_cancellation_slot_, filter, filter);
+ }
+
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter in_filter, OutFilter out_filter)
+ {
+ cancellation_state_ = cancellation_state(
+ parent_cancellation_slot_, in_filter, out_filter);
+ }
+
+ cancellation_type_t cancelled() const noexcept
+ {
+ return cancellation_state_.cancelled();
+ }
+
+ bool has_context_switched() const noexcept
+ {
+ return has_context_switched_;
+ }
+
+ bool throw_if_cancelled() const noexcept
+ {
+ return throw_if_cancelled_;
+ }
+
+ void throw_if_cancelled(bool value) noexcept
+ {
+ throw_if_cancelled_ = value;
+ }
+
+protected:
+ spawned_thread_base** owner_; // Points to data member in active handler.
+ asio::cancellation_slot parent_cancellation_slot_;
+ asio::cancellation_state cancellation_state_;
+ bool has_context_switched_;
+ bool throw_if_cancelled_;
+ bool terminal_;
+
+private:
+ // Disallow copying and assignment.
+ spawned_thread_base(const spawned_thread_base&) = delete;
+ spawned_thread_base& operator=(const spawned_thread_base&) = delete;
+
+ template <typename F>
+ static void call(void* f)
+ {
+ (*static_cast<F*>(f))();
+ }
+};
+
+
+template <typename T>
+struct spawn_signature
+{
+ typedef void type(exception_ptr, T);
+};
+
+template <>
+struct spawn_signature<void>
+{
+ typedef void type(exception_ptr);
+};
+
+template <typename Executor>
+class initiate_spawn;
+
+} // namespace detail
+
+/// A @ref completion_token that represents the currently executing coroutine.
/**
- * The basic_yield_context class is used to represent the currently executing
- * stackful coroutine. A basic_yield_context may be passed as a handler to an
- * asynchronous operation. For example:
+ * The basic_yield_context class is a completion token type that is used to
+ * represent the currently executing stackful coroutine. A basic_yield_context
+ * object may be passed as a completion token to an asynchronous operation. For
+ * example:
*
- * @code template <typename Handler>
- * void my_coroutine(basic_yield_context<Handler> yield)
+ * @code template <typename Executor>
+ * void my_coroutine(basic_yield_context<Executor> yield)
* {
* ...
* std::size_t n = my_socket.async_read_some(buffer, yield);
@@ -48,67 +182,112 @@ namespace asio {
* current coroutine. The coroutine is resumed when the asynchronous operation
* completes, and the result of the operation is returned.
*/
-template <typename Handler>
+template <typename Executor>
class basic_yield_context
{
public:
- /// The coroutine callee type, used by the implementation.
+ /// The executor type associated with the yield context.
+ typedef Executor executor_type;
+
+ /// The cancellation slot type associated with the yield context.
+ typedef cancellation_slot cancellation_slot_type;
+
+ /// Construct a yield context from another yield context type.
/**
- * When using Boost.Coroutine v1, this type is:
- * @code typename coroutine<void()> @endcode
- * When using Boost.Coroutine v2 (unidirectional coroutines), this type is:
- * @code push_coroutine<void> @endcode
+ * Requires that OtherExecutor be convertible to Executor.
*/
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined callee_type;
-#elif defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2)
- typedef boost::coroutines::push_coroutine<void> callee_type;
-#else
- typedef boost::coroutines::coroutine<void()> callee_type;
-#endif
-
- /// The coroutine caller type, used by the implementation.
+ template <typename OtherExecutor>
+ basic_yield_context(const basic_yield_context<OtherExecutor>& other,
+ constraint_t<
+ is_convertible<OtherExecutor, Executor>::value
+ > = 0)
+ : spawned_thread_(other.spawned_thread_),
+ executor_(other.executor_),
+ ec_(other.ec_)
+ {
+ }
+
+ /// Get the executor associated with the yield context.
+ executor_type get_executor() const noexcept
+ {
+ return executor_;
+ }
+
+ /// Get the cancellation slot associated with the coroutine.
+ cancellation_slot_type get_cancellation_slot() const noexcept
+ {
+ return spawned_thread_->get_cancellation_slot();
+ }
+
+ /// Get the cancellation state associated with the coroutine.
+ cancellation_state get_cancellation_state() const noexcept
+ {
+ return spawned_thread_->get_cancellation_state();
+ }
+
+ /// Reset the cancellation state associated with the coroutine.
/**
- * When using Boost.Coroutine v1, this type is:
- * @code typename coroutine<void()>::caller_type @endcode
- * When using Boost.Coroutine v2 (unidirectional coroutines), this type is:
- * @code pull_coroutine<void> @endcode
+ * Let <tt>P</tt> be the cancellation slot associated with the current
+ * coroutine's @ref spawn completion handler. Assigns a new
+ * asio::cancellation_state object <tt>S</tt>, constructed as
+ * <tt>S(P)</tt>, into the current coroutine's cancellation state object.
*/
-#if defined(GENERATING_DOCUMENTATION)
- typedef implementation_defined caller_type;
-#elif defined(BOOST_COROUTINES_UNIDIRECT) || defined(BOOST_COROUTINES_V2)
- typedef boost::coroutines::pull_coroutine<void> caller_type;
-#else
- typedef boost::coroutines::coroutine<void()>::caller_type caller_type;
-#endif
-
- /// Construct a yield context to represent the specified coroutine.
+ void reset_cancellation_state() const
+ {
+ spawned_thread_->reset_cancellation_state();
+ }
+
+ /// Reset the cancellation state associated with the coroutine.
/**
- * Most applications do not need to use this constructor. Instead, the
- * spawn() function passes a yield context as an argument to the coroutine
- * function.
+ * Let <tt>P</tt> be the cancellation slot associated with the current
+ * coroutine's @ref spawn completion handler. Assigns a new
+ * asio::cancellation_state object <tt>S</tt>, constructed as <tt>S(P,
+ * std::forward<Filter>(filter))</tt>, into the current coroutine's
+ * cancellation state object.
*/
- basic_yield_context(
- const detail::weak_ptr<callee_type>& coro,
- caller_type& ca, Handler& handler)
- : coro_(coro),
- ca_(ca),
- handler_(handler),
- ec_(0)
+ template <typename Filter>
+ void reset_cancellation_state(Filter&& filter) const
{
+ spawned_thread_->reset_cancellation_state(
+ static_cast<Filter&&>(filter));
}
- /// Construct a yield context from another yield context type.
+ /// Reset the cancellation state associated with the coroutine.
/**
- * Requires that OtherHandler be convertible to Handler.
+ * Let <tt>P</tt> be the cancellation slot associated with the current
+ * coroutine's @ref spawn completion handler. Assigns a new
+ * asio::cancellation_state object <tt>S</tt>, constructed as <tt>S(P,
+ * std::forward<InFilter>(in_filter),
+ * std::forward<OutFilter>(out_filter))</tt>, into the current coroutine's
+ * cancellation state object.
*/
- template <typename OtherHandler>
- basic_yield_context(const basic_yield_context<OtherHandler>& other)
- : coro_(other.coro_),
- ca_(other.ca_),
- handler_(other.handler_),
- ec_(other.ec_)
+ template <typename InFilter, typename OutFilter>
+ void reset_cancellation_state(InFilter&& in_filter,
+ OutFilter&& out_filter) const
+ {
+ spawned_thread_->reset_cancellation_state(
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
+ }
+
+ /// Determine whether the current coroutine has been cancelled.
+ cancellation_type_t cancelled() const noexcept
{
+ return spawned_thread_->cancelled();
+ }
+
+ /// Determine whether the coroutine throws if trying to suspend when it has
+ /// been cancelled.
+ bool throw_if_cancelled() const noexcept
+ {
+ return spawned_thread_->throw_if_cancelled();
+ }
+
+ /// Set whether the coroutine throws if trying to suspend when it has been
+ /// cancelled.
+ void throw_if_cancelled(bool value) const noexcept
+ {
+ spawned_thread_->throw_if_cancelled(value);
}
/// Return a yield context that sets the specified error_code.
@@ -118,8 +297,8 @@ public:
* operator may be used to specify an error_code object that should instead be
* set with the asynchronous operation's result. For example:
*
- * @code template <typename Handler>
- * void my_coroutine(basic_yield_context<Handler> yield)
+ * @code template <typename Executor>
+ * void my_coroutine(basic_yield_context<Executor> yield)
* {
* ...
* std::size_t n = my_socket.async_read_some(buffer, yield[ec]);
@@ -137,22 +316,25 @@ public:
return tmp;
}
-#if defined(GENERATING_DOCUMENTATION)
-private:
-#endif // defined(GENERATING_DOCUMENTATION)
- detail::weak_ptr<callee_type> coro_;
- caller_type& ca_;
- Handler handler_;
+#if !defined(GENERATING_DOCUMENTATION)
+//private:
+ basic_yield_context(detail::spawned_thread_base* spawned_thread,
+ const Executor& ex)
+ : spawned_thread_(spawned_thread),
+ executor_(ex),
+ ec_(0)
+ {
+ }
+
+ detail::spawned_thread_base* spawned_thread_;
+ Executor executor_;
asio::error_code* ec_;
+#endif // !defined(GENERATING_DOCUMENTATION)
};
-#if defined(GENERATING_DOCUMENTATION)
-/// Context object that represents the currently executing coroutine.
-typedef basic_yield_context<unspecified> yield_context;
-#else // defined(GENERATING_DOCUMENTATION)
-typedef basic_yield_context<
- executor_binder<void(*)(), any_io_executor> > yield_context;
-#endif // defined(GENERATING_DOCUMENTATION)
+/// A @ref completion_token object that represents the currently executing
+/// coroutine.
+typedef basic_yield_context<any_io_executor> yield_context;
/**
* @defgroup spawn asio::spawn
@@ -163,7 +345,7 @@ typedef basic_yield_context<
* library. This function enables programs to implement asynchronous logic in a
* synchronous manner, as illustrated by the following example:
*
- * @code asio::spawn(my_strand, do_echo);
+ * @code asio::spawn(my_strand, do_echo, asio::detached);
*
* // ...
*
@@ -190,23 +372,363 @@ typedef basic_yield_context<
*/
/*@{*/
-/// Start a new stackful coroutine, calling the specified handler when it
-/// completes.
+/// Start a new stackful coroutine that executes on a given executor.
+/**
+ * This function is used to launch a new stackful coroutine.
+ *
+ * @param ex Identifies the executor that will run the stackful coroutine.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename Executor, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken = default_completion_token_t<Executor>>
+auto spawn(const Executor& ex, F&& function,
+ CompletionToken&& token = default_completion_token_t<Executor>(),
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ > = 0,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, static_cast<F&&>(function)));
+
+/// Start a new stackful coroutine that executes on a given execution context.
+/**
+ * This function is used to launch a new stackful coroutine.
+ *
+ * @param ctx Identifies the execution context that will run the stackful
+ * coroutine.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename ExecutionContext, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type)
+ CompletionToken = default_completion_token_t<
+ typename ExecutionContext::executor_type>>
+auto spawn(ExecutionContext& ctx, F&& function,
+ CompletionToken&& token
+ = default_completion_token_t<typename ExecutionContext::executor_type>(),
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ > = 0,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type>(
+ declval<detail::initiate_spawn<
+ typename ExecutionContext::executor_type>>(),
+ token, static_cast<F&&>(function)));
+
+/// Start a new stackful coroutine, inheriting the executor of another.
+/**
+ * This function is used to launch a new stackful coroutine.
+ *
+ * @param ctx Identifies the current coroutine as a parent of the new
+ * coroutine. This specifies that the new coroutine should inherit the executor
+ * of the parent. For example, if the parent coroutine is executing in a
+ * particular strand, then the new coroutine will execute in the same strand.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename Executor, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken = default_completion_token_t<Executor>>
+auto spawn(const basic_yield_context<Executor>& ctx, F&& function,
+ CompletionToken&& token = default_completion_token_t<Executor>(),
+#if defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ !is_same<
+ decay_t<CompletionToken>,
+ boost::coroutines::attributes
+ >::value
+ > = 0,
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, static_cast<F&&>(function)));
+
+#if defined(ASIO_HAS_BOOST_CONTEXT_FIBER) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Start a new stackful coroutine that executes on a given executor.
+/**
+ * This function is used to launch a new stackful coroutine using the
+ * specified stack allocator.
+ *
+ * @param ex Identifies the executor that will run the stackful coroutine.
+ *
+ * @param stack_allocator Denotes the allocator to be used to allocate the
+ * underlying coroutine's stack. The type must satisfy the stack-allocator
+ * concept defined by the Boost.Context library.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename Executor, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken = default_completion_token_t<Executor>>
+auto spawn(const Executor& ex, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function,
+ CompletionToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)));
+
+/// Start a new stackful coroutine that executes on a given execution context.
+/**
+ * This function is used to launch a new stackful coroutine.
+ *
+ * @param ctx Identifies the execution context that will run the stackful
+ * coroutine.
+ *
+ * @param stack_allocator Denotes the allocator to be used to allocate the
+ * underlying coroutine's stack. The type must satisfy the stack-allocator
+ * concept defined by the Boost.Context library.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename ExecutionContext, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type)
+ CompletionToken = default_completion_token_t<
+ typename ExecutionContext::executor_type>>
+auto spawn(ExecutionContext& ctx, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function,
+ CompletionToken&& token
+ = default_completion_token_t<typename ExecutionContext::executor_type>(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<
+ typename ExecutionContext::executor_type>)>>::type>(
+ declval<detail::initiate_spawn<
+ typename ExecutionContext::executor_type>>(),
+ token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)));
+
+/// Start a new stackful coroutine, inheriting the executor of another.
+/**
+ * This function is used to launch a new stackful coroutine using the
+ * specified stack allocator.
+ *
+ * @param ctx Identifies the current coroutine as a parent of the new
+ * coroutine. This specifies that the new coroutine should inherit the
+ * executor of the parent. For example, if the parent coroutine is executing
+ * in a particular strand, then the new coroutine will execute in the same
+ * strand.
+ *
+ * @param stack_allocator Denotes the allocator to be used to allocate the
+ * underlying coroutine's stack. The type must satisfy the stack-allocator
+ * concept defined by the Boost.Context library.
+ *
+ * @param function The coroutine function. The function must be callable the
+ * signature:
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ *
+ * @param token The @ref completion_token that will handle the notification
+ * that the coroutine has completed. If the return type @c R of @c function is
+ * @c void, the function signature of the completion handler must be:
+ *
+ * @code void handler(std::exception_ptr); @endcode
+ * Otherwise, the function signature of the completion handler must be:
+ * @code void handler(std::exception_ptr, R); @endcode
+ *
+ * @par Completion Signature
+ * @code void(std::exception_ptr, R) @endcode
+ * where @c R is the return type of the function object.
+ *
+ * @par Per-Operation Cancellation
+ * The new thread of execution is created with a cancellation state that
+ * supports @c cancellation_type::terminal values only. To change the
+ * cancellation state, call the basic_yield_context member function
+ * @c reset_cancellation_state.
+ */
+template <typename Executor, typename StackAllocator, typename F,
+ ASIO_COMPLETION_TOKEN_FOR(typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type)
+ CompletionToken = default_completion_token_t<Executor>>
+auto spawn(const basic_yield_context<Executor>& ctx, allocator_arg_t,
+ StackAllocator&& stack_allocator, F&& function,
+ CompletionToken&& token = default_completion_token_t<Executor>(),
+ constraint_t<
+ is_executor<Executor>::value || execution::is_executor<Executor>::value
+ > = 0)
+ -> decltype(
+ async_initiate<CompletionToken,
+ typename detail::spawn_signature<
+ result_of_t<F(basic_yield_context<Executor>)>>::type>(
+ declval<detail::initiate_spawn<Executor>>(),
+ token, allocator_arg_t(),
+ static_cast<StackAllocator&&>(stack_allocator),
+ static_cast<F&&>(function)));
+
+#endif // defined(ASIO_HAS_BOOST_CONTEXT_FIBER)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#if defined(ASIO_HAS_BOOST_COROUTINE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine, calling the specified handler when it completes.
/**
* This function is used to launch a new coroutine.
*
* @param function The coroutine function. The function must have the signature:
- * @code void function(basic_yield_context<Handler> yield); @endcode
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ * where Executor is the associated executor type of @c Function.
*
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Function>
-void spawn(ASIO_MOVE_ARG(Function) function,
+void spawn(Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes());
-/// Start a new stackful coroutine, calling the specified handler when it
-/// completes.
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine, calling the specified handler when it completes.
/**
* This function is used to launch a new coroutine.
*
@@ -216,21 +738,23 @@ void spawn(ASIO_MOVE_ARG(Function) function,
* @code void handler(); @endcode
*
* @param function The coroutine function. The function must have the signature:
- * @code void function(basic_yield_context<Handler> yield); @endcode
+ * @code void function(basic_yield_context<Executor> yield); @endcode
+ * where Executor is the associated executor type of @c Handler.
*
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Handler, typename Function>
-void spawn(ASIO_MOVE_ARG(Handler) handler,
- ASIO_MOVE_ARG(Function) function,
+void spawn(Handler&& handler, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes(),
- typename constraint<
- !is_executor<typename decay<Handler>::type>::value &&
- !execution::is_executor<typename decay<Handler>::type>::value &&
- !is_convertible<Handler&, execution_context&>::value>::type = 0);
+ constraint_t<
+ !is_executor<decay_t<Handler>>::value &&
+ !execution::is_executor<decay_t<Handler>>::value &&
+ !is_convertible<Handler&, execution_context&>::value
+ > = 0);
-/// Start a new stackful coroutine, inheriting the execution context of another.
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine, inheriting the execution context of another.
/**
* This function is used to launch a new coroutine.
*
@@ -241,22 +765,23 @@ void spawn(ASIO_MOVE_ARG(Handler) handler,
* same strand.
*
* @param function The coroutine function. The function must have the signature:
- * @code void function(basic_yield_context<Handler> yield); @endcode
+ * @code void function(basic_yield_context<Executor> yield); @endcode
*
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
-template <typename Handler, typename Function>
-void spawn(basic_yield_context<Handler> ctx,
- ASIO_MOVE_ARG(Function) function,
+template <typename Executor, typename Function>
+void spawn(basic_yield_context<Executor> ctx, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes());
-/// Start a new stackful coroutine that executes on a given executor.
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine that executes on a given executor.
/**
* This function is used to launch a new coroutine.
*
* @param ex Identifies the executor that will run the coroutine. The new
- * coroutine is implicitly given its own strand within this executor.
+ * coroutine is automatically given its own explicit strand within this
+ * executor.
*
* @param function The coroutine function. The function must have the signature:
* @code void function(yield_context yield); @endcode
@@ -264,15 +789,15 @@ void spawn(basic_yield_context<Handler> ctx,
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Function, typename Executor>
-void spawn(const Executor& ex,
- ASIO_MOVE_ARG(Function) function,
+void spawn(const Executor& ex, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes(),
- typename constraint<
+ constraint_t<
is_executor<Executor>::value || execution::is_executor<Executor>::value
- >::type = 0);
+ > = 0);
-/// Start a new stackful coroutine that executes on a given strand.
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine that executes on a given strand.
/**
* This function is used to launch a new coroutine.
*
@@ -284,14 +809,14 @@ void spawn(const Executor& ex,
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Function, typename Executor>
-void spawn(const strand<Executor>& ex,
- ASIO_MOVE_ARG(Function) function,
+void spawn(const strand<Executor>& ex, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes());
#if !defined(ASIO_NO_TS_EXECUTORS)
-/// Start a new stackful coroutine that executes in the context of a strand.
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine that executes in the context of a strand.
/**
* This function is used to launch a new coroutine.
*
@@ -305,14 +830,14 @@ void spawn(const strand<Executor>& ex,
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Function>
-void spawn(const asio::io_context::strand& s,
- ASIO_MOVE_ARG(Function) function,
+void spawn(const asio::io_context::strand& s, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes());
#endif // !defined(ASIO_NO_TS_EXECUTORS)
-/// Start a new stackful coroutine that executes on a given execution context.
+/// (Deprecated: Use overloads with a completion token.) Start a new stackful
+/// coroutine that executes on a given execution context.
/**
* This function is used to launch a new coroutine.
*
@@ -326,12 +851,15 @@ void spawn(const asio::io_context::strand& s,
* @param attributes Boost.Coroutine attributes used to customise the coroutine.
*/
template <typename Function, typename ExecutionContext>
-void spawn(ExecutionContext& ctx,
- ASIO_MOVE_ARG(Function) function,
+void spawn(ExecutionContext& ctx, Function&& function,
const boost::coroutines::attributes& attributes
= boost::coroutines::attributes(),
- typename constraint<is_convertible<
- ExecutionContext&, execution_context&>::value>::type = 0);
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0);
+
+#endif // defined(ASIO_HAS_BOOST_COROUTINE)
+ // || defined(GENERATING_DOCUMENTATION)
/*@}*/
diff --git a/3rdparty/asio/include/asio/ssl.hpp b/3rdparty/asio/include/asio/ssl.hpp
index 79764367db2..4180dab6f42 100644
--- a/3rdparty/asio/include/asio/ssl.hpp
+++ b/3rdparty/asio/include/asio/ssl.hpp
@@ -2,7 +2,7 @@
// ssl.hpp
// ~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/context.hpp b/3rdparty/asio/include/asio/ssl/context.hpp
index 7360c33cef3..a41904a4089 100644
--- a/3rdparty/asio/include/asio/ssl/context.hpp
+++ b/3rdparty/asio/include/asio/ssl/context.hpp
@@ -2,7 +2,7 @@
// ssl/context.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -46,7 +46,6 @@ public:
/// Construct to take ownership of a native handle.
ASIO_DECL explicit context(native_handle_type native_handle);
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a context from another.
/**
* This constructor moves an SSL context from one object to another.
@@ -72,7 +71,6 @@ public:
* @li As a target for move-assignment.
*/
ASIO_DECL context& operator=(context&& other);
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destructor.
ASIO_DECL ~context();
@@ -741,6 +739,9 @@ private:
// Helper function to make a BIO from a memory buffer.
ASIO_DECL BIO* make_buffer_bio(const const_buffer& b);
+ // Translate an SSL error into an error code.
+ ASIO_DECL static asio::error_code translate_error(long error);
+
// The underlying native implementation.
native_handle_type handle_;
diff --git a/3rdparty/asio/include/asio/ssl/context_base.hpp b/3rdparty/asio/include/asio/ssl/context_base.hpp
index fe7946e38ef..36271012b06 100644
--- a/3rdparty/asio/include/asio/ssl/context_base.hpp
+++ b/3rdparty/asio/include/asio/ssl/context_base.hpp
@@ -2,7 +2,7 @@
// ssl/context_base.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -105,60 +105,60 @@ public:
};
/// Bitmask type for SSL options.
- typedef long options;
+ typedef uint64_t options;
#if defined(GENERATING_DOCUMENTATION)
/// Implement various bug workarounds.
- static const long default_workarounds = implementation_defined;
+ static const uint64_t default_workarounds = implementation_defined;
/// Always create a new key when using tmp_dh parameters.
- static const long single_dh_use = implementation_defined;
+ static const uint64_t single_dh_use = implementation_defined;
/// Disable SSL v2.
- static const long no_sslv2 = implementation_defined;
+ static const uint64_t no_sslv2 = implementation_defined;
/// Disable SSL v3.
- static const long no_sslv3 = implementation_defined;
+ static const uint64_t no_sslv3 = implementation_defined;
/// Disable TLS v1.
- static const long no_tlsv1 = implementation_defined;
+ static const uint64_t no_tlsv1 = implementation_defined;
/// Disable TLS v1.1.
- static const long no_tlsv1_1 = implementation_defined;
+ static const uint64_t no_tlsv1_1 = implementation_defined;
/// Disable TLS v1.2.
- static const long no_tlsv1_2 = implementation_defined;
+ static const uint64_t no_tlsv1_2 = implementation_defined;
/// Disable TLS v1.3.
- static const long no_tlsv1_3 = implementation_defined;
+ static const uint64_t no_tlsv1_3 = implementation_defined;
/// Disable compression. Compression is disabled by default.
- static const long no_compression = implementation_defined;
+ static const uint64_t no_compression = implementation_defined;
#else
- ASIO_STATIC_CONSTANT(long, default_workarounds = SSL_OP_ALL);
- ASIO_STATIC_CONSTANT(long, single_dh_use = SSL_OP_SINGLE_DH_USE);
- ASIO_STATIC_CONSTANT(long, no_sslv2 = SSL_OP_NO_SSLv2);
- ASIO_STATIC_CONSTANT(long, no_sslv3 = SSL_OP_NO_SSLv3);
- ASIO_STATIC_CONSTANT(long, no_tlsv1 = SSL_OP_NO_TLSv1);
+ ASIO_STATIC_CONSTANT(uint64_t, default_workarounds = SSL_OP_ALL);
+ ASIO_STATIC_CONSTANT(uint64_t, single_dh_use = SSL_OP_SINGLE_DH_USE);
+ ASIO_STATIC_CONSTANT(uint64_t, no_sslv2 = SSL_OP_NO_SSLv2);
+ ASIO_STATIC_CONSTANT(uint64_t, no_sslv3 = SSL_OP_NO_SSLv3);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1 = SSL_OP_NO_TLSv1);
# if defined(SSL_OP_NO_TLSv1_1)
- ASIO_STATIC_CONSTANT(long, no_tlsv1_1 = SSL_OP_NO_TLSv1_1);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_1 = SSL_OP_NO_TLSv1_1);
# else // defined(SSL_OP_NO_TLSv1_1)
- ASIO_STATIC_CONSTANT(long, no_tlsv1_1 = 0x10000000L);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_1 = 0x10000000L);
# endif // defined(SSL_OP_NO_TLSv1_1)
# if defined(SSL_OP_NO_TLSv1_2)
- ASIO_STATIC_CONSTANT(long, no_tlsv1_2 = SSL_OP_NO_TLSv1_2);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_2 = SSL_OP_NO_TLSv1_2);
# else // defined(SSL_OP_NO_TLSv1_2)
- ASIO_STATIC_CONSTANT(long, no_tlsv1_2 = 0x08000000L);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_2 = 0x08000000L);
# endif // defined(SSL_OP_NO_TLSv1_2)
# if defined(SSL_OP_NO_TLSv1_3)
- ASIO_STATIC_CONSTANT(long, no_tlsv1_3 = SSL_OP_NO_TLSv1_3);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_3 = SSL_OP_NO_TLSv1_3);
# else // defined(SSL_OP_NO_TLSv1_3)
- ASIO_STATIC_CONSTANT(long, no_tlsv1_3 = 0x20000000L);
+ ASIO_STATIC_CONSTANT(uint64_t, no_tlsv1_3 = 0x20000000L);
# endif // defined(SSL_OP_NO_TLSv1_3)
# if defined(SSL_OP_NO_COMPRESSION)
- ASIO_STATIC_CONSTANT(long, no_compression = SSL_OP_NO_COMPRESSION);
+ ASIO_STATIC_CONSTANT(uint64_t, no_compression = SSL_OP_NO_COMPRESSION);
# else // defined(SSL_OP_NO_COMPRESSION)
- ASIO_STATIC_CONSTANT(long, no_compression = 0x20000L);
+ ASIO_STATIC_CONSTANT(uint64_t, no_compression = 0x20000L);
# endif // defined(SSL_OP_NO_COMPRESSION)
#endif
diff --git a/3rdparty/asio/include/asio/ssl/detail/buffered_handshake_op.hpp b/3rdparty/asio/include/asio/ssl/detail/buffered_handshake_op.hpp
index ee1e32d36fc..4dba7120929 100644
--- a/3rdparty/asio/include/asio/ssl/detail/buffered_handshake_op.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/buffered_handshake_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/buffered_handshake_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -29,7 +29,7 @@ template <typename ConstBufferSequence>
class buffered_handshake_op
{
public:
- static ASIO_CONSTEXPR const char* tracking_name()
+ static constexpr const char* tracking_name()
{
return "ssl::stream<>::async_buffered_handshake";
}
@@ -56,7 +56,7 @@ public:
const asio::error_code& ec,
const std::size_t& bytes_transferred) const
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler)(ec, bytes_transferred);
+ static_cast<Handler&&>(handler)(ec, bytes_transferred);
}
private:
diff --git a/3rdparty/asio/include/asio/ssl/detail/engine.hpp b/3rdparty/asio/include/asio/ssl/detail/engine.hpp
index 40799330b73..e500ca529da 100644
--- a/3rdparty/asio/include/asio/ssl/detail/engine.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/engine.hpp
@@ -2,7 +2,7 @@
// ssl/detail/engine.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -58,18 +58,17 @@ public:
// Construct a new engine for the specified context.
ASIO_DECL explicit engine(SSL_CTX* context);
-#if defined(ASIO_HAS_MOVE)
+ // Construct a new engine for an existing native SSL implementation.
+ ASIO_DECL explicit engine(SSL* ssl_impl);
+
// Move construct from another engine.
- ASIO_DECL engine(engine&& other) ASIO_NOEXCEPT;
-#endif // defined(ASIO_HAS_MOVE)
+ ASIO_DECL engine(engine&& other) noexcept;
// Destructor.
ASIO_DECL ~engine();
-#if defined(ASIO_HAS_MOVE)
// Move assign from another engine.
- ASIO_DECL engine& operator=(engine&& other) ASIO_NOEXCEPT;
-#endif // defined(ASIO_HAS_MOVE)
+ ASIO_DECL engine& operator=(engine&& other) noexcept;
// Get the underlying implementation in the native type.
ASIO_DECL SSL* native_handle();
diff --git a/3rdparty/asio/include/asio/ssl/detail/handshake_op.hpp b/3rdparty/asio/include/asio/ssl/detail/handshake_op.hpp
index 74b624fde81..53533eb7a80 100644
--- a/3rdparty/asio/include/asio/ssl/detail/handshake_op.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/handshake_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/handshake_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -28,7 +28,7 @@ namespace detail {
class handshake_op
{
public:
- static ASIO_CONSTEXPR const char* tracking_name()
+ static constexpr const char* tracking_name()
{
return "ssl::stream<>::async_handshake";
}
@@ -51,7 +51,7 @@ public:
const asio::error_code& ec,
const std::size_t&) const
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler)(ec);
+ static_cast<Handler&&>(handler)(ec);
}
private:
diff --git a/3rdparty/asio/include/asio/ssl/detail/impl/engine.ipp b/3rdparty/asio/include/asio/ssl/detail/impl/engine.ipp
index 2c047389f00..91588cd6b47 100644
--- a/3rdparty/asio/include/asio/ssl/detail/impl/engine.ipp
+++ b/3rdparty/asio/include/asio/ssl/detail/impl/engine.ipp
@@ -2,7 +2,7 @@
// ssl/detail/impl/engine.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -55,15 +55,31 @@ engine::engine(SSL_CTX* context)
::SSL_set_bio(ssl_, int_bio, int_bio);
}
-#if defined(ASIO_HAS_MOVE)
-engine::engine(engine&& other) ASIO_NOEXCEPT
+engine::engine(SSL* ssl_impl)
+ : ssl_(ssl_impl)
+{
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ accept_mutex().init();
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+
+ ::SSL_set_mode(ssl_, SSL_MODE_ENABLE_PARTIAL_WRITE);
+ ::SSL_set_mode(ssl_, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+#if defined(SSL_MODE_RELEASE_BUFFERS)
+ ::SSL_set_mode(ssl_, SSL_MODE_RELEASE_BUFFERS);
+#endif // defined(SSL_MODE_RELEASE_BUFFERS)
+
+ ::BIO* int_bio = 0;
+ ::BIO_new_bio_pair(&int_bio, 0, &ext_bio_, 0);
+ ::SSL_set_bio(ssl_, int_bio, int_bio);
+}
+
+engine::engine(engine&& other) noexcept
: ssl_(other.ssl_),
ext_bio_(other.ext_bio_)
{
other.ssl_ = 0;
other.ext_bio_ = 0;
}
-#endif // defined(ASIO_HAS_MOVE)
engine::~engine()
{
@@ -80,8 +96,7 @@ engine::~engine()
::SSL_free(ssl_);
}
-#if defined(ASIO_HAS_MOVE)
-engine& engine::operator=(engine&& other) ASIO_NOEXCEPT
+engine& engine::operator=(engine&& other) noexcept
{
if (this != &other)
{
@@ -92,7 +107,6 @@ engine& engine::operator=(engine&& other) ASIO_NOEXCEPT
}
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
SSL* engine::native_handle()
{
diff --git a/3rdparty/asio/include/asio/ssl/detail/impl/openssl_init.ipp b/3rdparty/asio/include/asio/ssl/detail/impl/openssl_init.ipp
index 2c38e03a1f0..7a10cc2aa8a 100644
--- a/3rdparty/asio/include/asio/ssl/detail/impl/openssl_init.ipp
+++ b/3rdparty/asio/include/asio/ssl/detail/impl/openssl_init.ipp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-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)
@@ -85,9 +85,13 @@ public:
#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L)
// && (OPENSSL_VERSION_NUMBER < 0x10100000L)
// && !defined(SSL_OP_NO_COMPRESSION)
-#if !defined(OPENSSL_IS_BORINGSSL) && !defined(ASIO_USE_WOLFSSL)
+#if !defined(OPENSSL_IS_BORINGSSL) \
+ && !defined(ASIO_USE_WOLFSSL) \
+ && (OPENSSL_VERSION_NUMBER < 0x30000000L)
::CONF_modules_unload(1);
-#endif // !defined(OPENSSL_IS_BORINGSSL) && !defined(ASIO_USE_WOLFSSL)
+#endif // !defined(OPENSSL_IS_BORINGSSL)
+ // && !defined(ASIO_USE_WOLFSSL)
+ // && (OPENSSL_VERSION_NUMBER < 0x30000000L)
#if !defined(OPENSSL_NO_ENGINE) \
&& (OPENSSL_VERSION_NUMBER < 0x10100000L)
::ENGINE_cleanup();
@@ -130,7 +134,7 @@ private:
// Mutexes to be used in locking callbacks.
std::vector<asio::detail::shared_ptr<
- asio::detail::mutex> > mutexes_;
+ asio::detail::mutex>> mutexes_;
#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
#if !defined(SSL_OP_NO_COMPRESSION) \
diff --git a/3rdparty/asio/include/asio/ssl/detail/io.hpp b/3rdparty/asio/include/asio/ssl/detail/io.hpp
index b8c85dc6b53..d951db593af 100644
--- a/3rdparty/asio/include/asio/ssl/detail/io.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/io.hpp
@@ -2,7 +2,7 @@
// ssl/detail/io.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -107,11 +107,10 @@ public:
start_(0),
want_(engine::want_nothing),
bytes_transferred_(0),
- handler_(ASIO_MOVE_CAST(Handler)(handler))
+ handler_(static_cast<Handler&&>(handler))
{
}
-#if defined(ASIO_HAS_MOVE)
io_op(const io_op& other)
: asio::detail::base_from_cancellation_state<Handler>(other),
next_layer_(other.next_layer_),
@@ -127,20 +126,18 @@ public:
io_op(io_op&& other)
: asio::detail::base_from_cancellation_state<Handler>(
- ASIO_MOVE_CAST(
- asio::detail::base_from_cancellation_state<Handler>)(
- other)),
+ static_cast<
+ asio::detail::base_from_cancellation_state<Handler>&&>(other)),
next_layer_(other.next_layer_),
core_(other.core_),
- op_(ASIO_MOVE_CAST(Operation)(other.op_)),
+ op_(static_cast<Operation&&>(other.op_)),
start_(other.start_),
want_(other.want_),
ec_(other.ec_),
bytes_transferred_(other.bytes_transferred_),
- handler_(ASIO_MOVE_CAST(Handler)(other.handler_))
+ handler_(static_cast<Handler&&>(other.handler_))
{
}
-#endif // defined(ASIO_HAS_MOVE)
void operator()(asio::error_code ec,
std::size_t bytes_transferred = ~std::size_t(0), int start = 0)
@@ -177,7 +174,7 @@ public:
// Start reading some data from the underlying transport.
next_layer_.async_read_some(
asio::buffer(core_.input_buffer_),
- ASIO_MOVE_CAST(io_op)(*this));
+ static_cast<io_op&&>(*this));
}
else
{
@@ -185,7 +182,7 @@ public:
__FILE__, __LINE__, Operation::tracking_name()));
// Wait until the current read operation completes.
- core_.pending_read_.async_wait(ASIO_MOVE_CAST(io_op)(*this));
+ core_.pending_read_.async_wait(static_cast<io_op&&>(*this));
}
// Yield control until asynchronous operation completes. Control
@@ -210,7 +207,7 @@ public:
// Start writing all the data to the underlying transport.
asio::async_write(next_layer_,
core_.engine_.get_output(core_.output_buffer_),
- ASIO_MOVE_CAST(io_op)(*this));
+ static_cast<io_op&&>(*this));
}
else
{
@@ -218,7 +215,7 @@ public:
__FILE__, __LINE__, Operation::tracking_name()));
// Wait until the current write operation completes.
- core_.pending_write_.async_wait(ASIO_MOVE_CAST(io_op)(*this));
+ core_.pending_write_.async_wait(static_cast<io_op&&>(*this));
}
// Yield control until asynchronous operation completes. Control
@@ -239,7 +236,7 @@ public:
next_layer_.async_read_some(
asio::buffer(core_.input_buffer_, 0),
- ASIO_MOVE_CAST(io_op)(*this));
+ static_cast<io_op&&>(*this));
// Yield control until asynchronous operation completes. Control
// resumes at the "default:" label below.
@@ -331,32 +328,6 @@ public:
};
template <typename Stream, typename Operation, typename Handler>
-inline asio_handler_allocate_is_deprecated
-asio_handler_allocate(std::size_t size,
- io_op<Stream, Operation, Handler>* this_handler)
-{
-#if defined(ASIO_NO_DEPRECATED)
- asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
- return asio_handler_allocate_is_no_longer_used();
-#else // defined(ASIO_NO_DEPRECATED)
- return asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Stream, typename Operation, typename Handler>
-inline asio_handler_deallocate_is_deprecated
-asio_handler_deallocate(void* pointer, std::size_t size,
- io_op<Stream, Operation, Handler>* this_handler)
-{
- asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_deallocate_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Stream, typename Operation, typename Handler>
inline bool asio_handler_is_continuation(
io_op<Stream, Operation, Handler>* this_handler)
{
@@ -364,32 +335,6 @@ inline bool asio_handler_is_continuation(
: asio_handler_cont_helpers::is_continuation(this_handler->handler_);
}
-template <typename Function, typename Stream,
- typename Operation, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(Function& function,
- io_op<Stream, Operation, Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
-template <typename Function, typename Stream,
- typename Operation, typename Handler>
-inline asio_handler_invoke_is_deprecated
-asio_handler_invoke(const Function& function,
- io_op<Stream, Operation, Handler>* this_handler)
-{
- asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
-#if defined(ASIO_NO_DEPRECATED)
- return asio_handler_invoke_is_no_longer_used();
-#endif // defined(ASIO_NO_DEPRECATED)
-}
-
template <typename Stream, typename Operation, typename Handler>
inline void async_io(Stream& next_layer, stream_core& core,
const Operation& op, Handler& handler)
@@ -411,8 +356,14 @@ struct associator<Associator,
: Associator<Handler, DefaultCandidate>
{
static typename Associator<Handler, DefaultCandidate>::type get(
- const ssl::detail::io_op<Stream, Operation, Handler>& h,
- const DefaultCandidate& c = DefaultCandidate()) ASIO_NOEXCEPT
+ const ssl::detail::io_op<Stream, Operation, Handler>& h) noexcept
+ {
+ return Associator<Handler, DefaultCandidate>::get(h.handler_);
+ }
+
+ static auto get(const ssl::detail::io_op<Stream, Operation, Handler>& h,
+ const DefaultCandidate& c) noexcept
+ -> decltype(Associator<Handler, DefaultCandidate>::get(h.handler_, c))
{
return Associator<Handler, DefaultCandidate>::get(h.handler_, c);
}
diff --git a/3rdparty/asio/include/asio/ssl/detail/openssl_init.hpp b/3rdparty/asio/include/asio/ssl/detail/openssl_init.hpp
index 8921bb64137..c66d9d62692 100644
--- a/3rdparty/asio/include/asio/ssl/detail/openssl_init.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/openssl_init.hpp
@@ -2,7 +2,7 @@
// ssl/detail/openssl_init.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/detail/openssl_types.hpp b/3rdparty/asio/include/asio/ssl/detail/openssl_types.hpp
index 0b1b8f90b1d..25f080f1e8e 100644
--- a/3rdparty/asio/include/asio/ssl/detail/openssl_types.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/openssl_types.hpp
@@ -2,7 +2,7 @@
// ssl/detail/openssl_types.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/detail/password_callback.hpp b/3rdparty/asio/include/asio/ssl/detail/password_callback.hpp
index 0e5e39824ef..03ac7db0f06 100644
--- a/3rdparty/asio/include/asio/ssl/detail/password_callback.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/password_callback.hpp
@@ -2,7 +2,7 @@
// ssl/detail/password_callback.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/detail/read_op.hpp b/3rdparty/asio/include/asio/ssl/detail/read_op.hpp
index fb2cf62f84a..5cb4249556f 100644
--- a/3rdparty/asio/include/asio/ssl/detail/read_op.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/read_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/read_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -30,7 +30,7 @@ template <typename MutableBufferSequence>
class read_op
{
public:
- static ASIO_CONSTEXPR const char* tracking_name()
+ static constexpr const char* tracking_name()
{
return "ssl::stream<>::async_read_some";
}
@@ -56,7 +56,7 @@ public:
const asio::error_code& ec,
const std::size_t& bytes_transferred) const
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler)(ec, bytes_transferred);
+ static_cast<Handler&&>(handler)(ec, bytes_transferred);
}
private:
diff --git a/3rdparty/asio/include/asio/ssl/detail/shutdown_op.hpp b/3rdparty/asio/include/asio/ssl/detail/shutdown_op.hpp
index 2a8927db357..1f6b91e17c1 100644
--- a/3rdparty/asio/include/asio/ssl/detail/shutdown_op.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/shutdown_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/shutdown_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -28,7 +28,7 @@ namespace detail {
class shutdown_op
{
public:
- static ASIO_CONSTEXPR const char* tracking_name()
+ static constexpr const char* tracking_name()
{
return "ssl::stream<>::async_shutdown";
}
@@ -51,11 +51,11 @@ public:
// The engine only generates an eof when the shutdown notification has
// been received from the peer. This indicates that the shutdown has
// completed successfully, and thus need not be passed on to the handler.
- ASIO_MOVE_OR_LVALUE(Handler)(handler)(asio::error_code());
+ static_cast<Handler&&>(handler)(asio::error_code());
}
else
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler)(ec);
+ static_cast<Handler&&>(handler)(ec);
}
}
};
diff --git a/3rdparty/asio/include/asio/ssl/detail/stream_core.hpp b/3rdparty/asio/include/asio/ssl/detail/stream_core.hpp
index 27b77cf11f2..0ec763d4a2b 100644
--- a/3rdparty/asio/include/asio/ssl/detail/stream_core.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/stream_core.hpp
@@ -2,7 +2,7 @@
// ssl/detail/stream_core.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -51,30 +51,43 @@ struct stream_core
pending_write_.expires_at(neg_infin());
}
-#if defined(ASIO_HAS_MOVE)
+ template <typename Executor>
+ stream_core(SSL* ssl_impl, const Executor& ex)
+ : engine_(ssl_impl),
+ pending_read_(ex),
+ pending_write_(ex),
+ output_buffer_space_(max_tls_record_size),
+ output_buffer_(asio::buffer(output_buffer_space_)),
+ input_buffer_space_(max_tls_record_size),
+ input_buffer_(asio::buffer(input_buffer_space_))
+ {
+ pending_read_.expires_at(neg_infin());
+ pending_write_.expires_at(neg_infin());
+ }
+
stream_core(stream_core&& other)
- : engine_(ASIO_MOVE_CAST(engine)(other.engine_)),
+ : engine_(static_cast<engine&&>(other.engine_)),
#if defined(ASIO_HAS_BOOST_DATE_TIME)
pending_read_(
- ASIO_MOVE_CAST(asio::deadline_timer)(
+ static_cast<asio::deadline_timer&&>(
other.pending_read_)),
pending_write_(
- ASIO_MOVE_CAST(asio::deadline_timer)(
+ static_cast<asio::deadline_timer&&>(
other.pending_write_)),
#else // defined(ASIO_HAS_BOOST_DATE_TIME)
pending_read_(
- ASIO_MOVE_CAST(asio::steady_timer)(
+ static_cast<asio::steady_timer&&>(
other.pending_read_)),
pending_write_(
- ASIO_MOVE_CAST(asio::steady_timer)(
+ static_cast<asio::steady_timer&&>(
other.pending_write_)),
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
output_buffer_space_(
- ASIO_MOVE_CAST(std::vector<unsigned char>)(
+ static_cast<std::vector<unsigned char>&&>(
other.output_buffer_space_)),
output_buffer_(other.output_buffer_),
input_buffer_space_(
- ASIO_MOVE_CAST(std::vector<unsigned char>)(
+ static_cast<std::vector<unsigned char>&&>(
other.input_buffer_space_)),
input_buffer_(other.input_buffer_),
input_(other.input_)
@@ -83,40 +96,39 @@ struct stream_core
other.input_buffer_ = asio::mutable_buffer(0, 0);
other.input_ = asio::const_buffer(0, 0);
}
-#endif // defined(ASIO_HAS_MOVE)
~stream_core()
{
}
-#if defined(ASIO_HAS_MOVE)
stream_core& operator=(stream_core&& other)
{
if (this != &other)
{
- engine_ = ASIO_MOVE_CAST(engine)(other.engine_);
+ engine_ = static_cast<engine&&>(other.engine_);
#if defined(ASIO_HAS_BOOST_DATE_TIME)
pending_read_ =
- ASIO_MOVE_CAST(asio::deadline_timer)(
+ static_cast<asio::deadline_timer&&>(
other.pending_read_);
pending_write_ =
- ASIO_MOVE_CAST(asio::deadline_timer)(
+ static_cast<asio::deadline_timer&&>(
other.pending_write_);
#else // defined(ASIO_HAS_BOOST_DATE_TIME)
pending_read_ =
- ASIO_MOVE_CAST(asio::steady_timer)(
+ static_cast<asio::steady_timer&&>(
other.pending_read_);
pending_write_ =
- ASIO_MOVE_CAST(asio::steady_timer)(
+ static_cast<asio::steady_timer&&>(
other.pending_write_);
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
output_buffer_space_ =
- ASIO_MOVE_CAST(std::vector<unsigned char>)(
+ static_cast<std::vector<unsigned char>&&>(
other.output_buffer_space_);
output_buffer_ = other.output_buffer_;
input_buffer_space_ =
- ASIO_MOVE_CAST(std::vector<unsigned char>)(
+ static_cast<std::vector<unsigned char>&&>(
other.input_buffer_space_);
+ input_buffer_ = other.input_buffer_;
input_ = other.input_;
other.output_buffer_ = asio::mutable_buffer(0, 0);
other.input_buffer_ = asio::mutable_buffer(0, 0);
@@ -124,7 +136,6 @@ struct stream_core
}
return *this;
}
-#endif // defined(ASIO_HAS_MOVE)
// The SSL engine.
engine engine_;
diff --git a/3rdparty/asio/include/asio/ssl/detail/verify_callback.hpp b/3rdparty/asio/include/asio/ssl/detail/verify_callback.hpp
index 7f13fe49536..54169c9e6b8 100644
--- a/3rdparty/asio/include/asio/ssl/detail/verify_callback.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/verify_callback.hpp
@@ -1,8 +1,8 @@
//
// ssl/detail/verify_callback.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/detail/write_op.hpp b/3rdparty/asio/include/asio/ssl/detail/write_op.hpp
index 407995b4fad..edcbcad5850 100644
--- a/3rdparty/asio/include/asio/ssl/detail/write_op.hpp
+++ b/3rdparty/asio/include/asio/ssl/detail/write_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -30,7 +30,7 @@ template <typename ConstBufferSequence>
class write_op
{
public:
- static ASIO_CONSTEXPR const char* tracking_name()
+ static constexpr const char* tracking_name()
{
return "ssl::stream<>::async_write_some";
}
@@ -60,7 +60,7 @@ public:
const asio::error_code& ec,
const std::size_t& bytes_transferred) const
{
- ASIO_MOVE_OR_LVALUE(Handler)(handler)(ec, bytes_transferred);
+ static_cast<Handler&&>(handler)(ec, bytes_transferred);
}
private:
diff --git a/3rdparty/asio/include/asio/ssl/error.hpp b/3rdparty/asio/include/asio/ssl/error.hpp
index f1d1801cde4..e126f52c1c7 100644
--- a/3rdparty/asio/include/asio/ssl/error.hpp
+++ b/3rdparty/asio/include/asio/ssl/error.hpp
@@ -2,7 +2,7 @@
// ssl/error.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -77,7 +77,6 @@ static const asio::error_category&
} // namespace ssl
} // namespace asio
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
namespace std {
template<> struct is_error_code_enum<asio::error::ssl_errors>
@@ -91,7 +90,6 @@ template<> struct is_error_code_enum<asio::ssl::error::stream_errors>
};
} // namespace std
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
namespace asio {
namespace error {
diff --git a/3rdparty/asio/include/asio/ssl/host_name_verification.hpp b/3rdparty/asio/include/asio/ssl/host_name_verification.hpp
index 0aabac54893..adb6ac8c0f7 100644
--- a/3rdparty/asio/include/asio/ssl/host_name_verification.hpp
+++ b/3rdparty/asio/include/asio/ssl/host_name_verification.hpp
@@ -2,7 +2,7 @@
// ssl/host_name_verification.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/impl/context.hpp b/3rdparty/asio/include/asio/ssl/impl/context.hpp
index 1734e7bd262..2324a9880aa 100644
--- a/3rdparty/asio/include/asio/ssl/impl/context.hpp
+++ b/3rdparty/asio/include/asio/ssl/impl/context.hpp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-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)
diff --git a/3rdparty/asio/include/asio/ssl/impl/context.ipp b/3rdparty/asio/include/asio/ssl/impl/context.ipp
index 56f8d7d2775..8711048b9a7 100644
--- a/3rdparty/asio/include/asio/ssl/impl/context.ipp
+++ b/3rdparty/asio/include/asio/ssl/impl/context.ipp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-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)
@@ -47,6 +47,7 @@ struct context::evp_pkey_cleanup
~evp_pkey_cleanup() { if (p) ::EVP_PKEY_free(p); }
};
+#if (OPENSSL_VERSION_NUMBER < 0x30000000L)
struct context::rsa_cleanup
{
RSA* p;
@@ -58,6 +59,7 @@ struct context::dh_cleanup
DH* p;
~dh_cleanup() { if (p) ::DH_free(p); }
};
+#endif // (OPENSSL_VERSION_NUMBER < 0x30000000L)
context::context(context::method m)
: handle_(0)
@@ -357,9 +359,7 @@ context::context(context::method m)
if (handle_ == 0)
{
- asio::error_code ec(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ asio::error_code ec = translate_error(::ERR_get_error());
asio::detail::throw_error(ec, "context");
}
@@ -376,7 +376,6 @@ context::context(context::native_handle_type native_handle)
}
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
context::context(context&& other)
{
handle_ = other.handle_;
@@ -385,12 +384,11 @@ context::context(context&& other)
context& context::operator=(context&& other)
{
- context tmp(ASIO_MOVE_CAST(context)(*this));
+ context tmp(static_cast<context&&>(*this));
handle_ = other.handle_;
other.handle_ = 0;
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
context::~context()
{
@@ -545,9 +543,7 @@ ASIO_SYNC_OP_VOID context::load_verify_file(
if (::SSL_CTX_load_verify_locations(handle_, filename.c_str(), 0) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -582,17 +578,13 @@ ASIO_SYNC_OP_VOID context::add_certificate_authority(
&& ERR_GET_REASON(err) == PEM_R_NO_START_LINE)
break;
- ec = asio::error_code(
- static_cast<int>(err),
- asio::error::get_ssl_category());
+ ec = translate_error(err);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
if (::X509_STORE_add_cert(store, cert.p) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
}
@@ -617,9 +609,7 @@ ASIO_SYNC_OP_VOID context::set_default_verify_paths(
if (::SSL_CTX_set_default_verify_paths(handle_) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -641,9 +631,7 @@ ASIO_SYNC_OP_VOID context::add_verify_path(
if (::SSL_CTX_load_verify_locations(handle_, 0, path.c_str()) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -697,9 +685,7 @@ ASIO_SYNC_OP_VOID context::use_certificate(
ASIO_SYNC_OP_VOID_RETURN(ec);
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -735,9 +721,7 @@ ASIO_SYNC_OP_VOID context::use_certificate_file(
if (::SSL_CTX_use_certificate_file(handle_, filename.c_str(), file_type) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -776,17 +760,14 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain(
cb_userdata) };
if (!cert.p)
{
- ec = asio::error_code(ERR_R_PEM_LIB,
- asio::error::get_ssl_category());
+ ec = translate_error(ERR_R_PEM_LIB);
ASIO_SYNC_OP_VOID_RETURN(ec);
}
int result = ::SSL_CTX_use_certificate(handle_, cert.p);
if (result == 0 || ::ERR_peek_error() != 0)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -809,9 +790,7 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain(
{
if (!::SSL_CTX_add_extra_chain_cert(handle_, cacert))
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
}
@@ -826,9 +805,7 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain(
}
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -846,9 +823,7 @@ ASIO_SYNC_OP_VOID context::use_certificate_chain_file(
if (::SSL_CTX_use_certificate_chain_file(handle_, filename.c_str()) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -912,9 +887,7 @@ ASIO_SYNC_OP_VOID context::use_private_key(
}
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -944,16 +917,51 @@ ASIO_SYNC_OP_VOID context::use_rsa_private_key(
&& (!defined(LIBRESSL_VERSION_NUMBER) \
|| LIBRESSL_VERSION_NUMBER >= 0x2070000fL)) \
|| defined(ASIO_USE_WOLFSSL)
- pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
- void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+ pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- pem_password_cb* callback = handle_->default_passwd_callback;
- void* cb_userdata = handle_->default_passwd_callback_userdata;
+ pem_password_cb* callback = handle_->default_passwd_callback;
+ void* cb_userdata = handle_->default_passwd_callback_userdata;
#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
bio_cleanup bio = { make_buffer_bio(private_key) };
if (bio.p)
{
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ evp_pkey_cleanup evp_private_key = { 0 };
+ switch (format)
+ {
+ case context_base::asn1:
+ evp_private_key.p = ::d2i_PrivateKey_bio(bio.p, 0);
+ break;
+ case context_base::pem:
+ evp_private_key.p = ::PEM_read_bio_PrivateKey(
+ bio.p, 0, callback,
+ cb_userdata);
+ break;
+ default:
+ {
+ ec = asio::error::invalid_argument;
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ if (evp_private_key.p)
+ {
+ if (::EVP_PKEY_is_a(evp_private_key.p, "RSA") == 0)
+ {
+ ec = translate_error(
+ ERR_PACK(ERR_LIB_EVP, 0, EVP_R_EXPECTING_AN_RSA_KEY));
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ if (::SSL_CTX_use_PrivateKey(handle_, evp_private_key.p) == 1)
+ {
+ ec = asio::error_code();
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+#else // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
rsa_cleanup rsa_private_key = { 0 };
switch (format)
{
@@ -980,11 +988,10 @@ ASIO_SYNC_OP_VOID context::use_rsa_private_key(
ASIO_SYNC_OP_VOID_RETURN(ec);
}
}
+#endif // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1012,9 +1019,7 @@ ASIO_SYNC_OP_VOID context::use_private_key_file(
if (::SSL_CTX_use_PrivateKey_file(handle_, filename.c_str(), file_type) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1034,6 +1039,53 @@ ASIO_SYNC_OP_VOID context::use_rsa_private_key_file(
const std::string& filename, context::file_format format,
asio::error_code& ec)
{
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ ::ERR_clear_error();
+
+ pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+
+ bio_cleanup bio = { ::BIO_new_file(filename.c_str(), "r") };
+ if (bio.p)
+ {
+ evp_pkey_cleanup evp_private_key = { 0 };
+ switch (format)
+ {
+ case context_base::asn1:
+ evp_private_key.p = ::d2i_PrivateKey_bio(bio.p, 0);
+ break;
+ case context_base::pem:
+ evp_private_key.p = ::PEM_read_bio_PrivateKey(
+ bio.p, 0, callback,
+ cb_userdata);
+ break;
+ default:
+ {
+ ec = asio::error::invalid_argument;
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ if (evp_private_key.p)
+ {
+ if (::EVP_PKEY_is_a(evp_private_key.p, "RSA") == 0)
+ {
+ ec = translate_error(
+ ERR_PACK(ERR_LIB_EVP, 0, EVP_R_EXPECTING_AN_RSA_KEY));
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ if (::SSL_CTX_use_PrivateKey(handle_, evp_private_key.p) == 1)
+ {
+ ec = asio::error_code();
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+ }
+
+ ec = translate_error(::ERR_get_error());
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+#else // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
int file_type;
switch (format)
{
@@ -1055,14 +1107,13 @@ ASIO_SYNC_OP_VOID context::use_rsa_private_key_file(
if (::SSL_CTX_use_RSAPrivateKey_file(
handle_, filename.c_str(), file_type) != 1)
{
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
ec = asio::error_code();
ASIO_SYNC_OP_VOID_RETURN(ec);
+#endif // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
}
void context::use_tmp_dh(const const_buffer& dh)
@@ -1083,9 +1134,7 @@ ASIO_SYNC_OP_VOID context::use_tmp_dh(
return do_use_tmp_dh(bio.p, ec);
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1107,9 +1156,7 @@ ASIO_SYNC_OP_VOID context::use_tmp_dh_file(
return do_use_tmp_dh(bio.p, ec);
}
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1118,6 +1165,19 @@ ASIO_SYNC_OP_VOID context::do_use_tmp_dh(
{
::ERR_clear_error();
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ EVP_PKEY* p = ::PEM_read_bio_Parameters(bio, 0);
+ if (p)
+ {
+ if (::SSL_CTX_set0_tmp_dh_pkey(handle_, p) == 1)
+ {
+ ec = asio::error_code();
+ ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ else
+ ::EVP_PKEY_free(p);
+ }
+#else // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
dh_cleanup dh = { ::PEM_read_bio_DHparams(bio, 0, 0, 0) };
if (dh.p)
{
@@ -1127,10 +1187,9 @@ ASIO_SYNC_OP_VOID context::do_use_tmp_dh(
ASIO_SYNC_OP_VOID_RETURN(ec);
}
}
+#endif // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
- ec = asio::error_code(
- static_cast<int>(::ERR_get_error()),
- asio::error::get_ssl_category());
+ ec = translate_error(::ERR_get_error());
ASIO_SYNC_OP_VOID_RETURN(ec);
}
@@ -1237,6 +1296,21 @@ BIO* context::make_buffer_bio(const const_buffer& b)
static_cast<int>(b.size()));
}
+asio::error_code context::translate_error(long error)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ if (ERR_SYSTEM_ERROR(error))
+ {
+ return asio::error_code(
+ static_cast<int>(ERR_GET_REASON(error)),
+ asio::error::get_system_category());
+ }
+#endif // (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+
+ return asio::error_code(static_cast<int>(error),
+ asio::error::get_ssl_category());
+}
+
} // namespace ssl
} // namespace asio
diff --git a/3rdparty/asio/include/asio/ssl/impl/error.ipp b/3rdparty/asio/include/asio/ssl/impl/error.ipp
index dbc1fa0a084..7ff6e8a7359 100644
--- a/3rdparty/asio/include/asio/ssl/impl/error.ipp
+++ b/3rdparty/asio/include/asio/ssl/impl/error.ipp
@@ -2,7 +2,7 @@
// ssl/impl/error.ipp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -28,15 +28,37 @@ namespace detail {
class ssl_category : public asio::error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.ssl";
}
std::string message(int value) const
{
- const char* s = ::ERR_reason_error_string(value);
- return s ? s : "asio.ssl error";
+ const char* reason = ::ERR_reason_error_string(value);
+ if (reason)
+ {
+ const char* lib = ::ERR_lib_error_string(value);
+#if (OPENSSL_VERSION_NUMBER < 0x30000000L)
+ const char* func = ::ERR_func_error_string(value);
+#else // (OPENSSL_VERSION_NUMBER < 0x30000000L)
+ const char* func = 0;
+#endif // (OPENSSL_VERSION_NUMBER < 0x30000000L)
+ std::string result(reason);
+ if (lib || func)
+ {
+ result += " (";
+ if (lib)
+ result += lib;
+ if (lib && func)
+ result += ", ";
+ if (func)
+ result += func;
+ result += ")";
+ }
+ return result;
+ }
+ return "asio.ssl error";
}
};
@@ -66,7 +88,7 @@ namespace detail {
class stream_category : public asio::error_category
{
public:
- const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT
+ const char* name() const noexcept
{
return "asio.ssl.stream";
}
diff --git a/3rdparty/asio/include/asio/ssl/impl/host_name_verification.ipp b/3rdparty/asio/include/asio/ssl/impl/host_name_verification.ipp
index adfcbdcc7e4..198d1f3989c 100644
--- a/3rdparty/asio/include/asio/ssl/impl/host_name_verification.ipp
+++ b/3rdparty/asio/include/asio/ssl/impl/host_name_verification.ipp
@@ -2,7 +2,7 @@
// ssl/impl/host_name_verification.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/impl/rfc2818_verification.ipp b/3rdparty/asio/include/asio/ssl/impl/rfc2818_verification.ipp
index 9e198e76060..93e161daa85 100644
--- a/3rdparty/asio/include/asio/ssl/impl/rfc2818_verification.ipp
+++ b/3rdparty/asio/include/asio/ssl/impl/rfc2818_verification.ipp
@@ -2,7 +2,7 @@
// ssl/impl/rfc2818_verification.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/impl/src.hpp b/3rdparty/asio/include/asio/ssl/impl/src.hpp
index 4be197132e1..5ffb95fdcd6 100644
--- a/3rdparty/asio/include/asio/ssl/impl/src.hpp
+++ b/3rdparty/asio/include/asio/ssl/impl/src.hpp
@@ -2,7 +2,7 @@
// impl/ssl/src.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/rfc2818_verification.hpp b/3rdparty/asio/include/asio/ssl/rfc2818_verification.hpp
index c5a9b9ea59c..db2831045d9 100644
--- a/3rdparty/asio/include/asio/ssl/rfc2818_verification.hpp
+++ b/3rdparty/asio/include/asio/ssl/rfc2818_verification.hpp
@@ -2,7 +2,7 @@
// ssl/rfc2818_verification.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/stream.hpp b/3rdparty/asio/include/asio/ssl/stream.hpp
index 616be7b806f..befcc287e7f 100644
--- a/3rdparty/asio/include/asio/ssl/stream.hpp
+++ b/3rdparty/asio/include/asio/ssl/stream.hpp
@@ -2,7 +2,7 @@
// ssl/stream.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,6 +18,7 @@
#include "asio/detail/config.hpp"
#include "asio/async_result.hpp"
+#include "asio/buffer.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/non_const_lvalue.hpp"
@@ -54,7 +55,7 @@ namespace ssl {
* @code
* asio::io_context my_context;
* asio::ssl::context ctx(asio::ssl::context::sslv23);
- * asio::ssl::stream<asio:ip::tcp::socket> sock(my_context, ctx);
+ * asio::ssl::stream<asio::ip::tcp::socket> sock(my_context, ctx);
* @endcode
*
* @par Concepts:
@@ -65,6 +66,13 @@ class stream :
public stream_base,
private noncopyable
{
+private:
+ class initiate_async_handshake;
+ class initiate_async_buffered_handshake;
+ class initiate_async_shutdown;
+ class initiate_async_write_some;
+ class initiate_async_read_some;
+
public:
/// The native handle type of the SSL stream.
typedef SSL* native_handle_type;
@@ -76,7 +84,7 @@ public:
};
/// The type of the next layer.
- typedef typename remove_reference<Stream>::type next_layer_type;
+ typedef remove_reference_t<Stream> next_layer_type;
/// The type of the lowest layer.
typedef typename next_layer_type::lowest_layer_type lowest_layer_type;
@@ -84,7 +92,6 @@ public:
/// The type of the executor associated with the object.
typedef typename lowest_layer_type::executor_type executor_type;
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Construct a stream.
/**
* This constructor creates a stream and initialises the underlying stream
@@ -96,20 +103,28 @@ public:
*/
template <typename Arg>
stream(Arg&& arg, context& ctx)
- : next_layer_(ASIO_MOVE_CAST(Arg)(arg)),
+ : next_layer_(static_cast<Arg&&>(arg)),
core_(ctx.native_handle(), next_layer_.lowest_layer().get_executor())
{
}
-#else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Construct a stream from an existing native implementation.
+ /**
+ * This constructor creates a stream and initialises the underlying stream
+ * object. On success, ownership of the native implementation is transferred
+ * to the stream, and it will be cleaned up when the stream is destroyed.
+ *
+ * @param arg The argument to be passed to initialise the underlying stream.
+ *
+ * @param handle An existing native SSL implementation.
+ */
template <typename Arg>
- stream(Arg& arg, context& ctx)
- : next_layer_(arg),
- core_(ctx.native_handle(), next_layer_.lowest_layer().get_executor())
+ stream(Arg&& arg, native_handle_type handle)
+ : next_layer_(static_cast<Arg&&>(arg)),
+ core_(handle, next_layer_.lowest_layer().get_executor())
{
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a stream from another.
/**
* @param other The other stream object from which the move will occur. Must
@@ -118,8 +133,8 @@ public:
* operation is destruction, or use as the target of a move assignment.
*/
stream(stream&& other)
- : next_layer_(ASIO_MOVE_CAST(Stream)(other.next_layer_)),
- core_(ASIO_MOVE_CAST(detail::stream_core)(other.core_))
+ : next_layer_(static_cast<Stream&&>(other.next_layer_)),
+ core_(static_cast<detail::stream_core&&>(other.core_))
{
}
@@ -134,12 +149,11 @@ public:
{
if (this != &other)
{
- next_layer_ = ASIO_MOVE_CAST(Stream)(other.next_layer_);
- core_ = ASIO_MOVE_CAST(detail::stream_core)(other.core_);
+ next_layer_ = static_cast<Stream&&>(other.next_layer_);
+ core_ = static_cast<detail::stream_core&&>(other.core_);
}
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destructor.
/**
@@ -157,7 +171,7 @@ public:
*
* @return A copy of the executor that stream will use to dispatch handlers.
*/
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return next_layer_.lowest_layer().get_executor();
}
@@ -173,7 +187,7 @@ public:
* suitable for passing to functions such as @c SSL_get_verify_result and
* @c SSL_get_peer_certificate:
* @code
- * asio::ssl::stream<asio:ip::tcp::socket> sock(my_context, ctx);
+ * asio::ssl::stream<asio::ip::tcp::socket> sock(io_ctx, ctx);
*
* // ... establish connection and perform handshake ...
*
@@ -450,17 +464,27 @@ public:
/// Start an asynchronous SSL handshake.
/**
* This function is used to asynchronously perform an SSL handshake on the
- * stream. This function call always returns immediately.
+ * stream. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param type The type of handshaking to be performed, i.e. as a client or as
* a server.
*
- * @param handler The handler to be called when the handshake operation
- * completes. Copies will be made of the handler as required. The equivalent
- * function signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the handshake completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error // Result of operation.
* ); @endcode
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
*
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
@@ -475,23 +499,24 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
- HandshakeHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(HandshakeHandler,
- void (asio::error_code))
- async_handshake(handshake_type type,
- ASIO_MOVE_ARG(HandshakeHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
- {
- return async_initiate<HandshakeHandler,
+ HandshakeToken = default_completion_token_t<executor_type>>
+ auto async_handshake(handshake_type type,
+ HandshakeToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<HandshakeToken,
+ void (asio::error_code)>(
+ declval<initiate_async_handshake>(), token, type))
+ {
+ return async_initiate<HandshakeToken,
void (asio::error_code)>(
- initiate_async_handshake(this), handler, type);
+ initiate_async_handshake(this), token, type);
}
/// Start an asynchronous SSL handshake.
/**
* This function is used to asynchronously perform an SSL handshake on the
- * stream. This function call always returns immediately.
+ * stream. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param type The type of handshaking to be performed, i.e. as a client or as
* a server.
@@ -499,15 +524,24 @@ public:
* @param buffers The buffered data to be reused for the handshake. Although
* the buffers object may be copied as necessary, ownership of the underlying
* buffers is retained by the caller, which must guarantee that they remain
- * valid until the handler is called.
+ * valid until the completion handler is called.
*
- * @param handler The handler to be called when the handshake operation
- * completes. Copies will be made of the handler as required. The equivalent
- * function signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the handshake completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
* std::size_t bytes_transferred // Amount of buffers used in handshake.
* ); @endcode
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
@@ -522,17 +556,22 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) BufferedHandshakeHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(BufferedHandshakeHandler,
- void (asio::error_code, std::size_t))
- async_handshake(handshake_type type, const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(BufferedHandshakeHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
- {
- return async_initiate<BufferedHandshakeHandler,
+ std::size_t)) BufferedHandshakeToken
+ = default_completion_token_t<executor_type>>
+ auto async_handshake(handshake_type type, const ConstBufferSequence& buffers,
+ BufferedHandshakeToken&& token
+ = default_completion_token_t<executor_type>(),
+ constraint_t<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ > = 0)
+ -> decltype(
+ async_initiate<BufferedHandshakeToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_buffered_handshake>(), token, type, buffers))
+ {
+ return async_initiate<BufferedHandshakeToken,
void (asio::error_code, std::size_t)>(
- initiate_async_buffered_handshake(this), handler, type, buffers);
+ initiate_async_buffered_handshake(this), token, type, buffers);
}
/// Shut down SSL on the stream.
@@ -564,15 +603,25 @@ public:
/// Asynchronously shut down SSL on the stream.
/**
- * This function is used to asynchronously shut down SSL on the stream. This
- * function call always returns immediately.
- *
- * @param handler The handler to be called when the handshake operation
- * completes. Copies will be made of the handler as required. The equivalent
- * function signature of the handler must be:
+ * This function is used to asynchronously shut down SSL on the stream. It is
+ * an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the shutdown completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error // Result of operation.
* ); @endcode
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
*
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
@@ -587,17 +636,18 @@ public:
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
- ShutdownHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ShutdownHandler,
- void (asio::error_code))
- async_shutdown(
- ASIO_MOVE_ARG(ShutdownHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
- {
- return async_initiate<ShutdownHandler,
+ ShutdownToken
+ = default_completion_token_t<executor_type>>
+ auto async_shutdown(
+ ShutdownToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ShutdownToken,
+ void (asio::error_code)>(
+ declval<initiate_async_shutdown>(), token))
+ {
+ return async_initiate<ShutdownToken,
void (asio::error_code)>(
- initiate_async_shutdown(this), handler);
+ initiate_async_shutdown(this), token);
}
/// Write some data to the stream.
@@ -652,20 +702,30 @@ public:
/// Start an asynchronous write.
/**
* This function is used to asynchronously write one or more bytes of data to
- * the stream. The function call always returns immediately.
+ * the stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers The data to be written to the stream. Although the buffers
* object may be copied as necessary, ownership of the underlying buffers is
* retained by the caller, which must guarantee that they remain valid until
- * the handler is called.
+ * the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The equivalent function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_write_some operation may not transmit all of the data to
* the peer. Consider using the @ref async_write function if you need to
@@ -685,17 +745,17 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
- {
- return async_initiate<WriteHandler,
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some>(), token, buffers))
+ {
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_write_some(this), handler, buffers);
+ initiate_async_write_some(this), token, buffers);
}
/// Read some data from the stream.
@@ -750,20 +810,30 @@ public:
/// Start an asynchronous read.
/**
* This function is used to asynchronously read one or more bytes of data from
- * the stream. The function call always returns immediately.
+ * the stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
* @param buffers The buffers into which the data will be read. Although the
* buffers object may be copied as necessary, ownership of the underlying
* buffers is retained by the caller, which must guarantee that they remain
- * valid until the handler is called.
+ * valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The equivalent function
- * signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
*
* @note The async_read_some operation may not read all of the requested
* number of bytes. Consider using the @ref async_read function if you need to
@@ -783,17 +853,17 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
- {
- return async_initiate<ReadHandler,
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
+ {
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_read_some(this), handler, buffers);
+ initiate_async_read_some(this), token, buffers);
}
private:
@@ -807,13 +877,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return self_->get_executor();
}
template <typename HandshakeHandler>
- void operator()(ASIO_MOVE_ARG(HandshakeHandler) handler,
+ void operator()(HandshakeHandler&& handler,
handshake_type type) const
{
// If you get an error on the following line it means that your handler
@@ -839,13 +909,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return self_->get_executor();
}
template <typename BufferedHandshakeHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(BufferedHandshakeHandler) handler,
+ void operator()(BufferedHandshakeHandler&& handler,
handshake_type type, const ConstBufferSequence& buffers) const
{
// If you get an error on the following line it means that your
@@ -875,13 +945,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ShutdownHandler>
- void operator()(ASIO_MOVE_ARG(ShutdownHandler) handler) const
+ void operator()(ShutdownHandler&& handler) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a ShutdownHandler.
@@ -906,13 +976,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
const ConstBufferSequence& buffers) const
{
// If you get an error on the following line it means that your handler
@@ -938,13 +1008,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ executor_type get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
const MutableBufferSequence& buffers) const
{
// If you get an error on the following line it means that your handler
diff --git a/3rdparty/asio/include/asio/ssl/stream_base.hpp b/3rdparty/asio/include/asio/ssl/stream_base.hpp
index 41b7df3c851..2728ec8ca1b 100644
--- a/3rdparty/asio/include/asio/ssl/stream_base.hpp
+++ b/3rdparty/asio/include/asio/ssl/stream_base.hpp
@@ -2,7 +2,7 @@
// ssl/stream_base.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/verify_context.hpp b/3rdparty/asio/include/asio/ssl/verify_context.hpp
index dbfcf1be491..7251856f08e 100644
--- a/3rdparty/asio/include/asio/ssl/verify_context.hpp
+++ b/3rdparty/asio/include/asio/ssl/verify_context.hpp
@@ -2,7 +2,7 @@
// ssl/verify_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ssl/verify_mode.hpp b/3rdparty/asio/include/asio/ssl/verify_mode.hpp
index 241bd65eaca..919e308c8a4 100644
--- a/3rdparty/asio/include/asio/ssl/verify_mode.hpp
+++ b/3rdparty/asio/include/asio/ssl/verify_mode.hpp
@@ -2,7 +2,7 @@
// ssl/verify_mode.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/static_thread_pool.hpp b/3rdparty/asio/include/asio/static_thread_pool.hpp
index 0b611266d9b..636afe1cee5 100644
--- a/3rdparty/asio/include/asio/static_thread_pool.hpp
+++ b/3rdparty/asio/include/asio/static_thread_pool.hpp
@@ -2,7 +2,7 @@
// static_thread_pool.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/steady_timer.hpp b/3rdparty/asio/include/asio/steady_timer.hpp
index 17a72446d92..5db00250b71 100644
--- a/3rdparty/asio/include/asio/steady_timer.hpp
+++ b/3rdparty/asio/include/asio/steady_timer.hpp
@@ -2,7 +2,7 @@
// steady_timer.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#include "asio/basic_waitable_timer.hpp"
#include "asio/detail/chrono.hpp"
@@ -37,6 +34,4 @@ typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
} // namespace asio
-#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#endif // ASIO_STEADY_TIMER_HPP
diff --git a/3rdparty/asio/include/asio/strand.hpp b/3rdparty/asio/include/asio/strand.hpp
index 52b2314df56..c63592b8649 100644
--- a/3rdparty/asio/include/asio/strand.hpp
+++ b/3rdparty/asio/include/asio/strand.hpp
@@ -2,7 +2,7 @@
// strand.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -48,20 +48,20 @@ public:
/// Construct a strand for the specified executor.
template <typename Executor1>
explicit strand(const Executor1& e,
- typename constraint<
- conditional<
+ constraint_t<
+ conditional_t<
!is_same<Executor1, strand>::value,
is_convertible<Executor1, Executor>,
false_type
- >::type::value
- >::type = 0)
+ >::value
+ > = 0)
: executor_(e),
impl_(strand::create_implementation(executor_))
{
}
/// Copy constructor.
- strand(const strand& other) ASIO_NOEXCEPT
+ strand(const strand& other) noexcept
: executor_(other.executor_),
impl_(other.impl_)
{
@@ -74,14 +74,14 @@ public:
*/
template <class OtherExecutor>
strand(
- const strand<OtherExecutor>& other) ASIO_NOEXCEPT
+ const strand<OtherExecutor>& other) noexcept
: executor_(other.executor_),
impl_(other.impl_)
{
}
/// Assignment operator.
- strand& operator=(const strand& other) ASIO_NOEXCEPT
+ strand& operator=(const strand& other) noexcept
{
executor_ = other.executor_;
impl_ = other.impl_;
@@ -95,18 +95,17 @@ public:
*/
template <class OtherExecutor>
strand& operator=(
- const strand<OtherExecutor>& other) ASIO_NOEXCEPT
+ const strand<OtherExecutor>& other) noexcept
{
executor_ = other.executor_;
impl_ = other.impl_;
return *this;
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
- strand(strand&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(Executor)(other.executor_)),
- impl_(ASIO_MOVE_CAST(implementation_type)(other.impl_))
+ strand(strand&& other) noexcept
+ : executor_(static_cast<Executor&&>(other.executor_)),
+ impl_(static_cast<implementation_type&&>(other.impl_))
{
}
@@ -116,17 +115,17 @@ public:
* to @c Executor.
*/
template <class OtherExecutor>
- strand(strand<OtherExecutor>&& other) ASIO_NOEXCEPT
- : executor_(ASIO_MOVE_CAST(OtherExecutor)(other.executor_)),
- impl_(ASIO_MOVE_CAST(implementation_type)(other.impl_))
+ strand(strand<OtherExecutor>&& other) noexcept
+ : executor_(static_cast<OtherExecutor&&>(other.executor_)),
+ impl_(static_cast<implementation_type&&>(other.impl_))
{
}
/// Move assignment operator.
- strand& operator=(strand&& other) ASIO_NOEXCEPT
+ strand& operator=(strand&& other) noexcept
{
- executor_ = ASIO_MOVE_CAST(Executor)(other.executor_);
- impl_ = ASIO_MOVE_CAST(implementation_type)(other.impl_);
+ executor_ = static_cast<Executor&&>(other.executor_);
+ impl_ = static_cast<implementation_type&&>(other.impl_);
return *this;
}
@@ -136,21 +135,20 @@ public:
* convertible to @c Executor.
*/
template <class OtherExecutor>
- strand& operator=(strand<OtherExecutor>&& other) ASIO_NOEXCEPT
+ strand& operator=(strand<OtherExecutor>&& other) noexcept
{
- executor_ = ASIO_MOVE_CAST(OtherExecutor)(other.executor_);
- impl_ = ASIO_MOVE_CAST(implementation_type)(other.impl_);
+ executor_ = static_cast<OtherExecutor&&>(other.executor_);
+ impl_ = static_cast<implementation_type&&>(other.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destructor.
- ~strand() ASIO_NOEXCEPT
+ ~strand() noexcept
{
}
/// Obtain the underlying executor.
- inner_executor_type get_inner_executor() const ASIO_NOEXCEPT
+ inner_executor_type get_inner_executor() const noexcept
{
return executor_;
}
@@ -167,16 +165,15 @@ public:
* ... @endcode
*/
template <typename Property>
- typename constraint<
+ constraint_t<
can_query<const Executor&, Property>::value,
- typename conditional<
+ conditional_t<
is_convertible<Property, execution::blocking_t>::value,
execution::blocking_t,
- typename query_result<const Executor&, Property>::type
- >::type
- >::type query(const Property& p) const
- ASIO_NOEXCEPT_IF((
- is_nothrow_query<const Executor&, Property>::value))
+ query_result_t<const Executor&, Property>
+ >
+ > query(const Property& p) const
+ noexcept(is_nothrow_query<const Executor&, Property>::value)
{
return this->query_helper(
is_convertible<Property, execution::blocking_t>(), p);
@@ -193,19 +190,15 @@ public:
* asio::execution::blocking.never); @endcode
*/
template <typename Property>
- typename constraint<
+ constraint_t<
can_require<const Executor&, Property>::value
&& !is_convertible<Property, execution::blocking_t::always_t>::value,
- strand<typename decay<
- typename require_result<const Executor&, Property>::type
- >::type>
- >::type require(const Property& p) const
- ASIO_NOEXCEPT_IF((
- is_nothrow_require<const Executor&, Property>::value))
+ strand<decay_t<require_result_t<const Executor&, Property>>>
+ > require(const Property& p) const
+ noexcept(is_nothrow_require<const Executor&, Property>::value)
{
- return strand<typename decay<
- typename require_result<const Executor&, Property>::type
- >::type>(asio::require(executor_, p), impl_);
+ return strand<decay_t<require_result_t<const Executor&, Property>>>(
+ asio::require(executor_, p), impl_);
}
/// Forward a preference to the underlying executor.
@@ -219,24 +212,20 @@ public:
* asio::execution::blocking.never); @endcode
*/
template <typename Property>
- typename constraint<
+ constraint_t<
can_prefer<const Executor&, Property>::value
&& !is_convertible<Property, execution::blocking_t::always_t>::value,
- strand<typename decay<
- typename prefer_result<const Executor&, Property>::type
- >::type>
- >::type prefer(const Property& p) const
- ASIO_NOEXCEPT_IF((
- is_nothrow_prefer<const Executor&, Property>::value))
+ strand<decay_t<prefer_result_t<const Executor&, Property>>>
+ > prefer(const Property& p) const
+ noexcept(is_nothrow_prefer<const Executor&, Property>::value)
{
- return strand<typename decay<
- typename prefer_result<const Executor&, Property>::type
- >::type>(asio::prefer(executor_, p), impl_);
+ return strand<decay_t<prefer_result_t<const Executor&, Property>>>(
+ asio::prefer(executor_, p), impl_);
}
#if !defined(ASIO_NO_TS_EXECUTORS)
/// Obtain the underlying execution context.
- execution_context& context() const ASIO_NOEXCEPT
+ execution_context& context() const noexcept
{
return executor_.context();
}
@@ -245,7 +234,7 @@ public:
/**
* The strand delegates this call to its underlying executor.
*/
- void on_work_started() const ASIO_NOEXCEPT
+ void on_work_started() const noexcept
{
executor_.on_work_started();
}
@@ -254,7 +243,7 @@ public:
/**
* The strand delegates this call to its underlying executor.
*/
- void on_work_finished() const ASIO_NOEXCEPT
+ void on_work_finished() const noexcept
{
executor_.on_work_finished();
}
@@ -262,13 +251,6 @@ public:
/// Request the strand to invoke the given function object.
/**
- * Do not call this function directly. It is intended for use with the
- * execution::execute customisation point.
- *
- * For example:
- * @code asio::strand<my_executor_type> ex = ...;
- * execution::execute(ex, my_function_object); @endcode
- *
* This function is used to ask the strand to execute the given function
* object on its underlying executor. The function object will be executed
* according to the properties of the underlying executor.
@@ -278,13 +260,13 @@ public:
* function object must be: @code void function(); @endcode
*/
template <typename Function>
- typename constraint<
- execution::can_execute<const Executor&, Function>::value,
+ constraint_t<
+ traits::execute_member<const Executor&, Function>::is_valid,
void
- >::type execute(ASIO_MOVE_ARG(Function) f) const
+ > execute(Function&& f) const
{
detail::strand_executor_service::execute(impl_,
- executor_, ASIO_MOVE_CAST(Function)(f));
+ executor_, static_cast<Function&&>(f));
}
#if !defined(ASIO_NO_TS_EXECUTORS)
@@ -304,10 +286,10 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void dispatch(ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+ void dispatch(Function&& f, const Allocator& a) const
{
detail::strand_executor_service::dispatch(impl_,
- executor_, ASIO_MOVE_CAST(Function)(f), a);
+ executor_, static_cast<Function&&>(f), a);
}
/// Request the strand to invoke the given function object.
@@ -324,10 +306,10 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void post(ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+ void post(Function&& f, const Allocator& a) const
{
detail::strand_executor_service::post(impl_,
- executor_, ASIO_MOVE_CAST(Function)(f), a);
+ executor_, static_cast<Function&&>(f), a);
}
/// Request the strand to invoke the given function object.
@@ -344,10 +326,10 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename Allocator>
- void defer(ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+ void defer(Function&& f, const Allocator& a) const
{
detail::strand_executor_service::defer(impl_,
- executor_, ASIO_MOVE_CAST(Function)(f), a);
+ executor_, static_cast<Function&&>(f), a);
}
#endif // !defined(ASIO_NO_TS_EXECUTORS)
@@ -357,7 +339,7 @@ public:
* submitted to the strand using post(), dispatch() or defer(). Otherwise
* returns @c false.
*/
- bool running_in_this_thread() const ASIO_NOEXCEPT
+ bool running_in_this_thread() const noexcept
{
return detail::strand_executor_service::running_in_this_thread(impl_);
}
@@ -367,7 +349,7 @@ public:
* Two strands are equal if they refer to the same ordered, non-concurrent
* state.
*/
- friend bool operator==(const strand& a, const strand& b) ASIO_NOEXCEPT
+ friend bool operator==(const strand& a, const strand& b) noexcept
{
return a.impl_ == b.impl_;
}
@@ -377,7 +359,7 @@ public:
* Two strands are equal if they refer to the same ordered, non-concurrent
* state.
*/
- friend bool operator!=(const strand& a, const strand& b) ASIO_NOEXCEPT
+ friend bool operator!=(const strand& a, const strand& b) noexcept
{
return a.impl_ != b.impl_;
}
@@ -390,9 +372,9 @@ private:
template <typename InnerExecutor>
static implementation_type create_implementation(const InnerExecutor& ex,
- typename constraint<
+ constraint_t<
can_query<InnerExecutor, execution::context_t>::value
- >::type = 0)
+ > = 0)
{
return use_service<detail::strand_executor_service>(
asio::query(ex, execution::context)).create_implementation();
@@ -400,9 +382,9 @@ private:
template <typename InnerExecutor>
static implementation_type create_implementation(const InnerExecutor& ex,
- typename constraint<
+ constraint_t<
!can_query<InnerExecutor, execution::context_t>::value
- >::type = 0)
+ > = 0)
{
return use_service<detail::strand_executor_service>(
ex.context()).create_implementation();
@@ -415,7 +397,7 @@ private:
}
template <typename Property>
- typename query_result<const Executor&, Property>::type query_helper(
+ query_result_t<const Executor&, Property> query_helper(
false_type, const Property& property) const
{
return asio::query(executor_, property);
@@ -441,22 +423,33 @@ private:
/*@{*/
/// Create a @ref strand object for an executor.
+/**
+ * @param ex An executor.
+ *
+ * @returns A strand constructed with the specified executor.
+ */
template <typename Executor>
inline strand<Executor> make_strand(const Executor& ex,
- typename constraint<
+ constraint_t<
is_executor<Executor>::value || execution::is_executor<Executor>::value
- >::type = 0)
+ > = 0)
{
return strand<Executor>(ex);
}
/// Create a @ref strand object for an execution context.
+/**
+ * @param ctx An execution context, from which an executor will be obtained.
+ *
+ * @returns A strand constructed with the execution context's executor, obtained
+ * by performing <tt>ctx.get_executor()</tt>.
+ */
template <typename ExecutionContext>
inline strand<typename ExecutionContext::executor_type>
make_strand(ExecutionContext& ctx,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
{
return strand<typename ExecutionContext::executor_type>(ctx.get_executor());
}
@@ -470,10 +463,10 @@ namespace traits {
#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
template <typename Executor>
-struct equality_comparable<strand<Executor> >
+struct equality_comparable<strand<Executor>>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -482,12 +475,12 @@ struct equality_comparable<strand<Executor> >
template <typename Executor, typename Function>
struct execute_member<strand<Executor>, Function,
- typename enable_if<
- execution::can_execute<const Executor&, Function>::value
- >::type>
+ enable_if_t<
+ traits::execute_member<const Executor&, Function>::is_valid
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
@@ -497,17 +490,16 @@ struct execute_member<strand<Executor>, Function,
template <typename Executor, typename Property>
struct query_member<strand<Executor>, Property,
- typename enable_if<
+ enable_if_t<
can_query<const Executor&, Property>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_query<Executor, Property>::value));
- typedef typename conditional<
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_query<Executor, Property>::value;
+ typedef conditional_t<
is_convertible<Property, execution::blocking_t>::value,
- execution::blocking_t, typename query_result<Executor, Property>::type
- >::type result_type;
+ execution::blocking_t, query_result_t<Executor, Property>> result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
@@ -516,17 +508,15 @@ struct query_member<strand<Executor>, Property,
template <typename Executor, typename Property>
struct require_member<strand<Executor>, Property,
- typename enable_if<
+ enable_if_t<
can_require<const Executor&, Property>::value
&& !is_convertible<Property, execution::blocking_t::always_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_require<Executor, Property>::value));
- typedef strand<typename decay<
- typename require_result<Executor, Property>::type
- >::type> result_type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_require<Executor, Property>::value;
+ typedef strand<decay_t<require_result_t<Executor, Property>>> result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
@@ -535,17 +525,15 @@ struct require_member<strand<Executor>, Property,
template <typename Executor, typename Property>
struct prefer_member<strand<Executor>, Property,
- typename enable_if<
+ enable_if_t<
can_prefer<const Executor&, Property>::value
&& !is_convertible<Property, execution::blocking_t::always_t>::value
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- (is_nothrow_prefer<Executor, Property>::value));
- typedef strand<typename decay<
- typename prefer_result<Executor, Property>::type
- >::type> result_type;
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept =
+ is_nothrow_prefer<Executor, Property>::value;
+ typedef strand<decay_t<prefer_result_t<Executor, Property>>> result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
diff --git a/3rdparty/asio/include/asio/stream_file.hpp b/3rdparty/asio/include/asio/stream_file.hpp
new file mode 100644
index 00000000000..ef059a987e5
--- /dev/null
+++ b/3rdparty/asio/include/asio/stream_file.hpp
@@ -0,0 +1,35 @@
+//
+// stream_file.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 ASIO_STREAM_FILE_HPP
+#define ASIO_STREAM_FILE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_FILE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_stream_file.hpp"
+
+namespace asio {
+
+/// Typedef for the typical usage of a stream-oriented file.
+typedef basic_stream_file<> stream_file;
+
+} // namespace asio
+
+#endif // defined(ASIO_HAS_FILE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_STREAM_FILE_HPP
diff --git a/3rdparty/asio/include/asio/streambuf.hpp b/3rdparty/asio/include/asio/streambuf.hpp
index 4b7995e5480..d7745245cb8 100644
--- a/3rdparty/asio/include/asio/streambuf.hpp
+++ b/3rdparty/asio/include/asio/streambuf.hpp
@@ -2,7 +2,7 @@
// streambuf.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/system_context.hpp b/3rdparty/asio/include/asio/system_context.hpp
index 6611ab7ee08..132ce615677 100644
--- a/3rdparty/asio/include/asio/system_context.hpp
+++ b/3rdparty/asio/include/asio/system_context.hpp
@@ -2,7 +2,7 @@
// system_context.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -43,13 +43,13 @@ public:
ASIO_DECL ~system_context();
/// Obtain an executor for the context.
- executor_type get_executor() ASIO_NOEXCEPT;
+ executor_type get_executor() noexcept;
/// Signal all threads in the system thread pool to stop.
ASIO_DECL void stop();
/// Determine whether the system thread pool has been stopped.
- ASIO_DECL bool stopped() const ASIO_NOEXCEPT;
+ ASIO_DECL bool stopped() const noexcept;
/// Join all threads in the system thread pool.
ASIO_DECL void join();
diff --git a/3rdparty/asio/include/asio/system_error.hpp b/3rdparty/asio/include/asio/system_error.hpp
index 3fb2d14db20..d7f932627bd 100644
--- a/3rdparty/asio/include/asio/system_error.hpp
+++ b/3rdparty/asio/include/asio/system_error.hpp
@@ -2,7 +2,7 @@
// system_error.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,114 +16,14 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
-# include <system_error>
-#else // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-# include <cerrno>
-# include <exception>
-# include <string>
-# include "asio/error_code.hpp"
-# include "asio/detail/scoped_ptr.hpp"
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
+#include <system_error>
#include "asio/detail/push_options.hpp"
namespace asio {
-#if defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
typedef std::system_error system_error;
-#else // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
-/// The system_error class is used to represent system conditions that
-/// prevent the library from operating correctly.
-class system_error
- : public std::exception
-{
-public:
- /// Construct with an error code.
- system_error(const error_code& ec)
- : code_(ec),
- context_()
- {
- }
-
- /// Construct with an error code and context.
- system_error(const error_code& ec, const std::string& context)
- : code_(ec),
- context_(context)
- {
- }
-
- /// Copy constructor.
- system_error(const system_error& other)
- : std::exception(other),
- code_(other.code_),
- context_(other.context_),
- what_()
- {
- }
-
- /// Destructor.
- virtual ~system_error() throw ()
- {
- }
-
- /// Assignment operator.
- system_error& operator=(const system_error& e)
- {
- context_ = e.context_;
- code_ = e.code_;
- what_.reset();
- return *this;
- }
-
- /// Get a string representation of the exception.
- virtual const char* what() const throw ()
- {
-#if !defined(ASIO_NO_EXCEPTIONS)
- try
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- {
- if (!what_.get())
- {
- std::string tmp(context_);
- if (tmp.length())
- tmp += ": ";
- tmp += code_.message();
- what_.reset(new std::string(tmp));
- }
- return what_->c_str();
- }
-#if !defined(ASIO_NO_EXCEPTIONS)
- catch (std::exception&)
- {
- return "system_error";
- }
-#endif // !defined(ASIO_NO_EXCEPTIONS)
- }
-
- /// Get the error code associated with the exception.
- error_code code() const
- {
- return code_;
- }
-
-private:
- // The code associated with the error.
- error_code code_;
-
- // The context associated with the error.
- std::string context_;
-
- // The string representation of the error.
- mutable asio::detail::scoped_ptr<std::string> what_;
-};
-
-#endif // defined(ASIO_HAS_STD_SYSTEM_ERROR)
-
} // namespace asio
#include "asio/detail/pop_options.hpp"
diff --git a/3rdparty/asio/include/asio/system_executor.hpp b/3rdparty/asio/include/asio/system_executor.hpp
index 84025f0d519..19b6d30e322 100644
--- a/3rdparty/asio/include/asio/system_executor.hpp
+++ b/3rdparty/asio/include/asio/system_executor.hpp
@@ -2,7 +2,7 @@
// system_executor.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -39,7 +39,7 @@ class basic_system_executor
{
public:
/// Default constructor.
- basic_system_executor() ASIO_NOEXCEPT
+ basic_system_executor() noexcept
: allocator_(Allocator())
{
}
@@ -168,11 +168,11 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::allocator); @endcode
*/
- basic_system_executor<Blocking, Relationship, std::allocator<void> >
+ basic_system_executor<Blocking, Relationship, std::allocator<void>>
require(execution::allocator_t<void>) const
{
return basic_system_executor<Blocking,
- Relationship, std::allocator<void> >();
+ Relationship, std::allocator<void>>();
}
#if !defined(GENERATING_DOCUMENTATION)
@@ -195,8 +195,8 @@ private:
* == asio::execution::mapping.thread)
* ... @endcode
*/
- static ASIO_CONSTEXPR execution::mapping_t query(
- execution::mapping_t) ASIO_NOEXCEPT
+ static constexpr execution::mapping_t query(
+ execution::mapping_t) noexcept
{
return execution::mapping.thread;
}
@@ -211,7 +211,7 @@ private:
* asio::system_context& pool = asio::query(
* ex, asio::execution::context); @endcode
*/
- static system_context& query(execution::context_t) ASIO_NOEXCEPT;
+ static system_context& query(execution::context_t) noexcept;
/// Query the current value of the @c blocking property.
/**
@@ -224,8 +224,8 @@ private:
* == asio::execution::blocking.always)
* ... @endcode
*/
- static ASIO_CONSTEXPR execution::blocking_t query(
- execution::blocking_t) ASIO_NOEXCEPT
+ static constexpr execution::blocking_t query(
+ execution::blocking_t) noexcept
{
return Blocking();
}
@@ -241,8 +241,8 @@ private:
* == asio::execution::relationship.continuation)
* ... @endcode
*/
- static ASIO_CONSTEXPR execution::relationship_t query(
- execution::relationship_t) ASIO_NOEXCEPT
+ static constexpr execution::relationship_t query(
+ execution::relationship_t) noexcept
{
return Relationship();
}
@@ -258,8 +258,8 @@ private:
* asio::execution::allocator); @endcode
*/
template <typename OtherAllocator>
- ASIO_CONSTEXPR Allocator query(
- execution::allocator_t<OtherAllocator>) const ASIO_NOEXCEPT
+ constexpr Allocator query(
+ execution::allocator_t<OtherAllocator>) const noexcept
{
return allocator_;
}
@@ -274,8 +274,8 @@ private:
* auto alloc = asio::query(ex,
* asio::execution::allocator); @endcode
*/
- ASIO_CONSTEXPR Allocator query(
- execution::allocator_t<void>) const ASIO_NOEXCEPT
+ constexpr Allocator query(
+ execution::allocator_t<void>) const noexcept
{
return allocator_;
}
@@ -291,7 +291,7 @@ private:
* std::size_t occupancy = asio::query(
* ex, asio::execution::occupancy); @endcode
*/
- std::size_t query(execution::occupancy_t) const ASIO_NOEXCEPT;
+ std::size_t query(execution::occupancy_t) const noexcept;
public:
/// Compare two executors for equality.
@@ -299,7 +299,7 @@ public:
* Two executors are equal if they refer to the same underlying io_context.
*/
friend bool operator==(const basic_system_executor&,
- const basic_system_executor&) ASIO_NOEXCEPT
+ const basic_system_executor&) noexcept
{
return true;
}
@@ -309,41 +309,28 @@ public:
* Two executors are equal if they refer to the same underlying io_context.
*/
friend bool operator!=(const basic_system_executor&,
- const basic_system_executor&) ASIO_NOEXCEPT
+ const basic_system_executor&) noexcept
{
return false;
}
-#if !defined(GENERATING_DOCUMENTATION)
-private:
- friend struct asio_execution_execute_fn::impl;
-#endif // !defined(GENERATING_DOCUMENTATION)
-
/// Execution function.
- /**
- * Do not call this function directly. It is intended for use with the
- * execution::execute customisation point.
- *
- * For example:
- * @code asio::system_executor ex;
- * execution::execute(ex, my_function_object); @endcode
- */
template <typename Function>
- void execute(ASIO_MOVE_ARG(Function) f) const
+ void execute(Function&& f) const
{
- this->do_execute(ASIO_MOVE_CAST(Function)(f), Blocking());
+ this->do_execute(static_cast<Function&&>(f), Blocking());
}
#if !defined(ASIO_NO_TS_EXECUTORS)
public:
/// Obtain the underlying execution context.
- system_context& context() const ASIO_NOEXCEPT;
+ system_context& context() const noexcept;
/// Inform the executor that it has some outstanding work to do.
/**
* For the system executor, this is a no-op.
*/
- void on_work_started() const ASIO_NOEXCEPT
+ void on_work_started() const noexcept
{
}
@@ -351,7 +338,7 @@ public:
/**
* For the system executor, this is a no-op.
*/
- void on_work_finished() const ASIO_NOEXCEPT
+ void on_work_finished() const noexcept
{
}
@@ -368,7 +355,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename OtherAllocator>
- void dispatch(ASIO_MOVE_ARG(Function) f, const OtherAllocator& a) const;
+ void dispatch(Function&& f, const OtherAllocator& a) const;
/// Request the system executor to invoke the given function object.
/**
@@ -384,7 +371,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename OtherAllocator>
- void post(ASIO_MOVE_ARG(Function) f, const OtherAllocator& a) const;
+ void post(Function&& f, const OtherAllocator& a) const;
/// Request the system executor to invoke the given function object.
/**
@@ -400,7 +387,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename OtherAllocator>
- void defer(ASIO_MOVE_ARG(Function) f, const OtherAllocator& a) const;
+ void defer(Function&& f, const OtherAllocator& a) const;
#endif // !defined(ASIO_NO_TS_EXECUTORS)
private:
@@ -414,17 +401,17 @@ private:
/// Execution helper implementation for the possibly blocking property.
template <typename Function>
- void do_execute(ASIO_MOVE_ARG(Function) f,
+ void do_execute(Function&& f,
execution::blocking_t::possibly_t) const;
/// Execution helper implementation for the always blocking property.
template <typename Function>
- void do_execute(ASIO_MOVE_ARG(Function) f,
+ void do_execute(Function&& f,
execution::blocking_t::always_t) const;
/// Execution helper implementation for the never blocking property.
template <typename Function>
- void do_execute(ASIO_MOVE_ARG(Function) f,
+ void do_execute(Function&& f,
execution::blocking_t::never_t) const;
// The allocator used for execution functions.
@@ -441,7 +428,7 @@ private:
* immediately.
*/
typedef basic_system_executor<execution::blocking_t::possibly_t,
- execution::relationship_t::fork_t, std::allocator<void> >
+ execution::relationship_t::fork_t, std::allocator<void>>
system_executor;
#if !defined(GENERATING_DOCUMENTATION)
@@ -455,8 +442,8 @@ struct equality_comparable<
asio::basic_system_executor<Blocking, Relationship, Allocator>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -470,8 +457,8 @@ struct execute_member<
Function
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
@@ -485,8 +472,8 @@ struct require_member<
asio::execution::blocking_t::possibly_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::basic_system_executor<
asio::execution::blocking_t::possibly_t,
Relationship, Allocator> result_type;
@@ -498,8 +485,8 @@ struct require_member<
asio::execution::blocking_t::always_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::basic_system_executor<
asio::execution::blocking_t::always_t,
Relationship, Allocator> result_type;
@@ -511,8 +498,8 @@ struct require_member<
asio::execution::blocking_t::never_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::basic_system_executor<
asio::execution::blocking_t::never_t,
Relationship, Allocator> result_type;
@@ -524,8 +511,8 @@ struct require_member<
asio::execution::relationship_t::fork_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::basic_system_executor<Blocking,
asio::execution::relationship_t::fork_t,
Allocator> result_type;
@@ -537,8 +524,8 @@ struct require_member<
asio::execution::relationship_t::continuation_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::basic_system_executor<Blocking,
asio::execution::relationship_t::continuation_t,
Allocator> result_type;
@@ -550,10 +537,10 @@ struct require_member<
asio::execution::allocator_t<void>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::basic_system_executor<Blocking,
- Relationship, std::allocator<void> > result_type;
+ Relationship, std::allocator<void>> result_type;
};
template <typename Blocking, typename Relationship,
@@ -563,8 +550,8 @@ struct require_member<
asio::execution::allocator_t<OtherAllocator>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::basic_system_executor<Blocking,
Relationship, OtherAllocator> result_type;
};
@@ -586,11 +573,11 @@ struct query_static_constexpr_member<
>::type
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::execution::mapping_t::thread_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return result_type();
}
@@ -613,8 +600,8 @@ struct query_member<
>::type
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::execution::blocking_t result_type;
};
@@ -631,8 +618,8 @@ struct query_member<
>::type
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::execution::relationship_t result_type;
};
@@ -642,8 +629,8 @@ struct query_member<
asio::execution::context_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::system_context& result_type;
};
@@ -653,8 +640,8 @@ struct query_member<
asio::execution::allocator_t<void>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Allocator result_type;
};
@@ -664,8 +651,8 @@ struct query_member<
asio::execution::allocator_t<Allocator>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Allocator result_type;
};
diff --git a/3rdparty/asio/include/asio/system_timer.hpp b/3rdparty/asio/include/asio/system_timer.hpp
index 75425ebad55..7b5e768032f 100644
--- a/3rdparty/asio/include/asio/system_timer.hpp
+++ b/3rdparty/asio/include/asio/system_timer.hpp
@@ -2,7 +2,7 @@
// system_timer.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,9 +16,6 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#include "asio/basic_waitable_timer.hpp"
#include "asio/detail/chrono.hpp"
@@ -37,6 +34,4 @@ typedef basic_waitable_timer<chrono::system_clock> system_timer;
} // namespace asio
-#endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
-
#endif // ASIO_SYSTEM_TIMER_HPP
diff --git a/3rdparty/asio/include/asio/this_coro.hpp b/3rdparty/asio/include/asio/this_coro.hpp
index 6db27174649..37381b92abf 100644
--- a/3rdparty/asio/include/asio/this_coro.hpp
+++ b/3rdparty/asio/include/asio/this_coro.hpp
@@ -2,7 +2,7 @@
// this_coro.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -26,22 +26,18 @@ namespace this_coro {
/// Awaitable type that returns the executor of the current coroutine.
struct executor_t
{
- ASIO_CONSTEXPR executor_t()
+ constexpr executor_t()
{
}
};
/// Awaitable object that returns the executor of the current coroutine.
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr executor_t executor;
-#elif defined(ASIO_MSVC)
-__declspec(selectany) executor_t executor;
-#endif
/// Awaitable type that returns the cancellation state of the current coroutine.
struct cancellation_state_t
{
- ASIO_CONSTEXPR cancellation_state_t()
+ constexpr cancellation_state_t()
{
}
};
@@ -61,11 +57,7 @@ struct cancellation_state_t
* // ...
* } @endcode
*/
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr cancellation_state_t cancellation_state;
-#elif defined(ASIO_MSVC)
-__declspec(selectany) cancellation_state_t cancellation_state;
-#endif
#if defined(GENERATING_DOCUMENTATION)
@@ -73,7 +65,7 @@ __declspec(selectany) cancellation_state_t cancellation_state;
/// of the current coroutine.
/**
* Let <tt>P</tt> be the cancellation slot associated with the current
- * coroutine's `co_spawn` completion handler. Assigns a new
+ * coroutine's @ref co_spawn completion handler. Assigns a new
* asio::cancellation_state object <tt>S</tt>, constructed as
* <tt>S(P)</tt>, into the current coroutine's cancellation state object.
*
@@ -88,14 +80,14 @@ __declspec(selectany) cancellation_state_t cancellation_state;
* @note The cancellation state is shared by all coroutines in the same "thread
* of execution" that was created using asio::co_spawn.
*/
-ASIO_NODISCARD ASIO_CONSTEXPR unspecified
+ASIO_NODISCARD constexpr unspecified
reset_cancellation_state();
/// Returns an awaitable object that may be used to reset the cancellation state
/// of the current coroutine.
/**
* Let <tt>P</tt> be the cancellation slot associated with the current
- * coroutine's `co_spawn` completion handler. Assigns a new
+ * coroutine's @ref co_spawn completion handler. Assigns a new
* asio::cancellation_state object <tt>S</tt>, constructed as <tt>S(P,
* std::forward<Filter>(filter))</tt>, into the current coroutine's
* cancellation state object.
@@ -113,14 +105,14 @@ reset_cancellation_state();
* of execution" that was created using asio::co_spawn.
*/
template <typename Filter>
-ASIO_NODISCARD ASIO_CONSTEXPR unspecified
-reset_cancellation_state(ASIO_MOVE_ARG(Filter) filter);
+ASIO_NODISCARD constexpr unspecified
+reset_cancellation_state(Filter&& filter);
/// Returns an awaitable object that may be used to reset the cancellation state
/// of the current coroutine.
/**
* Let <tt>P</tt> be the cancellation slot associated with the current
- * coroutine's `co_spawn` completion handler. Assigns a new
+ * coroutine's @ref co_spawn completion handler. Assigns a new
* asio::cancellation_state object <tt>S</tt>, constructed as <tt>S(P,
* std::forward<InFilter>(in_filter),
* std::forward<OutFilter>(out_filter))</tt>, into the current coroutine's
@@ -140,10 +132,10 @@ reset_cancellation_state(ASIO_MOVE_ARG(Filter) filter);
* of execution" that was created using asio::co_spawn.
*/
template <typename InFilter, typename OutFilter>
-ASIO_NODISCARD ASIO_CONSTEXPR unspecified
+ASIO_NODISCARD constexpr unspecified
reset_cancellation_state(
- ASIO_MOVE_ARG(InFilter) in_filter,
- ASIO_MOVE_ARG(OutFilter) out_filter);
+ InFilter&& in_filter,
+ OutFilter&& out_filter);
/// Returns an awaitable object that may be used to determine whether the
/// coroutine throws if trying to suspend when it has been cancelled.
@@ -157,7 +149,7 @@ reset_cancellation_state(
* // ...
* } @endcode
*/
-ASIO_NODISCARD ASIO_CONSTEXPR unspecified
+ASIO_NODISCARD constexpr unspecified
throw_if_cancelled();
/// Returns an awaitable object that may be used to specify whether the
@@ -171,19 +163,19 @@ throw_if_cancelled();
* // ...
* } @endcode
*/
-ASIO_NODISCARD ASIO_CONSTEXPR unspecified
+ASIO_NODISCARD constexpr unspecified
throw_if_cancelled(bool value);
#else // defined(GENERATING_DOCUMENTATION)
struct reset_cancellation_state_0_t
{
- ASIO_CONSTEXPR reset_cancellation_state_0_t()
+ constexpr reset_cancellation_state_0_t()
{
}
};
-ASIO_NODISCARD inline ASIO_CONSTEXPR reset_cancellation_state_0_t
+ASIO_NODISCARD inline constexpr reset_cancellation_state_0_t
reset_cancellation_state()
{
return reset_cancellation_state_0_t();
@@ -193,9 +185,9 @@ template <typename Filter>
struct reset_cancellation_state_1_t
{
template <typename F>
- ASIO_CONSTEXPR reset_cancellation_state_1_t(
- ASIO_MOVE_ARG(F) filter)
- : filter(ASIO_MOVE_CAST(F)(filter))
+ explicit constexpr reset_cancellation_state_1_t(
+ F&& filt)
+ : filter(static_cast<F&&>(filt))
{
}
@@ -203,22 +195,22 @@ struct reset_cancellation_state_1_t
};
template <typename Filter>
-ASIO_NODISCARD inline ASIO_CONSTEXPR reset_cancellation_state_1_t<
- typename decay<Filter>::type>
-reset_cancellation_state(ASIO_MOVE_ARG(Filter) filter)
+ASIO_NODISCARD inline constexpr reset_cancellation_state_1_t<
+ decay_t<Filter>>
+reset_cancellation_state(Filter&& filter)
{
- return reset_cancellation_state_1_t<typename decay<Filter>::type>(
- ASIO_MOVE_CAST(Filter)(filter));
+ return reset_cancellation_state_1_t<decay_t<Filter>>(
+ static_cast<Filter&&>(filter));
}
template <typename InFilter, typename OutFilter>
struct reset_cancellation_state_2_t
{
template <typename F1, typename F2>
- ASIO_CONSTEXPR reset_cancellation_state_2_t(
- ASIO_MOVE_ARG(F1) in_filter, ASIO_MOVE_ARG(F2) out_filter)
- : in_filter(ASIO_MOVE_CAST(F1)(in_filter)),
- out_filter(ASIO_MOVE_CAST(F2)(out_filter))
+ constexpr reset_cancellation_state_2_t(
+ F1&& in_filt, F2&& out_filt)
+ : in_filter(static_cast<F1&&>(in_filt)),
+ out_filter(static_cast<F2&&>(out_filt))
{
}
@@ -227,28 +219,23 @@ struct reset_cancellation_state_2_t
};
template <typename InFilter, typename OutFilter>
-ASIO_NODISCARD inline ASIO_CONSTEXPR reset_cancellation_state_2_t<
- typename decay<InFilter>::type,
- typename decay<OutFilter>::type>
-reset_cancellation_state(
- ASIO_MOVE_ARG(InFilter) in_filter,
- ASIO_MOVE_ARG(OutFilter) out_filter)
+ASIO_NODISCARD inline constexpr
+reset_cancellation_state_2_t<decay_t<InFilter>, decay_t<OutFilter>>
+reset_cancellation_state(InFilter&& in_filter, OutFilter&& out_filter)
{
- return reset_cancellation_state_2_t<
- typename decay<InFilter>::type,
- typename decay<OutFilter>::type>(
- ASIO_MOVE_CAST(InFilter)(in_filter),
- ASIO_MOVE_CAST(OutFilter)(out_filter));
+ return reset_cancellation_state_2_t<decay_t<InFilter>, decay_t<OutFilter>>(
+ static_cast<InFilter&&>(in_filter),
+ static_cast<OutFilter&&>(out_filter));
}
struct throw_if_cancelled_0_t
{
- ASIO_CONSTEXPR throw_if_cancelled_0_t()
+ constexpr throw_if_cancelled_0_t()
{
}
};
-ASIO_NODISCARD inline ASIO_CONSTEXPR throw_if_cancelled_0_t
+ASIO_NODISCARD inline constexpr throw_if_cancelled_0_t
throw_if_cancelled()
{
return throw_if_cancelled_0_t();
@@ -256,15 +243,15 @@ throw_if_cancelled()
struct throw_if_cancelled_1_t
{
- ASIO_CONSTEXPR throw_if_cancelled_1_t(bool value)
- : value(value)
+ explicit constexpr throw_if_cancelled_1_t(bool val)
+ : value(val)
{
}
bool value;
};
-ASIO_NODISCARD inline ASIO_CONSTEXPR throw_if_cancelled_1_t
+ASIO_NODISCARD inline constexpr throw_if_cancelled_1_t
throw_if_cancelled(bool value)
{
return throw_if_cancelled_1_t(value);
diff --git a/3rdparty/asio/include/asio/thread.hpp b/3rdparty/asio/include/asio/thread.hpp
index d15c8ad5e5d..fc57bffdd9e 100644
--- a/3rdparty/asio/include/asio/thread.hpp
+++ b/3rdparty/asio/include/asio/thread.hpp
@@ -2,7 +2,7 @@
// thread.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/thread_pool.hpp b/3rdparty/asio/include/asio/thread_pool.hpp
index f8fae0175ea..f9095d9441a 100644
--- a/3rdparty/asio/include/asio/thread_pool.hpp
+++ b/3rdparty/asio/include/asio/thread_pool.hpp
@@ -2,7 +2,7 @@
// thread_pool.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -28,11 +28,11 @@ namespace asio {
namespace detail {
struct thread_pool_bits
{
- ASIO_STATIC_CONSTEXPR(unsigned int, blocking_never = 1);
- ASIO_STATIC_CONSTEXPR(unsigned int, blocking_always = 2);
- ASIO_STATIC_CONSTEXPR(unsigned int, blocking_mask = 3);
- ASIO_STATIC_CONSTEXPR(unsigned int, relationship_continuation = 4);
- ASIO_STATIC_CONSTEXPR(unsigned int, outstanding_work_tracked = 8);
+ static constexpr unsigned int blocking_never = 1;
+ static constexpr unsigned int blocking_always = 2;
+ static constexpr unsigned int blocking_mask = 3;
+ static constexpr unsigned int relationship_continuation = 4;
+ static constexpr unsigned int outstanding_work_tracked = 8;
};
} // namespace detail
@@ -84,9 +84,6 @@ public:
/// Executor used to submit functions to a thread pool.
typedef basic_executor_type<std::allocator<void>, 0> executor_type;
- /// Scheduler used to schedule receivers on a thread pool.
- typedef basic_executor_type<std::allocator<void>, 0> scheduler_type;
-
#if !defined(ASIO_NO_TS_EXECUTORS)
/// Constructs a pool with an automatically determined number of threads.
ASIO_DECL thread_pool();
@@ -102,13 +99,10 @@ public:
ASIO_DECL ~thread_pool();
/// Obtains the executor associated with the pool.
- executor_type get_executor() ASIO_NOEXCEPT;
+ executor_type get_executor() noexcept;
/// Obtains the executor associated with the pool.
- executor_type executor() ASIO_NOEXCEPT;
-
- /// Obtains the scheduler associated with the pool.
- scheduler_type scheduler() ASIO_NOEXCEPT;
+ executor_type executor() noexcept;
/// Stops the threads.
/**
@@ -142,8 +136,8 @@ public:
ASIO_DECL void wait();
private:
- thread_pool(const thread_pool&) ASIO_DELETED;
- thread_pool& operator=(const thread_pool&) ASIO_DELETED;
+ thread_pool(const thread_pool&) = delete;
+ thread_pool& operator=(const thread_pool&) = delete;
struct thread_function;
@@ -165,32 +159,8 @@ template <typename Allocator, unsigned int Bits>
class thread_pool::basic_executor_type : detail::thread_pool_bits
{
public:
- /// The sender type, when this type is used as a scheduler.
- typedef basic_executor_type sender_type;
-
- /// The bulk execution shape type.
- typedef std::size_t shape_type;
-
- /// The bulk execution index type.
- typedef std::size_t index_type;
-
-#if defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT) \
- && defined(ASIO_HAS_STD_EXCEPTION_PTR)
- template <
- template <typename...> class Tuple,
- template <typename...> class Variant>
- using value_types = Variant<Tuple<>>;
-
- template <template <typename...> class Variant>
- using error_types = Variant<std::exception_ptr>;
-
- ASIO_STATIC_CONSTEXPR(bool, sends_done = true);
-#endif // defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
- // && defined(ASIO_HAS_STD_EXCEPTION_PTR)
-
/// Copy constructor.
- basic_executor_type(
- const basic_executor_type& other) ASIO_NOEXCEPT
+ basic_executor_type(const basic_executor_type& other) noexcept
: pool_(other.pool_),
allocator_(other.allocator_),
bits_(other.bits_)
@@ -200,20 +170,18 @@ public:
pool_->scheduler_.work_started();
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move constructor.
- basic_executor_type(basic_executor_type&& other) ASIO_NOEXCEPT
+ basic_executor_type(basic_executor_type&& other) noexcept
: pool_(other.pool_),
- allocator_(ASIO_MOVE_CAST(Allocator)(other.allocator_)),
+ allocator_(static_cast<Allocator&&>(other.allocator_)),
bits_(other.bits_)
{
if (Bits & outstanding_work_tracked)
other.pool_ = 0;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Destructor.
- ~basic_executor_type() ASIO_NOEXCEPT
+ ~basic_executor_type() noexcept
{
if (Bits & outstanding_work_tracked)
if (pool_)
@@ -221,14 +189,10 @@ public:
}
/// Assignment operator.
- basic_executor_type& operator=(
- const basic_executor_type& other) ASIO_NOEXCEPT;
+ basic_executor_type& operator=(const basic_executor_type& other) noexcept;
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move assignment operator.
- basic_executor_type& operator=(
- basic_executor_type&& other) ASIO_NOEXCEPT;
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ basic_executor_type& operator=(basic_executor_type&& other) noexcept;
#if !defined(GENERATING_DOCUMENTATION)
private:
@@ -246,7 +210,7 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::blocking.possibly); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type<Allocator,
+ constexpr basic_executor_type<Allocator,
ASIO_UNSPECIFIED(Bits & ~blocking_mask)>
require(execution::blocking_t::possibly_t) const
{
@@ -264,7 +228,7 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::blocking.always); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type<Allocator,
+ constexpr basic_executor_type<Allocator,
ASIO_UNSPECIFIED((Bits & ~blocking_mask) | blocking_always)>
require(execution::blocking_t::always_t) const
{
@@ -283,7 +247,7 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::blocking.never); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type<Allocator,
+ constexpr basic_executor_type<Allocator,
ASIO_UNSPECIFIED(Bits & ~blocking_mask)>
require(execution::blocking_t::never_t) const
{
@@ -301,8 +265,7 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::relationship.fork); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type require(
- execution::relationship_t::fork_t) const
+ constexpr basic_executor_type require(execution::relationship_t::fork_t) const
{
return basic_executor_type(pool_,
allocator_, bits_ & ~relationship_continuation);
@@ -318,7 +281,7 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::relationship.continuation); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type require(
+ constexpr basic_executor_type require(
execution::relationship_t::continuation_t) const
{
return basic_executor_type(pool_,
@@ -335,7 +298,7 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::outstanding_work.tracked); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type<Allocator,
+ constexpr basic_executor_type<Allocator,
ASIO_UNSPECIFIED(Bits | outstanding_work_tracked)>
require(execution::outstanding_work_t::tracked_t) const
{
@@ -353,7 +316,7 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::outstanding_work.untracked); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type<Allocator,
+ constexpr basic_executor_type<Allocator,
ASIO_UNSPECIFIED(Bits & ~outstanding_work_tracked)>
require(execution::outstanding_work_t::untracked_t) const
{
@@ -372,7 +335,7 @@ private:
* asio::execution::allocator(my_allocator)); @endcode
*/
template <typename OtherAllocator>
- ASIO_CONSTEXPR basic_executor_type<OtherAllocator, Bits>
+ constexpr basic_executor_type<OtherAllocator, Bits>
require(execution::allocator_t<OtherAllocator> a) const
{
return basic_executor_type<OtherAllocator, Bits>(
@@ -389,7 +352,7 @@ private:
* auto ex2 = asio::require(ex1,
* asio::execution::allocator); @endcode
*/
- ASIO_CONSTEXPR basic_executor_type<std::allocator<void>, Bits>
+ constexpr basic_executor_type<std::allocator<void>, Bits>
require(execution::allocator_t<void>) const
{
return basic_executor_type<std::allocator<void>, Bits>(
@@ -403,23 +366,6 @@ private:
friend struct asio::execution::detail::outstanding_work_t<0>;
#endif // !defined(GENERATING_DOCUMENTATION)
- /// Query the current value of the @c bulk_guarantee property.
- /**
- * Do not call this function directly. It is intended for use with the
- * asio::query customisation point.
- *
- * For example:
- * @code auto ex = my_thread_pool.executor();
- * if (asio::query(ex, asio::execution::bulk_guarantee)
- * == asio::execution::bulk_guarantee.parallel)
- * ... @endcode
- */
- static ASIO_CONSTEXPR execution::bulk_guarantee_t query(
- execution::bulk_guarantee_t) ASIO_NOEXCEPT
- {
- return execution::bulk_guarantee.parallel;
- }
-
/// Query the current value of the @c mapping property.
/**
* Do not call this function directly. It is intended for use with the
@@ -431,8 +377,7 @@ private:
* == asio::execution::mapping.thread)
* ... @endcode
*/
- static ASIO_CONSTEXPR execution::mapping_t query(
- execution::mapping_t) ASIO_NOEXCEPT
+ static constexpr execution::mapping_t query(execution::mapping_t) noexcept
{
return execution::mapping.thread;
}
@@ -447,7 +392,7 @@ private:
* asio::thread_pool& pool = asio::query(
* ex, asio::execution::context); @endcode
*/
- thread_pool& query(execution::context_t) const ASIO_NOEXCEPT
+ thread_pool& query(execution::context_t) const noexcept
{
return *pool_;
}
@@ -463,8 +408,7 @@ private:
* == asio::execution::blocking.always)
* ... @endcode
*/
- ASIO_CONSTEXPR execution::blocking_t query(
- execution::blocking_t) const ASIO_NOEXCEPT
+ constexpr execution::blocking_t query(execution::blocking_t) const noexcept
{
return (bits_ & blocking_never)
? execution::blocking_t(execution::blocking.never)
@@ -484,8 +428,8 @@ private:
* == asio::execution::relationship.continuation)
* ... @endcode
*/
- ASIO_CONSTEXPR execution::relationship_t query(
- execution::relationship_t) const ASIO_NOEXCEPT
+ constexpr execution::relationship_t query(
+ execution::relationship_t) const noexcept
{
return (bits_ & relationship_continuation)
? execution::relationship_t(execution::relationship.continuation)
@@ -503,8 +447,8 @@ private:
* == asio::execution::outstanding_work.tracked)
* ... @endcode
*/
- static ASIO_CONSTEXPR execution::outstanding_work_t query(
- execution::outstanding_work_t) ASIO_NOEXCEPT
+ static constexpr execution::outstanding_work_t query(
+ execution::outstanding_work_t) noexcept
{
return (Bits & outstanding_work_tracked)
? execution::outstanding_work_t(execution::outstanding_work.tracked)
@@ -522,8 +466,8 @@ private:
* asio::execution::allocator); @endcode
*/
template <typename OtherAllocator>
- ASIO_CONSTEXPR Allocator query(
- execution::allocator_t<OtherAllocator>) const ASIO_NOEXCEPT
+ constexpr Allocator query(
+ execution::allocator_t<OtherAllocator>) const noexcept
{
return allocator_;
}
@@ -538,8 +482,7 @@ private:
* auto alloc = asio::query(ex,
* asio::execution::allocator); @endcode
*/
- ASIO_CONSTEXPR Allocator query(
- execution::allocator_t<void>) const ASIO_NOEXCEPT
+ constexpr Allocator query(execution::allocator_t<void>) const noexcept
{
return allocator_;
}
@@ -554,7 +497,7 @@ private:
* std::size_t occupancy = asio::query(
* ex, asio::execution::occupancy); @endcode
*/
- std::size_t query(execution::occupancy_t) const ASIO_NOEXCEPT
+ std::size_t query(execution::occupancy_t) const noexcept
{
return static_cast<std::size_t>(pool_->num_threads_);
}
@@ -565,14 +508,14 @@ public:
* @return @c true if the current thread is running the thread pool. Otherwise
* returns @c false.
*/
- bool running_in_this_thread() const ASIO_NOEXCEPT;
+ bool running_in_this_thread() const noexcept;
/// Compare two executors for equality.
/**
* Two executors are equal if they refer to the same underlying thread pool.
*/
friend bool operator==(const basic_executor_type& a,
- const basic_executor_type& b) ASIO_NOEXCEPT
+ const basic_executor_type& b) noexcept
{
return a.pool_ == b.pool_
&& a.allocator_ == b.allocator_
@@ -584,78 +527,25 @@ public:
* Two executors are equal if they refer to the same underlying thread pool.
*/
friend bool operator!=(const basic_executor_type& a,
- const basic_executor_type& b) ASIO_NOEXCEPT
+ const basic_executor_type& b) noexcept
{
return a.pool_ != b.pool_
|| a.allocator_ != b.allocator_
|| a.bits_ != b.bits_;
}
-#if !defined(GENERATING_DOCUMENTATION)
-private:
- friend struct asio_execution_execute_fn::impl;
-#endif // !defined(GENERATING_DOCUMENTATION)
-
/// Execution function.
- /**
- * Do not call this function directly. It is intended for use with the
- * execution::execute customisation point.
- *
- * For example:
- * @code auto ex = my_thread_pool.executor();
- * execution::execute(ex, my_function_object); @endcode
- */
template <typename Function>
- void execute(ASIO_MOVE_ARG(Function) f) const
+ void execute(Function&& f) const
{
- this->do_execute(ASIO_MOVE_CAST(Function)(f),
+ this->do_execute(static_cast<Function&&>(f),
integral_constant<bool, (Bits & blocking_always) != 0>());
}
public:
- /// Bulk execution function.
- template <typename Function>
- void bulk_execute(ASIO_MOVE_ARG(Function) f, std::size_t n) const
- {
- this->do_bulk_execute(ASIO_MOVE_CAST(Function)(f), n,
- integral_constant<bool, (Bits & blocking_always) != 0>());
- }
-
- /// Schedule function.
- /**
- * Do not call this function directly. It is intended for use with the
- * execution::schedule customisation point.
- *
- * @return An object that satisfies the sender concept.
- */
- sender_type schedule() const ASIO_NOEXCEPT
- {
- return *this;
- }
-
- /// Connect function.
- /**
- * Do not call this function directly. It is intended for use with the
- * execution::connect customisation point.
- *
- * @return An object of an unspecified type that satisfies the @c
- * operation_state concept.
- */
- template <ASIO_EXECUTION_RECEIVER_OF_0 Receiver>
-#if defined(GENERATING_DOCUMENTATION)
- unspecified
-#else // defined(GENERATING_DOCUMENTATION)
- execution::detail::as_operation<basic_executor_type, Receiver>
-#endif // defined(GENERATING_DOCUMENTATION)
- connect(ASIO_MOVE_ARG(Receiver) r) const
- {
- return execution::detail::as_operation<basic_executor_type, Receiver>(
- *this, ASIO_MOVE_CAST(Receiver)(r));
- }
-
#if !defined(ASIO_NO_TS_EXECUTORS)
/// Obtain the underlying execution context.
- thread_pool& context() const ASIO_NOEXCEPT;
+ thread_pool& context() const noexcept;
/// Inform the thread pool that it has some outstanding work to do.
/**
@@ -663,7 +553,7 @@ public:
* This ensures that the thread pool's join() function will not return while
* the work is underway.
*/
- void on_work_started() const ASIO_NOEXCEPT;
+ void on_work_started() const noexcept;
/// Inform the thread pool that some work is no longer outstanding.
/**
@@ -671,7 +561,7 @@ public:
* finished. Once the count of unfinished work reaches zero, the thread
* pool's join() function is permitted to exit.
*/
- void on_work_finished() const ASIO_NOEXCEPT;
+ void on_work_finished() const noexcept;
/// Request the thread pool to invoke the given function object.
/**
@@ -688,8 +578,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename OtherAllocator>
- void dispatch(ASIO_MOVE_ARG(Function) f,
- const OtherAllocator& a) const;
+ void dispatch(Function&& f, const OtherAllocator& a) const;
/// Request the thread pool to invoke the given function object.
/**
@@ -705,8 +594,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename OtherAllocator>
- void post(ASIO_MOVE_ARG(Function) f,
- const OtherAllocator& a) const;
+ void post(Function&& f, const OtherAllocator& a) const;
/// Request the thread pool to invoke the given function object.
/**
@@ -726,8 +614,7 @@ public:
* internal storage needed for function invocation.
*/
template <typename Function, typename OtherAllocator>
- void defer(ASIO_MOVE_ARG(Function) f,
- const OtherAllocator& a) const;
+ void defer(Function&& f, const OtherAllocator& a) const;
#endif // !defined(ASIO_NO_TS_EXECUTORS)
private:
@@ -735,7 +622,7 @@ private:
template <typename, unsigned int> friend class basic_executor_type;
// Constructor used by thread_pool::get_executor().
- explicit basic_executor_type(thread_pool& p) ASIO_NOEXCEPT
+ explicit basic_executor_type(thread_pool& p) noexcept
: pool_(&p),
allocator_(),
bits_(0)
@@ -746,7 +633,7 @@ private:
// Constructor used by require().
basic_executor_type(thread_pool* p,
- const Allocator& a, unsigned int bits) ASIO_NOEXCEPT
+ const Allocator& a, unsigned int bits) noexcept
: pool_(p),
allocator_(a),
bits_(bits)
@@ -758,21 +645,11 @@ private:
/// Execution helper implementation for possibly and never blocking.
template <typename Function>
- void do_execute(ASIO_MOVE_ARG(Function) f, false_type) const;
+ void do_execute(Function&& f, false_type) const;
/// Execution helper implementation for always blocking.
template <typename Function>
- void do_execute(ASIO_MOVE_ARG(Function) f, true_type) const;
-
- /// Bulk execution helper implementation for possibly and never blocking.
- template <typename Function>
- void do_bulk_execute(ASIO_MOVE_ARG(Function) f,
- std::size_t n, false_type) const;
-
- /// Bulk execution helper implementation for always blocking.
- template <typename Function>
- void do_bulk_execute(ASIO_MOVE_ARG(Function) f,
- std::size_t n, true_type) const;
+ void do_execute(Function&& f, true_type) const;
// The underlying thread pool.
thread_pool* pool_;
@@ -795,8 +672,8 @@ struct equality_comparable<
asio::thread_pool::basic_executor_type<Allocator, Bits>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -809,45 +686,13 @@ struct execute_member<
Function
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_SCHEDULE_MEMBER_TRAIT)
-
-template <typename Allocator, unsigned int Bits>
-struct schedule_member<
- const asio::thread_pool::basic_executor_type<Allocator, Bits>
- >
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef asio::thread_pool::basic_executor_type<
- Allocator, Bits> result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SCHEDULE_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-template <typename Allocator, unsigned int Bits, typename Receiver>
-struct connect_member<
- const asio::thread_pool::basic_executor_type<Allocator, Bits>,
- Receiver
- >
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef asio::execution::detail::as_operation<
- asio::thread_pool::basic_executor_type<Allocator, Bits>,
- Receiver> result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
template <typename Allocator, unsigned int Bits>
@@ -856,8 +701,8 @@ struct require_member<
asio::execution::blocking_t::possibly_t
> : asio::detail::thread_pool_bits
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::thread_pool::basic_executor_type<
Allocator, Bits & ~blocking_mask> result_type;
};
@@ -868,8 +713,8 @@ struct require_member<
asio::execution::blocking_t::always_t
> : asio::detail::thread_pool_bits
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::thread_pool::basic_executor_type<Allocator,
(Bits & ~blocking_mask) | blocking_always> result_type;
};
@@ -880,8 +725,8 @@ struct require_member<
asio::execution::blocking_t::never_t
> : asio::detail::thread_pool_bits
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::thread_pool::basic_executor_type<
Allocator, Bits & ~blocking_mask> result_type;
};
@@ -892,8 +737,8 @@ struct require_member<
asio::execution::relationship_t::fork_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::thread_pool::basic_executor_type<
Allocator, Bits> result_type;
};
@@ -904,8 +749,8 @@ struct require_member<
asio::execution::relationship_t::continuation_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::thread_pool::basic_executor_type<
Allocator, Bits> result_type;
};
@@ -916,8 +761,8 @@ struct require_member<
asio::execution::outstanding_work_t::tracked_t
> : asio::detail::thread_pool_bits
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::thread_pool::basic_executor_type<
Allocator, Bits | outstanding_work_tracked> result_type;
};
@@ -928,8 +773,8 @@ struct require_member<
asio::execution::outstanding_work_t::untracked_t
> : asio::detail::thread_pool_bits
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::thread_pool::basic_executor_type<
Allocator, Bits & ~outstanding_work_tracked> result_type;
};
@@ -940,8 +785,8 @@ struct require_member<
asio::execution::allocator_t<void>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::thread_pool::basic_executor_type<
std::allocator<void>, Bits> result_type;
};
@@ -953,8 +798,8 @@ struct require_member<
asio::execution::allocator_t<OtherAllocator>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef asio::thread_pool::basic_executor_type<
OtherAllocator, Bits> result_type;
};
@@ -970,38 +815,16 @@ struct query_static_constexpr_member<
typename asio::enable_if<
asio::is_convertible<
Property,
- asio::execution::bulk_guarantee_t
- >::value
- >::type
- >
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef asio::execution::bulk_guarantee_t::parallel_t result_type;
-
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
- {
- return result_type();
- }
-};
-
-template <typename Allocator, unsigned int Bits, typename Property>
-struct query_static_constexpr_member<
- asio::thread_pool::basic_executor_type<Allocator, Bits>,
- Property,
- typename asio::enable_if<
- asio::is_convertible<
- Property,
asio::execution::outstanding_work_t
>::value
>::type
> : asio::detail::thread_pool_bits
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::execution::outstanding_work_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return (Bits & outstanding_work_tracked)
? execution::outstanding_work_t(execution::outstanding_work.tracked)
@@ -1021,11 +844,11 @@ struct query_static_constexpr_member<
>::type
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::execution::mapping_t::thread_t result_type;
- static ASIO_CONSTEXPR result_type value() ASIO_NOEXCEPT
+ static constexpr result_type value() noexcept
{
return result_type();
}
@@ -1047,8 +870,8 @@ struct query_member<
>::type
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::execution::blocking_t result_type;
};
@@ -1064,8 +887,8 @@ struct query_member<
>::type
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::execution::relationship_t result_type;
};
@@ -1075,8 +898,8 @@ struct query_member<
asio::execution::occupancy_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef std::size_t result_type;
};
@@ -1086,8 +909,8 @@ struct query_member<
asio::execution::context_t
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef asio::thread_pool& result_type;
};
@@ -1097,8 +920,8 @@ struct query_member<
asio::execution::allocator_t<void>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Allocator result_type;
};
@@ -1108,8 +931,8 @@ struct query_member<
asio::execution::allocator_t<OtherAllocator>
>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Allocator result_type;
};
@@ -1117,6 +940,15 @@ struct query_member<
} // namespace traits
+namespace execution {
+
+template <>
+struct is_executor<thread_pool> : false_type
+{
+};
+
+} // namespace execution
+
#endif // !defined(GENERATING_DOCUMENTATION)
} // namespace asio
diff --git a/3rdparty/asio/include/asio/time_traits.hpp b/3rdparty/asio/include/asio/time_traits.hpp
index 7f847e89b90..f3980233eab 100644
--- a/3rdparty/asio/include/asio/time_traits.hpp
+++ b/3rdparty/asio/include/asio/time_traits.hpp
@@ -2,7 +2,7 @@
// time_traits.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/traits/bulk_execute_free.hpp b/3rdparty/asio/include/asio/traits/bulk_execute_free.hpp
deleted file mode 100644
index 3e089bc3ac7..00000000000
--- a/3rdparty/asio/include/asio/traits/bulk_execute_free.hpp
+++ /dev/null
@@ -1,114 +0,0 @@
-//
-// traits/bulk_execute_free.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_BULK_EXECUTE_FREE_HPP
-#define ASIO_TRAITS_BULK_EXECUTE_FREE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_BULK_EXECUTE_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename F, typename N, typename = void>
-struct bulk_execute_free_default;
-
-template <typename T, typename F, typename N, typename = void>
-struct bulk_execute_free;
-
-} // namespace traits
-namespace detail {
-
-struct no_bulk_execute_free
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_BULK_EXECUTE_FREE_TRAIT)
-
-template <typename T, typename F, typename N, typename = void>
-struct bulk_execute_free_trait : no_bulk_execute_free
-{
-};
-
-template <typename T, typename F, typename N>
-struct bulk_execute_free_trait<T, F, N,
- typename void_type<
- decltype(bulk_execute(declval<T>(), declval<F>(), declval<N>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(
- bulk_execute(declval<T>(), declval<F>(), declval<N>()));
-
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- bulk_execute(declval<T>(), declval<F>(), declval<N>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_BULK_EXECUTE_FREE_TRAIT)
-
-template <typename T, typename F, typename N, typename = void>
-struct bulk_execute_free_trait :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value
- && is_same<F, typename decay<F>::type>::value
- && is_same<N, typename decay<N>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_bulk_execute_free,
- traits::bulk_execute_free<typename add_const<T>::type, F, N>
- >::type,
- traits::bulk_execute_free<
- typename remove_reference<T>::type,
- typename decay<F>::type,
- typename decay<N>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_BULK_EXECUTE_FREE_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename F, typename N, typename>
-struct bulk_execute_free_default :
- detail::bulk_execute_free_trait<T, F, N>
-{
-};
-
-template <typename T, typename F, typename N, typename>
-struct bulk_execute_free :
- bulk_execute_free_default<T, F, N>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_BULK_EXECUTE_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/bulk_execute_member.hpp b/3rdparty/asio/include/asio/traits/bulk_execute_member.hpp
deleted file mode 100644
index f0e1e90dbac..00000000000
--- a/3rdparty/asio/include/asio/traits/bulk_execute_member.hpp
+++ /dev/null
@@ -1,114 +0,0 @@
-//
-// traits/bulk_execute_member.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_BULK_EXECUTE_MEMBER_HPP
-#define ASIO_TRAITS_BULK_EXECUTE_MEMBER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_BULK_EXECUTE_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename F, typename N, typename = void>
-struct bulk_execute_member_default;
-
-template <typename T, typename F, typename N, typename = void>
-struct bulk_execute_member;
-
-} // namespace traits
-namespace detail {
-
-struct no_bulk_execute_member
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_BULK_EXECUTE_MEMBER_TRAIT)
-
-template <typename T, typename F, typename N, typename = void>
-struct bulk_execute_member_trait : no_bulk_execute_member
-{
-};
-
-template <typename T, typename F, typename N>
-struct bulk_execute_member_trait<T, F, N,
- typename void_type<
- decltype(declval<T>().bulk_execute(declval<F>(), declval<N>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(
- declval<T>().bulk_execute(declval<F>(), declval<N>()));
-
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- declval<T>().bulk_execute(declval<F>(), declval<N>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_BULK_EXECUTE_MEMBER_TRAIT)
-
-template <typename T, typename F, typename N, typename = void>
-struct bulk_execute_member_trait :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value
- && is_same<F, typename decay<F>::type>::value
- && is_same<N, typename decay<N>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_bulk_execute_member,
- traits::bulk_execute_member<typename add_const<T>::type, F, N>
- >::type,
- traits::bulk_execute_member<
- typename remove_reference<T>::type,
- typename decay<F>::type,
- typename decay<N>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_BULK_EXECUTE_MEMBER_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename F, typename N, typename>
-struct bulk_execute_member_default :
- detail::bulk_execute_member_trait<T, F, N>
-{
-};
-
-template <typename T, typename F, typename N, typename>
-struct bulk_execute_member :
- bulk_execute_member_default<T, F, N>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_BULK_EXECUTE_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/connect_free.hpp b/3rdparty/asio/include/asio/traits/connect_free.hpp
deleted file mode 100644
index 96b3ac44078..00000000000
--- a/3rdparty/asio/include/asio/traits/connect_free.hpp
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// traits/connect_free.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_CONNECT_FREE_HPP
-#define ASIO_TRAITS_CONNECT_FREE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename S, typename R, typename = void>
-struct connect_free_default;
-
-template <typename S, typename R, typename = void>
-struct connect_free;
-
-} // namespace traits
-namespace detail {
-
-struct no_connect_free
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT)
-
-template <typename S, typename R, typename = void>
-struct connect_free_trait : no_connect_free
-{
-};
-
-template <typename S, typename R>
-struct connect_free_trait<S, R,
- typename void_type<
- decltype(connect(declval<S>(), declval<R>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(
- connect(declval<S>(), declval<R>()));
-
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- connect(declval<S>(), declval<R>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT)
-
-template <typename S, typename R, typename = void>
-struct connect_free_trait :
- conditional<
- is_same<S, typename remove_reference<S>::type>::value
- && is_same<R, typename decay<R>::type>::value,
- typename conditional<
- is_same<S, typename add_const<S>::type>::value,
- no_connect_free,
- traits::connect_free<typename add_const<S>::type, R>
- >::type,
- traits::connect_free<
- typename remove_reference<S>::type,
- typename decay<R>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename S, typename R, typename>
-struct connect_free_default :
- detail::connect_free_trait<S, R>
-{
-};
-
-template <typename S, typename R, typename>
-struct connect_free :
- connect_free_default<S, R>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_CONNECT_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/connect_member.hpp b/3rdparty/asio/include/asio/traits/connect_member.hpp
deleted file mode 100644
index d73beed5453..00000000000
--- a/3rdparty/asio/include/asio/traits/connect_member.hpp
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// traits/connect_member.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_CONNECT_MEMBER_HPP
-#define ASIO_TRAITS_CONNECT_MEMBER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename S, typename R, typename = void>
-struct connect_member_default;
-
-template <typename S, typename R, typename = void>
-struct connect_member;
-
-} // namespace traits
-namespace detail {
-
-struct no_connect_member
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-template <typename S, typename R, typename = void>
-struct connect_member_trait : no_connect_member
-{
-};
-
-template <typename S, typename R>
-struct connect_member_trait<S, R,
- typename void_type<
- decltype(declval<S>().connect(declval<R>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(
- declval<S>().connect(declval<R>()));
-
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- declval<S>().connect(declval<R>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-template <typename S, typename R, typename = void>
-struct connect_member_trait :
- conditional<
- is_same<S, typename remove_reference<S>::type>::value
- && is_same<R, typename decay<R>::type>::value,
- typename conditional<
- is_same<S, typename add_const<S>::type>::value,
- no_connect_member,
- traits::connect_member<typename add_const<S>::type, R>
- >::type,
- traits::connect_member<
- typename remove_reference<S>::type,
- typename decay<R>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename S, typename R, typename>
-struct connect_member_default :
- detail::connect_member_trait<S, R>
-{
-};
-
-template <typename S, typename R, typename>
-struct connect_member :
- connect_member_default<S, R>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_CONNECT_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/equality_comparable.hpp b/3rdparty/asio/include/asio/traits/equality_comparable.hpp
index c8418ca3b94..0a6decf2d93 100644
--- a/3rdparty/asio/include/asio/traits/equality_comparable.hpp
+++ b/3rdparty/asio/include/asio/traits/equality_comparable.hpp
@@ -2,7 +2,7 @@
// traits/equality_comparable.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,13 +18,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
namespace asio {
namespace traits {
@@ -40,8 +36,8 @@ namespace detail {
struct no_equality_comparable
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
};
#if defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -53,7 +49,7 @@ struct equality_comparable_trait : no_equality_comparable
template <typename T>
struct equality_comparable_trait<T,
- typename void_type<
+ void_t<
decltype(
static_cast<void>(
static_cast<bool>(declval<const T>() == declval<const T>())
@@ -62,24 +58,24 @@ struct equality_comparable_trait<T,
static_cast<bool>(declval<const T>() != declval<const T>())
)
)
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
+ static constexpr bool is_noexcept =
noexcept(declval<const T>() == declval<const T>())
- && noexcept(declval<const T>() != declval<const T>()));
+ && noexcept(declval<const T>() != declval<const T>());
};
#else // defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
template <typename T, typename = void>
struct equality_comparable_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value,
no_equality_comparable,
- traits::equality_comparable<typename decay<T>::type>
- >::type
+ traits::equality_comparable<decay_t<T>>
+ >
{
};
diff --git a/3rdparty/asio/include/asio/traits/execute_free.hpp b/3rdparty/asio/include/asio/traits/execute_free.hpp
deleted file mode 100644
index f66d937b021..00000000000
--- a/3rdparty/asio/include/asio/traits/execute_free.hpp
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// traits/execute_free.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_EXECUTE_FREE_HPP
-#define ASIO_TRAITS_EXECUTE_FREE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_EXECUTE_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename F, typename = void>
-struct execute_free_default;
-
-template <typename T, typename F, typename = void>
-struct execute_free;
-
-} // namespace traits
-namespace detail {
-
-struct no_execute_free
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_EXECUTE_FREE_TRAIT)
-
-template <typename T, typename F, typename = void>
-struct execute_free_trait : no_execute_free
-{
-};
-
-template <typename T, typename F>
-struct execute_free_trait<T, F,
- typename void_type<
- decltype(execute(declval<T>(), declval<F>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(
- execute(declval<T>(), declval<F>()));
-
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- execute(declval<T>(), declval<F>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_EXECUTE_FREE_TRAIT)
-
-template <typename T, typename F, typename = void>
-struct execute_free_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<F, typename decay<F>::type>::value,
- no_execute_free,
- traits::execute_free<
- typename decay<T>::type,
- typename decay<F>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_EXECUTE_FREE_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename F, typename>
-struct execute_free_default :
- detail::execute_free_trait<T, F>
-{
-};
-
-template <typename T, typename F, typename>
-struct execute_free :
- execute_free_default<T, F>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_EXECUTE_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/execute_member.hpp b/3rdparty/asio/include/asio/traits/execute_member.hpp
index 01f280d56b4..fc0760bef05 100644
--- a/3rdparty/asio/include/asio/traits/execute_member.hpp
+++ b/3rdparty/asio/include/asio/traits/execute_member.hpp
@@ -2,7 +2,7 @@
// traits/execute_member.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,13 +18,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
#include "asio/detail/push_options.hpp"
@@ -42,8 +38,8 @@ namespace detail {
struct no_execute_member
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
};
#if defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
@@ -55,31 +51,31 @@ struct execute_member_trait : no_execute_member
template <typename T, typename F>
struct execute_member_trait<T, F,
- typename void_type<
+ void_t<
decltype(declval<T>().execute(declval<F>()))
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
using result_type = decltype(
declval<T>().execute(declval<F>()));
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- declval<T>().execute(declval<F>())));
+ static constexpr bool is_noexcept =
+ noexcept(declval<T>().execute(declval<F>()));
};
#else // defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
template <typename T, typename F, typename = void>
struct execute_member_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<F, typename decay<F>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<F, decay_t<F>>::value,
no_execute_member,
traits::execute_member<
- typename decay<T>::type,
- typename decay<F>::type>
- >::type
+ decay_t<T>,
+ decay_t<F>>
+ >
{
};
diff --git a/3rdparty/asio/include/asio/traits/prefer_free.hpp b/3rdparty/asio/include/asio/traits/prefer_free.hpp
index 6be0a363241..c6104d636ed 100644
--- a/3rdparty/asio/include/asio/traits/prefer_free.hpp
+++ b/3rdparty/asio/include/asio/traits/prefer_free.hpp
@@ -2,7 +2,7 @@
// traits/prefer_free.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,13 +18,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
#include "asio/detail/push_options.hpp"
@@ -42,8 +38,8 @@ namespace detail {
struct no_prefer_free
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
};
#if defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
@@ -55,31 +51,31 @@ struct prefer_free_trait : no_prefer_free
template <typename T, typename Property>
struct prefer_free_trait<T, Property,
- typename void_type<
+ void_t<
decltype(prefer(declval<T>(), declval<Property>()))
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
using result_type = decltype(
prefer(declval<T>(), declval<Property>()));
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- prefer(declval<T>(), declval<Property>())));
+ static constexpr bool is_noexcept =
+ noexcept(prefer(declval<T>(), declval<Property>()));
};
#else // defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
template <typename T, typename Property, typename = void>
struct prefer_free_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_prefer_free,
traits::prefer_free<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
diff --git a/3rdparty/asio/include/asio/traits/prefer_member.hpp b/3rdparty/asio/include/asio/traits/prefer_member.hpp
index 0dbb1247830..278c25c9964 100644
--- a/3rdparty/asio/include/asio/traits/prefer_member.hpp
+++ b/3rdparty/asio/include/asio/traits/prefer_member.hpp
@@ -2,7 +2,7 @@
// traits/prefer_member.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,13 +18,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
#include "asio/detail/push_options.hpp"
@@ -42,8 +38,8 @@ namespace detail {
struct no_prefer_member
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
};
#if defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
@@ -55,31 +51,31 @@ struct prefer_member_trait : no_prefer_member
template <typename T, typename Property>
struct prefer_member_trait<T, Property,
- typename void_type<
+ void_t<
decltype(declval<T>().prefer(declval<Property>()))
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
using result_type = decltype(
declval<T>().prefer(declval<Property>()));
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- declval<T>().prefer(declval<Property>())));
+ static constexpr bool is_noexcept =
+ noexcept(declval<T>().prefer(declval<Property>()));
};
#else // defined(ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT)
template <typename T, typename Property, typename = void>
struct prefer_member_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_prefer_member,
traits::prefer_member<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
diff --git a/3rdparty/asio/include/asio/traits/query_free.hpp b/3rdparty/asio/include/asio/traits/query_free.hpp
index 3347793bf3c..a54016adddc 100644
--- a/3rdparty/asio/include/asio/traits/query_free.hpp
+++ b/3rdparty/asio/include/asio/traits/query_free.hpp
@@ -2,7 +2,7 @@
// traits/query_free.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,13 +18,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
#include "asio/detail/push_options.hpp"
@@ -42,8 +38,8 @@ namespace detail {
struct no_query_free
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
};
#if defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
@@ -55,31 +51,31 @@ struct query_free_trait : no_query_free
template <typename T, typename Property>
struct query_free_trait<T, Property,
- typename void_type<
+ void_t<
decltype(query(declval<T>(), declval<Property>()))
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
using result_type = decltype(
query(declval<T>(), declval<Property>()));
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- query(declval<T>(), declval<Property>())));
+ static constexpr bool is_noexcept =
+ noexcept(query(declval<T>(), declval<Property>()));
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
template <typename T, typename Property, typename = void>
struct query_free_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_query_free,
traits::query_free<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
diff --git a/3rdparty/asio/include/asio/traits/query_member.hpp b/3rdparty/asio/include/asio/traits/query_member.hpp
index f69461b5296..2202c9dab4b 100644
--- a/3rdparty/asio/include/asio/traits/query_member.hpp
+++ b/3rdparty/asio/include/asio/traits/query_member.hpp
@@ -2,7 +2,7 @@
// traits/query_member.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,13 +18,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
#include "asio/detail/push_options.hpp"
@@ -42,8 +38,8 @@ namespace detail {
struct no_query_member
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
};
#if defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
@@ -55,31 +51,31 @@ struct query_member_trait : no_query_member
template <typename T, typename Property>
struct query_member_trait<T, Property,
- typename void_type<
+ void_t<
decltype(declval<T>().query(declval<Property>()))
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
using result_type = decltype(
declval<T>().query(declval<Property>()));
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- declval<T>().query(declval<Property>())));
+ static constexpr bool is_noexcept =
+ noexcept(declval<T>().query(declval<Property>()));
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
template <typename T, typename Property, typename = void>
struct query_member_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_query_member,
traits::query_member<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
diff --git a/3rdparty/asio/include/asio/traits/query_static_constexpr_member.hpp b/3rdparty/asio/include/asio/traits/query_static_constexpr_member.hpp
index 2c6eb839dd9..95bdb7db376 100644
--- a/3rdparty/asio/include/asio/traits/query_static_constexpr_member.hpp
+++ b/3rdparty/asio/include/asio/traits/query_static_constexpr_member.hpp
@@ -2,7 +2,7 @@
// traits/query_static_constexpr_member.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,16 +18,10 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_CONSTEXPR) \
- && defined(ASIO_HAS_CONSTANT_EXPRESSION_SFINAE) \
+#if defined(ASIO_HAS_CONSTANT_EXPRESSION_SFINAE) \
&& defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_CONSTEXPR)
- // && defined(ASIO_HAS_CONSTANT_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_CONSTANT_EXPRESSION_SFINAE)
// && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
#include "asio/detail/push_options.hpp"
@@ -46,19 +40,19 @@ namespace detail {
struct no_query_static_constexpr_member
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
+ static constexpr bool is_valid = false;
};
template <typename T, typename Property, typename = void>
struct query_static_constexpr_member_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_query_static_constexpr_member,
traits::query_static_constexpr_member<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
@@ -66,18 +60,17 @@ struct query_static_constexpr_member_trait :
template <typename T, typename Property>
struct query_static_constexpr_member_trait<T, Property,
- typename enable_if<
+ enable_if_t<
(static_cast<void>(T::query(Property{})), true)
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
using result_type = decltype(T::query(Property{}));
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- noexcept(T::query(Property{})));
+ static constexpr bool is_noexcept = noexcept(T::query(Property{}));
- static ASIO_CONSTEXPR result_type value() noexcept(is_noexcept)
+ static constexpr result_type value() noexcept(is_noexcept)
{
return T::query(Property{});
}
diff --git a/3rdparty/asio/include/asio/traits/require_concept_free.hpp b/3rdparty/asio/include/asio/traits/require_concept_free.hpp
index d7ea447e39d..1ae2ad7801d 100644
--- a/3rdparty/asio/include/asio/traits/require_concept_free.hpp
+++ b/3rdparty/asio/include/asio/traits/require_concept_free.hpp
@@ -2,7 +2,7 @@
// traits/require_concept_free.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,13 +18,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
#include "asio/detail/push_options.hpp"
@@ -42,8 +38,8 @@ namespace detail {
struct no_require_concept_free
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
};
#if defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_FREE_TRAIT)
@@ -55,31 +51,31 @@ struct require_concept_free_trait : no_require_concept_free
template <typename T, typename Property>
struct require_concept_free_trait<T, Property,
- typename void_type<
+ void_t<
decltype(require_concept(declval<T>(), declval<Property>()))
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
using result_type = decltype(
require_concept(declval<T>(), declval<Property>()));
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- require_concept(declval<T>(), declval<Property>())));
+ static constexpr bool is_noexcept =
+ noexcept(require_concept(declval<T>(), declval<Property>()));
};
#else // defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_FREE_TRAIT)
template <typename T, typename Property, typename = void>
struct require_concept_free_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_require_concept_free,
traits::require_concept_free<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
diff --git a/3rdparty/asio/include/asio/traits/require_concept_member.hpp b/3rdparty/asio/include/asio/traits/require_concept_member.hpp
index a7e86059037..f6b6535e9bd 100644
--- a/3rdparty/asio/include/asio/traits/require_concept_member.hpp
+++ b/3rdparty/asio/include/asio/traits/require_concept_member.hpp
@@ -2,7 +2,7 @@
// traits/require_concept_member.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,13 +18,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
#include "asio/detail/push_options.hpp"
@@ -42,8 +38,8 @@ namespace detail {
struct no_require_concept_member
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
};
#if defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT)
@@ -55,31 +51,31 @@ struct require_concept_member_trait : no_require_concept_member
template <typename T, typename Property>
struct require_concept_member_trait<T, Property,
- typename void_type<
+ void_t<
decltype(declval<T>().require_concept(declval<Property>()))
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
using result_type = decltype(
declval<T>().require_concept(declval<Property>()));
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- declval<T>().require_concept(declval<Property>())));
+ static constexpr bool is_noexcept =
+ noexcept(declval<T>().require_concept(declval<Property>()));
};
#else // defined(ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT)
template <typename T, typename Property, typename = void>
struct require_concept_member_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_require_concept_member,
traits::require_concept_member<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
diff --git a/3rdparty/asio/include/asio/traits/require_free.hpp b/3rdparty/asio/include/asio/traits/require_free.hpp
index 53cf805a316..02b558676b1 100644
--- a/3rdparty/asio/include/asio/traits/require_free.hpp
+++ b/3rdparty/asio/include/asio/traits/require_free.hpp
@@ -2,7 +2,7 @@
// traits/require_free.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,13 +18,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
#include "asio/detail/push_options.hpp"
@@ -42,8 +38,8 @@ namespace detail {
struct no_require_free
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
};
#if defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
@@ -55,31 +51,31 @@ struct require_free_trait : no_require_free
template <typename T, typename Property>
struct require_free_trait<T, Property,
- typename void_type<
+ void_t<
decltype(require(declval<T>(), declval<Property>()))
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
using result_type = decltype(
require(declval<T>(), declval<Property>()));
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- require(declval<T>(), declval<Property>())));
+ static constexpr bool is_noexcept =
+ noexcept(require(declval<T>(), declval<Property>()));
};
#else // defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
template <typename T, typename Property, typename = void>
struct require_free_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_require_free,
traits::require_free<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
diff --git a/3rdparty/asio/include/asio/traits/require_member.hpp b/3rdparty/asio/include/asio/traits/require_member.hpp
index 2c8c4bbcbe0..af733e3b270 100644
--- a/3rdparty/asio/include/asio/traits/require_member.hpp
+++ b/3rdparty/asio/include/asio/traits/require_member.hpp
@@ -2,7 +2,7 @@
// traits/require_member.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,13 +18,9 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
+#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
#include "asio/detail/push_options.hpp"
@@ -42,8 +38,8 @@ namespace detail {
struct no_require_member
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
};
#if defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
@@ -55,31 +51,31 @@ struct require_member_trait : no_require_member
template <typename T, typename Property>
struct require_member_trait<T, Property,
- typename void_type<
+ void_t<
decltype(declval<T>().require(declval<Property>()))
- >::type>
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
using result_type = decltype(
declval<T>().require(declval<Property>()));
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- declval<T>().require(declval<Property>())));
+ static constexpr bool is_noexcept =
+ noexcept(declval<T>().require(declval<Property>()));
};
#else // defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
template <typename T, typename Property, typename = void>
struct require_member_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_require_member,
traits::require_member<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
diff --git a/3rdparty/asio/include/asio/traits/schedule_free.hpp b/3rdparty/asio/include/asio/traits/schedule_free.hpp
deleted file mode 100644
index 36ccad32d98..00000000000
--- a/3rdparty/asio/include/asio/traits/schedule_free.hpp
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// traits/schedule_free.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_SCHEDULE_FREE_HPP
-#define ASIO_TRAITS_SCHEDULE_FREE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_SCHEDULE_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename = void>
-struct schedule_free_default;
-
-template <typename T, typename = void>
-struct schedule_free;
-
-} // namespace traits
-namespace detail {
-
-struct no_schedule_free
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_SCHEDULE_FREE_TRAIT)
-
-template <typename T, typename = void>
-struct schedule_free_trait : no_schedule_free
-{
-};
-
-template <typename T>
-struct schedule_free_trait<T,
- typename void_type<
- decltype(schedule(declval<T>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(schedule(declval<T>()));
-
- ASIO_STATIC_CONSTEXPR(bool,
- is_noexcept = noexcept(schedule(declval<T>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_SCHEDULE_FREE_TRAIT)
-
-template <typename T, typename = void>
-struct schedule_free_trait :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_schedule_free,
- traits::schedule_free<typename add_const<T>::type>
- >::type,
- traits::schedule_free<typename remove_reference<T>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_SCHEDULE_FREE_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename>
-struct schedule_free_default :
- detail::schedule_free_trait<T>
-{
-};
-
-template <typename T, typename>
-struct schedule_free :
- schedule_free_default<T>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_SCHEDULE_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/schedule_member.hpp b/3rdparty/asio/include/asio/traits/schedule_member.hpp
deleted file mode 100644
index b2e6d568816..00000000000
--- a/3rdparty/asio/include/asio/traits/schedule_member.hpp
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// traits/schedule_member.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_SCHEDULE_MEMBER_HPP
-#define ASIO_TRAITS_SCHEDULE_MEMBER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_SCHEDULE_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename = void>
-struct schedule_member_default;
-
-template <typename T, typename = void>
-struct schedule_member;
-
-} // namespace traits
-namespace detail {
-
-struct no_schedule_member
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_SCHEDULE_MEMBER_TRAIT)
-
-template <typename T, typename = void>
-struct schedule_member_trait : no_schedule_member
-{
-};
-
-template <typename T>
-struct schedule_member_trait<T,
- typename void_type<
- decltype(declval<T>().schedule())
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(declval<T>().schedule());
-
- ASIO_STATIC_CONSTEXPR(bool,
- is_noexcept = noexcept(declval<T>().schedule()));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_SCHEDULE_MEMBER_TRAIT)
-
-template <typename T, typename = void>
-struct schedule_member_trait :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_schedule_member,
- traits::schedule_member<typename add_const<T>::type>
- >::type,
- traits::schedule_member<typename remove_reference<T>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_SCHEDULE_MEMBER_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename>
-struct schedule_member_default :
- detail::schedule_member_trait<T>
-{
-};
-
-template <typename T, typename>
-struct schedule_member :
- schedule_member_default<T>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_SCHEDULE_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/set_done_free.hpp b/3rdparty/asio/include/asio/traits/set_done_free.hpp
deleted file mode 100644
index f52e02c0d84..00000000000
--- a/3rdparty/asio/include/asio/traits/set_done_free.hpp
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// traits/set_done_free.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_SET_DONE_FREE_HPP
-#define ASIO_TRAITS_SET_DONE_FREE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_SET_DONE_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename = void>
-struct set_done_free_default;
-
-template <typename T, typename = void>
-struct set_done_free;
-
-} // namespace traits
-namespace detail {
-
-struct no_set_done_free
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_SET_DONE_FREE_TRAIT)
-
-template <typename T, typename = void>
-struct set_done_free_trait : no_set_done_free
-{
-};
-
-template <typename T>
-struct set_done_free_trait<T,
- typename void_type<
- decltype(set_done(declval<T>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(set_done(declval<T>()));
-
- ASIO_STATIC_CONSTEXPR(bool,
- is_noexcept = noexcept(set_done(declval<T>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_SET_DONE_FREE_TRAIT)
-
-template <typename T, typename = void>
-struct set_done_free_trait :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_set_done_free,
- traits::set_done_free<typename add_const<T>::type>
- >::type,
- traits::set_done_free<typename remove_reference<T>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_SET_DONE_FREE_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename>
-struct set_done_free_default :
- detail::set_done_free_trait<T>
-{
-};
-
-template <typename T, typename>
-struct set_done_free :
- set_done_free_default<T>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_SET_DONE_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/set_done_member.hpp b/3rdparty/asio/include/asio/traits/set_done_member.hpp
deleted file mode 100644
index 1ee9cdc3067..00000000000
--- a/3rdparty/asio/include/asio/traits/set_done_member.hpp
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// traits/set_done_member.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_SET_DONE_MEMBER_HPP
-#define ASIO_TRAITS_SET_DONE_MEMBER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename = void>
-struct set_done_member_default;
-
-template <typename T, typename = void>
-struct set_done_member;
-
-} // namespace traits
-namespace detail {
-
-struct no_set_done_member
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <typename T, typename = void>
-struct set_done_member_trait : no_set_done_member
-{
-};
-
-template <typename T>
-struct set_done_member_trait<T,
- typename void_type<
- decltype(declval<T>().set_done())
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(declval<T>().set_done());
-
- ASIO_STATIC_CONSTEXPR(bool,
- is_noexcept = noexcept(declval<T>().set_done()));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <typename T, typename = void>
-struct set_done_member_trait :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_set_done_member,
- traits::set_done_member<typename add_const<T>::type>
- >::type,
- traits::set_done_member<typename remove_reference<T>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename>
-struct set_done_member_default :
- detail::set_done_member_trait<T>
-{
-};
-
-template <typename T, typename>
-struct set_done_member :
- set_done_member_default<T>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_SET_DONE_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/set_error_free.hpp b/3rdparty/asio/include/asio/traits/set_error_free.hpp
deleted file mode 100644
index b7455be5025..00000000000
--- a/3rdparty/asio/include/asio/traits/set_error_free.hpp
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// traits/set_error_free.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_SET_ERROR_FREE_HPP
-#define ASIO_TRAITS_SET_ERROR_FREE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_SET_ERROR_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename E, typename = void>
-struct set_error_free_default;
-
-template <typename T, typename E, typename = void>
-struct set_error_free;
-
-} // namespace traits
-namespace detail {
-
-struct no_set_error_free
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_SET_ERROR_FREE_TRAIT)
-
-template <typename T, typename E, typename = void>
-struct set_error_free_trait : no_set_error_free
-{
-};
-
-template <typename T, typename E>
-struct set_error_free_trait<T, E,
- typename void_type<
- decltype(set_error(declval<T>(), declval<E>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(
- set_error(declval<T>(), declval<E>()));
-
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- set_error(declval<T>(), declval<E>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_SET_ERROR_FREE_TRAIT)
-
-template <typename T, typename E, typename = void>
-struct set_error_free_trait :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value
- && is_same<E, typename decay<E>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_set_error_free,
- traits::set_error_free<typename add_const<T>::type, E>
- >::type,
- traits::set_error_free<
- typename remove_reference<T>::type,
- typename decay<E>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_SET_ERROR_FREE_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename E, typename>
-struct set_error_free_default :
- detail::set_error_free_trait<T, E>
-{
-};
-
-template <typename T, typename E, typename>
-struct set_error_free :
- set_error_free_default<T, E>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_SET_ERROR_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/set_error_member.hpp b/3rdparty/asio/include/asio/traits/set_error_member.hpp
deleted file mode 100644
index b9ef63e03a0..00000000000
--- a/3rdparty/asio/include/asio/traits/set_error_member.hpp
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// traits/set_error_member.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_SET_ERROR_MEMBER_HPP
-#define ASIO_TRAITS_SET_ERROR_MEMBER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename E, typename = void>
-struct set_error_member_default;
-
-template <typename T, typename E, typename = void>
-struct set_error_member;
-
-} // namespace traits
-namespace detail {
-
-struct no_set_error_member
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename T, typename E, typename = void>
-struct set_error_member_trait : no_set_error_member
-{
-};
-
-template <typename T, typename E>
-struct set_error_member_trait<T, E,
- typename void_type<
- decltype(declval<T>().set_error(declval<E>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(
- declval<T>().set_error(declval<E>()));
-
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- declval<T>().set_error(declval<E>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename T, typename E, typename = void>
-struct set_error_member_trait :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value
- && is_same<E, typename decay<E>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_set_error_member,
- traits::set_error_member<typename add_const<T>::type, E>
- >::type,
- traits::set_error_member<
- typename remove_reference<T>::type,
- typename decay<E>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename E, typename>
-struct set_error_member_default :
- detail::set_error_member_trait<T, E>
-{
-};
-
-template <typename T, typename E, typename>
-struct set_error_member :
- set_error_member_default<T, E>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_SET_ERROR_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/set_value_free.hpp b/3rdparty/asio/include/asio/traits/set_value_free.hpp
deleted file mode 100644
index cb5b382754d..00000000000
--- a/3rdparty/asio/include/asio/traits/set_value_free.hpp
+++ /dev/null
@@ -1,234 +0,0 @@
-//
-// traits/set_value_free.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_SET_VALUE_FREE_HPP
-#define ASIO_TRAITS_SET_VALUE_FREE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename Vs, typename = void>
-struct set_value_free_default;
-
-template <typename T, typename Vs, typename = void>
-struct set_value_free;
-
-} // namespace traits
-namespace detail {
-
-struct no_set_value_free
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-template <typename T, typename Vs, typename = void>
-struct set_value_free_trait : no_set_value_free
-{
-};
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename... Vs>
-struct set_value_free_trait<T, void(Vs...),
- typename void_type<
- decltype(set_value(declval<T>(), declval<Vs>()...))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(
- set_value(declval<T>(), declval<Vs>()...));
-
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- set_value(declval<T>(), declval<Vs>()...)));
-};
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T>
-struct set_value_free_trait<T, void(),
- typename void_type<
- decltype(set_value(declval<T>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(set_value(declval<T>()));
-
- ASIO_STATIC_CONSTEXPR(bool,
- is_noexcept = noexcept(set_value(declval<T>())));
-};
-
-#define ASIO_PRIVATE_SET_VALUE_FREE_TRAIT_DEF(n) \
- template <typename T, ASIO_VARIADIC_TPARAMS(n)> \
- struct set_value_free_trait<T, void(ASIO_VARIADIC_TARGS(n)), \
- typename void_type< \
- decltype(set_value(declval<T>(), ASIO_VARIADIC_DECLVAL(n))) \
- >::type> \
- { \
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true); \
- \
- using result_type = decltype( \
- set_value(declval<T>(), ASIO_VARIADIC_DECLVAL(n))); \
- \
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept( \
- set_value(declval<T>(), ASIO_VARIADIC_DECLVAL(n)))); \
- }; \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SET_VALUE_FREE_TRAIT_DEF)
-#undef ASIO_PRIVATE_SET_VALUE_FREE_TRAIT_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#else // defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-template <typename T, typename Vs, typename = void>
-struct set_value_free_trait;
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename... Vs>
-struct set_value_free_trait<T, void(Vs...)> :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value
- && conjunction<is_same<Vs, typename decay<Vs>::type>...>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_set_value_free,
- traits::set_value_free<typename add_const<T>::type, void(Vs...)>
- >::type,
- traits::set_value_free<
- typename remove_reference<T>::type,
- void(typename decay<Vs>::type...)>
- >::type
-{
-};
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T>
-struct set_value_free_trait<T, void()> :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_set_value_free,
- traits::set_value_free<typename add_const<T>::type, void()>
- >::type,
- traits::set_value_free<typename remove_reference<T>::type, void()>
- >::type
-{
-};
-
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME(n) \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_##n
-
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_1 \
- && is_same<T1, typename decay<T1>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_2 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_1 \
- && is_same<T2, typename decay<T2>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_3 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_2 \
- && is_same<T3, typename decay<T3>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_4 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_3 \
- && is_same<T4, typename decay<T4>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_5 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_4 \
- && is_same<T5, typename decay<T5>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_6 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_5 \
- && is_same<T6, typename decay<T6>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_7 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_6 \
- && is_same<T7, typename decay<T7>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_8 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_7 \
- && is_same<T8, typename decay<T8>::type>::value
-
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_TRAIT_DEF(n) \
- template <typename T, ASIO_VARIADIC_TPARAMS(n)> \
- struct set_value_free_trait<T, void(ASIO_VARIADIC_TARGS(n))> : \
- conditional< \
- is_same<T, typename remove_reference<T>::type>::value \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME(n), \
- typename conditional< \
- is_same<T, typename add_const<T>::type>::value, \
- no_set_value_free, \
- traits::set_value_free< \
- typename add_const<T>::type, \
- void(ASIO_VARIADIC_TARGS(n))> \
- >::type, \
- traits::set_value_free< \
- typename remove_reference<T>::type, \
- void(ASIO_VARIADIC_DECAY(n))> \
- >::type \
- { \
- }; \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SET_VALUE_MEMBER_TRAIT_DEF)
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_TRAIT_DEF
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_1
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_2
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_3
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_4
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_5
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_6
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_7
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_8
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#endif // defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename Vs, typename>
-struct set_value_free_default :
- detail::set_value_free_trait<T, Vs>
-{
-};
-
-template <typename T, typename Vs, typename>
-struct set_value_free :
- set_value_free_default<T, Vs>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_SET_VALUE_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/set_value_member.hpp b/3rdparty/asio/include/asio/traits/set_value_member.hpp
deleted file mode 100644
index 6b0960713ee..00000000000
--- a/3rdparty/asio/include/asio/traits/set_value_member.hpp
+++ /dev/null
@@ -1,234 +0,0 @@
-//
-// traits/set_value_member.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_SET_VALUE_MEMBER_HPP
-#define ASIO_TRAITS_SET_VALUE_MEMBER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-#include "asio/detail/variadic_templates.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename Vs, typename = void>
-struct set_value_member_default;
-
-template <typename T, typename Vs, typename = void>
-struct set_value_member;
-
-} // namespace traits
-namespace detail {
-
-struct no_set_value_member
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-template <typename T, typename Vs, typename = void>
-struct set_value_member_trait : no_set_value_member
-{
-};
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename... Vs>
-struct set_value_member_trait<T, void(Vs...),
- typename void_type<
- decltype(declval<T>().set_value(declval<Vs>()...))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(
- declval<T>().set_value(declval<Vs>()...));
-
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- declval<T>().set_value(declval<Vs>()...)));
-};
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T>
-struct set_value_member_trait<T, void(),
- typename void_type<
- decltype(declval<T>().set_value())
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(declval<T>().set_value());
-
- ASIO_STATIC_CONSTEXPR(bool,
- is_noexcept = noexcept(declval<T>().set_value()));
-};
-
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_TRAIT_DEF(n) \
- template <typename T, ASIO_VARIADIC_TPARAMS(n)> \
- struct set_value_member_trait<T, void(ASIO_VARIADIC_TARGS(n)), \
- typename void_type< \
- decltype(declval<T>().set_value(ASIO_VARIADIC_DECLVAL(n))) \
- >::type> \
- { \
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true); \
- \
- using result_type = decltype( \
- declval<T>().set_value(ASIO_VARIADIC_DECLVAL(n))); \
- \
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept( \
- declval<T>().set_value(ASIO_VARIADIC_DECLVAL(n)))); \
- }; \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SET_VALUE_MEMBER_TRAIT_DEF)
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_TRAIT_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#else // defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-template <typename T, typename Vs, typename = void>
-struct set_value_member_trait;
-
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename... Vs>
-struct set_value_member_trait<T, void(Vs...)> :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value
- && conjunction<is_same<Vs, typename decay<Vs>::type>...>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_set_value_member,
- traits::set_value_member<typename add_const<T>::type, void(Vs...)>
- >::type,
- traits::set_value_member<
- typename remove_reference<T>::type,
- void(typename decay<Vs>::type...)>
- >::type
-{
-};
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T>
-struct set_value_member_trait<T, void()> :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_set_value_member,
- traits::set_value_member<typename add_const<T>::type, void()>
- >::type,
- traits::set_value_member<typename remove_reference<T>::type, void()>
- >::type
-{
-};
-
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME(n) \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_##n
-
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_1 \
- && is_same<T1, typename decay<T1>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_2 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_1 \
- && is_same<T2, typename decay<T2>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_3 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_2 \
- && is_same<T3, typename decay<T3>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_4 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_3 \
- && is_same<T4, typename decay<T4>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_5 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_4 \
- && is_same<T5, typename decay<T5>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_6 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_5 \
- && is_same<T6, typename decay<T6>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_7 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_6 \
- && is_same<T7, typename decay<T7>::type>::value
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_8 \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_7 \
- && is_same<T8, typename decay<T8>::type>::value
-
-#define ASIO_PRIVATE_SET_VALUE_MEMBER_TRAIT_DEF(n) \
- template <typename T, ASIO_VARIADIC_TPARAMS(n)> \
- struct set_value_member_trait<T, void(ASIO_VARIADIC_TARGS(n))> : \
- conditional< \
- is_same<T, typename remove_reference<T>::type>::value \
- ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME(n), \
- typename conditional< \
- is_same<T, typename add_const<T>::type>::value, \
- no_set_value_member, \
- traits::set_value_member< \
- typename add_const<T>::type, \
- void(ASIO_VARIADIC_TARGS(n))> \
- >::type, \
- traits::set_value_member< \
- typename remove_reference<T>::type, \
- void(ASIO_VARIADIC_DECAY(n))> \
- >::type \
- { \
- }; \
- /**/
-ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SET_VALUE_MEMBER_TRAIT_DEF)
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_TRAIT_DEF
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_1
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_2
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_3
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_4
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_5
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_6
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_7
-#undef ASIO_PRIVATE_SET_VALUE_MEMBER_IS_SAME_8
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-#endif // defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename Vs, typename>
-struct set_value_member_default :
- detail::set_value_member_trait<T, Vs>
-{
-};
-
-template <typename T, typename Vs, typename>
-struct set_value_member :
- set_value_member_default<T, Vs>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_SET_VALUE_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/start_free.hpp b/3rdparty/asio/include/asio/traits/start_free.hpp
deleted file mode 100644
index 2489b97c60d..00000000000
--- a/3rdparty/asio/include/asio/traits/start_free.hpp
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// traits/start_free.hpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_START_FREE_HPP
-#define ASIO_TRAITS_START_FREE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_START_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename = void>
-struct start_free_default;
-
-template <typename T, typename = void>
-struct start_free;
-
-} // namespace traits
-namespace detail {
-
-struct no_start_free
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_START_FREE_TRAIT)
-
-template <typename T, typename = void>
-struct start_free_trait : no_start_free
-{
-};
-
-template <typename T>
-struct start_free_trait<T,
- typename void_type<
- decltype(start(declval<T>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(start(declval<T>()));
-
- ASIO_STATIC_CONSTEXPR(bool,
- is_noexcept = noexcept(start(declval<T>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_START_FREE_TRAIT)
-
-template <typename T, typename = void>
-struct start_free_trait :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_start_free,
- traits::start_free<typename add_const<T>::type>
- >::type,
- traits::start_free<typename remove_reference<T>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_START_FREE_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename>
-struct start_free_default :
- detail::start_free_trait<T>
-{
-};
-
-template <typename T, typename>
-struct start_free :
- start_free_default<T>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_START_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/start_member.hpp b/3rdparty/asio/include/asio/traits/start_member.hpp
deleted file mode 100644
index cb5d2c16736..00000000000
--- a/3rdparty/asio/include/asio/traits/start_member.hpp
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// traits/start_member.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_START_MEMBER_HPP
-#define ASIO_TRAITS_START_MEMBER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_START_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename T, typename = void>
-struct start_member_default;
-
-template <typename T, typename = void>
-struct start_member;
-
-} // namespace traits
-namespace detail {
-
-struct no_start_member
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-template <typename T, typename = void>
-struct start_member_trait : no_start_member
-{
-};
-
-template <typename T>
-struct start_member_trait<T,
- typename void_type<
- decltype(declval<T>().start())
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(declval<T>().start());
-
- ASIO_STATIC_CONSTEXPR(bool,
- is_noexcept = noexcept(declval<T>().start()));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-template <typename T, typename = void>
-struct start_member_trait :
- conditional<
- is_same<T, typename remove_reference<T>::type>::value,
- typename conditional<
- is_same<T, typename add_const<T>::type>::value,
- no_start_member,
- traits::start_member<typename add_const<T>::type>
- >::type,
- traits::start_member<typename remove_reference<T>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename T, typename>
-struct start_member_default :
- detail::start_member_trait<T>
-{
-};
-
-template <typename T, typename>
-struct start_member :
- start_member_default<T>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_START_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/traits/static_query.hpp b/3rdparty/asio/include/asio/traits/static_query.hpp
index d2a96aae85d..b177a9d5304 100644
--- a/3rdparty/asio/include/asio/traits/static_query.hpp
+++ b/3rdparty/asio/include/asio/traits/static_query.hpp
@@ -2,7 +2,7 @@
// traits/static_query.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,16 +18,10 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_CONSTEXPR) \
- && defined(ASIO_HAS_VARIABLE_TEMPLATES) \
+#if defined(ASIO_HAS_VARIABLE_TEMPLATES) \
&& defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
# define ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_CONSTEXPR)
- // && defined(ASIO_HAS_VARIABLE_TEMPLATES)
+#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
// && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
#include "asio/detail/push_options.hpp"
@@ -46,20 +40,20 @@ namespace detail {
struct no_static_query
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = false;
+ static constexpr bool is_noexcept = false;
};
template <typename T, typename Property, typename = void>
struct static_query_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_static_query,
traits::static_query<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
@@ -67,21 +61,21 @@ struct static_query_trait :
template <typename T, typename Property>
struct static_query_trait<T, Property,
- typename void_type<
- decltype(decay<Property>::type::template static_query_v<T>)
- >::type>
+ void_t<
+ decltype(decay_t<Property>::template static_query_v<T>)
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
using result_type = decltype(
- decay<Property>::type::template static_query_v<T>);
+ decay_t<Property>::template static_query_v<T>);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept =
- noexcept(decay<Property>::type::template static_query_v<T>));
+ static constexpr bool is_noexcept =
+ noexcept(decay_t<Property>::template static_query_v<T>);
- static ASIO_CONSTEXPR result_type value() noexcept(is_noexcept)
+ static constexpr result_type value() noexcept(is_noexcept)
{
- return decay<Property>::type::template static_query_v<T>;
+ return decay_t<Property>::template static_query_v<T>;
}
};
diff --git a/3rdparty/asio/include/asio/traits/static_require.hpp b/3rdparty/asio/include/asio/traits/static_require.hpp
index e30c2d101c5..4ef4a617390 100644
--- a/3rdparty/asio/include/asio/traits/static_require.hpp
+++ b/3rdparty/asio/include/asio/traits/static_require.hpp
@@ -2,7 +2,7 @@
// traits/static_require.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,11 +19,7 @@
#include "asio/detail/type_traits.hpp"
#include "asio/traits/static_query.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT)
-# define ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
+#define ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT 1
#include "asio/detail/push_options.hpp"
@@ -41,33 +37,31 @@ namespace detail {
struct no_static_require
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
+ static constexpr bool is_valid = false;
};
template <typename T, typename Property, typename = void>
struct static_require_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_static_require,
traits::static_require<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
-#if defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
template <typename T, typename Property>
struct static_require_trait<T, Property,
- typename enable_if<
- decay<Property>::type::value() == traits::static_query<T, Property>::value()
- >::type>
+ enable_if_t<
+ decay_t<Property>::value() == traits::static_query<T, Property>::value()
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
};
#else // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
@@ -76,32 +70,30 @@ false_type static_require_test(...);
template <typename T, typename Property>
true_type static_require_test(T*, Property*,
- typename enable_if<
+ enable_if_t<
Property::value() == traits::static_query<T, Property>::value()
- >::type* = 0);
+ >* = 0);
template <typename T, typename Property>
struct has_static_require
{
- ASIO_STATIC_CONSTEXPR(bool, value =
+ static constexpr bool value =
decltype((static_require_test)(
- static_cast<T*>(0), static_cast<Property*>(0)))::value);
+ static_cast<T*>(0), static_cast<Property*>(0)))::value;
};
template <typename T, typename Property>
struct static_require_trait<T, Property,
- typename enable_if<
- has_static_require<typename decay<T>::type,
- typename decay<Property>::type>::value
- >::type>
+ enable_if_t<
+ has_static_require<decay_t<T>,
+ decay_t<Property>>::value
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
};
#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-#endif // defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT)
-
} // namespace detail
namespace traits {
diff --git a/3rdparty/asio/include/asio/traits/static_require_concept.hpp b/3rdparty/asio/include/asio/traits/static_require_concept.hpp
index d35287d4db4..6861f46aa0d 100644
--- a/3rdparty/asio/include/asio/traits/static_require_concept.hpp
+++ b/3rdparty/asio/include/asio/traits/static_require_concept.hpp
@@ -2,7 +2,7 @@
// traits/static_require_concept.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,11 +19,7 @@
#include "asio/detail/type_traits.hpp"
#include "asio/traits/static_query.hpp"
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT)
-# define ASIO_HAS_DEDUCED_STATIC_REQUIRE_CONCEPT_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
+#define ASIO_HAS_DEDUCED_STATIC_REQUIRE_CONCEPT_TRAIT 1
#include "asio/detail/push_options.hpp"
@@ -41,33 +37,31 @@ namespace detail {
struct no_static_require_concept
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
+ static constexpr bool is_valid = false;
};
template <typename T, typename Property, typename = void>
struct static_require_concept_trait :
- conditional<
- is_same<T, typename decay<T>::type>::value
- && is_same<Property, typename decay<Property>::type>::value,
+ conditional_t<
+ is_same<T, decay_t<T>>::value
+ && is_same<Property, decay_t<Property>>::value,
no_static_require_concept,
traits::static_require_concept<
- typename decay<T>::type,
- typename decay<Property>::type>
- >::type
+ decay_t<T>,
+ decay_t<Property>>
+ >
{
};
-#if defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_CONCEPT_TRAIT)
-
#if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
template <typename T, typename Property>
struct static_require_concept_trait<T, Property,
- typename enable_if<
- decay<Property>::type::value() == traits::static_query<T, Property>::value()
- >::type>
+ enable_if_t<
+ decay_t<Property>::value() == traits::static_query<T, Property>::value()
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
};
#else // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
@@ -76,32 +70,30 @@ false_type static_require_concept_test(...);
template <typename T, typename Property>
true_type static_require_concept_test(T*, Property*,
- typename enable_if<
+ enable_if_t<
Property::value() == traits::static_query<T, Property>::value()
- >::type* = 0);
+ >* = 0);
template <typename T, typename Property>
struct has_static_require_concept
{
- ASIO_STATIC_CONSTEXPR(bool, value =
+ static constexpr bool value =
decltype((static_require_concept_test)(
- static_cast<T*>(0), static_cast<Property*>(0)))::value);
+ static_cast<T*>(0), static_cast<Property*>(0)))::value;
};
template <typename T, typename Property>
struct static_require_concept_trait<T, Property,
- typename enable_if<
- has_static_require_concept<typename decay<T>::type,
- typename decay<Property>::type>::value
- >::type>
+ enable_if_t<
+ has_static_require_concept<decay_t<T>,
+ decay_t<Property>>::value
+ >>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
+ static constexpr bool is_valid = true;
};
#endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-#endif // defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_CONCEPT_TRAIT)
-
} // namespace detail
namespace traits {
diff --git a/3rdparty/asio/include/asio/traits/submit_free.hpp b/3rdparty/asio/include/asio/traits/submit_free.hpp
deleted file mode 100644
index 1ea583e7109..00000000000
--- a/3rdparty/asio/include/asio/traits/submit_free.hpp
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// traits/submit_free.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_SUBMIT_FREE_HPP
-#define ASIO_TRAITS_SUBMIT_FREE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_SUBMIT_FREE_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename S, typename R, typename = void>
-struct submit_free_default;
-
-template <typename S, typename R, typename = void>
-struct submit_free;
-
-} // namespace traits
-namespace detail {
-
-struct no_submit_free
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_SUBMIT_FREE_TRAIT)
-
-template <typename S, typename R, typename = void>
-struct submit_free_trait : no_submit_free
-{
-};
-
-template <typename S, typename R>
-struct submit_free_trait<S, R,
- typename void_type<
- decltype(submit(declval<S>(), declval<R>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(
- submit(declval<S>(), declval<R>()));
-
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- submit(declval<S>(), declval<R>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_SUBMIT_FREE_TRAIT)
-
-template <typename S, typename R, typename = void>
-struct submit_free_trait :
- conditional<
- is_same<S, typename remove_reference<S>::type>::value
- && is_same<R, typename decay<R>::type>::value,
- typename conditional<
- is_same<S, typename add_const<S>::type>::value,
- no_submit_free,
- traits::submit_free<typename add_const<S>::type, R>
- >::type,
- traits::submit_free<
- typename remove_reference<S>::type,
- typename decay<R>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_SUBMIT_FREE_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename S, typename R, typename>
-struct submit_free_default :
- detail::submit_free_trait<S, R>
-{
-};
-
-template <typename S, typename R, typename>
-struct submit_free :
- submit_free_default<S, R>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_SUBMIT_FREE_HPP
diff --git a/3rdparty/asio/include/asio/traits/submit_member.hpp b/3rdparty/asio/include/asio/traits/submit_member.hpp
deleted file mode 100644
index 8aa42a02778..00000000000
--- a/3rdparty/asio/include/asio/traits/submit_member.hpp
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// traits/submit_member.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 ASIO_TRAITS_SUBMIT_MEMBER_HPP
-#define ASIO_TRAITS_SUBMIT_MEMBER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include "asio/detail/config.hpp"
-#include "asio/detail/type_traits.hpp"
-
-#if defined(ASIO_HAS_DECLTYPE) \
- && defined(ASIO_HAS_NOEXCEPT) \
- && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-# define ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT 1
-#endif // defined(ASIO_HAS_DECLTYPE)
- // && defined(ASIO_HAS_NOEXCEPT)
- // && defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE)
-
-#include "asio/detail/push_options.hpp"
-
-namespace asio {
-namespace traits {
-
-template <typename S, typename R, typename = void>
-struct submit_member_default;
-
-template <typename S, typename R, typename = void>
-struct submit_member;
-
-} // namespace traits
-namespace detail {
-
-struct no_submit_member
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
-};
-
-#if defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-template <typename S, typename R, typename = void>
-struct submit_member_trait : no_submit_member
-{
-};
-
-template <typename S, typename R>
-struct submit_member_trait<S, R,
- typename void_type<
- decltype(declval<S>().submit(declval<R>()))
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
-
- using result_type = decltype(
- declval<S>().submit(declval<R>()));
-
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = noexcept(
- declval<S>().submit(declval<R>())));
-};
-
-#else // defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-template <typename S, typename R, typename = void>
-struct submit_member_trait :
- conditional<
- is_same<S, typename remove_reference<S>::type>::value
- && is_same<R, typename decay<R>::type>::value,
- typename conditional<
- is_same<S, typename add_const<S>::type>::value,
- no_submit_member,
- traits::submit_member<typename add_const<S>::type, R>
- >::type,
- traits::submit_member<
- typename remove_reference<S>::type,
- typename decay<R>::type>
- >::type
-{
-};
-
-#endif // defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-} // namespace detail
-namespace traits {
-
-template <typename S, typename R, typename>
-struct submit_member_default :
- detail::submit_member_trait<S, R>
-{
-};
-
-template <typename S, typename R, typename>
-struct submit_member :
- submit_member_default<S, R>
-{
-};
-
-} // namespace traits
-} // namespace asio
-
-#include "asio/detail/pop_options.hpp"
-
-#endif // ASIO_TRAITS_SUBMIT_MEMBER_HPP
diff --git a/3rdparty/asio/include/asio/ts/buffer.hpp b/3rdparty/asio/include/asio/ts/buffer.hpp
index 9c16febc79c..6c74a50ca66 100644
--- a/3rdparty/asio/include/asio/ts/buffer.hpp
+++ b/3rdparty/asio/include/asio/ts/buffer.hpp
@@ -2,7 +2,7 @@
// ts/buffer.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ts/executor.hpp b/3rdparty/asio/include/asio/ts/executor.hpp
index 66c318d3824..df28bbf44bb 100644
--- a/3rdparty/asio/include/asio/ts/executor.hpp
+++ b/3rdparty/asio/include/asio/ts/executor.hpp
@@ -2,7 +2,7 @@
// ts/executor.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ts/internet.hpp b/3rdparty/asio/include/asio/ts/internet.hpp
index a2a3212968d..eb2c35cd628 100644
--- a/3rdparty/asio/include/asio/ts/internet.hpp
+++ b/3rdparty/asio/include/asio/ts/internet.hpp
@@ -2,7 +2,7 @@
// ts/internet.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ts/io_context.hpp b/3rdparty/asio/include/asio/ts/io_context.hpp
index 7ce08f56727..c688f160e7a 100644
--- a/3rdparty/asio/include/asio/ts/io_context.hpp
+++ b/3rdparty/asio/include/asio/ts/io_context.hpp
@@ -2,7 +2,7 @@
// ts/io_context.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ts/net.hpp b/3rdparty/asio/include/asio/ts/net.hpp
index c4a1b7352ec..f82113b930a 100644
--- a/3rdparty/asio/include/asio/ts/net.hpp
+++ b/3rdparty/asio/include/asio/ts/net.hpp
@@ -2,7 +2,7 @@
// ts/net.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ts/netfwd.hpp b/3rdparty/asio/include/asio/ts/netfwd.hpp
index 1c5924d7ece..a575b6e497a 100644
--- a/3rdparty/asio/include/asio/ts/netfwd.hpp
+++ b/3rdparty/asio/include/asio/ts/netfwd.hpp
@@ -2,7 +2,7 @@
// ts/netfwd.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,10 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
-
-#if defined(ASIO_HAS_CHRONO)
-# include "asio/detail/chrono.hpp"
-#endif // defined(ASIO_HAS_CHRONO)
+#include "asio/detail/chrono.hpp"
#if defined(ASIO_HAS_BOOST_DATE_TIME)
# include "asio/detail/date_time_fwd.hpp"
@@ -66,20 +63,9 @@ namespace execution {
#if !defined(ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL)
#define ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
template <typename... SupportableProperties>
class any_executor;
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename = void, typename = void, typename = void,
- typename = void, typename = void, typename = void,
- typename = void, typename = void, typename = void>
-class any_executor;
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
#endif // !defined(ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL)
template <typename U>
@@ -119,8 +105,6 @@ class basic_waitable_timer;
#endif // !defined(ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
-#if defined(ASIO_HAS_CHRONO)
-
typedef basic_waitable_timer<chrono::system_clock> system_timer;
typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
@@ -128,8 +112,6 @@ typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
typedef basic_waitable_timer<chrono::high_resolution_clock>
high_resolution_timer;
-#endif // defined(ASIO_HAS_CHRONO)
-
#if !defined(ASIO_BASIC_SOCKET_FWD_DECL)
#define ASIO_BASIC_SOCKET_FWD_DECL
@@ -171,10 +153,10 @@ template <typename Protocol,
#if defined(ASIO_HAS_BOOST_DATE_TIME) \
|| defined(GENERATING_DOCUMENTATION)
typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock> >
+ typename WaitTraits = time_traits<Clock>>
#else
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock> >
+ typename WaitTraits = wait_traits<Clock>>
#endif
class basic_socket_streambuf;
@@ -188,10 +170,10 @@ template <typename Protocol,
#if defined(ASIO_HAS_BOOST_DATE_TIME) \
|| defined(GENERATING_DOCUMENTATION)
typename Clock = boost::posix_time::ptime,
- typename WaitTraits = time_traits<Clock> >
+ typename WaitTraits = time_traits<Clock>>
#else
typename Clock = chrono::steady_clock,
- typename WaitTraits = wait_traits<Clock> >
+ typename WaitTraits = wait_traits<Clock>>
#endif
class basic_socket_iostream;
diff --git a/3rdparty/asio/include/asio/ts/socket.hpp b/3rdparty/asio/include/asio/ts/socket.hpp
index 62578fcb522..d54e0778264 100644
--- a/3rdparty/asio/include/asio/ts/socket.hpp
+++ b/3rdparty/asio/include/asio/ts/socket.hpp
@@ -2,7 +2,7 @@
// ts/socket.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/ts/timer.hpp b/3rdparty/asio/include/asio/ts/timer.hpp
index 4d58373430f..3b3d6facf11 100644
--- a/3rdparty/asio/include/asio/ts/timer.hpp
+++ b/3rdparty/asio/include/asio/ts/timer.hpp
@@ -2,7 +2,7 @@
// ts/timer.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/unyield.hpp b/3rdparty/asio/include/asio/unyield.hpp
index 983a000546e..f843d6137a2 100644
--- a/3rdparty/asio/include/asio/unyield.hpp
+++ b/3rdparty/asio/include/asio/unyield.hpp
@@ -2,7 +2,7 @@
// unyield.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/use_awaitable.hpp b/3rdparty/asio/include/asio/use_awaitable.hpp
index 14e5ec1dc4f..6dd42f3d6e3 100644
--- a/3rdparty/asio/include/asio/use_awaitable.hpp
+++ b/3rdparty/asio/include/asio/use_awaitable.hpp
@@ -2,7 +2,7 @@
// use_awaitable.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -32,7 +32,7 @@
namespace asio {
-/// A completion token that represents the currently executing coroutine.
+/// A @ref completion_token that represents the currently executing coroutine.
/**
* The @c use_awaitable_t class, with its value @c use_awaitable, is used to
* represent the currently executing coroutine. This completion token may be
@@ -53,7 +53,7 @@ template <typename Executor = any_io_executor>
struct use_awaitable_t
{
/// Default constructor.
- ASIO_CONSTEXPR use_awaitable_t(
+ constexpr use_awaitable_t(
#if defined(ASIO_ENABLE_HANDLER_TRACKING)
# if defined(ASIO_HAS_SOURCE_LOCATION)
detail::source_location location = detail::source_location::current()
@@ -75,7 +75,7 @@ struct use_awaitable_t
}
/// Constructor used to specify file name, line, and function name.
- ASIO_CONSTEXPR use_awaitable_t(const char* file_name,
+ constexpr use_awaitable_t(const char* file_name,
int line, const char* function_name)
#if defined(ASIO_ENABLE_HANDLER_TRACKING)
: file_name_(file_name),
@@ -101,13 +101,13 @@ struct use_awaitable_t
/// Construct the adapted executor from the inner executor type.
template <typename InnerExecutor1>
executor_with_default(const InnerExecutor1& ex,
- typename constraint<
- conditional<
+ constraint_t<
+ conditional_t<
!is_same<InnerExecutor1, executor_with_default>::value,
is_convertible<InnerExecutor1, InnerExecutor>,
false_type
- >::type::value
- >::type = 0) ASIO_NOEXCEPT
+ >::value
+ > = 0) noexcept
: InnerExecutor(ex)
{
}
@@ -115,25 +115,21 @@ struct use_awaitable_t
/// Type alias to adapt an I/O object to use @c use_awaitable_t as its
/// default completion token type.
-#if defined(ASIO_HAS_ALIAS_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
template <typename T>
using as_default_on_t = typename T::template rebind_executor<
- executor_with_default<typename T::executor_type> >::other;
-#endif // defined(ASIO_HAS_ALIAS_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
+ executor_with_default<typename T::executor_type>>::other;
/// Function helper to adapt an I/O object to use @c use_awaitable_t as its
/// default completion token type.
template <typename T>
- static typename decay<T>::type::template rebind_executor<
- executor_with_default<typename decay<T>::type::executor_type>
+ static typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
>::other
- as_default_on(ASIO_MOVE_ARG(T) object)
+ as_default_on(T&& object)
{
- return typename decay<T>::type::template rebind_executor<
- executor_with_default<typename decay<T>::type::executor_type>
- >::other(ASIO_MOVE_CAST(T)(object));
+ return typename decay_t<T>::template rebind_executor<
+ executor_with_default<typename decay_t<T>::executor_type>
+ >::other(static_cast<T&&>(object));
}
#if defined(ASIO_ENABLE_HANDLER_TRACKING)
@@ -143,16 +139,15 @@ struct use_awaitable_t
#endif // defined(ASIO_ENABLE_HANDLER_TRACKING)
};
-/// A completion token object that represents the currently executing coroutine.
+/// A @ref completion_token object that represents the currently executing
+/// coroutine.
/**
* See the documentation for asio::use_awaitable_t for a usage example.
*/
#if defined(GENERATING_DOCUMENTATION)
constexpr use_awaitable_t<> use_awaitable;
-#elif defined(ASIO_HAS_CONSTEXPR)
+#else
constexpr use_awaitable_t<> use_awaitable(0, 0, 0);
-#elif defined(ASIO_MSVC)
-__declspec(selectany) use_awaitable_t<> use_awaitable(0, 0, 0);
#endif
} // namespace asio
diff --git a/3rdparty/asio/include/asio/use_future.hpp b/3rdparty/asio/include/asio/use_future.hpp
index dfef15c89ef..26f5ae1fed0 100644
--- a/3rdparty/asio/include/asio/use_future.hpp
+++ b/3rdparty/asio/include/asio/use_future.hpp
@@ -2,7 +2,7 @@
// use_future.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -37,12 +37,14 @@ class packaged_handler;
} // namespace detail
-/// Class used to specify that an asynchronous operation should return a future.
+/// A @ref completion_token type that causes an asynchronous operation to return
+/// a future.
/**
- * The use_future_t class is used to indicate that an asynchronous operation
- * should return a std::future object. A use_future_t object may be passed as a
- * handler to an asynchronous operation, typically using the special value @c
- * asio::use_future. For example:
+ * The use_future_t class is a completion token type that is used to indicate
+ * that an asynchronous operation should return a std::future object. A
+ * use_future_t object may be passed as a completion token to an asynchronous
+ * operation, typically using the special value @c asio::use_future. For
+ * example:
*
* @code std::future<std::size_t> my_future
* = my_socket.async_read_some(my_buffer, asio::use_future); @endcode
@@ -52,7 +54,7 @@ class packaged_handler;
* completes with an error_code indicating failure, it is converted into a
* system_error and passed back to the caller via the future.
*/
-template <typename Allocator = std::allocator<void> >
+template <typename Allocator = std::allocator<void>>
class use_future_t
{
public:
@@ -61,7 +63,7 @@ public:
typedef Allocator allocator_type;
/// Construct using default-constructed allocator.
- ASIO_CONSTEXPR use_future_t()
+ constexpr use_future_t()
{
}
@@ -114,16 +116,16 @@ public:
#if defined(GENERATING_DOCUMENTATION)
unspecified
#else // defined(GENERATING_DOCUMENTATION)
- detail::packaged_token<typename decay<Function>::type, Allocator>
+ detail::packaged_token<decay_t<Function>, Allocator>
#endif // defined(GENERATING_DOCUMENTATION)
- operator()(ASIO_MOVE_ARG(Function) f) const;
+ operator()(Function&& f) const;
private:
// Helper type to ensure that use_future can be constexpr default-constructed
// even when std::allocator<void> can't be.
struct std_allocator_void
{
- ASIO_CONSTEXPR std_allocator_void()
+ constexpr std_allocator_void()
{
}
@@ -133,20 +135,17 @@ private:
}
};
- typename conditional<
+ conditional_t<
is_same<std::allocator<void>, Allocator>::value,
- std_allocator_void, Allocator>::type allocator_;
+ std_allocator_void, Allocator> allocator_;
};
-/// A special value, similar to std::nothrow.
+/// A @ref completion_token object that causes an asynchronous operation to
+/// return a future.
/**
* See the documentation for asio::use_future_t for a usage example.
*/
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr use_future_t<> use_future;
-#elif defined(ASIO_MSVC)
-__declspec(selectany) use_future_t<> use_future;
-#endif
} // namespace asio
diff --git a/3rdparty/asio/include/asio/uses_executor.hpp b/3rdparty/asio/include/asio/uses_executor.hpp
index 5232f6c203a..ff475cad4a1 100644
--- a/3rdparty/asio/include/asio/uses_executor.hpp
+++ b/3rdparty/asio/include/asio/uses_executor.hpp
@@ -2,7 +2,7 @@
// uses_executor.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -34,7 +34,7 @@ namespace asio {
struct executor_arg_t
{
/// Constructor.
- ASIO_CONSTEXPR executor_arg_t() ASIO_NOEXCEPT
+ constexpr executor_arg_t() noexcept
{
}
};
@@ -45,11 +45,7 @@ struct executor_arg_t
* See asio::executor_arg_t and asio::uses_executor
* for more information.
*/
-#if defined(ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
constexpr executor_arg_t executor_arg;
-#elif defined(ASIO_MSVC)
-__declspec(selectany) executor_arg_t executor_arg;
-#endif
/// The uses_executor trait detects whether a type T has an associated executor
/// that is convertible from type Executor.
diff --git a/3rdparty/asio/include/asio/version.hpp b/3rdparty/asio/include/asio/version.hpp
index cb8bf03f5f4..c52fdd45b58 100644
--- a/3rdparty/asio/include/asio/version.hpp
+++ b/3rdparty/asio/include/asio/version.hpp
@@ -2,7 +2,7 @@
// version.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,6 +18,6 @@
// ASIO_VERSION % 100 is the sub-minor version
// ASIO_VERSION / 100 % 1000 is the minor version
// ASIO_VERSION / 100000 is the major version
-#define ASIO_VERSION 102000 // 1.20.0
+#define ASIO_VERSION 103002 // 1.30.2
#endif // ASIO_VERSION_HPP
diff --git a/3rdparty/asio/include/asio/wait_traits.hpp b/3rdparty/asio/include/asio/wait_traits.hpp
index 152fcece073..5f5e876da66 100644
--- a/3rdparty/asio/include/asio/wait_traits.hpp
+++ b/3rdparty/asio/include/asio/wait_traits.hpp
@@ -2,7 +2,7 @@
// wait_traits.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/windows/basic_object_handle.hpp b/3rdparty/asio/include/asio/windows/basic_object_handle.hpp
index f929e04e72c..bb10efc2a0a 100644
--- a/3rdparty/asio/include/asio/windows/basic_object_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/basic_object_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_object_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -21,6 +21,7 @@
#if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
|| defined(GENERATING_DOCUMENTATION)
+#include <utility>
#include "asio/any_io_executor.hpp"
#include "asio/async_result.hpp"
#include "asio/detail/io_object_impl.hpp"
@@ -29,10 +30,6 @@
#include "asio/error.hpp"
#include "asio/execution_context.hpp"
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -50,6 +47,9 @@ namespace windows {
template <typename Executor = any_io_executor>
class basic_object_handle
{
+private:
+ class initiate_async_wait;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -96,10 +96,10 @@ public:
*/
template <typename ExecutionContext>
explicit basic_object_handle(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: impl_(0, 0, context)
{
}
@@ -142,9 +142,9 @@ public:
template <typename ExecutionContext>
basic_object_handle(ExecutionContext& context,
const native_handle_type& native_handle,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -152,7 +152,6 @@ public:
asio::detail::throw_error(ec, "assign");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct an object handle from another.
/**
* This constructor moves an object handle from one object to another.
@@ -185,10 +184,55 @@ public:
impl_ = std::move(other.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ // All handles have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_object_handle;
+
+ /// Move-construct an object handle from a handle of another executor type.
+ /**
+ * This constructor moves an object handle from one object to another.
+ *
+ * @param other The other object handle object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_object_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ basic_object_handle(basic_object_handle<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign an object handle from a handle of another executor type.
+ /**
+ * This assignment operator moves an object handle from one object to another.
+ *
+ * @param other The other object handle object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_object_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_object_handle&
+ > operator=(basic_object_handle<Executor1>&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
return impl_.get_executor();
}
@@ -357,36 +401,42 @@ public:
/// Start an asynchronous wait on the object handle.
/**
* This function is be used to initiate an asynchronous wait against the
- * object handle. It always returns immediately.
+ * object handle. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately.
*
- * @param handler The handler to be called when the object handle is set to
- * the signalled state. Copies will be made of the handler as required. The
- * function signature of the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the wait completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error // Result of operation.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
+ *
+ * @par Completion Signature
+ * @code void(asio::error_code) @endcode
*/
template <
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code))
- WaitHandler ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WaitHandler,
- void (asio::error_code))
- async_wait(
- ASIO_MOVE_ARG(WaitHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ WaitToken = default_completion_token_t<executor_type>>
+ auto async_wait(
+ WaitToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WaitToken, void (asio::error_code)>(
+ declval<initiate_async_wait>(), token))
{
- return async_initiate<WaitHandler, void (asio::error_code)>(
- initiate_async_wait(this), handler);
+ return async_initiate<WaitToken, void (asio::error_code)>(
+ initiate_async_wait(this), token);
}
private:
// Disallow copying and assignment.
- basic_object_handle(const basic_object_handle&) ASIO_DELETED;
- basic_object_handle& operator=(const basic_object_handle&) ASIO_DELETED;
+ basic_object_handle(const basic_object_handle&) = delete;
+ basic_object_handle& operator=(const basic_object_handle&) = delete;
class initiate_async_wait
{
@@ -398,13 +448,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WaitHandler>
- void operator()(ASIO_MOVE_ARG(WaitHandler) handler) const
+ void operator()(WaitHandler&& handler) const
{
// If you get an error on the following line it means that your handler
// does not meet the documented type requirements for a WaitHandler.
diff --git a/3rdparty/asio/include/asio/windows/basic_overlapped_handle.hpp b/3rdparty/asio/include/asio/windows/basic_overlapped_handle.hpp
index 29154b036a3..8b8475b0006 100644
--- a/3rdparty/asio/include/asio/windows/basic_overlapped_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/basic_overlapped_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_overlapped_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,6 +22,7 @@
|| defined(GENERATING_DOCUMENTATION)
#include <cstddef>
+#include <utility>
#include "asio/any_io_executor.hpp"
#include "asio/async_result.hpp"
#include "asio/detail/io_object_impl.hpp"
@@ -30,10 +31,6 @@
#include "asio/error.hpp"
#include "asio/execution_context.hpp"
-#if defined(ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(ASIO_HAS_MOVE)
-
#include "asio/detail/push_options.hpp"
namespace asio {
@@ -99,10 +96,10 @@ public:
*/
template <typename ExecutionContext>
explicit basic_overlapped_handle(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: impl_(0, 0, context)
{
}
@@ -145,9 +142,9 @@ public:
template <typename ExecutionContext>
basic_overlapped_handle(ExecutionContext& context,
const native_handle_type& native_handle,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: impl_(0, 0, context)
{
asio::error_code ec;
@@ -155,7 +152,6 @@ public:
asio::detail::throw_error(ec, "assign");
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct an overlapped handle from another.
/**
* This constructor moves a handle from one object to another.
@@ -188,10 +184,56 @@ public:
impl_ = std::move(other.impl_);
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ // All overlapped handles have access to each other's implementations.
+ template <typename Executor1>
+ friend class basic_overlapped_handle;
+
+ /// Move-construct an overlapped handle from a handle of another executor
+ /// type.
+ /**
+ * This constructor moves a handle from one object to another.
+ *
+ * @param other The other overlapped handle object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c overlapped_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ basic_overlapped_handle(basic_overlapped_handle<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : impl_(std::move(other.impl_))
+ {
+ }
+
+ /// Move-assign an overlapped handle from a handle of another executor type.
+ /**
+ * This assignment operator moves a handle from one object to another.
+ *
+ * @param other The other overlapped handle object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c overlapped_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_overlapped_handle&
+ > operator=(basic_overlapped_handle<Executor1>&& other)
+ {
+ impl_ = std::move(other.impl_);
+ return *this;
+ }
/// Get the executor associated with the object.
- executor_type get_executor() ASIO_NOEXCEPT
+ const executor_type& get_executor() noexcept
{
return impl_.get_executor();
}
@@ -289,6 +331,58 @@ public:
ASIO_SYNC_OP_VOID_RETURN(ec);
}
+ /// Release ownership of the underlying native handle.
+ /**
+ * This function causes all outstanding asynchronous operations to finish
+ * immediately, and the handlers for cancelled operations will be passed the
+ * asio::error::operation_aborted error. Ownership of the native handle
+ * is then transferred to the caller.
+ *
+ * @throws asio::system_error Thrown on failure.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release()
+ {
+ asio::error_code ec;
+ native_handle_type s = impl_.get_service().release(
+ impl_.get_implementation(), ec);
+ asio::detail::throw_error(ec, "release");
+ return s;
+ }
+
+ /// Release ownership of the underlying native handle.
+ /**
+ * This function causes all outstanding asynchronous operations to finish
+ * immediately, and the handlers for cancelled operations will be passed the
+ * asio::error::operation_aborted error. Ownership of the native handle
+ * is then transferred to the caller.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note This function is unsupported on Windows versions prior to Windows
+ * 8.1, and will fail with asio::error::operation_not_supported on
+ * these platforms.
+ */
+#if defined(ASIO_MSVC) && (ASIO_MSVC >= 1400) \
+ && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0603)
+ __declspec(deprecated("This function always fails with "
+ "operation_not_supported when used on Windows versions "
+ "prior to Windows 8.1."))
+#endif
+ native_handle_type release(asio::error_code& ec)
+ {
+ return impl_.get_service().release(impl_.get_implementation(), ec);
+ }
+
/// Get the native handle representation.
/**
* This function may be used to obtain the underlying representation of the
@@ -344,9 +438,9 @@ protected:
private:
// Disallow copying and assignment.
- basic_overlapped_handle(const basic_overlapped_handle&) ASIO_DELETED;
+ basic_overlapped_handle(const basic_overlapped_handle&) = delete;
basic_overlapped_handle& operator=(
- const basic_overlapped_handle&) ASIO_DELETED;
+ const basic_overlapped_handle&) = delete;
};
} // namespace windows
diff --git a/3rdparty/asio/include/asio/windows/basic_random_access_handle.hpp b/3rdparty/asio/include/asio/windows/basic_random_access_handle.hpp
index ab7a0a5b612..e66e943c6b5 100644
--- a/3rdparty/asio/include/asio/windows/basic_random_access_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/basic_random_access_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_random_access_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -39,6 +39,10 @@ template <typename Executor = any_io_executor>
class basic_random_access_handle
: public basic_overlapped_handle<Executor>
{
+private:
+ class initiate_async_write_some_at;
+ class initiate_async_read_some_at;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -75,8 +79,8 @@ public:
/// Construct a random-access handle without opening it.
/**
* This constructor creates a random-access handle without opening it. The
- * handle needs to be opened or assigned before data can be sent or received
- * on it.
+ * handle needs to be opened or assigned before data can be written to or read
+ * from it.
*
* @param context An execution context which provides the I/O executor that
* the random-access handle will use, by default, to dispatch handlers for any
@@ -84,10 +88,10 @@ public:
*/
template <typename ExecutionContext>
explicit basic_random_access_handle(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: basic_overlapped_handle<Executor>(context)
{
}
@@ -127,14 +131,13 @@ public:
template <typename ExecutionContext>
basic_random_access_handle(ExecutionContext& context,
const native_handle_type& handle,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_overlapped_handle<Executor>(context, handle)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a random-access handle from another.
/**
* This constructor moves a random-access handle from one object to another.
@@ -168,7 +171,51 @@ public:
basic_overlapped_handle<Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Move-construct a random-access handle from a handle of another executor
+ /// type.
+ /**
+ * This constructor moves a random-access handle from one object to another.
+ *
+ * @param other The other random-access handle object from which the
+ * move will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_random_access_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ basic_random_access_handle(basic_random_access_handle<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_overlapped_handle<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a random-access handle from a handle of another executor
+ /// type.
+ /**
+ * This assignment operator moves a random-access handle from one object to
+ * another.
+ *
+ * @param other The other random-access handle object from which the
+ * move will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_random_access_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_random_access_handle&
+ > operator=(basic_random_access_handle<Executor1>&& other)
+ {
+ basic_overlapped_handle<Executor>::operator=(std::move(other));
+ return *this;
+ }
/// Write some data to the handle at the specified offset.
/**
@@ -239,27 +286,33 @@ public:
/// Start an asynchronous write at the specified offset.
/**
* This function is used to asynchronously write data to the random-access
- * handle. The function call always returns immediately.
+ * handle. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param offset The offset at which the data will be written.
*
* @param buffers One or more data buffers to be written to the handle.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The write operation may not transmit all of the data to the peer.
* Consider using the @ref async_write_at function if you need to ensure that
* all data is written before the asynchronous operation completes.
@@ -285,18 +338,17 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some_at(uint64_t offset,
- const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some_at(uint64_t offset, const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some_at>(), token, offset, buffers))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_write_some_at(this), handler, offset, buffers);
+ initiate_async_write_some_at(this), token, offset, buffers);
}
/// Read some data from the handle at the specified offset.
@@ -370,27 +422,33 @@ public:
/// Start an asynchronous read at the specified offset.
/**
* This function is used to asynchronously read data from the random-access
- * handle. The function call always returns immediately.
+ * handle. It is an initiating function for an @ref asynchronous_operation,
+ * and always returns immediately.
*
* @param offset The offset at which the data will be read.
*
* @param buffers One or more buffers into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The read operation may not read all of the requested number of bytes.
* Consider using the @ref async_read_at function if you need to ensure that
* the requested amount of data is read before the asynchronous operation
@@ -417,18 +475,17 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some_at(uint64_t offset,
- const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some_at(uint64_t offset, const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some_at>(), token, offset, buffers))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_read_some_at(this), handler, offset, buffers);
+ initiate_async_read_some_at(this), token, offset, buffers);
}
private:
@@ -442,13 +499,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
uint64_t offset, const ConstBufferSequence& buffers) const
{
// If you get an error on the following line it means that your handler
@@ -475,13 +532,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
uint64_t offset, const MutableBufferSequence& buffers) const
{
// If you get an error on the following line it means that your handler
diff --git a/3rdparty/asio/include/asio/windows/basic_stream_handle.hpp b/3rdparty/asio/include/asio/windows/basic_stream_handle.hpp
index 1a35224a234..0331d9dfa03 100644
--- a/3rdparty/asio/include/asio/windows/basic_stream_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/basic_stream_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_stream_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -42,6 +42,10 @@ template <typename Executor = any_io_executor>
class basic_stream_handle
: public basic_overlapped_handle<Executor>
{
+private:
+ class initiate_async_write_some;
+ class initiate_async_read_some;
+
public:
/// The type of the executor associated with the object.
typedef Executor executor_type;
@@ -78,7 +82,8 @@ public:
/// Construct a stream handle without opening it.
/**
* This constructor creates a stream handle without opening it. The handle
- * needs to be opened or assigned before data can be sent or received on it.
+ * needs to be opened or assigned before data can be written to or read from
+ * it.
*
* @param context An execution context which provides the I/O executor that
* the stream handle will use, by default, to dispatch handlers for any
@@ -86,10 +91,10 @@ public:
*/
template <typename ExecutionContext>
explicit basic_stream_handle(ExecutionContext& context,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value,
defaulted_constraint
- >::type = defaulted_constraint())
+ > = defaulted_constraint())
: basic_overlapped_handle<Executor>(context)
{
}
@@ -128,14 +133,13 @@ public:
template <typename ExecutionContext>
basic_stream_handle(ExecutionContext& context,
const native_handle_type& handle,
- typename constraint<
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
: basic_overlapped_handle<Executor>(context, handle)
{
}
-#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a stream handle from another.
/**
* This constructor moves a stream handle from one object to another.
@@ -168,7 +172,48 @@ public:
basic_overlapped_handle<Executor>::operator=(std::move(other));
return *this;
}
-#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Move-construct a stream handle from a handle of another executor type.
+ /**
+ * This constructor moves a stream handle from one object to another.
+ *
+ * @param other The other stream handle object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_stream_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ basic_stream_handle(basic_stream_handle<Executor1>&& other,
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ defaulted_constraint
+ > = defaulted_constraint())
+ : basic_overlapped_handle<Executor>(std::move(other))
+ {
+ }
+
+ /// Move-assign a stream handle from a handle of another executor type.
+ /**
+ * This assignment operator moves a stream handle from one object to
+ * another.
+ *
+ * @param other The other stream handle object from which the move will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_stream_handle(const executor_type&)
+ * constructor.
+ */
+ template<typename Executor1>
+ constraint_t<
+ is_convertible<Executor1, Executor>::value,
+ basic_stream_handle&
+ > operator=(basic_stream_handle<Executor1>&& other)
+ {
+ basic_overlapped_handle<Executor>::operator=(std::move(other));
+ return *this;
+ }
/// Write some data to the handle.
/**
@@ -234,25 +279,31 @@ public:
/// Start an asynchronous write.
/**
* This function is used to asynchronously write data to the stream handle.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more data buffers to be written to the handle.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
+ * std::size_t bytes_transferred // Number of bytes written.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The write operation may not transmit all of the data to the peer.
* Consider using the @ref async_write function if you need to ensure that all
* data is written before the asynchronous operation completes.
@@ -278,17 +329,17 @@ public:
*/
template <typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) WriteToken = default_completion_token_t<executor_type>>
+ auto async_write_some(const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_write_some>(), token, buffers))
{
- return async_initiate<WriteHandler,
+ return async_initiate<WriteToken,
void (asio::error_code, std::size_t)>(
- initiate_async_write_some(this), handler, buffers);
+ initiate_async_write_some(this), token, buffers);
}
/// Read some data from the handle.
@@ -357,25 +408,31 @@ public:
/// Start an asynchronous read.
/**
* This function is used to asynchronously read data from the stream handle.
- * The function call always returns immediately.
+ * It is an initiating function for an @ref asynchronous_operation, and always
+ * returns immediately.
*
* @param buffers One or more buffers into which the data will be read.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the read completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* const asio::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
+ * std::size_t bytes_transferred // Number of bytes read.
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @note The read operation may not read all of the requested number of bytes.
* Consider using the @ref async_read function if you need to ensure that the
* requested amount of data is read before the asynchronous operation
@@ -402,17 +459,17 @@ public:
*/
template <typename MutableBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) ReadHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)>
- ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler,
- void (asio::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- ASIO_MOVE_ARG(ReadHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(executor_type))
+ std::size_t)) ReadToken = default_completion_token_t<executor_type>>
+ auto async_read_some(const MutableBufferSequence& buffers,
+ ReadToken&& token = default_completion_token_t<executor_type>())
+ -> decltype(
+ async_initiate<ReadToken,
+ void (asio::error_code, std::size_t)>(
+ declval<initiate_async_read_some>(), token, buffers))
{
- return async_initiate<ReadHandler,
+ return async_initiate<ReadToken,
void (asio::error_code, std::size_t)>(
- initiate_async_read_some(this), handler, buffers);
+ initiate_async_read_some(this), token, buffers);
}
private:
@@ -426,13 +483,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename WriteHandler, typename ConstBufferSequence>
- void operator()(ASIO_MOVE_ARG(WriteHandler) handler,
+ void operator()(WriteHandler&& handler,
const ConstBufferSequence& buffers) const
{
// If you get an error on the following line it means that your handler
@@ -459,13 +516,13 @@ private:
{
}
- executor_type get_executor() const ASIO_NOEXCEPT
+ const executor_type& get_executor() const noexcept
{
return self_->get_executor();
}
template <typename ReadHandler, typename MutableBufferSequence>
- void operator()(ASIO_MOVE_ARG(ReadHandler) handler,
+ void operator()(ReadHandler&& handler,
const MutableBufferSequence& buffers) const
{
// If you get an error on the following line it means that your handler
diff --git a/3rdparty/asio/include/asio/windows/object_handle.hpp b/3rdparty/asio/include/asio/windows/object_handle.hpp
index 14d6801c534..243d9455ce2 100644
--- a/3rdparty/asio/include/asio/windows/object_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/object_handle.hpp
@@ -2,7 +2,7 @@
// windows/object_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/include/asio/windows/overlapped_handle.hpp b/3rdparty/asio/include/asio/windows/overlapped_handle.hpp
index b2592b92052..fc12865b48c 100644
--- a/3rdparty/asio/include/asio/windows/overlapped_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/overlapped_handle.hpp
@@ -2,7 +2,7 @@
// windows/overlapped_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/windows/overlapped_ptr.hpp b/3rdparty/asio/include/asio/windows/overlapped_ptr.hpp
index 5ac2ab1a5e7..e1e6f8c841f 100644
--- a/3rdparty/asio/include/asio/windows/overlapped_ptr.hpp
+++ b/3rdparty/asio/include/asio/windows/overlapped_ptr.hpp
@@ -2,7 +2,7 @@
// windows/overlapped_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -51,23 +51,23 @@ public:
/// Construct an overlapped_ptr to contain the specified handler.
template <typename ExecutionContext, typename Handler>
explicit overlapped_ptr(ExecutionContext& context,
- ASIO_MOVE_ARG(Handler) handler,
- typename constraint<
+ Handler&& handler,
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
- : impl_(context.get_executor(), ASIO_MOVE_CAST(Handler)(handler))
+ > = 0)
+ : impl_(context.get_executor(), static_cast<Handler&&>(handler))
{
}
/// Construct an overlapped_ptr to contain the specified handler.
template <typename Executor, typename Handler>
explicit overlapped_ptr(const Executor& ex,
- ASIO_MOVE_ARG(Handler) handler,
- typename constraint<
+ Handler&& handler,
+ constraint_t<
execution::is_executor<Executor>::value
|| is_executor<Executor>::value
- >::type = 0)
- : impl_(ex, ASIO_MOVE_CAST(Handler)(handler))
+ > = 0)
+ : impl_(ex, static_cast<Handler&&>(handler))
{
}
@@ -85,24 +85,24 @@ public:
/// Reset to contain the specified handler, freeing any current OVERLAPPED
/// object.
template <typename ExecutionContext, typename Handler>
- void reset(ExecutionContext& context, ASIO_MOVE_ARG(Handler) handler,
- typename constraint<
+ void reset(ExecutionContext& context, Handler&& handler,
+ constraint_t<
is_convertible<ExecutionContext&, execution_context&>::value
- >::type = 0)
+ > = 0)
{
- impl_.reset(context.get_executor(), ASIO_MOVE_CAST(Handler)(handler));
+ impl_.reset(context.get_executor(), static_cast<Handler&&>(handler));
}
/// Reset to contain the specified handler, freeing any current OVERLAPPED
/// object.
template <typename Executor, typename Handler>
- void reset(const Executor& ex, ASIO_MOVE_ARG(Handler) handler,
- typename constraint<
+ void reset(const Executor& ex, Handler&& handler,
+ constraint_t<
execution::is_executor<Executor>::value
|| is_executor<Executor>::value
- >::type = 0)
+ > = 0)
{
- impl_.reset(ex, ASIO_MOVE_CAST(Handler)(handler));
+ impl_.reset(ex, static_cast<Handler&&>(handler));
}
/// Get the contained OVERLAPPED object.
diff --git a/3rdparty/asio/include/asio/windows/random_access_handle.hpp b/3rdparty/asio/include/asio/windows/random_access_handle.hpp
index aff4529423f..88dfa36ecdd 100644
--- a/3rdparty/asio/include/asio/windows/random_access_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/random_access_handle.hpp
@@ -2,7 +2,7 @@
// windows/random_access_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/windows/stream_handle.hpp b/3rdparty/asio/include/asio/windows/stream_handle.hpp
index fabf8862433..4b88b8cb699 100644
--- a/3rdparty/asio/include/asio/windows/stream_handle.hpp
+++ b/3rdparty/asio/include/asio/windows/stream_handle.hpp
@@ -2,7 +2,7 @@
// windows/stream_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/include/asio/writable_pipe.hpp b/3rdparty/asio/include/asio/writable_pipe.hpp
new file mode 100644
index 00000000000..27f408a4956
--- /dev/null
+++ b/3rdparty/asio/include/asio/writable_pipe.hpp
@@ -0,0 +1,35 @@
+//
+// writable_pipe.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 ASIO_WRITABLE_PIPE_HPP
+#define ASIO_WRITABLE_PIPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+
+#if defined(ASIO_HAS_PIPE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include "asio/basic_writable_pipe.hpp"
+
+namespace asio {
+
+/// Typedef for the typical usage of a writable pipe.
+typedef basic_writable_pipe<> writable_pipe;
+
+} // namespace asio
+
+#endif // defined(ASIO_HAS_PIPE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // ASIO_WRITABLE_PIPE_HPP
diff --git a/3rdparty/asio/include/asio/write.hpp b/3rdparty/asio/include/asio/write.hpp
index df82e06aec1..ca3f002c025 100644
--- a/3rdparty/asio/include/asio/write.hpp
+++ b/3rdparty/asio/include/asio/write.hpp
@@ -2,7 +2,7 @@
// write.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,6 +19,7 @@
#include <cstddef>
#include "asio/async_result.hpp"
#include "asio/buffer.hpp"
+#include "asio/completion_condition.hpp"
#include "asio/error.hpp"
#if !defined(ASIO_NO_EXTENSIONS)
@@ -28,6 +29,15 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_write;
+#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_write_dynbuf_v1;
+#endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
+template <typename> class initiate_async_write_dynbuf_v2;
+
+} // namespace detail
/**
* @defgroup write asio::write
@@ -75,9 +85,9 @@ namespace asio {
*/
template <typename SyncWriteStream, typename ConstBufferSequence>
std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
- typename constraint<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type = 0);
+ > = 0);
/// Write all of the supplied data to a stream before returning.
/**
@@ -118,9 +128,9 @@ std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
template <typename SyncWriteStream, typename ConstBufferSequence>
std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type = 0);
+ > = 0);
/// Write a certain amount of data to a stream before returning.
/**
@@ -172,9 +182,9 @@ template <typename SyncWriteStream, typename ConstBufferSequence,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
- typename constraint<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type = 0);
+ > = 0);
/// Write a certain amount of data to a stream before returning.
/**
@@ -219,9 +229,9 @@ template <typename SyncWriteStream, typename ConstBufferSequence,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type = 0);
+ > = 0);
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -254,13 +264,13 @@ std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
*/
template <typename SyncWriteStream, typename DynamicBuffer_v1>
std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ DynamicBuffer_v1&& buffers,
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Write all of the supplied data to a stream before returning.
/**
@@ -291,14 +301,14 @@ std::size_t write(SyncWriteStream& s,
*/
template <typename SyncWriteStream, typename DynamicBuffer_v1>
std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Write a certain amount of data to a stream before returning.
/**
@@ -339,14 +349,14 @@ std::size_t write(SyncWriteStream& s,
template <typename SyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
/// Write a certain amount of data to a stream before returning.
/**
@@ -388,14 +398,14 @@ std::size_t write(SyncWriteStream& s,
template <typename SyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
+ DynamicBuffer_v1&& buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0);
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -573,9 +583,9 @@ std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
*/
template <typename SyncWriteStream, typename DynamicBuffer_v2>
std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/// Write all of the supplied data to a stream before returning.
/**
@@ -607,9 +617,9 @@ std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
template <typename SyncWriteStream, typename DynamicBuffer_v2>
std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/// Write a certain amount of data to a stream before returning.
/**
@@ -651,9 +661,9 @@ template <typename SyncWriteStream, typename DynamicBuffer_v2,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/// Write a certain amount of data to a stream before returning.
/**
@@ -696,9 +706,9 @@ template <typename SyncWriteStream, typename DynamicBuffer_v2,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition, asio::error_code& ec,
- typename constraint<
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0);
/*@}*/
/**
@@ -713,9 +723,9 @@ std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied buffers has been written. That is, the
* bytes transferred is equal to the sum of the buffer sizes.
@@ -734,24 +744,29 @@ std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
* @param buffers One or more buffers containing the data to be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To write a single data buffer use the @ref buffer function as follows:
* @code
@@ -774,26 +789,27 @@ std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers,
*/
template <typename AsyncWriteStream, typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncWriteStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncWriteStream::executor_type),
- typename constraint<
+ std::size_t)) WriteToken
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>>
+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
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write<AsyncWriteStream>>(),
+ token, buffers, transfer_all()));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied buffers has been written. That is, the
* bytes transferred is equal to the sum of the buffer sizes.
@@ -812,7 +828,7 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
* @param buffers One or more buffers containing the data to be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the write operation is complete. The signature of the function object
@@ -828,22 +844,27 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
* non-zero return value indicates the maximum number of bytes to be written on
* the next call to the stream's async_write_some function.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To write a single data buffer use the @ref buffer function as follows:
* @code asio::async_write(s,
@@ -868,15 +889,19 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
template <typename AsyncWriteStream,
typename ConstBufferSequence, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
+ std::size_t)) WriteToken>
+auto async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename constraint<
+ WriteToken&& token,
+ constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write<AsyncWriteStream>>(),
+ token, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
@@ -884,9 +909,9 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied dynamic buffer sequence has been written.
*
@@ -904,25 +929,30 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
* @param buffers The dynamic buffer sequence from which data will be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called. Successfully written
- * data is automatically consumed from the buffers.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * that they remain valid until the completion handler is called. Successfully
+ * written data is automatically consumed from the buffers.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -936,30 +966,31 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
*/
template <typename AsyncWriteStream, typename DynamicBuffer_v1,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncWriteStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncWriteStream::executor_type),
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ std::size_t)) WriteToken
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>>
+auto async_write(AsyncWriteStream& s, DynamicBuffer_v1&& buffers,
+ WriteToken&& token
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>(),
+ constraint_t<
+ is_dynamic_buffer_v1<decay_t<DynamicBuffer_v1>>::value
+ > = 0,
+ constraint_t<
+ !is_dynamic_buffer_v2<decay_t<DynamicBuffer_v1>>::value
+ > = 0)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ transfer_all()));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied dynamic buffer sequence has been written.
*
@@ -977,8 +1008,8 @@ async_write(AsyncWriteStream& s,
* @param buffers The dynamic buffer sequence from which data will be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called. Successfully written
- * data is automatically consumed from the buffers.
+ * that they remain valid until the completion handler is called. Successfully
+ * written data is automatically consumed from the buffers.
*
* @param completion_condition The function object to be called to determine
* whether the write operation is complete. The signature of the function object
@@ -994,22 +1025,27 @@ async_write(AsyncWriteStream& s,
* non-zero return value indicates the maximum number of bytes to be written on
* the next call to the stream's async_write_some function.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -1024,19 +1060,21 @@ async_write(AsyncWriteStream& s,
template <typename AsyncWriteStream,
typename DynamicBuffer_v1, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename constraint<
- is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0,
- typename constraint<
- !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
- >::type = 0);
+ 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)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v1&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -1045,9 +1083,9 @@ async_write(AsyncWriteStream& s,
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied basic_streambuf has been written.
*
@@ -1064,24 +1102,29 @@ async_write(AsyncWriteStream& s,
*
* @param b A basic_streambuf object from which data will be written. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -1095,23 +1138,24 @@ async_write(AsyncWriteStream& s,
*/
template <typename AsyncWriteStream, typename Allocator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncWriteStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncWriteStream::executor_type));
+ std::size_t)) WriteToken
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>>
+auto async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
+ WriteToken&& token
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, basic_streambuf_ref<Allocator>(b), transfer_all()));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied basic_streambuf has been written.
*
@@ -1128,7 +1172,7 @@ async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
*
* @param b A basic_streambuf object from which data will be written. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the write operation is complete. The signature of the function object
@@ -1144,22 +1188,27 @@ async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
* non-zero return value indicates the maximum number of bytes to be written on
* the next call to the stream's async_write_some function.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -1174,12 +1223,15 @@ async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
template <typename AsyncWriteStream,
typename Allocator, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler);
+ std::size_t)) WriteToken>
+auto async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, WriteToken&& token)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v1<AsyncWriteStream>>(),
+ token, basic_streambuf_ref<Allocator>(b),
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
@@ -1189,9 +1241,9 @@ async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied dynamic buffer sequence has been written.
*
@@ -1209,25 +1261,30 @@ async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
* @param buffers The dynamic buffer sequence from which data will be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called. Successfully written
- * data is automatically consumed from the buffers.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * that they remain valid until the completion handler is called. Successfully
+ * written data is automatically consumed from the buffers.
+ *
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -1241,26 +1298,28 @@ async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
*/
template <typename AsyncWriteStream, typename DynamicBuffer_v2,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncWriteStream::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncWriteStream::executor_type),
- typename constraint<
+ std::size_t)) WriteToken
+ = default_completion_token_t<typename AsyncWriteStream::executor_type>>
+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
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ transfer_all()));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
+ * data to a stream. It is an initiating function for an @ref
+ * asynchronous_operation, and always returns immediately. The asynchronous
+ * operation will continue until one of the following conditions is true:
*
* @li All of the data in the supplied dynamic buffer sequence has been written.
*
@@ -1278,8 +1337,8 @@ async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
* @param buffers The dynamic buffer sequence from which data will be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called. Successfully written
- * data is automatically consumed from the buffers.
+ * that they remain valid until the completion handler is called. Successfully
+ * written data is automatically consumed from the buffers.
*
* @param completion_condition The function object to be called to determine
* whether the write operation is complete. The signature of the function object
@@ -1295,22 +1354,27 @@ async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
* non-zero return value indicates the maximum number of bytes to be written on
* the next call to the stream's async_write_some function.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
- * const asio::error_code& error, // Result of operation.
+ * // Result of operation.
+ * const asio::error_code& error,
*
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -1325,15 +1389,19 @@ async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
template <typename AsyncWriteStream,
typename DynamicBuffer_v2, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
+ std::size_t)) WriteToken>
+auto async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler,
- typename constraint<
+ WriteToken&& token,
+ constraint_t<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
- >::type = 0);
+ > = 0)
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_dynbuf_v2<AsyncWriteStream>>(),
+ token, static_cast<DynamicBuffer_v2&&>(buffers),
+ static_cast<CompletionCondition&&>(completion_condition)));
/*@}*/
diff --git a/3rdparty/asio/include/asio/write_at.hpp b/3rdparty/asio/include/asio/write_at.hpp
index a4c98c0264f..a33514e61a0 100644
--- a/3rdparty/asio/include/asio/write_at.hpp
+++ b/3rdparty/asio/include/asio/write_at.hpp
@@ -2,7 +2,7 @@
// write_at.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,6 +18,7 @@
#include "asio/detail/config.hpp"
#include <cstddef>
#include "asio/async_result.hpp"
+#include "asio/completion_condition.hpp"
#include "asio/detail/cstdint.hpp"
#include "asio/error.hpp"
@@ -28,6 +29,14 @@
#include "asio/detail/push_options.hpp"
namespace asio {
+namespace detail {
+
+template <typename> class initiate_async_write_at;
+#if !defined(ASIO_NO_IOSTREAM)
+template <typename> class initiate_async_write_at_streambuf;
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+} // namespace detail
/**
* @defgroup write_at asio::write_at
@@ -403,9 +412,10 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
/// specified offset.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data to a random access device at a specified offset. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns immediately.
+ * The asynchronous operation will continue until one of the following
+ * conditions is true:
*
* @li All of the data in the supplied buffers has been written. That is, the
* bytes transferred is equal to the sum of the buffer sizes.
@@ -428,11 +438,13 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
* @param buffers One or more buffers containing the data to be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -442,10 +454,13 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To write a single data buffer use the @ref buffer function as follows:
* @code
@@ -468,24 +483,27 @@ std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
*/
template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncRandomAccessWriteDevice::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
- const ConstBufferSequence& buffers,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncRandomAccessWriteDevice::executor_type));
+ std::size_t)) WriteToken = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>>
+auto async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ WriteToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, buffers, transfer_all()));
/// Start an asynchronous operation to write a certain amount of data at the
/// specified offset.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data to a random access device at a specified offset. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns immediately.
+ * The asynchronous operation will continue until one of the following
+ * conditions is true:
*
* @li All of the data in the supplied buffers has been written. That is, the
* bytes transferred is equal to the sum of the buffer sizes.
@@ -508,7 +526,7 @@ async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
* @param buffers One or more buffers containing the data to be written.
* Although the buffers object may be copied as necessary, ownership of the
* underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
+ * that they remain valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the write operation is complete. The signature of the function object
@@ -524,9 +542,11 @@ async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
* non-zero return value indicates the maximum number of bytes to be written on
* the next call to the device's async_write_some_at function.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -536,10 +556,13 @@ async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Example
* To write a single data buffer use the @ref buffer function as follows:
* @code asio::async_write_at(d, 42,
@@ -564,17 +587,20 @@ async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
template <typename AsyncRandomAccessWriteDevice,
typename ConstBufferSequence, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncRandomAccessWriteDevice::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
+ std::size_t)) WriteToken = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>>
+auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncRandomAccessWriteDevice::executor_type));
+ WriteToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, buffers,
+ static_cast<CompletionCondition&&>(completion_condition)));
#if !defined(ASIO_NO_EXTENSIONS)
#if !defined(ASIO_NO_IOSTREAM)
@@ -583,9 +609,10 @@ async_write_at(AsyncRandomAccessWriteDevice& d,
/// specified offset.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data to a random access device at a specified offset. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns immediately.
+ * The asynchronous operation will continue until one of the following
+ * conditions is true:
*
* @li All of the data in the supplied basic_streambuf has been written.
*
@@ -606,11 +633,13 @@ async_write_at(AsyncRandomAccessWriteDevice& d,
*
* @param b A basic_streambuf object from which data will be written. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -620,10 +649,13 @@ async_write_at(AsyncRandomAccessWriteDevice& d,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -637,24 +669,27 @@ async_write_at(AsyncRandomAccessWriteDevice& d,
*/
template <typename AsyncRandomAccessWriteDevice, typename Allocator,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncRandomAccessWriteDevice::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
+ std::size_t)) WriteToken = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>>
+auto async_write_at(AsyncRandomAccessWriteDevice& d,
uint64_t offset, basic_streambuf<Allocator>& b,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncRandomAccessWriteDevice::executor_type));
+ WriteToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, &b, transfer_all()));
/// Start an asynchronous operation to write a certain amount of data at the
/// specified offset.
/**
* This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
+ * data to a random access device at a specified offset. It is an initiating
+ * function for an @ref asynchronous_operation, and always returns immediately.
+ * The asynchronous operation will continue until one of the following
+ * conditions is true:
*
* @li All of the data in the supplied basic_streambuf has been written.
*
@@ -675,7 +710,7 @@ async_write_at(AsyncRandomAccessWriteDevice& d,
*
* @param b A basic_streambuf object from which data will be written. Ownership
* of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
+ * remains valid until the completion handler is called.
*
* @param completion_condition The function object to be called to determine
* whether the write operation is complete. The signature of the function object
@@ -691,9 +726,11 @@ async_write_at(AsyncRandomAccessWriteDevice& d,
* non-zero return value indicates the maximum number of bytes to be written on
* the next call to the device's async_write_some_at function.
*
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
+ * @param token The @ref completion_token that will be used to produce a
+ * completion handler, which will be called when the write completes.
+ * Potential completion tokens include @ref use_future, @ref use_awaitable,
+ * @ref yield_context, or a function object with the correct completion
+ * signature. The function signature of the completion handler must be:
* @code void handler(
* // Result of operation.
* const asio::error_code& error,
@@ -703,10 +740,13 @@ async_write_at(AsyncRandomAccessWriteDevice& d,
* std::size_t bytes_transferred
* ); @endcode
* Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. On
- * immediate completion, invocation of the handler will be performed in a
+ * 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 asio::post().
*
+ * @par Completion Signature
+ * @code void(asio::error_code, std::size_t) @endcode
+ *
* @par Per-Operation Cancellation
* This asynchronous operation supports cancellation for the following
* asio::cancellation_type values:
@@ -721,16 +761,19 @@ async_write_at(AsyncRandomAccessWriteDevice& d,
template <typename AsyncRandomAccessWriteDevice,
typename Allocator, typename CompletionCondition,
ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code,
- std::size_t)) WriteHandler
- ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename AsyncRandomAccessWriteDevice::executor_type)>
-ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
- void (asio::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
+ std::size_t)) WriteToken = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>>
+auto async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
basic_streambuf<Allocator>& b, CompletionCondition completion_condition,
- ASIO_MOVE_ARG(WriteHandler) handler
- ASIO_DEFAULT_COMPLETION_TOKEN(
- typename AsyncRandomAccessWriteDevice::executor_type));
+ WriteToken&& token = default_completion_token_t<
+ typename AsyncRandomAccessWriteDevice::executor_type>())
+ -> decltype(
+ async_initiate<WriteToken,
+ void (asio::error_code, std::size_t)>(
+ declval<detail::initiate_async_write_at_streambuf<
+ AsyncRandomAccessWriteDevice>>(),
+ token, offset, &b,
+ static_cast<CompletionCondition&&>(completion_condition)));
#endif // !defined(ASIO_NO_IOSTREAM)
#endif // !defined(ASIO_NO_EXTENSIONS)
diff --git a/3rdparty/asio/include/asio/yield.hpp b/3rdparty/asio/include/asio/yield.hpp
index 5c090a65c4e..c180503dda9 100644
--- a/3rdparty/asio/include/asio/yield.hpp
+++ b/3rdparty/asio/include/asio/yield.hpp
@@ -2,7 +2,7 @@
// yield.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/install-sh b/3rdparty/asio/install-sh
index 377bb8687ff..ec298b53740 100755
--- a/3rdparty/asio/install-sh
+++ b/3rdparty/asio/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written
# from scratch.
+tab=' '
nl='
'
-IFS=" "" $nl"
+IFS=" $tab$nl"
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
-# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
posix_mkdir=
# Desired mode of installed file.
mode=0755
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
@@ -97,7 +87,7 @@ dir_arg=
dst_arg=
copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -114,18 +104,28 @@ Options:
--version display version info and exit.
-c (ignored)
- -C install only if different (preserve the last data modification time)
+ -C install only if different (preserve data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
+ -p pass -p to $cpprog.
-s $stripprog installed files.
+ -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
@@ -137,46 +137,62 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
+ shift;;
+
+ -p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;;
- -t) dst_arg=$2
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
+ -S) backupsuffix="$2"
+ shift;;
- -T) no_target_directory=true;;
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@@ -208,6 +224,15 @@ if test $# -eq 0; then
fi
if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
@@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@@ -250,6 +275,10 @@ do
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
+ # Don't chown directories that already exist.
+ if test $dstdir_status = 0; then
+ chowncmd=""
+ fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -266,178 +295,148 @@ do
fi
dst=$dst_arg
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
+ # If destination is a directory, append the input filename.
if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
- dst=$dstdir/`basename "$src"`
+ dstbase=`basename "$src"`
+ case $dst in
+ */) dst=$dst$dstbase;;
+ *) dst=$dst/$dstbase;;
+ esac
dstdir_status=0
else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
+ dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
fi
+ case $dstdir in
+ */) dstdirslash=$dstdir;;
+ *) dstdirslash=$dstdir/;;
+ esac
+
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ # The $RANDOM variable is not portable (e.g., dash). Use it
+ # here however when possible just to lower collision chance.
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+ trap '
+ ret=$?
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+ exit $ret
+ ' 0
+
+ # Because "mkdir -p" follows existing symlinks and we likely work
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directory is successfully created first before we actually test
+ # 'mkdir -p'.
+ if (umask $mkdir_umask &&
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
- mkdir_mode=
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ trap '' 0;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
- # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
esac
- eval "$initialize_posix_glob"
-
oIFS=$IFS
IFS=/
- $posix_glob set -f
+ set -f
set fnord $dstdir
shift
- $posix_glob set +f
+ set +f
IFS=$oIFS
prefixes=
for d
do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
@@ -450,14 +449,25 @@ do
else
# Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
+ dsttmp=${dstdirslash}_inst.$$_
+ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+ (umask $cp_umask &&
+ { test -z "$stripcmd" || {
+ # Create $dsttmp read-write so that cp doesn't create it read-only,
+ # which would cause strip to fail.
+ if test -z "$doit"; then
+ : >"$dsttmp" # No need to fork-exec 'touch'.
+ else
+ $doit touch "$dsttmp"
+ fi
+ }
+ } &&
+ $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -472,20 +482,24 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
+ set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
+ # If $backupsuffix is set, and the file being installed
+ # already exists, attempt a backup. Don't worry if it fails,
+ # e.g., if mv doesn't support -f.
+ if test -n "$backupsuffix" && test -f "$dst"; then
+ $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+ fi
+
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@@ -493,24 +507,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
@@ -519,9 +533,9 @@ do
done
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/3rdparty/asio/missing b/3rdparty/asio/missing
index db98974ff5d..1fe1611f185 100755
--- a/3rdparty/asio/missing
+++ b/3rdparty/asio/missing
@@ -1,9 +1,9 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@ else
exit $st
fi
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
program_details ()
{
@@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
exit $st
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/3rdparty/asio/src/Makefile.am b/3rdparty/asio/src/Makefile.am
index e9b20e607e9..587bb4935e8 100644
--- a/3rdparty/asio/src/Makefile.am
+++ b/3rdparty/asio/src/Makefile.am
@@ -1,7 +1,3 @@
-if !STANDALONE
-EXAMPLES_CPP03 = examples/cpp03
-endif
-
if HAVE_CXX11
EXAMPLES_CPP11 = examples/cpp11
endif
@@ -14,9 +10,23 @@ if HAVE_CXX17
EXAMPLES_CPP17 = examples/cpp17
endif
-SUBDIRS = $(EXAMPLES_CPP03) $(EXAMPLES_CPP11) $(EXAMPLES_CPP14) $(EXAMPLES_CPP17) tests
+if HAVE_CXX20
+EXAMPLES_CPP20 = examples/cpp20
+endif
+
+SUBDIRS = \
+ $(EXAMPLES_CPP11) \
+ $(EXAMPLES_CPP14) \
+ $(EXAMPLES_CPP17) \
+ $(EXAMPLES_CPP20) \
+ tests
-DIST_SUBDIRS = examples/cpp03 examples/cpp11 examples/cpp14 examples/cpp17 tests
+DIST_SUBDIRS = \
+ examples/cpp11 \
+ examples/cpp14 \
+ examples/cpp17 \
+ examples/cpp20 \
+ tests
EXTRA_DIST = \
Makefile.mgw \
diff --git a/3rdparty/asio/src/Makefile.in b/3rdparty/asio/src/Makefile.in
index 388a1533420..63e9eaf7c34 100644
--- a/3rdparty/asio/src/Makefile.in
+++ b/3rdparty/asio/src/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -148,8 +148,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
@@ -188,8 +186,9 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CXX = @CXX@
-CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -198,9 +197,8 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
-EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
-GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -267,9 +265,11 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -278,12 +278,24 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-@STANDALONE_FALSE@EXAMPLES_CPP03 = examples/cpp03
@HAVE_CXX11_TRUE@EXAMPLES_CPP11 = examples/cpp11
@HAVE_CXX14_TRUE@EXAMPLES_CPP14 = examples/cpp14
@HAVE_CXX17_TRUE@EXAMPLES_CPP17 = examples/cpp17
-SUBDIRS = $(EXAMPLES_CPP03) $(EXAMPLES_CPP11) $(EXAMPLES_CPP14) $(EXAMPLES_CPP17) tests
-DIST_SUBDIRS = examples/cpp03 examples/cpp11 examples/cpp14 examples/cpp17 tests
+@HAVE_CXX20_TRUE@EXAMPLES_CPP20 = examples/cpp20
+SUBDIRS = \
+ $(EXAMPLES_CPP11) \
+ $(EXAMPLES_CPP14) \
+ $(EXAMPLES_CPP17) \
+ $(EXAMPLES_CPP20) \
+ tests
+
+DIST_SUBDIRS = \
+ examples/cpp11 \
+ examples/cpp14 \
+ examples/cpp17 \
+ examples/cpp20 \
+ tests
+
EXTRA_DIST = \
Makefile.mgw \
Makefile.msc \
@@ -425,7 +437,6 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
diff --git a/3rdparty/asio/src/Makefile.mgw b/3rdparty/asio/src/Makefile.mgw
index bcfbd4ee579..1fea10c2cdc 100644
--- a/3rdparty/asio/src/Makefile.mgw
+++ b/3rdparty/asio/src/Makefile.mgw
@@ -36,6 +36,9 @@ PERFORMANCE_TEST_EXES = \
tests/performance/server.exe
UNIT_TEST_EXES = \
+ tests/unit/any_completion_executor.exe \
+ tests/unit/any_completion_handler.exe \
+ tests/unit/any_io_executor.exe \
tests/unit/associated_allocator.exe \
tests/unit/associated_executor.exe \
tests/unit/async_result.exe \
@@ -72,27 +75,13 @@ UNIT_TEST_EXES = \
tests/unit/execution/any_executor.exe \
tests/unit/execution/blocking.exe \
tests/unit/execution/blocking_adaptation.exe \
- tests/unit/execution/bulk_execute.exe \
- tests/unit/execution/bulk_guarantee.exe \
- tests/unit/execution/connect.exe \
tests/unit/execution/context_as.exe \
- tests/unit/execution/execute.exe \
tests/unit/execution/executor.exe \
tests/unit/execution/invocable_archetype.exe \
tests/unit/execution/mapping.exe \
- tests/unit/execution/operation_state.exe \
tests/unit/execution/outstanding_work.exe \
tests/unit/execution/prefer_only.exe \
- tests/unit/execution/receiver.exe \
tests/unit/execution/relationship.exe \
- tests/unit/execution/schedule.exe \
- tests/unit/execution/scheduler.exe \
- tests/unit/execution/sender.exe \
- tests/unit/execution/set_done.exe \
- tests/unit/execution/set_error.exe \
- tests/unit/execution/set_value.exe \
- tests/unit/execution/start.exe \
- tests/unit/execution/submit.exe \
tests/unit/executor.exe \
tests/unit/executor_work_guard.exe \
tests/unit/generic/basic_endpoint.exe \
@@ -173,66 +162,67 @@ UNIT_TEST_EXES = \
tests/unit/write.exe \
tests/unit/write_at.exe
-CPP03_EXAMPLE_EXES = \
- examples/cpp03/allocation/server.exe \
- examples/cpp03/buffers/reference_counted.exe \
- examples/cpp03/chat/chat_client.exe \
- examples/cpp03/chat/chat_server.exe \
- examples/cpp03/echo/async_tcp_echo_server.exe \
- examples/cpp03/echo/async_udp_echo_server.exe \
- examples/cpp03/echo/blocking_tcp_echo_client.exe \
- examples/cpp03/echo/blocking_tcp_echo_server.exe \
- examples/cpp03/echo/blocking_udp_echo_client.exe \
- examples/cpp03/echo/blocking_udp_echo_server.exe \
- examples/cpp03/http/client/async_client.exe \
- examples/cpp03/http/client/sync_client.exe \
- examples/cpp03/http/server/http_server.exe \
- examples/cpp03/http/server2/http_server.exe \
- examples/cpp03/http/server3/http_server.exe \
- examples/cpp03/http/server4/http_server.exe \
- examples/cpp03/icmp/ping.exe \
- examples/cpp03/invocation/prioritised_handlers.exe \
- examples/cpp03/iostreams/daytime_client.exe \
- examples/cpp03/iostreams/daytime_server.exe \
- examples/cpp03/iostreams/http_client.exe \
- examples/cpp03/multicast/receiver.exe \
- examples/cpp03/multicast/sender.exe \
- examples/cpp03/nonblocking/third_party_lib.exe \
- examples/cpp03/porthopper/client.exe \
- examples/cpp03/porthopper/server.exe \
- examples/cpp03/services/daytime_client.exe \
- examples/cpp03/socks4/sync_client.exe \
- examples/cpp03/timeouts/async_tcp_client.exe \
- examples/cpp03/timeouts/blocking_tcp_client.exe \
- examples/cpp03/timeouts/blocking_token_tcp_client.exe \
- examples/cpp03/timeouts/blocking_udp_client.exe \
- examples/cpp03/timeouts/server.exe \
- examples/cpp03/timers/time_t_timer.exe \
- examples/cpp03/tutorial/timer1/timer.exe \
- examples/cpp03/tutorial/timer2/timer.exe \
- examples/cpp03/tutorial/timer3/timer.exe \
- examples/cpp03/tutorial/timer4/timer.exe \
- examples/cpp03/tutorial/timer5/timer.exe \
- examples/cpp03/tutorial/daytime1/client.exe \
- examples/cpp03/tutorial/daytime2/server.exe \
- examples/cpp03/tutorial/daytime3/server.exe \
- examples/cpp03/tutorial/daytime4/client.exe \
- examples/cpp03/tutorial/daytime5/server.exe \
- examples/cpp03/tutorial/daytime6/server.exe \
- examples/cpp03/tutorial/daytime7/server.exe \
- examples/cpp03/windows/transmit_file.exe
+CPP11_EXAMPLE_EXES = \
+ examples/cpp11/allocation/server.exe \
+ examples/cpp11/buffers/reference_counted.exe \
+ examples/cpp11/chat/chat_client.exe \
+ examples/cpp11/chat/chat_server.exe \
+ examples/cpp11/echo/async_tcp_echo_server.exe \
+ examples/cpp11/echo/async_udp_echo_server.exe \
+ examples/cpp11/echo/blocking_tcp_echo_client.exe \
+ examples/cpp11/echo/blocking_tcp_echo_server.exe \
+ examples/cpp11/echo/blocking_udp_echo_client.exe \
+ examples/cpp11/echo/blocking_udp_echo_server.exe \
+ examples/cpp11/http/client/async_client.exe \
+ examples/cpp11/http/client/sync_client.exe \
+ examples/cpp11/http/server/http_server.exe \
+ examples/cpp11/http/server2/http_server.exe \
+ examples/cpp11/http/server3/http_server.exe \
+ examples/cpp11/http/server4/http_server.exe \
+ examples/cpp11/icmp/ping.exe \
+ examples/cpp11/invocation/prioritised_handlers.exe \
+ examples/cpp11/iostreams/daytime_client.exe \
+ examples/cpp11/iostreams/daytime_server.exe \
+ examples/cpp11/iostreams/http_client.exe \
+ examples/cpp11/multicast/receiver.exe \
+ examples/cpp11/multicast/sender.exe \
+ examples/cpp11/nonblocking/third_party_lib.exe \
+ examples/cpp11/porthopper/client.exe \
+ examples/cpp11/porthopper/server.exe \
+ examples/cpp11/services/daytime_client.exe \
+ examples/cpp11/socks4/sync_client.exe \
+ examples/cpp11/timeouts/async_tcp_client.exe \
+ examples/cpp11/timeouts/blocking_tcp_client.exe \
+ examples/cpp11/timeouts/blocking_token_tcp_client.exe \
+ examples/cpp11/timeouts/blocking_udp_client.exe \
+ examples/cpp11/timeouts/server.exe \
+ examples/cpp11/timers/time_t_timer.exe \
+ examples/cpp11/tutorial/timer1/timer.exe \
+ examples/cpp11/tutorial/timer2/timer.exe \
+ examples/cpp11/tutorial/timer3/timer.exe \
+ examples/cpp11/tutorial/timer4/timer.exe \
+ examples/cpp11/tutorial/timer5/timer.exe \
+ examples/cpp11/tutorial/daytime1/client.exe \
+ examples/cpp11/tutorial/daytime2/server.exe \
+ examples/cpp11/tutorial/daytime3/server.exe \
+ examples/cpp11/tutorial/daytime4/client.exe \
+ examples/cpp11/tutorial/daytime5/server.exe \
+ examples/cpp11/tutorial/daytime6/server.exe \
+ examples/cpp11/tutorial/daytime7/server.exe \
+ examples/cpp11/windows/transmit_file.exe
ifdef STANDALONE
all: \
$(SEPARATE_COMPILATION_LIB) \
+ $(EXAMPLE_EXES) \
$(UNIT_TEST_EXES)
else
all: \
$(SEPARATE_COMPILATION_LIB) \
$(PERFORMANCE_TEST_EXES) \
- $(UNIT_TEST_EXES) \
$(EXAMPLE_EXES) \
- $(OTHER_EXAMPLE_EXES)
+ $(OTHER_EXAMPLE_EXES) \
+ $(UNIT_TEST_EXES)
endif
ifdef SEPARATE_COMPILATION
@@ -260,41 +250,41 @@ $(UNIT_TEST_EXES): %.exe: %.o
$(PERFORMANCE_TEST_EXES) $(EXAMPLE_EXES): %.exe: %.o
g++ -o$@ $(LDFLAGS) $< $(LIBS)
-examples/cpp03/http/server/http_server.exe: \
- examples/cpp03/http/server/connection.o \
- examples/cpp03/http/server/connection_manager.o \
- examples/cpp03/http/server/main.o \
- examples/cpp03/http/server/mime_types.o \
- examples/cpp03/http/server/reply.o \
- examples/cpp03/http/server/request_handler.o \
- examples/cpp03/http/server/request_parser.o \
- examples/cpp03/http/server/server.o
+examples/cpp11/http/server/http_server.exe: \
+ examples/cpp11/http/server/connection.o \
+ examples/cpp11/http/server/connection_manager.o \
+ examples/cpp11/http/server/main.o \
+ examples/cpp11/http/server/mime_types.o \
+ examples/cpp11/http/server/reply.o \
+ examples/cpp11/http/server/request_handler.o \
+ examples/cpp11/http/server/request_parser.o \
+ examples/cpp11/http/server/server.o
g++ -o$@ $(LDFLAGS) $^ $(LIBS)
-examples/cpp03/http/server2/http_server.exe: \
- examples/cpp03/http/server2/connection.o \
- examples/cpp03/http/server2/io_context_pool.o \
- examples/cpp03/http/server2/main.o \
- examples/cpp03/http/server2/mime_types.o \
- examples/cpp03/http/server2/reply.o \
- examples/cpp03/http/server2/request_handler.o \
- examples/cpp03/http/server2/request_parser.o \
- examples/cpp03/http/server2/server.o
+examples/cpp11/http/server2/http_server.exe: \
+ examples/cpp11/http/server2/connection.o \
+ examples/cpp11/http/server2/io_context_pool.o \
+ examples/cpp11/http/server2/main.o \
+ examples/cpp11/http/server2/mime_types.o \
+ examples/cpp11/http/server2/reply.o \
+ examples/cpp11/http/server2/request_handler.o \
+ examples/cpp11/http/server2/request_parser.o \
+ examples/cpp11/http/server2/server.o
g++ -o$@ $(LDFLAGS) $^ $(LIBS)
-examples/cpp03/http/server3/http_server.exe: \
- examples/cpp03/http/server3/connection.o \
- examples/cpp03/http/server3/main.o \
- examples/cpp03/http/server3/mime_types.o \
- examples/cpp03/http/server3/reply.o \
- examples/cpp03/http/server3/request_handler.o \
- examples/cpp03/http/server3/request_parser.o \
- examples/cpp03/http/server3/server.o
+examples/cpp11/http/server3/http_server.exe: \
+ examples/cpp11/http/server3/connection.o \
+ examples/cpp11/http/server3/main.o \
+ examples/cpp11/http/server3/mime_types.o \
+ examples/cpp11/http/server3/reply.o \
+ examples/cpp11/http/server3/request_handler.o \
+ examples/cpp11/http/server3/request_parser.o \
+ examples/cpp11/http/server3/server.o
g++ -o$@ $(LDFLAGS) $^ $(LIBS)
-examples/cpp03/services/daytime_client.exe: \
- examples/cpp03/services/daytime_client.o \
- examples/cpp03/services/logger_service.o
+examples/cpp11/services/daytime_client.exe: \
+ examples/cpp11/services/daytime_client.o \
+ examples/cpp11/services/logger_service.o
g++ -o$@ $(LDFLAGS) $^ $(LIBS)
.cpp.o:
diff --git a/3rdparty/asio/src/Makefile.msc b/3rdparty/asio/src/Makefile.msc
index f8de17ad40d..840dc7bebfe 100644
--- a/3rdparty/asio/src/Makefile.msc
+++ b/3rdparty/asio/src/Makefile.msc
@@ -115,6 +115,11 @@ PERFORMANCE_TEST_EXES = \
tests\performance\server.exe
UNIT_TEST_EXES = \
+ tests\unit\any_completion_executor.exe \
+ tests\unit\any_completion_handler.exe \
+ tests\unit\any_io_executor.exe \
+ tests\unit\append.exe \
+ tests\unit\as_tuple.exe \
tests\unit\associated_allocator.exe \
tests\unit\associated_cancellation_slot.exe \
tests\unit\associated_executor.exe \
@@ -123,21 +128,29 @@ UNIT_TEST_EXES = \
tests\unit\awaitable.exe \
tests\unit\basic_datagram_socket.exe \
tests\unit\basic_deadline_timer.exe \
+ tests\unit\basic_file.exe \
+ tests\unit\basic_random_access_file.exe \
tests\unit\basic_raw_socket.exe \
+ tests\unit\basic_readable_pipe.exe \
tests\unit\basic_seq_packet_socket.exe \
tests\unit\basic_serial_port.exe \
tests\unit\basic_signal_set.exe \
tests\unit\basic_socket.exe \
tests\unit\basic_socket_acceptor.exe \
+ tests\unit\basic_stream_file.exe \
tests\unit\basic_stream_socket.exe \
tests\unit\basic_streambuf.exe \
tests\unit\basic_waitable_timer.exe \
+ tests\unit\basic_writable_pipe.exe \
+ tests\unit\bind_allocator.exe \
tests\unit\bind_cancellation_slot.exe \
tests\unit\bind_executor.exe \
+ tests\unit\bind_immediate_executor.exe \
tests\unit\buffered_read_stream.exe \
tests\unit\buffered_stream.exe \
tests\unit\buffered_write_stream.exe \
tests\unit\buffer.exe \
+ tests\unit\buffer_registration.exe \
tests\unit\buffers_iterator.exe \
tests\unit\cancellation_signal.exe \
tests\unit\cancellation_state.exe \
@@ -146,9 +159,11 @@ UNIT_TEST_EXES = \
tests\unit\completion_condition.exe \
tests\unit\compose.exe \
tests\unit\connect.exe \
+ tests\unit\connect_pipe.exe \
tests\unit\coroutine.exe \
tests\unit\deadline_timer.exe \
tests\unit\defer.exe \
+ tests\unit\deferred.exe \
tests\unit\detached.exe \
tests\unit\dispatch.exe \
tests\unit\error.exe \
@@ -156,29 +171,16 @@ UNIT_TEST_EXES = \
tests\unit\execution\any_executor.exe \
tests\unit\execution\blocking.exe \
tests\unit\execution\blocking_adaptation.exe \
- tests\unit\execution\bulk_execute.exe \
- tests\unit\execution\bulk_guarantee.exe \
- tests\unit\execution\connect.exe \
tests\unit\execution\context_as.exe \
- tests\unit\execution\execute.exe \
tests\unit\execution\executor.exe \
tests\unit\execution\invocable_archetype.exe \
tests\unit\execution\mapping.exe \
- tests\unit\execution\operation_state.exe \
tests\unit\execution\outstanding_work.exe \
tests\unit\execution\prefer_only.exe \
- tests\unit\execution\receiver.exe \
tests\unit\execution\relationship.exe \
- tests\unit\execution\schedule.exe \
- tests\unit\execution\scheduler.exe \
- tests\unit\execution\sender.exe \
- tests\unit\execution\set_done.exe \
- tests\unit\execution\set_error.exe \
- tests\unit\execution\set_value.exe \
- tests\unit\execution\start.exe \
- tests\unit\execution\submit.exe \
tests\unit\executor.exe \
tests\unit\executor_work_guard.exe \
+ tests\unit\file_base.exe \
tests\unit\generic\basic_endpoint.exe \
tests\unit\generic\datagram_protocol.exe \
tests\unit\generic\raw_protocol.exe \
@@ -218,17 +220,24 @@ UNIT_TEST_EXES = \
tests\unit\packaged_task.exe \
tests\unit\placeholders.exe \
tests\unit\post.exe \
+ tests\unit\prepend.exe \
+ tests\unit\random_access_file.exe \
tests\unit\read.exe \
tests\unit\read_at.exe \
tests\unit\read_until.exe \
+ tests\unit\readable_pipe.exe \
+ tests\unit\recycling_allocator.exe \
tests\unit\redirect_error.exe \
+ tests\unit\registered_buffer.exe \
tests\unit\serial_port.exe \
tests\unit\serial_port_base.exe \
tests\unit\signal_set.exe \
+ tests\unit\signal_set_base.exe \
tests\unit\socket_base.exe \
tests\unit\static_thread_pool.exe \
tests\unit\steady_timer.exe \
tests\unit\strand.exe \
+ tests\unit\stream_file.exe \
tests\unit\streambuf.exe \
tests\unit\system_context.exe \
tests\unit\system_executor.exe \
@@ -258,57 +267,58 @@ UNIT_TEST_EXES = \
tests\unit\windows\overlapped_ptr.exe \
tests\unit\windows\random_access_handle.exe \
tests\unit\windows\stream_handle.exe \
+ tests\unit\writable_pipe.exe \
tests\unit\write.exe \
tests\unit\write_at.exe
-CPP03_EXAMPLE_EXES = \
- examples\cpp03\allocation\server.exe \
- examples\cpp03\buffers\reference_counted.exe \
- examples\cpp03\chat\chat_client.exe \
- examples\cpp03\chat\chat_server.exe \
- examples\cpp03\echo\async_tcp_echo_server.exe \
- examples\cpp03\echo\async_udp_echo_server.exe \
- examples\cpp03\echo\blocking_tcp_echo_client.exe \
- examples\cpp03\echo\blocking_tcp_echo_server.exe \
- examples\cpp03\echo\blocking_udp_echo_client.exe \
- examples\cpp03\echo\blocking_udp_echo_server.exe \
- examples\cpp03\http\client\async_client.exe \
- examples\cpp03\http\client\sync_client.exe \
- examples\cpp03\http\server\http_server.exe \
- examples\cpp03\http\server2\http_server.exe \
- examples\cpp03\http\server3\http_server.exe \
- examples\cpp03\http\server4\http_server.exe \
- examples\cpp03\icmp\ping.exe \
- examples\cpp03\invocation\prioritised_handlers.exe \
- examples\cpp03\iostreams\daytime_client.exe \
- examples\cpp03\iostreams\daytime_server.exe \
- examples\cpp03\iostreams\http_client.exe \
- examples\cpp03\multicast\receiver.exe \
- examples\cpp03\multicast\sender.exe \
- examples\cpp03\nonblocking\third_party_lib.exe \
- examples\cpp03\porthopper\client.exe \
- examples\cpp03\porthopper\server.exe \
- examples\cpp03\services\daytime_client.exe \
- examples\cpp03\socks4\sync_client.exe \
- examples\cpp03\timeouts\async_tcp_client.exe \
- examples\cpp03\timeouts\blocking_tcp_client.exe \
- examples\cpp03\timeouts\blocking_token_tcp_client.exe \
- examples\cpp03\timeouts\blocking_udp_client.exe \
- examples\cpp03\timeouts\server.exe \
- examples\cpp03\timers\time_t_timer.exe \
- examples\cpp03\tutorial\timer1\timer.exe \
- examples\cpp03\tutorial\timer2\timer.exe \
- examples\cpp03\tutorial\timer3\timer.exe \
- examples\cpp03\tutorial\timer4\timer.exe \
- examples\cpp03\tutorial\timer5\timer.exe \
- examples\cpp03\tutorial\daytime1\client.exe \
- examples\cpp03\tutorial\daytime2\server.exe \
- examples\cpp03\tutorial\daytime3\server.exe \
- examples\cpp03\tutorial\daytime4\client.exe \
- examples\cpp03\tutorial\daytime5\server.exe \
- examples\cpp03\tutorial\daytime6\server.exe \
- examples\cpp03\tutorial\daytime7\server.exe \
- examples\cpp03\windows\transmit_file.exe
+CPP11_EXAMPLE_EXES = \
+ examples\cpp11\allocation\server.exe \
+ examples\cpp11\buffers\reference_counted.exe \
+ examples\cpp11\chat\chat_client.exe \
+ examples\cpp11\chat\chat_server.exe \
+ examples\cpp11\echo\async_tcp_echo_server.exe \
+ examples\cpp11\echo\async_udp_echo_server.exe \
+ examples\cpp11\echo\blocking_tcp_echo_client.exe \
+ examples\cpp11\echo\blocking_tcp_echo_server.exe \
+ examples\cpp11\echo\blocking_udp_echo_client.exe \
+ examples\cpp11\echo\blocking_udp_echo_server.exe \
+ examples\cpp11\http\client\async_client.exe \
+ examples\cpp11\http\client\sync_client.exe \
+ examples\cpp11\http\server\http_server.exe \
+ examples\cpp11\http\server2\http_server.exe \
+ examples\cpp11\http\server3\http_server.exe \
+ examples\cpp11\http\server4\http_server.exe \
+ examples\cpp11\icmp\ping.exe \
+ examples\cpp11\invocation\prioritised_handlers.exe \
+ examples\cpp11\iostreams\daytime_client.exe \
+ examples\cpp11\iostreams\daytime_server.exe \
+ examples\cpp11\iostreams\http_client.exe \
+ examples\cpp11\multicast\receiver.exe \
+ examples\cpp11\multicast\sender.exe \
+ examples\cpp11\nonblocking\third_party_lib.exe \
+ examples\cpp11\porthopper\client.exe \
+ examples\cpp11\porthopper\server.exe \
+ examples\cpp11\services\daytime_client.exe \
+ examples\cpp11\socks4\sync_client.exe \
+ examples\cpp11\timeouts\async_tcp_client.exe \
+ examples\cpp11\timeouts\blocking_tcp_client.exe \
+ examples\cpp11\timeouts\blocking_token_tcp_client.exe \
+ examples\cpp11\timeouts\blocking_udp_client.exe \
+ examples\cpp11\timeouts\server.exe \
+ examples\cpp11\timers\time_t_timer.exe \
+ examples\cpp11\tutorial\timer1\timer.exe \
+ examples\cpp11\tutorial\timer2\timer.exe \
+ examples\cpp11\tutorial\timer3\timer.exe \
+ examples\cpp11\tutorial\timer4\timer.exe \
+ examples\cpp11\tutorial\timer5\timer.exe \
+ examples\cpp11\tutorial\daytime1\client.exe \
+ examples\cpp11\tutorial\daytime2\server.exe \
+ examples\cpp11\tutorial\daytime3\server.exe \
+ examples\cpp11\tutorial\daytime4\client.exe \
+ examples\cpp11\tutorial\daytime5\server.exe \
+ examples\cpp11\tutorial\daytime6\server.exe \
+ examples\cpp11\tutorial\daytime7\server.exe \
+ examples\cpp11\windows\transmit_file.exe
SSL_UNIT_TEST_EXES = \
tests\unit\ssl\basic_context.exe \
@@ -321,8 +331,8 @@ SSL_UNIT_TEST_EXES = \
tests\unit\ssl\stream_service.exe
SSL_EXAMPLE_EXES = \
- examples\cpp03\ssl\client.exe \
- examples\cpp03\ssl\server.exe
+ examples\cpp11\ssl\client.exe \
+ examples\cpp11\ssl\server.exe
!ifdef SEPARATE_COMPILATION
all: asio.lib
@@ -333,13 +343,14 @@ asio.lib: asio.cpp
!ifdef STANDALONE
all: \
+ $(CPP11_EXAMPLE_EXES) \
$(UNIT_TEST_EXES)
!else
all: \
$(LATENCY_TEST_EXES) \
$(PERFORMANCE_TEST_EXES) \
- $(UNIT_TEST_EXES) \
- $(CPP03_EXAMPLE_EXES)
+ $(CPP11_EXAMPLE_EXES) \
+ $(UNIT_TEST_EXES)
!endif
ssl: \
@@ -382,88 +393,88 @@ tests\unit\unit_test.obj: tests\unit\unit_test.cpp
{tests\unit\windows}.cpp{tests\unit\windows}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\allocation}.cpp{examples\cpp03\allocation}.exe:
+{examples\cpp11\allocation}.cpp{examples\cpp11\allocation}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\buffers}.cpp{examples\cpp03\buffers}.exe:
+{examples\cpp11\buffers}.cpp{examples\cpp11\buffers}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\chat}.cpp{examples\cpp03\chat}.exe:
+{examples\cpp11\chat}.cpp{examples\cpp11\chat}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\echo}.cpp{examples\cpp03\echo}.exe:
+{examples\cpp11\echo}.cpp{examples\cpp11\echo}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\http\client}.cpp{examples\cpp03\http\client}.exe:
+{examples\cpp11\http\client}.cpp{examples\cpp11\http\client}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\icmp}.cpp{examples\cpp03\icmp}.exe:
+{examples\cpp11\icmp}.cpp{examples\cpp11\icmp}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\invocation}.cpp{examples\cpp03\invocation}.exe:
+{examples\cpp11\invocation}.cpp{examples\cpp11\invocation}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\iostreams}.cpp{examples\cpp03\iostreams}.exe:
+{examples\cpp11\iostreams}.cpp{examples\cpp11\iostreams}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\multicast}.cpp{examples\cpp03\multicast}.exe:
+{examples\cpp11\multicast}.cpp{examples\cpp11\multicast}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\nonblocking}.cpp{examples\cpp03\nonblocking}.exe:
+{examples\cpp11\nonblocking}.cpp{examples\cpp11\nonblocking}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\porthopper}.cpp{examples\cpp03\porthopper}.exe:
+{examples\cpp11\porthopper}.cpp{examples\cpp11\porthopper}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\socks4}.cpp{examples\cpp03\socks4}.exe:
+{examples\cpp11\socks4}.cpp{examples\cpp11\socks4}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\ssl}.cpp{examples\cpp03\ssl}.exe:
+{examples\cpp11\ssl}.cpp{examples\cpp11\ssl}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(SSL_CXXFLAGS) $(DEFINES) $< $(SSL_LIBS) $(LIBS) -link -opt:ref
-{examples\cpp03\timeouts}.cpp{examples\cpp03\timeouts}.exe:
+{examples\cpp11\timeouts}.cpp{examples\cpp11\timeouts}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\timers}.cpp{examples\cpp03\timers}.exe:
+{examples\cpp11\timers}.cpp{examples\cpp11\timers}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\timer1}.cpp{examples\cpp03\tutorial\timer1}.exe:
+{examples\cpp11\tutorial\timer1}.cpp{examples\cpp11\tutorial\timer1}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\timer2}.cpp{examples\cpp03\tutorial\timer2}.exe:
+{examples\cpp11\tutorial\timer2}.cpp{examples\cpp11\tutorial\timer2}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\timer3}.cpp{examples\cpp03\tutorial\timer3}.exe:
+{examples\cpp11\tutorial\timer3}.cpp{examples\cpp11\tutorial\timer3}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\timer4}.cpp{examples\cpp03\tutorial\timer4}.exe:
+{examples\cpp11\tutorial\timer4}.cpp{examples\cpp11\tutorial\timer4}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\timer5}.cpp{examples\cpp03\tutorial\timer5}.exe:
+{examples\cpp11\tutorial\timer5}.cpp{examples\cpp11\tutorial\timer5}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime1}.cpp{examples\cpp03\tutorial\daytime1}.exe:
+{examples\cpp11\tutorial\daytime1}.cpp{examples\cpp11\tutorial\daytime1}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime2}.cpp{examples\cpp03\tutorial\daytime2}.exe:
+{examples\cpp11\tutorial\daytime2}.cpp{examples\cpp11\tutorial\daytime2}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime3}.cpp{examples\cpp03\tutorial\daytime3}.exe:
+{examples\cpp11\tutorial\daytime3}.cpp{examples\cpp11\tutorial\daytime3}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime4}.cpp{examples\cpp03\tutorial\daytime4}.exe:
+{examples\cpp11\tutorial\daytime4}.cpp{examples\cpp11\tutorial\daytime4}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime5}.cpp{examples\cpp03\tutorial\daytime5}.exe:
+{examples\cpp11\tutorial\daytime5}.cpp{examples\cpp11\tutorial\daytime5}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime6}.cpp{examples\cpp03\tutorial\daytime6}.exe:
+{examples\cpp11\tutorial\daytime6}.cpp{examples\cpp11\tutorial\daytime6}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\tutorial\daytime7}.cpp{examples\cpp03\tutorial\daytime7}.exe:
+{examples\cpp11\tutorial\daytime7}.cpp{examples\cpp11\tutorial\daytime7}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-{examples\cpp03\windows}.cpp{examples\cpp03\windows}.exe:
+{examples\cpp11\windows}.cpp{examples\cpp11\windows}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
{examples\cpp11\executors}.cpp{examples\cpp11\executors}.exe:
@@ -475,51 +486,51 @@ tests\unit\unit_test.obj: tests\unit\unit_test.cpp
{examples\cpp14\operations}.cpp{examples\cpp14\operations}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
-examples\cpp03\http\server\http_server.exe: \
- examples\cpp03\http\server\connection.cpp \
- examples\cpp03\http\server\connection_manager.cpp \
- examples\cpp03\http\server\main.cpp \
- examples\cpp03\http\server\mime_types.cpp \
- examples\cpp03\http\server\reply.cpp \
- examples\cpp03\http\server\request_handler.cpp \
- examples\cpp03\http\server\request_parser.cpp \
- examples\cpp03\http\server\server.cpp
- cl -Fe$@ -Foexamples\cpp03\http\server\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
-
-examples\cpp03\http\server2\http_server.exe: \
- examples\cpp03\http\server2\connection.cpp \
- examples\cpp03\http\server2\io_context_pool.cpp \
- examples\cpp03\http\server2\main.cpp \
- examples\cpp03\http\server2\mime_types.cpp \
- examples\cpp03\http\server2\reply.cpp \
- examples\cpp03\http\server2\request_handler.cpp \
- examples\cpp03\http\server2\request_parser.cpp \
- examples\cpp03\http\server2\server.cpp
- cl -Fe$@ -Foexamples\cpp03\http\server2\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
-
-examples\cpp03\http\server3\http_server.exe: \
- examples\cpp03\http\server3\connection.cpp \
- examples\cpp03\http\server3\main.cpp \
- examples\cpp03\http\server3\mime_types.cpp \
- examples\cpp03\http\server3\reply.cpp \
- examples\cpp03\http\server3\request_handler.cpp \
- examples\cpp03\http\server3\request_parser.cpp \
- examples\cpp03\http\server3\server.cpp
- cl -Fe$@ -Foexamples\cpp03\http\server3\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
-
-examples\cpp03\http\server4\http_server.exe: \
- examples\cpp03\http\server4\file_handler.cpp \
- examples\cpp03\http\server4\main.cpp \
- examples\cpp03\http\server4\mime_types.cpp \
- examples\cpp03\http\server4\reply.cpp \
- examples\cpp03\http\server4\request_parser.cpp \
- examples\cpp03\http\server4\server.cpp
- cl -Fe$@ -Foexamples\cpp03\http\server4\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
-
-examples\cpp03\services\daytime_client.exe: \
- examples\cpp03\services\daytime_client.cpp \
- examples\cpp03\services\logger_service.cpp
- cl -Fe$@ -Foexamples\cpp03\services\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
+examples\cpp11\http\server\http_server.exe: \
+ examples\cpp11\http\server\connection.cpp \
+ examples\cpp11\http\server\connection_manager.cpp \
+ examples\cpp11\http\server\main.cpp \
+ examples\cpp11\http\server\mime_types.cpp \
+ examples\cpp11\http\server\reply.cpp \
+ examples\cpp11\http\server\request_handler.cpp \
+ examples\cpp11\http\server\request_parser.cpp \
+ examples\cpp11\http\server\server.cpp
+ cl -Fe$@ -Foexamples\cpp11\http\server\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
+
+examples\cpp11\http\server2\http_server.exe: \
+ examples\cpp11\http\server2\connection.cpp \
+ examples\cpp11\http\server2\io_context_pool.cpp \
+ examples\cpp11\http\server2\main.cpp \
+ examples\cpp11\http\server2\mime_types.cpp \
+ examples\cpp11\http\server2\reply.cpp \
+ examples\cpp11\http\server2\request_handler.cpp \
+ examples\cpp11\http\server2\request_parser.cpp \
+ examples\cpp11\http\server2\server.cpp
+ cl -Fe$@ -Foexamples\cpp11\http\server2\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
+
+examples\cpp11\http\server3\http_server.exe: \
+ examples\cpp11\http\server3\connection.cpp \
+ examples\cpp11\http\server3\main.cpp \
+ examples\cpp11\http\server3\mime_types.cpp \
+ examples\cpp11\http\server3\reply.cpp \
+ examples\cpp11\http\server3\request_handler.cpp \
+ examples\cpp11\http\server3\request_parser.cpp \
+ examples\cpp11\http\server3\server.cpp
+ cl -Fe$@ -Foexamples\cpp11\http\server3\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
+
+examples\cpp11\http\server4\http_server.exe: \
+ examples\cpp11\http\server4\file_handler.cpp \
+ examples\cpp11\http\server4\main.cpp \
+ examples\cpp11\http\server4\mime_types.cpp \
+ examples\cpp11\http\server4\reply.cpp \
+ examples\cpp11\http\server4\request_parser.cpp \
+ examples\cpp11\http\server4\server.cpp
+ cl -Fe$@ -Foexamples\cpp11\http\server4\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
+
+examples\cpp11\services\daytime_client.exe: \
+ examples\cpp11\services\daytime_client.cpp \
+ examples\cpp11\services\logger_service.cpp
+ cl -Fe$@ -Foexamples\cpp11\services\ $(CXXFLAGS) $(DEFINES) $** $(LIBS) -link -opt:ref
clean:
-del /q /s asio.lib
diff --git a/3rdparty/asio/src/asio.cpp b/3rdparty/asio/src/asio.cpp
index b67266c1bff..bd919afb87c 100644
--- a/3rdparty/asio/src/asio.cpp
+++ b/3rdparty/asio/src/asio.cpp
@@ -2,7 +2,7 @@
// asio.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/asio_ssl.cpp b/3rdparty/asio/src/asio_ssl.cpp
index def7ceb2250..6a5a626a69a 100644
--- a/3rdparty/asio/src/asio_ssl.cpp
+++ b/3rdparty/asio/src/asio_ssl.cpp
@@ -2,7 +2,7 @@
// asio_ssl.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/Makefile.am b/3rdparty/asio/src/examples/cpp03/Makefile.am
deleted file mode 100644
index 0e6e0d378f2..00000000000
--- a/3rdparty/asio/src/examples/cpp03/Makefile.am
+++ /dev/null
@@ -1,251 +0,0 @@
-AUTOMAKE_OPTIONS = subdir-objects
-
-if SEPARATE_COMPILATION
-noinst_LIBRARIES = libasio.a
-libasio_a_SOURCES = ../../asio.cpp
-if HAVE_OPENSSL
-libasio_a_SOURCES += ../../asio_ssl.cpp
-endif
-LDADD = libasio.a
-endif
-
-noinst_PROGRAMS = \
- allocation/server \
- buffers/reference_counted \
- chat/chat_client \
- chat/chat_server \
- echo/async_tcp_echo_server \
- echo/async_udp_echo_server \
- echo/blocking_tcp_echo_client \
- echo/blocking_tcp_echo_server \
- echo/blocking_udp_echo_client \
- echo/blocking_udp_echo_server \
- http/client/async_client \
- http/client/sync_client \
- http/server/http_server \
- http/server2/http_server \
- http/server3/http_server \
- http/server4/http_server \
- icmp/ping \
- invocation/prioritised_handlers \
- iostreams/daytime_client \
- iostreams/daytime_server \
- iostreams/http_client \
- multicast/receiver \
- multicast/sender \
- nonblocking/third_party_lib \
- porthopper/client \
- porthopper/server \
- services/daytime_client \
- socks4/sync_client \
- timeouts/async_tcp_client \
- timeouts/blocking_tcp_client \
- timeouts/blocking_token_tcp_client \
- timeouts/blocking_udp_client \
- timeouts/server \
- timers/time_t_timer \
- tutorial/timer1/timer \
- tutorial/timer2/timer \
- tutorial/timer3/timer \
- tutorial/timer4/timer \
- tutorial/timer5/timer \
- tutorial/daytime1/client \
- tutorial/daytime2/server \
- tutorial/daytime3/server \
- tutorial/daytime4/client \
- tutorial/daytime5/server \
- tutorial/daytime6/server \
- tutorial/daytime7/server
-
-if !WINDOWS_TARGET
-noinst_PROGRAMS += \
- chat/posix_chat_client \
- fork/daemon \
- fork/process_per_connection \
- local/connect_pair \
- local/iostream_client \
- local/stream_server \
- local/stream_client
-endif
-
-if WINDOWS_TARGET
-noinst_PROGRAMS += \
- windows/transmit_file
-endif
-
-if HAVE_OPENSSL
-noinst_PROGRAMS += \
- ssl/client \
- ssl/server
-endif
-
-if HAVE_BOOST_COROUTINE
-noinst_PROGRAMS += \
- spawn/echo_server \
- spawn/parallel_grep
-endif
-
-noinst_HEADERS = \
- chat/chat_message.hpp \
- services/basic_logger.hpp \
- services/logger.hpp \
- services/logger_service.hpp
-
-AM_CXXFLAGS = -I$(srcdir)/../../../include
-
-allocation_server_SOURCES = allocation/server.cpp
-buffers_reference_counted_SOURCES = buffers/reference_counted.cpp
-chat_chat_client_SOURCES = chat/chat_client.cpp
-chat_chat_server_SOURCES = chat/chat_server.cpp
-echo_async_tcp_echo_server_SOURCES = echo/async_tcp_echo_server.cpp
-echo_async_udp_echo_server_SOURCES = echo/async_udp_echo_server.cpp
-echo_blocking_tcp_echo_client_SOURCES = echo/blocking_tcp_echo_client.cpp
-echo_blocking_tcp_echo_server_SOURCES = echo/blocking_tcp_echo_server.cpp
-echo_blocking_udp_echo_client_SOURCES = echo/blocking_udp_echo_client.cpp
-echo_blocking_udp_echo_server_SOURCES = echo/blocking_udp_echo_server.cpp
-http_client_async_client_SOURCES = http/client/async_client.cpp
-http_client_sync_client_SOURCES = http/client/sync_client.cpp
-http_server_http_server_SOURCES = \
- http/server/connection.cpp \
- http/server/connection_manager.cpp \
- http/server/main.cpp \
- http/server/mime_types.cpp \
- http/server/reply.cpp \
- http/server/request_handler.cpp \
- http/server/request_parser.cpp \
- http/server/server.cpp
-http_server2_http_server_SOURCES = \
- http/server2/connection.cpp \
- http/server2/io_context_pool.cpp \
- http/server2/main.cpp \
- http/server2/mime_types.cpp \
- http/server2/reply.cpp \
- http/server2/request_handler.cpp \
- http/server2/request_parser.cpp \
- http/server2/server.cpp
-http_server3_http_server_SOURCES = \
- http/server3/connection.cpp \
- http/server3/main.cpp \
- http/server3/mime_types.cpp \
- http/server3/reply.cpp \
- http/server3/request_handler.cpp \
- http/server3/request_parser.cpp \
- http/server3/server.cpp
-http_server4_http_server_SOURCES = \
- http/server4/file_handler.cpp \
- http/server4/main.cpp \
- http/server4/mime_types.cpp \
- http/server4/reply.cpp \
- http/server4/request_parser.cpp \
- http/server4/server.cpp
-icmp_ping_SOURCES = icmp/ping.cpp
-invocation_prioritised_handlers_SOURCES = invocation/prioritised_handlers.cpp
-iostreams_daytime_client_SOURCES = iostreams/daytime_client.cpp
-iostreams_daytime_server_SOURCES = iostreams/daytime_server.cpp
-iostreams_http_client_SOURCES = iostreams/http_client.cpp
-multicast_receiver_SOURCES = multicast/receiver.cpp
-multicast_sender_SOURCES = multicast/sender.cpp
-nonblocking_third_party_lib_SOURCES = nonblocking/third_party_lib.cpp
-porthopper_client_SOURCES = porthopper/client.cpp
-porthopper_server_SOURCES = porthopper/server.cpp
-services_daytime_client_SOURCES = \
- services/daytime_client.cpp \
- services/logger_service.cpp
-socks4_sync_client_SOURCES = socks4/sync_client.cpp
-timeouts_async_tcp_client_SOURCES = timeouts/async_tcp_client.cpp
-timeouts_blocking_tcp_client_SOURCES = timeouts/blocking_tcp_client.cpp
-timeouts_blocking_token_tcp_client_SOURCES = timeouts/blocking_token_tcp_client.cpp
-timeouts_blocking_udp_client_SOURCES = timeouts/blocking_udp_client.cpp
-timeouts_server_SOURCES = timeouts/server.cpp
-timers_time_t_timer_SOURCES = timers/time_t_timer.cpp
-tutorial_timer1_timer_SOURCES = tutorial/timer1/timer.cpp
-tutorial_timer2_timer_SOURCES = tutorial/timer2/timer.cpp
-tutorial_timer3_timer_SOURCES = tutorial/timer3/timer.cpp
-tutorial_timer4_timer_SOURCES = tutorial/timer4/timer.cpp
-tutorial_timer5_timer_SOURCES = tutorial/timer5/timer.cpp
-tutorial_daytime1_client_SOURCES = tutorial/daytime1/client.cpp
-tutorial_daytime2_server_SOURCES = tutorial/daytime2/server.cpp
-tutorial_daytime3_server_SOURCES = tutorial/daytime3/server.cpp
-tutorial_daytime4_client_SOURCES = tutorial/daytime4/client.cpp
-tutorial_daytime5_server_SOURCES = tutorial/daytime5/server.cpp
-tutorial_daytime6_server_SOURCES = tutorial/daytime6/server.cpp
-tutorial_daytime7_server_SOURCES = tutorial/daytime7/server.cpp
-
-if !WINDOWS_TARGET
-chat_posix_chat_client_SOURCES = chat/posix_chat_client.cpp
-fork_daemon_SOURCES = fork/daemon.cpp
-fork_process_per_connection_SOURCES = fork/process_per_connection.cpp
-local_connect_pair_SOURCES = local/connect_pair.cpp
-local_iostream_client_SOURCES = local/iostream_client.cpp
-local_stream_server_SOURCES = local/stream_server.cpp
-local_stream_client_SOURCES = local/stream_client.cpp
-endif
-
-if WINDOWS_TARGET
-windows_transmit_file_SOURCES = windows/transmit_file.cpp
-endif
-
-if HAVE_OPENSSL
-ssl_client_SOURCES = ssl/client.cpp
-ssl_server_SOURCES = ssl/server.cpp
-endif
-
-if HAVE_BOOST_COROUTINE
-spawn_echo_server_SOURCES = spawn/echo_server.cpp
-spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
-spawn_parallel_grep_SOURCES = spawn/parallel_grep.cpp
-spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
-endif
-
-EXTRA_DIST = \
- http/server/connection.hpp \
- http/server/connection_manager.hpp \
- http/server/header.hpp \
- http/server/mime_types.hpp \
- http/server/reply.hpp \
- http/server/request.hpp \
- http/server/request_handler.hpp \
- http/server/request_parser.hpp \
- http/server/server.hpp \
- http/server2/connection.hpp \
- http/server2/io_context_pool.hpp \
- http/server2/header.hpp \
- http/server2/mime_types.hpp \
- http/server2/reply.hpp \
- http/server2/request.hpp \
- http/server2/request_handler.hpp \
- http/server2/request_parser.hpp \
- http/server2/server.hpp \
- http/server3/connection.hpp \
- http/server3/header.hpp \
- http/server3/mime_types.hpp \
- http/server3/reply.hpp \
- http/server3/request.hpp \
- http/server3/request_handler.hpp \
- http/server3/request_parser.hpp \
- http/server3/server.hpp \
- http/server4/file_handler.hpp \
- http/server4/header.hpp \
- http/server4/mime_types.hpp \
- http/server4/reply.hpp \
- http/server4/request.hpp \
- http/server4/request_parser.hpp \
- http/server4/server.hpp \
- icmp/icmp_header.hpp \
- icmp/ipv4_header.hpp \
- porthopper/protocol.hpp \
- serialization/client.cpp \
- serialization/server.cpp \
- serialization/connection.hpp \
- serialization/stock.hpp \
- services/basic_logger.hpp \
- services/logger.hpp \
- services/logger_service.hpp \
- socks4/socks4.hpp \
- ssl/README \
- ssl/ca.pem \
- ssl/server.pem \
- ssl/dh2048.pem
-
-MAINTAINERCLEANFILES = \
- $(srcdir)/Makefile.in
diff --git a/3rdparty/asio/src/examples/cpp03/Makefile.in b/3rdparty/asio/src/examples/cpp03/Makefile.in
deleted file mode 100644
index 2fc8903af3a..00000000000
--- a/3rdparty/asio/src/examples/cpp03/Makefile.in
+++ /dev/null
@@ -1,2339 +0,0 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-
-VPATH = @srcdir@
-am__is_gnu_make = { \
- if test -z '$(MAKELEVEL)'; then \
- false; \
- elif test -n '$(MAKE_HOST)'; then \
- true; \
- elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
- true; \
- else \
- false; \
- fi; \
-}
-am__make_running_with_option = \
- case $${target_option-} in \
- ?) ;; \
- *) echo "am__make_running_with_option: internal error: invalid" \
- "target option '$${target_option-}' specified" >&2; \
- exit 1;; \
- esac; \
- has_opt=no; \
- sane_makeflags=$$MAKEFLAGS; \
- if $(am__is_gnu_make); then \
- sane_makeflags=$$MFLAGS; \
- else \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- bs=\\; \
- sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
- | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
- esac; \
- fi; \
- skip_next=no; \
- strip_trailopt () \
- { \
- flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
- }; \
- for flg in $$sane_makeflags; do \
- test $$skip_next = yes && { skip_next=no; continue; }; \
- case $$flg in \
- *=*|--*) continue;; \
- -*I) strip_trailopt 'I'; skip_next=yes;; \
- -*I?*) strip_trailopt 'I';; \
- -*O) strip_trailopt 'O'; skip_next=yes;; \
- -*O?*) strip_trailopt 'O';; \
- -*l) strip_trailopt 'l'; skip_next=yes;; \
- -*l?*) strip_trailopt 'l';; \
- -[dEDm]) skip_next=yes;; \
- -[JT]) skip_next=yes;; \
- esac; \
- case $$flg in \
- *$$target_option*) has_opt=yes; break;; \
- esac; \
- done; \
- test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__append_1 = ../../asio_ssl.cpp
-noinst_PROGRAMS = allocation/server$(EXEEXT) \
- buffers/reference_counted$(EXEEXT) chat/chat_client$(EXEEXT) \
- chat/chat_server$(EXEEXT) echo/async_tcp_echo_server$(EXEEXT) \
- echo/async_udp_echo_server$(EXEEXT) \
- echo/blocking_tcp_echo_client$(EXEEXT) \
- echo/blocking_tcp_echo_server$(EXEEXT) \
- echo/blocking_udp_echo_client$(EXEEXT) \
- echo/blocking_udp_echo_server$(EXEEXT) \
- http/client/async_client$(EXEEXT) \
- http/client/sync_client$(EXEEXT) \
- http/server/http_server$(EXEEXT) \
- http/server2/http_server$(EXEEXT) \
- http/server3/http_server$(EXEEXT) \
- http/server4/http_server$(EXEEXT) icmp/ping$(EXEEXT) \
- invocation/prioritised_handlers$(EXEEXT) \
- iostreams/daytime_client$(EXEEXT) \
- iostreams/daytime_server$(EXEEXT) \
- iostreams/http_client$(EXEEXT) multicast/receiver$(EXEEXT) \
- multicast/sender$(EXEEXT) nonblocking/third_party_lib$(EXEEXT) \
- porthopper/client$(EXEEXT) porthopper/server$(EXEEXT) \
- services/daytime_client$(EXEEXT) socks4/sync_client$(EXEEXT) \
- timeouts/async_tcp_client$(EXEEXT) \
- timeouts/blocking_tcp_client$(EXEEXT) \
- timeouts/blocking_token_tcp_client$(EXEEXT) \
- timeouts/blocking_udp_client$(EXEEXT) timeouts/server$(EXEEXT) \
- timers/time_t_timer$(EXEEXT) tutorial/timer1/timer$(EXEEXT) \
- tutorial/timer2/timer$(EXEEXT) tutorial/timer3/timer$(EXEEXT) \
- tutorial/timer4/timer$(EXEEXT) tutorial/timer5/timer$(EXEEXT) \
- tutorial/daytime1/client$(EXEEXT) \
- tutorial/daytime2/server$(EXEEXT) \
- tutorial/daytime3/server$(EXEEXT) \
- tutorial/daytime4/client$(EXEEXT) \
- tutorial/daytime5/server$(EXEEXT) \
- tutorial/daytime6/server$(EXEEXT) \
- tutorial/daytime7/server$(EXEEXT) $(am__EXEEXT_1) \
- $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4)
-@WINDOWS_TARGET_FALSE@am__append_2 = \
-@WINDOWS_TARGET_FALSE@ chat/posix_chat_client \
-@WINDOWS_TARGET_FALSE@ fork/daemon \
-@WINDOWS_TARGET_FALSE@ fork/process_per_connection \
-@WINDOWS_TARGET_FALSE@ local/connect_pair \
-@WINDOWS_TARGET_FALSE@ local/iostream_client \
-@WINDOWS_TARGET_FALSE@ local/stream_server \
-@WINDOWS_TARGET_FALSE@ local/stream_client
-
-@WINDOWS_TARGET_TRUE@am__append_3 = \
-@WINDOWS_TARGET_TRUE@ windows/transmit_file
-
-@HAVE_OPENSSL_TRUE@am__append_4 = \
-@HAVE_OPENSSL_TRUE@ ssl/client \
-@HAVE_OPENSSL_TRUE@ ssl/server
-
-@HAVE_BOOST_COROUTINE_TRUE@am__append_5 = \
-@HAVE_BOOST_COROUTINE_TRUE@ spawn/echo_server \
-@HAVE_BOOST_COROUTINE_TRUE@ spawn/parallel_grep
-
-subdir = src/examples/cpp03
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
- $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-@WINDOWS_TARGET_FALSE@am__EXEEXT_1 = chat/posix_chat_client$(EXEEXT) \
-@WINDOWS_TARGET_FALSE@ fork/daemon$(EXEEXT) \
-@WINDOWS_TARGET_FALSE@ fork/process_per_connection$(EXEEXT) \
-@WINDOWS_TARGET_FALSE@ local/connect_pair$(EXEEXT) \
-@WINDOWS_TARGET_FALSE@ local/iostream_client$(EXEEXT) \
-@WINDOWS_TARGET_FALSE@ local/stream_server$(EXEEXT) \
-@WINDOWS_TARGET_FALSE@ local/stream_client$(EXEEXT)
-@WINDOWS_TARGET_TRUE@am__EXEEXT_2 = windows/transmit_file$(EXEEXT)
-@HAVE_OPENSSL_TRUE@am__EXEEXT_3 = ssl/client$(EXEEXT) \
-@HAVE_OPENSSL_TRUE@ ssl/server$(EXEEXT)
-@HAVE_BOOST_COROUTINE_TRUE@am__EXEEXT_4 = spawn/echo_server$(EXEEXT) \
-@HAVE_BOOST_COROUTINE_TRUE@ spawn/parallel_grep$(EXEEXT)
-PROGRAMS = $(noinst_PROGRAMS)
-LIBRARIES = $(noinst_LIBRARIES)
-AR = ar
-ARFLAGS = cru
-AM_V_AR = $(am__v_AR_@AM_V@)
-am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
-am__v_AR_0 = @echo " AR " $@;
-am__v_AR_1 =
-libasio_a_AR = $(AR) $(ARFLAGS)
-libasio_a_LIBADD =
-am__libasio_a_SOURCES_DIST = ../../asio.cpp ../../asio_ssl.cpp
-am__dirstamp = $(am__leading_dot)dirstamp
-@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__objects_1 = ../../asio_ssl.$(OBJEXT)
-@SEPARATE_COMPILATION_TRUE@am_libasio_a_OBJECTS = \
-@SEPARATE_COMPILATION_TRUE@ ../../asio.$(OBJEXT) \
-@SEPARATE_COMPILATION_TRUE@ $(am__objects_1)
-libasio_a_OBJECTS = $(am_libasio_a_OBJECTS)
-am_allocation_server_OBJECTS = allocation/server.$(OBJEXT)
-allocation_server_OBJECTS = $(am_allocation_server_OBJECTS)
-allocation_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@allocation_server_DEPENDENCIES = libasio.a
-am_buffers_reference_counted_OBJECTS = \
- buffers/reference_counted.$(OBJEXT)
-buffers_reference_counted_OBJECTS = \
- $(am_buffers_reference_counted_OBJECTS)
-buffers_reference_counted_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@buffers_reference_counted_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_chat_chat_client_OBJECTS = chat/chat_client.$(OBJEXT)
-chat_chat_client_OBJECTS = $(am_chat_chat_client_OBJECTS)
-chat_chat_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@chat_chat_client_DEPENDENCIES = libasio.a
-am_chat_chat_server_OBJECTS = chat/chat_server.$(OBJEXT)
-chat_chat_server_OBJECTS = $(am_chat_chat_server_OBJECTS)
-chat_chat_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@chat_chat_server_DEPENDENCIES = libasio.a
-am__chat_posix_chat_client_SOURCES_DIST = chat/posix_chat_client.cpp
-@WINDOWS_TARGET_FALSE@am_chat_posix_chat_client_OBJECTS = \
-@WINDOWS_TARGET_FALSE@ chat/posix_chat_client.$(OBJEXT)
-chat_posix_chat_client_OBJECTS = $(am_chat_posix_chat_client_OBJECTS)
-chat_posix_chat_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@chat_posix_chat_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_echo_async_tcp_echo_server_OBJECTS = \
- echo/async_tcp_echo_server.$(OBJEXT)
-echo_async_tcp_echo_server_OBJECTS = \
- $(am_echo_async_tcp_echo_server_OBJECTS)
-echo_async_tcp_echo_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@echo_async_tcp_echo_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_echo_async_udp_echo_server_OBJECTS = \
- echo/async_udp_echo_server.$(OBJEXT)
-echo_async_udp_echo_server_OBJECTS = \
- $(am_echo_async_udp_echo_server_OBJECTS)
-echo_async_udp_echo_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@echo_async_udp_echo_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_echo_blocking_tcp_echo_client_OBJECTS = \
- echo/blocking_tcp_echo_client.$(OBJEXT)
-echo_blocking_tcp_echo_client_OBJECTS = \
- $(am_echo_blocking_tcp_echo_client_OBJECTS)
-echo_blocking_tcp_echo_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@echo_blocking_tcp_echo_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_echo_blocking_tcp_echo_server_OBJECTS = \
- echo/blocking_tcp_echo_server.$(OBJEXT)
-echo_blocking_tcp_echo_server_OBJECTS = \
- $(am_echo_blocking_tcp_echo_server_OBJECTS)
-echo_blocking_tcp_echo_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@echo_blocking_tcp_echo_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_echo_blocking_udp_echo_client_OBJECTS = \
- echo/blocking_udp_echo_client.$(OBJEXT)
-echo_blocking_udp_echo_client_OBJECTS = \
- $(am_echo_blocking_udp_echo_client_OBJECTS)
-echo_blocking_udp_echo_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@echo_blocking_udp_echo_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_echo_blocking_udp_echo_server_OBJECTS = \
- echo/blocking_udp_echo_server.$(OBJEXT)
-echo_blocking_udp_echo_server_OBJECTS = \
- $(am_echo_blocking_udp_echo_server_OBJECTS)
-echo_blocking_udp_echo_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@echo_blocking_udp_echo_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am__fork_daemon_SOURCES_DIST = fork/daemon.cpp
-@WINDOWS_TARGET_FALSE@am_fork_daemon_OBJECTS = fork/daemon.$(OBJEXT)
-fork_daemon_OBJECTS = $(am_fork_daemon_OBJECTS)
-fork_daemon_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@fork_daemon_DEPENDENCIES = libasio.a
-am__fork_process_per_connection_SOURCES_DIST = \
- fork/process_per_connection.cpp
-@WINDOWS_TARGET_FALSE@am_fork_process_per_connection_OBJECTS = \
-@WINDOWS_TARGET_FALSE@ fork/process_per_connection.$(OBJEXT)
-fork_process_per_connection_OBJECTS = \
- $(am_fork_process_per_connection_OBJECTS)
-fork_process_per_connection_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@fork_process_per_connection_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_http_client_async_client_OBJECTS = \
- http/client/async_client.$(OBJEXT)
-http_client_async_client_OBJECTS = \
- $(am_http_client_async_client_OBJECTS)
-http_client_async_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@http_client_async_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_http_client_sync_client_OBJECTS = \
- http/client/sync_client.$(OBJEXT)
-http_client_sync_client_OBJECTS = \
- $(am_http_client_sync_client_OBJECTS)
-http_client_sync_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@http_client_sync_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_http_server_http_server_OBJECTS = http/server/connection.$(OBJEXT) \
- http/server/connection_manager.$(OBJEXT) \
- http/server/main.$(OBJEXT) http/server/mime_types.$(OBJEXT) \
- http/server/reply.$(OBJEXT) \
- http/server/request_handler.$(OBJEXT) \
- http/server/request_parser.$(OBJEXT) \
- http/server/server.$(OBJEXT)
-http_server_http_server_OBJECTS = \
- $(am_http_server_http_server_OBJECTS)
-http_server_http_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@http_server_http_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_http_server2_http_server_OBJECTS = \
- http/server2/connection.$(OBJEXT) \
- http/server2/io_context_pool.$(OBJEXT) \
- http/server2/main.$(OBJEXT) http/server2/mime_types.$(OBJEXT) \
- http/server2/reply.$(OBJEXT) \
- http/server2/request_handler.$(OBJEXT) \
- http/server2/request_parser.$(OBJEXT) \
- http/server2/server.$(OBJEXT)
-http_server2_http_server_OBJECTS = \
- $(am_http_server2_http_server_OBJECTS)
-http_server2_http_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@http_server2_http_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_http_server3_http_server_OBJECTS = \
- http/server3/connection.$(OBJEXT) http/server3/main.$(OBJEXT) \
- http/server3/mime_types.$(OBJEXT) http/server3/reply.$(OBJEXT) \
- http/server3/request_handler.$(OBJEXT) \
- http/server3/request_parser.$(OBJEXT) \
- http/server3/server.$(OBJEXT)
-http_server3_http_server_OBJECTS = \
- $(am_http_server3_http_server_OBJECTS)
-http_server3_http_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@http_server3_http_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_http_server4_http_server_OBJECTS = \
- http/server4/file_handler.$(OBJEXT) \
- http/server4/main.$(OBJEXT) http/server4/mime_types.$(OBJEXT) \
- http/server4/reply.$(OBJEXT) \
- http/server4/request_parser.$(OBJEXT) \
- http/server4/server.$(OBJEXT)
-http_server4_http_server_OBJECTS = \
- $(am_http_server4_http_server_OBJECTS)
-http_server4_http_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@http_server4_http_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_icmp_ping_OBJECTS = icmp/ping.$(OBJEXT)
-icmp_ping_OBJECTS = $(am_icmp_ping_OBJECTS)
-icmp_ping_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@icmp_ping_DEPENDENCIES = libasio.a
-am_invocation_prioritised_handlers_OBJECTS = \
- invocation/prioritised_handlers.$(OBJEXT)
-invocation_prioritised_handlers_OBJECTS = \
- $(am_invocation_prioritised_handlers_OBJECTS)
-invocation_prioritised_handlers_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@invocation_prioritised_handlers_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_iostreams_daytime_client_OBJECTS = \
- iostreams/daytime_client.$(OBJEXT)
-iostreams_daytime_client_OBJECTS = \
- $(am_iostreams_daytime_client_OBJECTS)
-iostreams_daytime_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@iostreams_daytime_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_iostreams_daytime_server_OBJECTS = \
- iostreams/daytime_server.$(OBJEXT)
-iostreams_daytime_server_OBJECTS = \
- $(am_iostreams_daytime_server_OBJECTS)
-iostreams_daytime_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@iostreams_daytime_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_iostreams_http_client_OBJECTS = iostreams/http_client.$(OBJEXT)
-iostreams_http_client_OBJECTS = $(am_iostreams_http_client_OBJECTS)
-iostreams_http_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@iostreams_http_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am__local_connect_pair_SOURCES_DIST = local/connect_pair.cpp
-@WINDOWS_TARGET_FALSE@am_local_connect_pair_OBJECTS = \
-@WINDOWS_TARGET_FALSE@ local/connect_pair.$(OBJEXT)
-local_connect_pair_OBJECTS = $(am_local_connect_pair_OBJECTS)
-local_connect_pair_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@local_connect_pair_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am__local_iostream_client_SOURCES_DIST = local/iostream_client.cpp
-@WINDOWS_TARGET_FALSE@am_local_iostream_client_OBJECTS = \
-@WINDOWS_TARGET_FALSE@ local/iostream_client.$(OBJEXT)
-local_iostream_client_OBJECTS = $(am_local_iostream_client_OBJECTS)
-local_iostream_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@local_iostream_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am__local_stream_client_SOURCES_DIST = local/stream_client.cpp
-@WINDOWS_TARGET_FALSE@am_local_stream_client_OBJECTS = \
-@WINDOWS_TARGET_FALSE@ local/stream_client.$(OBJEXT)
-local_stream_client_OBJECTS = $(am_local_stream_client_OBJECTS)
-local_stream_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@local_stream_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am__local_stream_server_SOURCES_DIST = local/stream_server.cpp
-@WINDOWS_TARGET_FALSE@am_local_stream_server_OBJECTS = \
-@WINDOWS_TARGET_FALSE@ local/stream_server.$(OBJEXT)
-local_stream_server_OBJECTS = $(am_local_stream_server_OBJECTS)
-local_stream_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@local_stream_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_multicast_receiver_OBJECTS = multicast/receiver.$(OBJEXT)
-multicast_receiver_OBJECTS = $(am_multicast_receiver_OBJECTS)
-multicast_receiver_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@multicast_receiver_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_multicast_sender_OBJECTS = multicast/sender.$(OBJEXT)
-multicast_sender_OBJECTS = $(am_multicast_sender_OBJECTS)
-multicast_sender_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@multicast_sender_DEPENDENCIES = libasio.a
-am_nonblocking_third_party_lib_OBJECTS = \
- nonblocking/third_party_lib.$(OBJEXT)
-nonblocking_third_party_lib_OBJECTS = \
- $(am_nonblocking_third_party_lib_OBJECTS)
-nonblocking_third_party_lib_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@nonblocking_third_party_lib_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_porthopper_client_OBJECTS = porthopper/client.$(OBJEXT)
-porthopper_client_OBJECTS = $(am_porthopper_client_OBJECTS)
-porthopper_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@porthopper_client_DEPENDENCIES = libasio.a
-am_porthopper_server_OBJECTS = porthopper/server.$(OBJEXT)
-porthopper_server_OBJECTS = $(am_porthopper_server_OBJECTS)
-porthopper_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@porthopper_server_DEPENDENCIES = libasio.a
-am_services_daytime_client_OBJECTS = \
- services/daytime_client.$(OBJEXT) \
- services/logger_service.$(OBJEXT)
-services_daytime_client_OBJECTS = \
- $(am_services_daytime_client_OBJECTS)
-services_daytime_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@services_daytime_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_socks4_sync_client_OBJECTS = socks4/sync_client.$(OBJEXT)
-socks4_sync_client_OBJECTS = $(am_socks4_sync_client_OBJECTS)
-socks4_sync_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@socks4_sync_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am__spawn_echo_server_SOURCES_DIST = spawn/echo_server.cpp
-@HAVE_BOOST_COROUTINE_TRUE@am_spawn_echo_server_OBJECTS = \
-@HAVE_BOOST_COROUTINE_TRUE@ spawn/echo_server.$(OBJEXT)
-spawn_echo_server_OBJECTS = $(am_spawn_echo_server_OBJECTS)
-@HAVE_BOOST_COROUTINE_TRUE@spawn_echo_server_DEPENDENCIES = $(LDADD)
-am__spawn_parallel_grep_SOURCES_DIST = spawn/parallel_grep.cpp
-@HAVE_BOOST_COROUTINE_TRUE@am_spawn_parallel_grep_OBJECTS = \
-@HAVE_BOOST_COROUTINE_TRUE@ spawn/parallel_grep.$(OBJEXT)
-spawn_parallel_grep_OBJECTS = $(am_spawn_parallel_grep_OBJECTS)
-@HAVE_BOOST_COROUTINE_TRUE@spawn_parallel_grep_DEPENDENCIES = \
-@HAVE_BOOST_COROUTINE_TRUE@ $(LDADD)
-am__ssl_client_SOURCES_DIST = ssl/client.cpp
-@HAVE_OPENSSL_TRUE@am_ssl_client_OBJECTS = ssl/client.$(OBJEXT)
-ssl_client_OBJECTS = $(am_ssl_client_OBJECTS)
-ssl_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@ssl_client_DEPENDENCIES = libasio.a
-am__ssl_server_SOURCES_DIST = ssl/server.cpp
-@HAVE_OPENSSL_TRUE@am_ssl_server_OBJECTS = ssl/server.$(OBJEXT)
-ssl_server_OBJECTS = $(am_ssl_server_OBJECTS)
-ssl_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@ssl_server_DEPENDENCIES = libasio.a
-am_timeouts_async_tcp_client_OBJECTS = \
- timeouts/async_tcp_client.$(OBJEXT)
-timeouts_async_tcp_client_OBJECTS = \
- $(am_timeouts_async_tcp_client_OBJECTS)
-timeouts_async_tcp_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@timeouts_async_tcp_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_timeouts_blocking_tcp_client_OBJECTS = \
- timeouts/blocking_tcp_client.$(OBJEXT)
-timeouts_blocking_tcp_client_OBJECTS = \
- $(am_timeouts_blocking_tcp_client_OBJECTS)
-timeouts_blocking_tcp_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@timeouts_blocking_tcp_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_timeouts_blocking_token_tcp_client_OBJECTS = \
- timeouts/blocking_token_tcp_client.$(OBJEXT)
-timeouts_blocking_token_tcp_client_OBJECTS = \
- $(am_timeouts_blocking_token_tcp_client_OBJECTS)
-timeouts_blocking_token_tcp_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@timeouts_blocking_token_tcp_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_timeouts_blocking_udp_client_OBJECTS = \
- timeouts/blocking_udp_client.$(OBJEXT)
-timeouts_blocking_udp_client_OBJECTS = \
- $(am_timeouts_blocking_udp_client_OBJECTS)
-timeouts_blocking_udp_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@timeouts_blocking_udp_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_timeouts_server_OBJECTS = timeouts/server.$(OBJEXT)
-timeouts_server_OBJECTS = $(am_timeouts_server_OBJECTS)
-timeouts_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@timeouts_server_DEPENDENCIES = libasio.a
-am_timers_time_t_timer_OBJECTS = timers/time_t_timer.$(OBJEXT)
-timers_time_t_timer_OBJECTS = $(am_timers_time_t_timer_OBJECTS)
-timers_time_t_timer_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@timers_time_t_timer_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_daytime1_client_OBJECTS = \
- tutorial/daytime1/client.$(OBJEXT)
-tutorial_daytime1_client_OBJECTS = \
- $(am_tutorial_daytime1_client_OBJECTS)
-tutorial_daytime1_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_daytime1_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_daytime2_server_OBJECTS = \
- tutorial/daytime2/server.$(OBJEXT)
-tutorial_daytime2_server_OBJECTS = \
- $(am_tutorial_daytime2_server_OBJECTS)
-tutorial_daytime2_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_daytime2_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_daytime3_server_OBJECTS = \
- tutorial/daytime3/server.$(OBJEXT)
-tutorial_daytime3_server_OBJECTS = \
- $(am_tutorial_daytime3_server_OBJECTS)
-tutorial_daytime3_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_daytime3_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_daytime4_client_OBJECTS = \
- tutorial/daytime4/client.$(OBJEXT)
-tutorial_daytime4_client_OBJECTS = \
- $(am_tutorial_daytime4_client_OBJECTS)
-tutorial_daytime4_client_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_daytime4_client_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_daytime5_server_OBJECTS = \
- tutorial/daytime5/server.$(OBJEXT)
-tutorial_daytime5_server_OBJECTS = \
- $(am_tutorial_daytime5_server_OBJECTS)
-tutorial_daytime5_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_daytime5_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_daytime6_server_OBJECTS = \
- tutorial/daytime6/server.$(OBJEXT)
-tutorial_daytime6_server_OBJECTS = \
- $(am_tutorial_daytime6_server_OBJECTS)
-tutorial_daytime6_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_daytime6_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_daytime7_server_OBJECTS = \
- tutorial/daytime7/server.$(OBJEXT)
-tutorial_daytime7_server_OBJECTS = \
- $(am_tutorial_daytime7_server_OBJECTS)
-tutorial_daytime7_server_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_daytime7_server_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_timer1_timer_OBJECTS = tutorial/timer1/timer.$(OBJEXT)
-tutorial_timer1_timer_OBJECTS = $(am_tutorial_timer1_timer_OBJECTS)
-tutorial_timer1_timer_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_timer1_timer_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_timer2_timer_OBJECTS = tutorial/timer2/timer.$(OBJEXT)
-tutorial_timer2_timer_OBJECTS = $(am_tutorial_timer2_timer_OBJECTS)
-tutorial_timer2_timer_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_timer2_timer_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_timer3_timer_OBJECTS = tutorial/timer3/timer.$(OBJEXT)
-tutorial_timer3_timer_OBJECTS = $(am_tutorial_timer3_timer_OBJECTS)
-tutorial_timer3_timer_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_timer3_timer_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_timer4_timer_OBJECTS = tutorial/timer4/timer.$(OBJEXT)
-tutorial_timer4_timer_OBJECTS = $(am_tutorial_timer4_timer_OBJECTS)
-tutorial_timer4_timer_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_timer4_timer_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_tutorial_timer5_timer_OBJECTS = tutorial/timer5/timer.$(OBJEXT)
-tutorial_timer5_timer_OBJECTS = $(am_tutorial_timer5_timer_OBJECTS)
-tutorial_timer5_timer_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@tutorial_timer5_timer_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am__windows_transmit_file_SOURCES_DIST = windows/transmit_file.cpp
-@WINDOWS_TARGET_TRUE@am_windows_transmit_file_OBJECTS = \
-@WINDOWS_TARGET_TRUE@ windows/transmit_file.$(OBJEXT)
-windows_transmit_file_OBJECTS = $(am_windows_transmit_file_OBJECTS)
-windows_transmit_file_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@windows_transmit_file_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-am__v_GEN_1 =
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 =
-DEFAULT_INCLUDES = -I.@am__isrc@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
- ../../$(DEPDIR)/asio_ssl.Po allocation/$(DEPDIR)/server.Po \
- buffers/$(DEPDIR)/reference_counted.Po \
- chat/$(DEPDIR)/chat_client.Po chat/$(DEPDIR)/chat_server.Po \
- chat/$(DEPDIR)/posix_chat_client.Po \
- echo/$(DEPDIR)/async_tcp_echo_server.Po \
- echo/$(DEPDIR)/async_udp_echo_server.Po \
- echo/$(DEPDIR)/blocking_tcp_echo_client.Po \
- echo/$(DEPDIR)/blocking_tcp_echo_server.Po \
- echo/$(DEPDIR)/blocking_udp_echo_client.Po \
- echo/$(DEPDIR)/blocking_udp_echo_server.Po \
- fork/$(DEPDIR)/daemon.Po \
- fork/$(DEPDIR)/process_per_connection.Po \
- http/client/$(DEPDIR)/async_client.Po \
- http/client/$(DEPDIR)/sync_client.Po \
- http/server/$(DEPDIR)/connection.Po \
- http/server/$(DEPDIR)/connection_manager.Po \
- http/server/$(DEPDIR)/main.Po \
- http/server/$(DEPDIR)/mime_types.Po \
- http/server/$(DEPDIR)/reply.Po \
- http/server/$(DEPDIR)/request_handler.Po \
- http/server/$(DEPDIR)/request_parser.Po \
- http/server/$(DEPDIR)/server.Po \
- http/server2/$(DEPDIR)/connection.Po \
- http/server2/$(DEPDIR)/io_context_pool.Po \
- http/server2/$(DEPDIR)/main.Po \
- http/server2/$(DEPDIR)/mime_types.Po \
- http/server2/$(DEPDIR)/reply.Po \
- http/server2/$(DEPDIR)/request_handler.Po \
- http/server2/$(DEPDIR)/request_parser.Po \
- http/server2/$(DEPDIR)/server.Po \
- http/server3/$(DEPDIR)/connection.Po \
- http/server3/$(DEPDIR)/main.Po \
- http/server3/$(DEPDIR)/mime_types.Po \
- http/server3/$(DEPDIR)/reply.Po \
- http/server3/$(DEPDIR)/request_handler.Po \
- http/server3/$(DEPDIR)/request_parser.Po \
- http/server3/$(DEPDIR)/server.Po \
- http/server4/$(DEPDIR)/file_handler.Po \
- http/server4/$(DEPDIR)/main.Po \
- http/server4/$(DEPDIR)/mime_types.Po \
- http/server4/$(DEPDIR)/reply.Po \
- http/server4/$(DEPDIR)/request_parser.Po \
- http/server4/$(DEPDIR)/server.Po icmp/$(DEPDIR)/ping.Po \
- invocation/$(DEPDIR)/prioritised_handlers.Po \
- iostreams/$(DEPDIR)/daytime_client.Po \
- iostreams/$(DEPDIR)/daytime_server.Po \
- iostreams/$(DEPDIR)/http_client.Po \
- local/$(DEPDIR)/connect_pair.Po \
- local/$(DEPDIR)/iostream_client.Po \
- local/$(DEPDIR)/stream_client.Po \
- local/$(DEPDIR)/stream_server.Po \
- multicast/$(DEPDIR)/receiver.Po multicast/$(DEPDIR)/sender.Po \
- nonblocking/$(DEPDIR)/third_party_lib.Po \
- porthopper/$(DEPDIR)/client.Po porthopper/$(DEPDIR)/server.Po \
- services/$(DEPDIR)/daytime_client.Po \
- services/$(DEPDIR)/logger_service.Po \
- socks4/$(DEPDIR)/sync_client.Po spawn/$(DEPDIR)/echo_server.Po \
- spawn/$(DEPDIR)/parallel_grep.Po ssl/$(DEPDIR)/client.Po \
- ssl/$(DEPDIR)/server.Po timeouts/$(DEPDIR)/async_tcp_client.Po \
- timeouts/$(DEPDIR)/blocking_tcp_client.Po \
- timeouts/$(DEPDIR)/blocking_token_tcp_client.Po \
- timeouts/$(DEPDIR)/blocking_udp_client.Po \
- timeouts/$(DEPDIR)/server.Po timers/$(DEPDIR)/time_t_timer.Po \
- tutorial/daytime1/$(DEPDIR)/client.Po \
- tutorial/daytime2/$(DEPDIR)/server.Po \
- tutorial/daytime3/$(DEPDIR)/server.Po \
- tutorial/daytime4/$(DEPDIR)/client.Po \
- tutorial/daytime5/$(DEPDIR)/server.Po \
- tutorial/daytime6/$(DEPDIR)/server.Po \
- tutorial/daytime7/$(DEPDIR)/server.Po \
- tutorial/timer1/$(DEPDIR)/timer.Po \
- tutorial/timer2/$(DEPDIR)/timer.Po \
- tutorial/timer3/$(DEPDIR)/timer.Po \
- tutorial/timer4/$(DEPDIR)/timer.Po \
- tutorial/timer5/$(DEPDIR)/timer.Po \
- windows/$(DEPDIR)/transmit_file.Po
-am__mv = mv -f
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-AM_V_CXX = $(am__v_CXX_@AM_V@)
-am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
-am__v_CXX_0 = @echo " CXX " $@;
-am__v_CXX_1 =
-CXXLD = $(CXX)
-CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
-am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
-am__v_CXXLD_0 = @echo " CXXLD " $@;
-am__v_CXXLD_1 =
-SOURCES = $(libasio_a_SOURCES) $(allocation_server_SOURCES) \
- $(buffers_reference_counted_SOURCES) \
- $(chat_chat_client_SOURCES) $(chat_chat_server_SOURCES) \
- $(chat_posix_chat_client_SOURCES) \
- $(echo_async_tcp_echo_server_SOURCES) \
- $(echo_async_udp_echo_server_SOURCES) \
- $(echo_blocking_tcp_echo_client_SOURCES) \
- $(echo_blocking_tcp_echo_server_SOURCES) \
- $(echo_blocking_udp_echo_client_SOURCES) \
- $(echo_blocking_udp_echo_server_SOURCES) \
- $(fork_daemon_SOURCES) $(fork_process_per_connection_SOURCES) \
- $(http_client_async_client_SOURCES) \
- $(http_client_sync_client_SOURCES) \
- $(http_server_http_server_SOURCES) \
- $(http_server2_http_server_SOURCES) \
- $(http_server3_http_server_SOURCES) \
- $(http_server4_http_server_SOURCES) $(icmp_ping_SOURCES) \
- $(invocation_prioritised_handlers_SOURCES) \
- $(iostreams_daytime_client_SOURCES) \
- $(iostreams_daytime_server_SOURCES) \
- $(iostreams_http_client_SOURCES) $(local_connect_pair_SOURCES) \
- $(local_iostream_client_SOURCES) \
- $(local_stream_client_SOURCES) $(local_stream_server_SOURCES) \
- $(multicast_receiver_SOURCES) $(multicast_sender_SOURCES) \
- $(nonblocking_third_party_lib_SOURCES) \
- $(porthopper_client_SOURCES) $(porthopper_server_SOURCES) \
- $(services_daytime_client_SOURCES) \
- $(socks4_sync_client_SOURCES) $(spawn_echo_server_SOURCES) \
- $(spawn_parallel_grep_SOURCES) $(ssl_client_SOURCES) \
- $(ssl_server_SOURCES) $(timeouts_async_tcp_client_SOURCES) \
- $(timeouts_blocking_tcp_client_SOURCES) \
- $(timeouts_blocking_token_tcp_client_SOURCES) \
- $(timeouts_blocking_udp_client_SOURCES) \
- $(timeouts_server_SOURCES) $(timers_time_t_timer_SOURCES) \
- $(tutorial_daytime1_client_SOURCES) \
- $(tutorial_daytime2_server_SOURCES) \
- $(tutorial_daytime3_server_SOURCES) \
- $(tutorial_daytime4_client_SOURCES) \
- $(tutorial_daytime5_server_SOURCES) \
- $(tutorial_daytime6_server_SOURCES) \
- $(tutorial_daytime7_server_SOURCES) \
- $(tutorial_timer1_timer_SOURCES) \
- $(tutorial_timer2_timer_SOURCES) \
- $(tutorial_timer3_timer_SOURCES) \
- $(tutorial_timer4_timer_SOURCES) \
- $(tutorial_timer5_timer_SOURCES) \
- $(windows_transmit_file_SOURCES)
-DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
- $(allocation_server_SOURCES) \
- $(buffers_reference_counted_SOURCES) \
- $(chat_chat_client_SOURCES) $(chat_chat_server_SOURCES) \
- $(am__chat_posix_chat_client_SOURCES_DIST) \
- $(echo_async_tcp_echo_server_SOURCES) \
- $(echo_async_udp_echo_server_SOURCES) \
- $(echo_blocking_tcp_echo_client_SOURCES) \
- $(echo_blocking_tcp_echo_server_SOURCES) \
- $(echo_blocking_udp_echo_client_SOURCES) \
- $(echo_blocking_udp_echo_server_SOURCES) \
- $(am__fork_daemon_SOURCES_DIST) \
- $(am__fork_process_per_connection_SOURCES_DIST) \
- $(http_client_async_client_SOURCES) \
- $(http_client_sync_client_SOURCES) \
- $(http_server_http_server_SOURCES) \
- $(http_server2_http_server_SOURCES) \
- $(http_server3_http_server_SOURCES) \
- $(http_server4_http_server_SOURCES) $(icmp_ping_SOURCES) \
- $(invocation_prioritised_handlers_SOURCES) \
- $(iostreams_daytime_client_SOURCES) \
- $(iostreams_daytime_server_SOURCES) \
- $(iostreams_http_client_SOURCES) \
- $(am__local_connect_pair_SOURCES_DIST) \
- $(am__local_iostream_client_SOURCES_DIST) \
- $(am__local_stream_client_SOURCES_DIST) \
- $(am__local_stream_server_SOURCES_DIST) \
- $(multicast_receiver_SOURCES) $(multicast_sender_SOURCES) \
- $(nonblocking_third_party_lib_SOURCES) \
- $(porthopper_client_SOURCES) $(porthopper_server_SOURCES) \
- $(services_daytime_client_SOURCES) \
- $(socks4_sync_client_SOURCES) \
- $(am__spawn_echo_server_SOURCES_DIST) \
- $(am__spawn_parallel_grep_SOURCES_DIST) \
- $(am__ssl_client_SOURCES_DIST) $(am__ssl_server_SOURCES_DIST) \
- $(timeouts_async_tcp_client_SOURCES) \
- $(timeouts_blocking_tcp_client_SOURCES) \
- $(timeouts_blocking_token_tcp_client_SOURCES) \
- $(timeouts_blocking_udp_client_SOURCES) \
- $(timeouts_server_SOURCES) $(timers_time_t_timer_SOURCES) \
- $(tutorial_daytime1_client_SOURCES) \
- $(tutorial_daytime2_server_SOURCES) \
- $(tutorial_daytime3_server_SOURCES) \
- $(tutorial_daytime4_client_SOURCES) \
- $(tutorial_daytime5_server_SOURCES) \
- $(tutorial_daytime6_server_SOURCES) \
- $(tutorial_daytime7_server_SOURCES) \
- $(tutorial_timer1_timer_SOURCES) \
- $(tutorial_timer2_timer_SOURCES) \
- $(tutorial_timer3_timer_SOURCES) \
- $(tutorial_timer4_timer_SOURCES) \
- $(tutorial_timer5_timer_SOURCES) \
- $(am__windows_transmit_file_SOURCES_DIST)
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-HEADERS = $(noinst_HEADERS)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates. Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
- BEGIN { nonempty = 0; } \
- { items[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique. This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
- list='$(am__tagged_files)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = subdir-objects
-@SEPARATE_COMPILATION_TRUE@noinst_LIBRARIES = libasio.a
-@SEPARATE_COMPILATION_TRUE@libasio_a_SOURCES = ../../asio.cpp \
-@SEPARATE_COMPILATION_TRUE@ $(am__append_1)
-@SEPARATE_COMPILATION_TRUE@LDADD = libasio.a
-noinst_HEADERS = \
- chat/chat_message.hpp \
- services/basic_logger.hpp \
- services/logger.hpp \
- services/logger_service.hpp
-
-AM_CXXFLAGS = -I$(srcdir)/../../../include
-allocation_server_SOURCES = allocation/server.cpp
-buffers_reference_counted_SOURCES = buffers/reference_counted.cpp
-chat_chat_client_SOURCES = chat/chat_client.cpp
-chat_chat_server_SOURCES = chat/chat_server.cpp
-echo_async_tcp_echo_server_SOURCES = echo/async_tcp_echo_server.cpp
-echo_async_udp_echo_server_SOURCES = echo/async_udp_echo_server.cpp
-echo_blocking_tcp_echo_client_SOURCES = echo/blocking_tcp_echo_client.cpp
-echo_blocking_tcp_echo_server_SOURCES = echo/blocking_tcp_echo_server.cpp
-echo_blocking_udp_echo_client_SOURCES = echo/blocking_udp_echo_client.cpp
-echo_blocking_udp_echo_server_SOURCES = echo/blocking_udp_echo_server.cpp
-http_client_async_client_SOURCES = http/client/async_client.cpp
-http_client_sync_client_SOURCES = http/client/sync_client.cpp
-http_server_http_server_SOURCES = \
- http/server/connection.cpp \
- http/server/connection_manager.cpp \
- http/server/main.cpp \
- http/server/mime_types.cpp \
- http/server/reply.cpp \
- http/server/request_handler.cpp \
- http/server/request_parser.cpp \
- http/server/server.cpp
-
-http_server2_http_server_SOURCES = \
- http/server2/connection.cpp \
- http/server2/io_context_pool.cpp \
- http/server2/main.cpp \
- http/server2/mime_types.cpp \
- http/server2/reply.cpp \
- http/server2/request_handler.cpp \
- http/server2/request_parser.cpp \
- http/server2/server.cpp
-
-http_server3_http_server_SOURCES = \
- http/server3/connection.cpp \
- http/server3/main.cpp \
- http/server3/mime_types.cpp \
- http/server3/reply.cpp \
- http/server3/request_handler.cpp \
- http/server3/request_parser.cpp \
- http/server3/server.cpp
-
-http_server4_http_server_SOURCES = \
- http/server4/file_handler.cpp \
- http/server4/main.cpp \
- http/server4/mime_types.cpp \
- http/server4/reply.cpp \
- http/server4/request_parser.cpp \
- http/server4/server.cpp
-
-icmp_ping_SOURCES = icmp/ping.cpp
-invocation_prioritised_handlers_SOURCES = invocation/prioritised_handlers.cpp
-iostreams_daytime_client_SOURCES = iostreams/daytime_client.cpp
-iostreams_daytime_server_SOURCES = iostreams/daytime_server.cpp
-iostreams_http_client_SOURCES = iostreams/http_client.cpp
-multicast_receiver_SOURCES = multicast/receiver.cpp
-multicast_sender_SOURCES = multicast/sender.cpp
-nonblocking_third_party_lib_SOURCES = nonblocking/third_party_lib.cpp
-porthopper_client_SOURCES = porthopper/client.cpp
-porthopper_server_SOURCES = porthopper/server.cpp
-services_daytime_client_SOURCES = \
- services/daytime_client.cpp \
- services/logger_service.cpp
-
-socks4_sync_client_SOURCES = socks4/sync_client.cpp
-timeouts_async_tcp_client_SOURCES = timeouts/async_tcp_client.cpp
-timeouts_blocking_tcp_client_SOURCES = timeouts/blocking_tcp_client.cpp
-timeouts_blocking_token_tcp_client_SOURCES = timeouts/blocking_token_tcp_client.cpp
-timeouts_blocking_udp_client_SOURCES = timeouts/blocking_udp_client.cpp
-timeouts_server_SOURCES = timeouts/server.cpp
-timers_time_t_timer_SOURCES = timers/time_t_timer.cpp
-tutorial_timer1_timer_SOURCES = tutorial/timer1/timer.cpp
-tutorial_timer2_timer_SOURCES = tutorial/timer2/timer.cpp
-tutorial_timer3_timer_SOURCES = tutorial/timer3/timer.cpp
-tutorial_timer4_timer_SOURCES = tutorial/timer4/timer.cpp
-tutorial_timer5_timer_SOURCES = tutorial/timer5/timer.cpp
-tutorial_daytime1_client_SOURCES = tutorial/daytime1/client.cpp
-tutorial_daytime2_server_SOURCES = tutorial/daytime2/server.cpp
-tutorial_daytime3_server_SOURCES = tutorial/daytime3/server.cpp
-tutorial_daytime4_client_SOURCES = tutorial/daytime4/client.cpp
-tutorial_daytime5_server_SOURCES = tutorial/daytime5/server.cpp
-tutorial_daytime6_server_SOURCES = tutorial/daytime6/server.cpp
-tutorial_daytime7_server_SOURCES = tutorial/daytime7/server.cpp
-@WINDOWS_TARGET_FALSE@chat_posix_chat_client_SOURCES = chat/posix_chat_client.cpp
-@WINDOWS_TARGET_FALSE@fork_daemon_SOURCES = fork/daemon.cpp
-@WINDOWS_TARGET_FALSE@fork_process_per_connection_SOURCES = fork/process_per_connection.cpp
-@WINDOWS_TARGET_FALSE@local_connect_pair_SOURCES = local/connect_pair.cpp
-@WINDOWS_TARGET_FALSE@local_iostream_client_SOURCES = local/iostream_client.cpp
-@WINDOWS_TARGET_FALSE@local_stream_server_SOURCES = local/stream_server.cpp
-@WINDOWS_TARGET_FALSE@local_stream_client_SOURCES = local/stream_client.cpp
-@WINDOWS_TARGET_TRUE@windows_transmit_file_SOURCES = windows/transmit_file.cpp
-@HAVE_OPENSSL_TRUE@ssl_client_SOURCES = ssl/client.cpp
-@HAVE_OPENSSL_TRUE@ssl_server_SOURCES = ssl/server.cpp
-@HAVE_BOOST_COROUTINE_TRUE@spawn_echo_server_SOURCES = spawn/echo_server.cpp
-@HAVE_BOOST_COROUTINE_TRUE@spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
-@HAVE_BOOST_COROUTINE_TRUE@spawn_parallel_grep_SOURCES = spawn/parallel_grep.cpp
-@HAVE_BOOST_COROUTINE_TRUE@spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
-EXTRA_DIST = \
- http/server/connection.hpp \
- http/server/connection_manager.hpp \
- http/server/header.hpp \
- http/server/mime_types.hpp \
- http/server/reply.hpp \
- http/server/request.hpp \
- http/server/request_handler.hpp \
- http/server/request_parser.hpp \
- http/server/server.hpp \
- http/server2/connection.hpp \
- http/server2/io_context_pool.hpp \
- http/server2/header.hpp \
- http/server2/mime_types.hpp \
- http/server2/reply.hpp \
- http/server2/request.hpp \
- http/server2/request_handler.hpp \
- http/server2/request_parser.hpp \
- http/server2/server.hpp \
- http/server3/connection.hpp \
- http/server3/header.hpp \
- http/server3/mime_types.hpp \
- http/server3/reply.hpp \
- http/server3/request.hpp \
- http/server3/request_handler.hpp \
- http/server3/request_parser.hpp \
- http/server3/server.hpp \
- http/server4/file_handler.hpp \
- http/server4/header.hpp \
- http/server4/mime_types.hpp \
- http/server4/reply.hpp \
- http/server4/request.hpp \
- http/server4/request_parser.hpp \
- http/server4/server.hpp \
- icmp/icmp_header.hpp \
- icmp/ipv4_header.hpp \
- porthopper/protocol.hpp \
- serialization/client.cpp \
- serialization/server.cpp \
- serialization/connection.hpp \
- serialization/stock.hpp \
- services/basic_logger.hpp \
- services/logger.hpp \
- services/logger_service.hpp \
- socks4/socks4.hpp \
- ssl/README \
- ssl/ca.pem \
- ssl/server.pem \
- ssl/dh2048.pem
-
-MAINTAINERCLEANFILES = \
- $(srcdir)/Makefile.in
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .cpp .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/examples/cpp03/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/examples/cpp03/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-../../$(am__dirstamp):
- @$(MKDIR_P) ../..
- @: > ../../$(am__dirstamp)
-../../$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) ../../$(DEPDIR)
- @: > ../../$(DEPDIR)/$(am__dirstamp)
-../../asio.$(OBJEXT): ../../$(am__dirstamp) \
- ../../$(DEPDIR)/$(am__dirstamp)
-../../asio_ssl.$(OBJEXT): ../../$(am__dirstamp) \
- ../../$(DEPDIR)/$(am__dirstamp)
-
-libasio.a: $(libasio_a_OBJECTS) $(libasio_a_DEPENDENCIES) $(EXTRA_libasio_a_DEPENDENCIES)
- $(AM_V_at)-rm -f libasio.a
- $(AM_V_AR)$(libasio_a_AR) libasio.a $(libasio_a_OBJECTS) $(libasio_a_LIBADD)
- $(AM_V_at)$(RANLIB) libasio.a
-allocation/$(am__dirstamp):
- @$(MKDIR_P) allocation
- @: > allocation/$(am__dirstamp)
-allocation/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) allocation/$(DEPDIR)
- @: > allocation/$(DEPDIR)/$(am__dirstamp)
-allocation/server.$(OBJEXT): allocation/$(am__dirstamp) \
- allocation/$(DEPDIR)/$(am__dirstamp)
-
-allocation/server$(EXEEXT): $(allocation_server_OBJECTS) $(allocation_server_DEPENDENCIES) $(EXTRA_allocation_server_DEPENDENCIES) allocation/$(am__dirstamp)
- @rm -f allocation/server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(allocation_server_OBJECTS) $(allocation_server_LDADD) $(LIBS)
-buffers/$(am__dirstamp):
- @$(MKDIR_P) buffers
- @: > buffers/$(am__dirstamp)
-buffers/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) buffers/$(DEPDIR)
- @: > buffers/$(DEPDIR)/$(am__dirstamp)
-buffers/reference_counted.$(OBJEXT): buffers/$(am__dirstamp) \
- buffers/$(DEPDIR)/$(am__dirstamp)
-
-buffers/reference_counted$(EXEEXT): $(buffers_reference_counted_OBJECTS) $(buffers_reference_counted_DEPENDENCIES) $(EXTRA_buffers_reference_counted_DEPENDENCIES) buffers/$(am__dirstamp)
- @rm -f buffers/reference_counted$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(buffers_reference_counted_OBJECTS) $(buffers_reference_counted_LDADD) $(LIBS)
-chat/$(am__dirstamp):
- @$(MKDIR_P) chat
- @: > chat/$(am__dirstamp)
-chat/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) chat/$(DEPDIR)
- @: > chat/$(DEPDIR)/$(am__dirstamp)
-chat/chat_client.$(OBJEXT): chat/$(am__dirstamp) \
- chat/$(DEPDIR)/$(am__dirstamp)
-
-chat/chat_client$(EXEEXT): $(chat_chat_client_OBJECTS) $(chat_chat_client_DEPENDENCIES) $(EXTRA_chat_chat_client_DEPENDENCIES) chat/$(am__dirstamp)
- @rm -f chat/chat_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(chat_chat_client_OBJECTS) $(chat_chat_client_LDADD) $(LIBS)
-chat/chat_server.$(OBJEXT): chat/$(am__dirstamp) \
- chat/$(DEPDIR)/$(am__dirstamp)
-
-chat/chat_server$(EXEEXT): $(chat_chat_server_OBJECTS) $(chat_chat_server_DEPENDENCIES) $(EXTRA_chat_chat_server_DEPENDENCIES) chat/$(am__dirstamp)
- @rm -f chat/chat_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(chat_chat_server_OBJECTS) $(chat_chat_server_LDADD) $(LIBS)
-chat/posix_chat_client.$(OBJEXT): chat/$(am__dirstamp) \
- chat/$(DEPDIR)/$(am__dirstamp)
-
-chat/posix_chat_client$(EXEEXT): $(chat_posix_chat_client_OBJECTS) $(chat_posix_chat_client_DEPENDENCIES) $(EXTRA_chat_posix_chat_client_DEPENDENCIES) chat/$(am__dirstamp)
- @rm -f chat/posix_chat_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(chat_posix_chat_client_OBJECTS) $(chat_posix_chat_client_LDADD) $(LIBS)
-echo/$(am__dirstamp):
- @$(MKDIR_P) echo
- @: > echo/$(am__dirstamp)
-echo/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) echo/$(DEPDIR)
- @: > echo/$(DEPDIR)/$(am__dirstamp)
-echo/async_tcp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
- echo/$(DEPDIR)/$(am__dirstamp)
-
-echo/async_tcp_echo_server$(EXEEXT): $(echo_async_tcp_echo_server_OBJECTS) $(echo_async_tcp_echo_server_DEPENDENCIES) $(EXTRA_echo_async_tcp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
- @rm -f echo/async_tcp_echo_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(echo_async_tcp_echo_server_OBJECTS) $(echo_async_tcp_echo_server_LDADD) $(LIBS)
-echo/async_udp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
- echo/$(DEPDIR)/$(am__dirstamp)
-
-echo/async_udp_echo_server$(EXEEXT): $(echo_async_udp_echo_server_OBJECTS) $(echo_async_udp_echo_server_DEPENDENCIES) $(EXTRA_echo_async_udp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
- @rm -f echo/async_udp_echo_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(echo_async_udp_echo_server_OBJECTS) $(echo_async_udp_echo_server_LDADD) $(LIBS)
-echo/blocking_tcp_echo_client.$(OBJEXT): echo/$(am__dirstamp) \
- echo/$(DEPDIR)/$(am__dirstamp)
-
-echo/blocking_tcp_echo_client$(EXEEXT): $(echo_blocking_tcp_echo_client_OBJECTS) $(echo_blocking_tcp_echo_client_DEPENDENCIES) $(EXTRA_echo_blocking_tcp_echo_client_DEPENDENCIES) echo/$(am__dirstamp)
- @rm -f echo/blocking_tcp_echo_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_tcp_echo_client_OBJECTS) $(echo_blocking_tcp_echo_client_LDADD) $(LIBS)
-echo/blocking_tcp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
- echo/$(DEPDIR)/$(am__dirstamp)
-
-echo/blocking_tcp_echo_server$(EXEEXT): $(echo_blocking_tcp_echo_server_OBJECTS) $(echo_blocking_tcp_echo_server_DEPENDENCIES) $(EXTRA_echo_blocking_tcp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
- @rm -f echo/blocking_tcp_echo_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_tcp_echo_server_OBJECTS) $(echo_blocking_tcp_echo_server_LDADD) $(LIBS)
-echo/blocking_udp_echo_client.$(OBJEXT): echo/$(am__dirstamp) \
- echo/$(DEPDIR)/$(am__dirstamp)
-
-echo/blocking_udp_echo_client$(EXEEXT): $(echo_blocking_udp_echo_client_OBJECTS) $(echo_blocking_udp_echo_client_DEPENDENCIES) $(EXTRA_echo_blocking_udp_echo_client_DEPENDENCIES) echo/$(am__dirstamp)
- @rm -f echo/blocking_udp_echo_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_udp_echo_client_OBJECTS) $(echo_blocking_udp_echo_client_LDADD) $(LIBS)
-echo/blocking_udp_echo_server.$(OBJEXT): echo/$(am__dirstamp) \
- echo/$(DEPDIR)/$(am__dirstamp)
-
-echo/blocking_udp_echo_server$(EXEEXT): $(echo_blocking_udp_echo_server_OBJECTS) $(echo_blocking_udp_echo_server_DEPENDENCIES) $(EXTRA_echo_blocking_udp_echo_server_DEPENDENCIES) echo/$(am__dirstamp)
- @rm -f echo/blocking_udp_echo_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(echo_blocking_udp_echo_server_OBJECTS) $(echo_blocking_udp_echo_server_LDADD) $(LIBS)
-fork/$(am__dirstamp):
- @$(MKDIR_P) fork
- @: > fork/$(am__dirstamp)
-fork/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) fork/$(DEPDIR)
- @: > fork/$(DEPDIR)/$(am__dirstamp)
-fork/daemon.$(OBJEXT): fork/$(am__dirstamp) \
- fork/$(DEPDIR)/$(am__dirstamp)
-
-fork/daemon$(EXEEXT): $(fork_daemon_OBJECTS) $(fork_daemon_DEPENDENCIES) $(EXTRA_fork_daemon_DEPENDENCIES) fork/$(am__dirstamp)
- @rm -f fork/daemon$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(fork_daemon_OBJECTS) $(fork_daemon_LDADD) $(LIBS)
-fork/process_per_connection.$(OBJEXT): fork/$(am__dirstamp) \
- fork/$(DEPDIR)/$(am__dirstamp)
-
-fork/process_per_connection$(EXEEXT): $(fork_process_per_connection_OBJECTS) $(fork_process_per_connection_DEPENDENCIES) $(EXTRA_fork_process_per_connection_DEPENDENCIES) fork/$(am__dirstamp)
- @rm -f fork/process_per_connection$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(fork_process_per_connection_OBJECTS) $(fork_process_per_connection_LDADD) $(LIBS)
-http/client/$(am__dirstamp):
- @$(MKDIR_P) http/client
- @: > http/client/$(am__dirstamp)
-http/client/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) http/client/$(DEPDIR)
- @: > http/client/$(DEPDIR)/$(am__dirstamp)
-http/client/async_client.$(OBJEXT): http/client/$(am__dirstamp) \
- http/client/$(DEPDIR)/$(am__dirstamp)
-
-http/client/async_client$(EXEEXT): $(http_client_async_client_OBJECTS) $(http_client_async_client_DEPENDENCIES) $(EXTRA_http_client_async_client_DEPENDENCIES) http/client/$(am__dirstamp)
- @rm -f http/client/async_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(http_client_async_client_OBJECTS) $(http_client_async_client_LDADD) $(LIBS)
-http/client/sync_client.$(OBJEXT): http/client/$(am__dirstamp) \
- http/client/$(DEPDIR)/$(am__dirstamp)
-
-http/client/sync_client$(EXEEXT): $(http_client_sync_client_OBJECTS) $(http_client_sync_client_DEPENDENCIES) $(EXTRA_http_client_sync_client_DEPENDENCIES) http/client/$(am__dirstamp)
- @rm -f http/client/sync_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(http_client_sync_client_OBJECTS) $(http_client_sync_client_LDADD) $(LIBS)
-http/server/$(am__dirstamp):
- @$(MKDIR_P) http/server
- @: > http/server/$(am__dirstamp)
-http/server/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) http/server/$(DEPDIR)
- @: > http/server/$(DEPDIR)/$(am__dirstamp)
-http/server/connection.$(OBJEXT): http/server/$(am__dirstamp) \
- http/server/$(DEPDIR)/$(am__dirstamp)
-http/server/connection_manager.$(OBJEXT): http/server/$(am__dirstamp) \
- http/server/$(DEPDIR)/$(am__dirstamp)
-http/server/main.$(OBJEXT): http/server/$(am__dirstamp) \
- http/server/$(DEPDIR)/$(am__dirstamp)
-http/server/mime_types.$(OBJEXT): http/server/$(am__dirstamp) \
- http/server/$(DEPDIR)/$(am__dirstamp)
-http/server/reply.$(OBJEXT): http/server/$(am__dirstamp) \
- http/server/$(DEPDIR)/$(am__dirstamp)
-http/server/request_handler.$(OBJEXT): http/server/$(am__dirstamp) \
- http/server/$(DEPDIR)/$(am__dirstamp)
-http/server/request_parser.$(OBJEXT): http/server/$(am__dirstamp) \
- http/server/$(DEPDIR)/$(am__dirstamp)
-http/server/server.$(OBJEXT): http/server/$(am__dirstamp) \
- http/server/$(DEPDIR)/$(am__dirstamp)
-
-http/server/http_server$(EXEEXT): $(http_server_http_server_OBJECTS) $(http_server_http_server_DEPENDENCIES) $(EXTRA_http_server_http_server_DEPENDENCIES) http/server/$(am__dirstamp)
- @rm -f http/server/http_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(http_server_http_server_OBJECTS) $(http_server_http_server_LDADD) $(LIBS)
-http/server2/$(am__dirstamp):
- @$(MKDIR_P) http/server2
- @: > http/server2/$(am__dirstamp)
-http/server2/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) http/server2/$(DEPDIR)
- @: > http/server2/$(DEPDIR)/$(am__dirstamp)
-http/server2/connection.$(OBJEXT): http/server2/$(am__dirstamp) \
- http/server2/$(DEPDIR)/$(am__dirstamp)
-http/server2/io_context_pool.$(OBJEXT): http/server2/$(am__dirstamp) \
- http/server2/$(DEPDIR)/$(am__dirstamp)
-http/server2/main.$(OBJEXT): http/server2/$(am__dirstamp) \
- http/server2/$(DEPDIR)/$(am__dirstamp)
-http/server2/mime_types.$(OBJEXT): http/server2/$(am__dirstamp) \
- http/server2/$(DEPDIR)/$(am__dirstamp)
-http/server2/reply.$(OBJEXT): http/server2/$(am__dirstamp) \
- http/server2/$(DEPDIR)/$(am__dirstamp)
-http/server2/request_handler.$(OBJEXT): http/server2/$(am__dirstamp) \
- http/server2/$(DEPDIR)/$(am__dirstamp)
-http/server2/request_parser.$(OBJEXT): http/server2/$(am__dirstamp) \
- http/server2/$(DEPDIR)/$(am__dirstamp)
-http/server2/server.$(OBJEXT): http/server2/$(am__dirstamp) \
- http/server2/$(DEPDIR)/$(am__dirstamp)
-
-http/server2/http_server$(EXEEXT): $(http_server2_http_server_OBJECTS) $(http_server2_http_server_DEPENDENCIES) $(EXTRA_http_server2_http_server_DEPENDENCIES) http/server2/$(am__dirstamp)
- @rm -f http/server2/http_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(http_server2_http_server_OBJECTS) $(http_server2_http_server_LDADD) $(LIBS)
-http/server3/$(am__dirstamp):
- @$(MKDIR_P) http/server3
- @: > http/server3/$(am__dirstamp)
-http/server3/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) http/server3/$(DEPDIR)
- @: > http/server3/$(DEPDIR)/$(am__dirstamp)
-http/server3/connection.$(OBJEXT): http/server3/$(am__dirstamp) \
- http/server3/$(DEPDIR)/$(am__dirstamp)
-http/server3/main.$(OBJEXT): http/server3/$(am__dirstamp) \
- http/server3/$(DEPDIR)/$(am__dirstamp)
-http/server3/mime_types.$(OBJEXT): http/server3/$(am__dirstamp) \
- http/server3/$(DEPDIR)/$(am__dirstamp)
-http/server3/reply.$(OBJEXT): http/server3/$(am__dirstamp) \
- http/server3/$(DEPDIR)/$(am__dirstamp)
-http/server3/request_handler.$(OBJEXT): http/server3/$(am__dirstamp) \
- http/server3/$(DEPDIR)/$(am__dirstamp)
-http/server3/request_parser.$(OBJEXT): http/server3/$(am__dirstamp) \
- http/server3/$(DEPDIR)/$(am__dirstamp)
-http/server3/server.$(OBJEXT): http/server3/$(am__dirstamp) \
- http/server3/$(DEPDIR)/$(am__dirstamp)
-
-http/server3/http_server$(EXEEXT): $(http_server3_http_server_OBJECTS) $(http_server3_http_server_DEPENDENCIES) $(EXTRA_http_server3_http_server_DEPENDENCIES) http/server3/$(am__dirstamp)
- @rm -f http/server3/http_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(http_server3_http_server_OBJECTS) $(http_server3_http_server_LDADD) $(LIBS)
-http/server4/$(am__dirstamp):
- @$(MKDIR_P) http/server4
- @: > http/server4/$(am__dirstamp)
-http/server4/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) http/server4/$(DEPDIR)
- @: > http/server4/$(DEPDIR)/$(am__dirstamp)
-http/server4/file_handler.$(OBJEXT): http/server4/$(am__dirstamp) \
- http/server4/$(DEPDIR)/$(am__dirstamp)
-http/server4/main.$(OBJEXT): http/server4/$(am__dirstamp) \
- http/server4/$(DEPDIR)/$(am__dirstamp)
-http/server4/mime_types.$(OBJEXT): http/server4/$(am__dirstamp) \
- http/server4/$(DEPDIR)/$(am__dirstamp)
-http/server4/reply.$(OBJEXT): http/server4/$(am__dirstamp) \
- http/server4/$(DEPDIR)/$(am__dirstamp)
-http/server4/request_parser.$(OBJEXT): http/server4/$(am__dirstamp) \
- http/server4/$(DEPDIR)/$(am__dirstamp)
-http/server4/server.$(OBJEXT): http/server4/$(am__dirstamp) \
- http/server4/$(DEPDIR)/$(am__dirstamp)
-
-http/server4/http_server$(EXEEXT): $(http_server4_http_server_OBJECTS) $(http_server4_http_server_DEPENDENCIES) $(EXTRA_http_server4_http_server_DEPENDENCIES) http/server4/$(am__dirstamp)
- @rm -f http/server4/http_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(http_server4_http_server_OBJECTS) $(http_server4_http_server_LDADD) $(LIBS)
-icmp/$(am__dirstamp):
- @$(MKDIR_P) icmp
- @: > icmp/$(am__dirstamp)
-icmp/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) icmp/$(DEPDIR)
- @: > icmp/$(DEPDIR)/$(am__dirstamp)
-icmp/ping.$(OBJEXT): icmp/$(am__dirstamp) \
- icmp/$(DEPDIR)/$(am__dirstamp)
-
-icmp/ping$(EXEEXT): $(icmp_ping_OBJECTS) $(icmp_ping_DEPENDENCIES) $(EXTRA_icmp_ping_DEPENDENCIES) icmp/$(am__dirstamp)
- @rm -f icmp/ping$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(icmp_ping_OBJECTS) $(icmp_ping_LDADD) $(LIBS)
-invocation/$(am__dirstamp):
- @$(MKDIR_P) invocation
- @: > invocation/$(am__dirstamp)
-invocation/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) invocation/$(DEPDIR)
- @: > invocation/$(DEPDIR)/$(am__dirstamp)
-invocation/prioritised_handlers.$(OBJEXT): invocation/$(am__dirstamp) \
- invocation/$(DEPDIR)/$(am__dirstamp)
-
-invocation/prioritised_handlers$(EXEEXT): $(invocation_prioritised_handlers_OBJECTS) $(invocation_prioritised_handlers_DEPENDENCIES) $(EXTRA_invocation_prioritised_handlers_DEPENDENCIES) invocation/$(am__dirstamp)
- @rm -f invocation/prioritised_handlers$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(invocation_prioritised_handlers_OBJECTS) $(invocation_prioritised_handlers_LDADD) $(LIBS)
-iostreams/$(am__dirstamp):
- @$(MKDIR_P) iostreams
- @: > iostreams/$(am__dirstamp)
-iostreams/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) iostreams/$(DEPDIR)
- @: > iostreams/$(DEPDIR)/$(am__dirstamp)
-iostreams/daytime_client.$(OBJEXT): iostreams/$(am__dirstamp) \
- iostreams/$(DEPDIR)/$(am__dirstamp)
-
-iostreams/daytime_client$(EXEEXT): $(iostreams_daytime_client_OBJECTS) $(iostreams_daytime_client_DEPENDENCIES) $(EXTRA_iostreams_daytime_client_DEPENDENCIES) iostreams/$(am__dirstamp)
- @rm -f iostreams/daytime_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(iostreams_daytime_client_OBJECTS) $(iostreams_daytime_client_LDADD) $(LIBS)
-iostreams/daytime_server.$(OBJEXT): iostreams/$(am__dirstamp) \
- iostreams/$(DEPDIR)/$(am__dirstamp)
-
-iostreams/daytime_server$(EXEEXT): $(iostreams_daytime_server_OBJECTS) $(iostreams_daytime_server_DEPENDENCIES) $(EXTRA_iostreams_daytime_server_DEPENDENCIES) iostreams/$(am__dirstamp)
- @rm -f iostreams/daytime_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(iostreams_daytime_server_OBJECTS) $(iostreams_daytime_server_LDADD) $(LIBS)
-iostreams/http_client.$(OBJEXT): iostreams/$(am__dirstamp) \
- iostreams/$(DEPDIR)/$(am__dirstamp)
-
-iostreams/http_client$(EXEEXT): $(iostreams_http_client_OBJECTS) $(iostreams_http_client_DEPENDENCIES) $(EXTRA_iostreams_http_client_DEPENDENCIES) iostreams/$(am__dirstamp)
- @rm -f iostreams/http_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(iostreams_http_client_OBJECTS) $(iostreams_http_client_LDADD) $(LIBS)
-local/$(am__dirstamp):
- @$(MKDIR_P) local
- @: > local/$(am__dirstamp)
-local/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) local/$(DEPDIR)
- @: > local/$(DEPDIR)/$(am__dirstamp)
-local/connect_pair.$(OBJEXT): local/$(am__dirstamp) \
- local/$(DEPDIR)/$(am__dirstamp)
-
-local/connect_pair$(EXEEXT): $(local_connect_pair_OBJECTS) $(local_connect_pair_DEPENDENCIES) $(EXTRA_local_connect_pair_DEPENDENCIES) local/$(am__dirstamp)
- @rm -f local/connect_pair$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(local_connect_pair_OBJECTS) $(local_connect_pair_LDADD) $(LIBS)
-local/iostream_client.$(OBJEXT): local/$(am__dirstamp) \
- local/$(DEPDIR)/$(am__dirstamp)
-
-local/iostream_client$(EXEEXT): $(local_iostream_client_OBJECTS) $(local_iostream_client_DEPENDENCIES) $(EXTRA_local_iostream_client_DEPENDENCIES) local/$(am__dirstamp)
- @rm -f local/iostream_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(local_iostream_client_OBJECTS) $(local_iostream_client_LDADD) $(LIBS)
-local/stream_client.$(OBJEXT): local/$(am__dirstamp) \
- local/$(DEPDIR)/$(am__dirstamp)
-
-local/stream_client$(EXEEXT): $(local_stream_client_OBJECTS) $(local_stream_client_DEPENDENCIES) $(EXTRA_local_stream_client_DEPENDENCIES) local/$(am__dirstamp)
- @rm -f local/stream_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(local_stream_client_OBJECTS) $(local_stream_client_LDADD) $(LIBS)
-local/stream_server.$(OBJEXT): local/$(am__dirstamp) \
- local/$(DEPDIR)/$(am__dirstamp)
-
-local/stream_server$(EXEEXT): $(local_stream_server_OBJECTS) $(local_stream_server_DEPENDENCIES) $(EXTRA_local_stream_server_DEPENDENCIES) local/$(am__dirstamp)
- @rm -f local/stream_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(local_stream_server_OBJECTS) $(local_stream_server_LDADD) $(LIBS)
-multicast/$(am__dirstamp):
- @$(MKDIR_P) multicast
- @: > multicast/$(am__dirstamp)
-multicast/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) multicast/$(DEPDIR)
- @: > multicast/$(DEPDIR)/$(am__dirstamp)
-multicast/receiver.$(OBJEXT): multicast/$(am__dirstamp) \
- multicast/$(DEPDIR)/$(am__dirstamp)
-
-multicast/receiver$(EXEEXT): $(multicast_receiver_OBJECTS) $(multicast_receiver_DEPENDENCIES) $(EXTRA_multicast_receiver_DEPENDENCIES) multicast/$(am__dirstamp)
- @rm -f multicast/receiver$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(multicast_receiver_OBJECTS) $(multicast_receiver_LDADD) $(LIBS)
-multicast/sender.$(OBJEXT): multicast/$(am__dirstamp) \
- multicast/$(DEPDIR)/$(am__dirstamp)
-
-multicast/sender$(EXEEXT): $(multicast_sender_OBJECTS) $(multicast_sender_DEPENDENCIES) $(EXTRA_multicast_sender_DEPENDENCIES) multicast/$(am__dirstamp)
- @rm -f multicast/sender$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(multicast_sender_OBJECTS) $(multicast_sender_LDADD) $(LIBS)
-nonblocking/$(am__dirstamp):
- @$(MKDIR_P) nonblocking
- @: > nonblocking/$(am__dirstamp)
-nonblocking/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) nonblocking/$(DEPDIR)
- @: > nonblocking/$(DEPDIR)/$(am__dirstamp)
-nonblocking/third_party_lib.$(OBJEXT): nonblocking/$(am__dirstamp) \
- nonblocking/$(DEPDIR)/$(am__dirstamp)
-
-nonblocking/third_party_lib$(EXEEXT): $(nonblocking_third_party_lib_OBJECTS) $(nonblocking_third_party_lib_DEPENDENCIES) $(EXTRA_nonblocking_third_party_lib_DEPENDENCIES) nonblocking/$(am__dirstamp)
- @rm -f nonblocking/third_party_lib$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(nonblocking_third_party_lib_OBJECTS) $(nonblocking_third_party_lib_LDADD) $(LIBS)
-porthopper/$(am__dirstamp):
- @$(MKDIR_P) porthopper
- @: > porthopper/$(am__dirstamp)
-porthopper/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) porthopper/$(DEPDIR)
- @: > porthopper/$(DEPDIR)/$(am__dirstamp)
-porthopper/client.$(OBJEXT): porthopper/$(am__dirstamp) \
- porthopper/$(DEPDIR)/$(am__dirstamp)
-
-porthopper/client$(EXEEXT): $(porthopper_client_OBJECTS) $(porthopper_client_DEPENDENCIES) $(EXTRA_porthopper_client_DEPENDENCIES) porthopper/$(am__dirstamp)
- @rm -f porthopper/client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(porthopper_client_OBJECTS) $(porthopper_client_LDADD) $(LIBS)
-porthopper/server.$(OBJEXT): porthopper/$(am__dirstamp) \
- porthopper/$(DEPDIR)/$(am__dirstamp)
-
-porthopper/server$(EXEEXT): $(porthopper_server_OBJECTS) $(porthopper_server_DEPENDENCIES) $(EXTRA_porthopper_server_DEPENDENCIES) porthopper/$(am__dirstamp)
- @rm -f porthopper/server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(porthopper_server_OBJECTS) $(porthopper_server_LDADD) $(LIBS)
-services/$(am__dirstamp):
- @$(MKDIR_P) services
- @: > services/$(am__dirstamp)
-services/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) services/$(DEPDIR)
- @: > services/$(DEPDIR)/$(am__dirstamp)
-services/daytime_client.$(OBJEXT): services/$(am__dirstamp) \
- services/$(DEPDIR)/$(am__dirstamp)
-services/logger_service.$(OBJEXT): services/$(am__dirstamp) \
- services/$(DEPDIR)/$(am__dirstamp)
-
-services/daytime_client$(EXEEXT): $(services_daytime_client_OBJECTS) $(services_daytime_client_DEPENDENCIES) $(EXTRA_services_daytime_client_DEPENDENCIES) services/$(am__dirstamp)
- @rm -f services/daytime_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(services_daytime_client_OBJECTS) $(services_daytime_client_LDADD) $(LIBS)
-socks4/$(am__dirstamp):
- @$(MKDIR_P) socks4
- @: > socks4/$(am__dirstamp)
-socks4/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) socks4/$(DEPDIR)
- @: > socks4/$(DEPDIR)/$(am__dirstamp)
-socks4/sync_client.$(OBJEXT): socks4/$(am__dirstamp) \
- socks4/$(DEPDIR)/$(am__dirstamp)
-
-socks4/sync_client$(EXEEXT): $(socks4_sync_client_OBJECTS) $(socks4_sync_client_DEPENDENCIES) $(EXTRA_socks4_sync_client_DEPENDENCIES) socks4/$(am__dirstamp)
- @rm -f socks4/sync_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(socks4_sync_client_OBJECTS) $(socks4_sync_client_LDADD) $(LIBS)
-spawn/$(am__dirstamp):
- @$(MKDIR_P) spawn
- @: > spawn/$(am__dirstamp)
-spawn/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) spawn/$(DEPDIR)
- @: > spawn/$(DEPDIR)/$(am__dirstamp)
-spawn/echo_server.$(OBJEXT): spawn/$(am__dirstamp) \
- spawn/$(DEPDIR)/$(am__dirstamp)
-
-spawn/echo_server$(EXEEXT): $(spawn_echo_server_OBJECTS) $(spawn_echo_server_DEPENDENCIES) $(EXTRA_spawn_echo_server_DEPENDENCIES) spawn/$(am__dirstamp)
- @rm -f spawn/echo_server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(spawn_echo_server_OBJECTS) $(spawn_echo_server_LDADD) $(LIBS)
-spawn/parallel_grep.$(OBJEXT): spawn/$(am__dirstamp) \
- spawn/$(DEPDIR)/$(am__dirstamp)
-
-spawn/parallel_grep$(EXEEXT): $(spawn_parallel_grep_OBJECTS) $(spawn_parallel_grep_DEPENDENCIES) $(EXTRA_spawn_parallel_grep_DEPENDENCIES) spawn/$(am__dirstamp)
- @rm -f spawn/parallel_grep$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(spawn_parallel_grep_OBJECTS) $(spawn_parallel_grep_LDADD) $(LIBS)
-ssl/$(am__dirstamp):
- @$(MKDIR_P) ssl
- @: > ssl/$(am__dirstamp)
-ssl/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) ssl/$(DEPDIR)
- @: > ssl/$(DEPDIR)/$(am__dirstamp)
-ssl/client.$(OBJEXT): ssl/$(am__dirstamp) \
- ssl/$(DEPDIR)/$(am__dirstamp)
-
-ssl/client$(EXEEXT): $(ssl_client_OBJECTS) $(ssl_client_DEPENDENCIES) $(EXTRA_ssl_client_DEPENDENCIES) ssl/$(am__dirstamp)
- @rm -f ssl/client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(ssl_client_OBJECTS) $(ssl_client_LDADD) $(LIBS)
-ssl/server.$(OBJEXT): ssl/$(am__dirstamp) \
- ssl/$(DEPDIR)/$(am__dirstamp)
-
-ssl/server$(EXEEXT): $(ssl_server_OBJECTS) $(ssl_server_DEPENDENCIES) $(EXTRA_ssl_server_DEPENDENCIES) ssl/$(am__dirstamp)
- @rm -f ssl/server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(ssl_server_OBJECTS) $(ssl_server_LDADD) $(LIBS)
-timeouts/$(am__dirstamp):
- @$(MKDIR_P) timeouts
- @: > timeouts/$(am__dirstamp)
-timeouts/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) timeouts/$(DEPDIR)
- @: > timeouts/$(DEPDIR)/$(am__dirstamp)
-timeouts/async_tcp_client.$(OBJEXT): timeouts/$(am__dirstamp) \
- timeouts/$(DEPDIR)/$(am__dirstamp)
-
-timeouts/async_tcp_client$(EXEEXT): $(timeouts_async_tcp_client_OBJECTS) $(timeouts_async_tcp_client_DEPENDENCIES) $(EXTRA_timeouts_async_tcp_client_DEPENDENCIES) timeouts/$(am__dirstamp)
- @rm -f timeouts/async_tcp_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(timeouts_async_tcp_client_OBJECTS) $(timeouts_async_tcp_client_LDADD) $(LIBS)
-timeouts/blocking_tcp_client.$(OBJEXT): timeouts/$(am__dirstamp) \
- timeouts/$(DEPDIR)/$(am__dirstamp)
-
-timeouts/blocking_tcp_client$(EXEEXT): $(timeouts_blocking_tcp_client_OBJECTS) $(timeouts_blocking_tcp_client_DEPENDENCIES) $(EXTRA_timeouts_blocking_tcp_client_DEPENDENCIES) timeouts/$(am__dirstamp)
- @rm -f timeouts/blocking_tcp_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(timeouts_blocking_tcp_client_OBJECTS) $(timeouts_blocking_tcp_client_LDADD) $(LIBS)
-timeouts/blocking_token_tcp_client.$(OBJEXT): \
- timeouts/$(am__dirstamp) timeouts/$(DEPDIR)/$(am__dirstamp)
-
-timeouts/blocking_token_tcp_client$(EXEEXT): $(timeouts_blocking_token_tcp_client_OBJECTS) $(timeouts_blocking_token_tcp_client_DEPENDENCIES) $(EXTRA_timeouts_blocking_token_tcp_client_DEPENDENCIES) timeouts/$(am__dirstamp)
- @rm -f timeouts/blocking_token_tcp_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(timeouts_blocking_token_tcp_client_OBJECTS) $(timeouts_blocking_token_tcp_client_LDADD) $(LIBS)
-timeouts/blocking_udp_client.$(OBJEXT): timeouts/$(am__dirstamp) \
- timeouts/$(DEPDIR)/$(am__dirstamp)
-
-timeouts/blocking_udp_client$(EXEEXT): $(timeouts_blocking_udp_client_OBJECTS) $(timeouts_blocking_udp_client_DEPENDENCIES) $(EXTRA_timeouts_blocking_udp_client_DEPENDENCIES) timeouts/$(am__dirstamp)
- @rm -f timeouts/blocking_udp_client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(timeouts_blocking_udp_client_OBJECTS) $(timeouts_blocking_udp_client_LDADD) $(LIBS)
-timeouts/server.$(OBJEXT): timeouts/$(am__dirstamp) \
- timeouts/$(DEPDIR)/$(am__dirstamp)
-
-timeouts/server$(EXEEXT): $(timeouts_server_OBJECTS) $(timeouts_server_DEPENDENCIES) $(EXTRA_timeouts_server_DEPENDENCIES) timeouts/$(am__dirstamp)
- @rm -f timeouts/server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(timeouts_server_OBJECTS) $(timeouts_server_LDADD) $(LIBS)
-timers/$(am__dirstamp):
- @$(MKDIR_P) timers
- @: > timers/$(am__dirstamp)
-timers/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) timers/$(DEPDIR)
- @: > timers/$(DEPDIR)/$(am__dirstamp)
-timers/time_t_timer.$(OBJEXT): timers/$(am__dirstamp) \
- timers/$(DEPDIR)/$(am__dirstamp)
-
-timers/time_t_timer$(EXEEXT): $(timers_time_t_timer_OBJECTS) $(timers_time_t_timer_DEPENDENCIES) $(EXTRA_timers_time_t_timer_DEPENDENCIES) timers/$(am__dirstamp)
- @rm -f timers/time_t_timer$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(timers_time_t_timer_OBJECTS) $(timers_time_t_timer_LDADD) $(LIBS)
-tutorial/daytime1/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime1
- @: > tutorial/daytime1/$(am__dirstamp)
-tutorial/daytime1/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime1/$(DEPDIR)
- @: > tutorial/daytime1/$(DEPDIR)/$(am__dirstamp)
-tutorial/daytime1/client.$(OBJEXT): tutorial/daytime1/$(am__dirstamp) \
- tutorial/daytime1/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/daytime1/client$(EXEEXT): $(tutorial_daytime1_client_OBJECTS) $(tutorial_daytime1_client_DEPENDENCIES) $(EXTRA_tutorial_daytime1_client_DEPENDENCIES) tutorial/daytime1/$(am__dirstamp)
- @rm -f tutorial/daytime1/client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime1_client_OBJECTS) $(tutorial_daytime1_client_LDADD) $(LIBS)
-tutorial/daytime2/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime2
- @: > tutorial/daytime2/$(am__dirstamp)
-tutorial/daytime2/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime2/$(DEPDIR)
- @: > tutorial/daytime2/$(DEPDIR)/$(am__dirstamp)
-tutorial/daytime2/server.$(OBJEXT): tutorial/daytime2/$(am__dirstamp) \
- tutorial/daytime2/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/daytime2/server$(EXEEXT): $(tutorial_daytime2_server_OBJECTS) $(tutorial_daytime2_server_DEPENDENCIES) $(EXTRA_tutorial_daytime2_server_DEPENDENCIES) tutorial/daytime2/$(am__dirstamp)
- @rm -f tutorial/daytime2/server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime2_server_OBJECTS) $(tutorial_daytime2_server_LDADD) $(LIBS)
-tutorial/daytime3/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime3
- @: > tutorial/daytime3/$(am__dirstamp)
-tutorial/daytime3/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime3/$(DEPDIR)
- @: > tutorial/daytime3/$(DEPDIR)/$(am__dirstamp)
-tutorial/daytime3/server.$(OBJEXT): tutorial/daytime3/$(am__dirstamp) \
- tutorial/daytime3/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/daytime3/server$(EXEEXT): $(tutorial_daytime3_server_OBJECTS) $(tutorial_daytime3_server_DEPENDENCIES) $(EXTRA_tutorial_daytime3_server_DEPENDENCIES) tutorial/daytime3/$(am__dirstamp)
- @rm -f tutorial/daytime3/server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime3_server_OBJECTS) $(tutorial_daytime3_server_LDADD) $(LIBS)
-tutorial/daytime4/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime4
- @: > tutorial/daytime4/$(am__dirstamp)
-tutorial/daytime4/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime4/$(DEPDIR)
- @: > tutorial/daytime4/$(DEPDIR)/$(am__dirstamp)
-tutorial/daytime4/client.$(OBJEXT): tutorial/daytime4/$(am__dirstamp) \
- tutorial/daytime4/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/daytime4/client$(EXEEXT): $(tutorial_daytime4_client_OBJECTS) $(tutorial_daytime4_client_DEPENDENCIES) $(EXTRA_tutorial_daytime4_client_DEPENDENCIES) tutorial/daytime4/$(am__dirstamp)
- @rm -f tutorial/daytime4/client$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime4_client_OBJECTS) $(tutorial_daytime4_client_LDADD) $(LIBS)
-tutorial/daytime5/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime5
- @: > tutorial/daytime5/$(am__dirstamp)
-tutorial/daytime5/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime5/$(DEPDIR)
- @: > tutorial/daytime5/$(DEPDIR)/$(am__dirstamp)
-tutorial/daytime5/server.$(OBJEXT): tutorial/daytime5/$(am__dirstamp) \
- tutorial/daytime5/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/daytime5/server$(EXEEXT): $(tutorial_daytime5_server_OBJECTS) $(tutorial_daytime5_server_DEPENDENCIES) $(EXTRA_tutorial_daytime5_server_DEPENDENCIES) tutorial/daytime5/$(am__dirstamp)
- @rm -f tutorial/daytime5/server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime5_server_OBJECTS) $(tutorial_daytime5_server_LDADD) $(LIBS)
-tutorial/daytime6/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime6
- @: > tutorial/daytime6/$(am__dirstamp)
-tutorial/daytime6/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime6/$(DEPDIR)
- @: > tutorial/daytime6/$(DEPDIR)/$(am__dirstamp)
-tutorial/daytime6/server.$(OBJEXT): tutorial/daytime6/$(am__dirstamp) \
- tutorial/daytime6/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/daytime6/server$(EXEEXT): $(tutorial_daytime6_server_OBJECTS) $(tutorial_daytime6_server_DEPENDENCIES) $(EXTRA_tutorial_daytime6_server_DEPENDENCIES) tutorial/daytime6/$(am__dirstamp)
- @rm -f tutorial/daytime6/server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime6_server_OBJECTS) $(tutorial_daytime6_server_LDADD) $(LIBS)
-tutorial/daytime7/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime7
- @: > tutorial/daytime7/$(am__dirstamp)
-tutorial/daytime7/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/daytime7/$(DEPDIR)
- @: > tutorial/daytime7/$(DEPDIR)/$(am__dirstamp)
-tutorial/daytime7/server.$(OBJEXT): tutorial/daytime7/$(am__dirstamp) \
- tutorial/daytime7/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/daytime7/server$(EXEEXT): $(tutorial_daytime7_server_OBJECTS) $(tutorial_daytime7_server_DEPENDENCIES) $(EXTRA_tutorial_daytime7_server_DEPENDENCIES) tutorial/daytime7/$(am__dirstamp)
- @rm -f tutorial/daytime7/server$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime7_server_OBJECTS) $(tutorial_daytime7_server_LDADD) $(LIBS)
-tutorial/timer1/$(am__dirstamp):
- @$(MKDIR_P) tutorial/timer1
- @: > tutorial/timer1/$(am__dirstamp)
-tutorial/timer1/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/timer1/$(DEPDIR)
- @: > tutorial/timer1/$(DEPDIR)/$(am__dirstamp)
-tutorial/timer1/timer.$(OBJEXT): tutorial/timer1/$(am__dirstamp) \
- tutorial/timer1/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/timer1/timer$(EXEEXT): $(tutorial_timer1_timer_OBJECTS) $(tutorial_timer1_timer_DEPENDENCIES) $(EXTRA_tutorial_timer1_timer_DEPENDENCIES) tutorial/timer1/$(am__dirstamp)
- @rm -f tutorial/timer1/timer$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer1_timer_OBJECTS) $(tutorial_timer1_timer_LDADD) $(LIBS)
-tutorial/timer2/$(am__dirstamp):
- @$(MKDIR_P) tutorial/timer2
- @: > tutorial/timer2/$(am__dirstamp)
-tutorial/timer2/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/timer2/$(DEPDIR)
- @: > tutorial/timer2/$(DEPDIR)/$(am__dirstamp)
-tutorial/timer2/timer.$(OBJEXT): tutorial/timer2/$(am__dirstamp) \
- tutorial/timer2/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/timer2/timer$(EXEEXT): $(tutorial_timer2_timer_OBJECTS) $(tutorial_timer2_timer_DEPENDENCIES) $(EXTRA_tutorial_timer2_timer_DEPENDENCIES) tutorial/timer2/$(am__dirstamp)
- @rm -f tutorial/timer2/timer$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer2_timer_OBJECTS) $(tutorial_timer2_timer_LDADD) $(LIBS)
-tutorial/timer3/$(am__dirstamp):
- @$(MKDIR_P) tutorial/timer3
- @: > tutorial/timer3/$(am__dirstamp)
-tutorial/timer3/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/timer3/$(DEPDIR)
- @: > tutorial/timer3/$(DEPDIR)/$(am__dirstamp)
-tutorial/timer3/timer.$(OBJEXT): tutorial/timer3/$(am__dirstamp) \
- tutorial/timer3/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/timer3/timer$(EXEEXT): $(tutorial_timer3_timer_OBJECTS) $(tutorial_timer3_timer_DEPENDENCIES) $(EXTRA_tutorial_timer3_timer_DEPENDENCIES) tutorial/timer3/$(am__dirstamp)
- @rm -f tutorial/timer3/timer$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer3_timer_OBJECTS) $(tutorial_timer3_timer_LDADD) $(LIBS)
-tutorial/timer4/$(am__dirstamp):
- @$(MKDIR_P) tutorial/timer4
- @: > tutorial/timer4/$(am__dirstamp)
-tutorial/timer4/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/timer4/$(DEPDIR)
- @: > tutorial/timer4/$(DEPDIR)/$(am__dirstamp)
-tutorial/timer4/timer.$(OBJEXT): tutorial/timer4/$(am__dirstamp) \
- tutorial/timer4/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/timer4/timer$(EXEEXT): $(tutorial_timer4_timer_OBJECTS) $(tutorial_timer4_timer_DEPENDENCIES) $(EXTRA_tutorial_timer4_timer_DEPENDENCIES) tutorial/timer4/$(am__dirstamp)
- @rm -f tutorial/timer4/timer$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer4_timer_OBJECTS) $(tutorial_timer4_timer_LDADD) $(LIBS)
-tutorial/timer5/$(am__dirstamp):
- @$(MKDIR_P) tutorial/timer5
- @: > tutorial/timer5/$(am__dirstamp)
-tutorial/timer5/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tutorial/timer5/$(DEPDIR)
- @: > tutorial/timer5/$(DEPDIR)/$(am__dirstamp)
-tutorial/timer5/timer.$(OBJEXT): tutorial/timer5/$(am__dirstamp) \
- tutorial/timer5/$(DEPDIR)/$(am__dirstamp)
-
-tutorial/timer5/timer$(EXEEXT): $(tutorial_timer5_timer_OBJECTS) $(tutorial_timer5_timer_DEPENDENCIES) $(EXTRA_tutorial_timer5_timer_DEPENDENCIES) tutorial/timer5/$(am__dirstamp)
- @rm -f tutorial/timer5/timer$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer5_timer_OBJECTS) $(tutorial_timer5_timer_LDADD) $(LIBS)
-windows/$(am__dirstamp):
- @$(MKDIR_P) windows
- @: > windows/$(am__dirstamp)
-windows/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) windows/$(DEPDIR)
- @: > windows/$(DEPDIR)/$(am__dirstamp)
-windows/transmit_file.$(OBJEXT): windows/$(am__dirstamp) \
- windows/$(DEPDIR)/$(am__dirstamp)
-
-windows/transmit_file$(EXEEXT): $(windows_transmit_file_OBJECTS) $(windows_transmit_file_DEPENDENCIES) $(EXTRA_windows_transmit_file_DEPENDENCIES) windows/$(am__dirstamp)
- @rm -f windows/transmit_file$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(windows_transmit_file_OBJECTS) $(windows_transmit_file_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
- -rm -f ../../*.$(OBJEXT)
- -rm -f allocation/*.$(OBJEXT)
- -rm -f buffers/*.$(OBJEXT)
- -rm -f chat/*.$(OBJEXT)
- -rm -f echo/*.$(OBJEXT)
- -rm -f fork/*.$(OBJEXT)
- -rm -f http/client/*.$(OBJEXT)
- -rm -f http/server/*.$(OBJEXT)
- -rm -f http/server2/*.$(OBJEXT)
- -rm -f http/server3/*.$(OBJEXT)
- -rm -f http/server4/*.$(OBJEXT)
- -rm -f icmp/*.$(OBJEXT)
- -rm -f invocation/*.$(OBJEXT)
- -rm -f iostreams/*.$(OBJEXT)
- -rm -f local/*.$(OBJEXT)
- -rm -f multicast/*.$(OBJEXT)
- -rm -f nonblocking/*.$(OBJEXT)
- -rm -f porthopper/*.$(OBJEXT)
- -rm -f services/*.$(OBJEXT)
- -rm -f socks4/*.$(OBJEXT)
- -rm -f spawn/*.$(OBJEXT)
- -rm -f ssl/*.$(OBJEXT)
- -rm -f timeouts/*.$(OBJEXT)
- -rm -f timers/*.$(OBJEXT)
- -rm -f tutorial/daytime1/*.$(OBJEXT)
- -rm -f tutorial/daytime2/*.$(OBJEXT)
- -rm -f tutorial/daytime3/*.$(OBJEXT)
- -rm -f tutorial/daytime4/*.$(OBJEXT)
- -rm -f tutorial/daytime5/*.$(OBJEXT)
- -rm -f tutorial/daytime6/*.$(OBJEXT)
- -rm -f tutorial/daytime7/*.$(OBJEXT)
- -rm -f tutorial/timer1/*.$(OBJEXT)
- -rm -f tutorial/timer2/*.$(OBJEXT)
- -rm -f tutorial/timer3/*.$(OBJEXT)
- -rm -f tutorial/timer4/*.$(OBJEXT)
- -rm -f tutorial/timer5/*.$(OBJEXT)
- -rm -f windows/*.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio_ssl.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@allocation/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@buffers/$(DEPDIR)/reference_counted.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@chat/$(DEPDIR)/chat_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@chat/$(DEPDIR)/chat_server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@chat/$(DEPDIR)/posix_chat_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/async_tcp_echo_server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/async_udp_echo_server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_tcp_echo_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_tcp_echo_server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_udp_echo_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_udp_echo_server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@fork/$(DEPDIR)/daemon.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@fork/$(DEPDIR)/process_per_connection.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/client/$(DEPDIR)/async_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/client/$(DEPDIR)/sync_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/connection.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/connection_manager.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/mime_types.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/reply.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/request_handler.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/connection.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/io_context_pool.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/mime_types.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/reply.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/request_handler.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/connection.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/mime_types.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/reply.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/request_handler.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/file_handler.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/mime_types.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/reply.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@icmp/$(DEPDIR)/ping.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@invocation/$(DEPDIR)/prioritised_handlers.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@iostreams/$(DEPDIR)/daytime_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@iostreams/$(DEPDIR)/daytime_server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@iostreams/$(DEPDIR)/http_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/connect_pair.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/iostream_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/stream_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/stream_server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@multicast/$(DEPDIR)/receiver.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@multicast/$(DEPDIR)/sender.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@nonblocking/$(DEPDIR)/third_party_lib.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@porthopper/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@porthopper/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@services/$(DEPDIR)/daytime_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@services/$(DEPDIR)/logger_service.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@socks4/$(DEPDIR)/sync_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@spawn/$(DEPDIR)/echo_server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@spawn/$(DEPDIR)/parallel_grep.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ssl/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@ssl/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/async_tcp_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/blocking_tcp_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/blocking_token_tcp_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/blocking_udp_client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@timers/$(DEPDIR)/time_t_timer.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime1/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime2/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime3/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime4/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime5/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime6/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime7/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer1/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer2/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer3/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer4/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer5/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@windows/$(DEPDIR)/transmit_file.Po@am__quote@ # am--include-marker
-
-$(am__depfiles_remade):
- @$(MKDIR_P) $(@D)
- @echo '# dummy' >$@-t && $(am__mv) $@-t $@
-
-am--depfiles: $(am__depfiles_remade)
-
-.cpp.o:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
-
-.cpp.obj:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-ID: $(am__tagged_files)
- $(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- set x; \
- here=`pwd`; \
- $(am__define_uniq_tagged_files); \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
- $(am__define_uniq_tagged_files); \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
- list='$(am__tagged_files)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(HEADERS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
- -rm -f ../../$(DEPDIR)/$(am__dirstamp)
- -rm -f ../../$(am__dirstamp)
- -rm -f allocation/$(DEPDIR)/$(am__dirstamp)
- -rm -f allocation/$(am__dirstamp)
- -rm -f buffers/$(DEPDIR)/$(am__dirstamp)
- -rm -f buffers/$(am__dirstamp)
- -rm -f chat/$(DEPDIR)/$(am__dirstamp)
- -rm -f chat/$(am__dirstamp)
- -rm -f echo/$(DEPDIR)/$(am__dirstamp)
- -rm -f echo/$(am__dirstamp)
- -rm -f fork/$(DEPDIR)/$(am__dirstamp)
- -rm -f fork/$(am__dirstamp)
- -rm -f http/client/$(DEPDIR)/$(am__dirstamp)
- -rm -f http/client/$(am__dirstamp)
- -rm -f http/server/$(DEPDIR)/$(am__dirstamp)
- -rm -f http/server/$(am__dirstamp)
- -rm -f http/server2/$(DEPDIR)/$(am__dirstamp)
- -rm -f http/server2/$(am__dirstamp)
- -rm -f http/server3/$(DEPDIR)/$(am__dirstamp)
- -rm -f http/server3/$(am__dirstamp)
- -rm -f http/server4/$(DEPDIR)/$(am__dirstamp)
- -rm -f http/server4/$(am__dirstamp)
- -rm -f icmp/$(DEPDIR)/$(am__dirstamp)
- -rm -f icmp/$(am__dirstamp)
- -rm -f invocation/$(DEPDIR)/$(am__dirstamp)
- -rm -f invocation/$(am__dirstamp)
- -rm -f iostreams/$(DEPDIR)/$(am__dirstamp)
- -rm -f iostreams/$(am__dirstamp)
- -rm -f local/$(DEPDIR)/$(am__dirstamp)
- -rm -f local/$(am__dirstamp)
- -rm -f multicast/$(DEPDIR)/$(am__dirstamp)
- -rm -f multicast/$(am__dirstamp)
- -rm -f nonblocking/$(DEPDIR)/$(am__dirstamp)
- -rm -f nonblocking/$(am__dirstamp)
- -rm -f porthopper/$(DEPDIR)/$(am__dirstamp)
- -rm -f porthopper/$(am__dirstamp)
- -rm -f services/$(DEPDIR)/$(am__dirstamp)
- -rm -f services/$(am__dirstamp)
- -rm -f socks4/$(DEPDIR)/$(am__dirstamp)
- -rm -f socks4/$(am__dirstamp)
- -rm -f spawn/$(DEPDIR)/$(am__dirstamp)
- -rm -f spawn/$(am__dirstamp)
- -rm -f ssl/$(DEPDIR)/$(am__dirstamp)
- -rm -f ssl/$(am__dirstamp)
- -rm -f timeouts/$(DEPDIR)/$(am__dirstamp)
- -rm -f timeouts/$(am__dirstamp)
- -rm -f timers/$(DEPDIR)/$(am__dirstamp)
- -rm -f timers/$(am__dirstamp)
- -rm -f tutorial/daytime1/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/daytime1/$(am__dirstamp)
- -rm -f tutorial/daytime2/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/daytime2/$(am__dirstamp)
- -rm -f tutorial/daytime3/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/daytime3/$(am__dirstamp)
- -rm -f tutorial/daytime4/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/daytime4/$(am__dirstamp)
- -rm -f tutorial/daytime5/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/daytime5/$(am__dirstamp)
- -rm -f tutorial/daytime6/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/daytime6/$(am__dirstamp)
- -rm -f tutorial/daytime7/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/daytime7/$(am__dirstamp)
- -rm -f tutorial/timer1/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/timer1/$(am__dirstamp)
- -rm -f tutorial/timer2/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/timer2/$(am__dirstamp)
- -rm -f tutorial/timer3/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/timer3/$(am__dirstamp)
- -rm -f tutorial/timer4/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/timer4/$(am__dirstamp)
- -rm -f tutorial/timer5/$(DEPDIR)/$(am__dirstamp)
- -rm -f tutorial/timer5/$(am__dirstamp)
- -rm -f windows/$(DEPDIR)/$(am__dirstamp)
- -rm -f windows/$(am__dirstamp)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-clean: clean-am
-
-clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
- mostlyclean-am
-
-distclean: distclean-am
- -rm -f ../../$(DEPDIR)/asio.Po
- -rm -f ../../$(DEPDIR)/asio_ssl.Po
- -rm -f allocation/$(DEPDIR)/server.Po
- -rm -f buffers/$(DEPDIR)/reference_counted.Po
- -rm -f chat/$(DEPDIR)/chat_client.Po
- -rm -f chat/$(DEPDIR)/chat_server.Po
- -rm -f chat/$(DEPDIR)/posix_chat_client.Po
- -rm -f echo/$(DEPDIR)/async_tcp_echo_server.Po
- -rm -f echo/$(DEPDIR)/async_udp_echo_server.Po
- -rm -f echo/$(DEPDIR)/blocking_tcp_echo_client.Po
- -rm -f echo/$(DEPDIR)/blocking_tcp_echo_server.Po
- -rm -f echo/$(DEPDIR)/blocking_udp_echo_client.Po
- -rm -f echo/$(DEPDIR)/blocking_udp_echo_server.Po
- -rm -f fork/$(DEPDIR)/daemon.Po
- -rm -f fork/$(DEPDIR)/process_per_connection.Po
- -rm -f http/client/$(DEPDIR)/async_client.Po
- -rm -f http/client/$(DEPDIR)/sync_client.Po
- -rm -f http/server/$(DEPDIR)/connection.Po
- -rm -f http/server/$(DEPDIR)/connection_manager.Po
- -rm -f http/server/$(DEPDIR)/main.Po
- -rm -f http/server/$(DEPDIR)/mime_types.Po
- -rm -f http/server/$(DEPDIR)/reply.Po
- -rm -f http/server/$(DEPDIR)/request_handler.Po
- -rm -f http/server/$(DEPDIR)/request_parser.Po
- -rm -f http/server/$(DEPDIR)/server.Po
- -rm -f http/server2/$(DEPDIR)/connection.Po
- -rm -f http/server2/$(DEPDIR)/io_context_pool.Po
- -rm -f http/server2/$(DEPDIR)/main.Po
- -rm -f http/server2/$(DEPDIR)/mime_types.Po
- -rm -f http/server2/$(DEPDIR)/reply.Po
- -rm -f http/server2/$(DEPDIR)/request_handler.Po
- -rm -f http/server2/$(DEPDIR)/request_parser.Po
- -rm -f http/server2/$(DEPDIR)/server.Po
- -rm -f http/server3/$(DEPDIR)/connection.Po
- -rm -f http/server3/$(DEPDIR)/main.Po
- -rm -f http/server3/$(DEPDIR)/mime_types.Po
- -rm -f http/server3/$(DEPDIR)/reply.Po
- -rm -f http/server3/$(DEPDIR)/request_handler.Po
- -rm -f http/server3/$(DEPDIR)/request_parser.Po
- -rm -f http/server3/$(DEPDIR)/server.Po
- -rm -f http/server4/$(DEPDIR)/file_handler.Po
- -rm -f http/server4/$(DEPDIR)/main.Po
- -rm -f http/server4/$(DEPDIR)/mime_types.Po
- -rm -f http/server4/$(DEPDIR)/reply.Po
- -rm -f http/server4/$(DEPDIR)/request_parser.Po
- -rm -f http/server4/$(DEPDIR)/server.Po
- -rm -f icmp/$(DEPDIR)/ping.Po
- -rm -f invocation/$(DEPDIR)/prioritised_handlers.Po
- -rm -f iostreams/$(DEPDIR)/daytime_client.Po
- -rm -f iostreams/$(DEPDIR)/daytime_server.Po
- -rm -f iostreams/$(DEPDIR)/http_client.Po
- -rm -f local/$(DEPDIR)/connect_pair.Po
- -rm -f local/$(DEPDIR)/iostream_client.Po
- -rm -f local/$(DEPDIR)/stream_client.Po
- -rm -f local/$(DEPDIR)/stream_server.Po
- -rm -f multicast/$(DEPDIR)/receiver.Po
- -rm -f multicast/$(DEPDIR)/sender.Po
- -rm -f nonblocking/$(DEPDIR)/third_party_lib.Po
- -rm -f porthopper/$(DEPDIR)/client.Po
- -rm -f porthopper/$(DEPDIR)/server.Po
- -rm -f services/$(DEPDIR)/daytime_client.Po
- -rm -f services/$(DEPDIR)/logger_service.Po
- -rm -f socks4/$(DEPDIR)/sync_client.Po
- -rm -f spawn/$(DEPDIR)/echo_server.Po
- -rm -f spawn/$(DEPDIR)/parallel_grep.Po
- -rm -f ssl/$(DEPDIR)/client.Po
- -rm -f ssl/$(DEPDIR)/server.Po
- -rm -f timeouts/$(DEPDIR)/async_tcp_client.Po
- -rm -f timeouts/$(DEPDIR)/blocking_tcp_client.Po
- -rm -f timeouts/$(DEPDIR)/blocking_token_tcp_client.Po
- -rm -f timeouts/$(DEPDIR)/blocking_udp_client.Po
- -rm -f timeouts/$(DEPDIR)/server.Po
- -rm -f timers/$(DEPDIR)/time_t_timer.Po
- -rm -f tutorial/daytime1/$(DEPDIR)/client.Po
- -rm -f tutorial/daytime2/$(DEPDIR)/server.Po
- -rm -f tutorial/daytime3/$(DEPDIR)/server.Po
- -rm -f tutorial/daytime4/$(DEPDIR)/client.Po
- -rm -f tutorial/daytime5/$(DEPDIR)/server.Po
- -rm -f tutorial/daytime6/$(DEPDIR)/server.Po
- -rm -f tutorial/daytime7/$(DEPDIR)/server.Po
- -rm -f tutorial/timer1/$(DEPDIR)/timer.Po
- -rm -f tutorial/timer2/$(DEPDIR)/timer.Po
- -rm -f tutorial/timer3/$(DEPDIR)/timer.Po
- -rm -f tutorial/timer4/$(DEPDIR)/timer.Po
- -rm -f tutorial/timer5/$(DEPDIR)/timer.Po
- -rm -f windows/$(DEPDIR)/transmit_file.Po
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f ../../$(DEPDIR)/asio.Po
- -rm -f ../../$(DEPDIR)/asio_ssl.Po
- -rm -f allocation/$(DEPDIR)/server.Po
- -rm -f buffers/$(DEPDIR)/reference_counted.Po
- -rm -f chat/$(DEPDIR)/chat_client.Po
- -rm -f chat/$(DEPDIR)/chat_server.Po
- -rm -f chat/$(DEPDIR)/posix_chat_client.Po
- -rm -f echo/$(DEPDIR)/async_tcp_echo_server.Po
- -rm -f echo/$(DEPDIR)/async_udp_echo_server.Po
- -rm -f echo/$(DEPDIR)/blocking_tcp_echo_client.Po
- -rm -f echo/$(DEPDIR)/blocking_tcp_echo_server.Po
- -rm -f echo/$(DEPDIR)/blocking_udp_echo_client.Po
- -rm -f echo/$(DEPDIR)/blocking_udp_echo_server.Po
- -rm -f fork/$(DEPDIR)/daemon.Po
- -rm -f fork/$(DEPDIR)/process_per_connection.Po
- -rm -f http/client/$(DEPDIR)/async_client.Po
- -rm -f http/client/$(DEPDIR)/sync_client.Po
- -rm -f http/server/$(DEPDIR)/connection.Po
- -rm -f http/server/$(DEPDIR)/connection_manager.Po
- -rm -f http/server/$(DEPDIR)/main.Po
- -rm -f http/server/$(DEPDIR)/mime_types.Po
- -rm -f http/server/$(DEPDIR)/reply.Po
- -rm -f http/server/$(DEPDIR)/request_handler.Po
- -rm -f http/server/$(DEPDIR)/request_parser.Po
- -rm -f http/server/$(DEPDIR)/server.Po
- -rm -f http/server2/$(DEPDIR)/connection.Po
- -rm -f http/server2/$(DEPDIR)/io_context_pool.Po
- -rm -f http/server2/$(DEPDIR)/main.Po
- -rm -f http/server2/$(DEPDIR)/mime_types.Po
- -rm -f http/server2/$(DEPDIR)/reply.Po
- -rm -f http/server2/$(DEPDIR)/request_handler.Po
- -rm -f http/server2/$(DEPDIR)/request_parser.Po
- -rm -f http/server2/$(DEPDIR)/server.Po
- -rm -f http/server3/$(DEPDIR)/connection.Po
- -rm -f http/server3/$(DEPDIR)/main.Po
- -rm -f http/server3/$(DEPDIR)/mime_types.Po
- -rm -f http/server3/$(DEPDIR)/reply.Po
- -rm -f http/server3/$(DEPDIR)/request_handler.Po
- -rm -f http/server3/$(DEPDIR)/request_parser.Po
- -rm -f http/server3/$(DEPDIR)/server.Po
- -rm -f http/server4/$(DEPDIR)/file_handler.Po
- -rm -f http/server4/$(DEPDIR)/main.Po
- -rm -f http/server4/$(DEPDIR)/mime_types.Po
- -rm -f http/server4/$(DEPDIR)/reply.Po
- -rm -f http/server4/$(DEPDIR)/request_parser.Po
- -rm -f http/server4/$(DEPDIR)/server.Po
- -rm -f icmp/$(DEPDIR)/ping.Po
- -rm -f invocation/$(DEPDIR)/prioritised_handlers.Po
- -rm -f iostreams/$(DEPDIR)/daytime_client.Po
- -rm -f iostreams/$(DEPDIR)/daytime_server.Po
- -rm -f iostreams/$(DEPDIR)/http_client.Po
- -rm -f local/$(DEPDIR)/connect_pair.Po
- -rm -f local/$(DEPDIR)/iostream_client.Po
- -rm -f local/$(DEPDIR)/stream_client.Po
- -rm -f local/$(DEPDIR)/stream_server.Po
- -rm -f multicast/$(DEPDIR)/receiver.Po
- -rm -f multicast/$(DEPDIR)/sender.Po
- -rm -f nonblocking/$(DEPDIR)/third_party_lib.Po
- -rm -f porthopper/$(DEPDIR)/client.Po
- -rm -f porthopper/$(DEPDIR)/server.Po
- -rm -f services/$(DEPDIR)/daytime_client.Po
- -rm -f services/$(DEPDIR)/logger_service.Po
- -rm -f socks4/$(DEPDIR)/sync_client.Po
- -rm -f spawn/$(DEPDIR)/echo_server.Po
- -rm -f spawn/$(DEPDIR)/parallel_grep.Po
- -rm -f ssl/$(DEPDIR)/client.Po
- -rm -f ssl/$(DEPDIR)/server.Po
- -rm -f timeouts/$(DEPDIR)/async_tcp_client.Po
- -rm -f timeouts/$(DEPDIR)/blocking_tcp_client.Po
- -rm -f timeouts/$(DEPDIR)/blocking_token_tcp_client.Po
- -rm -f timeouts/$(DEPDIR)/blocking_udp_client.Po
- -rm -f timeouts/$(DEPDIR)/server.Po
- -rm -f timers/$(DEPDIR)/time_t_timer.Po
- -rm -f tutorial/daytime1/$(DEPDIR)/client.Po
- -rm -f tutorial/daytime2/$(DEPDIR)/server.Po
- -rm -f tutorial/daytime3/$(DEPDIR)/server.Po
- -rm -f tutorial/daytime4/$(DEPDIR)/client.Po
- -rm -f tutorial/daytime5/$(DEPDIR)/server.Po
- -rm -f tutorial/daytime6/$(DEPDIR)/server.Po
- -rm -f tutorial/daytime7/$(DEPDIR)/server.Po
- -rm -f tutorial/timer1/$(DEPDIR)/timer.Po
- -rm -f tutorial/timer2/$(DEPDIR)/timer.Po
- -rm -f tutorial/timer3/$(DEPDIR)/timer.Po
- -rm -f tutorial/timer4/$(DEPDIR)/timer.Po
- -rm -f tutorial/timer5/$(DEPDIR)/timer.Po
- -rm -f windows/$(DEPDIR)/transmit_file.Po
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
- clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
- cscopelist-am ctags ctags-am distclean distclean-compile \
- distclean-generic distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
- uninstall-am
-
-.PRECIOUS: Makefile
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/3rdparty/asio/src/examples/cpp03/allocation/server.cpp b/3rdparty/asio/src/examples/cpp03/allocation/server.cpp
deleted file mode 100644
index ca69460ff14..00000000000
--- a/3rdparty/asio/src/examples/cpp03/allocation/server.cpp
+++ /dev/null
@@ -1,285 +0,0 @@
-//
-// server.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/aligned_storage.hpp>
-#include <boost/array.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include "asio.hpp"
-
-using asio::ip::tcp;
-
-// Class to manage the memory to be used for handler-based custom allocation.
-// It contains a single block of memory which may be returned for allocation
-// requests. If the memory is in use when an allocation request is made, the
-// allocator delegates allocation to the global heap.
-class handler_memory
- : private boost::noncopyable
-{
-public:
- handler_memory()
- : in_use_(false)
- {
- }
-
- void* allocate(std::size_t size)
- {
- if (!in_use_ && size < storage_.size)
- {
- in_use_ = true;
- return storage_.address();
- }
- else
- {
- return ::operator new(size);
- }
- }
-
- void deallocate(void* pointer)
- {
- if (pointer == storage_.address())
- {
- in_use_ = false;
- }
- else
- {
- ::operator delete(pointer);
- }
- }
-
-private:
- // Storage space used for handler-based custom memory allocation.
- boost::aligned_storage<1024> storage_;
-
- // Whether the handler-based custom allocation storage has been used.
- bool in_use_;
-};
-
-// The allocator to be associated with the handler objects. This allocator only
-// needs to satisfy the C++11 minimal allocator requirements, plus rebind when
-// targeting C++03.
-template <typename T>
-class handler_allocator
-{
-public:
- typedef T value_type;
-
- explicit handler_allocator(handler_memory& mem)
- : memory_(mem)
- {
- }
-
- template <typename U>
- handler_allocator(const handler_allocator<U>& other)
- : memory_(other.memory_)
- {
- }
-
- template <typename U>
- struct rebind
- {
- typedef handler_allocator<U> other;
- };
-
- bool operator==(const handler_allocator& other) const
- {
- return &memory_ == &other.memory_;
- }
-
- bool operator!=(const handler_allocator& other) const
- {
- return &memory_ != &other.memory_;
- }
-
- T* allocate(std::size_t n) const
- {
- return static_cast<T*>(memory_.allocate(sizeof(T) * n));
- }
-
- void deallocate(T* p, std::size_t /*n*/) const
- {
- return memory_.deallocate(p);
- }
-
-//private:
- // The underlying memory.
- handler_memory& memory_;
-};
-
-// Wrapper class template for handler objects to allow handler memory
-// allocation to be customised. The allocator_type typedef and get_allocator()
-// member function are used by the asynchronous operations to obtain the
-// allocator. Calls to operator() are forwarded to the encapsulated handler.
-template <typename Handler>
-class custom_alloc_handler
-{
-public:
- typedef handler_allocator<Handler> allocator_type;
-
- custom_alloc_handler(handler_memory& m, Handler h)
- : memory_(m),
- handler_(h)
- {
- }
-
- allocator_type get_allocator() const
- {
- return allocator_type(memory_);
- }
-
- template <typename Arg1>
- void operator()(Arg1 arg1)
- {
- handler_(arg1);
- }
-
- template <typename Arg1, typename Arg2>
- void operator()(Arg1 arg1, Arg2 arg2)
- {
- handler_(arg1, arg2);
- }
-
-private:
- handler_memory& memory_;
- Handler handler_;
-};
-
-// Helper function to wrap a handler object to add custom allocation.
-template <typename Handler>
-inline custom_alloc_handler<Handler> make_custom_alloc_handler(
- handler_memory& m, Handler h)
-{
- return custom_alloc_handler<Handler>(m, h);
-}
-
-class session
- : public boost::enable_shared_from_this<session>
-{
-public:
- session(asio::io_context& io_context)
- : socket_(io_context)
- {
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- socket_.async_read_some(asio::buffer(data_),
- make_custom_alloc_handler(handler_memory_,
- boost::bind(&session::handle_read,
- shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred)));
- }
-
- void handle_read(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- asio::async_write(socket_,
- asio::buffer(data_, bytes_transferred),
- make_custom_alloc_handler(handler_memory_,
- boost::bind(&session::handle_write,
- shared_from_this(),
- asio::placeholders::error)));
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_read_some(asio::buffer(data_),
- make_custom_alloc_handler(handler_memory_,
- boost::bind(&session::handle_read,
- shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred)));
- }
- }
-
-private:
- // The socket used to communicate with the client.
- tcp::socket socket_;
-
- // Buffer used to store data received from the client.
- boost::array<char, 1024> data_;
-
- // The memory to use for handler-based custom memory allocation.
- handler_memory handler_memory_;
-};
-
-typedef boost::shared_ptr<session> session_ptr;
-
-class server
-{
-public:
- server(asio::io_context& io_context, short port)
- : io_context_(io_context),
- acceptor_(io_context, tcp::endpoint(tcp::v4(), port))
- {
- session_ptr new_session(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(session_ptr new_session,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_session->start();
- }
-
- new_session.reset(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
-private:
- asio::io_context& io_context_;
- tcp::acceptor acceptor_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/buffers/reference_counted.cpp b/3rdparty/asio/src/examples/cpp03/buffers/reference_counted.cpp
deleted file mode 100644
index 29750f693dc..00000000000
--- a/3rdparty/asio/src/examples/cpp03/buffers/reference_counted.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// reference_counted.cpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <asio.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/shared_ptr.hpp>
-#include <iostream>
-#include <vector>
-
-using asio::ip::tcp;
-
-// A reference-counted non-modifiable buffer class.
-class shared_const_buffer
-{
-public:
- // Construct from a std::string.
- explicit shared_const_buffer(const std::string& data)
- : data_(new std::vector<char>(data.begin(), data.end())),
- buffer_(asio::buffer(*data_))
- {
- }
-
- // Implement the ConstBufferSequence requirements.
- typedef asio::const_buffer value_type;
- typedef const asio::const_buffer* const_iterator;
- const asio::const_buffer* begin() const { return &buffer_; }
- const asio::const_buffer* end() const { return &buffer_ + 1; }
-
-private:
- boost::shared_ptr<std::vector<char> > data_;
- asio::const_buffer buffer_;
-};
-
-class session
- : public boost::enable_shared_from_this<session>
-{
-public:
- session(asio::io_context& io_context)
- : socket_(io_context)
- {
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- using namespace std; // For time_t, time and ctime.
- time_t now = time(0);
- shared_const_buffer buffer(ctime(&now));
- asio::async_write(socket_, buffer,
- boost::bind(&session::handle_write, shared_from_this()));
- }
-
- void handle_write()
- {
- }
-
-private:
- // The socket used to communicate with the client.
- tcp::socket socket_;
-};
-
-typedef boost::shared_ptr<session> session_ptr;
-
-class server
-{
-public:
- server(asio::io_context& io_context, short port)
- : io_context_(io_context),
- acceptor_(io_context, tcp::endpoint(tcp::v4(), port))
- {
- session_ptr new_session(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(session_ptr new_session,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_session->start();
- }
-
- new_session.reset(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
-private:
- asio::io_context& io_context_;
- tcp::acceptor acceptor_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: reference_counted <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/chat/chat_client.cpp b/3rdparty/asio/src/examples/cpp03/chat/chat_client.cpp
deleted file mode 100644
index 868e7d7bfa3..00000000000
--- a/3rdparty/asio/src/examples/cpp03/chat/chat_client.cpp
+++ /dev/null
@@ -1,177 +0,0 @@
-//
-// chat_client.cpp
-// ~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <deque>
-#include <iostream>
-#include <boost/bind/bind.hpp>
-#include "asio.hpp"
-#include "chat_message.hpp"
-
-using asio::ip::tcp;
-
-typedef std::deque<chat_message> chat_message_queue;
-
-class chat_client
-{
-public:
- chat_client(asio::io_context& io_context,
- const tcp::resolver::results_type& endpoints)
- : io_context_(io_context),
- socket_(io_context)
- {
- asio::async_connect(socket_, endpoints,
- boost::bind(&chat_client::handle_connect, this,
- asio::placeholders::error));
- }
-
- void write(const chat_message& msg)
- {
- asio::post(io_context_,
- boost::bind(&chat_client::do_write, this, msg));
- }
-
- void close()
- {
- asio::post(io_context_,
- boost::bind(&chat_client::do_close, this));
- }
-
-private:
-
- void handle_connect(const asio::error_code& error)
- {
- if (!error)
- {
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(&chat_client::handle_read_header, this,
- asio::placeholders::error));
- }
- }
-
- void handle_read_header(const asio::error_code& error)
- {
- if (!error && read_msg_.decode_header())
- {
- asio::async_read(socket_,
- asio::buffer(read_msg_.body(), read_msg_.body_length()),
- boost::bind(&chat_client::handle_read_body, this,
- asio::placeholders::error));
- }
- else
- {
- do_close();
- }
- }
-
- void handle_read_body(const asio::error_code& error)
- {
- if (!error)
- {
- std::cout.write(read_msg_.body(), read_msg_.body_length());
- std::cout << "\n";
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(&chat_client::handle_read_header, this,
- asio::placeholders::error));
- }
- else
- {
- do_close();
- }
- }
-
- void do_write(chat_message msg)
- {
- bool write_in_progress = !write_msgs_.empty();
- write_msgs_.push_back(msg);
- if (!write_in_progress)
- {
- asio::async_write(socket_,
- asio::buffer(write_msgs_.front().data(),
- write_msgs_.front().length()),
- boost::bind(&chat_client::handle_write, this,
- asio::placeholders::error));
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- write_msgs_.pop_front();
- if (!write_msgs_.empty())
- {
- asio::async_write(socket_,
- asio::buffer(write_msgs_.front().data(),
- write_msgs_.front().length()),
- boost::bind(&chat_client::handle_write, this,
- asio::placeholders::error));
- }
- }
- else
- {
- do_close();
- }
- }
-
- void do_close()
- {
- socket_.close();
- }
-
-private:
- asio::io_context& io_context_;
- tcp::socket socket_;
- chat_message read_msg_;
- chat_message_queue write_msgs_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: chat_client <host> <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- tcp::resolver resolver(io_context);
- tcp::resolver::results_type endpoints = resolver.resolve(argv[1], argv[2]);
-
- chat_client c(io_context, endpoints);
-
- asio::thread t(boost::bind(&asio::io_context::run, &io_context));
-
- char line[chat_message::max_body_length + 1];
- while (std::cin.getline(line, chat_message::max_body_length + 1))
- {
- using namespace std; // For strlen and memcpy.
- chat_message msg;
- msg.body_length(strlen(line));
- memcpy(msg.body(), line, msg.body_length());
- msg.encode_header();
- c.write(msg);
- }
-
- c.close();
- t.join();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/chat/chat_message.hpp b/3rdparty/asio/src/examples/cpp03/chat/chat_message.hpp
deleted file mode 100644
index 26fb04357d0..00000000000
--- a/3rdparty/asio/src/examples/cpp03/chat/chat_message.hpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// chat_message.hpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 CHAT_MESSAGE_HPP
-#define CHAT_MESSAGE_HPP
-
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-
-class chat_message
-{
-public:
- enum { header_length = 4 };
- enum { max_body_length = 512 };
-
- chat_message()
- : body_length_(0)
- {
- }
-
- const char* data() const
- {
- return data_;
- }
-
- char* data()
- {
- return data_;
- }
-
- size_t length() const
- {
- return header_length + body_length_;
- }
-
- const char* body() const
- {
- return data_ + header_length;
- }
-
- char* body()
- {
- return data_ + header_length;
- }
-
- size_t body_length() const
- {
- return body_length_;
- }
-
- void body_length(size_t new_length)
- {
- body_length_ = new_length;
- if (body_length_ > max_body_length)
- body_length_ = max_body_length;
- }
-
- bool decode_header()
- {
- using namespace std; // For strncat and atoi.
- char header[header_length + 1] = "";
- strncat(header, data_, header_length);
- body_length_ = atoi(header);
- if (body_length_ > max_body_length)
- {
- body_length_ = 0;
- return false;
- }
- return true;
- }
-
- void encode_header()
- {
- using namespace std; // For sprintf and memcpy.
- char header[header_length + 1] = "";
- sprintf(header, "%4d", static_cast<int>(body_length_));
- memcpy(data_, header, header_length);
- }
-
-private:
- char data_[header_length + max_body_length];
- size_t body_length_;
-};
-
-#endif // CHAT_MESSAGE_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/chat/chat_server.cpp b/3rdparty/asio/src/examples/cpp03/chat/chat_server.cpp
deleted file mode 100644
index c8abca218f1..00000000000
--- a/3rdparty/asio/src/examples/cpp03/chat/chat_server.cpp
+++ /dev/null
@@ -1,249 +0,0 @@
-//
-// chat_server.cpp
-// ~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <algorithm>
-#include <cstdlib>
-#include <deque>
-#include <iostream>
-#include <list>
-#include <set>
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include "asio.hpp"
-#include "chat_message.hpp"
-
-using asio::ip::tcp;
-
-//----------------------------------------------------------------------
-
-typedef std::deque<chat_message> chat_message_queue;
-
-//----------------------------------------------------------------------
-
-class chat_participant
-{
-public:
- virtual ~chat_participant() {}
- virtual void deliver(const chat_message& msg) = 0;
-};
-
-typedef boost::shared_ptr<chat_participant> chat_participant_ptr;
-
-//----------------------------------------------------------------------
-
-class chat_room
-{
-public:
- void join(chat_participant_ptr participant)
- {
- participants_.insert(participant);
- std::for_each(recent_msgs_.begin(), recent_msgs_.end(),
- boost::bind(&chat_participant::deliver,
- participant, boost::placeholders::_1));
- }
-
- void leave(chat_participant_ptr participant)
- {
- participants_.erase(participant);
- }
-
- void deliver(const chat_message& msg)
- {
- recent_msgs_.push_back(msg);
- while (recent_msgs_.size() > max_recent_msgs)
- recent_msgs_.pop_front();
-
- std::for_each(participants_.begin(), participants_.end(),
- boost::bind(&chat_participant::deliver,
- boost::placeholders::_1, boost::ref(msg)));
- }
-
-private:
- std::set<chat_participant_ptr> participants_;
- enum { max_recent_msgs = 100 };
- chat_message_queue recent_msgs_;
-};
-
-//----------------------------------------------------------------------
-
-class chat_session
- : public chat_participant,
- public boost::enable_shared_from_this<chat_session>
-{
-public:
- chat_session(asio::io_context& io_context, chat_room& room)
- : socket_(io_context),
- room_(room)
- {
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- room_.join(shared_from_this());
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(
- &chat_session::handle_read_header, shared_from_this(),
- asio::placeholders::error));
- }
-
- void deliver(const chat_message& msg)
- {
- bool write_in_progress = !write_msgs_.empty();
- write_msgs_.push_back(msg);
- if (!write_in_progress)
- {
- asio::async_write(socket_,
- asio::buffer(write_msgs_.front().data(),
- write_msgs_.front().length()),
- boost::bind(&chat_session::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- }
-
- void handle_read_header(const asio::error_code& error)
- {
- if (!error && read_msg_.decode_header())
- {
- asio::async_read(socket_,
- asio::buffer(read_msg_.body(), read_msg_.body_length()),
- boost::bind(&chat_session::handle_read_body, shared_from_this(),
- asio::placeholders::error));
- }
- else
- {
- room_.leave(shared_from_this());
- }
- }
-
- void handle_read_body(const asio::error_code& error)
- {
- if (!error)
- {
- room_.deliver(read_msg_);
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(&chat_session::handle_read_header, shared_from_this(),
- asio::placeholders::error));
- }
- else
- {
- room_.leave(shared_from_this());
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- write_msgs_.pop_front();
- if (!write_msgs_.empty())
- {
- asio::async_write(socket_,
- asio::buffer(write_msgs_.front().data(),
- write_msgs_.front().length()),
- boost::bind(&chat_session::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- }
- else
- {
- room_.leave(shared_from_this());
- }
- }
-
-private:
- tcp::socket socket_;
- chat_room& room_;
- chat_message read_msg_;
- chat_message_queue write_msgs_;
-};
-
-typedef boost::shared_ptr<chat_session> chat_session_ptr;
-
-//----------------------------------------------------------------------
-
-class chat_server
-{
-public:
- chat_server(asio::io_context& io_context,
- const tcp::endpoint& endpoint)
- : io_context_(io_context),
- acceptor_(io_context, endpoint)
- {
- start_accept();
- }
-
- void start_accept()
- {
- chat_session_ptr new_session(new chat_session(io_context_, room_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&chat_server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(chat_session_ptr session,
- const asio::error_code& error)
- {
- if (!error)
- {
- session->start();
- }
-
- start_accept();
- }
-
-private:
- asio::io_context& io_context_;
- tcp::acceptor acceptor_;
- chat_room room_;
-};
-
-typedef boost::shared_ptr<chat_server> chat_server_ptr;
-typedef std::list<chat_server_ptr> chat_server_list;
-
-//----------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc < 2)
- {
- std::cerr << "Usage: chat_server <port> [<port> ...]\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- chat_server_list servers;
- for (int i = 1; i < argc; ++i)
- {
- using namespace std; // For atoi.
- tcp::endpoint endpoint(tcp::v4(), atoi(argv[i]));
- chat_server_ptr server(new chat_server(io_context, endpoint));
- servers.push_back(server);
- }
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/chat/posix_chat_client.cpp b/3rdparty/asio/src/examples/cpp03/chat/posix_chat_client.cpp
deleted file mode 100644
index 16f312de63e..00000000000
--- a/3rdparty/asio/src/examples/cpp03/chat/posix_chat_client.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-//
-// posix_chat_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <cstring>
-#include <iostream>
-#include <boost/array.hpp>
-#include <boost/bind/bind.hpp>
-#include "asio.hpp"
-#include "chat_message.hpp"
-
-#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
-
-using asio::ip::tcp;
-namespace posix = asio::posix;
-
-class posix_chat_client
-{
-public:
- posix_chat_client(asio::io_context& io_context,
- const tcp::resolver::results_type& endpoints)
- : socket_(io_context),
- input_(io_context, ::dup(STDIN_FILENO)),
- output_(io_context, ::dup(STDOUT_FILENO)),
- input_buffer_(chat_message::max_body_length)
- {
- asio::async_connect(socket_, endpoints,
- boost::bind(&posix_chat_client::handle_connect, this,
- asio::placeholders::error));
- }
-
-private:
-
- void handle_connect(const asio::error_code& error)
- {
- if (!error)
- {
- // Read the fixed-length header of the next message from the server.
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(&posix_chat_client::handle_read_header, this,
- asio::placeholders::error));
-
- // Read a line of input entered by the user.
- asio::async_read_until(input_, input_buffer_, '\n',
- boost::bind(&posix_chat_client::handle_read_input, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
-
- void handle_read_header(const asio::error_code& error)
- {
- if (!error && read_msg_.decode_header())
- {
- // Read the variable-length body of the message from the server.
- asio::async_read(socket_,
- asio::buffer(read_msg_.body(), read_msg_.body_length()),
- boost::bind(&posix_chat_client::handle_read_body, this,
- asio::placeholders::error));
- }
- else
- {
- close();
- }
- }
-
- void handle_read_body(const asio::error_code& error)
- {
- if (!error)
- {
- // Write out the message we just received, terminated by a newline.
- static char eol[] = { '\n' };
- boost::array<asio::const_buffer, 2> buffers = {{
- asio::buffer(read_msg_.body(), read_msg_.body_length()),
- asio::buffer(eol) }};
- asio::async_write(output_, buffers,
- boost::bind(&posix_chat_client::handle_write_output, this,
- asio::placeholders::error));
- }
- else
- {
- close();
- }
- }
-
- void handle_write_output(const asio::error_code& error)
- {
- if (!error)
- {
- // Read the fixed-length header of the next message from the server.
- asio::async_read(socket_,
- asio::buffer(read_msg_.data(), chat_message::header_length),
- boost::bind(&posix_chat_client::handle_read_header, this,
- asio::placeholders::error));
- }
- else
- {
- close();
- }
- }
-
- void handle_read_input(const asio::error_code& error,
- std::size_t length)
- {
- if (!error)
- {
- // Write the message (minus the newline) to the server.
- write_msg_.body_length(length - 1);
- input_buffer_.sgetn(write_msg_.body(), length - 1);
- input_buffer_.consume(1); // Remove newline from input.
- write_msg_.encode_header();
- asio::async_write(socket_,
- asio::buffer(write_msg_.data(), write_msg_.length()),
- boost::bind(&posix_chat_client::handle_write, this,
- asio::placeholders::error));
- }
- else if (error == asio::error::not_found)
- {
- // Didn't get a newline. Send whatever we have.
- write_msg_.body_length(input_buffer_.size());
- input_buffer_.sgetn(write_msg_.body(), input_buffer_.size());
- write_msg_.encode_header();
- asio::async_write(socket_,
- asio::buffer(write_msg_.data(), write_msg_.length()),
- boost::bind(&posix_chat_client::handle_write, this,
- asio::placeholders::error));
- }
- else
- {
- close();
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- // Read a line of input entered by the user.
- asio::async_read_until(input_, input_buffer_, '\n',
- boost::bind(&posix_chat_client::handle_read_input, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- close();
- }
- }
-
- void close()
- {
- // Cancel all outstanding asynchronous operations.
- socket_.close();
- input_.close();
- output_.close();
- }
-
-private:
- tcp::socket socket_;
- posix::stream_descriptor input_;
- posix::stream_descriptor output_;
- chat_message read_msg_;
- chat_message write_msg_;
- asio::streambuf input_buffer_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: posix_chat_client <host> <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- tcp::resolver resolver(io_context);
- tcp::resolver::results_type endpoints = resolver.resolve(argv[1], argv[2]);
-
- posix_chat_client c(io_context, endpoints);
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
-
-#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
-int main() {}
-#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp
deleted file mode 100644
index a0b2eabd173..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/async_tcp_echo_server.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-//
-// async_tcp_echo_server.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/bind/bind.hpp>
-#include "asio.hpp"
-
-using asio::ip::tcp;
-
-class session
-{
-public:
- session(asio::io_context& io_context)
- : socket_(io_context)
- {
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- socket_.async_read_some(asio::buffer(data_, max_length),
- boost::bind(&session::handle_read, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
-
-private:
- void handle_read(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- asio::async_write(socket_,
- asio::buffer(data_, bytes_transferred),
- boost::bind(&session::handle_write, this,
- asio::placeholders::error));
- }
- else
- {
- delete this;
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_read_some(asio::buffer(data_, max_length),
- boost::bind(&session::handle_read, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- delete this;
- }
- }
-
- tcp::socket socket_;
- enum { max_length = 1024 };
- char data_[max_length];
-};
-
-class server
-{
-public:
- server(asio::io_context& io_context, short port)
- : io_context_(io_context),
- acceptor_(io_context, tcp::endpoint(tcp::v4(), port))
- {
- start_accept();
- }
-
-private:
- void start_accept()
- {
- session* new_session = new session(io_context_);
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(session* new_session,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_session->start();
- }
- else
- {
- delete new_session;
- }
-
- start_accept();
- }
-
- asio::io_context& io_context_;
- tcp::acceptor acceptor_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: async_tcp_echo_server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp
deleted file mode 100644
index a9e21d72e4b..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/async_udp_echo_server.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// async_udp_echo_server.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/bind/bind.hpp>
-#include "asio.hpp"
-
-using asio::ip::udp;
-
-class server
-{
-public:
- server(asio::io_context& io_context, short port)
- : socket_(io_context, udp::endpoint(udp::v4(), port))
- {
- socket_.async_receive_from(
- asio::buffer(data_, max_length), sender_endpoint_,
- boost::bind(&server::handle_receive_from, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
-
- void handle_receive_from(const asio::error_code& error,
- size_t bytes_recvd)
- {
- if (!error && bytes_recvd > 0)
- {
- socket_.async_send_to(
- asio::buffer(data_, bytes_recvd), sender_endpoint_,
- boost::bind(&server::handle_send_to, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- socket_.async_receive_from(
- asio::buffer(data_, max_length), sender_endpoint_,
- boost::bind(&server::handle_receive_from, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
-
- void handle_send_to(const asio::error_code& /*error*/,
- size_t /*bytes_sent*/)
- {
- socket_.async_receive_from(
- asio::buffer(data_, max_length), sender_endpoint_,
- boost::bind(&server::handle_receive_from, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
-
-private:
- udp::socket socket_;
- udp::endpoint sender_endpoint_;
- enum { max_length = 1024 };
- char data_[max_length];
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: async_udp_echo_server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp b/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp
deleted file mode 100644
index 1d39b4ed2e4..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_client.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// blocking_tcp_echo_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <cstring>
-#include <iostream>
-#include "asio.hpp"
-
-using asio::ip::tcp;
-
-enum { max_length = 1024 };
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: blocking_tcp_echo_client <host> <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- tcp::resolver resolver(io_context);
- tcp::resolver::results_type endpoints =
- resolver.resolve(tcp::v4(), argv[1], argv[2]);
-
- tcp::socket s(io_context);
- asio::connect(s, endpoints);
-
- using namespace std; // For strlen.
- std::cout << "Enter message: ";
- char request[max_length];
- std::cin.getline(request, max_length);
- size_t request_length = strlen(request);
- asio::write(s, asio::buffer(request, request_length));
-
- char reply[max_length];
- size_t reply_length = asio::read(s,
- asio::buffer(reply, request_length));
- std::cout << "Reply is: ";
- std::cout.write(reply, reply_length);
- std::cout << "\n";
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp
deleted file mode 100644
index 7828e7bd7d8..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/blocking_tcp_echo_server.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// blocking_tcp_echo_server.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/bind/bind.hpp>
-#include <boost/smart_ptr.hpp>
-#include "asio.hpp"
-
-using asio::ip::tcp;
-
-const int max_length = 1024;
-
-typedef boost::shared_ptr<tcp::socket> socket_ptr;
-
-void session(socket_ptr sock)
-{
- try
- {
- for (;;)
- {
- char data[max_length];
-
- asio::error_code error;
- size_t length = sock->read_some(asio::buffer(data), error);
- if (error == asio::error::eof)
- break; // Connection closed cleanly by peer.
- else if (error)
- throw asio::system_error(error); // Some other error.
-
- asio::write(*sock, asio::buffer(data, length));
- }
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception in thread: " << e.what() << "\n";
- }
-}
-
-void server(asio::io_context& io_context, unsigned short port)
-{
- tcp::acceptor a(io_context, tcp::endpoint(tcp::v4(), port));
- for (;;)
- {
- socket_ptr sock(new tcp::socket(io_context));
- a.accept(*sock);
- asio::thread t(boost::bind(session, sock));
- }
-}
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: blocking_tcp_echo_server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server(io_context, atoi(argv[1]));
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp b/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp
deleted file mode 100644
index ab69f4c9968..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_client.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// blocking_udp_echo_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <cstring>
-#include <iostream>
-#include "asio.hpp"
-
-using asio::ip::udp;
-
-enum { max_length = 1024 };
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: blocking_udp_echo_client <host> <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- udp::socket s(io_context, udp::endpoint(udp::v4(), 0));
-
- udp::resolver resolver(io_context);
- udp::resolver::results_type endpoints =
- resolver.resolve(udp::v4(), argv[1], argv[2]);
-
- using namespace std; // For strlen.
- std::cout << "Enter message: ";
- char request[max_length];
- std::cin.getline(request, max_length);
- size_t request_length = strlen(request);
- s.send_to(asio::buffer(request, request_length), *endpoints.begin());
-
- char reply[max_length];
- udp::endpoint sender_endpoint;
- size_t reply_length = s.receive_from(
- asio::buffer(reply, max_length), sender_endpoint);
- std::cout << "Reply is: ";
- std::cout.write(reply, reply_length);
- std::cout << "\n";
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp
deleted file mode 100644
index 42498a15e9a..00000000000
--- a/3rdparty/asio/src/examples/cpp03/echo/blocking_udp_echo_server.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// blocking_udp_echo_server.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include "asio.hpp"
-
-using asio::ip::udp;
-
-enum { max_length = 1024 };
-
-void server(asio::io_context& io_context, unsigned short port)
-{
- udp::socket sock(io_context, udp::endpoint(udp::v4(), port));
- for (;;)
- {
- char data[max_length];
- udp::endpoint sender_endpoint;
- size_t length = sock.receive_from(
- asio::buffer(data, max_length), sender_endpoint);
- sock.send_to(asio::buffer(data, length), sender_endpoint);
- }
-}
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: blocking_udp_echo_server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server(io_context, atoi(argv[1]));
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/fork/daemon.cpp b/3rdparty/asio/src/examples/cpp03/fork/daemon.cpp
deleted file mode 100644
index ae00d3d6aff..00000000000
--- a/3rdparty/asio/src/examples/cpp03/fork/daemon.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-//
-// daemon.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <asio/io_context.hpp>
-#include <asio/ip/udp.hpp>
-#include <asio/signal_set.hpp>
-#include <boost/array.hpp>
-#include <boost/bind/bind.hpp>
-#include <ctime>
-#include <iostream>
-#include <syslog.h>
-#include <unistd.h>
-
-using asio::ip::udp;
-
-class udp_daytime_server
-{
-public:
- udp_daytime_server(asio::io_context& io_context)
- : socket_(io_context, udp::endpoint(udp::v4(), 13))
- {
- start_receive();
- }
-
-private:
- void start_receive()
- {
- socket_.async_receive_from(
- asio::buffer(recv_buffer_), remote_endpoint_,
- boost::bind(&udp_daytime_server::handle_receive,
- this, boost::placeholders::_1));
- }
-
- void handle_receive(const asio::error_code& ec)
- {
- if (!ec)
- {
- using namespace std; // For time_t, time and ctime;
- time_t now = time(0);
- std::string message = ctime(&now);
-
- asio::error_code ignored_ec;
- socket_.send_to(asio::buffer(message),
- remote_endpoint_, 0, ignored_ec);
- }
-
- start_receive();
- }
-
- udp::socket socket_;
- udp::endpoint remote_endpoint_;
- boost::array<char, 1> recv_buffer_;
-};
-
-int main()
-{
- try
- {
- asio::io_context io_context;
-
- // Initialise the server before becoming a daemon. If the process is
- // started from a shell, this means any errors will be reported back to the
- // user.
- udp_daytime_server server(io_context);
-
- // Register signal handlers so that the daemon may be shut down. You may
- // also want to register for other signals, such as SIGHUP to trigger a
- // re-read of a configuration file.
- asio::signal_set signals(io_context, SIGINT, SIGTERM);
- signals.async_wait(
- boost::bind(&asio::io_context::stop, &io_context));
-
- // Inform the io_context that we are about to become a daemon. The
- // io_context cleans up any internal resources, such as threads, that may
- // interfere with forking.
- io_context.notify_fork(asio::io_context::fork_prepare);
-
- // Fork the process and have the parent exit. If the process was started
- // from a shell, this returns control to the user. Forking a new process is
- // also a prerequisite for the subsequent call to setsid().
- if (pid_t pid = fork())
- {
- if (pid > 0)
- {
- // We're in the parent process and need to exit.
- //
- // When the exit() function is used, the program terminates without
- // invoking local variables' destructors. Only global variables are
- // destroyed. As the io_context object is a local variable, this means
- // we do not have to call:
- //
- // io_context.notify_fork(asio::io_context::fork_parent);
- //
- // However, this line should be added before each call to exit() if
- // using a global io_context object. An additional call:
- //
- // io_context.notify_fork(asio::io_context::fork_prepare);
- //
- // should also precede the second fork().
- exit(0);
- }
- else
- {
- syslog(LOG_ERR | LOG_USER, "First fork failed: %m");
- return 1;
- }
- }
-
- // Make the process a new session leader. This detaches it from the
- // terminal.
- setsid();
-
- // A process inherits its working directory from its parent. This could be
- // on a mounted filesystem, which means that the running daemon would
- // prevent this filesystem from being unmounted. Changing to the root
- // directory avoids this problem.
- chdir("/");
-
- // The file mode creation mask is also inherited from the parent process.
- // We don't want to restrict the permissions on files created by the
- // daemon, so the mask is cleared.
- umask(0);
-
- // A second fork ensures the process cannot acquire a controlling terminal.
- if (pid_t pid = fork())
- {
- if (pid > 0)
- {
- exit(0);
- }
- else
- {
- syslog(LOG_ERR | LOG_USER, "Second fork failed: %m");
- return 1;
- }
- }
-
- // Close the standard streams. This decouples the daemon from the terminal
- // that started it.
- close(0);
- close(1);
- close(2);
-
- // We don't want the daemon to have any standard input.
- if (open("/dev/null", O_RDONLY) < 0)
- {
- syslog(LOG_ERR | LOG_USER, "Unable to open /dev/null: %m");
- return 1;
- }
-
- // Send standard output to a log file.
- const char* output = "/tmp/asio.daemon.out";
- const int flags = O_WRONLY | O_CREAT | O_APPEND;
- const mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
- if (open(output, flags, mode) < 0)
- {
- syslog(LOG_ERR | LOG_USER, "Unable to open output file %s: %m", output);
- return 1;
- }
-
- // Also send standard error to the same log file.
- if (dup(1) < 0)
- {
- syslog(LOG_ERR | LOG_USER, "Unable to dup output descriptor: %m");
- return 1;
- }
-
- // Inform the io_context that we have finished becoming a daemon. The
- // io_context uses this opportunity to create any internal file descriptors
- // that need to be private to the new process.
- io_context.notify_fork(asio::io_context::fork_child);
-
- // The io_context can now be used normally.
- syslog(LOG_INFO | LOG_USER, "Daemon started");
- io_context.run();
- syslog(LOG_INFO | LOG_USER, "Daemon stopped");
- }
- catch (std::exception& e)
- {
- syslog(LOG_ERR | LOG_USER, "Exception: %s", e.what());
- std::cerr << "Exception: " << e.what() << std::endl;
- }
-}
diff --git a/3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp b/3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp
deleted file mode 100644
index 9a54baedac4..00000000000
--- a/3rdparty/asio/src/examples/cpp03/fork/process_per_connection.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-//
-// process_per_connection.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <asio/io_context.hpp>
-#include <asio/ip/tcp.hpp>
-#include <asio/signal_set.hpp>
-#include <asio/write.hpp>
-#include <boost/array.hpp>
-#include <boost/bind/bind.hpp>
-#include <cstdlib>
-#include <iostream>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-using asio::ip::tcp;
-
-class server
-{
-public:
- server(asio::io_context& io_context, unsigned short port)
- : io_context_(io_context),
- signal_(io_context, SIGCHLD),
- acceptor_(io_context, tcp::endpoint(tcp::v4(), port)),
- socket_(io_context)
- {
- start_signal_wait();
- start_accept();
- }
-
-private:
- void start_signal_wait()
- {
- signal_.async_wait(boost::bind(&server::handle_signal_wait, this));
- }
-
- void handle_signal_wait()
- {
- // Only the parent process should check for this signal. We can determine
- // whether we are in the parent by checking if the acceptor is still open.
- if (acceptor_.is_open())
- {
- // Reap completed child processes so that we don't end up with zombies.
- int status = 0;
- while (waitpid(-1, &status, WNOHANG) > 0) {}
-
- start_signal_wait();
- }
- }
-
- void start_accept()
- {
- acceptor_.async_accept(socket_,
- boost::bind(&server::handle_accept, this, boost::placeholders::_1));
- }
-
- void handle_accept(const asio::error_code& ec)
- {
- if (!ec)
- {
- // Inform the io_context that we are about to fork. The io_context cleans
- // up any internal resources, such as threads, that may interfere with
- // forking.
- io_context_.notify_fork(asio::io_context::fork_prepare);
-
- if (fork() == 0)
- {
- // Inform the io_context that the fork is finished and that this is the
- // child process. The io_context uses this opportunity to create any
- // internal file descriptors that must be private to the new process.
- io_context_.notify_fork(asio::io_context::fork_child);
-
- // The child won't be accepting new connections, so we can close the
- // acceptor. It remains open in the parent.
- acceptor_.close();
-
- // The child process is not interested in processing the SIGCHLD signal.
- signal_.cancel();
-
- start_read();
- }
- else
- {
- // Inform the io_context that the fork is finished (or failed) and that
- // this is the parent process. The io_context uses this opportunity to
- // recreate any internal resources that were cleaned up during
- // preparation for the fork.
- io_context_.notify_fork(asio::io_context::fork_parent);
-
- socket_.close();
- start_accept();
- }
- }
- else
- {
- std::cerr << "Accept error: " << ec.message() << std::endl;
- start_accept();
- }
- }
-
- void start_read()
- {
- socket_.async_read_some(asio::buffer(data_),
- boost::bind(&server::handle_read, this,
- boost::placeholders::_1, boost::placeholders::_2));
- }
-
- void handle_read(const asio::error_code& ec, std::size_t length)
- {
- if (!ec)
- start_write(length);
- }
-
- void start_write(std::size_t length)
- {
- asio::async_write(socket_, asio::buffer(data_, length),
- boost::bind(&server::handle_write, this, boost::placeholders::_1));
- }
-
- void handle_write(const asio::error_code& ec)
- {
- if (!ec)
- start_read();
- }
-
- asio::io_context& io_context_;
- asio::signal_set signal_;
- tcp::acceptor acceptor_;
- tcp::socket socket_;
- boost::array<char, 1024> data_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: process_per_connection <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << std::endl;
- }
-}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/connection.cpp b/3rdparty/asio/src/examples/cpp03/http/server/connection.cpp
deleted file mode 100644
index f9bcad8671e..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/connection.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// connection.cpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "connection.hpp"
-#include <vector>
-#include <boost/bind/bind.hpp>
-#include "connection_manager.hpp"
-#include "request_handler.hpp"
-
-namespace http {
-namespace server {
-
-connection::connection(asio::io_context& io_context,
- connection_manager& manager, request_handler& handler)
- : socket_(io_context),
- connection_manager_(manager),
- request_handler_(handler)
-{
-}
-
-asio::ip::tcp::socket& connection::socket()
-{
- return socket_;
-}
-
-void connection::start()
-{
- socket_.async_read_some(asio::buffer(buffer_),
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
-}
-
-void connection::stop()
-{
- socket_.close();
-}
-
-void connection::handle_read(const asio::error_code& e,
- std::size_t bytes_transferred)
-{
- if (!e)
- {
- boost::tribool result;
- boost::tie(result, boost::tuples::ignore) = request_parser_.parse(
- request_, buffer_.data(), buffer_.data() + bytes_transferred);
-
- if (result)
- {
- request_handler_.handle_request(request_, reply_);
- asio::async_write(socket_, reply_.to_buffers(),
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- else if (!result)
- {
- reply_ = reply::stock_reply(reply::bad_request);
- asio::async_write(socket_, reply_.to_buffers(),
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- else
- {
- socket_.async_read_some(asio::buffer(buffer_),
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
- else if (e != asio::error::operation_aborted)
- {
- connection_manager_.stop(shared_from_this());
- }
-}
-
-void connection::handle_write(const asio::error_code& e)
-{
- if (!e)
- {
- // Initiate graceful connection closure.
- asio::error_code ignored_ec;
- socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec);
- }
-
- if (e != asio::error::operation_aborted)
- {
- connection_manager_.stop(shared_from_this());
- }
-}
-
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/connection.hpp b/3rdparty/asio/src/examples/cpp03/http/server/connection.hpp
deleted file mode 100644
index 2c842904471..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/connection.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// connection.hpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 HTTP_CONNECTION_HPP
-#define HTTP_CONNECTION_HPP
-
-#include <asio.hpp>
-#include <boost/array.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include "reply.hpp"
-#include "request.hpp"
-#include "request_handler.hpp"
-#include "request_parser.hpp"
-
-namespace http {
-namespace server {
-
-class connection_manager;
-
-/// Represents a single connection from a client.
-class connection
- : public boost::enable_shared_from_this<connection>,
- private boost::noncopyable
-{
-public:
- /// Construct a connection with the given io_context.
- explicit connection(asio::io_context& io_context,
- connection_manager& manager, request_handler& handler);
-
- /// Get the socket associated with the connection.
- asio::ip::tcp::socket& socket();
-
- /// Start the first asynchronous operation for the connection.
- void start();
-
- /// Stop all asynchronous operations associated with the connection.
- void stop();
-
-private:
- /// Handle completion of a read operation.
- void handle_read(const asio::error_code& e,
- std::size_t bytes_transferred);
-
- /// Handle completion of a write operation.
- void handle_write(const asio::error_code& e);
-
- /// Socket for the connection.
- asio::ip::tcp::socket socket_;
-
- /// The manager for this connection.
- connection_manager& connection_manager_;
-
- /// The handler used to process the incoming request.
- request_handler& request_handler_;
-
- /// Buffer for incoming data.
- boost::array<char, 8192> buffer_;
-
- /// The incoming request.
- request request_;
-
- /// The parser for the incoming request.
- request_parser request_parser_;
-
- /// The reply to be sent back to the client.
- reply reply_;
-};
-
-typedef boost::shared_ptr<connection> connection_ptr;
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_CONNECTION_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.cpp b/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.cpp
deleted file mode 100644
index bfcac68a6a4..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// connection_manager.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "connection_manager.hpp"
-#include <algorithm>
-#include <boost/bind/bind.hpp>
-
-namespace http {
-namespace server {
-
-void connection_manager::start(connection_ptr c)
-{
- connections_.insert(c);
- c->start();
-}
-
-void connection_manager::stop(connection_ptr c)
-{
- connections_.erase(c);
- c->stop();
-}
-
-void connection_manager::stop_all()
-{
- std::for_each(connections_.begin(), connections_.end(),
- boost::bind(&connection::stop, boost::placeholders::_1));
- connections_.clear();
-}
-
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.hpp b/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.hpp
deleted file mode 100644
index 723d26e770d..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/connection_manager.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// connection_manager.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 HTTP_CONNECTION_MANAGER_HPP
-#define HTTP_CONNECTION_MANAGER_HPP
-
-#include <set>
-#include <boost/noncopyable.hpp>
-#include "connection.hpp"
-
-namespace http {
-namespace server {
-
-/// Manages open connections so that they may be cleanly stopped when the server
-/// needs to shut down.
-class connection_manager
- : private boost::noncopyable
-{
-public:
- /// Add the specified connection to the manager and start it.
- void start(connection_ptr c);
-
- /// Stop the specified connection.
- void stop(connection_ptr c);
-
- /// Stop all connections.
- void stop_all();
-
-private:
- /// The managed connections.
- std::set<connection_ptr> connections_;
-};
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_CONNECTION_MANAGER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/header.hpp b/3rdparty/asio/src/examples/cpp03/http/server/header.hpp
deleted file mode 100644
index bccbf977a9e..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/header.hpp
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// header.hpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 HTTP_HEADER_HPP
-#define HTTP_HEADER_HPP
-
-#include <string>
-
-namespace http {
-namespace server {
-
-struct header
-{
- std::string name;
- std::string value;
-};
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_HEADER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/main.cpp b/3rdparty/asio/src/examples/cpp03/http/server/main.cpp
deleted file mode 100644
index f66cb447a5e..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/main.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// main.cpp
-// ~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <iostream>
-#include <string>
-#include <asio.hpp>
-#include <boost/bind/bind.hpp>
-#include "server.hpp"
-
-int main(int argc, char* argv[])
-{
- try
- {
- // Check command line arguments.
- if (argc != 4)
- {
- std::cerr << "Usage: http_server <address> <port> <doc_root>\n";
- std::cerr << " For IPv4, try:\n";
- std::cerr << " receiver 0.0.0.0 80 .\n";
- std::cerr << " For IPv6, try:\n";
- std::cerr << " receiver 0::0 80 .\n";
- return 1;
- }
-
- // Initialise the server.
- http::server::server s(argv[1], argv[2], argv[3]);
-
- // Run the server until stopped.
- s.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/mime_types.cpp b/3rdparty/asio/src/examples/cpp03/http/server/mime_types.cpp
deleted file mode 100644
index 7542c690012..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/mime_types.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// mime_types.cpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "mime_types.hpp"
-
-namespace http {
-namespace server {
-namespace mime_types {
-
-struct mapping
-{
- const char* extension;
- const char* mime_type;
-} mappings[] =
-{
- { "gif", "image/gif" },
- { "htm", "text/html" },
- { "html", "text/html" },
- { "jpg", "image/jpeg" },
- { "png", "image/png" },
- { 0, 0 } // Marks end of list.
-};
-
-std::string extension_to_type(const std::string& extension)
-{
- for (mapping* m = mappings; m->extension; ++m)
- {
- if (m->extension == extension)
- {
- return m->mime_type;
- }
- }
-
- return "text/plain";
-}
-
-} // namespace mime_types
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/mime_types.hpp b/3rdparty/asio/src/examples/cpp03/http/server/mime_types.hpp
deleted file mode 100644
index aef5676104e..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/mime_types.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// mime_types.hpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 HTTP_MIME_TYPES_HPP
-#define HTTP_MIME_TYPES_HPP
-
-#include <string>
-
-namespace http {
-namespace server {
-namespace mime_types {
-
-/// Convert a file extension into a MIME type.
-std::string extension_to_type(const std::string& extension);
-
-} // namespace mime_types
-} // namespace server
-} // namespace http
-
-#endif // HTTP_MIME_TYPES_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/reply.cpp b/3rdparty/asio/src/examples/cpp03/http/server/reply.cpp
deleted file mode 100644
index 70219748a86..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/reply.cpp
+++ /dev/null
@@ -1,256 +0,0 @@
-//
-// reply.cpp
-// ~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "reply.hpp"
-#include <string>
-#include <boost/lexical_cast.hpp>
-
-namespace http {
-namespace server {
-
-namespace status_strings {
-
-const std::string ok =
- "HTTP/1.0 200 OK\r\n";
-const std::string created =
- "HTTP/1.0 201 Created\r\n";
-const std::string accepted =
- "HTTP/1.0 202 Accepted\r\n";
-const std::string no_content =
- "HTTP/1.0 204 No Content\r\n";
-const std::string multiple_choices =
- "HTTP/1.0 300 Multiple Choices\r\n";
-const std::string moved_permanently =
- "HTTP/1.0 301 Moved Permanently\r\n";
-const std::string moved_temporarily =
- "HTTP/1.0 302 Moved Temporarily\r\n";
-const std::string not_modified =
- "HTTP/1.0 304 Not Modified\r\n";
-const std::string bad_request =
- "HTTP/1.0 400 Bad Request\r\n";
-const std::string unauthorized =
- "HTTP/1.0 401 Unauthorized\r\n";
-const std::string forbidden =
- "HTTP/1.0 403 Forbidden\r\n";
-const std::string not_found =
- "HTTP/1.0 404 Not Found\r\n";
-const std::string internal_server_error =
- "HTTP/1.0 500 Internal Server Error\r\n";
-const std::string not_implemented =
- "HTTP/1.0 501 Not Implemented\r\n";
-const std::string bad_gateway =
- "HTTP/1.0 502 Bad Gateway\r\n";
-const std::string service_unavailable =
- "HTTP/1.0 503 Service Unavailable\r\n";
-
-asio::const_buffer to_buffer(reply::status_type status)
-{
- switch (status)
- {
- case reply::ok:
- return asio::buffer(ok);
- case reply::created:
- return asio::buffer(created);
- case reply::accepted:
- return asio::buffer(accepted);
- case reply::no_content:
- return asio::buffer(no_content);
- case reply::multiple_choices:
- return asio::buffer(multiple_choices);
- case reply::moved_permanently:
- return asio::buffer(moved_permanently);
- case reply::moved_temporarily:
- return asio::buffer(moved_temporarily);
- case reply::not_modified:
- return asio::buffer(not_modified);
- case reply::bad_request:
- return asio::buffer(bad_request);
- case reply::unauthorized:
- return asio::buffer(unauthorized);
- case reply::forbidden:
- return asio::buffer(forbidden);
- case reply::not_found:
- return asio::buffer(not_found);
- case reply::internal_server_error:
- return asio::buffer(internal_server_error);
- case reply::not_implemented:
- return asio::buffer(not_implemented);
- case reply::bad_gateway:
- return asio::buffer(bad_gateway);
- case reply::service_unavailable:
- return asio::buffer(service_unavailable);
- default:
- return asio::buffer(internal_server_error);
- }
-}
-
-} // namespace status_strings
-
-namespace misc_strings {
-
-const char name_value_separator[] = { ':', ' ' };
-const char crlf[] = { '\r', '\n' };
-
-} // namespace misc_strings
-
-std::vector<asio::const_buffer> reply::to_buffers()
-{
- std::vector<asio::const_buffer> buffers;
- buffers.push_back(status_strings::to_buffer(status));
- for (std::size_t i = 0; i < headers.size(); ++i)
- {
- header& h = headers[i];
- buffers.push_back(asio::buffer(h.name));
- buffers.push_back(asio::buffer(misc_strings::name_value_separator));
- buffers.push_back(asio::buffer(h.value));
- buffers.push_back(asio::buffer(misc_strings::crlf));
- }
- buffers.push_back(asio::buffer(misc_strings::crlf));
- buffers.push_back(asio::buffer(content));
- return buffers;
-}
-
-namespace stock_replies {
-
-const char ok[] = "";
-const char created[] =
- "<html>"
- "<head><title>Created</title></head>"
- "<body><h1>201 Created</h1></body>"
- "</html>";
-const char accepted[] =
- "<html>"
- "<head><title>Accepted</title></head>"
- "<body><h1>202 Accepted</h1></body>"
- "</html>";
-const char no_content[] =
- "<html>"
- "<head><title>No Content</title></head>"
- "<body><h1>204 Content</h1></body>"
- "</html>";
-const char multiple_choices[] =
- "<html>"
- "<head><title>Multiple Choices</title></head>"
- "<body><h1>300 Multiple Choices</h1></body>"
- "</html>";
-const char moved_permanently[] =
- "<html>"
- "<head><title>Moved Permanently</title></head>"
- "<body><h1>301 Moved Permanently</h1></body>"
- "</html>";
-const char moved_temporarily[] =
- "<html>"
- "<head><title>Moved Temporarily</title></head>"
- "<body><h1>302 Moved Temporarily</h1></body>"
- "</html>";
-const char not_modified[] =
- "<html>"
- "<head><title>Not Modified</title></head>"
- "<body><h1>304 Not Modified</h1></body>"
- "</html>";
-const char bad_request[] =
- "<html>"
- "<head><title>Bad Request</title></head>"
- "<body><h1>400 Bad Request</h1></body>"
- "</html>";
-const char unauthorized[] =
- "<html>"
- "<head><title>Unauthorized</title></head>"
- "<body><h1>401 Unauthorized</h1></body>"
- "</html>";
-const char forbidden[] =
- "<html>"
- "<head><title>Forbidden</title></head>"
- "<body><h1>403 Forbidden</h1></body>"
- "</html>";
-const char not_found[] =
- "<html>"
- "<head><title>Not Found</title></head>"
- "<body><h1>404 Not Found</h1></body>"
- "</html>";
-const char internal_server_error[] =
- "<html>"
- "<head><title>Internal Server Error</title></head>"
- "<body><h1>500 Internal Server Error</h1></body>"
- "</html>";
-const char not_implemented[] =
- "<html>"
- "<head><title>Not Implemented</title></head>"
- "<body><h1>501 Not Implemented</h1></body>"
- "</html>";
-const char bad_gateway[] =
- "<html>"
- "<head><title>Bad Gateway</title></head>"
- "<body><h1>502 Bad Gateway</h1></body>"
- "</html>";
-const char service_unavailable[] =
- "<html>"
- "<head><title>Service Unavailable</title></head>"
- "<body><h1>503 Service Unavailable</h1></body>"
- "</html>";
-
-std::string to_string(reply::status_type status)
-{
- switch (status)
- {
- case reply::ok:
- return ok;
- case reply::created:
- return created;
- case reply::accepted:
- return accepted;
- case reply::no_content:
- return no_content;
- case reply::multiple_choices:
- return multiple_choices;
- case reply::moved_permanently:
- return moved_permanently;
- case reply::moved_temporarily:
- return moved_temporarily;
- case reply::not_modified:
- return not_modified;
- case reply::bad_request:
- return bad_request;
- case reply::unauthorized:
- return unauthorized;
- case reply::forbidden:
- return forbidden;
- case reply::not_found:
- return not_found;
- case reply::internal_server_error:
- return internal_server_error;
- case reply::not_implemented:
- return not_implemented;
- case reply::bad_gateway:
- return bad_gateway;
- case reply::service_unavailable:
- return service_unavailable;
- default:
- return internal_server_error;
- }
-}
-
-} // namespace stock_replies
-
-reply reply::stock_reply(reply::status_type status)
-{
- reply rep;
- rep.status = status;
- rep.content = stock_replies::to_string(status);
- rep.headers.resize(2);
- rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
- rep.headers[1].name = "Content-Type";
- rep.headers[1].value = "text/html";
- return rep;
-}
-
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/reply.hpp b/3rdparty/asio/src/examples/cpp03/http/server/reply.hpp
deleted file mode 100644
index c8f3f11040d..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/reply.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// reply.hpp
-// ~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 HTTP_REPLY_HPP
-#define HTTP_REPLY_HPP
-
-#include <string>
-#include <vector>
-#include <asio.hpp>
-#include "header.hpp"
-
-namespace http {
-namespace server {
-
-/// A reply to be sent to a client.
-struct reply
-{
- /// The status of the reply.
- enum status_type
- {
- ok = 200,
- created = 201,
- accepted = 202,
- no_content = 204,
- multiple_choices = 300,
- moved_permanently = 301,
- moved_temporarily = 302,
- not_modified = 304,
- bad_request = 400,
- unauthorized = 401,
- forbidden = 403,
- not_found = 404,
- internal_server_error = 500,
- not_implemented = 501,
- bad_gateway = 502,
- service_unavailable = 503
- } status;
-
- /// The headers to be included in the reply.
- std::vector<header> headers;
-
- /// The content to be sent in the reply.
- std::string content;
-
- /// Convert the reply into a vector of buffers. The buffers do not own the
- /// underlying memory blocks, therefore the reply object must remain valid and
- /// not be changed until the write operation has completed.
- std::vector<asio::const_buffer> to_buffers();
-
- /// Get a stock reply.
- static reply stock_reply(status_type status);
-};
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_REPLY_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/request_handler.cpp b/3rdparty/asio/src/examples/cpp03/http/server/request_handler.cpp
deleted file mode 100644
index d86632a9a02..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/request_handler.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-//
-// request_handler.cpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "request_handler.hpp"
-#include <fstream>
-#include <sstream>
-#include <string>
-#include <boost/lexical_cast.hpp>
-#include "mime_types.hpp"
-#include "reply.hpp"
-#include "request.hpp"
-
-namespace http {
-namespace server {
-
-request_handler::request_handler(const std::string& doc_root)
- : doc_root_(doc_root)
-{
-}
-
-void request_handler::handle_request(const request& req, reply& rep)
-{
- // Decode url to path.
- std::string request_path;
- if (!url_decode(req.uri, request_path))
- {
- rep = reply::stock_reply(reply::bad_request);
- return;
- }
-
- // Request path must be absolute and not contain "..".
- if (request_path.empty() || request_path[0] != '/'
- || request_path.find("..") != std::string::npos)
- {
- rep = reply::stock_reply(reply::bad_request);
- return;
- }
-
- // If path ends in slash (i.e. is a directory) then add "index.html".
- if (request_path[request_path.size() - 1] == '/')
- {
- request_path += "index.html";
- }
-
- // Determine the file extension.
- std::size_t last_slash_pos = request_path.find_last_of("/");
- std::size_t last_dot_pos = request_path.find_last_of(".");
- std::string extension;
- if (last_dot_pos != std::string::npos && last_dot_pos > last_slash_pos)
- {
- extension = request_path.substr(last_dot_pos + 1);
- }
-
- // Open the file to send back.
- std::string full_path = doc_root_ + request_path;
- std::ifstream is(full_path.c_str(), std::ios::in | std::ios::binary);
- if (!is)
- {
- rep = reply::stock_reply(reply::not_found);
- return;
- }
-
- // Fill out the reply to be sent to the client.
- rep.status = reply::ok;
- char buf[512];
- while (is.read(buf, sizeof(buf)).gcount() > 0)
- rep.content.append(buf, is.gcount());
- rep.headers.resize(2);
- rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
- rep.headers[1].name = "Content-Type";
- rep.headers[1].value = mime_types::extension_to_type(extension);
-}
-
-bool request_handler::url_decode(const std::string& in, std::string& out)
-{
- out.clear();
- out.reserve(in.size());
- for (std::size_t i = 0; i < in.size(); ++i)
- {
- if (in[i] == '%')
- {
- if (i + 3 <= in.size())
- {
- int value = 0;
- std::istringstream is(in.substr(i + 1, 2));
- if (is >> std::hex >> value)
- {
- out += static_cast<char>(value);
- i += 2;
- }
- else
- {
- return false;
- }
- }
- else
- {
- return false;
- }
- }
- else if (in[i] == '+')
- {
- out += ' ';
- }
- else
- {
- out += in[i];
- }
- }
- return true;
-}
-
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/request_handler.hpp b/3rdparty/asio/src/examples/cpp03/http/server/request_handler.hpp
deleted file mode 100644
index 413a69f49a5..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/request_handler.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// request_handler.hpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 HTTP_REQUEST_HANDLER_HPP
-#define HTTP_REQUEST_HANDLER_HPP
-
-#include <string>
-#include <boost/noncopyable.hpp>
-
-namespace http {
-namespace server {
-
-struct reply;
-struct request;
-
-/// The common handler for all incoming requests.
-class request_handler
- : private boost::noncopyable
-{
-public:
- /// Construct with a directory containing files to be served.
- explicit request_handler(const std::string& doc_root);
-
- /// Handle a request and produce a reply.
- void handle_request(const request& req, reply& rep);
-
-private:
- /// The directory containing the files to be served.
- std::string doc_root_;
-
- /// Perform URL-decoding on a string. Returns false if the encoding was
- /// invalid.
- static bool url_decode(const std::string& in, std::string& out);
-};
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_REQUEST_HANDLER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/server.cpp b/3rdparty/asio/src/examples/cpp03/http/server/server.cpp
deleted file mode 100644
index 2b7d11d3323..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/server.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// server.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "server.hpp"
-#include <boost/bind/bind.hpp>
-#include <signal.h>
-
-namespace http {
-namespace server {
-
-server::server(const std::string& address, const std::string& port,
- const std::string& doc_root)
- : io_context_(),
- signals_(io_context_),
- acceptor_(io_context_),
- connection_manager_(),
- new_connection_(),
- request_handler_(doc_root)
-{
- // Register to handle the signals that indicate when the server should exit.
- // It is safe to register for the same signal multiple times in a program,
- // provided all registration for the specified signal is made through Asio.
- signals_.add(SIGINT);
- signals_.add(SIGTERM);
-#if defined(SIGQUIT)
- signals_.add(SIGQUIT);
-#endif // defined(SIGQUIT)
- signals_.async_wait(boost::bind(&server::handle_stop, this));
-
- // Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR).
- asio::ip::tcp::resolver resolver(io_context_);
- asio::ip::tcp::endpoint endpoint =
- *resolver.resolve(address, port).begin();
- acceptor_.open(endpoint.protocol());
- acceptor_.set_option(asio::ip::tcp::acceptor::reuse_address(true));
- acceptor_.bind(endpoint);
- acceptor_.listen();
-
- start_accept();
-}
-
-void server::run()
-{
- // The io_context::run() call will block until all asynchronous operations
- // have finished. While the server is running, there is always at least one
- // asynchronous operation outstanding: the asynchronous accept call waiting
- // for new incoming connections.
- io_context_.run();
-}
-
-void server::start_accept()
-{
- new_connection_.reset(new connection(io_context_,
- connection_manager_, request_handler_));
- acceptor_.async_accept(new_connection_->socket(),
- boost::bind(&server::handle_accept, this,
- asio::placeholders::error));
-}
-
-void server::handle_accept(const asio::error_code& e)
-{
- // Check whether the server was stopped by a signal before this completion
- // handler had a chance to run.
- if (!acceptor_.is_open())
- {
- return;
- }
-
- if (!e)
- {
- connection_manager_.start(new_connection_);
- }
-
- start_accept();
-}
-
-void server::handle_stop()
-{
- // The server is stopped by cancelling all outstanding asynchronous
- // operations. Once all operations have finished the io_context::run() call
- // will exit.
- acceptor_.close();
- connection_manager_.stop_all();
-}
-
-} // namespace server
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/server.hpp b/3rdparty/asio/src/examples/cpp03/http/server/server.hpp
deleted file mode 100644
index d5d6ee4f343..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server/server.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// server.hpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 HTTP_SERVER_HPP
-#define HTTP_SERVER_HPP
-
-#include <asio.hpp>
-#include <string>
-#include <boost/noncopyable.hpp>
-#include "connection.hpp"
-#include "connection_manager.hpp"
-#include "request_handler.hpp"
-
-namespace http {
-namespace server {
-
-/// The top-level class of the HTTP server.
-class server
- : private boost::noncopyable
-{
-public:
- /// Construct the server to listen on the specified TCP address and port, and
- /// serve up files from the given directory.
- explicit server(const std::string& address, const std::string& port,
- const std::string& doc_root);
-
- /// Run the server's io_context loop.
- void run();
-
-private:
- /// Initiate an asynchronous accept operation.
- void start_accept();
-
- /// Handle completion of an asynchronous accept operation.
- void handle_accept(const asio::error_code& e);
-
- /// Handle a request to stop the server.
- void handle_stop();
-
- /// The io_context used to perform asynchronous operations.
- asio::io_context io_context_;
-
- /// The signal_set is used to register for process termination notifications.
- asio::signal_set signals_;
-
- /// Acceptor used to listen for incoming connections.
- asio::ip::tcp::acceptor acceptor_;
-
- /// The connection manager which owns all live connections.
- connection_manager connection_manager_;
-
- /// The next connection to be accepted.
- connection_ptr new_connection_;
-
- /// The handler for all incoming requests.
- request_handler request_handler_;
-};
-
-} // namespace server
-} // namespace http
-
-#endif // HTTP_SERVER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/connection.cpp b/3rdparty/asio/src/examples/cpp03/http/server2/connection.cpp
deleted file mode 100644
index 08a99dbaf31..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server2/connection.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// connection.cpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "connection.hpp"
-#include <vector>
-#include <boost/bind/bind.hpp>
-#include "request_handler.hpp"
-
-namespace http {
-namespace server2 {
-
-connection::connection(asio::io_context& io_context,
- request_handler& handler)
- : socket_(io_context),
- request_handler_(handler)
-{
-}
-
-asio::ip::tcp::socket& connection::socket()
-{
- return socket_;
-}
-
-void connection::start()
-{
- socket_.async_read_some(asio::buffer(buffer_),
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
-}
-
-void connection::handle_read(const asio::error_code& e,
- std::size_t bytes_transferred)
-{
- if (!e)
- {
- boost::tribool result;
- boost::tie(result, boost::tuples::ignore) = request_parser_.parse(
- request_, buffer_.data(), buffer_.data() + bytes_transferred);
-
- if (result)
- {
- request_handler_.handle_request(request_, reply_);
- asio::async_write(socket_, reply_.to_buffers(),
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- else if (!result)
- {
- reply_ = reply::stock_reply(reply::bad_request);
- asio::async_write(socket_, reply_.to_buffers(),
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- else
- {
- socket_.async_read_some(asio::buffer(buffer_),
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
-
- // If an error occurs then no new asynchronous operations are started. This
- // means that all shared_ptr references to the connection object will
- // disappear and the object will be destroyed automatically after this
- // handler returns. The connection class's destructor closes the socket.
-}
-
-void connection::handle_write(const asio::error_code& e)
-{
- if (!e)
- {
- // Initiate graceful connection closure.
- asio::error_code ignored_ec;
- socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec);
- }
-
- // No new asynchronous operations are started. This means that all shared_ptr
- // references to the connection object will disappear and the object will be
- // destroyed automatically after this handler returns. The connection class's
- // destructor closes the socket.
-}
-
-} // namespace server2
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/connection.cpp b/3rdparty/asio/src/examples/cpp03/http/server3/connection.cpp
deleted file mode 100644
index f46b01bc373..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server3/connection.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// connection.cpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "connection.hpp"
-#include <vector>
-#include <boost/bind/bind.hpp>
-#include "request_handler.hpp"
-
-namespace http {
-namespace server3 {
-
-connection::connection(asio::io_context& io_context,
- request_handler& handler)
- : strand_(asio::make_strand(io_context)),
- socket_(strand_),
- request_handler_(handler)
-{
-}
-
-asio::ip::tcp::socket& connection::socket()
-{
- return socket_;
-}
-
-void connection::start()
-{
- socket_.async_read_some(asio::buffer(buffer_),
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
-}
-
-void connection::handle_read(const asio::error_code& e,
- std::size_t bytes_transferred)
-{
- if (!e)
- {
- boost::tribool result;
- boost::tie(result, boost::tuples::ignore) = request_parser_.parse(
- request_, buffer_.data(), buffer_.data() + bytes_transferred);
-
- if (result)
- {
- request_handler_.handle_request(request_, reply_);
- asio::async_write(socket_, reply_.to_buffers(),
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- else if (!result)
- {
- reply_ = reply::stock_reply(reply::bad_request);
- asio::async_write(socket_, reply_.to_buffers(),
- boost::bind(&connection::handle_write, shared_from_this(),
- asio::placeholders::error));
- }
- else
- {
- socket_.async_read_some(asio::buffer(buffer_),
- boost::bind(&connection::handle_read, shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
-
- // If an error occurs then no new asynchronous operations are started. This
- // means that all shared_ptr references to the connection object will
- // disappear and the object will be destroyed automatically after this
- // handler returns. The connection class's destructor closes the socket.
-}
-
-void connection::handle_write(const asio::error_code& e)
-{
- if (!e)
- {
- // Initiate graceful connection closure.
- asio::error_code ignored_ec;
- socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec);
- }
-
- // No new asynchronous operations are started. This means that all shared_ptr
- // references to the connection object will disappear and the object will be
- // destroyed automatically after this handler returns. The connection class's
- // destructor closes the socket.
-}
-
-} // namespace server3
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/request.hpp b/3rdparty/asio/src/examples/cpp03/http/server4/request.hpp
deleted file mode 100644
index c3642652bcc..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server4/request.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// request.hpp
-// ~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 HTTP_SERVER4_REQUEST_HPP
-#define HTTP_SERVER4_REQUEST_HPP
-
-#include <string>
-#include <vector>
-#include "header.hpp"
-
-namespace http {
-namespace server4 {
-
-/// A request received from a client.
-struct request
-{
- /// The request method, e.g. "GET", "POST".
- std::string method;
-
- /// The requested URI, such as a path to a file.
- std::string uri;
-
- /// Major version number, usually 1.
- int http_version_major;
-
- /// Minor version number, usually 0 or 1.
- int http_version_minor;
-
- /// The headers included with the request.
- std::vector<header> headers;
-
- /// The optional content sent with the request.
- std::string content;
-};
-
-} // namespace server4
-} // namespace http
-
-#endif // HTTP_SERVER4_REQUEST_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.cpp b/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.cpp
deleted file mode 100644
index 30dad0327fe..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-//
-// request_parser.cpp
-// ~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "request_parser.hpp"
-#include <algorithm>
-#include <cctype>
-#include <boost/lexical_cast.hpp>
-#include "request.hpp"
-
-namespace http {
-namespace server4 {
-
-// Enable the pseudo-keywords reenter, yield and fork.
-#include <asio/yield.hpp>
-
-std::string request_parser::content_length_name_ = "Content-Length";
-
-boost::tribool request_parser::consume(request& req, char c)
-{
- reenter (this)
- {
- req.method.clear();
- req.uri.clear();
- req.http_version_major = 0;
- req.http_version_minor = 0;
- req.headers.clear();
- req.content.clear();
- content_length_ = 0;
-
- // Request method.
- while (is_char(c) && !is_ctl(c) && !is_tspecial(c) && c != ' ')
- {
- req.method.push_back(c);
- yield return boost::indeterminate;
- }
- if (req.method.empty())
- return false;
-
- // Space.
- if (c != ' ') return false;
- yield return boost::indeterminate;
-
- // URI.
- while (!is_ctl(c) && c != ' ')
- {
- req.uri.push_back(c);
- yield return boost::indeterminate;
- }
- if (req.uri.empty()) return false;
-
- // Space.
- if (c != ' ') return false;
- yield return boost::indeterminate;
-
- // HTTP protocol identifier.
- if (c != 'H') return false;
- yield return boost::indeterminate;
- if (c != 'T') return false;
- yield return boost::indeterminate;
- if (c != 'T') return false;
- yield return boost::indeterminate;
- if (c != 'P') return false;
- yield return boost::indeterminate;
-
- // Slash.
- if (c != '/') return false;
- yield return boost::indeterminate;
-
- // Major version number.
- if (!is_digit(c)) return false;
- while (is_digit(c))
- {
- req.http_version_major = req.http_version_major * 10 + c - '0';
- yield return boost::indeterminate;
- }
-
- // Dot.
- if (c != '.') return false;
- yield return boost::indeterminate;
-
- // Minor version number.
- if (!is_digit(c)) return false;
- while (is_digit(c))
- {
- req.http_version_minor = req.http_version_minor * 10 + c - '0';
- yield return boost::indeterminate;
- }
-
- // CRLF.
- if (c != '\r') return false;
- yield return boost::indeterminate;
- if (c != '\n') return false;
- yield return boost::indeterminate;
-
- // Headers.
- while ((is_char(c) && !is_ctl(c) && !is_tspecial(c) && c != '\r')
- || (c == ' ' || c == '\t'))
- {
- if (c == ' ' || c == '\t')
- {
- // Leading whitespace. Must be continuation of previous header's value.
- if (req.headers.empty()) return false;
- while (c == ' ' || c == '\t')
- yield return boost::indeterminate;
- }
- else
- {
- // Start the next header.
- req.headers.push_back(header());
-
- // Header name.
- while (is_char(c) && !is_ctl(c) && !is_tspecial(c) && c != ':')
- {
- req.headers.back().name.push_back(c);
- yield return boost::indeterminate;
- }
-
- // Colon and space separates the header name from the header value.
- if (c != ':') return false;
- yield return boost::indeterminate;
- if (c != ' ') return false;
- yield return boost::indeterminate;
- }
-
- // Header value.
- while (is_char(c) && !is_ctl(c) && c != '\r')
- {
- req.headers.back().value.push_back(c);
- yield return boost::indeterminate;
- }
-
- // CRLF.
- if (c != '\r') return false;
- yield return boost::indeterminate;
- if (c != '\n') return false;
- yield return boost::indeterminate;
- }
-
- // CRLF.
- if (c != '\r') return false;
- yield return boost::indeterminate;
- if (c != '\n') return false;
-
- // Check for optional Content-Length header.
- for (std::size_t i = 0; i < req.headers.size(); ++i)
- {
- if (headers_equal(req.headers[i].name, content_length_name_))
- {
- try
- {
- content_length_ =
- boost::lexical_cast<std::size_t>(req.headers[i].value);
- }
- catch (boost::bad_lexical_cast&)
- {
- return false;
- }
- }
- }
-
- // Content.
- while (req.content.size() < content_length_)
- {
- yield return boost::indeterminate;
- req.content.push_back(c);
- }
- }
-
- return true;
-}
-
-// Disable the pseudo-keywords reenter, yield and fork.
-#include <asio/unyield.hpp>
-
-bool request_parser::is_char(int c)
-{
- return c >= 0 && c <= 127;
-}
-
-bool request_parser::is_ctl(int c)
-{
- return (c >= 0 && c <= 31) || (c == 127);
-}
-
-bool request_parser::is_tspecial(int c)
-{
- switch (c)
- {
- case '(': case ')': case '<': case '>': case '@':
- case ',': case ';': case ':': case '\\': case '"':
- case '/': case '[': case ']': case '?': case '=':
- case '{': case '}': case ' ': case '\t':
- return true;
- default:
- return false;
- }
-}
-
-bool request_parser::is_digit(int c)
-{
- return c >= '0' && c <= '9';
-}
-
-bool request_parser::tolower_compare(char a, char b)
-{
- return std::tolower(a) == std::tolower(b);
-}
-
-bool request_parser::headers_equal(const std::string& a, const std::string& b)
-{
- if (a.length() != b.length())
- return false;
-
- return std::equal(a.begin(), a.end(), b.begin(),
- &request_parser::tolower_compare);
-}
-
-} // namespace server4
-} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.hpp b/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.hpp
deleted file mode 100644
index 57c435251c8..00000000000
--- a/3rdparty/asio/src/examples/cpp03/http/server4/request_parser.hpp
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// request_parser.hpp
-// ~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 HTTP_SERVER4_REQUEST_PARSER_HPP
-#define HTTP_SERVER4_REQUEST_PARSER_HPP
-
-#include <string>
-#include <boost/logic/tribool.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <asio/coroutine.hpp>
-
-namespace http {
-namespace server4 {
-
-struct request;
-
-/// Parser for incoming requests.
-class request_parser : asio::coroutine
-{
-public:
- /// Parse some data. The tribool return value is true when a complete request
- /// has been parsed, false if the data is invalid, indeterminate when more
- /// data is required. The InputIterator return value indicates how much of the
- /// input has been consumed.
- template <typename InputIterator>
- boost::tuple<boost::tribool, InputIterator> parse(request& req,
- InputIterator begin, InputIterator end)
- {
- while (begin != end)
- {
- boost::tribool result = consume(req, *begin++);
- if (result || !result)
- return boost::make_tuple(result, begin);
- }
- boost::tribool result = boost::indeterminate;
- return boost::make_tuple(result, begin);
- }
-
-private:
- /// The name of the content length header.
- static std::string content_length_name_;
-
- /// Content length as decoded from headers. Defaults to 0.
- std::size_t content_length_;
-
- /// Handle the next character of input.
- boost::tribool consume(request& req, char input);
-
- /// Check if a byte is an HTTP character.
- static bool is_char(int c);
-
- /// Check if a byte is an HTTP control character.
- static bool is_ctl(int c);
-
- /// Check if a byte is defined as an HTTP tspecial character.
- static bool is_tspecial(int c);
-
- /// Check if a byte is a digit.
- static bool is_digit(int c);
-
- /// Check if two characters are equal, without regard to case.
- static bool tolower_compare(char a, char b);
-
- /// Check whether the two request header names match.
- bool headers_equal(const std::string& a, const std::string& b);
-};
-
-} // namespace server4
-} // namespace http
-
-#endif // HTTP_SERVER4_REQUEST_PARSER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp b/3rdparty/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp
deleted file mode 100644
index 602d7b6f010..00000000000
--- a/3rdparty/asio/src/examples/cpp03/invocation/prioritised_handlers.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-//
-// prioritised_handlers.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "asio.hpp"
-#include <boost/function.hpp>
-#include <iostream>
-#include <queue>
-
-using asio::ip::tcp;
-
-class handler_priority_queue : public asio::execution_context
-{
-public:
- void add(int priority, boost::function<void()> function)
- {
- handlers_.push(queued_handler(priority, function));
- }
-
- void execute_all()
- {
- while (!handlers_.empty())
- {
- queued_handler handler = handlers_.top();
- handler.execute();
- handlers_.pop();
- }
- }
-
- class executor
- {
- public:
- executor(handler_priority_queue& q, int p)
- : context_(q), priority_(p)
- {
- }
-
- handler_priority_queue& context() const
- {
- return context_;
- }
-
- template <typename Function, typename Allocator>
- void dispatch(const Function& f, const Allocator&) const
- {
- context_.add(priority_, f);
- }
-
- template <typename Function, typename Allocator>
- void post(const Function& f, const Allocator&) const
- {
- context_.add(priority_, f);
- }
-
- template <typename Function, typename Allocator>
- void defer(const Function& f, const Allocator&) const
- {
- context_.add(priority_, f);
- }
-
- void on_work_started() const {}
- void on_work_finished() const {}
-
- bool operator==(const executor& other) const
- {
- return &context_ == &other.context_ && priority_ == other.priority_;
- }
-
- bool operator!=(const executor& other) const
- {
- return !operator==(other);
- }
-
- private:
- handler_priority_queue& context_;
- int priority_;
- };
-
- template <typename Handler>
- asio::executor_binder<Handler, executor>
- wrap(int priority, Handler handler)
- {
- return asio::bind_executor(executor(*this, priority), handler);
- }
-
-private:
- class queued_handler
- {
- public:
- queued_handler(int p, boost::function<void()> f)
- : priority_(p), function_(f)
- {
- }
-
- void execute()
- {
- function_();
- }
-
- friend bool operator<(const queued_handler& a,
- const queued_handler& b)
- {
- return a.priority_ < b.priority_;
- }
-
- private:
- int priority_;
- boost::function<void()> function_;
- };
-
- std::priority_queue<queued_handler> handlers_;
-};
-
-//----------------------------------------------------------------------
-
-void high_priority_handler(const asio::error_code& /*ec*/)
-{
- std::cout << "High priority handler\n";
-}
-
-void middle_priority_handler(const asio::error_code& /*ec*/)
-{
- std::cout << "Middle priority handler\n";
-}
-
-void low_priority_handler()
-{
- std::cout << "Low priority handler\n";
-}
-
-int main()
-{
- asio::io_context io_context;
-
- handler_priority_queue pri_queue;
-
- // Post a completion handler to be run immediately.
- asio::post(io_context, pri_queue.wrap(0, low_priority_handler));
-
- // Start an asynchronous accept that will complete immediately.
- tcp::endpoint endpoint(asio::ip::address_v4::loopback(), 0);
- tcp::acceptor acceptor(io_context, endpoint);
- tcp::socket server_socket(io_context);
- acceptor.async_accept(server_socket,
- pri_queue.wrap(100, high_priority_handler));
- tcp::socket client_socket(io_context);
- client_socket.connect(acceptor.local_endpoint());
-
- // Set a deadline timer to expire immediately.
- asio::steady_timer timer(io_context);
- timer.expires_at(asio::steady_timer::time_point::min());
- timer.async_wait(pri_queue.wrap(42, middle_priority_handler));
-
- while (io_context.run_one())
- {
- // The custom invocation hook adds the handlers to the priority queue
- // rather than executing them from within the poll_one() call.
- while (io_context.poll_one())
- ;
-
- pri_queue.execute_all();
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/iostreams/http_client.cpp b/3rdparty/asio/src/examples/cpp03/iostreams/http_client.cpp
deleted file mode 100644
index 52ed241cb9f..00000000000
--- a/3rdparty/asio/src/examples/cpp03/iostreams/http_client.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// http_client.cpp
-// ~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <iostream>
-#include <istream>
-#include <ostream>
-#include <string>
-#include <asio/ip/tcp.hpp>
-
-using asio::ip::tcp;
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cout << "Usage: http_client <server> <path>\n";
- std::cout << "Example:\n";
- std::cout << " http_client www.boost.org /LICENSE_1_0.txt\n";
- return 1;
- }
-
- asio::ip::tcp::iostream s;
-
- // The entire sequence of I/O operations must complete within 60 seconds.
- // If an expiry occurs, the socket is automatically closed and the stream
- // becomes bad.
- s.expires_after(asio::chrono::seconds(60));
-
- // Establish a connection to the server.
- s.connect(argv[1], "http");
- if (!s)
- {
- std::cout << "Unable to connect: " << s.error().message() << "\n";
- return 1;
- }
-
- // Send the request. We specify the "Connection: close" header so that the
- // server will close the socket after transmitting the response. This will
- // allow us to treat all data up until the EOF as the content.
- s << "GET " << argv[2] << " HTTP/1.0\r\n";
- s << "Host: " << argv[1] << "\r\n";
- s << "Accept: */*\r\n";
- s << "Connection: close\r\n\r\n";
-
- // By default, the stream is tied with itself. This means that the stream
- // automatically flush the buffered output before attempting a read. It is
- // not necessary not explicitly flush the stream at this point.
-
- // Check that response is OK.
- std::string http_version;
- s >> http_version;
- unsigned int status_code;
- s >> status_code;
- std::string status_message;
- std::getline(s, status_message);
- if (!s || http_version.substr(0, 5) != "HTTP/")
- {
- std::cout << "Invalid response\n";
- return 1;
- }
- if (status_code != 200)
- {
- std::cout << "Response returned with status code " << status_code << "\n";
- return 1;
- }
-
- // Process the response headers, which are terminated by a blank line.
- std::string header;
- while (std::getline(s, header) && header != "\r")
- std::cout << header << "\n";
- std::cout << "\n";
-
- // Write the remaining data to output.
- std::cout << s.rdbuf();
- }
- catch (std::exception& e)
- {
- std::cout << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/local/connect_pair.cpp b/3rdparty/asio/src/examples/cpp03/local/connect_pair.cpp
deleted file mode 100644
index a6cd4dd757e..00000000000
--- a/3rdparty/asio/src/examples/cpp03/local/connect_pair.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-//
-// connect_pair.cpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <iostream>
-#include <string>
-#include <cctype>
-#include <asio.hpp>
-#include <boost/array.hpp>
-#include <boost/bind/bind.hpp>
-
-#if defined(ASIO_HAS_LOCAL_SOCKETS)
-
-using asio::local::stream_protocol;
-
-class uppercase_filter
-{
-public:
- uppercase_filter(asio::io_context& io_context)
- : socket_(io_context)
- {
- }
-
- stream_protocol::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- // Wait for request.
- socket_.async_read_some(asio::buffer(data_),
- boost::bind(&uppercase_filter::handle_read,
- this, asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
-
-private:
- void handle_read(const asio::error_code& ec, std::size_t size)
- {
- if (!ec)
- {
- // Compute result.
- for (std::size_t i = 0; i < size; ++i)
- data_[i] = std::toupper(data_[i]);
-
- // Send result.
- asio::async_write(socket_, asio::buffer(data_, size),
- boost::bind(&uppercase_filter::handle_write,
- this, asio::placeholders::error));
- }
- else
- {
- throw asio::system_error(ec);
- }
- }
-
- void handle_write(const asio::error_code& ec)
- {
- if (!ec)
- {
- // Wait for request.
- socket_.async_read_some(asio::buffer(data_),
- boost::bind(&uppercase_filter::handle_read,
- this, asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- throw asio::system_error(ec);
- }
- }
-
- stream_protocol::socket socket_;
- boost::array<char, 512> data_;
-};
-
-void run(asio::io_context* io_context)
-{
- try
- {
- io_context->run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception in thread: " << e.what() << "\n";
- std::exit(1);
- }
-}
-
-int main()
-{
- try
- {
- asio::io_context io_context;
-
- // Create filter and establish a connection to it.
- uppercase_filter filter(io_context);
- stream_protocol::socket socket(io_context);
- asio::local::connect_pair(socket, filter.socket());
- filter.start();
-
- // The io_context runs in a background thread to perform filtering.
- asio::thread thread(boost::bind(run, &io_context));
-
- for (;;)
- {
- // Collect request from user.
- std::cout << "Enter a string: ";
- std::string request;
- std::getline(std::cin, request);
-
- // Send request to filter.
- asio::write(socket, asio::buffer(request));
-
- // Wait for reply from filter.
- std::vector<char> reply(request.size());
- asio::read(socket, asio::buffer(reply));
-
- // Show reply to user.
- std::cout << "Result: ";
- std::cout.write(&reply[0], request.size());
- std::cout << std::endl;
- }
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- std::exit(1);
- }
-}
-
-#else // defined(ASIO_HAS_LOCAL_SOCKETS)
-# error Local sockets not available on this platform.
-#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp03/local/iostream_client.cpp b/3rdparty/asio/src/examples/cpp03/local/iostream_client.cpp
deleted file mode 100644
index 8c6274a70ad..00000000000
--- a/3rdparty/asio/src/examples/cpp03/local/iostream_client.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// stream_client.cpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstring>
-#include <iostream>
-#include "asio.hpp"
-
-#if defined(ASIO_HAS_LOCAL_SOCKETS)
-
-using asio::local::stream_protocol;
-
-enum { max_length = 1024 };
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: iostream_client <file>\n";
- return 1;
- }
-
- stream_protocol::endpoint ep(argv[1]);
- stream_protocol::iostream s(ep);
- if (!s)
- {
- std::cerr << "Unable to connect: " << s.error().message() << std::endl;
- return 1;
- }
-
- using namespace std; // For strlen.
- std::cout << "Enter message: ";
- char request[max_length];
- std::cin.getline(request, max_length);
- size_t length = strlen(request);
- s << request;
-
- char reply[max_length];
- s.read(reply, length);
- std::cout << "Reply is: ";
- std::cout.write(reply, length);
- std::cout << "\n";
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
-
-#else // defined(ASIO_HAS_LOCAL_SOCKETS)
-# error Local sockets not available on this platform.
-#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp03/local/stream_client.cpp b/3rdparty/asio/src/examples/cpp03/local/stream_client.cpp
deleted file mode 100644
index b5ef9e67940..00000000000
--- a/3rdparty/asio/src/examples/cpp03/local/stream_client.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// stream_client.cpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <cstring>
-#include <iostream>
-#include "asio.hpp"
-
-#if defined(ASIO_HAS_LOCAL_SOCKETS)
-
-using asio::local::stream_protocol;
-
-enum { max_length = 1024 };
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: stream_client <file>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- stream_protocol::socket s(io_context);
- s.connect(stream_protocol::endpoint(argv[1]));
-
- using namespace std; // For strlen.
- std::cout << "Enter message: ";
- char request[max_length];
- std::cin.getline(request, max_length);
- size_t request_length = strlen(request);
- asio::write(s, asio::buffer(request, request_length));
-
- char reply[max_length];
- size_t reply_length = asio::read(s,
- asio::buffer(reply, request_length));
- std::cout << "Reply is: ";
- std::cout.write(reply, reply_length);
- std::cout << "\n";
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
-
-#else // defined(ASIO_HAS_LOCAL_SOCKETS)
-# error Local sockets not available on this platform.
-#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp03/local/stream_server.cpp b/3rdparty/asio/src/examples/cpp03/local/stream_server.cpp
deleted file mode 100644
index de255ef1d55..00000000000
--- a/3rdparty/asio/src/examples/cpp03/local/stream_server.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-//
-// stream_server.cpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdio>
-#include <iostream>
-#include <boost/array.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/shared_ptr.hpp>
-#include "asio.hpp"
-
-#if defined(ASIO_HAS_LOCAL_SOCKETS)
-
-using asio::local::stream_protocol;
-
-class session
- : public boost::enable_shared_from_this<session>
-{
-public:
- session(asio::io_context& io_context)
- : socket_(io_context)
- {
- }
-
- stream_protocol::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- socket_.async_read_some(asio::buffer(data_),
- boost::bind(&session::handle_read,
- shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
-
- void handle_read(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- asio::async_write(socket_,
- asio::buffer(data_, bytes_transferred),
- boost::bind(&session::handle_write,
- shared_from_this(),
- asio::placeholders::error));
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_read_some(asio::buffer(data_),
- boost::bind(&session::handle_read,
- shared_from_this(),
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
-
-private:
- // The socket used to communicate with the client.
- stream_protocol::socket socket_;
-
- // Buffer used to store data received from the client.
- boost::array<char, 1024> data_;
-};
-
-typedef boost::shared_ptr<session> session_ptr;
-
-class server
-{
-public:
- server(asio::io_context& io_context, const std::string& file)
- : io_context_(io_context),
- acceptor_(io_context, stream_protocol::endpoint(file))
- {
- session_ptr new_session(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(session_ptr new_session,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_session->start();
- }
-
- new_session.reset(new session(io_context_));
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
-private:
- asio::io_context& io_context_;
- stream_protocol::acceptor acceptor_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: stream_server <file>\n";
- std::cerr << "*** WARNING: existing file is removed ***\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- std::remove(argv[1]);
- server s(io_context, argv[1]);
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
-
-#else // defined(ASIO_HAS_LOCAL_SOCKETS)
-# error Local sockets not available on this platform.
-#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp03/multicast/receiver.cpp b/3rdparty/asio/src/examples/cpp03/multicast/receiver.cpp
deleted file mode 100644
index 42ca661cea3..00000000000
--- a/3rdparty/asio/src/examples/cpp03/multicast/receiver.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// receiver.cpp
-// ~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <iostream>
-#include <string>
-#include "asio.hpp"
-#include "boost/bind/bind.hpp"
-
-const short multicast_port = 30001;
-
-class receiver
-{
-public:
- receiver(asio::io_context& io_context,
- const asio::ip::address& listen_address,
- const asio::ip::address& multicast_address)
- : socket_(io_context)
- {
- // Create the socket so that multiple may be bound to the same address.
- asio::ip::udp::endpoint listen_endpoint(
- listen_address, multicast_port);
- socket_.open(listen_endpoint.protocol());
- socket_.set_option(asio::ip::udp::socket::reuse_address(true));
- socket_.bind(listen_endpoint);
-
- // Join the multicast group.
- socket_.set_option(
- asio::ip::multicast::join_group(multicast_address));
-
- socket_.async_receive_from(
- asio::buffer(data_, max_length), sender_endpoint_,
- boost::bind(&receiver::handle_receive_from, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
-
- void handle_receive_from(const asio::error_code& error,
- size_t bytes_recvd)
- {
- if (!error)
- {
- std::cout.write(data_, bytes_recvd);
- std::cout << std::endl;
-
- socket_.async_receive_from(
- asio::buffer(data_, max_length), sender_endpoint_,
- boost::bind(&receiver::handle_receive_from, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- }
-
-private:
- asio::ip::udp::socket socket_;
- asio::ip::udp::endpoint sender_endpoint_;
- enum { max_length = 1024 };
- char data_[max_length];
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: receiver <listen_address> <multicast_address>\n";
- std::cerr << " For IPv4, try:\n";
- std::cerr << " receiver 0.0.0.0 239.255.0.1\n";
- std::cerr << " For IPv6, try:\n";
- std::cerr << " receiver 0::0 ff31::8000:1234\n";
- return 1;
- }
-
- asio::io_context io_context;
- receiver r(io_context,
- asio::ip::make_address(argv[1]),
- asio::ip::make_address(argv[2]));
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/multicast/sender.cpp b/3rdparty/asio/src/examples/cpp03/multicast/sender.cpp
deleted file mode 100644
index a20470c96b6..00000000000
--- a/3rdparty/asio/src/examples/cpp03/multicast/sender.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// sender.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <iostream>
-#include <sstream>
-#include <string>
-#include "asio.hpp"
-#include "boost/bind/bind.hpp"
-
-const short multicast_port = 30001;
-const int max_message_count = 10;
-
-class sender
-{
-public:
- sender(asio::io_context& io_context,
- const asio::ip::address& multicast_address)
- : endpoint_(multicast_address, multicast_port),
- socket_(io_context, endpoint_.protocol()),
- timer_(io_context),
- message_count_(0)
- {
- std::ostringstream os;
- os << "Message " << message_count_++;
- message_ = os.str();
-
- socket_.async_send_to(
- asio::buffer(message_), endpoint_,
- boost::bind(&sender::handle_send_to, this,
- asio::placeholders::error));
- }
-
- void handle_send_to(const asio::error_code& error)
- {
- if (!error && message_count_ < max_message_count)
- {
- timer_.expires_after(asio::chrono::seconds(1));
- timer_.async_wait(
- boost::bind(&sender::handle_timeout, this,
- asio::placeholders::error));
- }
- }
-
- void handle_timeout(const asio::error_code& error)
- {
- if (!error)
- {
- std::ostringstream os;
- os << "Message " << message_count_++;
- message_ = os.str();
-
- socket_.async_send_to(
- asio::buffer(message_), endpoint_,
- boost::bind(&sender::handle_send_to, this,
- asio::placeholders::error));
- }
- }
-
-private:
- asio::ip::udp::endpoint endpoint_;
- asio::ip::udp::socket socket_;
- asio::steady_timer timer_;
- int message_count_;
- std::string message_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: sender <multicast_address>\n";
- std::cerr << " For IPv4, try:\n";
- std::cerr << " sender 239.255.0.1\n";
- std::cerr << " For IPv6, try:\n";
- std::cerr << " sender ff31::8000:1234\n";
- return 1;
- }
-
- asio::io_context io_context;
- sender s(io_context, asio::ip::make_address(argv[1]));
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp b/3rdparty/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp
deleted file mode 100644
index bc3d02f02f6..00000000000
--- a/3rdparty/asio/src/examples/cpp03/nonblocking/third_party_lib.cpp
+++ /dev/null
@@ -1,240 +0,0 @@
-//
-// third_party_lib.cpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <asio.hpp>
-#include <boost/array.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <iostream>
-
-using asio::ip::tcp;
-
-namespace third_party_lib {
-
-// Simulation of a third party library that wants to perform read and write
-// operations directly on a socket. It needs to be polled to determine whether
-// it requires a read or write operation, and notified when the socket is ready
-// for reading or writing.
-class session
-{
-public:
- session(tcp::socket& socket)
- : socket_(socket),
- state_(reading)
- {
- }
-
- // Returns true if the third party library wants to be notified when the
- // socket is ready for reading.
- bool want_read() const
- {
- return state_ == reading;
- }
-
- // Notify that third party library that it should perform its read operation.
- void do_read(asio::error_code& ec)
- {
- if (std::size_t len = socket_.read_some(asio::buffer(data_), ec))
- {
- write_buffer_ = asio::buffer(data_, len);
- state_ = writing;
- }
- }
-
- // Returns true if the third party library wants to be notified when the
- // socket is ready for writing.
- bool want_write() const
- {
- return state_ == writing;
- }
-
- // Notify that third party library that it should perform its write operation.
- void do_write(asio::error_code& ec)
- {
- if (std::size_t len = socket_.write_some(
- asio::buffer(write_buffer_), ec))
- {
- write_buffer_ = write_buffer_ + len;
- state_ = asio::buffer_size(write_buffer_) > 0 ? writing : reading;
- }
- }
-
-private:
- tcp::socket& socket_;
- enum { reading, writing } state_;
- boost::array<char, 128> data_;
- asio::const_buffer write_buffer_;
-};
-
-} // namespace third_party_lib
-
-// The glue between asio's sockets and the third party library.
-class connection
- : public boost::enable_shared_from_this<connection>
-{
-public:
- typedef boost::shared_ptr<connection> pointer;
-
- static pointer create(const asio::any_io_executor& ex)
- {
- return pointer(new connection(ex));
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void start()
- {
- // Put the socket into non-blocking mode.
- socket_.non_blocking(true);
-
- start_operations();
- }
-
-private:
- connection(const asio::any_io_executor& ex)
- : socket_(ex),
- session_impl_(socket_),
- read_in_progress_(false),
- write_in_progress_(false)
- {
- }
-
- void start_operations()
- {
- // Start a read operation if the third party library wants one.
- if (session_impl_.want_read() && !read_in_progress_)
- {
- read_in_progress_ = true;
- socket_.async_wait(tcp::socket::wait_read,
- boost::bind(&connection::handle_read,
- shared_from_this(),
- asio::placeholders::error));
- }
-
- // Start a write operation if the third party library wants one.
- if (session_impl_.want_write() && !write_in_progress_)
- {
- write_in_progress_ = true;
- socket_.async_wait(tcp::socket::wait_write,
- boost::bind(&connection::handle_write,
- shared_from_this(),
- asio::placeholders::error));
- }
- }
-
- void handle_read(asio::error_code ec)
- {
- read_in_progress_ = false;
-
- // Notify third party library that it can perform a read.
- if (!ec)
- session_impl_.do_read(ec);
-
- // The third party library successfully performed a read on the socket.
- // Start new read or write operations based on what it now wants.
- if (!ec || ec == asio::error::would_block)
- start_operations();
-
- // Otherwise, an error occurred. Closing the socket cancels any outstanding
- // asynchronous read or write operations. The connection object will be
- // destroyed automatically once those outstanding operations complete.
- else
- socket_.close();
- }
-
- void handle_write(asio::error_code ec)
- {
- write_in_progress_ = false;
-
- // Notify third party library that it can perform a write.
- if (!ec)
- session_impl_.do_write(ec);
-
- // The third party library successfully performed a write on the socket.
- // Start new read or write operations based on what it now wants.
- if (!ec || ec == asio::error::would_block)
- start_operations();
-
- // Otherwise, an error occurred. Closing the socket cancels any outstanding
- // asynchronous read or write operations. The connection object will be
- // destroyed automatically once those outstanding operations complete.
- else
- socket_.close();
- }
-
-private:
- tcp::socket socket_;
- third_party_lib::session session_impl_;
- bool read_in_progress_;
- bool write_in_progress_;
-};
-
-class server
-{
-public:
- server(asio::io_context& io_context, unsigned short port)
- : acceptor_(io_context, tcp::endpoint(tcp::v4(), port))
- {
- start_accept();
- }
-
-private:
- void start_accept()
- {
- connection::pointer new_connection =
- connection::create(acceptor_.get_executor());
-
- acceptor_.async_accept(new_connection->socket(),
- boost::bind(&server::handle_accept, this, new_connection,
- asio::placeholders::error));
- }
-
- void handle_accept(connection::pointer new_connection,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_connection->start();
- }
-
- start_accept();
- }
-
- tcp::acceptor acceptor_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: third_party_lib <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/socks4/socks4.hpp b/3rdparty/asio/src/examples/cpp03/socks4/socks4.hpp
deleted file mode 100644
index c211b32827f..00000000000
--- a/3rdparty/asio/src/examples/cpp03/socks4/socks4.hpp
+++ /dev/null
@@ -1,144 +0,0 @@
-//
-// socks4.hpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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 SOCKS4_HPP
-#define SOCKS4_HPP
-
-#include <string>
-#include <asio.hpp>
-#include <boost/array.hpp>
-
-namespace socks4 {
-
-const unsigned char version = 0x04;
-
-class request
-{
-public:
- enum command_type
- {
- connect = 0x01,
- bind = 0x02
- };
-
- request(command_type cmd, const asio::ip::tcp::endpoint& endpoint,
- const std::string& user_id)
- : version_(version),
- command_(cmd),
- user_id_(user_id),
- null_byte_(0)
- {
- // Only IPv4 is supported by the SOCKS 4 protocol.
- if (endpoint.protocol() != asio::ip::tcp::v4())
- {
- throw asio::system_error(
- asio::error::address_family_not_supported);
- }
-
- // Convert port number to network byte order.
- unsigned short port = endpoint.port();
- port_high_byte_ = (port >> 8) & 0xff;
- port_low_byte_ = port & 0xff;
-
- // Save IP address in network byte order.
- address_ = endpoint.address().to_v4().to_bytes();
- }
-
- boost::array<asio::const_buffer, 7> buffers() const
- {
- boost::array<asio::const_buffer, 7> bufs =
- {
- {
- asio::buffer(&version_, 1),
- asio::buffer(&command_, 1),
- asio::buffer(&port_high_byte_, 1),
- asio::buffer(&port_low_byte_, 1),
- asio::buffer(address_),
- asio::buffer(user_id_),
- asio::buffer(&null_byte_, 1)
- }
- };
- return bufs;
- }
-
-private:
- unsigned char version_;
- unsigned char command_;
- unsigned char port_high_byte_;
- unsigned char port_low_byte_;
- asio::ip::address_v4::bytes_type address_;
- std::string user_id_;
- unsigned char null_byte_;
-};
-
-class reply
-{
-public:
- enum status_type
- {
- request_granted = 0x5a,
- request_failed = 0x5b,
- request_failed_no_identd = 0x5c,
- request_failed_bad_user_id = 0x5d
- };
-
- reply()
- : null_byte_(0),
- status_()
- {
- }
-
- boost::array<asio::mutable_buffer, 5> buffers()
- {
- boost::array<asio::mutable_buffer, 5> bufs =
- {
- {
- asio::buffer(&null_byte_, 1),
- asio::buffer(&status_, 1),
- asio::buffer(&port_high_byte_, 1),
- asio::buffer(&port_low_byte_, 1),
- asio::buffer(address_)
- }
- };
- return bufs;
- }
-
- bool success() const
- {
- return null_byte_ == 0 && status_ == request_granted;
- }
-
- unsigned char status() const
- {
- return status_;
- }
-
- asio::ip::tcp::endpoint endpoint() const
- {
- unsigned short port = port_high_byte_;
- port = (port << 8) & 0xff00;
- port = port | port_low_byte_;
-
- asio::ip::address_v4 address(address_);
-
- return asio::ip::tcp::endpoint(address, port);
- }
-
-private:
- unsigned char null_byte_;
- unsigned char status_;
- unsigned char port_high_byte_;
- unsigned char port_low_byte_;
- asio::ip::address_v4::bytes_type address_;
-};
-
-} // namespace socks4
-
-#endif // SOCKS4_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/socks4/sync_client.cpp b/3rdparty/asio/src/examples/cpp03/socks4/sync_client.cpp
deleted file mode 100644
index 6a52c5edf64..00000000000
--- a/3rdparty/asio/src/examples/cpp03/socks4/sync_client.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// sync_client.cpp
-// ~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <iostream>
-#include <iomanip>
-#include <ostream>
-#include <string>
-#include <asio.hpp>
-#include <boost/array.hpp>
-#include "socks4.hpp"
-
-using asio::ip::tcp;
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 4)
- {
- std::cout << "Usage: sync_client <socks4server> <socks4port> <user>\n";
- std::cout << "Examples:\n";
- std::cout << " sync_client 127.0.0.1 1080 chris\n";
- std::cout << " sync_client localhost socks chris\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- // Get a list of endpoints corresponding to the SOCKS 4 server name.
- tcp::resolver resolver(io_context);
- tcp::resolver::results_type endpoints = resolver.resolve(argv[1], argv[2]);
-
- // Try each endpoint until we successfully establish a connection to the
- // SOCKS 4 server.
- tcp::socket socket(io_context);
- asio::connect(socket, endpoints);
-
- // Get an endpoint for the Boost website. This will be passed to the SOCKS
- // 4 server. Explicitly specify IPv4 since SOCKS 4 does not support IPv6.
- tcp::endpoint http_endpoint =
- *resolver.resolve(tcp::v4(), "www.boost.org", "http").begin();
-
- // Send the request to the SOCKS 4 server.
- socks4::request socks_request(
- socks4::request::connect, http_endpoint, argv[3]);
- asio::write(socket, socks_request.buffers());
-
- // Receive a response from the SOCKS 4 server.
- socks4::reply socks_reply;
- asio::read(socket, socks_reply.buffers());
-
- // Check whether we successfully negotiated with the SOCKS 4 server.
- if (!socks_reply.success())
- {
- std::cout << "Connection failed.\n";
- std::cout << "status = 0x" << std::hex << socks_reply.status();
- return 1;
- }
-
- // Form the HTTP request. We specify the "Connection: close" header so that
- // the server will close the socket after transmitting the response. This
- // will allow us to treat all data up until the EOF as the response.
- std::string request =
- "GET / HTTP/1.0\r\n"
- "Host: www.boost.org\r\n"
- "Accept: */*\r\n"
- "Connection: close\r\n\r\n";
-
- // Send the HTTP request.
- asio::write(socket, asio::buffer(request));
-
- // Read until EOF, writing data to output as we go.
- boost::array<char, 512> response;
- asio::error_code error;
- while (std::size_t s = socket.read_some(
- asio::buffer(response), error))
- std::cout.write(response.data(), s);
- if (error != asio::error::eof)
- throw asio::system_error(error);
- }
- catch (std::exception& e)
- {
- std::cout << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/spawn/echo_server.cpp b/3rdparty/asio/src/examples/cpp03/spawn/echo_server.cpp
deleted file mode 100644
index 4549b446245..00000000000
--- a/3rdparty/asio/src/examples/cpp03/spawn/echo_server.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-//
-// echo_server.cpp
-// ~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <asio/io_context.hpp>
-#include <asio/ip/tcp.hpp>
-#include <asio/spawn.hpp>
-#include <asio/steady_timer.hpp>
-#include <asio/write.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <iostream>
-
-using asio::ip::tcp;
-
-class session : public boost::enable_shared_from_this<session>
-{
-public:
- explicit session(asio::io_context& io_context)
- : strand_(asio::make_strand(io_context)),
- socket_(io_context),
- timer_(io_context)
- {
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- void go()
- {
- asio::spawn(strand_,
- boost::bind(&session::echo,
- shared_from_this(), boost::placeholders::_1));
- asio::spawn(strand_,
- boost::bind(&session::timeout,
- shared_from_this(), boost::placeholders::_1));
- }
-
-private:
- void echo(asio::yield_context yield)
- {
- try
- {
- char data[128];
- for (;;)
- {
- timer_.expires_after(asio::chrono::seconds(10));
- std::size_t n = socket_.async_read_some(asio::buffer(data), yield);
- asio::async_write(socket_, asio::buffer(data, n), yield);
- }
- }
- catch (std::exception& e)
- {
- socket_.close();
- timer_.cancel();
- }
- }
-
- void timeout(asio::yield_context yield)
- {
- while (socket_.is_open())
- {
- asio::error_code ignored_ec;
- timer_.async_wait(yield[ignored_ec]);
- if (timer_.expiry() <= asio::steady_timer::clock_type::now())
- socket_.close();
- }
- }
-
- asio::strand<asio::io_context::executor_type> strand_;
- tcp::socket socket_;
- asio::steady_timer timer_;
-};
-
-void do_accept(asio::io_context& io_context,
- unsigned short port, asio::yield_context yield)
-{
- tcp::acceptor acceptor(io_context, tcp::endpoint(tcp::v4(), port));
-
- for (;;)
- {
- asio::error_code ec;
- boost::shared_ptr<session> new_session(new session(io_context));
- acceptor.async_accept(new_session->socket(), yield[ec]);
- if (!ec) new_session->go();
- }
-}
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: echo_server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- asio::spawn(io_context,
- boost::bind(do_accept,
- boost::ref(io_context), atoi(argv[1]), boost::placeholders::_1));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/spawn/parallel_grep.cpp b/3rdparty/asio/src/examples/cpp03/spawn/parallel_grep.cpp
deleted file mode 100644
index 7fe1817a25e..00000000000
--- a/3rdparty/asio/src/examples/cpp03/spawn/parallel_grep.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// parallel_grep.cpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <asio/dispatch.hpp>
-#include <asio/post.hpp>
-#include <asio/spawn.hpp>
-#include <asio/strand.hpp>
-#include <asio/thread_pool.hpp>
-#include <boost/bind/bind.hpp>
-#include <fstream>
-#include <iostream>
-#include <string>
-
-using asio::dispatch;
-using asio::spawn;
-using asio::strand;
-using asio::thread_pool;
-using asio::yield_context;
-
-void print_match(std::string input_file, std::string line)
-{
- std::cout << input_file << ':' << line << std::endl;
-}
-
-void search_file(std::string search_string, std::string input_file,
- strand<thread_pool::executor_type> output_strand, yield_context yield)
-{
- std::ifstream is(input_file.c_str());
- std::string line;
- std::size_t line_num = 0;
- while (std::getline(is, line))
- {
- // If we find a match, send a message to the output.
- if (line.find(search_string) != std::string::npos)
- {
- dispatch(output_strand, boost::bind(&print_match, input_file, line));
- }
-
- // Every so often we yield control to another coroutine.
- if (++line_num % 10 == 0)
- post(yield);
- }
-}
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc < 2)
- {
- std::cerr << "Usage: parallel_grep <string> <files...>\n";
- return 1;
- }
-
- // We use a fixed size pool of threads for reading the input files. The
- // number of threads is automatically determined based on the number of
- // CPUs available in the system.
- thread_pool pool;
-
- // To prevent the output from being garbled, we use a strand to synchronise
- // printing.
- strand<thread_pool::executor_type> output_strand(pool.get_executor());
-
- // Spawn a new coroutine for each file specified on the command line.
- std::string search_string = argv[1];
- for (int argn = 2; argn < argc; ++argn)
- {
- std::string input_file = argv[argn];
- spawn(pool, boost::bind(&search_file, search_string,
- input_file, output_strand, boost::placeholders::_1));
- }
-
- // Join the thread pool to wait for all the spawned tasks to complete.
- pool.join();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/ca.pem b/3rdparty/asio/src/examples/cpp03/ssl/ca.pem
deleted file mode 100644
index 1ee5f2ca43b..00000000000
--- a/3rdparty/asio/src/examples/cpp03/ssl/ca.pem
+++ /dev/null
@@ -1,49 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDlzCCAn+gAwIBAgIJAMJYU3U6A0IRMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNV
-BAYTAkFVMQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChME
-YXNpbzAeFw0xNTExMTgyMjMzNDhaFw0yMDExMTYyMjMzNDhaMDsxCzAJBgNVBAYT
-AkFVMQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChMEYXNp
-bzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMcRJocHdVMdLUJ/pypY
-QVSTC0t3IIgjwjazrK3kAaoIMvzPmDFxEXWcDx+nyz8kQ/E38Ir/ef2BCNGci5hu
-wkfMSuMoW9l2N4hx3QCcF46tTDEZztFxWAH7QbE2wYMlMgKZSxWimNfq0YjxEEXb
-QM0lGPLFh7Xoko29H0F3LKaaQV9u/vop3Hs0h12HeWlY4PiLp7QQTNGqbWcXycA0
-NZ/fyismireyEvPAgo6L8iXuAi7g0TVKVNlrticGGjMcMq6IMvxzEpSMkuMQ5rWj
-pZjWOoBjSYBuXdblcBRvXhOr2Ws8jJLMZfehKq9q1reQfoGV6xMnbwmumSXbWRWT
-0vkCAwEAAaOBnTCBmjAdBgNVHQ4EFgQUK/Zv/AVtfIeucJw8VEtux1dhI1YwawYD
-VR0jBGQwYoAUK/Zv/AVtfIeucJw8VEtux1dhI1ahP6Q9MDsxCzAJBgNVBAYTAkFV
-MQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChMEYXNpb4IJ
-AMJYU3U6A0IRMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBABLYXimq
-v/HLyIJi7Xn8AJUsICj8LKF/J24nwwiF+ibf7UkoChJURs4nN78bod/lpDVPTEVl
-gTBdV/vBJs416sCEFfsGjqB9OBYj4gb0VaJDsQd0+NMvXp0faKv2y9wgScxG9/cg
-aM7eRmyfMn1qjb6tpNxVOPpe/nFi8Vx/1orejBRaZr4zF5TkoPepfwLWQeXDUIdE
-+QHZ60jZAkR5RXTVU4u3kOKcJs839pmJYyxM4H2VxpR18vy4/YdIVWkREIUM2OgT
-5iznIQIIgR56QRGP85uef+I6n0BHzrBk6du69bkQFxrFjLVGlal4bIQqSg4KGWgx
-dEdymMWzmMxpO9s=
------END CERTIFICATE-----
------BEGIN RSA PRIVATE KEY-----
-MIIEpgIBAAKCAQEAxxEmhwd1Ux0tQn+nKlhBVJMLS3cgiCPCNrOsreQBqggy/M+Y
-MXERdZwPH6fLPyRD8Tfwiv95/YEI0ZyLmG7CR8xK4yhb2XY3iHHdAJwXjq1MMRnO
-0XFYAftBsTbBgyUyAplLFaKY1+rRiPEQRdtAzSUY8sWHteiSjb0fQXcspppBX27+
-+incezSHXYd5aVjg+IuntBBM0aptZxfJwDQ1n9/KKyaKt7IS88CCjovyJe4CLuDR
-NUpU2Wu2JwYaMxwyrogy/HMSlIyS4xDmtaOlmNY6gGNJgG5d1uVwFG9eE6vZazyM
-ksxl96Eqr2rWt5B+gZXrEydvCa6ZJdtZFZPS+QIDAQABAoIBAQCOma+SvPoDzvvU
-DiPOxqgOEMPfjHfGbm86xl0luBalGfiEd6WbjVanfGKtF4MWOUFec+chez+FJMEP
-fufVC0qrKiJfNVMOpYvEd2SMgkSx1VymM8me6WXVDYsSipn2+1cm228ZEYAR9Emj
-oqQ4loaGLlP/3RaJbhBF7ruMJvXaZZQ4fZy74Z4tyRaaE1B659ua7Rjne7eNhQE8
-cR7cQDkxsNNN3LTbfLRwEc/gcDXWgLe5JlR/K4ZrdKc3lyivm+Uew3ubKs+fgkyY
-kHmuI3RJGIjpnsZW0/So+pHm3b/fo6lmlhTXtNNd+tkkKn2K9ttbXT3Sc13Pc+4w
-c4MLyUpdAoGBAOxTtGDpeF6U4s+GPuOCzHCwKQyzfOyCL/UTZv1UJX7Kn1FYycJH
-eOjtBRtS661cGkGd1MPfjdX2VV84AmBGDUmRqJ2KfTI1NjLAEJ115ANTpmSTm3lF
-UYncgbzl6aflLpjE1mgY+JTJykYeN5jhhO0r2bsdY7S+zaMCSI5NLuznAoGBANej
-aMtqLg2qKoq+fUkNBHHLXelR5dBXFnKgSrTj++H4yeW9pYbl8bK3gTF3I5+dSjHW
-DdC4+X09iPqY7p8vm8Gq/vgO8Bu+EnKNVr80PJSj7AzFGd6mk/CVrAzoY2XJWbAp
-YFwpo1WfHjS5wBfQzBlXY7kWVB7fj32kk14PYmUfAoGBAJXfd7NGHPoOfdCSGGv8
-VV7ZuQ6+/WiYH4XS6iuaI7VHFsZmAn3dCcbeGbD8Y04r7NLUH0yhB7g7YmTihk87
-3c1cPIy8eS1QJbEFsQPK8fFSKWH7YkwEM/O0DesX+5hodaaYnkiiHXNujYLuQuAH
-lV87wfcyajsEDjFkj1L/i9TdAoGBAKYfRUQv8HqmdU+doHb+iEYCHb75UMpHzQtR
-YTwpxoo3V5Kdnz9lNeYwaF7rIY59ZgMunEYHumw5U6V625nW228/hF0lZOR6cUu+
-hu2WGHWKMvdDgMJ+IcpeA8WN4cUwcN+9gHZ/vUzg4CxOTSYLvLBpGnIkOXnvUGPC
-vaTgxTSRAoGBAOHcuZ9hcUrPuVI1HVkjQQLu5mLZ3tz6linEbe/RCdJMK8JrRX4w
-ubB7gFclMYGbLlDNAJVYkydJaCy/2NAI3rfsOda+VmDqGx6z4BbSGceHhomyU1Oo
-1H7YaXsuzDkzl23HRsyp0pKJpTdghZdbVsGF8vAB8ygK3ehM233neSln
------END RSA PRIVATE KEY-----
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/client.cpp b/3rdparty/asio/src/examples/cpp03/ssl/client.cpp
deleted file mode 100644
index 3b0e9fd5c7a..00000000000
--- a/3rdparty/asio/src/examples/cpp03/ssl/client.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-//
-// client.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/bind/bind.hpp>
-#include "asio.hpp"
-#include "asio/ssl.hpp"
-
-enum { max_length = 1024 };
-
-class client
-{
-public:
- client(asio::io_context& io_context,
- asio::ssl::context& context,
- asio::ip::tcp::resolver::results_type endpoints)
- : socket_(io_context, context)
- {
- socket_.set_verify_mode(asio::ssl::verify_peer);
- socket_.set_verify_callback(
- boost::bind(&client::verify_certificate, this,
- boost::placeholders::_1, boost::placeholders::_2));
-
- asio::async_connect(socket_.lowest_layer(), endpoints,
- boost::bind(&client::handle_connect, this,
- asio::placeholders::error));
- }
-
- bool verify_certificate(bool preverified,
- asio::ssl::verify_context& ctx)
- {
- // The verify callback can be used to check whether the certificate that is
- // being presented is valid for the peer. For example, RFC 2818 describes
- // the steps involved in doing this for HTTPS. Consult the OpenSSL
- // documentation for more details. Note that the callback is called once
- // for each certificate in the certificate chain, starting from the root
- // certificate authority.
-
- // In this example we will simply print the certificate's subject name.
- char subject_name[256];
- X509* cert = X509_STORE_CTX_get_current_cert(ctx.native_handle());
- X509_NAME_oneline(X509_get_subject_name(cert), subject_name, 256);
- std::cout << "Verifying " << subject_name << "\n";
-
- return preverified;
- }
-
- void handle_connect(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_handshake(asio::ssl::stream_base::client,
- boost::bind(&client::handle_handshake, this,
- asio::placeholders::error));
- }
- else
- {
- std::cout << "Connect failed: " << error.message() << "\n";
- }
- }
-
- void handle_handshake(const asio::error_code& error)
- {
- if (!error)
- {
- std::cout << "Enter message: ";
- std::cin.getline(request_, max_length);
- size_t request_length = strlen(request_);
-
- asio::async_write(socket_,
- asio::buffer(request_, request_length),
- boost::bind(&client::handle_write, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- std::cout << "Handshake failed: " << error.message() << "\n";
- }
- }
-
- void handle_write(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- asio::async_read(socket_,
- asio::buffer(reply_, bytes_transferred),
- boost::bind(&client::handle_read, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- std::cout << "Write failed: " << error.message() << "\n";
- }
- }
-
- void handle_read(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- std::cout << "Reply: ";
- std::cout.write(reply_, bytes_transferred);
- std::cout << "\n";
- }
- else
- {
- std::cout << "Read failed: " << error.message() << "\n";
- }
- }
-
-private:
- asio::ssl::stream<asio::ip::tcp::socket> socket_;
- char request_[max_length];
- char reply_[max_length];
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: client <host> <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- asio::ip::tcp::resolver resolver(io_context);
- asio::ip::tcp::resolver::results_type endpoints =
- resolver.resolve(argv[1], argv[2]);
-
- asio::ssl::context ctx(asio::ssl::context::sslv23);
- ctx.load_verify_file("ca.pem");
-
- client c(io_context, ctx, endpoints);
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/dh2048.pem b/3rdparty/asio/src/examples/cpp03/ssl/dh2048.pem
deleted file mode 100644
index 07250cca62f..00000000000
--- a/3rdparty/asio/src/examples/cpp03/ssl/dh2048.pem
+++ /dev/null
@@ -1,8 +0,0 @@
------BEGIN DH PARAMETERS-----
-MIIBCAKCAQEAyNnxZSYc6J89mDNnqOH8bnwBiAJxcaUS3PkIEcwW8D9o2BlNq6EO
-XKMIbdfwPFZi80GMpNu3YP2A2B42sAHmb7w7ZA92QDv3JjqzR0QuS/CkMv4CEjha
-QBFwBDDWnnHBSj4w/t54ii0SH34mWcjBItI2eMtnM9J6fnvNiWqJxdt4iA4mZjZD
-qZTjIRyjgKAevzkqAlBqQRoVUUgu+9Cf29wXjVl3bE+0VU5CdFeyT+Y9yunz88mq
-rGyx1uPt+zbIfxuNLH+coY67y1ht7iZEL5WLd3wGCycRT+lYy2AL/rxGBPxStFIT
-2bOkQao6sAfb4UdGEUlwHUXZrAV51oM30wIBAg==
------END DH PARAMETERS-----
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/server.cpp b/3rdparty/asio/src/examples/cpp03/ssl/server.cpp
deleted file mode 100644
index 196824e5fd3..00000000000
--- a/3rdparty/asio/src/examples/cpp03/ssl/server.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-//
-// server.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <cstdlib>
-#include <iostream>
-#include <boost/bind/bind.hpp>
-#include "asio.hpp"
-#include "asio/ssl.hpp"
-
-typedef asio::ssl::stream<asio::ip::tcp::socket> ssl_socket;
-
-class session
-{
-public:
- session(asio::io_context& io_context,
- asio::ssl::context& context)
- : socket_(io_context, context)
- {
- }
-
- ssl_socket::lowest_layer_type& socket()
- {
- return socket_.lowest_layer();
- }
-
- void start()
- {
- socket_.async_handshake(asio::ssl::stream_base::server,
- boost::bind(&session::handle_handshake, this,
- asio::placeholders::error));
- }
-
- void handle_handshake(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_read_some(asio::buffer(data_, max_length),
- boost::bind(&session::handle_read, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- delete this;
- }
- }
-
- void handle_read(const asio::error_code& error,
- size_t bytes_transferred)
- {
- if (!error)
- {
- asio::async_write(socket_,
- asio::buffer(data_, bytes_transferred),
- boost::bind(&session::handle_write, this,
- asio::placeholders::error));
- }
- else
- {
- delete this;
- }
- }
-
- void handle_write(const asio::error_code& error)
- {
- if (!error)
- {
- socket_.async_read_some(asio::buffer(data_, max_length),
- boost::bind(&session::handle_read, this,
- asio::placeholders::error,
- asio::placeholders::bytes_transferred));
- }
- else
- {
- delete this;
- }
- }
-
-private:
- ssl_socket socket_;
- enum { max_length = 1024 };
- char data_[max_length];
-};
-
-class server
-{
-public:
- server(asio::io_context& io_context, unsigned short port)
- : io_context_(io_context),
- acceptor_(io_context,
- asio::ip::tcp::endpoint(asio::ip::tcp::v4(), port)),
- context_(asio::ssl::context::sslv23)
- {
- context_.set_options(
- asio::ssl::context::default_workarounds
- | asio::ssl::context::no_sslv2
- | asio::ssl::context::single_dh_use);
- context_.set_password_callback(boost::bind(&server::get_password, this));
- context_.use_certificate_chain_file("server.pem");
- context_.use_private_key_file("server.pem", asio::ssl::context::pem);
- context_.use_tmp_dh_file("dh2048.pem");
-
- start_accept();
- }
-
- std::string get_password() const
- {
- return "test";
- }
-
- void start_accept()
- {
- session* new_session = new session(io_context_, context_);
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept, this, new_session,
- asio::placeholders::error));
- }
-
- void handle_accept(session* new_session,
- const asio::error_code& error)
- {
- if (!error)
- {
- new_session->start();
- }
- else
- {
- delete new_session;
- }
-
- start_accept();
- }
-
-private:
- asio::io_context& io_context_;
- asio::ip::tcp::acceptor acceptor_;
- asio::ssl::context context_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 2)
- {
- std::cerr << "Usage: server <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- using namespace std; // For atoi.
- server s(io_context, atoi(argv[1]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/server.pem b/3rdparty/asio/src/examples/cpp03/ssl/server.pem
deleted file mode 100644
index 37ea6e26715..00000000000
--- a/3rdparty/asio/src/examples/cpp03/ssl/server.pem
+++ /dev/null
@@ -1,71 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDAzCCAesCCQD9QcRiWk0y9TANBgkqhkiG9w0BAQUFADA7MQswCQYDVQQGEwJB
-VTEMMAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxDTALBgNVBAoTBGFzaW8w
-HhcNMTUxMTE4MjIzNzMxWhcNMjAxMTE2MjIzNzMxWjBMMQswCQYDVQQGEwJBVTEM
-MAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxDTALBgNVBAoTBGFzaW8xDzAN
-BgNVBAsTBnNlcnZlcjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALr0
-+NXSklsGJR7HYHP/H4V5+KpYrmFKva/K7iiqi+XyWEjGnj+/iImJW26phhg9GouN
-JJxdrP7/0LwpMsEC/9v09dMNAEewtYhPgD4kiUH/E/79wVmayMZZZGrpF9Rw+wWv
-q58y3L1wKge3qilX6slVDdNhqU3vBiMKEJfsjE4PKcEVjPCjVJG2562eHK9FxyjQ
-DykyH61lQKBQOiElilPQKzAO7U36yTvs+chWuUfK47B8EC+PJ5KcLEppli4ljlwE
-w01HnGxwvjDLobKm2jL6CWi3aYGWudyTsNAd7YC5C7psktBypQLBcfp7uUrrR5Bb
-PEjFHJUWIlyoYvm2OjMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAtceVW6tixFsB
-ZRhjL5aRCcbx2iMwEXd54lcP6BWe1qOcDPHoSYI1zvvGzohbEvBfqUv78S9MtzaT
-gMe5rIU9M1ZM09PyaM6ZutGpKHE8L4qcOslTt41GQFsSqPFdcbgSV20MvBzjGayR
-AI/WV0avW3oasdetJPZCR7bRbCbMbWTgclUfv5F25ENcR+BhNuilfL15owL0s4sS
-Wb4jOOHhXV9iXeS2dH0snFqv4BmQ9ZoA7zbM9lG3EU5DuxHESYkCnzJyEqqY3vWv
-PFRViCxLp5LQLmkTQ3dglVQA4x6ZaonaewdPtdhjkLUuIqDvQx5+kIaOELbSws+c
-bREYlnGrFw==
------END CERTIFICATE-----
------BEGIN RSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: AES-256-CBC,D459676347D389E9135496D8AAFA7953
-
-wbrjxr9NHur8kgxDsgXOY9qFGKpONIQLxkuahUrDD/H+s/l7ugsLWOPsOXbjNL/7
-QYUBAx85HKm9D8BQ5g78Y82qfArap3/3IIuysDfQDh4fQodhVtmGTFiCOvudlGEp
-lq1niQRLThlxeRoFphH8KKiOTO9a/d8tdL7zRmiFwnVnhK4014mgVmgcSefA1AF5
-RbJAeMclUKddG6ltQK00ptg84CDXiMWQXFBGGmQ1av2lyFzC+xLP+qDqZAYTM9lZ
-NFRo2oEZP1ozfOVNSbXTanJgZ0DSSmhGE1PcVrHSeE/v+k1kPh3oVKi9GV51kIDC
-Zd9f/XltuDOzy1Ybn6gRy4nzNpzcwjSCIHEdSD5nxU5JfHfQ3OtnsEab7qf989iP
-s2LbCSp5uGTMvfesMIkixIZAQp2FeahZTAgU2Vx+wi5Kks68rOqeywEfzACL/Um5
-7XZu8gDs4MgRRWnxK1BbJDPifICLvSJZvgB9FKX/hk4FHFF+MtcrkalehCuLooDV
-3rfHNvRSbg7J97XQ3QC+k9ZDaumpy6n+LhaVv7BIJRBnBBtZ5Eg3DmPg6flqaHAU
-Y/8d82wb/pCmbvR3B1/Ebgs84DPJ+uZnY9M5Iwx19oqlVSR2ts/Tx619LGAm+BiQ
-7YDoC4CFmpAA8Uw0xnUbNgx94NdNmlnLeLtS50b0XlWpHKbVzmVbNYEjY6NHMlLt
-aqxWHTYTa7g/c1bg2/nxF1Lbfu5VSTROGBUuer1c3yzVuyBrjcX92Jp4BJH78qOp
-N6lY6MnH4HYRXHjzlt/S0ZzO0faPPe18Q8SWvnDVuE3fYzzL772B56d2t8eodc+/
-t6M3qJ60eXdsmgYOaPRLRUovN2xT2UUr0+biuguHyqfaVfcEU/adw+b9oUVE+5Nw
-nZHI5qhPnhLxChyZqbBl68zMUyKlfff4OyLvRGpfcHwBw6DTGjduB+DDsqqkcIB9
-2VL6nps7ZVCwMPI18siUd6cttEOf6ZXrVqHg9wfDvJOlh2NNKNLxSAFubHc90Jlj
-KejrWenXo2w6YkSUeTV4t4cWu7U8rXIkTJXDl1S6NO8DWqNDo5KjgJ2SK5NlSOJ7
-jgECn390ooneJOxxytPVQO2xppXQZZS65RHrvhB+ss5xUknly9q+ICyt6xTR9nqA
-PKkeSE6qVY0J4JgFXpkgQxgwMnjSED3LKr3jlz28pr5cC6tsc5SSlekHjT2fcSrX
-uccaVahaJRigf+q+4XzmJtdwbZU+YWGZRVMlQLA5yzPHQHDYkPpOeYU4WReND8S4
-TZRkPHaxOZ2lKQwJB93V8Vbt2MvwRy392452a33S4TcQLaWzoOljXjmZjrp2rvRz
-prBaNe8LnO4V8Oliv+H+E0UWiWFDuI+HBy4X4O9plsbw/gk64Phl9qLiBwaX/AIR
-66FXvC/czABo9oSt2jekcMtJofYr8Gr2bsJlt5ZX+GEOxz4jMv7xvz5/L3W7jVav
-pHGIv4xfN9FrXzL47O7UuUF9xZg4Rp/fxwpgEDNZmX/3DnP0ewZQUcgUX0pdqNGQ
-YVqJXcRF7KqG2NSQFuwPESZQnxU0WzSgRyUae7xg1WKfSuN8NVAzKhOgeqlD2IAo
------END RSA PRIVATE KEY-----
------BEGIN CERTIFICATE-----
-MIIDlzCCAn+gAwIBAgIJAMJYU3U6A0IRMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNV
-BAYTAkFVMQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChME
-YXNpbzAeFw0xNTExMTgyMjMzNDhaFw0yMDExMTYyMjMzNDhaMDsxCzAJBgNVBAYT
-AkFVMQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChMEYXNp
-bzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMcRJocHdVMdLUJ/pypY
-QVSTC0t3IIgjwjazrK3kAaoIMvzPmDFxEXWcDx+nyz8kQ/E38Ir/ef2BCNGci5hu
-wkfMSuMoW9l2N4hx3QCcF46tTDEZztFxWAH7QbE2wYMlMgKZSxWimNfq0YjxEEXb
-QM0lGPLFh7Xoko29H0F3LKaaQV9u/vop3Hs0h12HeWlY4PiLp7QQTNGqbWcXycA0
-NZ/fyismireyEvPAgo6L8iXuAi7g0TVKVNlrticGGjMcMq6IMvxzEpSMkuMQ5rWj
-pZjWOoBjSYBuXdblcBRvXhOr2Ws8jJLMZfehKq9q1reQfoGV6xMnbwmumSXbWRWT
-0vkCAwEAAaOBnTCBmjAdBgNVHQ4EFgQUK/Zv/AVtfIeucJw8VEtux1dhI1YwawYD
-VR0jBGQwYoAUK/Zv/AVtfIeucJw8VEtux1dhI1ahP6Q9MDsxCzAJBgNVBAYTAkFV
-MQwwCgYDVQQIEwNOU1cxDzANBgNVBAcTBlN5ZG5leTENMAsGA1UEChMEYXNpb4IJ
-AMJYU3U6A0IRMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBABLYXimq
-v/HLyIJi7Xn8AJUsICj8LKF/J24nwwiF+ibf7UkoChJURs4nN78bod/lpDVPTEVl
-gTBdV/vBJs416sCEFfsGjqB9OBYj4gb0VaJDsQd0+NMvXp0faKv2y9wgScxG9/cg
-aM7eRmyfMn1qjb6tpNxVOPpe/nFi8Vx/1orejBRaZr4zF5TkoPepfwLWQeXDUIdE
-+QHZ60jZAkR5RXTVU4u3kOKcJs839pmJYyxM4H2VxpR18vy4/YdIVWkREIUM2OgT
-5iznIQIIgR56QRGP85uef+I6n0BHzrBk6du69bkQFxrFjLVGlal4bIQqSg4KGWgx
-dEdymMWzmMxpO9s=
------END CERTIFICATE-----
diff --git a/3rdparty/asio/src/examples/cpp03/timeouts/async_tcp_client.cpp b/3rdparty/asio/src/examples/cpp03/timeouts/async_tcp_client.cpp
deleted file mode 100644
index fe2d27fac9e..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timeouts/async_tcp_client.cpp
+++ /dev/null
@@ -1,311 +0,0 @@
-//
-// async_tcp_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "asio/buffer.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/tcp.hpp"
-#include "asio/read_until.hpp"
-#include "asio/steady_timer.hpp"
-#include "asio/write.hpp"
-#include <boost/bind/bind.hpp>
-#include <iostream>
-#include <string>
-
-using asio::steady_timer;
-using asio::ip::tcp;
-
-//
-// This class manages socket timeouts by applying the concept of a deadline.
-// Some asynchronous operations are given deadlines by which they must complete.
-// Deadlines are enforced by an "actor" that persists for the lifetime of the
-// client object:
-//
-// +----------------+
-// | |
-// | check_deadline |<---+
-// | | |
-// +----------------+ | async_wait()
-// | |
-// +---------+
-//
-// If the deadline actor determines that the deadline has expired, the socket
-// is closed and any outstanding operations are consequently cancelled.
-//
-// Connection establishment involves trying each endpoint in turn until a
-// connection is successful, or the available endpoints are exhausted. If the
-// deadline actor closes the socket, the connect actor is woken up and moves to
-// the next endpoint.
-//
-// +---------------+
-// | |
-// | start_connect |<---+
-// | | |
-// +---------------+ |
-// | |
-// async_- | +----------------+
-// connect() | | |
-// +--->| handle_connect |
-// | |
-// +----------------+
-// :
-// Once a connection is :
-// made, the connect :
-// actor forks in two - :
-// :
-// an actor for reading : and an actor for
-// inbound messages: : sending heartbeats:
-// :
-// +------------+ : +-------------+
-// | |<- - - - -+- - - - ->| |
-// | start_read | | start_write |<---+
-// | |<---+ | | |
-// +------------+ | +-------------+ | async_wait()
-// | | | |
-// async_- | +-------------+ async_- | +--------------+
-// read_- | | | write() | | |
-// until() +--->| handle_read | +--->| handle_write |
-// | | | |
-// +-------------+ +--------------+
-//
-// The input actor reads messages from the socket, where messages are delimited
-// by the newline character. The deadline for a complete message is 30 seconds.
-//
-// The heartbeat actor sends a heartbeat (a message that consists of a single
-// newline character) every 10 seconds. In this example, no deadline is applied
-// to message sending.
-//
-class client
-{
-public:
- client(asio::io_context& io_context)
- : stopped_(false),
- socket_(io_context),
- deadline_(io_context),
- heartbeat_timer_(io_context)
- {
- }
-
- // Called by the user of the client class to initiate the connection process.
- // The endpoints will have been obtained using a tcp::resolver.
- void start(tcp::resolver::results_type endpoints)
- {
- // Start the connect actor.
- endpoints_ = endpoints;
- start_connect(endpoints_.begin());
-
- // Start the deadline actor. You will note that we're not setting any
- // particular deadline here. Instead, the connect and input actors will
- // update the deadline prior to each asynchronous operation.
- deadline_.async_wait(boost::bind(&client::check_deadline, this));
- }
-
- // This function terminates all the actors to shut down the connection. It
- // may be called by the user of the client class, or by the class itself in
- // response to graceful termination or an unrecoverable error.
- void stop()
- {
- stopped_ = true;
- asio::error_code ignored_ec;
- socket_.close(ignored_ec);
- deadline_.cancel();
- heartbeat_timer_.cancel();
- }
-
-private:
- void start_connect(tcp::resolver::results_type::iterator endpoint_iter)
- {
- if (endpoint_iter != endpoints_.end())
- {
- std::cout << "Trying " << endpoint_iter->endpoint() << "...\n";
-
- // Set a deadline for the connect operation.
- deadline_.expires_after(asio::chrono::seconds(60));
-
- // Start the asynchronous connect operation.
- socket_.async_connect(endpoint_iter->endpoint(),
- boost::bind(&client::handle_connect, this,
- boost::placeholders::_1, endpoint_iter));
- }
- else
- {
- // There are no more endpoints to try. Shut down the client.
- stop();
- }
- }
-
- void handle_connect(const asio::error_code& ec,
- tcp::resolver::results_type::iterator endpoint_iter)
- {
- if (stopped_)
- return;
-
- // The async_connect() function automatically opens the socket at the start
- // of the asynchronous operation. If the socket is closed at this time then
- // the timeout handler must have run first.
- if (!socket_.is_open())
- {
- std::cout << "Connect timed out\n";
-
- // Try the next available endpoint.
- start_connect(++endpoint_iter);
- }
-
- // Check if the connect operation failed before the deadline expired.
- else if (ec)
- {
- std::cout << "Connect error: " << ec.message() << "\n";
-
- // We need to close the socket used in the previous connection attempt
- // before starting a new one.
- socket_.close();
-
- // Try the next available endpoint.
- start_connect(++endpoint_iter);
- }
-
- // Otherwise we have successfully established a connection.
- else
- {
- std::cout << "Connected to " << endpoint_iter->endpoint() << "\n";
-
- // Start the input actor.
- start_read();
-
- // Start the heartbeat actor.
- start_write();
- }
- }
-
- void start_read()
- {
- // Set a deadline for the read operation.
- deadline_.expires_after(asio::chrono::seconds(30));
-
- // Start an asynchronous operation to read a newline-delimited message.
- asio::async_read_until(socket_,
- asio::dynamic_buffer(input_buffer_), '\n',
- boost::bind(&client::handle_read, this,
- boost::placeholders::_1, boost::placeholders::_2));
- }
-
- void handle_read(const asio::error_code& ec, std::size_t n)
- {
- if (stopped_)
- return;
-
- if (!ec)
- {
- // Extract the newline-delimited message from the buffer.
- std::string line(input_buffer_.substr(0, n - 1));
- input_buffer_.erase(0, n);
-
- // Empty messages are heartbeats and so ignored.
- if (!line.empty())
- {
- std::cout << "Received: " << line << "\n";
- }
-
- start_read();
- }
- else
- {
- std::cout << "Error on receive: " << ec.message() << "\n";
-
- stop();
- }
- }
-
- void start_write()
- {
- if (stopped_)
- return;
-
- // Start an asynchronous operation to send a heartbeat message.
- asio::async_write(socket_, asio::buffer("\n", 1),
- boost::bind(&client::handle_write, this, boost::placeholders::_1));
- }
-
- void handle_write(const asio::error_code& ec)
- {
- if (stopped_)
- return;
-
- if (!ec)
- {
- // Wait 10 seconds before sending the next heartbeat.
- heartbeat_timer_.expires_after(asio::chrono::seconds(10));
- heartbeat_timer_.async_wait(boost::bind(&client::start_write, this));
- }
- else
- {
- std::cout << "Error on heartbeat: " << ec.message() << "\n";
-
- stop();
- }
- }
-
- void check_deadline()
- {
- if (stopped_)
- return;
-
- // Check whether the deadline has passed. We compare the deadline against
- // the current time since a new asynchronous operation may have moved the
- // deadline before this actor had a chance to run.
- if (deadline_.expiry() <= steady_timer::clock_type::now())
- {
- // The deadline has passed. The socket is closed so that any outstanding
- // asynchronous operations are cancelled.
- socket_.close();
-
- // There is no longer an active deadline. The expiry is set to the
- // maximum time point so that the actor takes no action until a new
- // deadline is set.
- deadline_.expires_at(steady_timer::time_point::max());
- }
-
- // Put the actor back to sleep.
- deadline_.async_wait(boost::bind(&client::check_deadline, this));
- }
-
-private:
- bool stopped_;
- tcp::resolver::results_type endpoints_;
- tcp::socket socket_;
- std::string input_buffer_;
- steady_timer deadline_;
- steady_timer heartbeat_timer_;
-};
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 3)
- {
- std::cerr << "Usage: client <host> <port>\n";
- return 1;
- }
-
- asio::io_context io_context;
- tcp::resolver r(io_context);
- client c(io_context);
-
- c.start(r.resolve(argv[1], argv[2]));
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp b/3rdparty/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp
deleted file mode 100644
index 67d0bcc7604..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timeouts/blocking_tcp_client.cpp
+++ /dev/null
@@ -1,191 +0,0 @@
-//
-// blocking_tcp_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "asio/buffer.hpp"
-#include "asio/connect.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/tcp.hpp"
-#include "asio/read_until.hpp"
-#include "asio/system_error.hpp"
-#include "asio/write.hpp"
-#include <cstdlib>
-#include <iostream>
-#include <string>
-#include <boost/lambda/bind.hpp>
-#include <boost/lambda/lambda.hpp>
-
-using asio::ip::tcp;
-using boost::lambda::bind;
-using boost::lambda::var;
-using boost::lambda::_1;
-using boost::lambda::_2;
-
-//----------------------------------------------------------------------
-
-//
-// This class manages socket timeouts by running the io_context using the timed
-// io_context::run_for() member function. Each asynchronous operation is given
-// a timeout within which it must complete. The socket operations themselves
-// use boost::lambda function objects as completion handlers. For a given
-// socket operation, the client object runs the io_context to block thread
-// execution until the operation completes or the timeout is reached. If the
-// io_context::run_for() function times out, the socket is closed and the
-// outstanding asynchronous operation is cancelled.
-//
-class client
-{
-public:
- client()
- : socket_(io_context_)
- {
- }
-
- void connect(const std::string& host, const std::string& service,
- asio::chrono::steady_clock::duration timeout)
- {
- // Resolve the host name and service to a list of endpoints.
- tcp::resolver::results_type endpoints =
- tcp::resolver(io_context_).resolve(host, service);
-
- // Start the asynchronous operation itself. The boost::lambda function
- // object is used as a callback and will update the ec variable when the
- // operation completes. The blocking_udp_client.cpp example shows how you
- // can use boost::bind rather than boost::lambda.
- asio::error_code ec;
- asio::async_connect(socket_, endpoints, var(ec) = _1);
-
- // Run the operation until it completes, or until the timeout.
- run(timeout);
-
- // Determine whether a connection was successfully established.
- if (ec)
- throw asio::system_error(ec);
- }
-
- std::string read_line(asio::chrono::steady_clock::duration timeout)
- {
- // Start the asynchronous operation. The boost::lambda function object is
- // used as a callback and will update the ec variable when the operation
- // completes. The blocking_udp_client.cpp example shows how you can use
- // boost::bind rather than boost::lambda.
- asio::error_code ec;
- std::size_t n = 0;
- asio::async_read_until(socket_,
- asio::dynamic_buffer(input_buffer_),
- '\n', (var(ec) = _1, var(n) = _2));
-
- // Run the operation until it completes, or until the timeout.
- run(timeout);
-
- // Determine whether the read completed successfully.
- if (ec)
- throw asio::system_error(ec);
-
- std::string line(input_buffer_.substr(0, n - 1));
- input_buffer_.erase(0, n);
- return line;
- }
-
- void write_line(const std::string& line,
- asio::chrono::steady_clock::duration timeout)
- {
- std::string data = line + "\n";
-
- // Start the asynchronous operation. The boost::lambda function object is
- // used as a callback and will update the ec variable when the operation
- // completes. The blocking_udp_client.cpp example shows how you can use
- // boost::bind rather than boost::lambda.
- asio::error_code ec;
- asio::async_write(socket_, asio::buffer(data), var(ec) = _1);
-
- // Run the operation until it completes, or until the timeout.
- run(timeout);
-
- // Determine whether the read completed successfully.
- if (ec)
- throw asio::system_error(ec);
- }
-
-private:
- void run(asio::chrono::steady_clock::duration timeout)
- {
- // Restart the io_context, as it may have been left in the "stopped" state
- // by a previous operation.
- io_context_.restart();
-
- // Block until the asynchronous operation has completed, or timed out. If
- // the pending asynchronous operation is a composed operation, the deadline
- // applies to the entire operation, rather than individual operations on
- // the socket.
- io_context_.run_for(timeout);
-
- // If the asynchronous operation completed successfully then the io_context
- // would have been stopped due to running out of work. If it was not
- // stopped, then the io_context::run_for call must have timed out.
- if (!io_context_.stopped())
- {
- // Close the socket to cancel the outstanding asynchronous operation.
- socket_.close();
-
- // Run the io_context again until the operation completes.
- io_context_.run();
- }
- }
-
- asio::io_context io_context_;
- tcp::socket socket_;
- std::string input_buffer_;
-};
-
-//----------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 4)
- {
- std::cerr << "Usage: blocking_tcp_client <host> <port> <message>\n";
- return 1;
- }
-
- client c;
- c.connect(argv[1], argv[2], asio::chrono::seconds(10));
-
- asio::chrono::steady_clock::time_point time_sent =
- asio::chrono::steady_clock::now();
-
- c.write_line(argv[3], asio::chrono::seconds(10));
-
- for (;;)
- {
- std::string line = c.read_line(asio::chrono::seconds(10));
-
- // Keep going until we get back the line that was sent.
- if (line == argv[3])
- break;
- }
-
- asio::chrono::steady_clock::time_point time_received =
- asio::chrono::steady_clock::now();
-
- std::cout << "Round trip time: ";
- std::cout << asio::chrono::duration_cast<
- asio::chrono::microseconds>(
- time_received - time_sent).count();
- std::cout << " microseconds\n";
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/timeouts/blocking_token_tcp_client.cpp b/3rdparty/asio/src/examples/cpp03/timeouts/blocking_token_tcp_client.cpp
deleted file mode 100644
index 45b56cb0263..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timeouts/blocking_token_tcp_client.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-//
-// blocking_token_tcp_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "asio/connect.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/tcp.hpp"
-#include "asio/read_until.hpp"
-#include "asio/streambuf.hpp"
-#include "asio/system_error.hpp"
-#include "asio/write.hpp"
-#include <cstdlib>
-#include <iostream>
-#include <memory>
-#include <string>
-
-using asio::ip::tcp;
-
-// We will use our sockets only with an io_context.
-typedef asio::basic_stream_socket<tcp,
- asio::io_context::executor_type> tcp_socket;
-
-//----------------------------------------------------------------------
-
-// A custom completion token that makes asynchronous operations behave as
-// though they are blocking calls with a timeout.
-struct close_after
-{
- close_after(asio::chrono::steady_clock::duration t, tcp_socket& s)
- : timeout_(t), socket_(s)
- {
- }
-
- // The maximum time to wait for an asynchronous operation to complete.
- asio::chrono::steady_clock::duration timeout_;
-
- // The socket to be closed if the operation does not complete in time.
- tcp_socket& socket_;
-};
-
-namespace asio {
-
-// The async_result template is specialised to allow the close_after token to
-// be used with asynchronous operations that have a completion signature of
-// void(error_code, T). Generalising this for all completion signature forms is
-// left as an exercise for the reader.
-template <typename T>
-class async_result<close_after, void(asio::error_code, T)>
-{
-public:
- // An asynchronous operation's initiating function automatically creates an
- // completion_handler_type object from the token. This function object is
- // then called on completion of the asynchronous operation.
- class completion_handler_type
- {
- public:
- completion_handler_type(const close_after& token)
- : token_(token)
- {
- }
-
- void operator()(asio::error_code ec, T t)
- {
- *ec_ = ec;
- *t_ = t;
- }
-
- private:
- friend class async_result;
- close_after token_;
- asio::error_code* ec_;
- T* t_;
- };
-
- // The async_result constructor associates the completion handler object with
- // the result of the initiating function.
- explicit async_result(completion_handler_type& h)
- : timeout_(h.token_.timeout_),
- socket_(h.token_.socket_)
- {
- h.ec_ = &ec_;
- h.t_ = &t_;
- }
-
- // The return_type typedef determines the result type of the asynchronous
- // operation's initiating function.
- typedef T return_type;
-
- // The get() function is used to obtain the result of the asynchronous
- // operation's initiating function. For the close_after completion token, we
- // use this function to run the io_context until the operation is complete.
- return_type get()
- {
- asio::io_context& io_context = asio::query(
- socket_.get_executor(), asio::execution::context);
-
- // Restart the io_context, as it may have been left in the "stopped" state
- // by a previous operation.
- io_context.restart();
-
- // Block until the asynchronous operation has completed, or timed out. If
- // the pending asynchronous operation is a composed operation, the deadline
- // applies to the entire operation, rather than individual operations on
- // the socket.
- io_context.run_for(timeout_);
-
- // If the asynchronous operation completed successfully then the io_context
- // would have been stopped due to running out of work. If it was not
- // stopped, then the io_context::run_for call must have timed out and the
- // operation is still incomplete.
- if (!io_context.stopped())
- {
- // Close the socket to cancel the outstanding asynchronous operation.
- socket_.close();
-
- // Run the io_context again until the operation completes.
- io_context.run();
- }
-
- // If the operation failed, throw an exception. Otherwise return the result.
- return ec_ ? throw asio::system_error(ec_) : t_;
- }
-
-private:
- asio::chrono::steady_clock::duration timeout_;
- tcp_socket& socket_;
- asio::error_code ec_;
- T t_;
-};
-
-} // namespace asio
-
-//----------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
- try
- {
- if (argc != 4)
- {
- std::cerr << "Usage: blocking_tcp_client <host> <port> <message>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- // Resolve the host name and service to a list of endpoints.
- tcp::resolver::results_type endpoints =
- tcp::resolver(io_context).resolve(argv[1], argv[2]);
-
- tcp_socket socket(io_context);
-
- // Run an asynchronous connect operation with a timeout.
- asio::async_connect(socket, endpoints,
- close_after(asio::chrono::seconds(10), socket));
-
- asio::chrono::steady_clock::time_point time_sent =
- asio::chrono::steady_clock::now();
-
- // Run an asynchronous write operation with a timeout.
- std::string msg = argv[3] + std::string("\n");
- asio::async_write(socket, asio::buffer(msg),
- close_after(asio::chrono::seconds(10), socket));
-
- for (std::string input_buffer;;)
- {
- // Run an asynchronous read operation with a timeout.
- std::size_t n = asio::async_read_until(socket,
- asio::dynamic_buffer(input_buffer), '\n',
- close_after(asio::chrono::seconds(10), socket));
-
- std::string line(input_buffer.substr(0, n - 1));
- input_buffer.erase(0, n);
-
- // Keep going until we get back the line that was sent.
- if (line == argv[3])
- break;
- }
-
- asio::chrono::steady_clock::time_point time_received =
- asio::chrono::steady_clock::now();
-
- std::cout << "Round trip time: ";
- std::cout << asio::chrono::duration_cast<
- asio::chrono::microseconds>(
- time_received - time_sent).count();
- std::cout << " microseconds\n";
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp b/3rdparty/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp
deleted file mode 100644
index 43b55ef43ff..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timeouts/blocking_udp_client.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-//
-// blocking_udp_client.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include "asio/buffer.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/udp.hpp"
-#include <cstdlib>
-#include <boost/bind/bind.hpp>
-#include <iostream>
-
-using asio::ip::udp;
-
-//----------------------------------------------------------------------
-
-//
-// This class manages socket timeouts by running the io_context using the timed
-// io_context::run_for() member function. Each asynchronous operation is given
-// a timeout within which it must complete. The socket operations themselves
-// use boost::bind to specify the completion handler:
-//
-// +---------------+
-// | |
-// | receive |
-// | |
-// +---------------+
-// |
-// async_- | +----------------+
-// receive() | | |
-// +--->| handle_receive |
-// | |
-// +----------------+
-//
-// For a given socket operation, the client object runs the io_context to block
-// thread execution until the operation completes or the timeout is reached. If
-// the io_context::run_for() function times out, the socket is closed and the
-// outstanding asynchronous operation is cancelled.
-//
-class client
-{
-public:
- client(const udp::endpoint& listen_endpoint)
- : socket_(io_context_, listen_endpoint)
- {
- }
-
- std::size_t receive(const asio::mutable_buffer& buffer,
- asio::chrono::steady_clock::duration timeout,
- asio::error_code& ec)
- {
- // Start the asynchronous operation. The handle_receive function used as a
- // callback will update the ec and length variables.
- std::size_t length = 0;
- socket_.async_receive(asio::buffer(buffer),
- boost::bind(&client::handle_receive,
- boost::placeholders::_1, boost::placeholders::_2, &ec, &length));
-
- // Run the operation until it completes, or until the timeout.
- run(timeout);
-
- return length;
- }
-
-private:
- void run(asio::chrono::steady_clock::duration timeout)
- {
- // Restart the io_context, as it may have been left in the "stopped" state
- // by a previous operation.
- io_context_.restart();
-
- // Block until the asynchronous operation has completed, or timed out. If
- // the pending asynchronous operation is a composed operation, the deadline
- // applies to the entire operation, rather than individual operations on
- // the socket.
- io_context_.run_for(timeout);
-
- // If the asynchronous operation completed successfully then the io_context
- // would have been stopped due to running out of work. If it was not
- // stopped, then the io_context::run_for call must have timed out.
- if (!io_context_.stopped())
- {
- // Cancel the outstanding asynchronous operation.
- socket_.cancel();
-
- // Run the io_context again until the operation completes.
- io_context_.run();
- }
- }
-
- static void handle_receive(
- const asio::error_code& ec, std::size_t length,
- asio::error_code* out_ec, std::size_t* out_length)
- {
- *out_ec = ec;
- *out_length = length;
- }
-
-private:
- asio::io_context io_context_;
- udp::socket socket_;
-};
-
-//----------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
- try
- {
- using namespace std; // For atoi.
-
- if (argc != 3)
- {
- std::cerr << "Usage: blocking_udp_client <listen_addr> <listen_port>\n";
- return 1;
- }
-
- udp::endpoint listen_endpoint(
- asio::ip::make_address(argv[1]),
- std::atoi(argv[2]));
-
- client c(listen_endpoint);
-
- for (;;)
- {
- char data[1024];
- asio::error_code ec;
- std::size_t n = c.receive(asio::buffer(data),
- asio::chrono::seconds(10), ec);
-
- if (ec)
- {
- std::cout << "Receive error: " << ec.message() << "\n";
- }
- else
- {
- std::cout << "Received: ";
- std::cout.write(data, n);
- std::cout << "\n";
- }
- }
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/timeouts/server.cpp b/3rdparty/asio/src/examples/cpp03/timeouts/server.cpp
deleted file mode 100644
index bee77d414a2..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timeouts/server.cpp
+++ /dev/null
@@ -1,433 +0,0 @@
-//
-// server.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <algorithm>
-#include <cstdlib>
-#include <deque>
-#include <iostream>
-#include <set>
-#include <string>
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include "asio/buffer.hpp"
-#include "asio/io_context.hpp"
-#include "asio/ip/tcp.hpp"
-#include "asio/ip/udp.hpp"
-#include "asio/read_until.hpp"
-#include "asio/steady_timer.hpp"
-#include "asio/write.hpp"
-
-using asio::steady_timer;
-using asio::ip::tcp;
-using asio::ip::udp;
-
-//----------------------------------------------------------------------
-
-class subscriber
-{
-public:
- virtual ~subscriber() {}
- virtual void deliver(const std::string& msg) = 0;
-};
-
-typedef boost::shared_ptr<subscriber> subscriber_ptr;
-
-//----------------------------------------------------------------------
-
-class channel
-{
-public:
- void join(subscriber_ptr subscriber)
- {
- subscribers_.insert(subscriber);
- }
-
- void leave(subscriber_ptr subscriber)
- {
- subscribers_.erase(subscriber);
- }
-
- void deliver(const std::string& msg)
- {
- std::for_each(subscribers_.begin(), subscribers_.end(),
- boost::bind(&subscriber::deliver,
- boost::placeholders::_1, boost::ref(msg)));
- }
-
-private:
- std::set<subscriber_ptr> subscribers_;
-};
-
-//----------------------------------------------------------------------
-
-//
-// This class manages socket timeouts by applying the concept of a deadline.
-// Some asynchronous operations are given deadlines by which they must complete.
-// Deadlines are enforced by two "actors" that persist for the lifetime of the
-// session object, one for input and one for output:
-//
-// +----------------+ +----------------+
-// | | | |
-// | check_deadline |<---+ | check_deadline |<---+
-// | | | async_wait() | | | async_wait()
-// +----------------+ | on input +----------------+ | on output
-// | | deadline | | deadline
-// +---------+ +---------+
-//
-// If either deadline actor determines that the corresponding deadline has
-// expired, the socket is closed and any outstanding operations are cancelled.
-//
-// The input actor reads messages from the socket, where messages are delimited
-// by the newline character:
-//
-// +------------+
-// | |
-// | start_read |<---+
-// | | |
-// +------------+ |
-// | |
-// async_- | +-------------+
-// read_- | | |
-// until() +--->| handle_read |
-// | |
-// +-------------+
-//
-// The deadline for receiving a complete message is 30 seconds. If a non-empty
-// message is received, it is delivered to all subscribers. If a heartbeat (a
-// message that consists of a single newline character) is received, a heartbeat
-// is enqueued for the client, provided there are no other messages waiting to
-// be sent.
-//
-// The output actor is responsible for sending messages to the client:
-//
-// +--------------+
-// | |<---------------------+
-// | await_output | |
-// | |<---+ |
-// +--------------+ | |
-// | | | async_wait() |
-// | +--------+ |
-// V |
-// +-------------+ +--------------+
-// | | async_write() | |
-// | start_write |-------------->| handle_write |
-// | | | |
-// +-------------+ +--------------+
-//
-// The output actor first waits for an output message to be enqueued. It does
-// this by using a steady_timer as an asynchronous condition variable. The
-// steady_timer will be signalled whenever the output queue is non-empty.
-//
-// Once a message is available, it is sent to the client. The deadline for
-// sending a complete message is 30 seconds. After the message is successfully
-// sent, the output actor again waits for the output queue to become non-empty.
-//
-class tcp_session
- : public subscriber,
- public boost::enable_shared_from_this<tcp_session>
-{
-public:
- tcp_session(asio::io_context& io_context, channel& ch)
- : channel_(ch),
- socket_(io_context),
- input_deadline_(io_context),
- non_empty_output_queue_(io_context),
- output_deadline_(io_context)
- {
- input_deadline_.expires_at(steady_timer::time_point::max());
- output_deadline_.expires_at(steady_timer::time_point::max());
-
- // The non_empty_output_queue_ steady_timer is set to the maximum time
- // point whenever the output queue is empty. This ensures that the output
- // actor stays asleep until a message is put into the queue.
- non_empty_output_queue_.expires_at(steady_timer::time_point::max());
- }
-
- tcp::socket& socket()
- {
- return socket_;
- }
-
- // Called by the server object to initiate the four actors.
- void start()
- {
- channel_.join(shared_from_this());
-
- start_read();
-
- input_deadline_.async_wait(
- boost::bind(&tcp_session::check_deadline,
- shared_from_this(), &input_deadline_));
-
- await_output();
-
- output_deadline_.async_wait(
- boost::bind(&tcp_session::check_deadline,
- shared_from_this(), &output_deadline_));
- }
-
-private:
- void stop()
- {
- channel_.leave(shared_from_this());
-
- asio::error_code ignored_ec;
- socket_.close(ignored_ec);
- input_deadline_.cancel();
- non_empty_output_queue_.cancel();
- output_deadline_.cancel();
- }
-
- bool stopped() const
- {
- return !socket_.is_open();
- }
-
- void deliver(const std::string& msg)
- {
- output_queue_.push_back(msg + "\n");
-
- // Signal that the output queue contains messages. Modifying the expiry
- // will wake the output actor, if it is waiting on the timer.
- non_empty_output_queue_.expires_at(steady_timer::time_point::min());
- }
-
- void start_read()
- {
- // Set a deadline for the read operation.
- input_deadline_.expires_after(asio::chrono::seconds(30));
-
- // Start an asynchronous operation to read a newline-delimited message.
- asio::async_read_until(socket_,
- asio::dynamic_buffer(input_buffer_), '\n',
- boost::bind(&tcp_session::handle_read, shared_from_this(),
- boost::placeholders::_1, boost::placeholders::_2));
- }
-
- void handle_read(const asio::error_code& ec, std::size_t n)
- {
- if (stopped())
- return;
-
- if (!ec)
- {
- // Extract the newline-delimited message from the buffer.
- std::string msg(input_buffer_.substr(0, n - 1));
- input_buffer_.erase(0, n);
-
- if (!msg.empty())
- {
- channel_.deliver(msg);
- }
- else
- {
- // We received a heartbeat message from the client. If there's nothing
- // else being sent or ready to be sent, send a heartbeat right back.
- if (output_queue_.empty())
- {
- output_queue_.push_back("\n");
-
- // Signal that the output queue contains messages. Modifying the
- // expiry will wake the output actor, if it is waiting on the timer.
- non_empty_output_queue_.expires_at(steady_timer::time_point::min());
- }
- }
-
- start_read();
- }
- else
- {
- stop();
- }
- }
-
- void await_output()
- {
- if (stopped())
- return;
-
- if (output_queue_.empty())
- {
- // There are no messages that are ready to be sent. The actor goes to
- // sleep by waiting on the non_empty_output_queue_ timer. When a new
- // message is added, the timer will be modified and the actor will wake.
- non_empty_output_queue_.expires_at(steady_timer::time_point::max());
- non_empty_output_queue_.async_wait(
- boost::bind(&tcp_session::await_output, shared_from_this()));
- }
- else
- {
- start_write();
- }
- }
-
- void start_write()
- {
- // Set a deadline for the write operation.
- output_deadline_.expires_after(asio::chrono::seconds(30));
-
- // Start an asynchronous operation to send a message.
- asio::async_write(socket_,
- asio::buffer(output_queue_.front()),
- boost::bind(&tcp_session::handle_write,
- shared_from_this(), boost::placeholders::_1));
- }
-
- void handle_write(const asio::error_code& ec)
- {
- if (stopped())
- return;
-
- if (!ec)
- {
- output_queue_.pop_front();
-
- await_output();
- }
- else
- {
- stop();
- }
- }
-
- void check_deadline(steady_timer* deadline)
- {
- if (stopped())
- return;
-
- // Check whether the deadline has passed. We compare the deadline against
- // the current time since a new asynchronous operation may have moved the
- // deadline before this actor had a chance to run.
- if (deadline->expiry() <= steady_timer::clock_type::now())
- {
- // The deadline has passed. Stop the session. The other actors will
- // terminate as soon as possible.
- stop();
- }
- else
- {
- // Put the actor back to sleep.
- deadline->async_wait(
- boost::bind(&tcp_session::check_deadline,
- shared_from_this(), deadline));
- }
- }
-
- channel& channel_;
- tcp::socket socket_;
- std::string input_buffer_;
- steady_timer input_deadline_;
- std::deque<std::string> output_queue_;
- steady_timer non_empty_output_queue_;
- steady_timer output_deadline_;
-};
-
-typedef boost::shared_ptr<tcp_session> tcp_session_ptr;
-
-//----------------------------------------------------------------------
-
-class udp_broadcaster
- : public subscriber
-{
-public:
- udp_broadcaster(asio::io_context& io_context,
- const udp::endpoint& broadcast_endpoint)
- : socket_(io_context)
- {
- socket_.connect(broadcast_endpoint);
- socket_.set_option(udp::socket::broadcast(true));
- }
-
-private:
- void deliver(const std::string& msg)
- {
- asio::error_code ignored_ec;
- socket_.send(asio::buffer(msg), 0, ignored_ec);
- }
-
- udp::socket socket_;
-};
-
-//----------------------------------------------------------------------
-
-class server
-{
-public:
- server(asio::io_context& io_context,
- const tcp::endpoint& listen_endpoint,
- const udp::endpoint& broadcast_endpoint)
- : io_context_(io_context),
- acceptor_(io_context, listen_endpoint)
- {
- subscriber_ptr bc(new udp_broadcaster(io_context_, broadcast_endpoint));
- channel_.join(bc);
-
- start_accept();
- }
-
- void start_accept()
- {
- tcp_session_ptr new_session(new tcp_session(io_context_, channel_));
-
- acceptor_.async_accept(new_session->socket(),
- boost::bind(&server::handle_accept,
- this, new_session, boost::placeholders::_1));
- }
-
- void handle_accept(tcp_session_ptr session,
- const asio::error_code& ec)
- {
- if (!ec)
- {
- session->start();
- }
-
- start_accept();
- }
-
-private:
- asio::io_context& io_context_;
- tcp::acceptor acceptor_;
- channel channel_;
-};
-
-//----------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
- try
- {
- using namespace std; // For atoi.
-
- if (argc != 4)
- {
- std::cerr << "Usage: server <listen_port> <bcast_address> <bcast_port>\n";
- return 1;
- }
-
- asio::io_context io_context;
-
- tcp::endpoint listen_endpoint(tcp::v4(), atoi(argv[1]));
-
- udp::endpoint broadcast_endpoint(
- asio::ip::make_address(argv[2]), atoi(argv[3]));
-
- server s(io_context, listen_endpoint, broadcast_endpoint);
-
- io_context.run();
- }
- catch (std::exception& e)
- {
- std::cerr << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp03/timers/time_t_timer.cpp b/3rdparty/asio/src/examples/cpp03/timers/time_t_timer.cpp
deleted file mode 100644
index 74426b3c71d..00000000000
--- a/3rdparty/asio/src/examples/cpp03/timers/time_t_timer.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-//
-// time_t_timer.cpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-#include <asio.hpp>
-#include <ctime>
-#include <iostream>
-
-// A custom implementation of the Clock concept from the standard C++ library.
-struct time_t_clock
-{
- // The duration type.
- typedef asio::chrono::steady_clock::duration duration;
-
- // The duration's underlying arithmetic representation.
- typedef duration::rep rep;
-
- // The ratio representing the duration's tick period.
- typedef duration::period period;
-
- // An absolute time point represented using the clock.
- typedef asio::chrono::time_point<time_t_clock> time_point;
-
- // The clock is not monotonically increasing.
- static const bool is_steady = false;
-
- // Get the current time.
- static time_point now()
- {
- return time_point() + asio::chrono::seconds(std::time(0));
- }
-};
-
-// The asio::basic_waitable_timer template accepts an optional WaitTraits
-// template parameter. The underlying time_t clock has one-second granularity,
-// so these traits may be customised to reduce the latency between the clock
-// ticking over and a wait operation's completion. When the timeout is near
-// (less than one second away) we poll the clock more frequently to detect the
-// time change closer to when it occurs. The user can select the appropriate
-// trade off between accuracy and the increased CPU cost of polling. In extreme
-// cases, a zero duration may be returned to make the timers as accurate as
-// possible, albeit with 100% CPU usage.
-struct time_t_wait_traits
-{
- // Determine how long until the clock should be next polled to determine
- // whether the duration has elapsed.
- static time_t_clock::duration to_wait_duration(
- const time_t_clock::duration& d)
- {
- if (d > asio::chrono::seconds(1))
- return d - asio::chrono::seconds(1);
- else if (d > asio::chrono::seconds(0))
- return asio::chrono::milliseconds(10);
- else
- return asio::chrono::seconds(0);
- }
-
- // Determine how long until the clock should be next polled to determine
- // whether the absoluate time has been reached.
- static time_t_clock::duration to_wait_duration(
- const time_t_clock::time_point& t)
- {
- return to_wait_duration(t - time_t_clock::now());
- }
-};
-
-typedef asio::basic_waitable_timer<
- time_t_clock, time_t_wait_traits> time_t_timer;
-
-void handle_timeout(const asio::error_code&)
-{
- std::cout << "handle_timeout\n";
-}
-
-int main()
-{
- try
- {
- asio::io_context io_context;
-
- time_t_timer timer(io_context);
-
- timer.expires_after(asio::chrono::seconds(5));
- std::cout << "Starting synchronous wait\n";
- timer.wait();
- std::cout << "Finished synchronous wait\n";
-
- timer.expires_after(asio::chrono::seconds(5));
- std::cout << "Starting asynchronous wait\n";
- timer.async_wait(&handle_timeout);
- io_context.run();
- std::cout << "Finished asynchronous wait\n";
- }
- catch (std::exception& e)
- {
- std::cout << "Exception: " << e.what() << "\n";
- }
-
- return 0;
-}
diff --git a/3rdparty/asio/src/examples/cpp11/Makefile.am b/3rdparty/asio/src/examples/cpp11/Makefile.am
index bc2e1034021..a132a469ff5 100644
--- a/3rdparty/asio/src/examples/cpp11/Makefile.am
+++ b/3rdparty/asio/src/examples/cpp11/Makefile.am
@@ -14,6 +14,8 @@ noinst_PROGRAMS = \
buffers/reference_counted \
chat/chat_client \
chat/chat_server \
+ deferred/deferred_1 \
+ deferred/deferred_2 \
echo/async_tcp_echo_server \
echo/async_udp_echo_server \
echo/blocking_tcp_echo_client \
@@ -26,10 +28,20 @@ noinst_PROGRAMS = \
executors/fork_join \
executors/pipeline \
executors/priority_scheduler \
+ files/blocking_file_copy \
+ files/async_file_copy \
futures/daytime_client \
handler_tracking/async_tcp_echo_server \
+ http/client/async_client \
+ http/client/sync_client \
http/server/http_server \
+ http/server2/http_server \
+ http/server3/http_server \
+ http/server4/http_server \
+ icmp/ping \
invocation/prioritised_handlers \
+ iostreams/daytime_client \
+ iostreams/daytime_server \
iostreams/http_client \
multicast/receiver \
multicast/sender \
@@ -42,22 +54,51 @@ noinst_PROGRAMS = \
operations/composed_6 \
operations/composed_7 \
operations/composed_8 \
+ parallel_group/ranged_wait_for_all \
+ parallel_group/wait_for_all \
+ parallel_group/wait_for_one \
+ parallel_group/wait_for_one_error \
+ parallel_group/wait_for_one_success \
+ porthopper/client \
+ porthopper/server \
+ services/daytime_client \
socks4/sync_client \
timeouts/async_tcp_client \
timeouts/blocking_tcp_client \
timeouts/blocking_token_tcp_client \
timeouts/blocking_udp_client \
timeouts/server \
- timers/time_t_timer
+ timers/time_t_timer \
+ tutorial/timer1/timer \
+ tutorial/timer2/timer \
+ tutorial/timer3/timer \
+ tutorial/timer4/timer \
+ tutorial/timer5/timer \
+ tutorial/daytime1/client \
+ tutorial/daytime2/server \
+ tutorial/daytime3/server \
+ tutorial/daytime4/client \
+ tutorial/daytime5/server \
+ tutorial/daytime6/server \
+ tutorial/daytime7/server \
+ type_erasure/type_erasure
if !WINDOWS_TARGET
noinst_PROGRAMS += \
+ chat/posix_chat_client \
fork/daemon \
fork/process_per_connection \
local/connect_pair \
local/iostream_client \
local/stream_server \
- local/stream_client
+ local/stream_client \
+ local/fd_passing_stream_server \
+ local/fd_passing_stream_client
+endif
+
+if WINDOWS_TARGET
+noinst_PROGRAMS += \
+ windows/transmit_file
endif
if HAVE_OPENSSL
@@ -73,8 +114,51 @@ noinst_PROGRAMS += \
endif
noinst_HEADERS = \
+ chat/chat_message.hpp \
+ handler_tracking/custom_tracking.hpp \
+ http/server/connection.hpp \
+ http/server/connection_manager.hpp \
+ http/server/header.hpp \
+ http/server/mime_types.hpp \
+ http/server/reply.hpp \
+ http/server/request.hpp \
+ http/server/request_handler.hpp \
+ http/server/request_parser.hpp \
+ http/server/server.hpp \
+ http/server2/connection.hpp \
+ http/server2/io_context_pool.hpp \
+ http/server2/header.hpp \
+ http/server2/mime_types.hpp \
+ http/server2/reply.hpp \
+ http/server2/request.hpp \
+ http/server2/request_handler.hpp \
+ http/server2/request_parser.hpp \
+ http/server2/server.hpp \
+ http/server3/connection.hpp \
+ http/server3/header.hpp \
+ http/server3/mime_types.hpp \
+ http/server3/reply.hpp \
+ http/server3/request.hpp \
+ http/server3/request_handler.hpp \
+ http/server3/request_parser.hpp \
+ http/server3/server.hpp \
+ http/server4/file_handler.hpp \
+ http/server4/header.hpp \
+ http/server4/mime_types.hpp \
+ http/server4/reply.hpp \
+ http/server4/request.hpp \
+ http/server4/request_parser.hpp \
+ http/server4/server.hpp \
+ icmp/icmp_header.hpp \
+ icmp/ipv4_header.hpp \
+ porthopper/protocol.hpp \
+ services/basic_logger.hpp \
+ services/logger.hpp \
+ services/logger_service.hpp \
socks4/socks4.hpp \
- chat/chat_message.hpp
+ type_erasure/line_reader.hpp \
+ type_erasure/stdin_line_reader.hpp \
+ type_erasure/sleep.hpp
AM_CXXFLAGS = -I$(srcdir)/../../../include
@@ -82,6 +166,8 @@ allocation_server_SOURCES = allocation/server.cpp
buffers_reference_counted_SOURCES = buffers/reference_counted.cpp
chat_chat_client_SOURCES = chat/chat_client.cpp
chat_chat_server_SOURCES = chat/chat_server.cpp
+deferred_deferred_1_SOURCES = deferred/deferred_1.cpp
+deferred_deferred_2_SOURCES = deferred/deferred_2.cpp
echo_async_tcp_echo_server_SOURCES = echo/async_tcp_echo_server.cpp
echo_async_udp_echo_server_SOURCES = echo/async_udp_echo_server.cpp
echo_blocking_tcp_echo_client_SOURCES = echo/blocking_tcp_echo_client.cpp
@@ -94,8 +180,12 @@ executors_bank_account_2_SOURCES = executors/bank_account_2.cpp
executors_fork_join_SOURCES = executors/fork_join.cpp
executors_pipeline_SOURCES = executors/pipeline.cpp
executors_priority_scheduler_SOURCES = executors/priority_scheduler.cpp
+files_blocking_file_copy_SOURCES = files/blocking_file_copy.cpp
+files_async_file_copy_SOURCES = files/async_file_copy.cpp
futures_daytime_client_SOURCES = futures/daytime_client.cpp
handler_tracking_async_tcp_echo_server_SOURCES = handler_tracking/async_tcp_echo_server.cpp
+http_client_async_client_SOURCES = http/client/async_client.cpp
+http_client_sync_client_SOURCES = http/client/sync_client.cpp
http_server_http_server_SOURCES = \
http/server/connection.cpp \
http/server/connection_manager.cpp \
@@ -105,7 +195,34 @@ http_server_http_server_SOURCES = \
http/server/request_handler.cpp \
http/server/request_parser.cpp \
http/server/server.cpp
+http_server2_http_server_SOURCES = \
+ http/server2/connection.cpp \
+ http/server2/io_context_pool.cpp \
+ http/server2/main.cpp \
+ http/server2/mime_types.cpp \
+ http/server2/reply.cpp \
+ http/server2/request_handler.cpp \
+ http/server2/request_parser.cpp \
+ http/server2/server.cpp
+http_server3_http_server_SOURCES = \
+ http/server3/connection.cpp \
+ http/server3/main.cpp \
+ http/server3/mime_types.cpp \
+ http/server3/reply.cpp \
+ http/server3/request_handler.cpp \
+ http/server3/request_parser.cpp \
+ http/server3/server.cpp
+http_server4_http_server_SOURCES = \
+ http/server4/file_handler.cpp \
+ http/server4/main.cpp \
+ http/server4/mime_types.cpp \
+ http/server4/reply.cpp \
+ http/server4/request_parser.cpp \
+ http/server4/server.cpp
+icmp_ping_SOURCES = icmp/ping.cpp
invocation_prioritised_handlers_SOURCES = invocation/prioritised_handlers.cpp
+iostreams_daytime_client_SOURCES = iostreams/daytime_client.cpp
+iostreams_daytime_server_SOURCES = iostreams/daytime_server.cpp
iostreams_http_client_SOURCES = iostreams/http_client.cpp
multicast_receiver_SOURCES = multicast/receiver.cpp
multicast_sender_SOURCES = multicast/sender.cpp
@@ -118,6 +235,16 @@ operations_composed_5_SOURCES = operations/composed_5.cpp
operations_composed_6_SOURCES = operations/composed_6.cpp
operations_composed_7_SOURCES = operations/composed_7.cpp
operations_composed_8_SOURCES = operations/composed_8.cpp
+parallel_group_ranged_wait_for_all_SOURCES = parallel_group/ranged_wait_for_all.cpp
+parallel_group_wait_for_all_SOURCES = parallel_group/wait_for_all.cpp
+parallel_group_wait_for_one_SOURCES = parallel_group/wait_for_one.cpp
+parallel_group_wait_for_one_error_SOURCES = parallel_group/wait_for_one_error.cpp
+parallel_group_wait_for_one_success_SOURCES = parallel_group/wait_for_one_success.cpp
+porthopper_client_SOURCES = porthopper/client.cpp
+porthopper_server_SOURCES = porthopper/server.cpp
+services_daytime_client_SOURCES = \
+ services/daytime_client.cpp \
+ services/logger_service.cpp
socks4_sync_client_SOURCES = socks4/sync_client.cpp
timeouts_async_tcp_client_SOURCES = timeouts/async_tcp_client.cpp
timeouts_blocking_tcp_client_SOURCES = timeouts/blocking_tcp_client.cpp
@@ -125,14 +252,34 @@ timeouts_blocking_token_tcp_client_SOURCES = timeouts/blocking_token_tcp_client.
timeouts_blocking_udp_client_SOURCES = timeouts/blocking_udp_client.cpp
timeouts_server_SOURCES = timeouts/server.cpp
timers_time_t_timer_SOURCES = timers/time_t_timer.cpp
+tutorial_timer1_timer_SOURCES = tutorial/timer1/timer.cpp
+tutorial_timer2_timer_SOURCES = tutorial/timer2/timer.cpp
+tutorial_timer3_timer_SOURCES = tutorial/timer3/timer.cpp
+tutorial_timer4_timer_SOURCES = tutorial/timer4/timer.cpp
+tutorial_timer5_timer_SOURCES = tutorial/timer5/timer.cpp
+tutorial_daytime1_client_SOURCES = tutorial/daytime1/client.cpp
+tutorial_daytime2_server_SOURCES = tutorial/daytime2/server.cpp
+tutorial_daytime3_server_SOURCES = tutorial/daytime3/server.cpp
+tutorial_daytime4_client_SOURCES = tutorial/daytime4/client.cpp
+tutorial_daytime5_server_SOURCES = tutorial/daytime5/server.cpp
+tutorial_daytime6_server_SOURCES = tutorial/daytime6/server.cpp
+tutorial_daytime7_server_SOURCES = tutorial/daytime7/server.cpp
+type_erasure_type_erasure_SOURCES = type_erasure/main.cpp type_erasure/stdin_line_reader.cpp type_erasure/sleep.cpp
if !WINDOWS_TARGET
+chat_posix_chat_client_SOURCES = chat/posix_chat_client.cpp
fork_daemon_SOURCES = fork/daemon.cpp
fork_process_per_connection_SOURCES = fork/process_per_connection.cpp
local_connect_pair_SOURCES = local/connect_pair.cpp
local_iostream_client_SOURCES = local/iostream_client.cpp
local_stream_server_SOURCES = local/stream_server.cpp
local_stream_client_SOURCES = local/stream_client.cpp
+local_fd_passing_stream_server_SOURCES = local/fd_passing_stream_server.cpp
+local_fd_passing_stream_client_SOURCES = local/fd_passing_stream_client.cpp
+endif
+
+if WINDOWS_TARGET
+windows_transmit_file_SOURCES = windows/transmit_file.cpp
endif
if HAVE_OPENSSL
@@ -148,16 +295,14 @@ spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_t
endif
EXTRA_DIST = \
- handler_tracking/custom_tracking.hpp \
- http/server/connection.hpp \
- http/server/connection_manager.hpp \
- http/server/header.hpp \
- http/server/mime_types.hpp \
- http/server/reply.hpp \
- http/server/request.hpp \
- http/server/request_handler.hpp \
- http/server/request_parser.hpp \
- http/server/server.hpp
+ serialization/client.cpp \
+ serialization/server.cpp \
+ serialization/connection.hpp \
+ serialization/stock.hpp \
+ ssl/README \
+ ssl/ca.pem \
+ ssl/server.pem \
+ ssl/dh4096.pem
MAINTAINERCLEANFILES = \
$(srcdir)/Makefile.in
diff --git a/3rdparty/asio/src/examples/cpp11/Makefile.in b/3rdparty/asio/src/examples/cpp11/Makefile.in
index beb10c2cce5..0f73bb5b85a 100644
--- a/3rdparty/asio/src/examples/cpp11/Makefile.in
+++ b/3rdparty/asio/src/examples/cpp11/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -93,7 +93,9 @@ host_triplet = @host@
@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__append_1 = ../../asio_ssl.cpp
noinst_PROGRAMS = allocation/server$(EXEEXT) \
buffers/reference_counted$(EXEEXT) chat/chat_client$(EXEEXT) \
- chat/chat_server$(EXEEXT) echo/async_tcp_echo_server$(EXEEXT) \
+ chat/chat_server$(EXEEXT) deferred/deferred_1$(EXEEXT) \
+ deferred/deferred_2$(EXEEXT) \
+ echo/async_tcp_echo_server$(EXEEXT) \
echo/async_udp_echo_server$(EXEEXT) \
echo/blocking_tcp_echo_client$(EXEEXT) \
echo/blocking_tcp_echo_server$(EXEEXT) \
@@ -103,35 +105,66 @@ noinst_PROGRAMS = allocation/server$(EXEEXT) \
executors/bank_account_2$(EXEEXT) executors/fork_join$(EXEEXT) \
executors/pipeline$(EXEEXT) \
executors/priority_scheduler$(EXEEXT) \
- futures/daytime_client$(EXEEXT) \
+ files/blocking_file_copy$(EXEEXT) \
+ files/async_file_copy$(EXEEXT) futures/daytime_client$(EXEEXT) \
handler_tracking/async_tcp_echo_server$(EXEEXT) \
+ http/client/async_client$(EXEEXT) \
+ http/client/sync_client$(EXEEXT) \
http/server/http_server$(EXEEXT) \
+ http/server2/http_server$(EXEEXT) \
+ http/server3/http_server$(EXEEXT) \
+ http/server4/http_server$(EXEEXT) icmp/ping$(EXEEXT) \
invocation/prioritised_handlers$(EXEEXT) \
+ iostreams/daytime_client$(EXEEXT) \
+ iostreams/daytime_server$(EXEEXT) \
iostreams/http_client$(EXEEXT) multicast/receiver$(EXEEXT) \
multicast/sender$(EXEEXT) nonblocking/third_party_lib$(EXEEXT) \
operations/composed_1$(EXEEXT) operations/composed_2$(EXEEXT) \
operations/composed_3$(EXEEXT) operations/composed_4$(EXEEXT) \
operations/composed_5$(EXEEXT) operations/composed_6$(EXEEXT) \
operations/composed_7$(EXEEXT) operations/composed_8$(EXEEXT) \
- socks4/sync_client$(EXEEXT) timeouts/async_tcp_client$(EXEEXT) \
+ parallel_group/ranged_wait_for_all$(EXEEXT) \
+ parallel_group/wait_for_all$(EXEEXT) \
+ parallel_group/wait_for_one$(EXEEXT) \
+ parallel_group/wait_for_one_error$(EXEEXT) \
+ parallel_group/wait_for_one_success$(EXEEXT) \
+ porthopper/client$(EXEEXT) porthopper/server$(EXEEXT) \
+ services/daytime_client$(EXEEXT) socks4/sync_client$(EXEEXT) \
+ timeouts/async_tcp_client$(EXEEXT) \
timeouts/blocking_tcp_client$(EXEEXT) \
timeouts/blocking_token_tcp_client$(EXEEXT) \
timeouts/blocking_udp_client$(EXEEXT) timeouts/server$(EXEEXT) \
- timers/time_t_timer$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \
- $(am__EXEEXT_3)
+ timers/time_t_timer$(EXEEXT) tutorial/timer1/timer$(EXEEXT) \
+ tutorial/timer2/timer$(EXEEXT) tutorial/timer3/timer$(EXEEXT) \
+ tutorial/timer4/timer$(EXEEXT) tutorial/timer5/timer$(EXEEXT) \
+ tutorial/daytime1/client$(EXEEXT) \
+ tutorial/daytime2/server$(EXEEXT) \
+ tutorial/daytime3/server$(EXEEXT) \
+ tutorial/daytime4/client$(EXEEXT) \
+ tutorial/daytime5/server$(EXEEXT) \
+ tutorial/daytime6/server$(EXEEXT) \
+ tutorial/daytime7/server$(EXEEXT) \
+ type_erasure/type_erasure$(EXEEXT) $(am__EXEEXT_1) \
+ $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4)
@WINDOWS_TARGET_FALSE@am__append_2 = \
+@WINDOWS_TARGET_FALSE@ chat/posix_chat_client \
@WINDOWS_TARGET_FALSE@ fork/daemon \
@WINDOWS_TARGET_FALSE@ fork/process_per_connection \
@WINDOWS_TARGET_FALSE@ local/connect_pair \
@WINDOWS_TARGET_FALSE@ local/iostream_client \
@WINDOWS_TARGET_FALSE@ local/stream_server \
-@WINDOWS_TARGET_FALSE@ local/stream_client
+@WINDOWS_TARGET_FALSE@ local/stream_client \
+@WINDOWS_TARGET_FALSE@ local/fd_passing_stream_server \
+@WINDOWS_TARGET_FALSE@ local/fd_passing_stream_client
-@HAVE_OPENSSL_TRUE@am__append_3 = \
+@WINDOWS_TARGET_TRUE@am__append_3 = \
+@WINDOWS_TARGET_TRUE@ windows/transmit_file
+
+@HAVE_OPENSSL_TRUE@am__append_4 = \
@HAVE_OPENSSL_TRUE@ ssl/client \
@HAVE_OPENSSL_TRUE@ ssl/server
-@HAVE_BOOST_COROUTINE_TRUE@am__append_4 = \
+@HAVE_BOOST_COROUTINE_TRUE@am__append_5 = \
@HAVE_BOOST_COROUTINE_TRUE@ spawn/echo_server \
@HAVE_BOOST_COROUTINE_TRUE@ spawn/parallel_grep
@@ -145,15 +178,19 @@ DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-@WINDOWS_TARGET_FALSE@am__EXEEXT_1 = fork/daemon$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@am__EXEEXT_1 = chat/posix_chat_client$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ fork/daemon$(EXEEXT) \
@WINDOWS_TARGET_FALSE@ fork/process_per_connection$(EXEEXT) \
@WINDOWS_TARGET_FALSE@ local/connect_pair$(EXEEXT) \
@WINDOWS_TARGET_FALSE@ local/iostream_client$(EXEEXT) \
@WINDOWS_TARGET_FALSE@ local/stream_server$(EXEEXT) \
-@WINDOWS_TARGET_FALSE@ local/stream_client$(EXEEXT)
-@HAVE_OPENSSL_TRUE@am__EXEEXT_2 = ssl/client$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ local/stream_client$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ local/fd_passing_stream_server$(EXEEXT) \
+@WINDOWS_TARGET_FALSE@ local/fd_passing_stream_client$(EXEEXT)
+@WINDOWS_TARGET_TRUE@am__EXEEXT_2 = windows/transmit_file$(EXEEXT)
+@HAVE_OPENSSL_TRUE@am__EXEEXT_3 = ssl/client$(EXEEXT) \
@HAVE_OPENSSL_TRUE@ ssl/server$(EXEEXT)
-@HAVE_BOOST_COROUTINE_TRUE@am__EXEEXT_3 = spawn/echo_server$(EXEEXT) \
+@HAVE_BOOST_COROUTINE_TRUE@am__EXEEXT_4 = spawn/echo_server$(EXEEXT) \
@HAVE_BOOST_COROUTINE_TRUE@ spawn/parallel_grep$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
LIBRARIES = $(noinst_LIBRARIES)
@@ -191,6 +228,23 @@ am_chat_chat_server_OBJECTS = chat/chat_server.$(OBJEXT)
chat_chat_server_OBJECTS = $(am_chat_chat_server_OBJECTS)
chat_chat_server_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@chat_chat_server_DEPENDENCIES = libasio.a
+am__chat_posix_chat_client_SOURCES_DIST = chat/posix_chat_client.cpp
+@WINDOWS_TARGET_FALSE@am_chat_posix_chat_client_OBJECTS = \
+@WINDOWS_TARGET_FALSE@ chat/posix_chat_client.$(OBJEXT)
+chat_posix_chat_client_OBJECTS = $(am_chat_posix_chat_client_OBJECTS)
+chat_posix_chat_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@chat_posix_chat_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_deferred_deferred_1_OBJECTS = deferred/deferred_1.$(OBJEXT)
+deferred_deferred_1_OBJECTS = $(am_deferred_deferred_1_OBJECTS)
+deferred_deferred_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@deferred_deferred_1_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_deferred_deferred_2_OBJECTS = deferred/deferred_2.$(OBJEXT)
+deferred_deferred_2_OBJECTS = $(am_deferred_deferred_2_OBJECTS)
+deferred_deferred_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@deferred_deferred_2_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_echo_async_tcp_echo_server_OBJECTS = \
echo/async_tcp_echo_server.$(OBJEXT)
echo_async_tcp_echo_server_OBJECTS = \
@@ -268,6 +322,18 @@ executors_priority_scheduler_OBJECTS = \
executors_priority_scheduler_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@executors_priority_scheduler_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_files_async_file_copy_OBJECTS = files/async_file_copy.$(OBJEXT)
+files_async_file_copy_OBJECTS = $(am_files_async_file_copy_OBJECTS)
+files_async_file_copy_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@files_async_file_copy_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_files_blocking_file_copy_OBJECTS = \
+ files/blocking_file_copy.$(OBJEXT)
+files_blocking_file_copy_OBJECTS = \
+ $(am_files_blocking_file_copy_OBJECTS)
+files_blocking_file_copy_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@files_blocking_file_copy_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am__fork_daemon_SOURCES_DIST = fork/daemon.cpp
@WINDOWS_TARGET_FALSE@am_fork_daemon_OBJECTS = fork/daemon.$(OBJEXT)
fork_daemon_OBJECTS = $(am_fork_daemon_OBJECTS)
@@ -294,6 +360,20 @@ handler_tracking_async_tcp_echo_server_OBJECTS = \
handler_tracking_async_tcp_echo_server_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@handler_tracking_async_tcp_echo_server_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_http_client_async_client_OBJECTS = \
+ http/client/async_client.$(OBJEXT)
+http_client_async_client_OBJECTS = \
+ $(am_http_client_async_client_OBJECTS)
+http_client_async_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@http_client_async_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_http_client_sync_client_OBJECTS = \
+ http/client/sync_client.$(OBJEXT)
+http_client_sync_client_OBJECTS = \
+ $(am_http_client_sync_client_OBJECTS)
+http_client_sync_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@http_client_sync_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_http_server_http_server_OBJECTS = http/server/connection.$(OBJEXT) \
http/server/connection_manager.$(OBJEXT) \
http/server/main.$(OBJEXT) http/server/mime_types.$(OBJEXT) \
@@ -306,6 +386,45 @@ http_server_http_server_OBJECTS = \
http_server_http_server_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@http_server_http_server_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_http_server2_http_server_OBJECTS = \
+ http/server2/connection.$(OBJEXT) \
+ http/server2/io_context_pool.$(OBJEXT) \
+ http/server2/main.$(OBJEXT) http/server2/mime_types.$(OBJEXT) \
+ http/server2/reply.$(OBJEXT) \
+ http/server2/request_handler.$(OBJEXT) \
+ http/server2/request_parser.$(OBJEXT) \
+ http/server2/server.$(OBJEXT)
+http_server2_http_server_OBJECTS = \
+ $(am_http_server2_http_server_OBJECTS)
+http_server2_http_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@http_server2_http_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_http_server3_http_server_OBJECTS = \
+ http/server3/connection.$(OBJEXT) http/server3/main.$(OBJEXT) \
+ http/server3/mime_types.$(OBJEXT) http/server3/reply.$(OBJEXT) \
+ http/server3/request_handler.$(OBJEXT) \
+ http/server3/request_parser.$(OBJEXT) \
+ http/server3/server.$(OBJEXT)
+http_server3_http_server_OBJECTS = \
+ $(am_http_server3_http_server_OBJECTS)
+http_server3_http_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@http_server3_http_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_http_server4_http_server_OBJECTS = \
+ http/server4/file_handler.$(OBJEXT) \
+ http/server4/main.$(OBJEXT) http/server4/mime_types.$(OBJEXT) \
+ http/server4/reply.$(OBJEXT) \
+ http/server4/request_parser.$(OBJEXT) \
+ http/server4/server.$(OBJEXT)
+http_server4_http_server_OBJECTS = \
+ $(am_http_server4_http_server_OBJECTS)
+http_server4_http_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@http_server4_http_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_icmp_ping_OBJECTS = icmp/ping.$(OBJEXT)
+icmp_ping_OBJECTS = $(am_icmp_ping_OBJECTS)
+icmp_ping_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@icmp_ping_DEPENDENCIES = libasio.a
am_invocation_prioritised_handlers_OBJECTS = \
invocation/prioritised_handlers.$(OBJEXT)
invocation_prioritised_handlers_OBJECTS = \
@@ -313,6 +432,20 @@ invocation_prioritised_handlers_OBJECTS = \
invocation_prioritised_handlers_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@invocation_prioritised_handlers_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_iostreams_daytime_client_OBJECTS = \
+ iostreams/daytime_client.$(OBJEXT)
+iostreams_daytime_client_OBJECTS = \
+ $(am_iostreams_daytime_client_OBJECTS)
+iostreams_daytime_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@iostreams_daytime_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_iostreams_daytime_server_OBJECTS = \
+ iostreams/daytime_server.$(OBJEXT)
+iostreams_daytime_server_OBJECTS = \
+ $(am_iostreams_daytime_server_OBJECTS)
+iostreams_daytime_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@iostreams_daytime_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_iostreams_http_client_OBJECTS = iostreams/http_client.$(OBJEXT)
iostreams_http_client_OBJECTS = $(am_iostreams_http_client_OBJECTS)
iostreams_http_client_LDADD = $(LDADD)
@@ -325,6 +458,22 @@ local_connect_pair_OBJECTS = $(am_local_connect_pair_OBJECTS)
local_connect_pair_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@local_connect_pair_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__local_fd_passing_stream_client_SOURCES_DIST = \
+ local/fd_passing_stream_client.cpp
+@WINDOWS_TARGET_FALSE@am_local_fd_passing_stream_client_OBJECTS = local/fd_passing_stream_client.$(OBJEXT)
+local_fd_passing_stream_client_OBJECTS = \
+ $(am_local_fd_passing_stream_client_OBJECTS)
+local_fd_passing_stream_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@local_fd_passing_stream_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__local_fd_passing_stream_server_SOURCES_DIST = \
+ local/fd_passing_stream_server.cpp
+@WINDOWS_TARGET_FALSE@am_local_fd_passing_stream_server_OBJECTS = local/fd_passing_stream_server.$(OBJEXT)
+local_fd_passing_stream_server_OBJECTS = \
+ $(am_local_fd_passing_stream_server_OBJECTS)
+local_fd_passing_stream_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@local_fd_passing_stream_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am__local_iostream_client_SOURCES_DIST = local/iostream_client.cpp
@WINDOWS_TARGET_FALSE@am_local_iostream_client_OBJECTS = \
@WINDOWS_TARGET_FALSE@ local/iostream_client.$(OBJEXT)
@@ -402,6 +551,57 @@ operations_composed_8_OBJECTS = $(am_operations_composed_8_OBJECTS)
operations_composed_8_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@operations_composed_8_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_ranged_wait_for_all_OBJECTS = \
+ parallel_group/ranged_wait_for_all.$(OBJEXT)
+parallel_group_ranged_wait_for_all_OBJECTS = \
+ $(am_parallel_group_ranged_wait_for_all_OBJECTS)
+parallel_group_ranged_wait_for_all_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_ranged_wait_for_all_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_all_OBJECTS = \
+ parallel_group/wait_for_all.$(OBJEXT)
+parallel_group_wait_for_all_OBJECTS = \
+ $(am_parallel_group_wait_for_all_OBJECTS)
+parallel_group_wait_for_all_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_all_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_one_OBJECTS = \
+ parallel_group/wait_for_one.$(OBJEXT)
+parallel_group_wait_for_one_OBJECTS = \
+ $(am_parallel_group_wait_for_one_OBJECTS)
+parallel_group_wait_for_one_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_one_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_one_error_OBJECTS = \
+ parallel_group/wait_for_one_error.$(OBJEXT)
+parallel_group_wait_for_one_error_OBJECTS = \
+ $(am_parallel_group_wait_for_one_error_OBJECTS)
+parallel_group_wait_for_one_error_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_one_error_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_wait_for_one_success_OBJECTS = \
+ parallel_group/wait_for_one_success.$(OBJEXT)
+parallel_group_wait_for_one_success_OBJECTS = \
+ $(am_parallel_group_wait_for_one_success_OBJECTS)
+parallel_group_wait_for_one_success_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_wait_for_one_success_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_porthopper_client_OBJECTS = porthopper/client.$(OBJEXT)
+porthopper_client_OBJECTS = $(am_porthopper_client_OBJECTS)
+porthopper_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@porthopper_client_DEPENDENCIES = libasio.a
+am_porthopper_server_OBJECTS = porthopper/server.$(OBJEXT)
+porthopper_server_OBJECTS = $(am_porthopper_server_OBJECTS)
+porthopper_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@porthopper_server_DEPENDENCIES = libasio.a
+am_services_daytime_client_OBJECTS = \
+ services/daytime_client.$(OBJEXT) \
+ services/logger_service.$(OBJEXT)
+services_daytime_client_OBJECTS = \
+ $(am_services_daytime_client_OBJECTS)
+services_daytime_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@services_daytime_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_socks4_sync_client_OBJECTS = socks4/sync_client.$(OBJEXT)
socks4_sync_client_OBJECTS = $(am_socks4_sync_client_OBJECTS)
socks4_sync_client_LDADD = $(LDADD)
@@ -465,6 +665,95 @@ timers_time_t_timer_OBJECTS = $(am_timers_time_t_timer_OBJECTS)
timers_time_t_timer_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@timers_time_t_timer_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime1_client_OBJECTS = \
+ tutorial/daytime1/client.$(OBJEXT)
+tutorial_daytime1_client_OBJECTS = \
+ $(am_tutorial_daytime1_client_OBJECTS)
+tutorial_daytime1_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime1_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime2_server_OBJECTS = \
+ tutorial/daytime2/server.$(OBJEXT)
+tutorial_daytime2_server_OBJECTS = \
+ $(am_tutorial_daytime2_server_OBJECTS)
+tutorial_daytime2_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime2_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime3_server_OBJECTS = \
+ tutorial/daytime3/server.$(OBJEXT)
+tutorial_daytime3_server_OBJECTS = \
+ $(am_tutorial_daytime3_server_OBJECTS)
+tutorial_daytime3_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime3_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime4_client_OBJECTS = \
+ tutorial/daytime4/client.$(OBJEXT)
+tutorial_daytime4_client_OBJECTS = \
+ $(am_tutorial_daytime4_client_OBJECTS)
+tutorial_daytime4_client_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime4_client_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime5_server_OBJECTS = \
+ tutorial/daytime5/server.$(OBJEXT)
+tutorial_daytime5_server_OBJECTS = \
+ $(am_tutorial_daytime5_server_OBJECTS)
+tutorial_daytime5_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime5_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime6_server_OBJECTS = \
+ tutorial/daytime6/server.$(OBJEXT)
+tutorial_daytime6_server_OBJECTS = \
+ $(am_tutorial_daytime6_server_OBJECTS)
+tutorial_daytime6_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime6_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_daytime7_server_OBJECTS = \
+ tutorial/daytime7/server.$(OBJEXT)
+tutorial_daytime7_server_OBJECTS = \
+ $(am_tutorial_daytime7_server_OBJECTS)
+tutorial_daytime7_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_daytime7_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_timer1_timer_OBJECTS = tutorial/timer1/timer.$(OBJEXT)
+tutorial_timer1_timer_OBJECTS = $(am_tutorial_timer1_timer_OBJECTS)
+tutorial_timer1_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_timer1_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_timer2_timer_OBJECTS = tutorial/timer2/timer.$(OBJEXT)
+tutorial_timer2_timer_OBJECTS = $(am_tutorial_timer2_timer_OBJECTS)
+tutorial_timer2_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_timer2_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_timer3_timer_OBJECTS = tutorial/timer3/timer.$(OBJEXT)
+tutorial_timer3_timer_OBJECTS = $(am_tutorial_timer3_timer_OBJECTS)
+tutorial_timer3_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_timer3_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_timer4_timer_OBJECTS = tutorial/timer4/timer.$(OBJEXT)
+tutorial_timer4_timer_OBJECTS = $(am_tutorial_timer4_timer_OBJECTS)
+tutorial_timer4_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_timer4_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_tutorial_timer5_timer_OBJECTS = tutorial/timer5/timer.$(OBJEXT)
+tutorial_timer5_timer_OBJECTS = $(am_tutorial_timer5_timer_OBJECTS)
+tutorial_timer5_timer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@tutorial_timer5_timer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_type_erasure_type_erasure_OBJECTS = type_erasure/main.$(OBJEXT) \
+ type_erasure/stdin_line_reader.$(OBJEXT) \
+ type_erasure/sleep.$(OBJEXT)
+type_erasure_type_erasure_OBJECTS = \
+ $(am_type_erasure_type_erasure_OBJECTS)
+type_erasure_type_erasure_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@type_erasure_type_erasure_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__windows_transmit_file_SOURCES_DIST = windows/transmit_file.cpp
+@WINDOWS_TARGET_TRUE@am_windows_transmit_file_OBJECTS = \
+@WINDOWS_TARGET_TRUE@ windows/transmit_file.$(OBJEXT)
+windows_transmit_file_OBJECTS = $(am_windows_transmit_file_OBJECTS)
+windows_transmit_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@windows_transmit_file_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -484,6 +773,9 @@ am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
../../$(DEPDIR)/asio_ssl.Po allocation/$(DEPDIR)/server.Po \
buffers/$(DEPDIR)/reference_counted.Po \
chat/$(DEPDIR)/chat_client.Po chat/$(DEPDIR)/chat_server.Po \
+ chat/$(DEPDIR)/posix_chat_client.Po \
+ deferred/$(DEPDIR)/deferred_1.Po \
+ deferred/$(DEPDIR)/deferred_2.Po \
echo/$(DEPDIR)/async_tcp_echo_server.Po \
echo/$(DEPDIR)/async_udp_echo_server.Po \
echo/$(DEPDIR)/blocking_tcp_echo_client.Po \
@@ -496,10 +788,13 @@ am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
executors/$(DEPDIR)/fork_join.Po \
executors/$(DEPDIR)/pipeline.Po \
executors/$(DEPDIR)/priority_scheduler.Po \
- fork/$(DEPDIR)/daemon.Po \
+ files/$(DEPDIR)/async_file_copy.Po \
+ files/$(DEPDIR)/blocking_file_copy.Po fork/$(DEPDIR)/daemon.Po \
fork/$(DEPDIR)/process_per_connection.Po \
futures/$(DEPDIR)/daytime_client.Po \
handler_tracking/$(DEPDIR)/async_tcp_echo_server.Po \
+ http/client/$(DEPDIR)/async_client.Po \
+ http/client/$(DEPDIR)/sync_client.Po \
http/server/$(DEPDIR)/connection.Po \
http/server/$(DEPDIR)/connection_manager.Po \
http/server/$(DEPDIR)/main.Po \
@@ -508,9 +803,34 @@ am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
http/server/$(DEPDIR)/request_handler.Po \
http/server/$(DEPDIR)/request_parser.Po \
http/server/$(DEPDIR)/server.Po \
+ http/server2/$(DEPDIR)/connection.Po \
+ http/server2/$(DEPDIR)/io_context_pool.Po \
+ http/server2/$(DEPDIR)/main.Po \
+ http/server2/$(DEPDIR)/mime_types.Po \
+ http/server2/$(DEPDIR)/reply.Po \
+ http/server2/$(DEPDIR)/request_handler.Po \
+ http/server2/$(DEPDIR)/request_parser.Po \
+ http/server2/$(DEPDIR)/server.Po \
+ http/server3/$(DEPDIR)/connection.Po \
+ http/server3/$(DEPDIR)/main.Po \
+ http/server3/$(DEPDIR)/mime_types.Po \
+ http/server3/$(DEPDIR)/reply.Po \
+ http/server3/$(DEPDIR)/request_handler.Po \
+ http/server3/$(DEPDIR)/request_parser.Po \
+ http/server3/$(DEPDIR)/server.Po \
+ http/server4/$(DEPDIR)/file_handler.Po \
+ http/server4/$(DEPDIR)/main.Po \
+ http/server4/$(DEPDIR)/mime_types.Po \
+ http/server4/$(DEPDIR)/reply.Po \
+ http/server4/$(DEPDIR)/request_parser.Po \
+ http/server4/$(DEPDIR)/server.Po icmp/$(DEPDIR)/ping.Po \
invocation/$(DEPDIR)/prioritised_handlers.Po \
+ iostreams/$(DEPDIR)/daytime_client.Po \
+ iostreams/$(DEPDIR)/daytime_server.Po \
iostreams/$(DEPDIR)/http_client.Po \
local/$(DEPDIR)/connect_pair.Po \
+ local/$(DEPDIR)/fd_passing_stream_client.Po \
+ local/$(DEPDIR)/fd_passing_stream_server.Po \
local/$(DEPDIR)/iostream_client.Po \
local/$(DEPDIR)/stream_client.Po \
local/$(DEPDIR)/stream_server.Po \
@@ -524,13 +844,36 @@ am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
operations/$(DEPDIR)/composed_6.Po \
operations/$(DEPDIR)/composed_7.Po \
operations/$(DEPDIR)/composed_8.Po \
+ parallel_group/$(DEPDIR)/ranged_wait_for_all.Po \
+ parallel_group/$(DEPDIR)/wait_for_all.Po \
+ parallel_group/$(DEPDIR)/wait_for_one.Po \
+ parallel_group/$(DEPDIR)/wait_for_one_error.Po \
+ parallel_group/$(DEPDIR)/wait_for_one_success.Po \
+ porthopper/$(DEPDIR)/client.Po porthopper/$(DEPDIR)/server.Po \
+ services/$(DEPDIR)/daytime_client.Po \
+ services/$(DEPDIR)/logger_service.Po \
socks4/$(DEPDIR)/sync_client.Po spawn/$(DEPDIR)/echo_server.Po \
spawn/$(DEPDIR)/parallel_grep.Po ssl/$(DEPDIR)/client.Po \
ssl/$(DEPDIR)/server.Po timeouts/$(DEPDIR)/async_tcp_client.Po \
timeouts/$(DEPDIR)/blocking_tcp_client.Po \
timeouts/$(DEPDIR)/blocking_token_tcp_client.Po \
timeouts/$(DEPDIR)/blocking_udp_client.Po \
- timeouts/$(DEPDIR)/server.Po timers/$(DEPDIR)/time_t_timer.Po
+ timeouts/$(DEPDIR)/server.Po timers/$(DEPDIR)/time_t_timer.Po \
+ tutorial/daytime1/$(DEPDIR)/client.Po \
+ tutorial/daytime2/$(DEPDIR)/server.Po \
+ tutorial/daytime3/$(DEPDIR)/server.Po \
+ tutorial/daytime4/$(DEPDIR)/client.Po \
+ tutorial/daytime5/$(DEPDIR)/server.Po \
+ tutorial/daytime6/$(DEPDIR)/server.Po \
+ tutorial/daytime7/$(DEPDIR)/server.Po \
+ tutorial/timer1/$(DEPDIR)/timer.Po \
+ tutorial/timer2/$(DEPDIR)/timer.Po \
+ tutorial/timer3/$(DEPDIR)/timer.Po \
+ tutorial/timer4/$(DEPDIR)/timer.Po \
+ tutorial/timer5/$(DEPDIR)/timer.Po \
+ type_erasure/$(DEPDIR)/main.Po type_erasure/$(DEPDIR)/sleep.Po \
+ type_erasure/$(DEPDIR)/stdin_line_reader.Po \
+ windows/$(DEPDIR)/transmit_file.Po
am__mv = mv -f
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
@@ -548,6 +891,8 @@ am__v_CXXLD_1 =
SOURCES = $(libasio_a_SOURCES) $(allocation_server_SOURCES) \
$(buffers_reference_counted_SOURCES) \
$(chat_chat_client_SOURCES) $(chat_chat_server_SOURCES) \
+ $(chat_posix_chat_client_SOURCES) \
+ $(deferred_deferred_1_SOURCES) $(deferred_deferred_2_SOURCES) \
$(echo_async_tcp_echo_server_SOURCES) \
$(echo_async_udp_echo_server_SOURCES) \
$(echo_blocking_tcp_echo_client_SOURCES) \
@@ -557,13 +902,24 @@ SOURCES = $(libasio_a_SOURCES) $(allocation_server_SOURCES) \
$(executors_actor_SOURCES) $(executors_bank_account_1_SOURCES) \
$(executors_bank_account_2_SOURCES) \
$(executors_fork_join_SOURCES) $(executors_pipeline_SOURCES) \
- $(executors_priority_scheduler_SOURCES) $(fork_daemon_SOURCES) \
+ $(executors_priority_scheduler_SOURCES) \
+ $(files_async_file_copy_SOURCES) \
+ $(files_blocking_file_copy_SOURCES) $(fork_daemon_SOURCES) \
$(fork_process_per_connection_SOURCES) \
$(futures_daytime_client_SOURCES) \
$(handler_tracking_async_tcp_echo_server_SOURCES) \
+ $(http_client_async_client_SOURCES) \
+ $(http_client_sync_client_SOURCES) \
$(http_server_http_server_SOURCES) \
+ $(http_server2_http_server_SOURCES) \
+ $(http_server3_http_server_SOURCES) \
+ $(http_server4_http_server_SOURCES) $(icmp_ping_SOURCES) \
$(invocation_prioritised_handlers_SOURCES) \
+ $(iostreams_daytime_client_SOURCES) \
+ $(iostreams_daytime_server_SOURCES) \
$(iostreams_http_client_SOURCES) $(local_connect_pair_SOURCES) \
+ $(local_fd_passing_stream_client_SOURCES) \
+ $(local_fd_passing_stream_server_SOURCES) \
$(local_iostream_client_SOURCES) \
$(local_stream_client_SOURCES) $(local_stream_server_SOURCES) \
$(multicast_receiver_SOURCES) $(multicast_sender_SOURCES) \
@@ -575,18 +931,41 @@ SOURCES = $(libasio_a_SOURCES) $(allocation_server_SOURCES) \
$(operations_composed_5_SOURCES) \
$(operations_composed_6_SOURCES) \
$(operations_composed_7_SOURCES) \
- $(operations_composed_8_SOURCES) $(socks4_sync_client_SOURCES) \
- $(spawn_echo_server_SOURCES) $(spawn_parallel_grep_SOURCES) \
- $(ssl_client_SOURCES) $(ssl_server_SOURCES) \
- $(timeouts_async_tcp_client_SOURCES) \
+ $(operations_composed_8_SOURCES) \
+ $(parallel_group_ranged_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_one_SOURCES) \
+ $(parallel_group_wait_for_one_error_SOURCES) \
+ $(parallel_group_wait_for_one_success_SOURCES) \
+ $(porthopper_client_SOURCES) $(porthopper_server_SOURCES) \
+ $(services_daytime_client_SOURCES) \
+ $(socks4_sync_client_SOURCES) $(spawn_echo_server_SOURCES) \
+ $(spawn_parallel_grep_SOURCES) $(ssl_client_SOURCES) \
+ $(ssl_server_SOURCES) $(timeouts_async_tcp_client_SOURCES) \
$(timeouts_blocking_tcp_client_SOURCES) \
$(timeouts_blocking_token_tcp_client_SOURCES) \
$(timeouts_blocking_udp_client_SOURCES) \
- $(timeouts_server_SOURCES) $(timers_time_t_timer_SOURCES)
+ $(timeouts_server_SOURCES) $(timers_time_t_timer_SOURCES) \
+ $(tutorial_daytime1_client_SOURCES) \
+ $(tutorial_daytime2_server_SOURCES) \
+ $(tutorial_daytime3_server_SOURCES) \
+ $(tutorial_daytime4_client_SOURCES) \
+ $(tutorial_daytime5_server_SOURCES) \
+ $(tutorial_daytime6_server_SOURCES) \
+ $(tutorial_daytime7_server_SOURCES) \
+ $(tutorial_timer1_timer_SOURCES) \
+ $(tutorial_timer2_timer_SOURCES) \
+ $(tutorial_timer3_timer_SOURCES) \
+ $(tutorial_timer4_timer_SOURCES) \
+ $(tutorial_timer5_timer_SOURCES) \
+ $(type_erasure_type_erasure_SOURCES) \
+ $(windows_transmit_file_SOURCES)
DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(allocation_server_SOURCES) \
$(buffers_reference_counted_SOURCES) \
$(chat_chat_client_SOURCES) $(chat_chat_server_SOURCES) \
+ $(am__chat_posix_chat_client_SOURCES_DIST) \
+ $(deferred_deferred_1_SOURCES) $(deferred_deferred_2_SOURCES) \
$(echo_async_tcp_echo_server_SOURCES) \
$(echo_async_udp_echo_server_SOURCES) \
$(echo_blocking_tcp_echo_client_SOURCES) \
@@ -597,14 +976,25 @@ DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(executors_bank_account_2_SOURCES) \
$(executors_fork_join_SOURCES) $(executors_pipeline_SOURCES) \
$(executors_priority_scheduler_SOURCES) \
+ $(files_async_file_copy_SOURCES) \
+ $(files_blocking_file_copy_SOURCES) \
$(am__fork_daemon_SOURCES_DIST) \
$(am__fork_process_per_connection_SOURCES_DIST) \
$(futures_daytime_client_SOURCES) \
$(handler_tracking_async_tcp_echo_server_SOURCES) \
+ $(http_client_async_client_SOURCES) \
+ $(http_client_sync_client_SOURCES) \
$(http_server_http_server_SOURCES) \
+ $(http_server2_http_server_SOURCES) \
+ $(http_server3_http_server_SOURCES) \
+ $(http_server4_http_server_SOURCES) $(icmp_ping_SOURCES) \
$(invocation_prioritised_handlers_SOURCES) \
+ $(iostreams_daytime_client_SOURCES) \
+ $(iostreams_daytime_server_SOURCES) \
$(iostreams_http_client_SOURCES) \
$(am__local_connect_pair_SOURCES_DIST) \
+ $(am__local_fd_passing_stream_client_SOURCES_DIST) \
+ $(am__local_fd_passing_stream_server_SOURCES_DIST) \
$(am__local_iostream_client_SOURCES_DIST) \
$(am__local_stream_client_SOURCES_DIST) \
$(am__local_stream_server_SOURCES_DIST) \
@@ -617,7 +1007,15 @@ DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(operations_composed_5_SOURCES) \
$(operations_composed_6_SOURCES) \
$(operations_composed_7_SOURCES) \
- $(operations_composed_8_SOURCES) $(socks4_sync_client_SOURCES) \
+ $(operations_composed_8_SOURCES) \
+ $(parallel_group_ranged_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_all_SOURCES) \
+ $(parallel_group_wait_for_one_SOURCES) \
+ $(parallel_group_wait_for_one_error_SOURCES) \
+ $(parallel_group_wait_for_one_success_SOURCES) \
+ $(porthopper_client_SOURCES) $(porthopper_server_SOURCES) \
+ $(services_daytime_client_SOURCES) \
+ $(socks4_sync_client_SOURCES) \
$(am__spawn_echo_server_SOURCES_DIST) \
$(am__spawn_parallel_grep_SOURCES_DIST) \
$(am__ssl_client_SOURCES_DIST) $(am__ssl_server_SOURCES_DIST) \
@@ -625,7 +1023,21 @@ DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(timeouts_blocking_tcp_client_SOURCES) \
$(timeouts_blocking_token_tcp_client_SOURCES) \
$(timeouts_blocking_udp_client_SOURCES) \
- $(timeouts_server_SOURCES) $(timers_time_t_timer_SOURCES)
+ $(timeouts_server_SOURCES) $(timers_time_t_timer_SOURCES) \
+ $(tutorial_daytime1_client_SOURCES) \
+ $(tutorial_daytime2_server_SOURCES) \
+ $(tutorial_daytime3_server_SOURCES) \
+ $(tutorial_daytime4_client_SOURCES) \
+ $(tutorial_daytime5_server_SOURCES) \
+ $(tutorial_daytime6_server_SOURCES) \
+ $(tutorial_daytime7_server_SOURCES) \
+ $(tutorial_timer1_timer_SOURCES) \
+ $(tutorial_timer2_timer_SOURCES) \
+ $(tutorial_timer3_timer_SOURCES) \
+ $(tutorial_timer4_timer_SOURCES) \
+ $(tutorial_timer5_timer_SOURCES) \
+ $(type_erasure_type_erasure_SOURCES) \
+ $(am__windows_transmit_file_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -649,8 +1061,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -664,8 +1074,9 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CXX = @CXX@
-CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -674,9 +1085,8 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
-EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
-GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -743,9 +1153,11 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -760,14 +1172,59 @@ AUTOMAKE_OPTIONS = subdir-objects
@SEPARATE_COMPILATION_TRUE@ $(am__append_1)
@SEPARATE_COMPILATION_TRUE@LDADD = libasio.a
noinst_HEADERS = \
+ chat/chat_message.hpp \
+ handler_tracking/custom_tracking.hpp \
+ http/server/connection.hpp \
+ http/server/connection_manager.hpp \
+ http/server/header.hpp \
+ http/server/mime_types.hpp \
+ http/server/reply.hpp \
+ http/server/request.hpp \
+ http/server/request_handler.hpp \
+ http/server/request_parser.hpp \
+ http/server/server.hpp \
+ http/server2/connection.hpp \
+ http/server2/io_context_pool.hpp \
+ http/server2/header.hpp \
+ http/server2/mime_types.hpp \
+ http/server2/reply.hpp \
+ http/server2/request.hpp \
+ http/server2/request_handler.hpp \
+ http/server2/request_parser.hpp \
+ http/server2/server.hpp \
+ http/server3/connection.hpp \
+ http/server3/header.hpp \
+ http/server3/mime_types.hpp \
+ http/server3/reply.hpp \
+ http/server3/request.hpp \
+ http/server3/request_handler.hpp \
+ http/server3/request_parser.hpp \
+ http/server3/server.hpp \
+ http/server4/file_handler.hpp \
+ http/server4/header.hpp \
+ http/server4/mime_types.hpp \
+ http/server4/reply.hpp \
+ http/server4/request.hpp \
+ http/server4/request_parser.hpp \
+ http/server4/server.hpp \
+ icmp/icmp_header.hpp \
+ icmp/ipv4_header.hpp \
+ porthopper/protocol.hpp \
+ services/basic_logger.hpp \
+ services/logger.hpp \
+ services/logger_service.hpp \
socks4/socks4.hpp \
- chat/chat_message.hpp
+ type_erasure/line_reader.hpp \
+ type_erasure/stdin_line_reader.hpp \
+ type_erasure/sleep.hpp
AM_CXXFLAGS = -I$(srcdir)/../../../include
allocation_server_SOURCES = allocation/server.cpp
buffers_reference_counted_SOURCES = buffers/reference_counted.cpp
chat_chat_client_SOURCES = chat/chat_client.cpp
chat_chat_server_SOURCES = chat/chat_server.cpp
+deferred_deferred_1_SOURCES = deferred/deferred_1.cpp
+deferred_deferred_2_SOURCES = deferred/deferred_2.cpp
echo_async_tcp_echo_server_SOURCES = echo/async_tcp_echo_server.cpp
echo_async_udp_echo_server_SOURCES = echo/async_udp_echo_server.cpp
echo_blocking_tcp_echo_client_SOURCES = echo/blocking_tcp_echo_client.cpp
@@ -780,8 +1237,12 @@ executors_bank_account_2_SOURCES = executors/bank_account_2.cpp
executors_fork_join_SOURCES = executors/fork_join.cpp
executors_pipeline_SOURCES = executors/pipeline.cpp
executors_priority_scheduler_SOURCES = executors/priority_scheduler.cpp
+files_blocking_file_copy_SOURCES = files/blocking_file_copy.cpp
+files_async_file_copy_SOURCES = files/async_file_copy.cpp
futures_daytime_client_SOURCES = futures/daytime_client.cpp
handler_tracking_async_tcp_echo_server_SOURCES = handler_tracking/async_tcp_echo_server.cpp
+http_client_async_client_SOURCES = http/client/async_client.cpp
+http_client_sync_client_SOURCES = http/client/sync_client.cpp
http_server_http_server_SOURCES = \
http/server/connection.cpp \
http/server/connection_manager.cpp \
@@ -792,7 +1253,37 @@ http_server_http_server_SOURCES = \
http/server/request_parser.cpp \
http/server/server.cpp
+http_server2_http_server_SOURCES = \
+ http/server2/connection.cpp \
+ http/server2/io_context_pool.cpp \
+ http/server2/main.cpp \
+ http/server2/mime_types.cpp \
+ http/server2/reply.cpp \
+ http/server2/request_handler.cpp \
+ http/server2/request_parser.cpp \
+ http/server2/server.cpp
+
+http_server3_http_server_SOURCES = \
+ http/server3/connection.cpp \
+ http/server3/main.cpp \
+ http/server3/mime_types.cpp \
+ http/server3/reply.cpp \
+ http/server3/request_handler.cpp \
+ http/server3/request_parser.cpp \
+ http/server3/server.cpp
+
+http_server4_http_server_SOURCES = \
+ http/server4/file_handler.cpp \
+ http/server4/main.cpp \
+ http/server4/mime_types.cpp \
+ http/server4/reply.cpp \
+ http/server4/request_parser.cpp \
+ http/server4/server.cpp
+
+icmp_ping_SOURCES = icmp/ping.cpp
invocation_prioritised_handlers_SOURCES = invocation/prioritised_handlers.cpp
+iostreams_daytime_client_SOURCES = iostreams/daytime_client.cpp
+iostreams_daytime_server_SOURCES = iostreams/daytime_server.cpp
iostreams_http_client_SOURCES = iostreams/http_client.cpp
multicast_receiver_SOURCES = multicast/receiver.cpp
multicast_sender_SOURCES = multicast/sender.cpp
@@ -805,6 +1296,17 @@ operations_composed_5_SOURCES = operations/composed_5.cpp
operations_composed_6_SOURCES = operations/composed_6.cpp
operations_composed_7_SOURCES = operations/composed_7.cpp
operations_composed_8_SOURCES = operations/composed_8.cpp
+parallel_group_ranged_wait_for_all_SOURCES = parallel_group/ranged_wait_for_all.cpp
+parallel_group_wait_for_all_SOURCES = parallel_group/wait_for_all.cpp
+parallel_group_wait_for_one_SOURCES = parallel_group/wait_for_one.cpp
+parallel_group_wait_for_one_error_SOURCES = parallel_group/wait_for_one_error.cpp
+parallel_group_wait_for_one_success_SOURCES = parallel_group/wait_for_one_success.cpp
+porthopper_client_SOURCES = porthopper/client.cpp
+porthopper_server_SOURCES = porthopper/server.cpp
+services_daytime_client_SOURCES = \
+ services/daytime_client.cpp \
+ services/logger_service.cpp
+
socks4_sync_client_SOURCES = socks4/sync_client.cpp
timeouts_async_tcp_client_SOURCES = timeouts/async_tcp_client.cpp
timeouts_blocking_tcp_client_SOURCES = timeouts/blocking_tcp_client.cpp
@@ -812,12 +1314,29 @@ timeouts_blocking_token_tcp_client_SOURCES = timeouts/blocking_token_tcp_client.
timeouts_blocking_udp_client_SOURCES = timeouts/blocking_udp_client.cpp
timeouts_server_SOURCES = timeouts/server.cpp
timers_time_t_timer_SOURCES = timers/time_t_timer.cpp
+tutorial_timer1_timer_SOURCES = tutorial/timer1/timer.cpp
+tutorial_timer2_timer_SOURCES = tutorial/timer2/timer.cpp
+tutorial_timer3_timer_SOURCES = tutorial/timer3/timer.cpp
+tutorial_timer4_timer_SOURCES = tutorial/timer4/timer.cpp
+tutorial_timer5_timer_SOURCES = tutorial/timer5/timer.cpp
+tutorial_daytime1_client_SOURCES = tutorial/daytime1/client.cpp
+tutorial_daytime2_server_SOURCES = tutorial/daytime2/server.cpp
+tutorial_daytime3_server_SOURCES = tutorial/daytime3/server.cpp
+tutorial_daytime4_client_SOURCES = tutorial/daytime4/client.cpp
+tutorial_daytime5_server_SOURCES = tutorial/daytime5/server.cpp
+tutorial_daytime6_server_SOURCES = tutorial/daytime6/server.cpp
+tutorial_daytime7_server_SOURCES = tutorial/daytime7/server.cpp
+type_erasure_type_erasure_SOURCES = type_erasure/main.cpp type_erasure/stdin_line_reader.cpp type_erasure/sleep.cpp
+@WINDOWS_TARGET_FALSE@chat_posix_chat_client_SOURCES = chat/posix_chat_client.cpp
@WINDOWS_TARGET_FALSE@fork_daemon_SOURCES = fork/daemon.cpp
@WINDOWS_TARGET_FALSE@fork_process_per_connection_SOURCES = fork/process_per_connection.cpp
@WINDOWS_TARGET_FALSE@local_connect_pair_SOURCES = local/connect_pair.cpp
@WINDOWS_TARGET_FALSE@local_iostream_client_SOURCES = local/iostream_client.cpp
@WINDOWS_TARGET_FALSE@local_stream_server_SOURCES = local/stream_server.cpp
@WINDOWS_TARGET_FALSE@local_stream_client_SOURCES = local/stream_client.cpp
+@WINDOWS_TARGET_FALSE@local_fd_passing_stream_server_SOURCES = local/fd_passing_stream_server.cpp
+@WINDOWS_TARGET_FALSE@local_fd_passing_stream_client_SOURCES = local/fd_passing_stream_client.cpp
+@WINDOWS_TARGET_TRUE@windows_transmit_file_SOURCES = windows/transmit_file.cpp
@HAVE_OPENSSL_TRUE@ssl_client_SOURCES = ssl/client.cpp
@HAVE_OPENSSL_TRUE@ssl_server_SOURCES = ssl/server.cpp
@HAVE_BOOST_COROUTINE_TRUE@spawn_echo_server_SOURCES = spawn/echo_server.cpp
@@ -825,16 +1344,14 @@ timers_time_t_timer_SOURCES = timers/time_t_timer.cpp
@HAVE_BOOST_COROUTINE_TRUE@spawn_parallel_grep_SOURCES = spawn/parallel_grep.cpp
@HAVE_BOOST_COROUTINE_TRUE@spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
EXTRA_DIST = \
- handler_tracking/custom_tracking.hpp \
- http/server/connection.hpp \
- http/server/connection_manager.hpp \
- http/server/header.hpp \
- http/server/mime_types.hpp \
- http/server/reply.hpp \
- http/server/request.hpp \
- http/server/request_handler.hpp \
- http/server/request_parser.hpp \
- http/server/server.hpp
+ serialization/client.cpp \
+ serialization/server.cpp \
+ serialization/connection.hpp \
+ serialization/stock.hpp \
+ ssl/README \
+ ssl/ca.pem \
+ ssl/server.pem \
+ ssl/dh4096.pem
MAINTAINERCLEANFILES = \
$(srcdir)/Makefile.in
@@ -935,6 +1452,30 @@ chat/chat_server.$(OBJEXT): chat/$(am__dirstamp) \
chat/chat_server$(EXEEXT): $(chat_chat_server_OBJECTS) $(chat_chat_server_DEPENDENCIES) $(EXTRA_chat_chat_server_DEPENDENCIES) chat/$(am__dirstamp)
@rm -f chat/chat_server$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(chat_chat_server_OBJECTS) $(chat_chat_server_LDADD) $(LIBS)
+chat/posix_chat_client.$(OBJEXT): chat/$(am__dirstamp) \
+ chat/$(DEPDIR)/$(am__dirstamp)
+
+chat/posix_chat_client$(EXEEXT): $(chat_posix_chat_client_OBJECTS) $(chat_posix_chat_client_DEPENDENCIES) $(EXTRA_chat_posix_chat_client_DEPENDENCIES) chat/$(am__dirstamp)
+ @rm -f chat/posix_chat_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(chat_posix_chat_client_OBJECTS) $(chat_posix_chat_client_LDADD) $(LIBS)
+deferred/$(am__dirstamp):
+ @$(MKDIR_P) deferred
+ @: > deferred/$(am__dirstamp)
+deferred/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) deferred/$(DEPDIR)
+ @: > deferred/$(DEPDIR)/$(am__dirstamp)
+deferred/deferred_1.$(OBJEXT): deferred/$(am__dirstamp) \
+ deferred/$(DEPDIR)/$(am__dirstamp)
+
+deferred/deferred_1$(EXEEXT): $(deferred_deferred_1_OBJECTS) $(deferred_deferred_1_DEPENDENCIES) $(EXTRA_deferred_deferred_1_DEPENDENCIES) deferred/$(am__dirstamp)
+ @rm -f deferred/deferred_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(deferred_deferred_1_OBJECTS) $(deferred_deferred_1_LDADD) $(LIBS)
+deferred/deferred_2.$(OBJEXT): deferred/$(am__dirstamp) \
+ deferred/$(DEPDIR)/$(am__dirstamp)
+
+deferred/deferred_2$(EXEEXT): $(deferred_deferred_2_OBJECTS) $(deferred_deferred_2_DEPENDENCIES) $(EXTRA_deferred_deferred_2_DEPENDENCIES) deferred/$(am__dirstamp)
+ @rm -f deferred/deferred_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(deferred_deferred_2_OBJECTS) $(deferred_deferred_2_LDADD) $(LIBS)
echo/$(am__dirstamp):
@$(MKDIR_P) echo
@: > echo/$(am__dirstamp)
@@ -1019,6 +1560,24 @@ executors/priority_scheduler.$(OBJEXT): executors/$(am__dirstamp) \
executors/priority_scheduler$(EXEEXT): $(executors_priority_scheduler_OBJECTS) $(executors_priority_scheduler_DEPENDENCIES) $(EXTRA_executors_priority_scheduler_DEPENDENCIES) executors/$(am__dirstamp)
@rm -f executors/priority_scheduler$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(executors_priority_scheduler_OBJECTS) $(executors_priority_scheduler_LDADD) $(LIBS)
+files/$(am__dirstamp):
+ @$(MKDIR_P) files
+ @: > files/$(am__dirstamp)
+files/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) files/$(DEPDIR)
+ @: > files/$(DEPDIR)/$(am__dirstamp)
+files/async_file_copy.$(OBJEXT): files/$(am__dirstamp) \
+ files/$(DEPDIR)/$(am__dirstamp)
+
+files/async_file_copy$(EXEEXT): $(files_async_file_copy_OBJECTS) $(files_async_file_copy_DEPENDENCIES) $(EXTRA_files_async_file_copy_DEPENDENCIES) files/$(am__dirstamp)
+ @rm -f files/async_file_copy$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(files_async_file_copy_OBJECTS) $(files_async_file_copy_LDADD) $(LIBS)
+files/blocking_file_copy.$(OBJEXT): files/$(am__dirstamp) \
+ files/$(DEPDIR)/$(am__dirstamp)
+
+files/blocking_file_copy$(EXEEXT): $(files_blocking_file_copy_OBJECTS) $(files_blocking_file_copy_DEPENDENCIES) $(EXTRA_files_blocking_file_copy_DEPENDENCIES) files/$(am__dirstamp)
+ @rm -f files/blocking_file_copy$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(files_blocking_file_copy_OBJECTS) $(files_blocking_file_copy_LDADD) $(LIBS)
fork/$(am__dirstamp):
@$(MKDIR_P) fork
@: > fork/$(am__dirstamp)
@@ -1062,6 +1621,24 @@ handler_tracking/async_tcp_echo_server.$(OBJEXT): \
handler_tracking/async_tcp_echo_server$(EXEEXT): $(handler_tracking_async_tcp_echo_server_OBJECTS) $(handler_tracking_async_tcp_echo_server_DEPENDENCIES) $(EXTRA_handler_tracking_async_tcp_echo_server_DEPENDENCIES) handler_tracking/$(am__dirstamp)
@rm -f handler_tracking/async_tcp_echo_server$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(handler_tracking_async_tcp_echo_server_OBJECTS) $(handler_tracking_async_tcp_echo_server_LDADD) $(LIBS)
+http/client/$(am__dirstamp):
+ @$(MKDIR_P) http/client
+ @: > http/client/$(am__dirstamp)
+http/client/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) http/client/$(DEPDIR)
+ @: > http/client/$(DEPDIR)/$(am__dirstamp)
+http/client/async_client.$(OBJEXT): http/client/$(am__dirstamp) \
+ http/client/$(DEPDIR)/$(am__dirstamp)
+
+http/client/async_client$(EXEEXT): $(http_client_async_client_OBJECTS) $(http_client_async_client_DEPENDENCIES) $(EXTRA_http_client_async_client_DEPENDENCIES) http/client/$(am__dirstamp)
+ @rm -f http/client/async_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(http_client_async_client_OBJECTS) $(http_client_async_client_LDADD) $(LIBS)
+http/client/sync_client.$(OBJEXT): http/client/$(am__dirstamp) \
+ http/client/$(DEPDIR)/$(am__dirstamp)
+
+http/client/sync_client$(EXEEXT): $(http_client_sync_client_OBJECTS) $(http_client_sync_client_DEPENDENCIES) $(EXTRA_http_client_sync_client_DEPENDENCIES) http/client/$(am__dirstamp)
+ @rm -f http/client/sync_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(http_client_sync_client_OBJECTS) $(http_client_sync_client_LDADD) $(LIBS)
http/server/$(am__dirstamp):
@$(MKDIR_P) http/server
@: > http/server/$(am__dirstamp)
@@ -1088,6 +1665,90 @@ http/server/server.$(OBJEXT): http/server/$(am__dirstamp) \
http/server/http_server$(EXEEXT): $(http_server_http_server_OBJECTS) $(http_server_http_server_DEPENDENCIES) $(EXTRA_http_server_http_server_DEPENDENCIES) http/server/$(am__dirstamp)
@rm -f http/server/http_server$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(http_server_http_server_OBJECTS) $(http_server_http_server_LDADD) $(LIBS)
+http/server2/$(am__dirstamp):
+ @$(MKDIR_P) http/server2
+ @: > http/server2/$(am__dirstamp)
+http/server2/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) http/server2/$(DEPDIR)
+ @: > http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/connection.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/io_context_pool.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/main.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/mime_types.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/reply.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/request_handler.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/request_parser.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+http/server2/server.$(OBJEXT): http/server2/$(am__dirstamp) \
+ http/server2/$(DEPDIR)/$(am__dirstamp)
+
+http/server2/http_server$(EXEEXT): $(http_server2_http_server_OBJECTS) $(http_server2_http_server_DEPENDENCIES) $(EXTRA_http_server2_http_server_DEPENDENCIES) http/server2/$(am__dirstamp)
+ @rm -f http/server2/http_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(http_server2_http_server_OBJECTS) $(http_server2_http_server_LDADD) $(LIBS)
+http/server3/$(am__dirstamp):
+ @$(MKDIR_P) http/server3
+ @: > http/server3/$(am__dirstamp)
+http/server3/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) http/server3/$(DEPDIR)
+ @: > http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/connection.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/main.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/mime_types.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/reply.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/request_handler.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/request_parser.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+http/server3/server.$(OBJEXT): http/server3/$(am__dirstamp) \
+ http/server3/$(DEPDIR)/$(am__dirstamp)
+
+http/server3/http_server$(EXEEXT): $(http_server3_http_server_OBJECTS) $(http_server3_http_server_DEPENDENCIES) $(EXTRA_http_server3_http_server_DEPENDENCIES) http/server3/$(am__dirstamp)
+ @rm -f http/server3/http_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(http_server3_http_server_OBJECTS) $(http_server3_http_server_LDADD) $(LIBS)
+http/server4/$(am__dirstamp):
+ @$(MKDIR_P) http/server4
+ @: > http/server4/$(am__dirstamp)
+http/server4/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) http/server4/$(DEPDIR)
+ @: > http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/file_handler.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/main.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/mime_types.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/reply.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/request_parser.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+http/server4/server.$(OBJEXT): http/server4/$(am__dirstamp) \
+ http/server4/$(DEPDIR)/$(am__dirstamp)
+
+http/server4/http_server$(EXEEXT): $(http_server4_http_server_OBJECTS) $(http_server4_http_server_DEPENDENCIES) $(EXTRA_http_server4_http_server_DEPENDENCIES) http/server4/$(am__dirstamp)
+ @rm -f http/server4/http_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(http_server4_http_server_OBJECTS) $(http_server4_http_server_LDADD) $(LIBS)
+icmp/$(am__dirstamp):
+ @$(MKDIR_P) icmp
+ @: > icmp/$(am__dirstamp)
+icmp/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) icmp/$(DEPDIR)
+ @: > icmp/$(DEPDIR)/$(am__dirstamp)
+icmp/ping.$(OBJEXT): icmp/$(am__dirstamp) \
+ icmp/$(DEPDIR)/$(am__dirstamp)
+
+icmp/ping$(EXEEXT): $(icmp_ping_OBJECTS) $(icmp_ping_DEPENDENCIES) $(EXTRA_icmp_ping_DEPENDENCIES) icmp/$(am__dirstamp)
+ @rm -f icmp/ping$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(icmp_ping_OBJECTS) $(icmp_ping_LDADD) $(LIBS)
invocation/$(am__dirstamp):
@$(MKDIR_P) invocation
@: > invocation/$(am__dirstamp)
@@ -1106,6 +1767,18 @@ iostreams/$(am__dirstamp):
iostreams/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) iostreams/$(DEPDIR)
@: > iostreams/$(DEPDIR)/$(am__dirstamp)
+iostreams/daytime_client.$(OBJEXT): iostreams/$(am__dirstamp) \
+ iostreams/$(DEPDIR)/$(am__dirstamp)
+
+iostreams/daytime_client$(EXEEXT): $(iostreams_daytime_client_OBJECTS) $(iostreams_daytime_client_DEPENDENCIES) $(EXTRA_iostreams_daytime_client_DEPENDENCIES) iostreams/$(am__dirstamp)
+ @rm -f iostreams/daytime_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(iostreams_daytime_client_OBJECTS) $(iostreams_daytime_client_LDADD) $(LIBS)
+iostreams/daytime_server.$(OBJEXT): iostreams/$(am__dirstamp) \
+ iostreams/$(DEPDIR)/$(am__dirstamp)
+
+iostreams/daytime_server$(EXEEXT): $(iostreams_daytime_server_OBJECTS) $(iostreams_daytime_server_DEPENDENCIES) $(EXTRA_iostreams_daytime_server_DEPENDENCIES) iostreams/$(am__dirstamp)
+ @rm -f iostreams/daytime_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(iostreams_daytime_server_OBJECTS) $(iostreams_daytime_server_LDADD) $(LIBS)
iostreams/http_client.$(OBJEXT): iostreams/$(am__dirstamp) \
iostreams/$(DEPDIR)/$(am__dirstamp)
@@ -1124,6 +1797,18 @@ local/connect_pair.$(OBJEXT): local/$(am__dirstamp) \
local/connect_pair$(EXEEXT): $(local_connect_pair_OBJECTS) $(local_connect_pair_DEPENDENCIES) $(EXTRA_local_connect_pair_DEPENDENCIES) local/$(am__dirstamp)
@rm -f local/connect_pair$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(local_connect_pair_OBJECTS) $(local_connect_pair_LDADD) $(LIBS)
+local/fd_passing_stream_client.$(OBJEXT): local/$(am__dirstamp) \
+ local/$(DEPDIR)/$(am__dirstamp)
+
+local/fd_passing_stream_client$(EXEEXT): $(local_fd_passing_stream_client_OBJECTS) $(local_fd_passing_stream_client_DEPENDENCIES) $(EXTRA_local_fd_passing_stream_client_DEPENDENCIES) local/$(am__dirstamp)
+ @rm -f local/fd_passing_stream_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(local_fd_passing_stream_client_OBJECTS) $(local_fd_passing_stream_client_LDADD) $(LIBS)
+local/fd_passing_stream_server.$(OBJEXT): local/$(am__dirstamp) \
+ local/$(DEPDIR)/$(am__dirstamp)
+
+local/fd_passing_stream_server$(EXEEXT): $(local_fd_passing_stream_server_OBJECTS) $(local_fd_passing_stream_server_DEPENDENCIES) $(EXTRA_local_fd_passing_stream_server_DEPENDENCIES) local/$(am__dirstamp)
+ @rm -f local/fd_passing_stream_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(local_fd_passing_stream_server_OBJECTS) $(local_fd_passing_stream_server_LDADD) $(LIBS)
local/iostream_client.$(OBJEXT): local/$(am__dirstamp) \
local/$(DEPDIR)/$(am__dirstamp)
@@ -1226,6 +1911,77 @@ operations/composed_8.$(OBJEXT): operations/$(am__dirstamp) \
operations/composed_8$(EXEEXT): $(operations_composed_8_OBJECTS) $(operations_composed_8_DEPENDENCIES) $(EXTRA_operations_composed_8_DEPENDENCIES) operations/$(am__dirstamp)
@rm -f operations/composed_8$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(operations_composed_8_OBJECTS) $(operations_composed_8_LDADD) $(LIBS)
+parallel_group/$(am__dirstamp):
+ @$(MKDIR_P) parallel_group
+ @: > parallel_group/$(am__dirstamp)
+parallel_group/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) parallel_group/$(DEPDIR)
+ @: > parallel_group/$(DEPDIR)/$(am__dirstamp)
+parallel_group/ranged_wait_for_all.$(OBJEXT): \
+ parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/ranged_wait_for_all$(EXEEXT): $(parallel_group_ranged_wait_for_all_OBJECTS) $(parallel_group_ranged_wait_for_all_DEPENDENCIES) $(EXTRA_parallel_group_ranged_wait_for_all_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/ranged_wait_for_all$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_ranged_wait_for_all_OBJECTS) $(parallel_group_ranged_wait_for_all_LDADD) $(LIBS)
+parallel_group/wait_for_all.$(OBJEXT): parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_all$(EXEEXT): $(parallel_group_wait_for_all_OBJECTS) $(parallel_group_wait_for_all_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_all_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_all$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_all_OBJECTS) $(parallel_group_wait_for_all_LDADD) $(LIBS)
+parallel_group/wait_for_one.$(OBJEXT): parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_one$(EXEEXT): $(parallel_group_wait_for_one_OBJECTS) $(parallel_group_wait_for_one_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_one_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_one$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_one_OBJECTS) $(parallel_group_wait_for_one_LDADD) $(LIBS)
+parallel_group/wait_for_one_error.$(OBJEXT): \
+ parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_one_error$(EXEEXT): $(parallel_group_wait_for_one_error_OBJECTS) $(parallel_group_wait_for_one_error_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_one_error_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_one_error$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_one_error_OBJECTS) $(parallel_group_wait_for_one_error_LDADD) $(LIBS)
+parallel_group/wait_for_one_success.$(OBJEXT): \
+ parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/wait_for_one_success$(EXEEXT): $(parallel_group_wait_for_one_success_OBJECTS) $(parallel_group_wait_for_one_success_DEPENDENCIES) $(EXTRA_parallel_group_wait_for_one_success_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/wait_for_one_success$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_wait_for_one_success_OBJECTS) $(parallel_group_wait_for_one_success_LDADD) $(LIBS)
+porthopper/$(am__dirstamp):
+ @$(MKDIR_P) porthopper
+ @: > porthopper/$(am__dirstamp)
+porthopper/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) porthopper/$(DEPDIR)
+ @: > porthopper/$(DEPDIR)/$(am__dirstamp)
+porthopper/client.$(OBJEXT): porthopper/$(am__dirstamp) \
+ porthopper/$(DEPDIR)/$(am__dirstamp)
+
+porthopper/client$(EXEEXT): $(porthopper_client_OBJECTS) $(porthopper_client_DEPENDENCIES) $(EXTRA_porthopper_client_DEPENDENCIES) porthopper/$(am__dirstamp)
+ @rm -f porthopper/client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(porthopper_client_OBJECTS) $(porthopper_client_LDADD) $(LIBS)
+porthopper/server.$(OBJEXT): porthopper/$(am__dirstamp) \
+ porthopper/$(DEPDIR)/$(am__dirstamp)
+
+porthopper/server$(EXEEXT): $(porthopper_server_OBJECTS) $(porthopper_server_DEPENDENCIES) $(EXTRA_porthopper_server_DEPENDENCIES) porthopper/$(am__dirstamp)
+ @rm -f porthopper/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(porthopper_server_OBJECTS) $(porthopper_server_LDADD) $(LIBS)
+services/$(am__dirstamp):
+ @$(MKDIR_P) services
+ @: > services/$(am__dirstamp)
+services/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) services/$(DEPDIR)
+ @: > services/$(DEPDIR)/$(am__dirstamp)
+services/daytime_client.$(OBJEXT): services/$(am__dirstamp) \
+ services/$(DEPDIR)/$(am__dirstamp)
+services/logger_service.$(OBJEXT): services/$(am__dirstamp) \
+ services/$(DEPDIR)/$(am__dirstamp)
+
+services/daytime_client$(EXEEXT): $(services_daytime_client_OBJECTS) $(services_daytime_client_DEPENDENCIES) $(EXTRA_services_daytime_client_DEPENDENCIES) services/$(am__dirstamp)
+ @rm -f services/daytime_client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(services_daytime_client_OBJECTS) $(services_daytime_client_LDADD) $(LIBS)
socks4/$(am__dirstamp):
@$(MKDIR_P) socks4
@: > socks4/$(am__dirstamp)
@@ -1322,6 +2078,179 @@ timers/time_t_timer.$(OBJEXT): timers/$(am__dirstamp) \
timers/time_t_timer$(EXEEXT): $(timers_time_t_timer_OBJECTS) $(timers_time_t_timer_DEPENDENCIES) $(EXTRA_timers_time_t_timer_DEPENDENCIES) timers/$(am__dirstamp)
@rm -f timers/time_t_timer$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(timers_time_t_timer_OBJECTS) $(timers_time_t_timer_LDADD) $(LIBS)
+tutorial/daytime1/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime1
+ @: > tutorial/daytime1/$(am__dirstamp)
+tutorial/daytime1/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime1/$(DEPDIR)
+ @: > tutorial/daytime1/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime1/client.$(OBJEXT): tutorial/daytime1/$(am__dirstamp) \
+ tutorial/daytime1/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime1/client$(EXEEXT): $(tutorial_daytime1_client_OBJECTS) $(tutorial_daytime1_client_DEPENDENCIES) $(EXTRA_tutorial_daytime1_client_DEPENDENCIES) tutorial/daytime1/$(am__dirstamp)
+ @rm -f tutorial/daytime1/client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime1_client_OBJECTS) $(tutorial_daytime1_client_LDADD) $(LIBS)
+tutorial/daytime2/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime2
+ @: > tutorial/daytime2/$(am__dirstamp)
+tutorial/daytime2/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime2/$(DEPDIR)
+ @: > tutorial/daytime2/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime2/server.$(OBJEXT): tutorial/daytime2/$(am__dirstamp) \
+ tutorial/daytime2/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime2/server$(EXEEXT): $(tutorial_daytime2_server_OBJECTS) $(tutorial_daytime2_server_DEPENDENCIES) $(EXTRA_tutorial_daytime2_server_DEPENDENCIES) tutorial/daytime2/$(am__dirstamp)
+ @rm -f tutorial/daytime2/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime2_server_OBJECTS) $(tutorial_daytime2_server_LDADD) $(LIBS)
+tutorial/daytime3/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime3
+ @: > tutorial/daytime3/$(am__dirstamp)
+tutorial/daytime3/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime3/$(DEPDIR)
+ @: > tutorial/daytime3/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime3/server.$(OBJEXT): tutorial/daytime3/$(am__dirstamp) \
+ tutorial/daytime3/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime3/server$(EXEEXT): $(tutorial_daytime3_server_OBJECTS) $(tutorial_daytime3_server_DEPENDENCIES) $(EXTRA_tutorial_daytime3_server_DEPENDENCIES) tutorial/daytime3/$(am__dirstamp)
+ @rm -f tutorial/daytime3/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime3_server_OBJECTS) $(tutorial_daytime3_server_LDADD) $(LIBS)
+tutorial/daytime4/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime4
+ @: > tutorial/daytime4/$(am__dirstamp)
+tutorial/daytime4/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime4/$(DEPDIR)
+ @: > tutorial/daytime4/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime4/client.$(OBJEXT): tutorial/daytime4/$(am__dirstamp) \
+ tutorial/daytime4/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime4/client$(EXEEXT): $(tutorial_daytime4_client_OBJECTS) $(tutorial_daytime4_client_DEPENDENCIES) $(EXTRA_tutorial_daytime4_client_DEPENDENCIES) tutorial/daytime4/$(am__dirstamp)
+ @rm -f tutorial/daytime4/client$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime4_client_OBJECTS) $(tutorial_daytime4_client_LDADD) $(LIBS)
+tutorial/daytime5/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime5
+ @: > tutorial/daytime5/$(am__dirstamp)
+tutorial/daytime5/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime5/$(DEPDIR)
+ @: > tutorial/daytime5/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime5/server.$(OBJEXT): tutorial/daytime5/$(am__dirstamp) \
+ tutorial/daytime5/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime5/server$(EXEEXT): $(tutorial_daytime5_server_OBJECTS) $(tutorial_daytime5_server_DEPENDENCIES) $(EXTRA_tutorial_daytime5_server_DEPENDENCIES) tutorial/daytime5/$(am__dirstamp)
+ @rm -f tutorial/daytime5/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime5_server_OBJECTS) $(tutorial_daytime5_server_LDADD) $(LIBS)
+tutorial/daytime6/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime6
+ @: > tutorial/daytime6/$(am__dirstamp)
+tutorial/daytime6/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime6/$(DEPDIR)
+ @: > tutorial/daytime6/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime6/server.$(OBJEXT): tutorial/daytime6/$(am__dirstamp) \
+ tutorial/daytime6/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime6/server$(EXEEXT): $(tutorial_daytime6_server_OBJECTS) $(tutorial_daytime6_server_DEPENDENCIES) $(EXTRA_tutorial_daytime6_server_DEPENDENCIES) tutorial/daytime6/$(am__dirstamp)
+ @rm -f tutorial/daytime6/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime6_server_OBJECTS) $(tutorial_daytime6_server_LDADD) $(LIBS)
+tutorial/daytime7/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime7
+ @: > tutorial/daytime7/$(am__dirstamp)
+tutorial/daytime7/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/daytime7/$(DEPDIR)
+ @: > tutorial/daytime7/$(DEPDIR)/$(am__dirstamp)
+tutorial/daytime7/server.$(OBJEXT): tutorial/daytime7/$(am__dirstamp) \
+ tutorial/daytime7/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/daytime7/server$(EXEEXT): $(tutorial_daytime7_server_OBJECTS) $(tutorial_daytime7_server_DEPENDENCIES) $(EXTRA_tutorial_daytime7_server_DEPENDENCIES) tutorial/daytime7/$(am__dirstamp)
+ @rm -f tutorial/daytime7/server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_daytime7_server_OBJECTS) $(tutorial_daytime7_server_LDADD) $(LIBS)
+tutorial/timer1/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer1
+ @: > tutorial/timer1/$(am__dirstamp)
+tutorial/timer1/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer1/$(DEPDIR)
+ @: > tutorial/timer1/$(DEPDIR)/$(am__dirstamp)
+tutorial/timer1/timer.$(OBJEXT): tutorial/timer1/$(am__dirstamp) \
+ tutorial/timer1/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/timer1/timer$(EXEEXT): $(tutorial_timer1_timer_OBJECTS) $(tutorial_timer1_timer_DEPENDENCIES) $(EXTRA_tutorial_timer1_timer_DEPENDENCIES) tutorial/timer1/$(am__dirstamp)
+ @rm -f tutorial/timer1/timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer1_timer_OBJECTS) $(tutorial_timer1_timer_LDADD) $(LIBS)
+tutorial/timer2/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer2
+ @: > tutorial/timer2/$(am__dirstamp)
+tutorial/timer2/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer2/$(DEPDIR)
+ @: > tutorial/timer2/$(DEPDIR)/$(am__dirstamp)
+tutorial/timer2/timer.$(OBJEXT): tutorial/timer2/$(am__dirstamp) \
+ tutorial/timer2/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/timer2/timer$(EXEEXT): $(tutorial_timer2_timer_OBJECTS) $(tutorial_timer2_timer_DEPENDENCIES) $(EXTRA_tutorial_timer2_timer_DEPENDENCIES) tutorial/timer2/$(am__dirstamp)
+ @rm -f tutorial/timer2/timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer2_timer_OBJECTS) $(tutorial_timer2_timer_LDADD) $(LIBS)
+tutorial/timer3/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer3
+ @: > tutorial/timer3/$(am__dirstamp)
+tutorial/timer3/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer3/$(DEPDIR)
+ @: > tutorial/timer3/$(DEPDIR)/$(am__dirstamp)
+tutorial/timer3/timer.$(OBJEXT): tutorial/timer3/$(am__dirstamp) \
+ tutorial/timer3/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/timer3/timer$(EXEEXT): $(tutorial_timer3_timer_OBJECTS) $(tutorial_timer3_timer_DEPENDENCIES) $(EXTRA_tutorial_timer3_timer_DEPENDENCIES) tutorial/timer3/$(am__dirstamp)
+ @rm -f tutorial/timer3/timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer3_timer_OBJECTS) $(tutorial_timer3_timer_LDADD) $(LIBS)
+tutorial/timer4/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer4
+ @: > tutorial/timer4/$(am__dirstamp)
+tutorial/timer4/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer4/$(DEPDIR)
+ @: > tutorial/timer4/$(DEPDIR)/$(am__dirstamp)
+tutorial/timer4/timer.$(OBJEXT): tutorial/timer4/$(am__dirstamp) \
+ tutorial/timer4/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/timer4/timer$(EXEEXT): $(tutorial_timer4_timer_OBJECTS) $(tutorial_timer4_timer_DEPENDENCIES) $(EXTRA_tutorial_timer4_timer_DEPENDENCIES) tutorial/timer4/$(am__dirstamp)
+ @rm -f tutorial/timer4/timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer4_timer_OBJECTS) $(tutorial_timer4_timer_LDADD) $(LIBS)
+tutorial/timer5/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer5
+ @: > tutorial/timer5/$(am__dirstamp)
+tutorial/timer5/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tutorial/timer5/$(DEPDIR)
+ @: > tutorial/timer5/$(DEPDIR)/$(am__dirstamp)
+tutorial/timer5/timer.$(OBJEXT): tutorial/timer5/$(am__dirstamp) \
+ tutorial/timer5/$(DEPDIR)/$(am__dirstamp)
+
+tutorial/timer5/timer$(EXEEXT): $(tutorial_timer5_timer_OBJECTS) $(tutorial_timer5_timer_DEPENDENCIES) $(EXTRA_tutorial_timer5_timer_DEPENDENCIES) tutorial/timer5/$(am__dirstamp)
+ @rm -f tutorial/timer5/timer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tutorial_timer5_timer_OBJECTS) $(tutorial_timer5_timer_LDADD) $(LIBS)
+type_erasure/$(am__dirstamp):
+ @$(MKDIR_P) type_erasure
+ @: > type_erasure/$(am__dirstamp)
+type_erasure/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) type_erasure/$(DEPDIR)
+ @: > type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/main.$(OBJEXT): type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/stdin_line_reader.$(OBJEXT): \
+ type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/sleep.$(OBJEXT): type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+
+type_erasure/type_erasure$(EXEEXT): $(type_erasure_type_erasure_OBJECTS) $(type_erasure_type_erasure_DEPENDENCIES) $(EXTRA_type_erasure_type_erasure_DEPENDENCIES) type_erasure/$(am__dirstamp)
+ @rm -f type_erasure/type_erasure$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(type_erasure_type_erasure_OBJECTS) $(type_erasure_type_erasure_LDADD) $(LIBS)
+windows/$(am__dirstamp):
+ @$(MKDIR_P) windows
+ @: > windows/$(am__dirstamp)
+windows/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) windows/$(DEPDIR)
+ @: > windows/$(DEPDIR)/$(am__dirstamp)
+windows/transmit_file.$(OBJEXT): windows/$(am__dirstamp) \
+ windows/$(DEPDIR)/$(am__dirstamp)
+
+windows/transmit_file$(EXEEXT): $(windows_transmit_file_OBJECTS) $(windows_transmit_file_DEPENDENCIES) $(EXTRA_windows_transmit_file_DEPENDENCIES) windows/$(am__dirstamp)
+ @rm -f windows/transmit_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(windows_transmit_file_OBJECTS) $(windows_transmit_file_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -1329,23 +2258,47 @@ mostlyclean-compile:
-rm -f allocation/*.$(OBJEXT)
-rm -f buffers/*.$(OBJEXT)
-rm -f chat/*.$(OBJEXT)
+ -rm -f deferred/*.$(OBJEXT)
-rm -f echo/*.$(OBJEXT)
-rm -f executors/*.$(OBJEXT)
+ -rm -f files/*.$(OBJEXT)
-rm -f fork/*.$(OBJEXT)
-rm -f futures/*.$(OBJEXT)
-rm -f handler_tracking/*.$(OBJEXT)
+ -rm -f http/client/*.$(OBJEXT)
-rm -f http/server/*.$(OBJEXT)
+ -rm -f http/server2/*.$(OBJEXT)
+ -rm -f http/server3/*.$(OBJEXT)
+ -rm -f http/server4/*.$(OBJEXT)
+ -rm -f icmp/*.$(OBJEXT)
-rm -f invocation/*.$(OBJEXT)
-rm -f iostreams/*.$(OBJEXT)
-rm -f local/*.$(OBJEXT)
-rm -f multicast/*.$(OBJEXT)
-rm -f nonblocking/*.$(OBJEXT)
-rm -f operations/*.$(OBJEXT)
+ -rm -f parallel_group/*.$(OBJEXT)
+ -rm -f porthopper/*.$(OBJEXT)
+ -rm -f services/*.$(OBJEXT)
-rm -f socks4/*.$(OBJEXT)
-rm -f spawn/*.$(OBJEXT)
-rm -f ssl/*.$(OBJEXT)
-rm -f timeouts/*.$(OBJEXT)
-rm -f timers/*.$(OBJEXT)
+ -rm -f tutorial/daytime1/*.$(OBJEXT)
+ -rm -f tutorial/daytime2/*.$(OBJEXT)
+ -rm -f tutorial/daytime3/*.$(OBJEXT)
+ -rm -f tutorial/daytime4/*.$(OBJEXT)
+ -rm -f tutorial/daytime5/*.$(OBJEXT)
+ -rm -f tutorial/daytime6/*.$(OBJEXT)
+ -rm -f tutorial/daytime7/*.$(OBJEXT)
+ -rm -f tutorial/timer1/*.$(OBJEXT)
+ -rm -f tutorial/timer2/*.$(OBJEXT)
+ -rm -f tutorial/timer3/*.$(OBJEXT)
+ -rm -f tutorial/timer4/*.$(OBJEXT)
+ -rm -f tutorial/timer5/*.$(OBJEXT)
+ -rm -f type_erasure/*.$(OBJEXT)
+ -rm -f windows/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@@ -1356,6 +2309,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@buffers/$(DEPDIR)/reference_counted.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@chat/$(DEPDIR)/chat_client.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@chat/$(DEPDIR)/chat_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@chat/$(DEPDIR)/posix_chat_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@deferred/$(DEPDIR)/deferred_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@deferred/$(DEPDIR)/deferred_2.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/async_tcp_echo_server.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/async_udp_echo_server.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@echo/$(DEPDIR)/blocking_tcp_echo_client.Po@am__quote@ # am--include-marker
@@ -1368,10 +2324,14 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/fork_join.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/pipeline.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/priority_scheduler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@files/$(DEPDIR)/async_file_copy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@files/$(DEPDIR)/blocking_file_copy.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@fork/$(DEPDIR)/daemon.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@fork/$(DEPDIR)/process_per_connection.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@futures/$(DEPDIR)/daytime_client.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@handler_tracking/$(DEPDIR)/async_tcp_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/client/$(DEPDIR)/async_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/client/$(DEPDIR)/sync_client.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/connection.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/connection_manager.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
@@ -1380,9 +2340,35 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/request_handler.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@http/server/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/connection.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/io_context_pool.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/mime_types.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/reply.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/request_handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server2/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/connection.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/mime_types.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/reply.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/request_handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server3/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/file_handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/mime_types.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/reply.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/request_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@http/server4/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@icmp/$(DEPDIR)/ping.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@invocation/$(DEPDIR)/prioritised_handlers.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@iostreams/$(DEPDIR)/daytime_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@iostreams/$(DEPDIR)/daytime_server.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@iostreams/$(DEPDIR)/http_client.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/connect_pair.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/fd_passing_stream_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/fd_passing_stream_server.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/iostream_client.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/stream_client.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@local/$(DEPDIR)/stream_server.Po@am__quote@ # am--include-marker
@@ -1397,6 +2383,15 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_6.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_7.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_8.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/ranged_wait_for_all.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_all.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_one.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_one_error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_one_success.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@porthopper/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@porthopper/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@services/$(DEPDIR)/daytime_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@services/$(DEPDIR)/logger_service.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@socks4/$(DEPDIR)/sync_client.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@spawn/$(DEPDIR)/echo_server.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@spawn/$(DEPDIR)/parallel_grep.Po@am__quote@ # am--include-marker
@@ -1408,6 +2403,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/blocking_udp_client.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@timeouts/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@timers/$(DEPDIR)/time_t_timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime1/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime2/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime3/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime4/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime5/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime6/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/daytime7/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer1/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer2/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer3/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer4/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tutorial/timer5/$(DEPDIR)/timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/sleep.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/stdin_line_reader.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@windows/$(DEPDIR)/transmit_file.Po@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@@ -1482,7 +2493,6 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -1554,18 +2564,32 @@ distclean-generic:
-rm -f buffers/$(am__dirstamp)
-rm -f chat/$(DEPDIR)/$(am__dirstamp)
-rm -f chat/$(am__dirstamp)
+ -rm -f deferred/$(DEPDIR)/$(am__dirstamp)
+ -rm -f deferred/$(am__dirstamp)
-rm -f echo/$(DEPDIR)/$(am__dirstamp)
-rm -f echo/$(am__dirstamp)
-rm -f executors/$(DEPDIR)/$(am__dirstamp)
-rm -f executors/$(am__dirstamp)
+ -rm -f files/$(DEPDIR)/$(am__dirstamp)
+ -rm -f files/$(am__dirstamp)
-rm -f fork/$(DEPDIR)/$(am__dirstamp)
-rm -f fork/$(am__dirstamp)
-rm -f futures/$(DEPDIR)/$(am__dirstamp)
-rm -f futures/$(am__dirstamp)
-rm -f handler_tracking/$(DEPDIR)/$(am__dirstamp)
-rm -f handler_tracking/$(am__dirstamp)
+ -rm -f http/client/$(DEPDIR)/$(am__dirstamp)
+ -rm -f http/client/$(am__dirstamp)
-rm -f http/server/$(DEPDIR)/$(am__dirstamp)
-rm -f http/server/$(am__dirstamp)
+ -rm -f http/server2/$(DEPDIR)/$(am__dirstamp)
+ -rm -f http/server2/$(am__dirstamp)
+ -rm -f http/server3/$(DEPDIR)/$(am__dirstamp)
+ -rm -f http/server3/$(am__dirstamp)
+ -rm -f http/server4/$(DEPDIR)/$(am__dirstamp)
+ -rm -f http/server4/$(am__dirstamp)
+ -rm -f icmp/$(DEPDIR)/$(am__dirstamp)
+ -rm -f icmp/$(am__dirstamp)
-rm -f invocation/$(DEPDIR)/$(am__dirstamp)
-rm -f invocation/$(am__dirstamp)
-rm -f iostreams/$(DEPDIR)/$(am__dirstamp)
@@ -1578,6 +2602,12 @@ distclean-generic:
-rm -f nonblocking/$(am__dirstamp)
-rm -f operations/$(DEPDIR)/$(am__dirstamp)
-rm -f operations/$(am__dirstamp)
+ -rm -f parallel_group/$(DEPDIR)/$(am__dirstamp)
+ -rm -f parallel_group/$(am__dirstamp)
+ -rm -f porthopper/$(DEPDIR)/$(am__dirstamp)
+ -rm -f porthopper/$(am__dirstamp)
+ -rm -f services/$(DEPDIR)/$(am__dirstamp)
+ -rm -f services/$(am__dirstamp)
-rm -f socks4/$(DEPDIR)/$(am__dirstamp)
-rm -f socks4/$(am__dirstamp)
-rm -f spawn/$(DEPDIR)/$(am__dirstamp)
@@ -1588,6 +2618,34 @@ distclean-generic:
-rm -f timeouts/$(am__dirstamp)
-rm -f timers/$(DEPDIR)/$(am__dirstamp)
-rm -f timers/$(am__dirstamp)
+ -rm -f tutorial/daytime1/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime1/$(am__dirstamp)
+ -rm -f tutorial/daytime2/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime2/$(am__dirstamp)
+ -rm -f tutorial/daytime3/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime3/$(am__dirstamp)
+ -rm -f tutorial/daytime4/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime4/$(am__dirstamp)
+ -rm -f tutorial/daytime5/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime5/$(am__dirstamp)
+ -rm -f tutorial/daytime6/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime6/$(am__dirstamp)
+ -rm -f tutorial/daytime7/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/daytime7/$(am__dirstamp)
+ -rm -f tutorial/timer1/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/timer1/$(am__dirstamp)
+ -rm -f tutorial/timer2/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/timer2/$(am__dirstamp)
+ -rm -f tutorial/timer3/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/timer3/$(am__dirstamp)
+ -rm -f tutorial/timer4/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/timer4/$(am__dirstamp)
+ -rm -f tutorial/timer5/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tutorial/timer5/$(am__dirstamp)
+ -rm -f type_erasure/$(DEPDIR)/$(am__dirstamp)
+ -rm -f type_erasure/$(am__dirstamp)
+ -rm -f windows/$(DEPDIR)/$(am__dirstamp)
+ -rm -f windows/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -1605,6 +2663,9 @@ distclean: distclean-am
-rm -f buffers/$(DEPDIR)/reference_counted.Po
-rm -f chat/$(DEPDIR)/chat_client.Po
-rm -f chat/$(DEPDIR)/chat_server.Po
+ -rm -f chat/$(DEPDIR)/posix_chat_client.Po
+ -rm -f deferred/$(DEPDIR)/deferred_1.Po
+ -rm -f deferred/$(DEPDIR)/deferred_2.Po
-rm -f echo/$(DEPDIR)/async_tcp_echo_server.Po
-rm -f echo/$(DEPDIR)/async_udp_echo_server.Po
-rm -f echo/$(DEPDIR)/blocking_tcp_echo_client.Po
@@ -1617,10 +2678,14 @@ distclean: distclean-am
-rm -f executors/$(DEPDIR)/fork_join.Po
-rm -f executors/$(DEPDIR)/pipeline.Po
-rm -f executors/$(DEPDIR)/priority_scheduler.Po
+ -rm -f files/$(DEPDIR)/async_file_copy.Po
+ -rm -f files/$(DEPDIR)/blocking_file_copy.Po
-rm -f fork/$(DEPDIR)/daemon.Po
-rm -f fork/$(DEPDIR)/process_per_connection.Po
-rm -f futures/$(DEPDIR)/daytime_client.Po
-rm -f handler_tracking/$(DEPDIR)/async_tcp_echo_server.Po
+ -rm -f http/client/$(DEPDIR)/async_client.Po
+ -rm -f http/client/$(DEPDIR)/sync_client.Po
-rm -f http/server/$(DEPDIR)/connection.Po
-rm -f http/server/$(DEPDIR)/connection_manager.Po
-rm -f http/server/$(DEPDIR)/main.Po
@@ -1629,9 +2694,35 @@ distclean: distclean-am
-rm -f http/server/$(DEPDIR)/request_handler.Po
-rm -f http/server/$(DEPDIR)/request_parser.Po
-rm -f http/server/$(DEPDIR)/server.Po
+ -rm -f http/server2/$(DEPDIR)/connection.Po
+ -rm -f http/server2/$(DEPDIR)/io_context_pool.Po
+ -rm -f http/server2/$(DEPDIR)/main.Po
+ -rm -f http/server2/$(DEPDIR)/mime_types.Po
+ -rm -f http/server2/$(DEPDIR)/reply.Po
+ -rm -f http/server2/$(DEPDIR)/request_handler.Po
+ -rm -f http/server2/$(DEPDIR)/request_parser.Po
+ -rm -f http/server2/$(DEPDIR)/server.Po
+ -rm -f http/server3/$(DEPDIR)/connection.Po
+ -rm -f http/server3/$(DEPDIR)/main.Po
+ -rm -f http/server3/$(DEPDIR)/mime_types.Po
+ -rm -f http/server3/$(DEPDIR)/reply.Po
+ -rm -f http/server3/$(DEPDIR)/request_handler.Po
+ -rm -f http/server3/$(DEPDIR)/request_parser.Po
+ -rm -f http/server3/$(DEPDIR)/server.Po
+ -rm -f http/server4/$(DEPDIR)/file_handler.Po
+ -rm -f http/server4/$(DEPDIR)/main.Po
+ -rm -f http/server4/$(DEPDIR)/mime_types.Po
+ -rm -f http/server4/$(DEPDIR)/reply.Po
+ -rm -f http/server4/$(DEPDIR)/request_parser.Po
+ -rm -f http/server4/$(DEPDIR)/server.Po
+ -rm -f icmp/$(DEPDIR)/ping.Po
-rm -f invocation/$(DEPDIR)/prioritised_handlers.Po
+ -rm -f iostreams/$(DEPDIR)/daytime_client.Po
+ -rm -f iostreams/$(DEPDIR)/daytime_server.Po
-rm -f iostreams/$(DEPDIR)/http_client.Po
-rm -f local/$(DEPDIR)/connect_pair.Po
+ -rm -f local/$(DEPDIR)/fd_passing_stream_client.Po
+ -rm -f local/$(DEPDIR)/fd_passing_stream_server.Po
-rm -f local/$(DEPDIR)/iostream_client.Po
-rm -f local/$(DEPDIR)/stream_client.Po
-rm -f local/$(DEPDIR)/stream_server.Po
@@ -1646,6 +2737,15 @@ distclean: distclean-am
-rm -f operations/$(DEPDIR)/composed_6.Po
-rm -f operations/$(DEPDIR)/composed_7.Po
-rm -f operations/$(DEPDIR)/composed_8.Po
+ -rm -f parallel_group/$(DEPDIR)/ranged_wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_error.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_success.Po
+ -rm -f porthopper/$(DEPDIR)/client.Po
+ -rm -f porthopper/$(DEPDIR)/server.Po
+ -rm -f services/$(DEPDIR)/daytime_client.Po
+ -rm -f services/$(DEPDIR)/logger_service.Po
-rm -f socks4/$(DEPDIR)/sync_client.Po
-rm -f spawn/$(DEPDIR)/echo_server.Po
-rm -f spawn/$(DEPDIR)/parallel_grep.Po
@@ -1657,6 +2757,22 @@ distclean: distclean-am
-rm -f timeouts/$(DEPDIR)/blocking_udp_client.Po
-rm -f timeouts/$(DEPDIR)/server.Po
-rm -f timers/$(DEPDIR)/time_t_timer.Po
+ -rm -f tutorial/daytime1/$(DEPDIR)/client.Po
+ -rm -f tutorial/daytime2/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime3/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime4/$(DEPDIR)/client.Po
+ -rm -f tutorial/daytime5/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime6/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime7/$(DEPDIR)/server.Po
+ -rm -f tutorial/timer1/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer2/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer3/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer4/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer5/$(DEPDIR)/timer.Po
+ -rm -f type_erasure/$(DEPDIR)/main.Po
+ -rm -f type_erasure/$(DEPDIR)/sleep.Po
+ -rm -f type_erasure/$(DEPDIR)/stdin_line_reader.Po
+ -rm -f windows/$(DEPDIR)/transmit_file.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -1708,6 +2824,9 @@ maintainer-clean: maintainer-clean-am
-rm -f buffers/$(DEPDIR)/reference_counted.Po
-rm -f chat/$(DEPDIR)/chat_client.Po
-rm -f chat/$(DEPDIR)/chat_server.Po
+ -rm -f chat/$(DEPDIR)/posix_chat_client.Po
+ -rm -f deferred/$(DEPDIR)/deferred_1.Po
+ -rm -f deferred/$(DEPDIR)/deferred_2.Po
-rm -f echo/$(DEPDIR)/async_tcp_echo_server.Po
-rm -f echo/$(DEPDIR)/async_udp_echo_server.Po
-rm -f echo/$(DEPDIR)/blocking_tcp_echo_client.Po
@@ -1720,10 +2839,14 @@ maintainer-clean: maintainer-clean-am
-rm -f executors/$(DEPDIR)/fork_join.Po
-rm -f executors/$(DEPDIR)/pipeline.Po
-rm -f executors/$(DEPDIR)/priority_scheduler.Po
+ -rm -f files/$(DEPDIR)/async_file_copy.Po
+ -rm -f files/$(DEPDIR)/blocking_file_copy.Po
-rm -f fork/$(DEPDIR)/daemon.Po
-rm -f fork/$(DEPDIR)/process_per_connection.Po
-rm -f futures/$(DEPDIR)/daytime_client.Po
-rm -f handler_tracking/$(DEPDIR)/async_tcp_echo_server.Po
+ -rm -f http/client/$(DEPDIR)/async_client.Po
+ -rm -f http/client/$(DEPDIR)/sync_client.Po
-rm -f http/server/$(DEPDIR)/connection.Po
-rm -f http/server/$(DEPDIR)/connection_manager.Po
-rm -f http/server/$(DEPDIR)/main.Po
@@ -1732,9 +2855,35 @@ maintainer-clean: maintainer-clean-am
-rm -f http/server/$(DEPDIR)/request_handler.Po
-rm -f http/server/$(DEPDIR)/request_parser.Po
-rm -f http/server/$(DEPDIR)/server.Po
+ -rm -f http/server2/$(DEPDIR)/connection.Po
+ -rm -f http/server2/$(DEPDIR)/io_context_pool.Po
+ -rm -f http/server2/$(DEPDIR)/main.Po
+ -rm -f http/server2/$(DEPDIR)/mime_types.Po
+ -rm -f http/server2/$(DEPDIR)/reply.Po
+ -rm -f http/server2/$(DEPDIR)/request_handler.Po
+ -rm -f http/server2/$(DEPDIR)/request_parser.Po
+ -rm -f http/server2/$(DEPDIR)/server.Po
+ -rm -f http/server3/$(DEPDIR)/connection.Po
+ -rm -f http/server3/$(DEPDIR)/main.Po
+ -rm -f http/server3/$(DEPDIR)/mime_types.Po
+ -rm -f http/server3/$(DEPDIR)/reply.Po
+ -rm -f http/server3/$(DEPDIR)/request_handler.Po
+ -rm -f http/server3/$(DEPDIR)/request_parser.Po
+ -rm -f http/server3/$(DEPDIR)/server.Po
+ -rm -f http/server4/$(DEPDIR)/file_handler.Po
+ -rm -f http/server4/$(DEPDIR)/main.Po
+ -rm -f http/server4/$(DEPDIR)/mime_types.Po
+ -rm -f http/server4/$(DEPDIR)/reply.Po
+ -rm -f http/server4/$(DEPDIR)/request_parser.Po
+ -rm -f http/server4/$(DEPDIR)/server.Po
+ -rm -f icmp/$(DEPDIR)/ping.Po
-rm -f invocation/$(DEPDIR)/prioritised_handlers.Po
+ -rm -f iostreams/$(DEPDIR)/daytime_client.Po
+ -rm -f iostreams/$(DEPDIR)/daytime_server.Po
-rm -f iostreams/$(DEPDIR)/http_client.Po
-rm -f local/$(DEPDIR)/connect_pair.Po
+ -rm -f local/$(DEPDIR)/fd_passing_stream_client.Po
+ -rm -f local/$(DEPDIR)/fd_passing_stream_server.Po
-rm -f local/$(DEPDIR)/iostream_client.Po
-rm -f local/$(DEPDIR)/stream_client.Po
-rm -f local/$(DEPDIR)/stream_server.Po
@@ -1749,6 +2898,15 @@ maintainer-clean: maintainer-clean-am
-rm -f operations/$(DEPDIR)/composed_6.Po
-rm -f operations/$(DEPDIR)/composed_7.Po
-rm -f operations/$(DEPDIR)/composed_8.Po
+ -rm -f parallel_group/$(DEPDIR)/ranged_wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_all.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_error.Po
+ -rm -f parallel_group/$(DEPDIR)/wait_for_one_success.Po
+ -rm -f porthopper/$(DEPDIR)/client.Po
+ -rm -f porthopper/$(DEPDIR)/server.Po
+ -rm -f services/$(DEPDIR)/daytime_client.Po
+ -rm -f services/$(DEPDIR)/logger_service.Po
-rm -f socks4/$(DEPDIR)/sync_client.Po
-rm -f spawn/$(DEPDIR)/echo_server.Po
-rm -f spawn/$(DEPDIR)/parallel_grep.Po
@@ -1760,6 +2918,22 @@ maintainer-clean: maintainer-clean-am
-rm -f timeouts/$(DEPDIR)/blocking_udp_client.Po
-rm -f timeouts/$(DEPDIR)/server.Po
-rm -f timers/$(DEPDIR)/time_t_timer.Po
+ -rm -f tutorial/daytime1/$(DEPDIR)/client.Po
+ -rm -f tutorial/daytime2/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime3/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime4/$(DEPDIR)/client.Po
+ -rm -f tutorial/daytime5/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime6/$(DEPDIR)/server.Po
+ -rm -f tutorial/daytime7/$(DEPDIR)/server.Po
+ -rm -f tutorial/timer1/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer2/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer3/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer4/$(DEPDIR)/timer.Po
+ -rm -f tutorial/timer5/$(DEPDIR)/timer.Po
+ -rm -f type_erasure/$(DEPDIR)/main.Po
+ -rm -f type_erasure/$(DEPDIR)/sleep.Po
+ -rm -f type_erasure/$(DEPDIR)/stdin_line_reader.Po
+ -rm -f windows/$(DEPDIR)/transmit_file.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/3rdparty/asio/src/examples/cpp11/allocation/server.cpp b/3rdparty/asio/src/examples/cpp11/allocation/server.cpp
index 4d0d80e6875..48bc119c1c5 100644
--- a/3rdparty/asio/src/examples/cpp11/allocation/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/allocation/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -112,46 +112,6 @@ private:
handler_memory& memory_;
};
-// Wrapper class template for handler objects to allow handler memory
-// allocation to be customised. The allocator_type type and get_allocator()
-// member function are used by the asynchronous operations to obtain the
-// allocator. Calls to operator() are forwarded to the encapsulated handler.
-template <typename Handler>
-class custom_alloc_handler
-{
-public:
- using allocator_type = handler_allocator<Handler>;
-
- custom_alloc_handler(handler_memory& m, Handler h)
- : memory_(m),
- handler_(h)
- {
- }
-
- allocator_type get_allocator() const noexcept
- {
- return allocator_type(memory_);
- }
-
- template <typename ...Args>
- void operator()(Args&&... args)
- {
- handler_(std::forward<Args>(args)...);
- }
-
-private:
- handler_memory& memory_;
- Handler handler_;
-};
-
-// Helper function to wrap a handler object to add custom allocation.
-template <typename Handler>
-inline custom_alloc_handler<Handler> make_custom_alloc_handler(
- handler_memory& m, Handler h)
-{
- return custom_alloc_handler<Handler>(m, h);
-}
-
class session
: public std::enable_shared_from_this<session>
{
@@ -171,7 +131,8 @@ private:
{
auto self(shared_from_this());
socket_.async_read_some(asio::buffer(data_),
- make_custom_alloc_handler(handler_memory_,
+ asio::bind_allocator(
+ handler_allocator<int>(handler_memory_),
[this, self](std::error_code ec, std::size_t length)
{
if (!ec)
@@ -185,7 +146,8 @@ private:
{
auto self(shared_from_this());
asio::async_write(socket_, asio::buffer(data_, length),
- make_custom_alloc_handler(handler_memory_,
+ asio::bind_allocator(
+ handler_allocator<int>(handler_memory_),
[this, self](std::error_code ec, std::size_t /*length*/)
{
if (!ec)
diff --git a/3rdparty/asio/src/examples/cpp11/buffers/reference_counted.cpp b/3rdparty/asio/src/examples/cpp11/buffers/reference_counted.cpp
index d0f565faf66..cee56ff786b 100644
--- a/3rdparty/asio/src/examples/cpp11/buffers/reference_counted.cpp
+++ b/3rdparty/asio/src/examples/cpp11/buffers/reference_counted.cpp
@@ -2,7 +2,7 @@
// reference_counted.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/chat/chat_client.cpp b/3rdparty/asio/src/examples/cpp11/chat/chat_client.cpp
index 6280851a82e..c0393ee8266 100644
--- a/3rdparty/asio/src/examples/cpp11/chat/chat_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/chat/chat_client.cpp
@@ -2,7 +2,7 @@
// chat_client.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/chat/chat_message.hpp b/3rdparty/asio/src/examples/cpp11/chat/chat_message.hpp
index cdc09ea33f8..2ae82fa1257 100644
--- a/3rdparty/asio/src/examples/cpp11/chat/chat_message.hpp
+++ b/3rdparty/asio/src/examples/cpp11/chat/chat_message.hpp
@@ -2,7 +2,7 @@
// chat_message.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,8 +18,8 @@
class chat_message
{
public:
- enum { header_length = 4 };
- enum { max_body_length = 512 };
+ static constexpr std::size_t header_length = 4;
+ static constexpr std::size_t max_body_length = 512;
chat_message()
: body_length_(0)
diff --git a/3rdparty/asio/src/examples/cpp11/chat/chat_server.cpp b/3rdparty/asio/src/examples/cpp11/chat/chat_server.cpp
index edc7b44cd6a..7a5dfe33d4f 100644
--- a/3rdparty/asio/src/examples/cpp11/chat/chat_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/chat/chat_server.cpp
@@ -2,7 +2,7 @@
// chat_server.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/chat/posix_chat_client.cpp b/3rdparty/asio/src/examples/cpp11/chat/posix_chat_client.cpp
new file mode 100644
index 00000000000..a77b8cfb001
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/chat/posix_chat_client.cpp
@@ -0,0 +1,198 @@
+//
+// posix_chat_client.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <array>
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+#include "asio.hpp"
+#include "chat_message.hpp"
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+using asio::ip::tcp;
+namespace posix = asio::posix;
+
+class posix_chat_client
+{
+public:
+ posix_chat_client(asio::io_context& io_context,
+ const tcp::resolver::results_type& endpoints)
+ : socket_(io_context),
+ input_(io_context, ::dup(STDIN_FILENO)),
+ output_(io_context, ::dup(STDOUT_FILENO)),
+ input_buffer_(chat_message::max_body_length)
+ {
+ do_connect(endpoints);
+ }
+
+private:
+ void do_connect(const tcp::resolver::results_type& endpoints)
+ {
+ asio::async_connect(socket_, endpoints,
+ [this](std::error_code ec, tcp::endpoint)
+ {
+ if (!ec)
+ {
+ do_read_header();
+ do_read_input();
+ }
+ });
+ }
+
+ void do_read_header()
+ {
+ asio::async_read(socket_,
+ asio::buffer(read_msg_.data(), chat_message::header_length),
+ [this](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec && read_msg_.decode_header())
+ {
+ do_read_body();
+ }
+ else
+ {
+ close();
+ }
+ });
+ }
+
+ void do_read_body()
+ {
+ asio::async_read(socket_,
+ asio::buffer(read_msg_.body(), read_msg_.body_length()),
+ [this](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec)
+ {
+ do_write_output();
+ }
+ else
+ {
+ close();
+ }
+ });
+ }
+
+ void do_write_output()
+ {
+ // Write out the message we just received, terminated by a newline.
+ static char eol[] = { '\n' };
+ std::array<asio::const_buffer, 2> buffers = {{
+ asio::buffer(read_msg_.body(), read_msg_.body_length()),
+ asio::buffer(eol) }};
+ asio::async_write(output_, buffers,
+ [this](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec)
+ {
+ do_read_header();
+ }
+ else
+ {
+ close();
+ }
+ });
+ }
+
+ void do_read_input()
+ {
+ // Read a line of input entered by the user.
+ asio::async_read_until(input_, input_buffer_, '\n',
+ [this](std::error_code ec, std::size_t length)
+ {
+ if (!ec)
+ {
+ // Write the message (minus the newline) to the server.
+ write_msg_.body_length(length - 1);
+ input_buffer_.sgetn(write_msg_.body(), length - 1);
+ input_buffer_.consume(1); // Remove newline from input.
+ write_msg_.encode_header();
+ do_write_message();
+ }
+ else if (ec == asio::error::not_found)
+ {
+ // Didn't get a newline. Send whatever we have.
+ write_msg_.body_length(input_buffer_.size());
+ input_buffer_.sgetn(write_msg_.body(), input_buffer_.size());
+ write_msg_.encode_header();
+ do_write_message();
+ }
+ else
+ {
+ close();
+ }
+ });
+ }
+
+ void do_write_message()
+ {
+ asio::async_write(socket_,
+ asio::buffer(write_msg_.data(), write_msg_.length()),
+ [this](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec)
+ {
+ do_read_input();
+ }
+ else
+ {
+ close();
+ }
+ });
+ }
+
+ void close()
+ {
+ // Cancel all outstanding asynchronous operations.
+ socket_.close();
+ input_.close();
+ output_.close();
+ }
+
+private:
+ tcp::socket socket_;
+ posix::stream_descriptor input_;
+ posix::stream_descriptor output_;
+ chat_message read_msg_;
+ chat_message write_msg_;
+ asio::streambuf input_buffer_;
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: posix_chat_client <host> <port>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ tcp::resolver resolver(io_context);
+ tcp::resolver::results_type endpoints = resolver.resolve(argv[1], argv[2]);
+
+ posix_chat_client c(io_context, endpoints);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp11/deferred/deferred_1.cpp b/3rdparty/asio/src/examples/cpp11/deferred/deferred_1.cpp
new file mode 100644
index 00000000000..db9213eb3be
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/deferred/deferred_1.cpp
@@ -0,0 +1,35 @@
+//
+// deferred_1.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+using asio::deferred;
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::steady_timer timer(ctx);
+ timer.expires_after(std::chrono::seconds(1));
+
+ auto deferred_op = timer.async_wait(deferred);
+
+ std::move(deferred_op)(
+ [](std::error_code ec)
+ {
+ std::cout << "timer wait finished: " << ec.message() << "\n";
+ }
+ );
+
+ ctx.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/deferred/deferred_2.cpp b/3rdparty/asio/src/examples/cpp11/deferred/deferred_2.cpp
new file mode 100644
index 00000000000..07528282de5
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/deferred/deferred_2.cpp
@@ -0,0 +1,44 @@
+//
+// deferred_2.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+using asio::deferred;
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::steady_timer timer(ctx);
+ timer.expires_after(std::chrono::seconds(1));
+
+ auto deferred_op = timer.async_wait(
+ deferred(
+ [&](std::error_code ec)
+ {
+ std::cout << "first timer wait finished: " << ec.message() << "\n";
+ timer.expires_after(std::chrono::seconds(1));
+ return timer.async_wait(deferred);
+ }
+ )
+ );
+
+ std::move(deferred_op)(
+ [](std::error_code ec)
+ {
+ std::cout << "second timer wait finished: " << ec.message() << "\n";
+ }
+ );
+
+ ctx.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp
index 0f776cca718..b8ba5337697 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/async_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
// async_tcp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp
index d09c939f72d..8e5c26fba2a 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/async_udp_echo_server.cpp
@@ -2,7 +2,7 @@
// async_udp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp b/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp
index 96a843e41ad..8a281203f89 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_client.cpp
@@ -2,7 +2,7 @@
// blocking_tcp_echo_client.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp
index d772b5a6bf1..34e5f221695 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/blocking_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
// blocking_tcp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -26,12 +26,12 @@ void session(tcp::socket sock)
{
char data[max_length];
- asio::error_code error;
+ std::error_code error;
size_t length = sock.read_some(asio::buffer(data), error);
if (error == asio::error::eof)
break; // Connection closed cleanly by peer.
else if (error)
- throw asio::system_error(error); // Some other error.
+ throw std::system_error(error); // Some other error.
asio::write(sock, asio::buffer(data, length));
}
diff --git a/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp b/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp
index 11a6c9258bd..3f2b60e3ccc 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_client.cpp
@@ -2,7 +2,7 @@
// blocking_udp_echo_client.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp
index 7cf8920ec97..64c6defb885 100644
--- a/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/echo/blocking_udp_echo_server.cpp
@@ -2,7 +2,7 @@
// blocking_udp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/executors/bank_account_1.cpp b/3rdparty/asio/src/examples/cpp11/executors/bank_account_1.cpp
index abfd16a7ee0..a63d7fc059b 100644
--- a/3rdparty/asio/src/examples/cpp11/executors/bank_account_1.cpp
+++ b/3rdparty/asio/src/examples/cpp11/executors/bank_account_1.cpp
@@ -16,8 +16,7 @@ class bank_account
public:
void deposit(int amount)
{
- execution::execute(
- pool_.executor(),
+ pool_.executor().execute(
[this, amount]
{
balance_ += amount;
@@ -26,8 +25,7 @@ public:
void withdraw(int amount)
{
- execution::execute(
- pool_.executor(),
+ pool_.executor().execute(
[this, amount]
{
if (balance_ >= amount)
@@ -37,8 +35,7 @@ public:
void print_balance() const
{
- execution::execute(
- pool_.executor(),
+ pool_.executor().execute(
[this]
{
std::cout << "balance = " << balance_ << "\n";
diff --git a/3rdparty/asio/src/examples/cpp11/executors/bank_account_2.cpp b/3rdparty/asio/src/examples/cpp11/executors/bank_account_2.cpp
index 305d0ca5b86..45a24abc352 100644
--- a/3rdparty/asio/src/examples/cpp11/executors/bank_account_2.cpp
+++ b/3rdparty/asio/src/examples/cpp11/executors/bank_account_2.cpp
@@ -16,9 +16,7 @@ class bank_account
public:
void deposit(int amount)
{
- execution::execute(
- asio::require(pool_.executor(),
- execution::blocking.always),
+ asio::require(pool_.executor(), execution::blocking.always).execute(
[this, amount]
{
balance_ += amount;
@@ -27,9 +25,7 @@ public:
void withdraw(int amount)
{
- execution::execute(
- asio::require(pool_.executor(),
- execution::blocking.always),
+ asio::require(pool_.executor(), execution::blocking.always).execute(
[this, amount]
{
if (balance_ >= amount)
@@ -40,9 +36,7 @@ public:
int balance() const
{
int result = 0;
- execution::execute(
- asio::require(pool_.executor(),
- execution::blocking.always),
+ asio::require(pool_.executor(), execution::blocking.always).execute(
[this, &result]
{
result = balance_;
diff --git a/3rdparty/asio/src/examples/cpp11/executors/fork_join.cpp b/3rdparty/asio/src/examples/cpp11/executors/fork_join.cpp
index a76437efad9..7e8a827356d 100644
--- a/3rdparty/asio/src/examples/cpp11/executors/fork_join.cpp
+++ b/3rdparty/asio/src/examples/cpp11/executors/fork_join.cpp
@@ -32,8 +32,7 @@ public:
// it is time to shut down, i.e. the use count is zero.
for (thread_count_ = 0; thread_count_ < thread_count; ++thread_count_)
{
- execution::execute(
- threads_.executor(),
+ threads_.executor().execute(
[this]
{
std::unique_lock<std::mutex> lock(mutex_);
@@ -252,8 +251,8 @@ void fork_join_sort(Iterator begin, Iterator end)
{
fork_executor fork(pool);
join_guard join(fork);
- execution::execute(fork, [=]{ fork_join_sort(begin, begin + n / 2); });
- execution::execute(fork, [=]{ fork_join_sort(begin + n / 2, end); });
+ fork.execute([=]{ fork_join_sort(begin, begin + n / 2); });
+ fork.execute([=]{ fork_join_sort(begin + n / 2, end); });
}
std::inplace_merge(begin, begin + n / 2, end);
}
diff --git a/3rdparty/asio/src/examples/cpp11/files/async_file_copy.cpp b/3rdparty/asio/src/examples/cpp11/files/async_file_copy.cpp
new file mode 100644
index 00000000000..edfb2765ed5
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/files/async_file_copy.cpp
@@ -0,0 +1,101 @@
+//
+// async_file_copy.cpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <iostream>
+#include "asio.hpp"
+
+#if defined(ASIO_HAS_FILE)
+
+class file_copier
+{
+public:
+ file_copier(asio::io_context& io_context,
+ const char* from, const char* to)
+ : from_file_(io_context, from,
+ asio::stream_file::read_only),
+ to_file_(io_context, to,
+ asio::stream_file::write_only
+ | asio::stream_file::create
+ | asio::stream_file::truncate)
+ {
+ }
+
+ void start()
+ {
+ do_read();
+ }
+
+private:
+ void do_read()
+ {
+ from_file_.async_read_some(asio::buffer(data_),
+ [this](std::error_code error, std::size_t n)
+ {
+ if (!error)
+ {
+ do_write(n);
+ }
+ else if (error != asio::error::eof)
+ {
+ std::cerr << "Error copying file: " << error.message() << "\n";
+ }
+ });
+ }
+
+ void do_write(std::size_t n)
+ {
+ asio::async_write(to_file_, asio::buffer(data_, n),
+ [this](std::error_code error, std::size_t /*n*/)
+ {
+ if (!error)
+ {
+ do_read();
+ }
+ else
+ {
+ std::cerr << "Error copying file: " << error.message() << "\n";
+ }
+ });
+ }
+
+ asio::stream_file from_file_;
+ asio::stream_file to_file_;
+ char data_[4096];
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: async_file_copy <from> <to>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ file_copier copier(io_context, argv[1], argv[2]);
+ copier.start();
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ return 1;
+ }
+
+ return 0;
+}
+
+#else // defined(ASIO_HAS_FILE)
+int main() {}
+#endif // defined(ASIO_HAS_FILE)
diff --git a/3rdparty/asio/src/examples/cpp11/files/blocking_file_copy.cpp b/3rdparty/asio/src/examples/cpp11/files/blocking_file_copy.cpp
new file mode 100644
index 00000000000..6e111b4909d
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/files/blocking_file_copy.cpp
@@ -0,0 +1,65 @@
+//
+// blocking_file_copy.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <iostream>
+#include "asio.hpp"
+
+#if defined(ASIO_HAS_FILE)
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: blocking_file_copy <from> <to>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ asio::stream_file from_file(io_context, argv[1],
+ asio::stream_file::read_only);
+
+ asio::stream_file to_file(io_context, argv[2],
+ asio::stream_file::write_only
+ | asio::stream_file::create
+ | asio::stream_file::truncate);
+
+ char data[4096];
+ std::error_code error;
+ for (;;)
+ {
+ std::size_t n = from_file.read_some(asio::buffer(data), error);
+ if (error)
+ break;
+ asio::write(to_file, asio::buffer(data, n), error);
+ if (error)
+ break;
+ }
+
+ if (error && error != asio::error::eof)
+ {
+ std::cerr << "Error copying file: " << error.message() << "\n";
+ return 1;
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ return 1;
+ }
+
+ return 0;
+}
+
+#else // defined(ASIO_HAS_FILE)
+int main() {}
+#endif // defined(ASIO_HAS_FILE)
diff --git a/3rdparty/asio/src/examples/cpp11/fork/daemon.cpp b/3rdparty/asio/src/examples/cpp11/fork/daemon.cpp
index c63d5c1392f..547acb33a5a 100644
--- a/3rdparty/asio/src/examples/cpp11/fork/daemon.cpp
+++ b/3rdparty/asio/src/examples/cpp11/fork/daemon.cpp
@@ -2,7 +2,7 @@
// daemon.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/fork/process_per_connection.cpp b/3rdparty/asio/src/examples/cpp11/fork/process_per_connection.cpp
index 217d5d945ae..cad52e7ab9f 100644
--- a/3rdparty/asio/src/examples/cpp11/fork/process_per_connection.cpp
+++ b/3rdparty/asio/src/examples/cpp11/fork/process_per_connection.cpp
@@ -2,7 +2,7 @@
// process_per_connection.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/futures/daytime_client.cpp b/3rdparty/asio/src/examples/cpp11/futures/daytime_client.cpp
index 7744d630cb9..2f5314ede39 100644
--- a/3rdparty/asio/src/examples/cpp11/futures/daytime_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/futures/daytime_client.cpp
@@ -2,7 +2,7 @@
// daytime_client.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -77,8 +77,7 @@ int main(int argc, char* argv[])
// We run the io_context off in its own thread so that it operates
// completely asynchronously with respect to the rest of the program.
asio::io_context io_context;
- auto work = asio::require(io_context.get_executor(),
- asio::execution::outstanding_work.tracked);
+ auto work = asio::make_work_guard(io_context);
std::thread thread([&io_context](){ io_context.run(); });
get_daytime(io_context, argv[1]);
diff --git a/3rdparty/asio/src/examples/cpp11/handler_tracking/async_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp11/handler_tracking/async_tcp_echo_server.cpp
index b18e4b2f19e..42a31f7b316 100644
--- a/3rdparty/asio/src/examples/cpp11/handler_tracking/async_tcp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/handler_tracking/async_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
// async_tcp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp b/3rdparty/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp
index 464663b60d2..57b162a51e8 100644
--- a/3rdparty/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp
+++ b/3rdparty/asio/src/examples/cpp11/handler_tracking/custom_tracking.hpp
@@ -2,7 +2,7 @@
// custom_tracking.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -187,7 +187,7 @@ struct custom_tracking
// Record a reactor-based operation that is associated with a handler.
static void reactor_operation(const tracked_handler& h,
- const char* op_name, const asio::error_code& ec)
+ const char* op_name, const std::error_code& ec)
{
std::printf(
"Performed operation %s.%s for native_handle = %" PRIuMAX
@@ -197,7 +197,7 @@ struct custom_tracking
// Record a reactor-based operation that is associated with a handler.
static void reactor_operation(const tracked_handler& h,
- const char* op_name, const asio::error_code& ec,
+ const char* op_name, const std::error_code& ec,
std::size_t bytes_transferred)
{
std::printf(
diff --git a/3rdparty/asio/src/examples/cpp03/http/client/async_client.cpp b/3rdparty/asio/src/examples/cpp11/http/client/async_client.cpp
index 210715bbd98..309ae252147 100644
--- a/3rdparty/asio/src/examples/cpp03/http/client/async_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/client/async_client.cpp
@@ -2,18 +2,18 @@
// async_client.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <functional>
#include <iostream>
#include <istream>
#include <ostream>
#include <string>
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
using asio::ip::tcp;
@@ -37,13 +37,13 @@ public:
// Start an asynchronous resolve to translate the server and service names
// into a list of endpoints.
resolver_.async_resolve(server, "http",
- boost::bind(&client::handle_resolve, this,
+ std::bind(&client::handle_resolve, this,
asio::placeholders::error,
asio::placeholders::results));
}
private:
- void handle_resolve(const asio::error_code& err,
+ void handle_resolve(const std::error_code& err,
const tcp::resolver::results_type& endpoints)
{
if (!err)
@@ -51,7 +51,7 @@ private:
// Attempt a connection to each endpoint in the list until we
// successfully establish a connection.
asio::async_connect(socket_, endpoints,
- boost::bind(&client::handle_connect, this,
+ std::bind(&client::handle_connect, this,
asio::placeholders::error));
}
else
@@ -60,13 +60,13 @@ private:
}
}
- void handle_connect(const asio::error_code& err)
+ void handle_connect(const std::error_code& err)
{
if (!err)
{
// The connection was successful. Send the request.
asio::async_write(socket_, request_,
- boost::bind(&client::handle_write_request, this,
+ std::bind(&client::handle_write_request, this,
asio::placeholders::error));
}
else
@@ -75,7 +75,7 @@ private:
}
}
- void handle_write_request(const asio::error_code& err)
+ void handle_write_request(const std::error_code& err)
{
if (!err)
{
@@ -83,7 +83,7 @@ private:
// automatically grow to accommodate the entire line. The growth may be
// limited by passing a maximum size to the streambuf constructor.
asio::async_read_until(socket_, response_, "\r\n",
- boost::bind(&client::handle_read_status_line, this,
+ std::bind(&client::handle_read_status_line, this,
asio::placeholders::error));
}
else
@@ -92,7 +92,7 @@ private:
}
}
- void handle_read_status_line(const asio::error_code& err)
+ void handle_read_status_line(const std::error_code& err)
{
if (!err)
{
@@ -118,7 +118,7 @@ private:
// Read the response headers, which are terminated by a blank line.
asio::async_read_until(socket_, response_, "\r\n\r\n",
- boost::bind(&client::handle_read_headers, this,
+ std::bind(&client::handle_read_headers, this,
asio::placeholders::error));
}
else
@@ -127,7 +127,7 @@ private:
}
}
- void handle_read_headers(const asio::error_code& err)
+ void handle_read_headers(const std::error_code& err)
{
if (!err)
{
@@ -145,7 +145,7 @@ private:
// Start reading remaining data until EOF.
asio::async_read(socket_, response_,
asio::transfer_at_least(1),
- boost::bind(&client::handle_read_content, this,
+ std::bind(&client::handle_read_content, this,
asio::placeholders::error));
}
else
@@ -154,7 +154,7 @@ private:
}
}
- void handle_read_content(const asio::error_code& err)
+ void handle_read_content(const std::error_code& err)
{
if (!err)
{
@@ -164,7 +164,7 @@ private:
// Continue reading remaining data until EOF.
asio::async_read(socket_, response_,
asio::transfer_at_least(1),
- boost::bind(&client::handle_read_content, this,
+ std::bind(&client::handle_read_content, this,
asio::placeholders::error));
}
else if (err != asio::error::eof)
diff --git a/3rdparty/asio/src/examples/cpp03/http/client/sync_client.cpp b/3rdparty/asio/src/examples/cpp11/http/client/sync_client.cpp
index fde984a6f4f..4f5ad099317 100644
--- a/3rdparty/asio/src/examples/cpp03/http/client/sync_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/client/sync_client.cpp
@@ -2,7 +2,7 @@
// sync_client.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -90,12 +90,12 @@ int main(int argc, char* argv[])
std::cout << &response;
// Read until EOF, writing data to output as we go.
- asio::error_code error;
+ std::error_code error;
while (asio::read(socket, response,
asio::transfer_at_least(1), error))
std::cout << &response;
if (error != asio::error::eof)
- throw asio::system_error(error);
+ throw std::system_error(error);
}
catch (std::exception& e)
{
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/connection.cpp b/3rdparty/asio/src/examples/cpp11/http/server/connection.cpp
index 704ae6d1147..58d619fec76 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/connection.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/connection.cpp
@@ -2,7 +2,7 @@
// connection.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -10,7 +10,6 @@
#include "connection.hpp"
#include <utility>
-#include <vector>
#include "connection_manager.hpp"
#include "request_handler.hpp"
@@ -78,7 +77,7 @@ void connection::do_write()
if (!ec)
{
// Initiate graceful connection closure.
- asio::error_code ignored_ec;
+ std::error_code ignored_ec;
socket_.shutdown(asio::ip::tcp::socket::shutdown_both,
ignored_ec);
}
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/connection.hpp b/3rdparty/asio/src/examples/cpp11/http/server/connection.hpp
index b7bf762820a..1d671ebdcbe 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/connection.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/connection.hpp
@@ -2,7 +2,7 @@
// connection.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -11,9 +11,9 @@
#ifndef HTTP_CONNECTION_HPP
#define HTTP_CONNECTION_HPP
+#include <asio.hpp>
#include <array>
#include <memory>
-#include <asio.hpp>
#include "reply.hpp"
#include "request.hpp"
#include "request_handler.hpp"
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.cpp b/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.cpp
index 43221162f20..88161919330 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.cpp
@@ -2,7 +2,7 @@
// connection_manager.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.hpp b/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.hpp
index af57cc9ce54..0b35408fae5 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/connection_manager.hpp
@@ -2,7 +2,7 @@
// connection_manager.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/header.hpp b/3rdparty/asio/src/examples/cpp11/http/server/header.hpp
index bccbf977a9e..e91e6ff23a2 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/header.hpp
@@ -2,7 +2,7 @@
// header.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/main.cpp b/3rdparty/asio/src/examples/cpp11/http/server/main.cpp
index e23a5607791..b76044a96cd 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/main.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/main.cpp
@@ -2,7 +2,7 @@
// main.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/mime_types.cpp b/3rdparty/asio/src/examples/cpp11/http/server/mime_types.cpp
index a59955e8d5b..23153caa1df 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/mime_types.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/mime_types.cpp
@@ -2,7 +2,7 @@
// mime_types.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/mime_types.hpp b/3rdparty/asio/src/examples/cpp11/http/server/mime_types.hpp
index aef5676104e..fcefce5437b 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/mime_types.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/mime_types.hpp
@@ -2,7 +2,7 @@
// mime_types.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/reply.cpp b/3rdparty/asio/src/examples/cpp11/http/server/reply.cpp
index 301ff3a1ab9..9d8f04e2ae1 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/reply.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/reply.cpp
@@ -2,7 +2,7 @@
// reply.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/reply.hpp b/3rdparty/asio/src/examples/cpp11/http/server/reply.hpp
index c8f3f11040d..f1eee1f891b 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/reply.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/reply.hpp
@@ -2,7 +2,7 @@
// reply.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/request.hpp b/3rdparty/asio/src/examples/cpp11/http/server/request.hpp
index 8a6a2bdf824..93a96db12b4 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/request.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/request.hpp
@@ -2,7 +2,7 @@
// request.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/request_handler.cpp b/3rdparty/asio/src/examples/cpp11/http/server/request_handler.cpp
index 621a1ab22ec..97b4ac6a8e6 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/request_handler.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/request_handler.cpp
@@ -2,7 +2,7 @@
// request_handler.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/request_handler.hpp b/3rdparty/asio/src/examples/cpp11/http/server/request_handler.hpp
index dc3432d34a0..978b37ca537 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/request_handler.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/request_handler.hpp
@@ -2,7 +2,7 @@
// request_handler.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/request_parser.cpp b/3rdparty/asio/src/examples/cpp11/http/server/request_parser.cpp
index 3ab194a3ace..ff56e9c618a 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/request_parser.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/request_parser.cpp
@@ -2,7 +2,7 @@
// request_parser.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/request_parser.hpp b/3rdparty/asio/src/examples/cpp11/http/server/request_parser.hpp
index 68ac14e590f..260e8759acb 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/request_parser.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/request_parser.hpp
@@ -2,7 +2,7 @@
// request_parser.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/server.cpp b/3rdparty/asio/src/examples/cpp11/http/server/server.cpp
index d2c179ee08a..d824ebbf229 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server/server.hpp b/3rdparty/asio/src/examples/cpp11/http/server/server.hpp
index 917fbdd3d06..c88d0149114 100644
--- a/3rdparty/asio/src/examples/cpp11/http/server/server.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server/server.hpp
@@ -2,7 +2,7 @@
// server.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/http/server2/connection.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/connection.cpp
new file mode 100644
index 00000000000..ab8ab9e0524
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/connection.cpp
@@ -0,0 +1,89 @@
+//
+// connection.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include "connection.hpp"
+#include <utility>
+#include "request_handler.hpp"
+
+namespace http {
+namespace server2 {
+
+connection::connection(asio::ip::tcp::socket socket,
+ request_handler& handler)
+ : socket_(std::move(socket)),
+ request_handler_(handler)
+{
+}
+
+void connection::start()
+{
+ do_read();
+}
+
+void connection::do_read()
+{
+ auto self(shared_from_this());
+ socket_.async_read_some(asio::buffer(buffer_),
+ [this, self](std::error_code ec, std::size_t bytes_transferred)
+ {
+ if (!ec)
+ {
+ request_parser::result_type result;
+ std::tie(result, std::ignore) = request_parser_.parse(
+ request_, buffer_.data(), buffer_.data() + bytes_transferred);
+
+ if (result == request_parser::good)
+ {
+ request_handler_.handle_request(request_, reply_);
+ do_write();
+ }
+ else if (result == request_parser::bad)
+ {
+ reply_ = reply::stock_reply(reply::bad_request);
+ do_write();
+ }
+ else
+ {
+ do_read();
+ }
+ }
+
+ // If an error occurs then no new asynchronous operations are
+ // started. This means that all shared_ptr references to the
+ // connection object will disappear and the object will be
+ // destroyed automatically after this handler returns. The
+ // connection class's destructor closes the socket.
+ });
+}
+
+void connection::do_write()
+{
+ auto self(shared_from_this());
+ asio::async_write(socket_, reply_.to_buffers(),
+ [this, self](std::error_code ec, std::size_t)
+ {
+ if (!ec)
+ {
+ // Initiate graceful connection closure.
+ std::error_code ignored_ec;
+ socket_.shutdown(asio::ip::tcp::socket::shutdown_both,
+ ignored_ec);
+ }
+
+ // No new asynchronous operations are started. This means that
+ // all shared_ptr references to the connection object will
+ // disappear and the object will be destroyed automatically after
+ // this handler returns. The connection class's destructor closes
+ // the socket.
+ });
+}
+
+} // namespace server2
+} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/connection.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/connection.hpp
index 3379fbb5649..7d4a4735754 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/connection.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/connection.hpp
@@ -2,7 +2,7 @@
// connection.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,10 +12,8 @@
#define HTTP_SERVER2_CONNECTION_HPP
#include <asio.hpp>
-#include <boost/array.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
+#include <array>
+#include <memory>
#include "reply.hpp"
#include "request.hpp"
#include "request_handler.hpp"
@@ -26,27 +24,25 @@ namespace server2 {
/// Represents a single connection from a client.
class connection
- : public boost::enable_shared_from_this<connection>,
- private boost::noncopyable
+ : public std::enable_shared_from_this<connection>
{
public:
- /// Construct a connection with the given io_context.
- explicit connection(asio::io_context& io_context,
- request_handler& handler);
+ connection(const connection&) = delete;
+ connection& operator=(const connection&) = delete;
- /// Get the socket associated with the connection.
- asio::ip::tcp::socket& socket();
+ /// Construct a connection with the given socket.
+ explicit connection(asio::ip::tcp::socket socket,
+ request_handler& handler);
/// Start the first asynchronous operation for the connection.
void start();
private:
- /// Handle completion of a read operation.
- void handle_read(const asio::error_code& e,
- std::size_t bytes_transferred);
+ /// Perform an asynchronous read operation.
+ void do_read();
- /// Handle completion of a write operation.
- void handle_write(const asio::error_code& e);
+ /// Perform an asynchronous write operation.
+ void do_write();
/// Socket for the connection.
asio::ip::tcp::socket socket_;
@@ -55,7 +51,7 @@ private:
request_handler& request_handler_;
/// Buffer for incoming data.
- boost::array<char, 8192> buffer_;
+ std::array<char, 8192> buffer_;
/// The incoming request.
request request_;
@@ -67,7 +63,7 @@ private:
reply reply_;
};
-typedef boost::shared_ptr<connection> connection_ptr;
+typedef std::shared_ptr<connection> connection_ptr;
} // namespace server2
} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/header.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/header.hpp
index acba8ddf5ea..f888dde03c0 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/header.hpp
@@ -2,7 +2,7 @@
// header.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.cpp
index 9f0ec9f1984..bea08903087 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.cpp
@@ -2,7 +2,7 @@
// io_context_pool.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -10,8 +10,7 @@
#include "server.hpp"
#include <stdexcept>
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
+#include <thread>
namespace http {
namespace server2 {
@@ -28,25 +27,20 @@ io_context_pool::io_context_pool(std::size_t pool_size)
{
io_context_ptr io_context(new asio::io_context);
io_contexts_.push_back(io_context);
- work_.push_back(asio::require(io_context->get_executor(),
- asio::execution::outstanding_work.tracked));
+ work_.push_back(asio::make_work_guard(*io_context));
}
}
void io_context_pool::run()
{
// Create a pool of threads to run all of the io_contexts.
- std::vector<boost::shared_ptr<asio::thread> > threads;
+ std::vector<std::thread> threads;
for (std::size_t i = 0; i < io_contexts_.size(); ++i)
- {
- boost::shared_ptr<asio::thread> thread(new asio::thread(
- boost::bind(&asio::io_context::run, io_contexts_[i])));
- threads.push_back(thread);
- }
+ threads.emplace_back([this, i]{ io_contexts_[i]->run(); });
// Wait for all threads in the pool to exit.
for (std::size_t i = 0; i < threads.size(); ++i)
- threads[i]->join();
+ threads[i].join();
}
void io_context_pool::stop()
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.hpp
index c08091dcefe..0946ba6e484 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/io_context_pool.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/io_context_pool.hpp
@@ -2,7 +2,7 @@
// io_context_pool.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -13,16 +13,14 @@
#include <asio.hpp>
#include <list>
+#include <memory>
#include <vector>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
namespace http {
namespace server2 {
/// A pool of io_context objects.
class io_context_pool
- : private boost::noncopyable
{
public:
/// Construct the io_context pool.
@@ -38,13 +36,18 @@ public:
asio::io_context& get_io_context();
private:
- typedef boost::shared_ptr<asio::io_context> io_context_ptr;
+ io_context_pool(const io_context_pool&) = delete;
+ io_context_pool& operator=(const io_context_pool&) = delete;
+
+ typedef std::shared_ptr<asio::io_context> io_context_ptr;
+ typedef asio::executor_work_guard<
+ asio::io_context::executor_type> io_context_work;
/// The pool of io_contexts.
std::vector<io_context_ptr> io_contexts_;
- /// The work-tracking executors that keep the io_contexts running.
- std::list<asio::any_io_executor> work_;
+ /// The work that keeps the io_contexts running.
+ std::list<io_context_work> work_;
/// The next io_context to use for a connection.
std::size_t next_io_context_;
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/main.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/main.cpp
index 78cf0a72618..5b6a9a36cb3 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/main.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/main.cpp
@@ -2,7 +2,7 @@
// main.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -11,8 +11,6 @@
#include <iostream>
#include <string>
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/lexical_cast.hpp>
#include "server.hpp"
int main(int argc, char* argv[])
@@ -31,7 +29,7 @@ int main(int argc, char* argv[])
}
// Initialise the server.
- std::size_t num_threads = boost::lexical_cast<std::size_t>(argv[3]);
+ std::size_t num_threads = std::stoi(argv[3]);
http::server2::server s(argv[1], argv[2], argv[4], num_threads);
// Run the server until stopped.
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/mime_types.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/mime_types.cpp
index 67f23dc108b..03079331e93 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/mime_types.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/mime_types.cpp
@@ -2,7 +2,7 @@
// mime_types.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/mime_types.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/mime_types.hpp
index 53c83470477..32985c18e59 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/mime_types.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/mime_types.hpp
@@ -2,7 +2,7 @@
// mime_types.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/reply.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/reply.cpp
index c5eb79130de..d48bfd9e463 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/reply.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/reply.cpp
@@ -2,7 +2,7 @@
// reply.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -10,7 +10,6 @@
#include "reply.hpp"
#include <string>
-#include <boost/lexical_cast.hpp>
namespace http {
namespace server2 {
@@ -246,7 +245,7 @@ reply reply::stock_reply(reply::status_type status)
rep.content = stock_replies::to_string(status);
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = "text/html";
return rep;
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/reply.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/reply.hpp
index 6a99edac7c0..f4be7ca94fe 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/reply.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/reply.hpp
@@ -2,7 +2,7 @@
// reply.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/request.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/request.hpp
index 4c54b2028dd..b0000b00967 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/request.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/request.hpp
@@ -2,7 +2,7 @@
// request.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/request_handler.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/request_handler.cpp
index 42677d3defb..c57fa9757f5 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/request_handler.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/request_handler.cpp
@@ -2,7 +2,7 @@
// request_handler.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,7 +12,6 @@
#include <fstream>
#include <sstream>
#include <string>
-#include <boost/lexical_cast.hpp>
#include "mime_types.hpp"
#include "reply.hpp"
#include "request.hpp"
@@ -74,7 +73,7 @@ void request_handler::handle_request(const request& req, reply& rep)
rep.content.append(buf, is.gcount());
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = mime_types::extension_to_type(extension);
}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/request_handler.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/request_handler.hpp
index b4d8d1b5c73..c9e9ebf418f 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/request_handler.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/request_handler.hpp
@@ -2,7 +2,7 @@
// request_handler.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,7 +12,6 @@
#define HTTP_SERVER2_REQUEST_HANDLER_HPP
#include <string>
-#include <boost/noncopyable.hpp>
namespace http {
namespace server2 {
@@ -22,9 +21,11 @@ struct request;
/// The common handler for all incoming requests.
class request_handler
- : private boost::noncopyable
{
public:
+ request_handler(const request_handler&) = delete;
+ request_handler& operator=(const request_handler&) = delete;
+
/// Construct with a directory containing files to be served.
explicit request_handler(const std::string& doc_root);
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/request_parser.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/request_parser.cpp
index 5c10ec8580d..2cd8ac00b47 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/request_parser.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/request_parser.cpp
@@ -2,7 +2,7 @@
// request_parser.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -24,90 +24,90 @@ void request_parser::reset()
state_ = method_start;
}
-boost::tribool request_parser::consume(request& req, char input)
+request_parser::result_type request_parser::consume(request& req, char input)
{
switch (state_)
{
case method_start:
if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
state_ = method;
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case method:
if (input == ' ')
{
state_ = uri;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case uri:
if (input == ' ')
{
state_ = http_version_h;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.uri.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case http_version_h:
if (input == 'H')
{
state_ = http_version_t_1;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_1:
if (input == 'T')
{
state_ = http_version_t_2;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_2:
if (input == 'T')
{
state_ = http_version_p;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_p:
if (input == 'P')
{
state_ = http_version_slash;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_slash:
if (input == '/')
@@ -115,170 +115,170 @@ boost::tribool request_parser::consume(request& req, char input)
req.http_version_major = 0;
req.http_version_minor = 0;
state_ = http_version_major_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major_start:
if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
state_ = http_version_major;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major:
if (input == '.')
{
state_ = http_version_minor_start;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor_start:
if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
state_ = http_version_minor;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor:
if (input == '\r')
{
state_ = expecting_newline_1;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_1:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_line_start:
if (input == '\r')
{
state_ = expecting_newline_3;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!req.headers.empty() && (input == ' ' || input == '\t'))
{
state_ = header_lws;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.push_back(header());
req.headers.back().name.push_back(input);
state_ = header_name;
- return boost::indeterminate;
+ return indeterminate;
}
case header_lws:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (input == ' ' || input == '\t')
{
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
state_ = header_value;
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case header_name:
if (input == ':')
{
state_ = space_before_header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().name.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case space_before_header_value:
if (input == ' ')
{
state_ = header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_value:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case expecting_newline_2:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_3:
- return (input == '\n');
+ return (input == '\n') ? good : bad;
default:
- return false;
+ return bad;
}
}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/request_parser.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/request_parser.hpp
index 359adc6f0b0..1d11168b72d 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/request_parser.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/request_parser.hpp
@@ -2,7 +2,7 @@
// request_parser.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -11,8 +11,7 @@
#ifndef HTTP_SERVER2_REQUEST_PARSER_HPP
#define HTTP_SERVER2_REQUEST_PARSER_HPP
-#include <boost/logic/tribool.hpp>
-#include <boost/tuple/tuple.hpp>
+#include <tuple>
namespace http {
namespace server2 {
@@ -29,27 +28,29 @@ public:
/// Reset to initial parser state.
void reset();
- /// Parse some data. The tribool return value is true when a complete request
- /// has been parsed, false if the data is invalid, indeterminate when more
- /// data is required. The InputIterator return value indicates how much of the
- /// input has been consumed.
+ /// Result of parse.
+ enum result_type { good, bad, indeterminate };
+
+ /// Parse some data. The enum return value is good when a complete request has
+ /// been parsed, bad if the data is invalid, indeterminate when more data is
+ /// required. The InputIterator return value indicates how much of the input
+ /// has been consumed.
template <typename InputIterator>
- boost::tuple<boost::tribool, InputIterator> parse(request& req,
+ std::tuple<result_type, InputIterator> parse(request& req,
InputIterator begin, InputIterator end)
{
while (begin != end)
{
- boost::tribool result = consume(req, *begin++);
- if (result || !result)
- return boost::make_tuple(result, begin);
+ result_type result = consume(req, *begin++);
+ if (result == good || result == bad)
+ return std::make_tuple(result, begin);
}
- boost::tribool result = boost::indeterminate;
- return boost::make_tuple(result, begin);
+ return std::make_tuple(indeterminate, begin);
}
private:
/// Handle the next character of input.
- boost::tribool consume(request& req, char input);
+ result_type consume(request& req, char input);
/// Check if a byte is an HTTP character.
static bool is_char(int c);
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/server.cpp b/3rdparty/asio/src/examples/cpp11/http/server2/server.cpp
index 72ebcf9f352..2ae733086a5 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/server.cpp
@@ -2,14 +2,16 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include "server.hpp"
-#include <boost/bind/bind.hpp>
+#include <signal.h>
+#include <utility>
+#include "connection.hpp"
namespace http {
namespace server2 {
@@ -19,7 +21,6 @@ server::server(const std::string& address, const std::string& port,
: io_context_pool_(io_context_pool_size),
signals_(io_context_pool_.get_io_context()),
acceptor_(io_context_pool_.get_io_context()),
- new_connection_(),
request_handler_(doc_root)
{
// Register to handle the signals that indicate when the server should exit.
@@ -30,7 +31,8 @@ server::server(const std::string& address, const std::string& port,
#if defined(SIGQUIT)
signals_.add(SIGQUIT);
#endif // defined(SIGQUIT)
- signals_.async_wait(boost::bind(&server::handle_stop, this));
+
+ do_await_stop();
// Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR).
asio::ip::tcp::resolver resolver(acceptor_.get_executor());
@@ -41,7 +43,7 @@ server::server(const std::string& address, const std::string& port,
acceptor_.bind(endpoint);
acceptor_.listen();
- start_accept();
+ do_accept();
}
void server::run()
@@ -49,28 +51,35 @@ void server::run()
io_context_pool_.run();
}
-void server::start_accept()
+void server::do_accept()
{
- new_connection_.reset(new connection(
- io_context_pool_.get_io_context(), request_handler_));
- acceptor_.async_accept(new_connection_->socket(),
- boost::bind(&server::handle_accept, this,
- asio::placeholders::error));
-}
+ acceptor_.async_accept(io_context_pool_.get_io_context(),
+ [this](std::error_code ec, asio::ip::tcp::socket socket)
+ {
+ // Check whether the server was stopped by a signal before this
+ // completion handler had a chance to run.
+ if (!acceptor_.is_open())
+ {
+ return;
+ }
-void server::handle_accept(const asio::error_code& e)
-{
- if (!e)
- {
- new_connection_->start();
- }
+ if (!ec)
+ {
+ std::make_shared<connection>(
+ std::move(socket), request_handler_)->start();
+ }
- start_accept();
+ do_accept();
+ });
}
-void server::handle_stop()
+void server::do_await_stop()
{
- io_context_pool_.stop();
+ signals_.async_wait(
+ [this](std::error_code /*ec*/, int /*signo*/)
+ {
+ io_context_pool_.stop();
+ });
}
} // namespace server2
diff --git a/3rdparty/asio/src/examples/cpp03/http/server2/server.hpp b/3rdparty/asio/src/examples/cpp11/http/server2/server.hpp
index 9bcdbe093aa..9d34a77ed7c 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server2/server.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server2/server.hpp
@@ -2,7 +2,7 @@
// server.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -13,10 +13,6 @@
#include <asio.hpp>
#include <string>
-#include <vector>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include "connection.hpp"
#include "io_context_pool.hpp"
#include "request_handler.hpp"
@@ -25,9 +21,11 @@ namespace server2 {
/// The top-level class of the HTTP server.
class server
- : private boost::noncopyable
{
public:
+ server(const server&) = delete;
+ server& operator=(const server&) = delete;
+
/// Construct the server to listen on the specified TCP address and port, and
/// serve up files from the given directory.
explicit server(const std::string& address, const std::string& port,
@@ -37,14 +35,11 @@ public:
void run();
private:
- /// Initiate an asynchronous accept operation.
- void start_accept();
-
- /// Handle completion of an asynchronous accept operation.
- void handle_accept(const asio::error_code& e);
+ /// Perform an asynchronous accept operation.
+ void do_accept();
- /// Handle a request to stop the server.
- void handle_stop();
+ /// Wait for a request to stop the server.
+ void do_await_stop();
/// The pool of io_context objects used to perform asynchronous operations.
io_context_pool io_context_pool_;
@@ -55,9 +50,6 @@ private:
/// Acceptor used to listen for incoming connections.
asio::ip::tcp::acceptor acceptor_;
- /// The next connection to be accepted.
- connection_ptr new_connection_;
-
/// The handler for all incoming requests.
request_handler request_handler_;
};
diff --git a/3rdparty/asio/src/examples/cpp11/http/server3/connection.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/connection.cpp
new file mode 100644
index 00000000000..d4070364fb4
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/connection.cpp
@@ -0,0 +1,89 @@
+//
+// connection.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include "connection.hpp"
+#include <utility>
+#include "request_handler.hpp"
+
+namespace http {
+namespace server3 {
+
+connection::connection(asio::ip::tcp::socket socket,
+ request_handler& handler)
+ : socket_(std::move(socket)),
+ request_handler_(handler)
+{
+}
+
+void connection::start()
+{
+ do_read();
+}
+
+void connection::do_read()
+{
+ auto self(shared_from_this());
+ socket_.async_read_some(asio::buffer(buffer_),
+ [this, self](std::error_code ec, std::size_t bytes_transferred)
+ {
+ if (!ec)
+ {
+ request_parser::result_type result;
+ std::tie(result, std::ignore) = request_parser_.parse(
+ request_, buffer_.data(), buffer_.data() + bytes_transferred);
+
+ if (result == request_parser::good)
+ {
+ request_handler_.handle_request(request_, reply_);
+ do_write();
+ }
+ else if (result == request_parser::bad)
+ {
+ reply_ = reply::stock_reply(reply::bad_request);
+ do_write();
+ }
+ else
+ {
+ do_read();
+ }
+ }
+
+ // If an error occurs then no new asynchronous operations are
+ // started. This means that all shared_ptr references to the
+ // connection object will disappear and the object will be
+ // destroyed automatically after this handler returns. The
+ // connection class's destructor closes the socket.
+ });
+}
+
+void connection::do_write()
+{
+ auto self(shared_from_this());
+ asio::async_write(socket_, reply_.to_buffers(),
+ [this, self](std::error_code ec, std::size_t)
+ {
+ if (!ec)
+ {
+ // Initiate graceful connection closure.
+ std::error_code ignored_ec;
+ socket_.shutdown(asio::ip::tcp::socket::shutdown_both,
+ ignored_ec);
+ }
+
+ // No new asynchronous operations are started. This means that
+ // all shared_ptr references to the connection object will
+ // disappear and the object will be destroyed automatically after
+ // this handler returns. The connection class's destructor closes
+ // the socket.
+ });
+}
+
+} // namespace server3
+} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/connection.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/connection.hpp
index 5fa129a6061..878cd45d366 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/connection.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/connection.hpp
@@ -2,7 +2,7 @@
// connection.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,10 +12,8 @@
#define HTTP_SERVER3_CONNECTION_HPP
#include <asio.hpp>
-#include <boost/array.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
+#include <array>
+#include <memory>
#include "reply.hpp"
#include "request.hpp"
#include "request_handler.hpp"
@@ -26,30 +24,25 @@ namespace server3 {
/// Represents a single connection from a client.
class connection
- : public boost::enable_shared_from_this<connection>,
- private boost::noncopyable
+ : public std::enable_shared_from_this<connection>
{
public:
- /// Construct a connection with the given io_context.
- explicit connection(asio::io_context& io_context,
- request_handler& handler);
+ connection(const connection&) = delete;
+ connection& operator=(const connection&) = delete;
- /// Get the socket associated with the connection.
- asio::ip::tcp::socket& socket();
+ /// Construct a connection with the given socket.
+ explicit connection(asio::ip::tcp::socket socket,
+ request_handler& handler);
/// Start the first asynchronous operation for the connection.
void start();
private:
- /// Handle completion of a read operation.
- void handle_read(const asio::error_code& e,
- std::size_t bytes_transferred);
-
- /// Handle completion of a write operation.
- void handle_write(const asio::error_code& e);
+ /// Perform an asynchronous read operation.
+ void do_read();
- /// Strand to ensure the connection's handlers are not called concurrently.
- asio::strand<asio::io_context::executor_type> strand_;
+ /// Perform an asynchronous write operation.
+ void do_write();
/// Socket for the connection.
asio::ip::tcp::socket socket_;
@@ -58,7 +51,7 @@ private:
request_handler& request_handler_;
/// Buffer for incoming data.
- boost::array<char, 8192> buffer_;
+ std::array<char, 8192> buffer_;
/// The incoming request.
request request_;
@@ -70,7 +63,7 @@ private:
reply reply_;
};
-typedef boost::shared_ptr<connection> connection_ptr;
+typedef std::shared_ptr<connection> connection_ptr;
} // namespace server3
} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/header.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/header.hpp
index f709b1789e1..8ab5d145a6d 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/header.hpp
@@ -2,7 +2,7 @@
// header.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/main.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/main.cpp
index 2daf0ee9568..243de69bc75 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/main.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/main.cpp
@@ -2,7 +2,7 @@
// main.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -11,8 +11,6 @@
#include <iostream>
#include <string>
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/lexical_cast.hpp>
#include "server.hpp"
int main(int argc, char* argv[])
@@ -31,7 +29,7 @@ int main(int argc, char* argv[])
}
// Initialise the server.
- std::size_t num_threads = boost::lexical_cast<std::size_t>(argv[3]);
+ std::size_t num_threads = std::stoi(argv[3]);
http::server3::server s(argv[1], argv[2], argv[4], num_threads);
// Run the server until stopped.
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/mime_types.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/mime_types.cpp
index 78850acafbf..d0d804c7caa 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/mime_types.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/mime_types.cpp
@@ -2,7 +2,7 @@
// mime_types.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/mime_types.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/mime_types.hpp
index a556356010f..a144c8677e6 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/mime_types.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/mime_types.hpp
@@ -2,7 +2,7 @@
// mime_types.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/reply.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/reply.cpp
index fe304271d61..4695d4a8da2 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/reply.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/reply.cpp
@@ -2,7 +2,7 @@
// reply.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -10,7 +10,6 @@
#include "reply.hpp"
#include <string>
-#include <boost/lexical_cast.hpp>
namespace http {
namespace server3 {
@@ -246,7 +245,7 @@ reply reply::stock_reply(reply::status_type status)
rep.content = stock_replies::to_string(status);
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = "text/html";
return rep;
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/reply.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/reply.hpp
index fe43fd8573e..fd9c7ed9ed5 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/reply.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/reply.hpp
@@ -2,7 +2,7 @@
// reply.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/request.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/request.hpp
index 40fd359c173..89a2f285b7a 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/request.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/request.hpp
@@ -2,7 +2,7 @@
// request.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/request_handler.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/request_handler.cpp
index 64efd8d02a5..bdc6bd60892 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/request_handler.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/request_handler.cpp
@@ -2,7 +2,7 @@
// request_handler.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,7 +12,6 @@
#include <fstream>
#include <sstream>
#include <string>
-#include <boost/lexical_cast.hpp>
#include "mime_types.hpp"
#include "reply.hpp"
#include "request.hpp"
@@ -74,7 +73,7 @@ void request_handler::handle_request(const request& req, reply& rep)
rep.content.append(buf, is.gcount());
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = mime_types::extension_to_type(extension);
}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/request_handler.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/request_handler.hpp
index e9f16d2d492..e3fe84ed0cb 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/request_handler.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/request_handler.hpp
@@ -2,7 +2,7 @@
// request_handler.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,7 +12,6 @@
#define HTTP_SERVER3_REQUEST_HANDLER_HPP
#include <string>
-#include <boost/noncopyable.hpp>
namespace http {
namespace server3 {
@@ -22,9 +21,11 @@ struct request;
/// The common handler for all incoming requests.
class request_handler
- : private boost::noncopyable
{
public:
+ request_handler(const request_handler&) = delete;
+ request_handler& operator=(const request_handler&) = delete;
+
/// Construct with a directory containing files to be served.
explicit request_handler(const std::string& doc_root);
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/request_parser.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/request_parser.cpp
index 9cd46e4e5e2..9fb6424fad7 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/request_parser.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/request_parser.cpp
@@ -2,7 +2,7 @@
// request_parser.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -24,90 +24,90 @@ void request_parser::reset()
state_ = method_start;
}
-boost::tribool request_parser::consume(request& req, char input)
+request_parser::result_type request_parser::consume(request& req, char input)
{
switch (state_)
{
case method_start:
if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
state_ = method;
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case method:
if (input == ' ')
{
state_ = uri;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case uri:
if (input == ' ')
{
state_ = http_version_h;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.uri.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case http_version_h:
if (input == 'H')
{
state_ = http_version_t_1;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_1:
if (input == 'T')
{
state_ = http_version_t_2;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_2:
if (input == 'T')
{
state_ = http_version_p;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_p:
if (input == 'P')
{
state_ = http_version_slash;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_slash:
if (input == '/')
@@ -115,170 +115,170 @@ boost::tribool request_parser::consume(request& req, char input)
req.http_version_major = 0;
req.http_version_minor = 0;
state_ = http_version_major_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major_start:
if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
state_ = http_version_major;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major:
if (input == '.')
{
state_ = http_version_minor_start;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor_start:
if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
state_ = http_version_minor;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor:
if (input == '\r')
{
state_ = expecting_newline_1;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_1:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_line_start:
if (input == '\r')
{
state_ = expecting_newline_3;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!req.headers.empty() && (input == ' ' || input == '\t'))
{
state_ = header_lws;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.push_back(header());
req.headers.back().name.push_back(input);
state_ = header_name;
- return boost::indeterminate;
+ return indeterminate;
}
case header_lws:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (input == ' ' || input == '\t')
{
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
state_ = header_value;
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case header_name:
if (input == ':')
{
state_ = space_before_header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().name.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case space_before_header_value:
if (input == ' ')
{
state_ = header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_value:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case expecting_newline_2:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_3:
- return (input == '\n');
+ return (input == '\n') ? good : bad;
default:
- return false;
+ return bad;
}
}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/request_parser.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/request_parser.hpp
index ff6576ef57e..a8334ed13ee 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/request_parser.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/request_parser.hpp
@@ -2,7 +2,7 @@
// request_parser.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -11,8 +11,7 @@
#ifndef HTTP_SERVER3_REQUEST_PARSER_HPP
#define HTTP_SERVER3_REQUEST_PARSER_HPP
-#include <boost/logic/tribool.hpp>
-#include <boost/tuple/tuple.hpp>
+#include <tuple>
namespace http {
namespace server3 {
@@ -29,27 +28,29 @@ public:
/// Reset to initial parser state.
void reset();
- /// Parse some data. The tribool return value is true when a complete request
- /// has been parsed, false if the data is invalid, indeterminate when more
- /// data is required. The InputIterator return value indicates how much of the
- /// input has been consumed.
+ /// Result of parse.
+ enum result_type { good, bad, indeterminate };
+
+ /// Parse some data. The enum return value is good when a complete request has
+ /// been parsed, bad if the data is invalid, indeterminate when more data is
+ /// required. The InputIterator return value indicates how much of the input
+ /// has been consumed.
template <typename InputIterator>
- boost::tuple<boost::tribool, InputIterator> parse(request& req,
+ std::tuple<result_type, InputIterator> parse(request& req,
InputIterator begin, InputIterator end)
{
while (begin != end)
{
- boost::tribool result = consume(req, *begin++);
- if (result || !result)
- return boost::make_tuple(result, begin);
+ result_type result = consume(req, *begin++);
+ if (result == good || result == bad)
+ return std::make_tuple(result, begin);
}
- boost::tribool result = boost::indeterminate;
- return boost::make_tuple(result, begin);
+ return std::make_tuple(indeterminate, begin);
}
private:
/// Handle the next character of input.
- boost::tribool consume(request& req, char input);
+ result_type consume(request& req, char input);
/// Check if a byte is an HTTP character.
static bool is_char(int c);
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/server.cpp b/3rdparty/asio/src/examples/cpp11/http/server3/server.cpp
index 469afe217da..c8da4b4f4db 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/server.cpp
@@ -2,16 +2,18 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include "server.hpp"
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
+#include <signal.h>
+#include <thread>
+#include <utility>
#include <vector>
+#include "connection.hpp"
namespace http {
namespace server3 {
@@ -21,7 +23,6 @@ server::server(const std::string& address, const std::string& port,
: thread_pool_size_(thread_pool_size),
signals_(io_context_),
acceptor_(io_context_),
- new_connection_(),
request_handler_(doc_root)
{
// Register to handle the signals that indicate when the server should exit.
@@ -32,7 +33,8 @@ server::server(const std::string& address, const std::string& port,
#if defined(SIGQUIT)
signals_.add(SIGQUIT);
#endif // defined(SIGQUIT)
- signals_.async_wait(boost::bind(&server::handle_stop, this));
+
+ do_await_stop();
// Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR).
asio::ip::tcp::resolver resolver(io_context_);
@@ -43,46 +45,52 @@ server::server(const std::string& address, const std::string& port,
acceptor_.bind(endpoint);
acceptor_.listen();
- start_accept();
+ do_accept();
}
void server::run()
{
- // Create a pool of threads to run all of the io_contexts.
- std::vector<boost::shared_ptr<asio::thread> > threads;
+ // Create a pool of threads to run the io_context.
+ std::vector<std::thread> threads;
for (std::size_t i = 0; i < thread_pool_size_; ++i)
- {
- boost::shared_ptr<asio::thread> thread(new asio::thread(
- boost::bind(&asio::io_context::run, &io_context_)));
- threads.push_back(thread);
- }
+ threads.emplace_back([this]{ io_context_.run(); });
// Wait for all threads in the pool to exit.
for (std::size_t i = 0; i < threads.size(); ++i)
- threads[i]->join();
+ threads[i].join();
}
-void server::start_accept()
+void server::do_accept()
{
- new_connection_.reset(new connection(io_context_, request_handler_));
- acceptor_.async_accept(new_connection_->socket(),
- boost::bind(&server::handle_accept, this,
- asio::placeholders::error));
-}
+ // The newly accepted socket is put into its own strand to ensure that all
+ // completion handlers associated with the connection do not run concurrently.
+ acceptor_.async_accept(asio::make_strand(io_context_),
+ [this](std::error_code ec, asio::ip::tcp::socket socket)
+ {
+ // Check whether the server was stopped by a signal before this
+ // completion handler had a chance to run.
+ if (!acceptor_.is_open())
+ {
+ return;
+ }
-void server::handle_accept(const asio::error_code& e)
-{
- if (!e)
- {
- new_connection_->start();
- }
+ if (!ec)
+ {
+ std::make_shared<connection>(
+ std::move(socket), request_handler_)->start();
+ }
- start_accept();
+ do_accept();
+ });
}
-void server::handle_stop()
+void server::do_await_stop()
{
- io_context_.stop();
+ signals_.async_wait(
+ [this](std::error_code /*ec*/, int /*signo*/)
+ {
+ io_context_.stop();
+ });
}
} // namespace server3
diff --git a/3rdparty/asio/src/examples/cpp03/http/server3/server.hpp b/3rdparty/asio/src/examples/cpp11/http/server3/server.hpp
index 59d20306db6..2948cadbf17 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server3/server.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server3/server.hpp
@@ -2,7 +2,7 @@
// server.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -13,10 +13,6 @@
#include <asio.hpp>
#include <string>
-#include <vector>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-#include "connection.hpp"
#include "request_handler.hpp"
namespace http {
@@ -24,9 +20,11 @@ namespace server3 {
/// The top-level class of the HTTP server.
class server
- : private boost::noncopyable
{
public:
+ server(const server&) = delete;
+ server& operator=(const server&) = delete;
+
/// Construct the server to listen on the specified TCP address and port, and
/// serve up files from the given directory.
explicit server(const std::string& address, const std::string& port,
@@ -36,14 +34,11 @@ public:
void run();
private:
- /// Initiate an asynchronous accept operation.
- void start_accept();
-
- /// Handle completion of an asynchronous accept operation.
- void handle_accept(const asio::error_code& e);
+ /// Perform an asynchronous accept operation.
+ void do_accept();
- /// Handle a request to stop the server.
- void handle_stop();
+ /// Wait for a request to stop the server.
+ void do_await_stop();
/// The number of threads that will call io_context::run().
std::size_t thread_pool_size_;
@@ -57,9 +52,6 @@ private:
/// Acceptor used to listen for incoming connections.
asio::ip::tcp::acceptor acceptor_;
- /// The next connection to be accepted.
- connection_ptr new_connection_;
-
/// The handler for all incoming requests.
request_handler request_handler_;
};
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/file_handler.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/file_handler.cpp
index 310a518fefa..ad982e58b26 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/file_handler.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/file_handler.cpp
@@ -2,7 +2,7 @@
// file_handler.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,7 +12,6 @@
#include <fstream>
#include <sstream>
#include <string>
-#include <boost/lexical_cast.hpp>
#include "mime_types.hpp"
#include "reply.hpp"
#include "request.hpp"
@@ -74,7 +73,7 @@ void file_handler::operator()(const request& req, reply& rep)
rep.content.append(buf, is.gcount());
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = mime_types::extension_to_type(extension);
}
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/file_handler.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/file_handler.hpp
index 3d898cce149..a16e5b6905c 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/file_handler.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/file_handler.hpp
@@ -2,7 +2,7 @@
// file_handler.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/header.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/header.hpp
index ee5d8bf727d..a4148e5d910 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/header.hpp
@@ -2,7 +2,7 @@
// header.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/main.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/main.cpp
index 58e1ae8f0af..29706e6a335 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/main.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/main.cpp
@@ -2,7 +2,7 @@
// main.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -10,7 +10,6 @@
#include <iostream>
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
#include <signal.h>
#include "server.hpp"
#include "file_handler.hpp"
@@ -43,8 +42,11 @@ int main(int argc, char* argv[])
#if defined(SIGQUIT)
signals.add(SIGQUIT);
#endif // defined(SIGQUIT)
- signals.async_wait(boost::bind(
- &asio::io_context::stop, &io_context));
+ signals.async_wait(
+ [&io_context](std::error_code, int)
+ {
+ io_context.stop();
+ });
// Run the server.
io_context.run();
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/mime_types.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/mime_types.cpp
index c6f421c76c3..6cf11e383d8 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/mime_types.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/mime_types.cpp
@@ -2,7 +2,7 @@
// mime_types.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/mime_types.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/mime_types.hpp
index 699b7bf0051..6086fce22eb 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/mime_types.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/mime_types.hpp
@@ -2,7 +2,7 @@
// mime_types.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/reply.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/reply.cpp
index e9c1eb68e97..4e5752ea7d0 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/reply.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/reply.cpp
@@ -2,7 +2,7 @@
// reply.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -10,7 +10,6 @@
#include "reply.hpp"
#include <string>
-#include <boost/lexical_cast.hpp>
namespace http {
namespace server4 {
@@ -246,7 +245,7 @@ reply reply::stock_reply(reply::status_type status)
rep.content = stock_replies::to_string(status);
rep.headers.resize(2);
rep.headers[0].name = "Content-Length";
- rep.headers[0].value = boost::lexical_cast<std::string>(rep.content.size());
+ rep.headers[0].value = std::to_string(rep.content.size());
rep.headers[1].name = "Content-Type";
rep.headers[1].value = "text/html";
return rep;
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/reply.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/reply.hpp
index 5aaefae7e2a..d08579a3339 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/reply.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/reply.hpp
@@ -2,7 +2,7 @@
// reply.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/request.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/request.hpp
index 8a6a2bdf824..8b20c4db0db 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server/request.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/request.hpp
@@ -2,21 +2,21 @@
// request.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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 HTTP_REQUEST_HPP
-#define HTTP_REQUEST_HPP
+#ifndef HTTP_SERVER4_REQUEST_HPP
+#define HTTP_SERVER4_REQUEST_HPP
#include <string>
#include <vector>
#include "header.hpp"
namespace http {
-namespace server {
+namespace server4 {
/// A request received from a client.
struct request
@@ -28,7 +28,7 @@ struct request
std::vector<header> headers;
};
-} // namespace server
+} // namespace server4
} // namespace http
-#endif // HTTP_REQUEST_HPP
+#endif // HTTP_SERVER4_REQUEST_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/request_parser.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/request_parser.cpp
index 2f502d5e023..ec557fccdd6 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server/request_parser.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/request_parser.cpp
@@ -2,7 +2,7 @@
// request_parser.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,7 +12,7 @@
#include "request.hpp"
namespace http {
-namespace server {
+namespace server4 {
request_parser::request_parser()
: state_(method_start)
@@ -24,90 +24,90 @@ void request_parser::reset()
state_ = method_start;
}
-boost::tribool request_parser::consume(request& req, char input)
+request_parser::result_type request_parser::consume(request& req, char input)
{
switch (state_)
{
case method_start:
if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
state_ = method;
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case method:
if (input == ' ')
{
state_ = uri;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.method.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case uri:
if (input == ' ')
{
state_ = http_version_h;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.uri.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case http_version_h:
if (input == 'H')
{
state_ = http_version_t_1;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_1:
if (input == 'T')
{
state_ = http_version_t_2;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_t_2:
if (input == 'T')
{
state_ = http_version_p;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_p:
if (input == 'P')
{
state_ = http_version_slash;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_slash:
if (input == '/')
@@ -115,170 +115,170 @@ boost::tribool request_parser::consume(request& req, char input)
req.http_version_major = 0;
req.http_version_minor = 0;
state_ = http_version_major_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major_start:
if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
state_ = http_version_major;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_major:
if (input == '.')
{
state_ = http_version_minor_start;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_major = req.http_version_major * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor_start:
if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
state_ = http_version_minor;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case http_version_minor:
if (input == '\r')
{
state_ = expecting_newline_1;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_digit(input))
{
req.http_version_minor = req.http_version_minor * 10 + input - '0';
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_1:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_line_start:
if (input == '\r')
{
state_ = expecting_newline_3;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!req.headers.empty() && (input == ' ' || input == '\t'))
{
state_ = header_lws;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.push_back(header());
req.headers.back().name.push_back(input);
state_ = header_name;
- return boost::indeterminate;
+ return indeterminate;
}
case header_lws:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (input == ' ' || input == '\t')
{
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
state_ = header_value;
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case header_name:
if (input == ':')
{
state_ = space_before_header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else if (!is_char(input) || is_ctl(input) || is_tspecial(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().name.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case space_before_header_value:
if (input == ' ')
{
state_ = header_value;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case header_value:
if (input == '\r')
{
state_ = expecting_newline_2;
- return boost::indeterminate;
+ return indeterminate;
}
else if (is_ctl(input))
{
- return false;
+ return bad;
}
else
{
req.headers.back().value.push_back(input);
- return boost::indeterminate;
+ return indeterminate;
}
case expecting_newline_2:
if (input == '\n')
{
state_ = header_line_start;
- return boost::indeterminate;
+ return indeterminate;
}
else
{
- return false;
+ return bad;
}
case expecting_newline_3:
- return (input == '\n');
+ return (input == '\n') ? good : bad;
default:
- return false;
+ return bad;
}
}
@@ -311,5 +311,5 @@ bool request_parser::is_digit(int c)
return c >= '0' && c <= '9';
}
-} // namespace server
+} // namespace server4
} // namespace http
diff --git a/3rdparty/asio/src/examples/cpp03/http/server/request_parser.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/request_parser.hpp
index 0c7e0f74368..4129c489b51 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server/request_parser.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/request_parser.hpp
@@ -2,20 +2,19 @@
// request_parser.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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 HTTP_REQUEST_PARSER_HPP
-#define HTTP_REQUEST_PARSER_HPP
+#ifndef HTTP_SERVER4_REQUEST_PARSER_HPP
+#define HTTP_SERVER4_REQUEST_PARSER_HPP
-#include <boost/logic/tribool.hpp>
-#include <boost/tuple/tuple.hpp>
+#include <tuple>
namespace http {
-namespace server {
+namespace server4 {
struct request;
@@ -29,27 +28,29 @@ public:
/// Reset to initial parser state.
void reset();
- /// Parse some data. The tribool return value is true when a complete request
- /// has been parsed, false if the data is invalid, indeterminate when more
- /// data is required. The InputIterator return value indicates how much of the
- /// input has been consumed.
+ /// Result of parse.
+ enum result_type { good, bad, indeterminate };
+
+ /// Parse some data. The enum return value is good when a complete request has
+ /// been parsed, bad if the data is invalid, indeterminate when more data is
+ /// required. The InputIterator return value indicates how much of the input
+ /// has been consumed.
template <typename InputIterator>
- boost::tuple<boost::tribool, InputIterator> parse(request& req,
+ std::tuple<result_type, InputIterator> parse(request& req,
InputIterator begin, InputIterator end)
{
while (begin != end)
{
- boost::tribool result = consume(req, *begin++);
- if (result || !result)
- return boost::make_tuple(result, begin);
+ result_type result = consume(req, *begin++);
+ if (result == good || result == bad)
+ return std::make_tuple(result, begin);
}
- boost::tribool result = boost::indeterminate;
- return boost::make_tuple(result, begin);
+ return std::make_tuple(indeterminate, begin);
}
private:
/// Handle the next character of input.
- boost::tribool consume(request& req, char input);
+ result_type consume(request& req, char input);
/// Check if a byte is an HTTP character.
static bool is_char(int c);
@@ -89,7 +90,7 @@ private:
} state_;
};
-} // namespace server
+} // namespace server4
} // namespace http
-#endif // HTTP_REQUEST_PARSER_HPP
+#endif // HTTP_SERVER4_REQUEST_PARSER_HPP
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/server.cpp b/3rdparty/asio/src/examples/cpp11/http/server4/server.cpp
index c8abd2bddf5..9c75f75e982 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,7 +17,7 @@ namespace server4 {
server::server(asio::io_context& io_context,
const std::string& address, const std::string& port,
- boost::function<void(const request&, reply&)> request_handler)
+ std::function<void(const request&, reply&)> request_handler)
: request_handler_(request_handler)
{
tcp::resolver resolver(io_context);
@@ -29,7 +29,7 @@ server::server(asio::io_context& io_context,
// Enable the pseudo-keywords reenter, yield and fork.
#include <asio/yield.hpp>
-void server::operator()(asio::error_code ec, std::size_t length)
+void server::operator()(std::error_code ec, std::size_t length)
{
// In this example we keep the error handling code in one place by
// hoisting it outside the coroutine. An alternative approach would be to
@@ -67,7 +67,7 @@ void server::operator()(asio::error_code ec, std::size_t length)
} while (is_parent());
// Create the objects needed to receive a request on the connection.
- buffer_.reset(new boost::array<char, 8192>);
+ buffer_.reset(new std::array<char, 8192>);
request_.reset(new request);
// Loop until a complete request (or an invalid one) has been received.
@@ -79,17 +79,17 @@ void server::operator()(asio::error_code ec, std::size_t length)
yield socket_->async_read_some(asio::buffer(*buffer_), *this);
// Parse the data we just received.
- boost::tie(valid_request_, boost::tuples::ignore)
+ std::tie(parse_result_, std::ignore)
= request_parser_.parse(*request_,
buffer_->data(), buffer_->data() + length);
// An indeterminate result means we need more data, so keep looping.
- } while (boost::indeterminate(valid_request_));
+ } while (parse_result_ == request_parser::indeterminate);
// Create the reply object that will be sent back to the client.
reply_.reset(new reply);
- if (valid_request_)
+ if (parse_result_ == request_parser::good)
{
// A valid request was received. Call the user-supplied function object
// to process the request and compose a reply.
diff --git a/3rdparty/asio/src/examples/cpp03/http/server4/server.hpp b/3rdparty/asio/src/examples/cpp11/http/server4/server.hpp
index e45cc7a3ca5..54d67832ba6 100644
--- a/3rdparty/asio/src/examples/cpp03/http/server4/server.hpp
+++ b/3rdparty/asio/src/examples/cpp11/http/server4/server.hpp
@@ -2,7 +2,7 @@
// server.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,10 +12,10 @@
#define HTTP_SERVER4_SERVER_HPP
#include <asio.hpp>
+#include <array>
+#include <functional>
+#include <memory>
#include <string>
-#include <boost/array.hpp>
-#include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
#include "request_parser.hpp"
namespace http {
@@ -32,39 +32,39 @@ public:
/// serve up files from the given directory.
explicit server(asio::io_context& io_context,
const std::string& address, const std::string& port,
- boost::function<void(const request&, reply&)> request_handler);
+ std::function<void(const request&, reply&)> request_handler);
/// Perform work associated with the server.
void operator()(
- asio::error_code ec = asio::error_code(),
+ std::error_code ec = std::error_code(),
std::size_t length = 0);
private:
typedef asio::ip::tcp tcp;
/// The user-supplied handler for all incoming requests.
- boost::function<void(const request&, reply&)> request_handler_;
+ std::function<void(const request&, reply&)> request_handler_;
/// Acceptor used to listen for incoming connections.
- boost::shared_ptr<tcp::acceptor> acceptor_;
+ std::shared_ptr<tcp::acceptor> acceptor_;
/// The current connection from a client.
- boost::shared_ptr<tcp::socket> socket_;
+ std::shared_ptr<tcp::socket> socket_;
/// Buffer for incoming data.
- boost::shared_ptr<boost::array<char, 8192> > buffer_;
+ std::shared_ptr<std::array<char, 8192>> buffer_;
/// The incoming request.
- boost::shared_ptr<request> request_;
+ std::shared_ptr<request> request_;
/// Whether the request is valid or not.
- boost::tribool valid_request_;
+ request_parser::result_type parse_result_;
/// The parser for the incoming request.
request_parser request_parser_;
/// The reply to be sent back to the client.
- boost::shared_ptr<reply> reply_;
+ std::shared_ptr<reply> reply_;
};
} // namespace server4
diff --git a/3rdparty/asio/src/examples/cpp03/icmp/icmp_header.hpp b/3rdparty/asio/src/examples/cpp11/icmp/icmp_header.hpp
index 4f591341264..369511c6267 100644
--- a/3rdparty/asio/src/examples/cpp03/icmp/icmp_header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/icmp/icmp_header.hpp
@@ -2,7 +2,7 @@
// icmp_header.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/icmp/ipv4_header.hpp b/3rdparty/asio/src/examples/cpp11/icmp/ipv4_header.hpp
index e9102af81a4..d296571938f 100644
--- a/3rdparty/asio/src/examples/cpp03/icmp/ipv4_header.hpp
+++ b/3rdparty/asio/src/examples/cpp11/icmp/ipv4_header.hpp
@@ -2,7 +2,7 @@
// ipv4_header.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/icmp/ping.cpp b/3rdparty/asio/src/examples/cpp11/icmp/ping.cpp
index 7830560e4ca..f179ea3461b 100644
--- a/3rdparty/asio/src/examples/cpp03/icmp/ping.cpp
+++ b/3rdparty/asio/src/examples/cpp11/icmp/ping.cpp
@@ -2,14 +2,13 @@
// ping.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
#include <istream>
#include <iostream>
#include <ostream>
@@ -59,7 +58,7 @@ private:
// Wait up to five seconds for a reply.
num_replies_ = 0;
timer_.expires_at(time_sent_ + chrono::seconds(5));
- timer_.async_wait(boost::bind(&pinger::handle_timeout, this));
+ timer_.async_wait(std::bind(&pinger::handle_timeout, this));
}
void handle_timeout()
@@ -69,7 +68,7 @@ private:
// Requests must be sent no less than one second apart.
timer_.expires_at(time_sent_ + chrono::seconds(1));
- timer_.async_wait(boost::bind(&pinger::start_send, this));
+ timer_.async_wait(std::bind(&pinger::start_send, this));
}
void start_receive()
@@ -79,7 +78,7 @@ private:
// Wait for a reply. We prepare the buffer to receive up to 64KB.
socket_.async_receive(reply_buffer_.prepare(65536),
- boost::bind(&pinger::handle_receive, this, boost::placeholders::_2));
+ std::bind(&pinger::handle_receive, this, std::placeholders::_2));
}
void handle_receive(std::size_t length)
diff --git a/3rdparty/asio/src/examples/cpp11/invocation/prioritised_handlers.cpp b/3rdparty/asio/src/examples/cpp11/invocation/prioritised_handlers.cpp
index 8435d6e46d6..533bfd06861 100644
--- a/3rdparty/asio/src/examples/cpp11/invocation/prioritised_handlers.cpp
+++ b/3rdparty/asio/src/examples/cpp11/invocation/prioritised_handlers.cpp
@@ -2,7 +2,7 @@
// prioritised_handlers.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -142,13 +142,13 @@ private:
//----------------------------------------------------------------------
-void high_priority_handler(const asio::error_code& /*ec*/,
+void high_priority_handler(const std::error_code& /*ec*/,
tcp::socket /*socket*/)
{
std::cout << "High priority handler\n";
}
-void middle_priority_handler(const asio::error_code& /*ec*/)
+void middle_priority_handler(const std::error_code& /*ec*/)
{
std::cout << "Middle priority handler\n";
}
diff --git a/3rdparty/asio/src/examples/cpp03/iostreams/daytime_client.cpp b/3rdparty/asio/src/examples/cpp11/iostreams/daytime_client.cpp
index 9ea5a592e52..0c8df192534 100644
--- a/3rdparty/asio/src/examples/cpp03/iostreams/daytime_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/iostreams/daytime_client.cpp
@@ -2,7 +2,7 @@
// daytime_client.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/iostreams/daytime_server.cpp b/3rdparty/asio/src/examples/cpp11/iostreams/daytime_server.cpp
index ff3009c30c9..1e644085ef1 100644
--- a/3rdparty/asio/src/examples/cpp03/iostreams/daytime_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/iostreams/daytime_server.cpp
@@ -2,7 +2,7 @@
// daytime_server.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -34,7 +34,7 @@ int main()
for (;;)
{
tcp::iostream stream;
- asio::error_code ec;
+ std::error_code ec;
acceptor.accept(stream.socket(), ec);
if (!ec)
{
diff --git a/3rdparty/asio/src/examples/cpp11/iostreams/http_client.cpp b/3rdparty/asio/src/examples/cpp11/iostreams/http_client.cpp
index cd46733a397..313f177bce4 100644
--- a/3rdparty/asio/src/examples/cpp11/iostreams/http_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/iostreams/http_client.cpp
@@ -2,7 +2,7 @@
// http_client.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/local/connect_pair.cpp b/3rdparty/asio/src/examples/cpp11/local/connect_pair.cpp
index 2571ff93360..50d0a06712c 100644
--- a/3rdparty/asio/src/examples/cpp11/local/connect_pair.cpp
+++ b/3rdparty/asio/src/examples/cpp11/local/connect_pair.cpp
@@ -2,7 +2,7 @@
// connect_pair.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -44,7 +44,7 @@ private:
}
else
{
- throw asio::system_error(ec);
+ throw std::system_error(ec);
}
});
}
@@ -61,7 +61,7 @@ private:
}
else
{
- throw asio::system_error(ec);
+ throw std::system_error(ec);
}
});
}
diff --git a/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_client.cpp b/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_client.cpp
new file mode 100644
index 00000000000..229509f1c14
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_client.cpp
@@ -0,0 +1,102 @@
+//
+// fd_passing_stream_client.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2021 Heiko Hund (heiko at openvpn dot net)
+//
+// 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)
+//
+
+// Demonstrates how to pass file descriptors between processes with Asio.
+// The client send a file name (destfile) to the server. The server opens
+// the file and the associated file descriptor back to the client.
+
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+#include "asio.hpp"
+
+#if defined(ASIO_HAS_LOCAL_SOCKETS)
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+using asio::local::stream_protocol;
+
+constexpr std::size_t max_length = 1024;
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 2)
+ {
+ std::cerr << "Usage: fd_passing_stream_client <serversocket>\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ stream_protocol::socket s(io_context);
+ s.connect(stream_protocol::endpoint(argv[1]));
+
+ std::cout << "Enter path to write to: ";
+ char request[max_length];
+ std::cin.getline(request, max_length);
+ size_t request_length = std::strlen(request);
+ asio::write(s, asio::buffer(request, request_length));
+
+ char reply[max_length];
+ struct msghdr msg = {};
+ struct iovec iov = { reply, sizeof(reply) };
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+
+ union
+ {
+ struct cmsghdr align;
+ char buf[CMSG_SPACE(sizeof(int))];
+ } cmsgu;
+ msg.msg_control = cmsgu.buf;
+ msg.msg_controllen = sizeof(cmsgu.buf);
+
+ ::recvmsg(s.native_handle(), &msg, 0);
+
+ int fd = -1;
+ struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg);
+ while (cmsg != NULL)
+ {
+ if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS)
+ {
+ std::memcpy(&fd, CMSG_DATA(cmsg), sizeof(fd));
+ break;
+ }
+ cmsg = CMSG_NXTHDR(&msg, cmsg);
+ }
+
+ if (fd != -1)
+ {
+ std::cout << "File descriptor received is: " << fd << "\n";
+ FILE* f(::fdopen(fd, "w+"));
+ if (f)
+ {
+ ::fprintf(f, "stream_client writing to received fd #%d\n", fd);
+ ::fclose(f);
+ }
+ else
+ ::close(fd);
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
+
+#else // defined(ASIO_HAS_LOCAL_SOCKETS)
+# error Local sockets not available on this platform.
+#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_server.cpp b/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_server.cpp
new file mode 100644
index 00000000000..5082185e75c
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_server.cpp
@@ -0,0 +1,160 @@
+//
+// fd_passing_stream_server.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2021 Heiko Hund (heiko at openvpn dot net)
+//
+// 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)
+//
+
+// Demonstrates how to pass file descriptors between processes with Asio.
+// The client sends a file name to the server. The server opens the file and
+// passes the associated file descriptor back to the client.
+
+#include <array>
+#include <cstdio>
+#include <cassert>
+#include <iostream>
+#include <memory>
+#include "asio.hpp"
+
+#if defined(ASIO_HAS_LOCAL_SOCKETS)
+
+using asio::local::stream_protocol;
+
+class session
+ : public std::enable_shared_from_this<session>
+{
+public:
+ session(stream_protocol::socket sock)
+ : socket_(std::move(sock))
+ {
+ }
+
+ void start()
+ {
+ do_read();
+ }
+
+private:
+ void do_read()
+ {
+ auto self(shared_from_this());
+ socket_.async_read_some(asio::buffer(data_),
+ [this, self](std::error_code ec, std::size_t length)
+ {
+ if (ec)
+ return;
+
+ assert(length < data_.size());
+ data_[length] = 0;
+ do_write(data_.data());
+ });
+ }
+
+ void do_write(const char* filename)
+ {
+ auto self(shared_from_this());
+ socket_.async_wait(stream_protocol::socket::wait_write,
+ [this, self, filename](std::error_code ec)
+ {
+ if (ec)
+ return;
+
+ FILE* f(::fopen(filename, "w+"));
+ if (!f)
+ return;
+
+ struct msghdr msg = {};
+ char buf[] = { 0 };
+ struct iovec iov = { buf, sizeof(buf) };
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+
+ union
+ {
+ struct cmsghdr align;
+ char buf[CMSG_SPACE(sizeof(int))];
+ } cmsgu;
+ msg.msg_control = cmsgu.buf;
+ msg.msg_controllen = sizeof(cmsgu.buf);
+
+ struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg);
+ cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+ cmsg->cmsg_level = SOL_SOCKET;
+ cmsg->cmsg_type = SCM_RIGHTS;
+ int fd = ::fileno(f);
+ std::memcpy(CMSG_DATA(cmsg), &fd, sizeof(int));
+
+ ssize_t s(::sendmsg(socket_.native_handle(), &msg, 0));
+ ::fclose(f);
+ if (s != -1)
+ do_read();
+ });
+ }
+
+ // The socket used to communicate with the client.
+ stream_protocol::socket socket_;
+
+ // Buffer used to store data received from the client.
+ std::array<char, 1024> data_;
+};
+
+class server
+{
+public:
+ server(asio::io_context& io_context, const std::string& file)
+ : acceptor_(io_context, stream_protocol::endpoint(file))
+ {
+ do_accept();
+ }
+
+private:
+ void do_accept()
+ {
+ acceptor_.async_accept(
+ [this](std::error_code ec, stream_protocol::socket socket)
+ {
+ if (!ec)
+ {
+ std::make_shared<session>(std::move(socket))->start();
+ }
+
+ do_accept();
+ });
+ }
+
+ stream_protocol::acceptor acceptor_;
+};
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 2)
+ {
+ std::cerr << "Usage: fd_passing_stream_server <socketfile>\n";
+ std::cerr << "*** WARNING: existing file is removed ***\n";
+ return 1;
+ }
+
+ asio::io_context io_context;
+
+ std::remove(argv[1]);
+ server s(io_context, argv[1]);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
+
+#else // defined(ASIO_HAS_LOCAL_SOCKETS)
+# error Local sockets not available on this platform.
+#endif // defined(ASIO_HAS_LOCAL_SOCKETS)
diff --git a/3rdparty/asio/src/examples/cpp11/local/iostream_client.cpp b/3rdparty/asio/src/examples/cpp11/local/iostream_client.cpp
index c7549278124..932f29d3459 100644
--- a/3rdparty/asio/src/examples/cpp11/local/iostream_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/local/iostream_client.cpp
@@ -2,7 +2,7 @@
// stream_client.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/local/stream_client.cpp b/3rdparty/asio/src/examples/cpp11/local/stream_client.cpp
index 19806c92510..32f408933ca 100644
--- a/3rdparty/asio/src/examples/cpp11/local/stream_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/local/stream_client.cpp
@@ -2,7 +2,7 @@
// stream_client.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/local/stream_server.cpp b/3rdparty/asio/src/examples/cpp11/local/stream_server.cpp
index 6b590fbfbf9..85cd58f87d6 100644
--- a/3rdparty/asio/src/examples/cpp11/local/stream_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/local/stream_server.cpp
@@ -2,7 +2,7 @@
// stream_server.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/multicast/receiver.cpp b/3rdparty/asio/src/examples/cpp11/multicast/receiver.cpp
index 9cb032c4148..5973bede5bb 100644
--- a/3rdparty/asio/src/examples/cpp11/multicast/receiver.cpp
+++ b/3rdparty/asio/src/examples/cpp11/multicast/receiver.cpp
@@ -2,7 +2,7 @@
// receiver.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/multicast/sender.cpp b/3rdparty/asio/src/examples/cpp11/multicast/sender.cpp
index cb70d46ccd4..dc3cf7fd0e7 100644
--- a/3rdparty/asio/src/examples/cpp11/multicast/sender.cpp
+++ b/3rdparty/asio/src/examples/cpp11/multicast/sender.cpp
@@ -2,7 +2,7 @@
// sender.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/nonblocking/third_party_lib.cpp b/3rdparty/asio/src/examples/cpp11/nonblocking/third_party_lib.cpp
index 5ce61536198..7239a598532 100644
--- a/3rdparty/asio/src/examples/cpp11/nonblocking/third_party_lib.cpp
+++ b/3rdparty/asio/src/examples/cpp11/nonblocking/third_party_lib.cpp
@@ -2,7 +2,7 @@
// third_party_lib.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_1.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_1.cpp
index cfec43c8e83..054dbdbbc88 100644
--- a/3rdparty/asio/src/examples/cpp11/operations/composed_1.cpp
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_1.cpp
@@ -2,12 +2,13 @@
// composed_1.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/use_future.hpp>
@@ -31,14 +32,25 @@ template <typename CompletionToken>
auto async_write_message(tcp::socket& socket,
const char* message, CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is void. However,
- // when the completion token is asio::yield_context (used for stackful
- // coroutines) the return type would be std::size_t, and when the completion
- // token is asio::use_future it would be std::future<std::size_t>.
- -> typename asio::async_result<
- typename std::decay<CompletionToken>::type,
- void(std::error_code, std::size_t)>::return_type
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
+ //
+ // In this example we are trivially delegating to an underlying asynchronous
+ // operation, so we can deduce the return type from that.
+ -> decltype(
+ asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<CompletionToken>(token)))
{
// When delegating to the underlying operation we must take care to perfectly
// forward the completion token. This ensures that our operation works
@@ -77,6 +89,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -109,5 +154,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_2.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_2.cpp
index 62ddf8d9089..306d4b343b4 100644
--- a/3rdparty/asio/src/examples/cpp11/operations/composed_2.cpp
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_2.cpp
@@ -2,12 +2,13 @@
// composed_2.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/use_future.hpp>
@@ -20,6 +21,10 @@
using asio::ip::tcp;
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
//------------------------------------------------------------------------------
// This next simplest example of a composed asynchronous operation involves
@@ -28,43 +33,102 @@ using asio::ip::tcp;
// asynchronous operation requirements are met by delegating responsibility to
// the underlying operations.
+// In addition to determining the mechanism by which an asynchronous operation
+// delivers its result, a completion token also determines the time when the
+// operation commences. For example, when the completion token is a simple
+// callback the operation commences before the initiating function returns.
+// However, if the completion token's delivery mechanism uses a future, we
+// might instead want to defer initiation of the operation until the returned
+// future object is waited upon.
+//
+// To enable this, when implementing an asynchronous operation we must package
+// the initiation step as a function object.
+struct async_write_message_initiation
+{
+ // The initiation function object's call operator is passed the concrete
+ // completion handler produced by the completion token. This completion
+ // handler matches the asynchronous operation's completion handler signature,
+ // which in this example is:
+ //
+ // void(std::error_code error, std::size_t)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments as members in the initiaton function object. However, we should
+ // prefer to propagate them as function call arguments as this allows the
+ // completion token to optimise how they are passed. For example, a lazy
+ // future which defers initiation would need to make a decay-copy of the
+ // arguments, but when using a simple callback the arguments can be trivially
+ // forwarded straight through.)
+ template <typename CompletionHandler>
+ void operator()(CompletionHandler&& completion_handler, tcp::socket& socket,
+ const char* message, bool allow_partial_write) const
+ {
+ if (allow_partial_write)
+ {
+ // When delegating to an underlying operation we must take care to
+ // perfectly forward the completion handler. This ensures that our
+ // operation works correctly with move-only function objects as
+ // callbacks.
+ return socket.async_write_some(
+ asio::buffer(message, std::strlen(message)),
+ std::forward<CompletionHandler>(completion_handler));
+ }
+ else
+ {
+ // As above, we must perfectly forward the completion handler when calling
+ // the alternate underlying operation.
+ return asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<CompletionHandler>(completion_handler));
+ }
+ }
+};
+
template <typename CompletionToken>
auto async_write_message(tcp::socket& socket,
const char* message, bool allow_partial_write,
CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is void. However,
- // when the completion token is asio::yield_context (used for stackful
- // coroutines) the return type would be std::size_t, and when the completion
- // token is asio::use_future it would be std::future<std::size_t>.
- -> typename asio::async_result<
- typename std::decay<CompletionToken>::type,
- void(std::error_code, std::size_t)>::return_type
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_initiate.
+ -> decltype(
+ asio::async_initiate<
+ CompletionToken, void(std::error_code, std::size_t)>(
+ async_write_message_initiation(),
+ token, std::ref(socket), message, allow_partial_write))
{
- // As the return type of the initiating function is deduced solely from the
- // CompletionToken and completion signature, we know that two different
- // asynchronous operations having the same completion signature will produce
- // the same return type, when passed the same CompletionToken. This allows us
- // to trivially delegate to alternate implementations.
- if (allow_partial_write)
- {
- // When delegating to an underlying operation we must take care to
- // perfectly forward the completion token. This ensures that our operation
- // works correctly with move-only function objects as callbacks, as well as
- // other completion token types.
- return socket.async_write_some(
- asio::buffer(message, std::strlen(message)),
- std::forward<CompletionToken>(token));
- }
- else
- {
- // As above, we must perfectly forward the completion token when calling
- // the alternate underlying operation.
- return asio::async_write(socket,
- asio::buffer(message, std::strlen(message)),
- std::forward<CompletionToken>(token));
- }
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code, std::size_t)>(
+ async_write_message_initiation(),
+ token, std::ref(socket), message, allow_partial_write);
}
//------------------------------------------------------------------------------
@@ -95,6 +159,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", false, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -127,5 +224,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_3.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_3.cpp
index c821041336f..e0b5ddca85b 100644
--- a/3rdparty/asio/src/examples/cpp11/operations/composed_3.cpp
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_3.cpp
@@ -2,13 +2,14 @@
// composed_3.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/use_future.hpp>
@@ -96,15 +97,26 @@ template <typename CompletionToken>
auto async_write_message(tcp::socket& socket,
const char* message, CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
- -> typename asio::async_result<
- typename std::decay<CompletionToken>::type,
- void(std::error_code)>::return_type
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_initiate.
+ -> decltype(
+ asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(),
+ token, std::ref(socket), message))
{
// The asio::async_initiate function takes:
//
@@ -155,6 +167,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -188,5 +233,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_4.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_4.cpp
index e4c6264b625..29fe26966e5 100644
--- a/3rdparty/asio/src/examples/cpp11/operations/composed_4.cpp
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_4.cpp
@@ -2,13 +2,14 @@
// composed_4.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/use_future.hpp>
@@ -112,15 +113,26 @@ template <typename CompletionToken>
auto async_write_message(tcp::socket& socket,
const char* message, CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
- -> typename asio::async_result<
- typename std::decay<CompletionToken>::type,
- void(std::error_code)>::return_type
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_initiate.
+ -> decltype(
+ asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(),
+ token, std::ref(socket), message))
{
// The asio::async_initiate function takes:
//
@@ -171,6 +183,38 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket, "", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -203,5 +247,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_5.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_5.cpp
index 9f7901da512..06a7af40f41 100644
--- a/3rdparty/asio/src/examples/cpp11/operations/composed_5.cpp
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_5.cpp
@@ -2,12 +2,13 @@
// composed_5.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/use_future.hpp>
@@ -142,15 +143,26 @@ template <typename T, typename CompletionToken>
auto async_write_message(tcp::socket& socket,
const T& message, CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
- -> typename asio::async_result<
- typename std::decay<CompletionToken>::type,
- void(std::error_code)>::return_type
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_initiate.
+ -> decltype(
+ asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(), token,
+ std::ref(socket), std::declval<std::unique_ptr<std::string>>()))
{
// Encode the message and copy it into an allocated buffer. The buffer will
// be maintained for the lifetime of the asynchronous operation.
@@ -207,6 +219,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ std::string("abcdef"), asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -239,5 +284,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_6.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_6.cpp
index b55a553d07a..b948758d83a 100644
--- a/3rdparty/asio/src/examples/cpp11/operations/composed_6.cpp
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_6.cpp
@@ -2,12 +2,13 @@
// composed_6.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <asio/deferred.hpp>
#include <asio/executor_work_guard.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
@@ -97,9 +98,7 @@ struct async_write_message_initiation
// As our composed operation performs multiple underlying I/O operations,
// we should maintain a work object against the I/O executor. This tells
// the I/O executor that there is still more work to come in the future.
- typename std::decay<decltype(asio::prefer(
- std::declval<tcp::socket::executor_type>(),
- asio::execution::outstanding_work.tracked))>::type io_work_;
+ asio::executor_work_guard<tcp::socket::executor_type> io_work_;
// The user-supplied completion handler, called once only on completion
// of the entire composed operation.
@@ -136,6 +135,9 @@ struct async_write_message_initiation
// This point is reached only on completion of the entire composed
// operation.
+ // We no longer have any future work coming for the I/O executor.
+ io_work_.reset();
+
// Deallocate the encoded message before calling the user-supplied
// completion handler.
encoded_message_.reset();
@@ -186,8 +188,7 @@ struct async_write_message_initiation
socket, std::move(encoded_message),
repeat_count, std::move(delay_timer),
intermediate_completion_handler::starting,
- asio::prefer(socket.get_executor(),
- asio::execution::outstanding_work.tracked),
+ asio::make_work_guard(socket.get_executor()),
std::forward<CompletionHandler>(completion_handler)});
}
};
@@ -197,15 +198,27 @@ auto async_write_messages(tcp::socket& socket,
const T& message, std::size_t repeat_count,
CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
- -> typename asio::async_result<
- typename std::decay<CompletionToken>::type,
- void(std::error_code)>::return_type
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_initiate.
+ -> decltype(
+ asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ async_write_message_initiation(), token, std::ref(socket),
+ std::declval<std::unique_ptr<std::string>>(), repeat_count,
+ std::declval<std::unique_ptr<asio::steady_timer>>()))
{
// Encode the message and copy it into an allocated buffer. The buffer will
// be maintained for the lifetime of the composed asynchronous operation.
@@ -266,6 +279,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -298,5 +344,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_7.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_7.cpp
index 92c8e321c01..8eb83dc7679 100644
--- a/3rdparty/asio/src/examples/cpp11/operations/composed_7.cpp
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_7.cpp
@@ -2,13 +2,14 @@
// composed_7.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio/compose.hpp>
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/steady_timer.hpp>
@@ -118,15 +119,26 @@ auto async_write_messages(tcp::socket& socket,
const T& message, std::size_t repeat_count,
CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
- -> typename asio::async_result<
- typename std::decay<CompletionToken>::type,
- void(std::error_code)>::return_type
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_compose.
+ -> decltype(
+ asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ std::declval<async_write_messages_implementation>(),
+ token, socket))
{
// Encode the message and copy it into an allocated buffer. The buffer will
// be maintained for the lifetime of the composed asynchronous operation.
@@ -186,6 +198,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -218,5 +263,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp11/operations/composed_8.cpp b/3rdparty/asio/src/examples/cpp11/operations/composed_8.cpp
index 7c24c7251c6..ce22a5b418d 100644
--- a/3rdparty/asio/src/examples/cpp11/operations/composed_8.cpp
+++ b/3rdparty/asio/src/examples/cpp11/operations/composed_8.cpp
@@ -2,13 +2,14 @@
// composed_8.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio/compose.hpp>
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/steady_timer.hpp>
@@ -114,15 +115,26 @@ auto async_write_messages(tcp::socket& socket,
const T& message, std::size_t repeat_count,
CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
- -> typename asio::async_result<
- typename std::decay<CompletionToken>::type,
- void(std::error_code)>::return_type
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++11 we deduce the type from the call to asio::async_compose.
+ -> decltype(
+ asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ std::declval<async_write_messages_implementation>(),
+ token, socket))
{
// Encode the message and copy it into an allocated buffer. The buffer will
// be maintained for the lifetime of the composed asynchronous operation.
@@ -181,6 +193,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation and its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -213,5 +258,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp11/parallel_group/ranged_wait_for_all.cpp b/3rdparty/asio/src/examples/cpp11/parallel_group/ranged_wait_for_all.cpp
new file mode 100644
index 00000000000..18772884072
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/parallel_group/ranged_wait_for_all.cpp
@@ -0,0 +1,70 @@
+//
+// ranged_wait_for_all.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+#include <vector>
+
+#ifdef ASIO_HAS_POSIX_STREAM_DESCRIPTOR
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor out(ctx, ::dup(STDOUT_FILENO));
+ asio::posix::stream_descriptor err(ctx, ::dup(STDERR_FILENO));
+
+ using op_type = decltype(
+ out.async_write_some(
+ asio::buffer("", 0),
+ asio::deferred
+ )
+ );
+
+ std::vector<op_type> ops;
+
+ ops.push_back(
+ out.async_write_some(
+ asio::buffer("first\r\n", 7),
+ asio::deferred
+ )
+ );
+
+ ops.push_back(
+ err.async_write_some(
+ asio::buffer("second\r\n", 8),
+ asio::deferred
+ )
+ );
+
+ asio::experimental::make_parallel_group(ops).async_wait(
+ asio::experimental::wait_for_all(),
+ [](
+ std::vector<std::size_t> completion_order,
+ std::vector<std::error_code> ec,
+ std::vector<std::size_t> n
+ )
+ {
+ for (std::size_t i = 0; i < completion_order.size(); ++i)
+ {
+ std::size_t idx = completion_order[i];
+ std::cout << "operation " << idx << " finished: ";
+ std::cout << ec[idx] << ", " << n[idx] << "\n";
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_all.cpp b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_all.cpp
new file mode 100644
index 00000000000..a489a2966da
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_all.cpp
@@ -0,0 +1,62 @@
+//
+// wait_for_all.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/deferred.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#ifdef ASIO_HAS_POSIX_STREAM_DESCRIPTOR
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ in.async_read_some(
+ asio::buffer(data),
+ asio::deferred),
+ timer.async_wait(
+ asio::deferred)
+ ).async_wait(
+ asio::experimental::wait_for_all(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::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;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one.cpp b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one.cpp
new file mode 100644
index 00000000000..499684af69f
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one.cpp
@@ -0,0 +1,62 @@
+//
+// wait_for_one.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/deferred.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ in.async_read_some(
+ asio::buffer(data),
+ asio::deferred),
+ timer.async_wait(
+ asio::deferred)
+ ).async_wait(
+ asio::experimental::wait_for_one(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::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;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_error.cpp b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_error.cpp
new file mode 100644
index 00000000000..f6e52d6ca0e
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_error.cpp
@@ -0,0 +1,62 @@
+//
+// wait_for_one_error.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/deferred.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ in.async_read_some(
+ asio::buffer(data),
+ asio::deferred),
+ timer.async_wait(
+ asio::deferred)
+ ).async_wait(
+ asio::experimental::wait_for_one_error(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::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;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_success.cpp b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_success.cpp
new file mode 100644
index 00000000000..16fd2130ab8
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/parallel_group/wait_for_one_success.cpp
@@ -0,0 +1,62 @@
+//
+// wait_for_one_error.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/deferred.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor in(ctx, ::dup(STDIN_FILENO));
+ asio::steady_timer timer(ctx, std::chrono::seconds(5));
+
+ char data[1024];
+
+ asio::experimental::make_parallel_group(
+ in.async_read_some(
+ asio::buffer(data),
+ asio::deferred),
+ timer.async_wait(
+ asio::deferred)
+ ).async_wait(
+ asio::experimental::wait_for_one_success(),
+ [](
+ std::array<std::size_t, 2> completion_order,
+ std::error_code ec1, std::size_t n1,
+ std::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;
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp03/porthopper/client.cpp b/3rdparty/asio/src/examples/cpp11/porthopper/client.cpp
index 19b2fbfe499..e0936128d72 100644
--- a/3rdparty/asio/src/examples/cpp03/porthopper/client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/porthopper/client.cpp
@@ -2,25 +2,22 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <boost/lambda/lambda.hpp>
-#include <boost/lambda/bind.hpp>
-#include <boost/lambda/if.hpp>
-#include <boost/shared_ptr.hpp>
#include <algorithm>
#include <cstdlib>
#include <exception>
#include <iostream>
+#include <memory>
#include <string>
+#include <utility>
#include "protocol.hpp"
-using namespace boost;
using asio::ip::tcp;
using asio::ip::udp;
@@ -48,11 +45,10 @@ int main(int argc, char* argv[])
control_socket.connect(remote_endpoint);
// Create a datagram socket to receive data from the server.
- boost::shared_ptr<udp::socket> data_socket(
- new udp::socket(io_context, udp::endpoint(udp::v4(), 0)));
+ udp::socket data_socket(io_context, udp::endpoint(udp::v4(), 0));
// Determine what port we will receive data on.
- udp::endpoint data_endpoint = data_socket->local_endpoint();
+ udp::endpoint data_endpoint = data_socket.local_endpoint();
// Ask the server to start sending us data.
control_request start = control_request::start(data_endpoint.port());
@@ -66,7 +62,7 @@ int main(int argc, char* argv[])
{
// Receive a frame from the server.
frame f;
- data_socket->receive(f.to_buffers(), 0);
+ data_socket.receive(f.to_buffers(), 0);
if (f.number() > last_frame_number)
{
last_frame_number = f.number();
@@ -80,20 +76,20 @@ int main(int argc, char* argv[])
std::cout << " Starting renegotiation";
// Create the new data socket.
- boost::shared_ptr<udp::socket> new_data_socket(
- new udp::socket(io_context, udp::endpoint(udp::v4(), 0)));
+ udp::socket new_data_socket(io_context, udp::endpoint(udp::v4(), 0));
// Determine the new port we will use to receive data.
- udp::endpoint new_data_endpoint = new_data_socket->local_endpoint();
+ udp::endpoint new_data_endpoint = new_data_socket.local_endpoint();
// Ask the server to switch over to the new port.
control_request change = control_request::change(
data_endpoint.port(), new_data_endpoint.port());
- asio::error_code control_result;
+ std::error_code control_result;
asio::async_write(control_socket, change.to_buffers(),
- (
- lambda::var(control_result) = lambda::_1
- ));
+ [&](std::error_code ec, std::size_t /*length*/)
+ {
+ control_result = ec;
+ });
// Try to receive a frame from the server on the new data socket. If we
// successfully receive a frame on this new data socket we can consider
@@ -101,20 +97,19 @@ int main(int argc, char* argv[])
// socket, which will cause any outstanding receive operation on it to be
// cancelled.
frame f1;
- asio::error_code new_data_socket_result;
- new_data_socket->async_receive(f1.to_buffers(),
- (
- // Note: lambda::_1 is the first argument to the callback handler,
- // which in this case is the error code for the operation.
- lambda::var(new_data_socket_result) = lambda::_1,
- lambda::if_(!lambda::_1)
- [
+ std::error_code new_data_socket_result;
+ new_data_socket.async_receive(f1.to_buffers(),
+ [&](std::error_code ec, std::size_t /*length*/)
+ {
+ new_data_socket_result = ec;
+ if (!ec)
+ {
// We have successfully received a frame on the new data socket,
// so we can close the old data socket. This will cancel any
// outstanding receive operation on the old data socket.
- lambda::var(data_socket) = boost::shared_ptr<udp::socket>()
- ]
- ));
+ data_socket.close();
+ }
+ });
// This loop will continue until we have successfully completed the
// renegotiation (i.e. received a frame on the new data socket), or some
@@ -130,18 +125,19 @@ int main(int argc, char* argv[])
// complete.
frame f2;
done = true; // Let's be optimistic.
- if (data_socket) // Might have been closed by new_data_socket's handler.
+ if (data_socket.is_open()) // May have been closed by receive handler.
{
- data_socket->async_receive(f2.to_buffers(), 0,
- (
- lambda::if_(!lambda::_1)
- [
+ data_socket.async_receive(f2.to_buffers(), 0,
+ [&](std::error_code ec, std::size_t /*length*/)
+ {
+ if (!ec)
+ {
// We have successfully received a frame on the old data
// socket. Stop the io_context so that we can print it.
- lambda::bind(&asio::io_context::stop, &io_context),
- lambda::var(done) = false
- ]
- ));
+ io_context.stop();
+ done = false;
+ }
+ });
}
// Run the operations in parallel. This will block until all operations
@@ -166,15 +162,15 @@ int main(int argc, char* argv[])
// the renegotation, or an error has occurred. First we'll check for
// errors.
if (control_result)
- throw asio::system_error(control_result);
+ throw std::system_error(control_result);
if (new_data_socket_result)
- throw asio::system_error(new_data_socket_result);
+ throw std::system_error(new_data_socket_result);
// If we get here it means we have successfully started receiving data on
// the new data socket. This new data socket will be used from now on
// (until the next time we renegotiate).
std::cout << " Renegotiation complete";
- data_socket = new_data_socket;
+ data_socket = std::move(new_data_socket);
data_endpoint = new_data_endpoint;
if (f1.number() > last_frame_number)
{
diff --git a/3rdparty/asio/src/examples/cpp03/porthopper/protocol.hpp b/3rdparty/asio/src/examples/cpp11/porthopper/protocol.hpp
index d9dcb2e13eb..46f9938cad5 100644
--- a/3rdparty/asio/src/examples/cpp03/porthopper/protocol.hpp
+++ b/3rdparty/asio/src/examples/cpp11/porthopper/protocol.hpp
@@ -2,7 +2,7 @@
// protocol.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -11,8 +11,8 @@
#ifndef PORTHOPPER_PROTOCOL_HPP
#define PORTHOPPER_PROTOCOL_HPP
-#include <boost/array.hpp>
#include <asio.hpp>
+#include <array>
#include <cstring>
#include <iomanip>
#include <string>
@@ -69,9 +69,9 @@ public:
}
// Obtain buffers for reading from or writing to a socket.
- boost::array<asio::mutable_buffer, 1> to_buffers()
+ std::array<asio::mutable_buffer, 1> to_buffers()
{
- boost::array<asio::mutable_buffer, 1> buffers
+ std::array<asio::mutable_buffer, 1> buffers
= { { asio::buffer(data_) } };
return buffers;
}
@@ -134,9 +134,9 @@ public:
}
// Obtain buffers for reading from or writing to a socket.
- boost::array<asio::mutable_buffer, 1> to_buffers()
+ std::array<asio::mutable_buffer, 1> to_buffers()
{
- boost::array<asio::mutable_buffer, 1> buffers
+ std::array<asio::mutable_buffer, 1> buffers
= { { asio::buffer(data_) } };
return buffers;
}
diff --git a/3rdparty/asio/src/examples/cpp03/porthopper/server.cpp b/3rdparty/asio/src/examples/cpp11/porthopper/server.cpp
index 3b8f3b000cf..4a77622e593 100644
--- a/3rdparty/asio/src/examples/cpp03/porthopper/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/porthopper/server.cpp
@@ -2,28 +2,28 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
#include <cmath>
#include <cstdlib>
#include <exception>
+#include <functional>
#include <iostream>
+#include <memory>
#include <set>
#include "protocol.hpp"
using asio::ip::tcp;
using asio::ip::udp;
-typedef boost::shared_ptr<tcp::socket> tcp_socket_ptr;
-typedef boost::shared_ptr<asio::steady_timer> timer_ptr;
-typedef boost::shared_ptr<control_request> control_request_ptr;
+typedef std::shared_ptr<tcp::socket> tcp_socket_ptr;
+typedef std::shared_ptr<asio::steady_timer> timer_ptr;
+typedef std::shared_ptr<control_request> control_request_ptr;
class server
{
@@ -38,35 +38,35 @@ public:
// Start waiting for a new control connection.
tcp_socket_ptr new_socket(new tcp::socket(acceptor_.get_executor()));
acceptor_.async_accept(*new_socket,
- boost::bind(&server::handle_accept, this,
+ std::bind(&server::handle_accept, this,
asio::placeholders::error, new_socket));
// Start the timer used to generate outgoing frames.
timer_.expires_after(asio::chrono::milliseconds(100));
- timer_.async_wait(boost::bind(&server::handle_timer, this));
+ timer_.async_wait(std::bind(&server::handle_timer, this));
}
// Handle a new control connection.
- void handle_accept(const asio::error_code& ec, tcp_socket_ptr socket)
+ void handle_accept(const std::error_code& ec, tcp_socket_ptr socket)
{
if (!ec)
{
// Start receiving control requests on the connection.
control_request_ptr request(new control_request);
asio::async_read(*socket, request->to_buffers(),
- boost::bind(&server::handle_control_request, this,
+ std::bind(&server::handle_control_request, this,
asio::placeholders::error, socket, request));
}
// Start waiting for a new control connection.
tcp_socket_ptr new_socket(new tcp::socket(acceptor_.get_executor()));
acceptor_.async_accept(*new_socket,
- boost::bind(&server::handle_accept, this,
+ std::bind(&server::handle_accept, this,
asio::placeholders::error, new_socket));
}
// Handle a new control request.
- void handle_control_request(const asio::error_code& ec,
+ void handle_control_request(const std::error_code& ec,
tcp_socket_ptr socket, control_request_ptr request)
{
if (!ec)
@@ -76,7 +76,7 @@ public:
new asio::steady_timer(acceptor_.get_executor()));
delay_timer->expires_after(asio::chrono::seconds(2));
delay_timer->async_wait(
- boost::bind(&server::handle_control_request_timer, this,
+ std::bind(&server::handle_control_request_timer, this,
socket, request, delay_timer));
}
}
@@ -88,7 +88,7 @@ public:
// subscriptions must be stored on the server as a complete endpoint, not
// just a port. We use the non-throwing overload of remote_endpoint() since
// it may fail if the socket is no longer connected.
- asio::error_code ec;
+ std::error_code ec;
tcp::endpoint remote_endpoint = socket->remote_endpoint(ec);
if (!ec)
{
@@ -111,7 +111,7 @@ public:
// Wait for next control request on this connection.
asio::async_read(*socket, request->to_buffers(),
- boost::bind(&server::handle_control_request, this,
+ std::bind(&server::handle_control_request, this,
asio::placeholders::error, socket, request));
}
@@ -135,13 +135,13 @@ public:
std::set<udp::endpoint>::iterator j;
for (j = subscribers_.begin(); j != subscribers_.end(); ++j)
{
- asio::error_code ec;
+ std::error_code ec;
udp_socket_.send_to(f.to_buffers(), *j, 0, ec);
}
// Wait for next timeout.
timer_.expires_after(asio::chrono::milliseconds(100));
- timer_.async_wait(boost::bind(&server::handle_timer, this));
+ timer_.async_wait(std::bind(&server::handle_timer, this));
}
private:
diff --git a/3rdparty/asio/src/examples/cpp03/serialization/client.cpp b/3rdparty/asio/src/examples/cpp11/serialization/client.cpp
index 802bc755b40..10ec87f6da4 100644
--- a/3rdparty/asio/src/examples/cpp03/serialization/client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/serialization/client.cpp
@@ -2,14 +2,14 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
+#include <functional>
#include <iostream>
#include <vector>
#include "connection.hpp" // Must come before boost/serialization headers.
@@ -35,7 +35,7 @@ public:
// Start an asynchronous connect operation.
asio::async_connect(connection_.socket(), endpoint_iterator,
- boost::bind(&client::handle_connect, this,
+ std::bind(&client::handle_connect, this,
asio::placeholders::error));
}
@@ -48,7 +48,7 @@ public:
// of stocks. The connection::async_read() function will automatically
// decode the data that is read from the underlying socket.
connection_.async_read(stocks_,
- boost::bind(&client::handle_read, this,
+ std::bind(&client::handle_read, this,
asio::placeholders::error));
}
else
diff --git a/3rdparty/asio/src/examples/cpp03/serialization/connection.hpp b/3rdparty/asio/src/examples/cpp11/serialization/connection.hpp
index ac45287025b..14d96f7597b 100644
--- a/3rdparty/asio/src/examples/cpp03/serialization/connection.hpp
+++ b/3rdparty/asio/src/examples/cpp11/serialization/connection.hpp
@@ -2,7 +2,7 @@
// connection.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -14,12 +14,12 @@
#include <asio.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/archive/text_oarchive.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/tuple/tuple.hpp>
+#include <functional>
#include <iomanip>
+#include <memory>
#include <string>
#include <sstream>
+#include <tuple>
#include <vector>
namespace s11n_example {
@@ -35,7 +35,7 @@ class connection
{
public:
/// Constructor.
- connection(const asio::executor& ex)
+ connection(const asio::any_io_executor& ex)
: socket_(ex)
{
}
@@ -64,8 +64,8 @@ public:
if (!header_stream || header_stream.str().size() != header_length)
{
// Something went wrong, inform the caller.
- asio::error_code error(asio::error::invalid_argument);
- asio::post(socket_.get_executor(), boost::bind(handler, error));
+ std::error_code error(asio::error::invalid_argument);
+ asio::post(socket_.get_executor(), std::bind(handler, error));
return;
}
outbound_header_ = header_stream.str();
@@ -83,26 +83,22 @@ public:
void async_read(T& t, Handler handler)
{
// Issue a read operation to read exactly the number of bytes in a header.
- void (connection::*f)(
- const asio::error_code&,
- T&, boost::tuple<Handler>)
+ void (connection::*f)(const std::error_code&, T&, std::tuple<Handler>)
= &connection::handle_read_header<T, Handler>;
asio::async_read(socket_, asio::buffer(inbound_header_),
- boost::bind(f,
- this, asio::placeholders::error, boost::ref(t),
- boost::make_tuple(handler)));
+ std::bind(f,
+ this, asio::placeholders::error, std::ref(t),
+ std::make_tuple(handler)));
}
- /// Handle a completed read of a message header. The handler is passed using
- /// a tuple since boost::bind seems to have trouble binding a function object
- /// created using boost::bind as a parameter.
+ /// Handle a completed read of a message header.
template <typename T, typename Handler>
- void handle_read_header(const asio::error_code& e,
- T& t, boost::tuple<Handler> handler)
+ void handle_read_header(const std::error_code& e,
+ T& t, std::tuple<Handler> handler)
{
if (e)
{
- boost::get<0>(handler)(e);
+ std::get<0>(handler)(e);
}
else
{
@@ -112,31 +108,31 @@ public:
if (!(is >> std::hex >> inbound_data_size))
{
// Header doesn't seem to be valid. Inform the caller.
- asio::error_code error(asio::error::invalid_argument);
- boost::get<0>(handler)(error);
+ std::error_code error(asio::error::invalid_argument);
+ std::get<0>(handler)(error);
return;
}
// Start an asynchronous call to receive the data.
inbound_data_.resize(inbound_data_size);
void (connection::*f)(
- const asio::error_code&,
- T&, boost::tuple<Handler>)
+ const std::error_code&,
+ T&, std::tuple<Handler>)
= &connection::handle_read_data<T, Handler>;
asio::async_read(socket_, asio::buffer(inbound_data_),
- boost::bind(f, this,
- asio::placeholders::error, boost::ref(t), handler));
+ std::bind(f, this,
+ asio::placeholders::error, std::ref(t), handler));
}
}
/// Handle a completed read of message data.
template <typename T, typename Handler>
- void handle_read_data(const asio::error_code& e,
- T& t, boost::tuple<Handler> handler)
+ void handle_read_data(const std::error_code& e,
+ T& t, std::tuple<Handler> handler)
{
if (e)
{
- boost::get<0>(handler)(e);
+ std::get<0>(handler)(e);
}
else
{
@@ -151,13 +147,13 @@ public:
catch (std::exception& e)
{
// Unable to decode data.
- asio::error_code error(asio::error::invalid_argument);
- boost::get<0>(handler)(error);
+ std::error_code error(asio::error::invalid_argument);
+ std::get<0>(handler)(error);
return;
}
// Inform caller that data has been received ok.
- boost::get<0>(handler)(e);
+ std::get<0>(handler)(e);
}
}
@@ -181,7 +177,7 @@ private:
std::vector<char> inbound_data_;
};
-typedef boost::shared_ptr<connection> connection_ptr;
+typedef std::shared_ptr<connection> connection_ptr;
} // namespace s11n_example
diff --git a/3rdparty/asio/src/examples/cpp03/serialization/server.cpp b/3rdparty/asio/src/examples/cpp11/serialization/server.cpp
index 7818cfed6aa..a032e86dc78 100644
--- a/3rdparty/asio/src/examples/cpp03/serialization/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/serialization/server.cpp
@@ -2,15 +2,14 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/lexical_cast.hpp>
+#include <functional>
#include <iostream>
#include <vector>
#include "connection.hpp" // Must come before boost/serialization headers.
@@ -57,12 +56,12 @@ public:
// Start an accept operation for a new connection.
connection_ptr new_conn(new connection(acceptor_.get_executor()));
acceptor_.async_accept(new_conn->socket(),
- boost::bind(&server::handle_accept, this,
+ std::bind(&server::handle_accept, this,
asio::placeholders::error, new_conn));
}
/// Handle completion of a accept operation.
- void handle_accept(const asio::error_code& e, connection_ptr conn)
+ void handle_accept(const std::error_code& e, connection_ptr conn)
{
if (!e)
{
@@ -70,19 +69,19 @@ public:
// client. The connection::async_write() function will automatically
// serialize the data structure for us.
conn->async_write(stocks_,
- boost::bind(&server::handle_write, this,
+ std::bind(&server::handle_write, this,
asio::placeholders::error, conn));
}
// Start an accept operation for a new connection.
connection_ptr new_conn(new connection(acceptor_.get_executor()));
acceptor_.async_accept(new_conn->socket(),
- boost::bind(&server::handle_accept, this,
+ std::bind(&server::handle_accept, this,
asio::placeholders::error, new_conn));
}
/// Handle completion of a write operation.
- void handle_write(const asio::error_code& e, connection_ptr conn)
+ void handle_write(const std::error_code& e, connection_ptr conn)
{
// Nothing to do. The socket will be closed automatically when the last
// reference to the connection object goes away.
@@ -108,7 +107,7 @@ int main(int argc, char* argv[])
std::cerr << "Usage: server <port>" << std::endl;
return 1;
}
- unsigned short port = boost::lexical_cast<unsigned short>(argv[1]);
+ unsigned short port = std::stoi(argv[1]);
asio::io_context io_context;
s11n_example::server server(io_context, port);
diff --git a/3rdparty/asio/src/examples/cpp03/serialization/stock.hpp b/3rdparty/asio/src/examples/cpp11/serialization/stock.hpp
index 02cadcac7a3..bb305518cae 100644
--- a/3rdparty/asio/src/examples/cpp03/serialization/stock.hpp
+++ b/3rdparty/asio/src/examples/cpp11/serialization/stock.hpp
@@ -2,7 +2,7 @@
// stock.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/services/basic_logger.hpp b/3rdparty/asio/src/examples/cpp11/services/basic_logger.hpp
index b9114d0e6d7..6e4d7a0b05d 100644
--- a/3rdparty/asio/src/examples/cpp03/services/basic_logger.hpp
+++ b/3rdparty/asio/src/examples/cpp11/services/basic_logger.hpp
@@ -2,7 +2,7 @@
// basic_logger.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,7 +12,6 @@
#define SERVICES_BASIC_LOGGER_HPP
#include <asio.hpp>
-#include <boost/noncopyable.hpp>
#include <string>
namespace services {
@@ -21,7 +20,6 @@ namespace services {
/// typedef.
template <typename Service>
class basic_logger
- : private boost::noncopyable
{
public:
/// The type of the service that will be used to provide timer operations.
@@ -46,6 +44,9 @@ public:
service_.create(impl_, identifier);
}
+ basic_logger(const basic_logger&) = delete;
+ basic_logger& operator=(basic_logger&) = delete;
+
/// Destructor.
~basic_logger()
{
diff --git a/3rdparty/asio/src/examples/cpp03/services/daytime_client.cpp b/3rdparty/asio/src/examples/cpp11/services/daytime_client.cpp
index b4e7ea602d7..360134f64c2 100644
--- a/3rdparty/asio/src/examples/cpp03/services/daytime_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/services/daytime_client.cpp
@@ -2,14 +2,14 @@
// daytime_client.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
+#include <functional>
#include <iostream>
#include "logger.hpp"
@@ -25,7 +25,7 @@ void read_handler(const asio::error_code& e,
std::cout.write(read_buffer, bytes_transferred);
s->async_read_some(asio::buffer(read_buffer),
- boost::bind(read_handler, asio::placeholders::error,
+ std::bind(read_handler, asio::placeholders::error,
asio::placeholders::bytes_transferred, s));
}
else
@@ -51,7 +51,7 @@ void connect_handler(const asio::error_code& e, tcp::socket* s)
logger.log("Connection established");
s->async_read_some(asio::buffer(read_buffer),
- boost::bind(read_handler, asio::placeholders::error,
+ std::bind(read_handler, asio::placeholders::error,
asio::placeholders::bytes_transferred, s));
}
else
@@ -86,7 +86,7 @@ int main(int argc, char* argv[])
// Start an asynchronous connect.
tcp::socket socket(io_context);
asio::async_connect(socket, endpoints,
- boost::bind(connect_handler,
+ std::bind(connect_handler,
asio::placeholders::error, &socket));
// Run the io_context until all operations have finished.
diff --git a/3rdparty/asio/src/examples/cpp03/services/logger.hpp b/3rdparty/asio/src/examples/cpp11/services/logger.hpp
index 9ebbbd6992a..2ab366c83c6 100644
--- a/3rdparty/asio/src/examples/cpp03/services/logger.hpp
+++ b/3rdparty/asio/src/examples/cpp11/services/logger.hpp
@@ -2,7 +2,7 @@
// logger.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/services/logger_service.cpp b/3rdparty/asio/src/examples/cpp11/services/logger_service.cpp
index 4123d7bb92e..74d67c75241 100644
--- a/3rdparty/asio/src/examples/cpp03/services/logger_service.cpp
+++ b/3rdparty/asio/src/examples/cpp11/services/logger_service.cpp
@@ -2,7 +2,7 @@
// logger_service.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/services/logger_service.hpp b/3rdparty/asio/src/examples/cpp11/services/logger_service.hpp
index 9ec99d93419..d0beaf1d6c2 100644
--- a/3rdparty/asio/src/examples/cpp03/services/logger_service.hpp
+++ b/3rdparty/asio/src/examples/cpp11/services/logger_service.hpp
@@ -2,7 +2,7 @@
// logger_service.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,13 +12,11 @@
#define SERVICES_LOGGER_SERVICE_HPP
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <functional>
#include <fstream>
#include <sstream>
#include <string>
+#include <thread>
namespace services {
@@ -44,21 +42,22 @@ public:
logger_service(asio::execution_context& context)
: asio::execution_context::service(context),
work_io_context_(),
- work_(asio::require(work_io_context_.get_executor(),
- asio::execution::outstanding_work.tracked)),
- work_thread_(new asio::thread(
- boost::bind(&asio::io_context::run, &work_io_context_)))
+ work_(asio::make_work_guard(work_io_context_)),
+ work_thread_([this]{ work_io_context_.run(); })
{
}
+ logger_service(const logger_service&) = delete;
+ logger_service& operator=(const logger_service&) = delete;;
+
/// Destructor shuts down the private io_context.
~logger_service()
{
/// Indicate that we have finished with the private io_context. Its
/// io_context::run() function will exit once all other work has completed.
- work_ = asio::any_io_executor();
- if (work_thread_)
- work_thread_->join();
+ work_.reset();
+ if (work_thread_.joinable())
+ work_thread_.join();
}
/// Destroy all user-defined handler objects owned by the service.
@@ -92,8 +91,8 @@ public:
void use_file(impl_type& /*impl*/, const std::string& file)
{
// Pass the work of opening the file to the background thread.
- asio::post(work_io_context_, boost::bind(
- &logger_service::use_file_impl, this, file));
+ asio::post(work_io_context_,
+ std::bind(&logger_service::use_file_impl, this, file));
}
/// Log a message.
@@ -104,8 +103,8 @@ public:
os << impl->identifier << ": " << message;
// Pass the work of writing to the file to the background thread.
- asio::post(work_io_context_, boost::bind(
- &logger_service::log_impl, this, os.str()));
+ asio::post(work_io_context_,
+ std::bind(&logger_service::log_impl, this, os.str()));
}
private:
@@ -128,13 +127,14 @@ private:
/// Private io_context used for performing logging operations.
asio::io_context work_io_context_;
- /// A work-tracking executor giving work for the private io_context to
- /// perform. If we do not give the io_context some work to do then the
- /// io_context::run() function will exit immediately.
- asio::any_io_executor work_;
+ /// Work for the private io_context to perform. If we do not give the
+ /// io_context some work to do then the io_context::run() function will exit
+ /// immediately.
+ asio::executor_work_guard<
+ asio::io_context::executor_type> work_;
/// Thread used for running the work io_context's run loop.
- boost::scoped_ptr<asio::thread> work_thread_;
+ std::thread work_thread_;
/// The file to which log messages will be written.
std::ofstream ofstream_;
diff --git a/3rdparty/asio/src/examples/cpp11/socks4/socks4.hpp b/3rdparty/asio/src/examples/cpp11/socks4/socks4.hpp
index 4287b3f1948..ed7994021fc 100644
--- a/3rdparty/asio/src/examples/cpp11/socks4/socks4.hpp
+++ b/3rdparty/asio/src/examples/cpp11/socks4/socks4.hpp
@@ -2,7 +2,7 @@
// socks4.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -39,7 +39,7 @@ public:
// Only IPv4 is supported by the SOCKS 4 protocol.
if (endpoint.protocol() != asio::ip::tcp::v4())
{
- throw asio::system_error(
+ throw std::system_error(
asio::error::address_family_not_supported);
}
diff --git a/3rdparty/asio/src/examples/cpp11/socks4/sync_client.cpp b/3rdparty/asio/src/examples/cpp11/socks4/sync_client.cpp
index e0d20992fe2..f661aca8da5 100644
--- a/3rdparty/asio/src/examples/cpp11/socks4/sync_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/socks4/sync_client.cpp
@@ -2,7 +2,7 @@
// sync_client.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/spawn/echo_server.cpp b/3rdparty/asio/src/examples/cpp11/spawn/echo_server.cpp
index 95adffd604e..ae949d60bef 100644
--- a/3rdparty/asio/src/examples/cpp11/spawn/echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/spawn/echo_server.cpp
@@ -2,12 +2,13 @@
// echo_server.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <asio/detached.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/spawn.hpp>
@@ -39,7 +40,7 @@ public:
char data[128];
for (;;)
{
- timer_.expires_from_now(std::chrono::seconds(10));
+ timer_.expires_after(std::chrono::seconds(10));
std::size_t n = socket_.async_read_some(asio::buffer(data), yield);
asio::async_write(socket_, asio::buffer(data, n), yield);
}
@@ -49,19 +50,19 @@ public:
socket_.close();
timer_.cancel();
}
- });
+ }, asio::detached);
asio::spawn(strand_,
[this, self](asio::yield_context yield)
{
while (socket_.is_open())
{
- asio::error_code ignored_ec;
+ std::error_code ignored_ec;
timer_.async_wait(yield[ignored_ec]);
- if (timer_.expires_from_now() <= std::chrono::seconds(0))
+ if (timer_.expiry() <= asio::steady_timer::clock_type::now())
socket_.close();
}
- });
+ }, asio::detached);
}
private:
@@ -90,7 +91,7 @@ int main(int argc, char* argv[])
for (;;)
{
- asio::error_code ec;
+ std::error_code ec;
tcp::socket socket(io_context);
acceptor.async_accept(socket, yield[ec]);
if (!ec)
@@ -98,6 +99,11 @@ int main(int argc, char* argv[])
std::make_shared<session>(io_context, std::move(socket))->go();
}
}
+ },
+ [](std::exception_ptr e)
+ {
+ if (e)
+ std::rethrow_exception(e);
});
io_context.run();
diff --git a/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp b/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp
index fc2c6ecd1c2..f4a5b1136dc 100644
--- a/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp
+++ b/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp
@@ -2,12 +2,13 @@
// parallel_grep.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <asio/detached.hpp>
#include <asio/dispatch.hpp>
#include <asio/post.hpp>
#include <asio/spawn.hpp>
@@ -17,6 +18,7 @@
#include <iostream>
#include <string>
+using asio::detached;
using asio::dispatch;
using asio::spawn;
using asio::strand;
@@ -69,7 +71,7 @@ int main(int argc, char* argv[])
if (++line_num % 10 == 0)
post(yield);
}
- });
+ }, detached);
}
// Join the thread pool to wait for all the spawned tasks to complete.
diff --git a/3rdparty/asio/src/examples/cpp03/ssl/README b/3rdparty/asio/src/examples/cpp11/ssl/README
index b04fc30c559..8304d0603b6 100644
--- a/3rdparty/asio/src/examples/cpp03/ssl/README
+++ b/3rdparty/asio/src/examples/cpp11/ssl/README
@@ -2,7 +2,7 @@ The passphrase for both the CA and server private keys is "test".
-------------------------------------------------------------------------------
-Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+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)
diff --git a/3rdparty/asio/src/examples/cpp11/ssl/ca.pem b/3rdparty/asio/src/examples/cpp11/ssl/ca.pem
new file mode 100644
index 00000000000..4580bc11bcf
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/ssl/ca.pem
@@ -0,0 +1,50 @@
+-----BEGIN CERTIFICATE-----
+MIIDVDCCAjygAwIBAgIUX3cVQ47QyJp7SOy0RPzP743W9MwwDQYJKoZIhvcNAQEL
+BQAwOzELMAkGA1UEBhMCQVUxDDAKBgNVBAgMA05TVzEPMA0GA1UEBwwGU3lkbmV5
+MQ0wCwYDVQQKDARhc2lvMB4XDTIxMTExMTIxMTA1MloXDTI2MTExMDIxMTA1Mlow
+OzELMAkGA1UEBhMCQVUxDDAKBgNVBAgMA05TVzEPMA0GA1UEBwwGU3lkbmV5MQ0w
+CwYDVQQKDARhc2lvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyURD
+LjKxTCkapmWhY0bP1NaaOPzIJTTB0dzREOlmRmBmiHpW7DaRx7qBm6jYDKQ7OCbz
+30/j8K4TjHOLIwxzXhXMYTJOcN2giPHNUBvm9oEuDAhYgltArJQnBBEH+3C1hCIv
+1+uhTWo0HpGXTeJnvboTZ1YgmbOgr6lMhNiu9QmPX885DxWf6sDq8mRgCDX2x8sk
+Ls0HuLSo88Osjx532yEhnrZgexsByhoRD3yrKHV5mWpaunk5BMsP/XMuQHayFmbO
+siqnHJoL1znGVH003PcBGmEDmoIUqhLiBi2gWGu1pmckP9loqQUTEn0aLOVclHf4
+slWq344zh4tJCpQMfQIDAQABo1AwTjAdBgNVHQ4EFgQUfiX1CMQrGDi9mIBAg9cg
+m0RwLJUwHwYDVR0jBBgwFoAUfiX1CMQrGDi9mIBAg9cgm0RwLJUwDAYDVR0TBAUw
+AwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAnDnVNSb8z/pNFaZ6YAZ+ukfNT3jjbGm1
+10BOLqJj8s5A8/JkwjaWhky/DuGXDywgEvzXC18aNAxASeqO8h9pAZtszu6NWB4s
+h3r+dEQakMacxrZ+jBL/cYLrUv9r3KMPKxaDnplkamqFA/9eNmoV7vDyGtGPZuD6
+oTROtQqqDSrxthCkqnibAfusi7RmlCdvJa0kVK7krKJZAhi8W9f32+lBPv9oq3Ns
+dAxnOj/D3UnhNoIt0EdjqUdLo2U39dt5s5Syj2rFUAgfbc02Rwx65kq8AjTRlW/M
+KDpGsifwIB8b7wActMUO8c3GptptNVWmFm5+Mmk54P//P3tIAx9KXw==
+-----END CERTIFICATE-----
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIPcVUeQ7ZElgCAggA
+MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECGKlFVN6/gIlBIIEyJPeknsA5dvV
+WK27AZzs4wM6WrsD6ba+kPJyZTpon5pn4eoTiw4UCvo7C+21G9jCqbIbDrgTWHwH
+zu6YrBFTZgRUpdLkLsyUsp4UJrZ8xJ7N/jWlG763CyluFE5oBFLz2Vt/DSDSaWdA
+sKdxua/1kvw+KYoDqlObMFIspM5TrndcMnWkOgyvQAvnH0NZXFFBa4QGFrwWDrCo
+m12CzMLwaPMrNFBffCTqZnL1AajT+EYqPTi+cQ5mkRpZ2cuzhdug2eki1KkD12ZN
+3d8Ehl8bfbLEqRE/HnggleRRt7ia1xkzruqQp14JA2UsrioGMF5nvWgWrbyHfpui
+KrCsDwDelrArW/GCki53QBQMuH8Q1YmoNrRZwlG257eA1LiJvmxRyIjKYu0RP+Q8
+EOldycy51VsPVPApUbv9r4IJldrIJiwlmRxxM36uKtFhfojnsWzJORDYI8C37uKi
+UEPiD4GSEH6C0lGO94IoZPjl9z/rZ0qZx1VRHl3nxZc0AQvvj9bWMbyRwsgb6wod
+P8JSy6uEib9UxuenNHzTd48GcNhJbhOqd4IV0XKhi8W1Kil3mMdc3QAwKaLTx12/
+1GrbMui061uyeM6Rf6Xao0PApDnUNmxcFSTsoarG0yH7Q0WZMgKTDCCGhhtZKlE6
+x7pRsnxiFaIpoh32EVIRI+ZXh2rXBcwa2ew0aEccRXtPFvcmdjevkrHuCggc+M+Y
+seFqTHVGWf8eS6o08w095DboD0vFpZXZMRfycTbA7BiE4NYE/uc7v5cH3Ax9l2ef
+zG7o9idDt+/RX7OcetxDFw4eQbq7PfjvrfXS1DcRUEyJ04emh7oxlkAUUNsFtabN
+T0ggvHxcQWkYRE5oPlkbgpwKpK4LDcApXKFwCDKPur2W5Q7KHRfDLtSvZvYarJum
+8j2pGpEis/bdTih29ofNsX6a0Yo5Tlj+9+1c/6/Xi7XvRk/Vbgkoa3iVQ3ckdCuZ
+vO7cRYZBBs6W/Ti3hWFzPEX9FfcnSUp9bEnH4ASnmUcp8PDBJYeaI6HqpO3XbkbF
+l70eDNakd2cDNjQzkFpBT7HO+HtqU3xNt9K0z2gMB7iTDVFyIzh26joCR2O8tiqS
+wUJFkoLPb74GSB7WzE+gb4jXX6n9609PUoR3f896mM34uX3CsY8lA+/0ZGpHnFDA
+ToKdmz6WKIAw0E20nyzLuLwPZgj7HLcR7zza4raipe9QxIdyJr5O+jzGt+OjSM9b
+K1agibRE5DChqQ+P+ikOc6nG7UNyn+lKSjGEbwuzi8F0iugMgcTc/vYO8OWDNGpd
+D1euA5OuVPdfatFa16Fyr4MJJIfE83C4/kSj05fdoyb6pJkOjHhUppVMe+ES5kwl
+YI8RES2XVJzUSxnWsIM613YlMgIZ9xgcuIADnO7gaKJ4RQG+9wJ853Uo4+n89K7F
+Y6KzihuYAUkbAw1pPo1TODom7A/gB9stqRUSQlZWmIgtnJ8wPjt/we0gzPM8LQzb
+ye4KOLjH5iquFc4MU4TtN3gvp9P5R9UFrGeMImS5eMUmBQHckDNdIAtMj7M1wUpR
+JVrzDXWDjC21sLn95NtNMPb+FRlt/biTV3IE3ZmX0kbuCRoH7b7hhR41Zpoajwl0
+FqYigB5gnVodGUWuBgDUqA==
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/3rdparty/asio/src/examples/cpp11/ssl/client.cpp b/3rdparty/asio/src/examples/cpp11/ssl/client.cpp
index 0ff7b00d0fd..6799d2a98e1 100644
--- a/3rdparty/asio/src/examples/cpp11/ssl/client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/ssl/client.cpp
@@ -2,7 +2,7 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/ssl/dh4096.pem b/3rdparty/asio/src/examples/cpp11/ssl/dh4096.pem
new file mode 100644
index 00000000000..dc2559c5f82
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/ssl/dh4096.pem
@@ -0,0 +1,25 @@
+-----BEGIN X9.42 DH PARAMETERS-----
+MIIELQKCAgEA8eEBgatlTk0QKIwUqHsteHJXzEr0xAW7RLeNid8DdGjTnFw68eV+
+s1YbipEqQVTFG+VZPaof9v0CH2KOdbgWD0KRPC49HB8O/wARFKpy5eJltVe1r07w
++V1Vjciqkh/vGq/yFQsbqwyWJy6AelsbHdSC9Bg9pmu4+pbVGW15zK7PkfjfoO9V
+JYbhdqFIPg+9NRRWsl/U9UoyeeIGImI9I4k3fqtv311C6VVErFZylCj7nn45L7IY
+GfPcCO5E8FD6EqBv5WnhMNYHMJu9brRvOoAyAyWprqR+aVzHd+DFamDQdsuQjKTk
+3+r07znWJfjp6FVTzR5SvjrKg1knK5TibIksoKOlsFZ06bGkFWHjqXNAKhnSpCiU
+GJd0qe7pTD+TGQJGWskJpoph+tkICUa+6MyzP9+U6T9hISIY/BpVuWn/iwdLqsvV
+s5bg2RjRraww/4Rjm0NyEOTk2MxaLB9gcyu6zcrhX5XRiMgt+jhKwEMwJCEJYkxn
+C0yv08A5v6RceFm1jY+8FT0IzRqsWIGV7beNdqtE0B4LBTuN1yQ6x8CKEb6mbIHG
+d0XLGppELhD8QUwAr5HiVGTAsS9JlMGgXVkyDtxrVSeS1zHWt77skRQ9UlfJfYMm
+5wxHj5QCdQ7ma3oMMZBZutNlkevMzYHIxwqhZstf4ud0j0VMftwZ3GMCggIBAJL7
+cU6/YSxzYDGUcPc6WGT+FAghR0LdhT3Q3Xz1rQRBwSSMPm9NZhyJC3fb+hBl/44X
+AHOu1/3dYIWlXPMuHZZdtlt+hkD/sIob16By20Z0p81Kvh3HQglVDJGlFzTmQbTd
+CM/EP8eJFiNeMcJB0RgeKyzikRsV4r/acZZM56swTlsRvSDFMh3v9YyYTZbCTwxm
+PIVOsxI8uBoWRCzY3yWzjmlZ2u5TR+Z0IVonmNqk6XAKRgxV12YfQVXzzpPZQA9S
+GHoD/NQoMdBAi3p4pLEYJ5qMRLYPQbBfSNu5eP9e5uZOiBp/28bVnzEelDGuFupr
+lvywkZEVL1KaYtZ/dGkPFXt+A7mNsw5xeDTRjgL4uUJvCNIkjgVEfIrLdUf5IVsU
+V8BgunAvgfH+Hy6Tx89v/QGsUWJPhjkSZnXwJ7Ipcsm+Zg0zAZwKDZEQtDLXVPRL
+OfCfXMXvlw2u6OHlhSbqO69zZG3dJTlcnjy06n4JYcUim7Mj3Kduige6VWofeEk9
+M/kHrPqNdFE5tHLh2nHcw9yExKHN+l/OUGAvNDfOVS+S+fNSKT0RfC9dMpHLN+Ok
+fGuskGzLQAVYF+DYEcnJ++0LEFtd0J381ndSc0iJuH60rKDTqxoRqv7lcdwLFlEV
+sQSRoas8s+y+b3FfSu7j0p44qLG9oxZ/WFcWnuUyAiEAjvAD9p3bw8AH0s7dUrX/
+RT1Ge+J/n0tlsgw+LY3zafE=
+-----END X9.42 DH PARAMETERS-----
diff --git a/3rdparty/asio/src/examples/cpp11/ssl/server.cpp b/3rdparty/asio/src/examples/cpp11/ssl/server.cpp
index 26ef44a31a5..15e0d9eaf03 100644
--- a/3rdparty/asio/src/examples/cpp11/ssl/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/ssl/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -88,7 +88,7 @@ public:
context_.set_password_callback(std::bind(&server::get_password, this));
context_.use_certificate_chain_file("server.pem");
context_.use_private_key_file("server.pem", asio::ssl::context::pem);
- context_.use_tmp_dh_file("dh2048.pem");
+ context_.use_tmp_dh_file("dh4096.pem");
do_accept();
}
diff --git a/3rdparty/asio/src/examples/cpp11/ssl/server.pem b/3rdparty/asio/src/examples/cpp11/ssl/server.pem
new file mode 100644
index 00000000000..a7bcba738a0
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/ssl/server.pem
@@ -0,0 +1,99 @@
+-----BEGIN CERTIFICATE-----
+MIIDDjCCAfYCFGGcJXlIeQHiq/qOakbISU5cihPvMA0GCSqGSIb3DQEBCwUAMDsx
+CzAJBgNVBAYTAkFVMQwwCgYDVQQIDANOU1cxDzANBgNVBAcMBlN5ZG5leTENMAsG
+A1UECgwEYXNpbzAeFw0yMTExMTEyMTExNDRaFw0yNjExMTAyMTExNDRaMEwxCzAJ
+BgNVBAYTAkFVMQwwCgYDVQQIDANOU1cxDzANBgNVBAcMBlN5ZG5leTENMAsGA1UE
+CgwEYXNpbzEPMA0GA1UECwwGc2VydmVyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAu67TzZCFNTZ5c1gKwXfdTH3bP0OB5n6dqXGK6jkPb699dyM4oPtY
+2f+OyxJspk8D5pX6HuZ+hLGAsHxfCN+A3RegVZJCR/gXrrMPl/6PfDxtkeFXWy+6
+NAPxqppMj8gbX/czTdNFwgW4J8/RLyH53utjAGQtCRr97EbBOsTSeOmyAxbw4mRt
+EvHjacKFcSZzJDlyxCia37791MulZ4lwOZZlke5NzoOqkBIAusQgg7fMWDvH27PD
+T+taIyBsYTVJWHf5kMklAlWYXZvNjZp/QGt13lDORg2aSc/P2pE4iLyhbZcpuW+W
+nHB7IY1wjDL55/ORCjz3VlNIAMXHP5YQxwIDAQABMA0GCSqGSIb3DQEBCwUAA4IB
+AQC3iiwQTgDP4ixulisYIGlJb8iuhxH9G41hm8dF/1qlIfXWxsbjb+g7M5U/3JCb
+fwCGoz7uBdj/CKkIb5wx83GVC1yVLbNSvCIS827qxic4GACEYGGAy4Ub5tUCQrLr
+JUQTP1WVJcgiKvk7OAcXdA+k/CcNXH153gUPDZz+/BedXe2VbM6LDsqPeSxXfbZN
+AWXARAuly7cQk/xkYkPldRRhx4htNCbnkG1qyEqNcYQN1SY9Qhbrm2HkAUntzQ7G
+umo4JdbIX6MJ5fYNs+yN/lJB7PiJP8Mz1AtOz4x9JxcLyuB6sapT8Tj53n9g/+m1
+Tqd8lHpWe6oM0sgdWfzdBNir
+-----END CERTIFICATE-----
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,9E0E6B9970E055F1
+
+oFvN3t50B2TSeNsRo1vwhVYlMmt0w3MD3Ar75fti4fRhBrWoH4rBPrSouWK4OMDK
+CakfVhzJIEvaMav843grS4V+ooAsfnAtiQiQj+5xjZ8PlCuWir5gyjgqeN4zN6ZT
+2s/oEy5Kx7Ru5AWMkv+NPW5l3iS3c+Hupfb/auITwECSCCsCBxgNtJ8z0iXjv9Dr
+hqvqcI+4F5DSiol3QhitbpQ/k2PKu92AZhPcr9e5HrqeUD7aqfX2q3i+tnJvxC93
+0mvy133bX2ZAGAKMheW/GuzcETfwU80wvmrwHXI9rnuAUaJhrDiIZQ79gubZ0Pcm
+w4Y6Z5xxeErb7zKBi+pHKst8MJ7rfSz/N878su6cpESRC/w1paVX7m8/q61kzBkj
++h2qe9DupXBejQkriN+Z858nFtBKbWlFsmAg1FLZonworTUfV2c7S9yzMV/29VOE
+T0Bt8BU1Hp+bCjreF4JGbnUJnRQoASpisfUkrD6Ar4GI56Edkkx6hkF0cXdcvfCN
+qyhxzcvf/aV1M2kcpBRX9mIfjoFMFNz7uRIxyqPLaDkigwJemoaBo3n9/W5F7N7B
+AGNEZ3QhUlc8EyWpGRZRzMevu5wdz1b2+MqItOhPXUo2XcLEj2iFkVDdbj/d9jQH
+9ZIe4hQTSf784tAzt2Jp2RHmm22390GB1jdzG/CzbGlAKmaTTEe4FJcd/eLOEZuD
+4+iFsEb/bWcCyXkBKkdEoDDMJW8xi5d/1ezJM03nqhvkekDqyhJUJPCbmY1SCX1X
+4AO40jJmWQxwj26Pnnncacz4tuecZNqovz+POpKQSIctrQSV4wgf35137KBt7/O7
+EU0N7Qj4xTigyGkEHCZt7BgD8fFrxiP1OkUmFRHEE7Dxiagz6omJV8ien+p9wIgS
+QcqkJlgKMwVepjuCuEyvg5oIkAPvp24yhePSJkEvvoDLvM2Kub/CM+UkN8dSgsZk
++ZBE9Oi62AWWow8/ib8Um5DNIEZsq+5CQLeBG7f5kTIBAoA9UceaEgbxzOVUCBcX
+L7QsJ3pZ/ei1qx/9tChO/OXa9tleXcjGg7/q/6i6pUyZuqZlt+hk+3HtFmTXIjsM
+chbUSMEJ2isv9MDamTtunt9N92A6OxUkAs68kCO/bzotldXMKZVjOohNnML5q/3U
+vpsuN8NNwaNHCAM7pjols4V7ebX1lDZFR1hbj+szKMhVKzFfig1lRHafgRrR6H6P
+mUK16lKzUbmvwv2IU/3wck+4UNeB/+lRmfAfBasQytnbt+5fwwNkVSrDY2Kxe0nz
+2k3eIYST+ygxGuNrW9rnFbBpTJb0OE5cpgun8xxDE91AmL550AcZff+9ulDBhZg1
+eMoKUALlEdDNPffVTH8Iupn0jMnJsjXynztcEVhx4h2aA5X6/2i035uEybCn33qP
+J7g30oe2C69BSC0YmkT3MjF6Wrhy+M8dU0dDggRhY6JSS8wESvwGenaPi7SZlbxb
+Elmc44bHros1YfGl/xDdhju134/aMBG1GlZlReI+Rwnp9DCp04xiiJb9YKyUNaGY
+7BTGWyie/WYYKbX1ZlxqWA9jxow8PM1XYHuanau1/aYT16L7E83HG3qkyuFIlLJh
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIIDVDCCAjygAwIBAgIUX3cVQ47QyJp7SOy0RPzP743W9MwwDQYJKoZIhvcNAQEL
+BQAwOzELMAkGA1UEBhMCQVUxDDAKBgNVBAgMA05TVzEPMA0GA1UEBwwGU3lkbmV5
+MQ0wCwYDVQQKDARhc2lvMB4XDTIxMTExMTIxMTA1MloXDTI2MTExMDIxMTA1Mlow
+OzELMAkGA1UEBhMCQVUxDDAKBgNVBAgMA05TVzEPMA0GA1UEBwwGU3lkbmV5MQ0w
+CwYDVQQKDARhc2lvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyURD
+LjKxTCkapmWhY0bP1NaaOPzIJTTB0dzREOlmRmBmiHpW7DaRx7qBm6jYDKQ7OCbz
+30/j8K4TjHOLIwxzXhXMYTJOcN2giPHNUBvm9oEuDAhYgltArJQnBBEH+3C1hCIv
+1+uhTWo0HpGXTeJnvboTZ1YgmbOgr6lMhNiu9QmPX885DxWf6sDq8mRgCDX2x8sk
+Ls0HuLSo88Osjx532yEhnrZgexsByhoRD3yrKHV5mWpaunk5BMsP/XMuQHayFmbO
+siqnHJoL1znGVH003PcBGmEDmoIUqhLiBi2gWGu1pmckP9loqQUTEn0aLOVclHf4
+slWq344zh4tJCpQMfQIDAQABo1AwTjAdBgNVHQ4EFgQUfiX1CMQrGDi9mIBAg9cg
+m0RwLJUwHwYDVR0jBBgwFoAUfiX1CMQrGDi9mIBAg9cgm0RwLJUwDAYDVR0TBAUw
+AwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAnDnVNSb8z/pNFaZ6YAZ+ukfNT3jjbGm1
+10BOLqJj8s5A8/JkwjaWhky/DuGXDywgEvzXC18aNAxASeqO8h9pAZtszu6NWB4s
+h3r+dEQakMacxrZ+jBL/cYLrUv9r3KMPKxaDnplkamqFA/9eNmoV7vDyGtGPZuD6
+oTROtQqqDSrxthCkqnibAfusi7RmlCdvJa0kVK7krKJZAhi8W9f32+lBPv9oq3Ns
+dAxnOj/D3UnhNoIt0EdjqUdLo2U39dt5s5Syj2rFUAgfbc02Rwx65kq8AjTRlW/M
+KDpGsifwIB8b7wActMUO8c3GptptNVWmFm5+Mmk54P//P3tIAx9KXw==
+-----END CERTIFICATE-----
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIPcVUeQ7ZElgCAggA
+MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECGKlFVN6/gIlBIIEyJPeknsA5dvV
+WK27AZzs4wM6WrsD6ba+kPJyZTpon5pn4eoTiw4UCvo7C+21G9jCqbIbDrgTWHwH
+zu6YrBFTZgRUpdLkLsyUsp4UJrZ8xJ7N/jWlG763CyluFE5oBFLz2Vt/DSDSaWdA
+sKdxua/1kvw+KYoDqlObMFIspM5TrndcMnWkOgyvQAvnH0NZXFFBa4QGFrwWDrCo
+m12CzMLwaPMrNFBffCTqZnL1AajT+EYqPTi+cQ5mkRpZ2cuzhdug2eki1KkD12ZN
+3d8Ehl8bfbLEqRE/HnggleRRt7ia1xkzruqQp14JA2UsrioGMF5nvWgWrbyHfpui
+KrCsDwDelrArW/GCki53QBQMuH8Q1YmoNrRZwlG257eA1LiJvmxRyIjKYu0RP+Q8
+EOldycy51VsPVPApUbv9r4IJldrIJiwlmRxxM36uKtFhfojnsWzJORDYI8C37uKi
+UEPiD4GSEH6C0lGO94IoZPjl9z/rZ0qZx1VRHl3nxZc0AQvvj9bWMbyRwsgb6wod
+P8JSy6uEib9UxuenNHzTd48GcNhJbhOqd4IV0XKhi8W1Kil3mMdc3QAwKaLTx12/
+1GrbMui061uyeM6Rf6Xao0PApDnUNmxcFSTsoarG0yH7Q0WZMgKTDCCGhhtZKlE6
+x7pRsnxiFaIpoh32EVIRI+ZXh2rXBcwa2ew0aEccRXtPFvcmdjevkrHuCggc+M+Y
+seFqTHVGWf8eS6o08w095DboD0vFpZXZMRfycTbA7BiE4NYE/uc7v5cH3Ax9l2ef
+zG7o9idDt+/RX7OcetxDFw4eQbq7PfjvrfXS1DcRUEyJ04emh7oxlkAUUNsFtabN
+T0ggvHxcQWkYRE5oPlkbgpwKpK4LDcApXKFwCDKPur2W5Q7KHRfDLtSvZvYarJum
+8j2pGpEis/bdTih29ofNsX6a0Yo5Tlj+9+1c/6/Xi7XvRk/Vbgkoa3iVQ3ckdCuZ
+vO7cRYZBBs6W/Ti3hWFzPEX9FfcnSUp9bEnH4ASnmUcp8PDBJYeaI6HqpO3XbkbF
+l70eDNakd2cDNjQzkFpBT7HO+HtqU3xNt9K0z2gMB7iTDVFyIzh26joCR2O8tiqS
+wUJFkoLPb74GSB7WzE+gb4jXX6n9609PUoR3f896mM34uX3CsY8lA+/0ZGpHnFDA
+ToKdmz6WKIAw0E20nyzLuLwPZgj7HLcR7zza4raipe9QxIdyJr5O+jzGt+OjSM9b
+K1agibRE5DChqQ+P+ikOc6nG7UNyn+lKSjGEbwuzi8F0iugMgcTc/vYO8OWDNGpd
+D1euA5OuVPdfatFa16Fyr4MJJIfE83C4/kSj05fdoyb6pJkOjHhUppVMe+ES5kwl
+YI8RES2XVJzUSxnWsIM613YlMgIZ9xgcuIADnO7gaKJ4RQG+9wJ853Uo4+n89K7F
+Y6KzihuYAUkbAw1pPo1TODom7A/gB9stqRUSQlZWmIgtnJ8wPjt/we0gzPM8LQzb
+ye4KOLjH5iquFc4MU4TtN3gvp9P5R9UFrGeMImS5eMUmBQHckDNdIAtMj7M1wUpR
+JVrzDXWDjC21sLn95NtNMPb+FRlt/biTV3IE3ZmX0kbuCRoH7b7hhR41Zpoajwl0
+FqYigB5gnVodGUWuBgDUqA==
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/3rdparty/asio/src/examples/cpp11/timeouts/async_tcp_client.cpp b/3rdparty/asio/src/examples/cpp11/timeouts/async_tcp_client.cpp
index 9ded9309f60..b8f2cbe77d2 100644
--- a/3rdparty/asio/src/examples/cpp11/timeouts/async_tcp_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/timeouts/async_tcp_client.cpp
@@ -2,7 +2,7 @@
// async_tcp_client.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/timeouts/blocking_tcp_client.cpp b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_tcp_client.cpp
index 96b7b52a074..e29edc2895f 100644
--- a/3rdparty/asio/src/examples/cpp11/timeouts/blocking_tcp_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_tcp_client.cpp
@@ -2,7 +2,7 @@
// blocking_tcp_client.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/timeouts/blocking_token_tcp_client.cpp b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_token_tcp_client.cpp
index 6379642665a..085570d8b78 100644
--- a/3rdparty/asio/src/examples/cpp11/timeouts/blocking_token_tcp_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_token_tcp_client.cpp
@@ -2,7 +2,7 @@
// blocking_token_tcp_client.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -22,6 +22,10 @@
using asio::ip::tcp;
+// NOTE: This example uses the new form of the asio::async_result trait.
+// For an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
// We will use our sockets only with an io_context.
using tcp_socket = asio::basic_stream_socket<
tcp, asio::io_context::executor_type>;
@@ -54,51 +58,26 @@ template <typename T>
class async_result<close_after, void(std::error_code, T)>
{
public:
- // An asynchronous operation's initiating function automatically creates an
- // completion_handler_type object from the token. This function object is
- // then called on completion of the asynchronous operation.
- class completion_handler_type
- {
- public:
- completion_handler_type(const close_after& token)
- : token_(token)
- {
- }
-
- void operator()(const std::error_code& error, T t)
- {
- *error_ = error;
- *t_ = t;
- }
-
- private:
- friend class async_result;
- close_after token_;
- std::error_code* error_;
- T* t_;
- };
-
- // The async_result constructor associates the completion handler object with
- // the result of the initiating function.
- explicit async_result(completion_handler_type& h)
- : timeout_(h.token_.timeout_),
- socket_(h.token_.socket_)
- {
- h.error_ = &error_;
- h.t_ = &t_;
- }
-
- // The return_type typedef determines the result type of the asynchronous
- // operation's initiating function.
- typedef T return_type;
-
- // The get() function is used to obtain the result of the asynchronous
- // operation's initiating function. For the close_after completion token, we
- // use this function to run the io_context until the operation is complete.
- return_type get()
+ // The initiate() function is used to launch the asynchronous operation by
+ // calling the operation's initiation function object. For the close_after
+ // completion token, we use this function to run the io_context until the
+ // operation is complete.
+ template <typename Init, typename... Args>
+ static T initiate(Init init, close_after token, Args&&... args)
{
asio::io_context& io_context = asio::query(
- socket_.get_executor(), asio::execution::context);
+ token.socket_.get_executor(), asio::execution::context);
+
+ // Call the operation's initiation function object to start the operation.
+ // A lambda is supplied as the completion handler, to be called when the
+ // operation completes.
+ std::error_code error;
+ T result;
+ init([&](std::error_code e, T t)
+ {
+ error = e;
+ result = t;
+ }, std::forward<Args>(args)...);
// Restart the io_context, as it may have been left in the "stopped" state
// by a previous operation.
@@ -108,7 +87,7 @@ public:
// the pending asynchronous operation is a composed operation, the deadline
// applies to the entire operation, rather than individual operations on
// the socket.
- io_context.run_for(timeout_);
+ io_context.run_for(token.timeout_);
// If the asynchronous operation completed successfully then the io_context
// would have been stopped due to running out of work. If it was not
@@ -117,21 +96,15 @@ public:
if (!io_context.stopped())
{
// Close the socket to cancel the outstanding asynchronous operation.
- socket_.close();
+ token.socket_.close();
// Run the io_context again until the operation completes.
io_context.run();
}
// If the operation failed, throw an exception. Otherwise return the result.
- return error_ ? throw std::system_error(error_) : t_;
+ return error ? throw std::system_error(error) : result;
}
-
-private:
- std::chrono::steady_clock::duration timeout_;
- tcp_socket& socket_;
- std::error_code error_;
- T t_;
};
} // namespace asio
diff --git a/3rdparty/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp
index 01eece472f4..312f21ab656 100644
--- a/3rdparty/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/timeouts/blocking_udp_client.cpp
@@ -2,7 +2,7 @@
// blocking_udp_client.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/timeouts/server.cpp b/3rdparty/asio/src/examples/cpp11/timeouts/server.cpp
index ac1f37f140f..6e18fc60c2b 100644
--- a/3rdparty/asio/src/examples/cpp11/timeouts/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/timeouts/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp11/timers/time_t_timer.cpp b/3rdparty/asio/src/examples/cpp11/timers/time_t_timer.cpp
index 764ca586d1b..bca436d31e7 100644
--- a/3rdparty/asio/src/examples/cpp11/timers/time_t_timer.cpp
+++ b/3rdparty/asio/src/examples/cpp11/timers/time_t_timer.cpp
@@ -2,7 +2,7 @@
// time_t_timer.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime1/client.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime1/client.cpp
index 292a05ef039..9d927759f5c 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime1/client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime1/client.cpp
@@ -2,14 +2,14 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <array>
#include <iostream>
-#include <boost/array.hpp>
#include <asio.hpp>
using asio::ip::tcp;
@@ -35,15 +35,15 @@ int main(int argc, char* argv[])
for (;;)
{
- boost::array<char, 128> buf;
- asio::error_code error;
+ std::array<char, 128> buf;
+ std::error_code error;
size_t len = socket.read_some(asio::buffer(buf), error);
if (error == asio::error::eof)
break; // Connection closed cleanly by peer.
else if (error)
- throw asio::system_error(error); // Some other error.
+ throw std::system_error(error); // Some other error.
std::cout.write(buf.data(), len);
}
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime2/server.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime2/server.cpp
index 16dfa0101a0..971149d6e8d 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime2/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime2/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -37,7 +37,7 @@ int main()
std::string message = make_daytime_string();
- asio::error_code ignored_error;
+ std::error_code ignored_error;
asio::write(socket, asio::buffer(message), ignored_error);
}
}
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime3/server.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime3/server.cpp
index 268401ffc6a..339de72d4a7 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime3/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime3/server.cpp
@@ -2,18 +2,17 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <ctime>
+#include <functional>
#include <iostream>
+#include <memory>
#include <string>
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
#include <asio.hpp>
using asio::ip::tcp;
@@ -26,10 +25,10 @@ std::string make_daytime_string()
}
class tcp_connection
- : public boost::enable_shared_from_this<tcp_connection>
+ : public std::enable_shared_from_this<tcp_connection>
{
public:
- typedef boost::shared_ptr<tcp_connection> pointer;
+ typedef std::shared_ptr<tcp_connection> pointer;
static pointer create(asio::io_context& io_context)
{
@@ -46,7 +45,7 @@ public:
message_ = make_daytime_string();
asio::async_write(socket_, asio::buffer(message_),
- boost::bind(&tcp_connection::handle_write, shared_from_this(),
+ std::bind(&tcp_connection::handle_write, shared_from_this(),
asio::placeholders::error,
asio::placeholders::bytes_transferred));
}
@@ -57,7 +56,7 @@ private:
{
}
- void handle_write(const asio::error_code& /*error*/,
+ void handle_write(const std::error_code& /*error*/,
size_t /*bytes_transferred*/)
{
}
@@ -83,12 +82,12 @@ private:
tcp_connection::create(io_context_);
acceptor_.async_accept(new_connection->socket(),
- boost::bind(&tcp_server::handle_accept, this, new_connection,
+ std::bind(&tcp_server::handle_accept, this, new_connection,
asio::placeholders::error));
}
void handle_accept(tcp_connection::pointer new_connection,
- const asio::error_code& error)
+ const std::error_code& error)
{
if (!error)
{
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime4/client.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime4/client.cpp
index 24a325e0e88..15f3d5d4e98 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime4/client.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime4/client.cpp
@@ -2,14 +2,14 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <array>
#include <iostream>
-#include <boost/array.hpp>
#include <asio.hpp>
using asio::ip::udp;
@@ -33,10 +33,10 @@ int main(int argc, char* argv[])
udp::socket socket(io_context);
socket.open(udp::v4());
- boost::array<char, 1> send_buf = {{ 0 }};
+ std::array<char, 1> send_buf = {{ 0 }};
socket.send_to(asio::buffer(send_buf), receiver_endpoint);
- boost::array<char, 128> recv_buf;
+ std::array<char, 128> recv_buf;
udp::endpoint sender_endpoint;
size_t len = socket.receive_from(
asio::buffer(recv_buf), sender_endpoint);
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime5/server.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime5/server.cpp
index 0634b067ada..f47c9fa713b 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime5/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime5/server.cpp
@@ -2,16 +2,16 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <array>
#include <ctime>
#include <iostream>
#include <string>
-#include <boost/array.hpp>
#include <asio.hpp>
using asio::ip::udp;
@@ -33,13 +33,13 @@ int main()
for (;;)
{
- boost::array<char, 1> recv_buf;
+ std::array<char, 1> recv_buf;
udp::endpoint remote_endpoint;
socket.receive_from(asio::buffer(recv_buf), remote_endpoint);
std::string message = make_daytime_string();
- asio::error_code ignored_error;
+ std::error_code ignored_error;
socket.send_to(asio::buffer(message),
remote_endpoint, 0, ignored_error);
}
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime6/server.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime6/server.cpp
index ccf8b54e41c..42c80795a9e 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime6/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime6/server.cpp
@@ -2,18 +2,18 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <array>
#include <ctime>
+#include <functional>
#include <iostream>
+#include <memory>
#include <string>
-#include <boost/array.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
#include <asio.hpp>
using asio::ip::udp;
@@ -39,21 +39,21 @@ private:
{
socket_.async_receive_from(
asio::buffer(recv_buffer_), remote_endpoint_,
- boost::bind(&udp_server::handle_receive, this,
+ std::bind(&udp_server::handle_receive, this,
asio::placeholders::error,
asio::placeholders::bytes_transferred));
}
- void handle_receive(const asio::error_code& error,
+ void handle_receive(const std::error_code& error,
std::size_t /*bytes_transferred*/)
{
if (!error)
{
- boost::shared_ptr<std::string> message(
+ std::shared_ptr<std::string> message(
new std::string(make_daytime_string()));
socket_.async_send_to(asio::buffer(*message), remote_endpoint_,
- boost::bind(&udp_server::handle_send, this, message,
+ std::bind(&udp_server::handle_send, this, message,
asio::placeholders::error,
asio::placeholders::bytes_transferred));
@@ -61,15 +61,15 @@ private:
}
}
- void handle_send(boost::shared_ptr<std::string> /*message*/,
- const asio::error_code& /*error*/,
+ void handle_send(std::shared_ptr<std::string> /*message*/,
+ const std::error_code& /*error*/,
std::size_t /*bytes_transferred*/)
{
}
udp::socket socket_;
udp::endpoint remote_endpoint_;
- boost::array<char, 1> recv_buffer_;
+ std::array<char, 1> recv_buffer_;
};
int main()
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/daytime7/server.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/daytime7/server.cpp
index 2fec1084dbf..9c9c22edeb2 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/daytime7/server.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/daytime7/server.cpp
@@ -2,19 +2,18 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <array>
#include <ctime>
+#include <functional>
#include <iostream>
+#include <memory>
#include <string>
-#include <boost/array.hpp>
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
#include <asio.hpp>
using asio::ip::tcp;
@@ -28,10 +27,10 @@ std::string make_daytime_string()
}
class tcp_connection
- : public boost::enable_shared_from_this<tcp_connection>
+ : public std::enable_shared_from_this<tcp_connection>
{
public:
- typedef boost::shared_ptr<tcp_connection> pointer;
+ typedef std::shared_ptr<tcp_connection> pointer;
static pointer create(asio::io_context& io_context)
{
@@ -48,7 +47,7 @@ public:
message_ = make_daytime_string();
asio::async_write(socket_, asio::buffer(message_),
- boost::bind(&tcp_connection::handle_write, shared_from_this()));
+ std::bind(&tcp_connection::handle_write, shared_from_this()));
}
private:
@@ -82,12 +81,12 @@ private:
tcp_connection::create(io_context_);
acceptor_.async_accept(new_connection->socket(),
- boost::bind(&tcp_server::handle_accept, this, new_connection,
+ std::bind(&tcp_server::handle_accept, this, new_connection,
asio::placeholders::error));
}
void handle_accept(tcp_connection::pointer new_connection,
- const asio::error_code& error)
+ const std::error_code& error)
{
if (!error)
{
@@ -115,31 +114,31 @@ private:
{
socket_.async_receive_from(
asio::buffer(recv_buffer_), remote_endpoint_,
- boost::bind(&udp_server::handle_receive, this,
+ std::bind(&udp_server::handle_receive, this,
asio::placeholders::error));
}
- void handle_receive(const asio::error_code& error)
+ void handle_receive(const std::error_code& error)
{
if (!error)
{
- boost::shared_ptr<std::string> message(
+ std::shared_ptr<std::string> message(
new std::string(make_daytime_string()));
socket_.async_send_to(asio::buffer(*message), remote_endpoint_,
- boost::bind(&udp_server::handle_send, this, message));
+ std::bind(&udp_server::handle_send, this, message));
start_receive();
}
}
- void handle_send(boost::shared_ptr<std::string> /*message*/)
+ void handle_send(std::shared_ptr<std::string> /*message*/)
{
}
udp::socket socket_;
udp::endpoint remote_endpoint_;
- boost::array<char, 1> recv_buffer_;
+ std::array<char, 1> recv_buffer_;
};
int main()
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer1/timer.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/timer1/timer.cpp
index 35ad17c6496..37577dcb65f 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer1/timer.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/timer1/timer.cpp
@@ -2,7 +2,7 @@
// timer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer2/timer.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/timer2/timer.cpp
index 10f0b528a44..c1620d78fa5 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer2/timer.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/timer2/timer.cpp
@@ -2,7 +2,7 @@
// timer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -11,7 +11,7 @@
#include <iostream>
#include <asio.hpp>
-void print(const asio::error_code& /*e*/)
+void print(const std::error_code& /*e*/)
{
std::cout << "Hello, world!" << std::endl;
}
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer3/timer.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/timer3/timer.cpp
index b2e27b73dc5..990ea069739 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer3/timer.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/timer3/timer.cpp
@@ -2,17 +2,17 @@
// timer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <functional>
#include <iostream>
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
-void print(const asio::error_code& /*e*/,
+void print(const std::error_code& /*e*/,
asio::steady_timer* t, int* count)
{
if (*count < 5)
@@ -21,7 +21,7 @@ void print(const asio::error_code& /*e*/,
++(*count);
t->expires_at(t->expiry() + asio::chrono::seconds(1));
- t->async_wait(boost::bind(print,
+ t->async_wait(std::bind(print,
asio::placeholders::error, t, count));
}
}
@@ -32,7 +32,7 @@ int main()
int count = 0;
asio::steady_timer t(io, asio::chrono::seconds(1));
- t.async_wait(boost::bind(print,
+ t.async_wait(std::bind(print,
asio::placeholders::error, &t, &count));
io.run();
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer4/timer.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/timer4/timer.cpp
index ebc6d0999dd..7bfdd3e43a8 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer4/timer.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/timer4/timer.cpp
@@ -2,15 +2,15 @@
// timer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <functional>
#include <iostream>
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
class printer
{
@@ -19,7 +19,7 @@ public:
: timer_(io, asio::chrono::seconds(1)),
count_(0)
{
- timer_.async_wait(boost::bind(&printer::print, this));
+ timer_.async_wait(std::bind(&printer::print, this));
}
~printer()
@@ -35,7 +35,7 @@ public:
++count_;
timer_.expires_at(timer_.expiry() + asio::chrono::seconds(1));
- timer_.async_wait(boost::bind(&printer::print, this));
+ timer_.async_wait(std::bind(&printer::print, this));
}
}
diff --git a/3rdparty/asio/src/examples/cpp03/tutorial/timer5/timer.cpp b/3rdparty/asio/src/examples/cpp11/tutorial/timer5/timer.cpp
index f17c9d67f94..61830691e7a 100644
--- a/3rdparty/asio/src/examples/cpp03/tutorial/timer5/timer.cpp
+++ b/3rdparty/asio/src/examples/cpp11/tutorial/timer5/timer.cpp
@@ -2,15 +2,16 @@
// timer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <functional>
#include <iostream>
+#include <thread>
#include <asio.hpp>
-#include <boost/bind/bind.hpp>
class printer
{
@@ -22,10 +23,10 @@ public:
count_(0)
{
timer1_.async_wait(asio::bind_executor(strand_,
- boost::bind(&printer::print1, this)));
+ std::bind(&printer::print1, this)));
timer2_.async_wait(asio::bind_executor(strand_,
- boost::bind(&printer::print2, this)));
+ std::bind(&printer::print2, this)));
}
~printer()
@@ -43,7 +44,7 @@ public:
timer1_.expires_at(timer1_.expiry() + asio::chrono::seconds(1));
timer1_.async_wait(asio::bind_executor(strand_,
- boost::bind(&printer::print1, this)));
+ std::bind(&printer::print1, this)));
}
}
@@ -57,7 +58,7 @@ public:
timer2_.expires_at(timer2_.expiry() + asio::chrono::seconds(1));
timer2_.async_wait(asio::bind_executor(strand_,
- boost::bind(&printer::print2, this)));
+ std::bind(&printer::print2, this)));
}
}
@@ -72,7 +73,7 @@ int main()
{
asio::io_context io;
printer p(io);
- asio::thread t(boost::bind(&asio::io_context::run, &io));
+ std::thread t([&]{ io.run(); });
io.run();
t.join();
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/line_reader.hpp b/3rdparty/asio/src/examples/cpp11/type_erasure/line_reader.hpp
new file mode 100644
index 00000000000..87f05486b79
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/line_reader.hpp
@@ -0,0 +1,48 @@
+//
+// line_reader.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 LINE_READER_HPP
+#define LINE_READER_HPP
+
+#include <asio/any_completion_handler.hpp>
+#include <asio/async_result.hpp>
+#include <asio/error.hpp>
+#include <string>
+
+class line_reader
+{
+private:
+ virtual void async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(std::error_code, std::string)> handler) = 0;
+
+ struct initiate_read_line
+ {
+ template <typename Handler>
+ void operator()(Handler handler, line_reader* self, std::string prompt)
+ {
+ self->async_read_line_impl(std::move(prompt), std::move(handler));
+ }
+ };
+
+public:
+ virtual ~line_reader() {}
+
+ template <typename CompletionToken>
+ auto async_read_line(std::string prompt, CompletionToken&& token)
+ -> decltype(
+ asio::async_initiate<CompletionToken, void(std::error_code, std::string)>(
+ initiate_read_line(), token, this, prompt))
+ {
+ return asio::async_initiate<CompletionToken, void(std::error_code, std::string)>(
+ initiate_read_line(), token, this, prompt);
+ }
+};
+
+#endif // LINE_READER_HPP
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/main.cpp b/3rdparty/asio/src/examples/cpp11/type_erasure/main.cpp
new file mode 100644
index 00000000000..2111de6853b
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/main.cpp
@@ -0,0 +1,60 @@
+//
+// main.cpp
+// ~~~~~~~~
+//
+// 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)
+//
+
+#include "line_reader.hpp"
+#include "sleep.hpp"
+#include "stdin_line_reader.hpp"
+#include <asio/coroutine.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/use_awaitable.hpp>
+#include <iostream>
+
+#include <asio/yield.hpp>
+
+class read_loop : asio::coroutine
+{
+public:
+ read_loop(asio::any_io_executor e, line_reader& r)
+ : executor(std::move(e)),
+ reader(r)
+ {
+ }
+
+ void operator()(std::error_code ec = {}, std::string line = {})
+ {
+ reenter (this)
+ {
+ for (i = 0; i < 10; ++i)
+ {
+ yield reader.async_read_line("Enter something: ", *this);
+ if (ec) break;
+ std::cout << line;
+ yield async_sleep(executor, std::chrono::seconds(1), *this);
+ if (ec) break;
+ }
+ }
+ }
+
+private:
+ asio::any_io_executor executor;
+ line_reader& reader;
+ int i;
+};
+
+#include <asio/unyield.hpp>
+
+int main()
+{
+ asio::io_context ctx{1};
+ stdin_line_reader reader{ctx.get_executor()};
+ read_loop(ctx.get_executor(), reader)();
+ ctx.run();
+}
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.cpp b/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.cpp
new file mode 100644
index 00000000000..b605866ebd7
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.cpp
@@ -0,0 +1,22 @@
+//
+// sleep.cpp
+// ~~~~~~~~~
+//
+// 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)
+//
+
+#include "sleep.hpp"
+#include <asio/consign.hpp>
+#include <asio/steady_timer.hpp>
+#include <memory>
+
+void async_sleep_impl(
+ asio::any_completion_handler<void(std::error_code)> handler,
+ asio::any_io_executor ex, std::chrono::nanoseconds duration)
+{
+ auto timer = std::make_shared<asio::steady_timer>(ex, duration);
+ timer->async_wait(asio::consign(std::move(handler), timer));
+}
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.hpp b/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.hpp
new file mode 100644
index 00000000000..299397a833c
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/sleep.hpp
@@ -0,0 +1,35 @@
+//
+// sleep.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 SLEEP_HPP
+#define SLEEP_HPP
+
+#include <asio/any_completion_handler.hpp>
+#include <asio/any_io_executor.hpp>
+#include <asio/async_result.hpp>
+#include <asio/error.hpp>
+#include <chrono>
+
+void async_sleep_impl(
+ asio::any_completion_handler<void(std::error_code)> handler,
+ asio::any_io_executor ex, std::chrono::nanoseconds duration);
+
+template <typename CompletionToken>
+inline auto async_sleep(asio::any_io_executor ex,
+ std::chrono::nanoseconds duration, CompletionToken&& token)
+ -> decltype(
+ asio::async_initiate<CompletionToken, void(std::error_code)>(
+ async_sleep_impl, token, std::move(ex), duration))
+{
+ return asio::async_initiate<CompletionToken, void(std::error_code)>(
+ async_sleep_impl, token, std::move(ex), duration);
+}
+
+#endif // SLEEP_HPP
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.cpp b/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.cpp
new file mode 100644
index 00000000000..d2e25e437a6
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.cpp
@@ -0,0 +1,44 @@
+//
+// stdin_line_reader.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include "stdin_line_reader.hpp"
+#include <asio/deferred.hpp>
+#include <asio/read_until.hpp>
+#include <iostream>
+
+stdin_line_reader::stdin_line_reader(asio::any_io_executor ex)
+ : stdin_(ex, ::dup(STDIN_FILENO))
+{
+}
+
+void stdin_line_reader::async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(std::error_code, std::string)> handler)
+{
+ std::cout << prompt;
+ std::cout.flush();
+
+ asio::async_read_until(stdin_, asio::dynamic_buffer(buffer_), '\n',
+ asio::deferred(
+ [this](std::error_code ec, std::size_t n)
+ {
+ if (!ec)
+ {
+ std::string result = buffer_.substr(0, n);
+ buffer_.erase(0, n);
+ return asio::deferred.values(ec, std::move(result));
+ }
+ else
+ {
+ return asio::deferred.values(ec, std::string{});
+ }
+ }
+ )
+ )(std::move(handler));
+}
diff --git a/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.hpp b/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.hpp
new file mode 100644
index 00000000000..43e67424367
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp11/type_erasure/stdin_line_reader.hpp
@@ -0,0 +1,30 @@
+//
+// stdin_line_reader.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 STDIN_LINE_READER_HPP
+#define STDIN_LINE_READER_HPP
+
+#include "line_reader.hpp"
+#include <asio/posix/stream_descriptor.hpp>
+
+class stdin_line_reader : public line_reader
+{
+public:
+ explicit stdin_line_reader(asio::any_io_executor ex);
+
+private:
+ void async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(std::error_code, std::string)> handler) override;
+
+ asio::posix::stream_descriptor stdin_;
+ std::string buffer_;
+};
+
+#endif
diff --git a/3rdparty/asio/src/examples/cpp03/windows/transmit_file.cpp b/3rdparty/asio/src/examples/cpp11/windows/transmit_file.cpp
index 6026f02ea48..0ffd0486c43 100644
--- a/3rdparty/asio/src/examples/cpp03/windows/transmit_file.cpp
+++ b/3rdparty/asio/src/examples/cpp11/windows/transmit_file.cpp
@@ -2,18 +2,17 @@
// transmit_file.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <ctime>
+#include <functional>
#include <iostream>
+#include <memory>
#include <string>
-#include <boost/bind/bind.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
#include "asio.hpp"
#if defined(ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
@@ -47,7 +46,7 @@ void transmit_file(tcp_socket& socket,
// The operation completed immediately, so a completion notification needs
// to be posted. When complete() is called, ownership of the OVERLAPPED-
// derived object passes to the io_context.
- asio::error_code ec(last_error,
+ std::error_code ec(last_error,
asio::error::get_system_category());
overlapped.complete(ec, 0);
}
@@ -60,10 +59,10 @@ void transmit_file(tcp_socket& socket,
}
class connection
- : public boost::enable_shared_from_this<connection>
+ : public std::enable_shared_from_this<connection>
{
public:
- typedef boost::shared_ptr<connection> pointer;
+ typedef std::shared_ptr<connection> pointer;
static pointer create(asio::io_context& io_context,
const std::string& filename)
@@ -78,13 +77,13 @@ public:
void start()
{
- asio::error_code ec;
+ std::error_code ec;
file_.assign(::CreateFile(filename_.c_str(), GENERIC_READ, 0, 0,
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, 0), ec);
if (file_.is_open())
{
transmit_file(socket_, file_,
- boost::bind(&connection::handle_write, shared_from_this(),
+ std::bind(&connection::handle_write, shared_from_this(),
asio::placeholders::error,
asio::placeholders::bytes_transferred));
}
@@ -98,10 +97,10 @@ private:
{
}
- void handle_write(const asio::error_code& /*error*/,
+ void handle_write(const std::error_code& /*error*/,
size_t /*bytes_transferred*/)
{
- asio::error_code ignored_ec;
+ std::error_code ignored_ec;
socket_.shutdown(tcp_socket::shutdown_both, ignored_ec);
}
@@ -128,12 +127,12 @@ private:
connection::create(acceptor_.get_executor().context(), filename_);
acceptor_.async_accept(new_connection->socket(),
- boost::bind(&server::handle_accept, this, new_connection,
+ std::bind(&server::handle_accept, this, new_connection,
asio::placeholders::error));
}
void handle_accept(connection::pointer new_connection,
- const asio::error_code& error)
+ const std::error_code& error)
{
if (!error)
{
diff --git a/3rdparty/asio/src/examples/cpp14/Makefile.am b/3rdparty/asio/src/examples/cpp14/Makefile.am
index 50aca20a357..2ddf12a8a2f 100644
--- a/3rdparty/asio/src/examples/cpp14/Makefile.am
+++ b/3rdparty/asio/src/examples/cpp14/Makefile.am
@@ -32,6 +32,9 @@ noinst_PROGRAMS = \
executors/pipeline \
executors/priority_scheduler \
iostreams/http_client \
+ operations/c_callback_wrapper \
+ operations/callback_wrapper \
+ operations/composed_1 \
operations/composed_1 \
operations/composed_2 \
operations/composed_3 \
@@ -41,6 +44,7 @@ noinst_PROGRAMS = \
operations/composed_7 \
operations/composed_8 \
parallel_group/parallel_sort \
+ parallel_group/ranged_wait_for_all \
parallel_group/wait_for_all \
parallel_group/wait_for_one \
parallel_group/wait_for_one_error \
@@ -70,6 +74,8 @@ executors_fork_join_SOURCES = executors/fork_join.cpp
executors_pipeline_SOURCES = executors/pipeline.cpp
executors_priority_scheduler_SOURCES = executors/priority_scheduler.cpp
iostreams_http_client_SOURCES = iostreams/http_client.cpp
+operations_c_callback_wrapper_SOURCES = operations/c_callback_wrapper.cpp
+operations_callback_wrapper_SOURCES = operations/callback_wrapper.cpp
operations_composed_1_SOURCES = operations/composed_1.cpp
operations_composed_2_SOURCES = operations/composed_2.cpp
operations_composed_3_SOURCES = operations/composed_3.cpp
@@ -79,6 +85,7 @@ operations_composed_6_SOURCES = operations/composed_6.cpp
operations_composed_7_SOURCES = operations/composed_7.cpp
operations_composed_8_SOURCES = operations/composed_8.cpp
parallel_group_parallel_sort_SOURCES = parallel_group/parallel_sort.cpp
+parallel_group_ranged_wait_for_all_SOURCES = parallel_group/ranged_wait_for_all.cpp
parallel_group_wait_for_all_SOURCES = parallel_group/wait_for_all.cpp
parallel_group_wait_for_one_SOURCES = parallel_group/wait_for_one.cpp
parallel_group_wait_for_one_error_SOURCES = parallel_group/wait_for_one_error.cpp
diff --git a/3rdparty/asio/src/examples/cpp14/Makefile.in b/3rdparty/asio/src/examples/cpp14/Makefile.in
index a6e79dc8e7e..23fdb3fc1e2 100644
--- a/3rdparty/asio/src/examples/cpp14/Makefile.in
+++ b/3rdparty/asio/src/examples/cpp14/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -105,12 +105,16 @@ noinst_PROGRAMS = deferred/deferred_1$(EXEEXT) \
executors/bank_account_2$(EXEEXT) executors/fork_join$(EXEEXT) \
executors/pipeline$(EXEEXT) \
executors/priority_scheduler$(EXEEXT) \
- iostreams/http_client$(EXEEXT) operations/composed_1$(EXEEXT) \
+ iostreams/http_client$(EXEEXT) \
+ operations/c_callback_wrapper$(EXEEXT) \
+ operations/callback_wrapper$(EXEEXT) \
+ operations/composed_1$(EXEEXT) operations/composed_1$(EXEEXT) \
operations/composed_2$(EXEEXT) operations/composed_3$(EXEEXT) \
operations/composed_4$(EXEEXT) operations/composed_5$(EXEEXT) \
operations/composed_6$(EXEEXT) operations/composed_7$(EXEEXT) \
operations/composed_8$(EXEEXT) \
parallel_group/parallel_sort$(EXEEXT) \
+ parallel_group/ranged_wait_for_all$(EXEEXT) \
parallel_group/wait_for_all$(EXEEXT) \
parallel_group/wait_for_one$(EXEEXT) \
parallel_group/wait_for_one_error$(EXEEXT) \
@@ -266,6 +270,20 @@ iostreams_http_client_OBJECTS = $(am_iostreams_http_client_OBJECTS)
iostreams_http_client_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@iostreams_http_client_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_c_callback_wrapper_OBJECTS = \
+ operations/c_callback_wrapper.$(OBJEXT)
+operations_c_callback_wrapper_OBJECTS = \
+ $(am_operations_c_callback_wrapper_OBJECTS)
+operations_c_callback_wrapper_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_c_callback_wrapper_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_callback_wrapper_OBJECTS = \
+ operations/callback_wrapper.$(OBJEXT)
+operations_callback_wrapper_OBJECTS = \
+ $(am_operations_callback_wrapper_OBJECTS)
+operations_callback_wrapper_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_callback_wrapper_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_operations_composed_1_OBJECTS = operations/composed_1.$(OBJEXT)
operations_composed_1_OBJECTS = $(am_operations_composed_1_OBJECTS)
operations_composed_1_LDADD = $(LDADD)
@@ -313,6 +331,13 @@ parallel_group_parallel_sort_OBJECTS = \
parallel_group_parallel_sort_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@parallel_group_parallel_sort_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_parallel_group_ranged_wait_for_all_OBJECTS = \
+ parallel_group/ranged_wait_for_all.$(OBJEXT)
+parallel_group_ranged_wait_for_all_OBJECTS = \
+ $(am_parallel_group_ranged_wait_for_all_OBJECTS)
+parallel_group_ranged_wait_for_all_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@parallel_group_ranged_wait_for_all_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_parallel_group_wait_for_all_OBJECTS = \
parallel_group/wait_for_all.$(OBJEXT)
parallel_group_wait_for_all_OBJECTS = \
@@ -378,6 +403,8 @@ am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
executors/$(DEPDIR)/pipeline.Po \
executors/$(DEPDIR)/priority_scheduler.Po \
iostreams/$(DEPDIR)/http_client.Po \
+ operations/$(DEPDIR)/c_callback_wrapper.Po \
+ operations/$(DEPDIR)/callback_wrapper.Po \
operations/$(DEPDIR)/composed_1.Po \
operations/$(DEPDIR)/composed_2.Po \
operations/$(DEPDIR)/composed_3.Po \
@@ -387,6 +414,7 @@ am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
operations/$(DEPDIR)/composed_7.Po \
operations/$(DEPDIR)/composed_8.Po \
parallel_group/$(DEPDIR)/parallel_sort.Po \
+ parallel_group/$(DEPDIR)/ranged_wait_for_all.Po \
parallel_group/$(DEPDIR)/wait_for_all.Po \
parallel_group/$(DEPDIR)/wait_for_one.Po \
parallel_group/$(DEPDIR)/wait_for_one_error.Po \
@@ -422,6 +450,8 @@ SOURCES = $(libasio_a_SOURCES) $(deferred_deferred_1_SOURCES) \
$(executors_fork_join_SOURCES) $(executors_pipeline_SOURCES) \
$(executors_priority_scheduler_SOURCES) \
$(iostreams_http_client_SOURCES) \
+ $(operations_c_callback_wrapper_SOURCES) \
+ $(operations_callback_wrapper_SOURCES) \
$(operations_composed_1_SOURCES) \
$(operations_composed_2_SOURCES) \
$(operations_composed_3_SOURCES) \
@@ -431,6 +461,7 @@ SOURCES = $(libasio_a_SOURCES) $(deferred_deferred_1_SOURCES) \
$(operations_composed_7_SOURCES) \
$(operations_composed_8_SOURCES) \
$(parallel_group_parallel_sort_SOURCES) \
+ $(parallel_group_ranged_wait_for_all_SOURCES) \
$(parallel_group_wait_for_all_SOURCES) \
$(parallel_group_wait_for_one_SOURCES) \
$(parallel_group_wait_for_one_error_SOURCES) \
@@ -453,6 +484,8 @@ DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(executors_fork_join_SOURCES) $(executors_pipeline_SOURCES) \
$(executors_priority_scheduler_SOURCES) \
$(iostreams_http_client_SOURCES) \
+ $(operations_c_callback_wrapper_SOURCES) \
+ $(operations_callback_wrapper_SOURCES) \
$(operations_composed_1_SOURCES) \
$(operations_composed_2_SOURCES) \
$(operations_composed_3_SOURCES) \
@@ -462,6 +495,7 @@ DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(operations_composed_7_SOURCES) \
$(operations_composed_8_SOURCES) \
$(parallel_group_parallel_sort_SOURCES) \
+ $(parallel_group_ranged_wait_for_all_SOURCES) \
$(parallel_group_wait_for_all_SOURCES) \
$(parallel_group_wait_for_one_SOURCES) \
$(parallel_group_wait_for_one_error_SOURCES) \
@@ -488,8 +522,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -503,8 +535,9 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CXX = @CXX@
-CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -513,9 +546,8 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
-EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
-GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -582,9 +614,11 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -621,6 +655,8 @@ executors_fork_join_SOURCES = executors/fork_join.cpp
executors_pipeline_SOURCES = executors/pipeline.cpp
executors_priority_scheduler_SOURCES = executors/priority_scheduler.cpp
iostreams_http_client_SOURCES = iostreams/http_client.cpp
+operations_c_callback_wrapper_SOURCES = operations/c_callback_wrapper.cpp
+operations_callback_wrapper_SOURCES = operations/callback_wrapper.cpp
operations_composed_1_SOURCES = operations/composed_1.cpp
operations_composed_2_SOURCES = operations/composed_2.cpp
operations_composed_3_SOURCES = operations/composed_3.cpp
@@ -630,6 +666,7 @@ operations_composed_6_SOURCES = operations/composed_6.cpp
operations_composed_7_SOURCES = operations/composed_7.cpp
operations_composed_8_SOURCES = operations/composed_8.cpp
parallel_group_parallel_sort_SOURCES = parallel_group/parallel_sort.cpp
+parallel_group_ranged_wait_for_all_SOURCES = parallel_group/ranged_wait_for_all.cpp
parallel_group_wait_for_all_SOURCES = parallel_group/wait_for_all.cpp
parallel_group_wait_for_one_SOURCES = parallel_group/wait_for_one.cpp
parallel_group_wait_for_one_error_SOURCES = parallel_group/wait_for_one_error.cpp
@@ -853,6 +890,18 @@ operations/$(am__dirstamp):
operations/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) operations/$(DEPDIR)
@: > operations/$(DEPDIR)/$(am__dirstamp)
+operations/c_callback_wrapper.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/c_callback_wrapper$(EXEEXT): $(operations_c_callback_wrapper_OBJECTS) $(operations_c_callback_wrapper_DEPENDENCIES) $(EXTRA_operations_c_callback_wrapper_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/c_callback_wrapper$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_c_callback_wrapper_OBJECTS) $(operations_c_callback_wrapper_LDADD) $(LIBS)
+operations/callback_wrapper.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/callback_wrapper$(EXEEXT): $(operations_callback_wrapper_OBJECTS) $(operations_callback_wrapper_DEPENDENCIES) $(EXTRA_operations_callback_wrapper_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/callback_wrapper$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_callback_wrapper_OBJECTS) $(operations_callback_wrapper_LDADD) $(LIBS)
operations/composed_1.$(OBJEXT): operations/$(am__dirstamp) \
operations/$(DEPDIR)/$(am__dirstamp)
@@ -914,6 +963,13 @@ parallel_group/parallel_sort.$(OBJEXT): \
parallel_group/parallel_sort$(EXEEXT): $(parallel_group_parallel_sort_OBJECTS) $(parallel_group_parallel_sort_DEPENDENCIES) $(EXTRA_parallel_group_parallel_sort_DEPENDENCIES) parallel_group/$(am__dirstamp)
@rm -f parallel_group/parallel_sort$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(parallel_group_parallel_sort_OBJECTS) $(parallel_group_parallel_sort_LDADD) $(LIBS)
+parallel_group/ranged_wait_for_all.$(OBJEXT): \
+ parallel_group/$(am__dirstamp) \
+ parallel_group/$(DEPDIR)/$(am__dirstamp)
+
+parallel_group/ranged_wait_for_all$(EXEEXT): $(parallel_group_ranged_wait_for_all_OBJECTS) $(parallel_group_ranged_wait_for_all_DEPENDENCIES) $(EXTRA_parallel_group_ranged_wait_for_all_DEPENDENCIES) parallel_group/$(am__dirstamp)
+ @rm -f parallel_group/ranged_wait_for_all$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(parallel_group_ranged_wait_for_all_OBJECTS) $(parallel_group_ranged_wait_for_all_LDADD) $(LIBS)
parallel_group/wait_for_all.$(OBJEXT): parallel_group/$(am__dirstamp) \
parallel_group/$(DEPDIR)/$(am__dirstamp)
@@ -978,6 +1034,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/pipeline.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@executors/$(DEPDIR)/priority_scheduler.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@iostreams/$(DEPDIR)/http_client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/c_callback_wrapper.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/callback_wrapper.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_1.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_2.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_3.Po@am__quote@ # am--include-marker
@@ -987,6 +1045,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_7.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_8.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/parallel_sort.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/ranged_wait_for_all.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_all.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_one.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@parallel_group/$(DEPDIR)/wait_for_one_error.Po@am__quote@ # am--include-marker
@@ -1065,7 +1124,6 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -1178,6 +1236,8 @@ distclean: distclean-am
-rm -f executors/$(DEPDIR)/pipeline.Po
-rm -f executors/$(DEPDIR)/priority_scheduler.Po
-rm -f iostreams/$(DEPDIR)/http_client.Po
+ -rm -f operations/$(DEPDIR)/c_callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/callback_wrapper.Po
-rm -f operations/$(DEPDIR)/composed_1.Po
-rm -f operations/$(DEPDIR)/composed_2.Po
-rm -f operations/$(DEPDIR)/composed_3.Po
@@ -1187,6 +1247,7 @@ distclean: distclean-am
-rm -f operations/$(DEPDIR)/composed_7.Po
-rm -f operations/$(DEPDIR)/composed_8.Po
-rm -f parallel_group/$(DEPDIR)/parallel_sort.Po
+ -rm -f parallel_group/$(DEPDIR)/ranged_wait_for_all.Po
-rm -f parallel_group/$(DEPDIR)/wait_for_all.Po
-rm -f parallel_group/$(DEPDIR)/wait_for_one.Po
-rm -f parallel_group/$(DEPDIR)/wait_for_one_error.Po
@@ -1260,6 +1321,8 @@ maintainer-clean: maintainer-clean-am
-rm -f executors/$(DEPDIR)/pipeline.Po
-rm -f executors/$(DEPDIR)/priority_scheduler.Po
-rm -f iostreams/$(DEPDIR)/http_client.Po
+ -rm -f operations/$(DEPDIR)/c_callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/callback_wrapper.Po
-rm -f operations/$(DEPDIR)/composed_1.Po
-rm -f operations/$(DEPDIR)/composed_2.Po
-rm -f operations/$(DEPDIR)/composed_3.Po
@@ -1269,6 +1332,7 @@ maintainer-clean: maintainer-clean-am
-rm -f operations/$(DEPDIR)/composed_7.Po
-rm -f operations/$(DEPDIR)/composed_8.Po
-rm -f parallel_group/$(DEPDIR)/parallel_sort.Po
+ -rm -f parallel_group/$(DEPDIR)/ranged_wait_for_all.Po
-rm -f parallel_group/$(DEPDIR)/wait_for_all.Po
-rm -f parallel_group/$(DEPDIR)/wait_for_one.Po
-rm -f parallel_group/$(DEPDIR)/wait_for_one_error.Po
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_1.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_1.cpp
index 732fa4fa9b5..db9213eb3be 100644
--- a/3rdparty/asio/src/examples/cpp14/deferred/deferred_1.cpp
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_1.cpp
@@ -2,17 +2,16 @@
// deferred_1.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <asio/experimental/deferred.hpp>
#include <iostream>
-using asio::experimental::deferred;
+using asio::deferred;
int main()
{
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_2.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_2.cpp
index c33bbc2a5ed..07528282de5 100644
--- a/3rdparty/asio/src/examples/cpp14/deferred/deferred_2.cpp
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_2.cpp
@@ -2,17 +2,16 @@
// deferred_2.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <asio/experimental/deferred.hpp>
#include <iostream>
-using asio::experimental::deferred;
+using asio::deferred;
int main()
{
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_3.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_3.cpp
index 484dfca638f..396e40840a1 100644
--- a/3rdparty/asio/src/examples/cpp14/deferred/deferred_3.cpp
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_3.cpp
@@ -2,17 +2,16 @@
// deferred_3.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <asio/experimental/deferred.hpp>
#include <iostream>
-using asio::experimental::deferred;
+using asio::deferred;
template <typename CompletionToken>
auto async_wait_twice(asio::steady_timer& timer, CompletionToken&& token)
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_4.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_4.cpp
index 1f70821eaa5..a8ea73336d2 100644
--- a/3rdparty/asio/src/examples/cpp14/deferred/deferred_4.cpp
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_4.cpp
@@ -2,17 +2,16 @@
// deferred_4.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <asio/experimental/deferred.hpp>
#include <iostream>
-using asio::experimental::deferred;
+using asio::deferred;
template <typename CompletionToken>
auto async_wait_twice(asio::steady_timer& timer, CompletionToken&& token)
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_5.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_5.cpp
index b48056bd66d..d262b977811 100644
--- a/3rdparty/asio/src/examples/cpp14/deferred/deferred_5.cpp
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_5.cpp
@@ -2,17 +2,16 @@
// deferred_5.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <asio/experimental/deferred.hpp>
#include <iostream>
-using asio::experimental::deferred;
+using asio::deferred;
template <typename CompletionToken>
auto async_wait_twice(asio::steady_timer& timer, CompletionToken&& token)
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_6.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_6.cpp
index 502d43bc67c..7ccef58cc5c 100644
--- a/3rdparty/asio/src/examples/cpp14/deferred/deferred_6.cpp
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_6.cpp
@@ -2,19 +2,17 @@
// deferred_6.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <asio/experimental/append.hpp>
-#include <asio/experimental/deferred.hpp>
#include <iostream>
-using asio::experimental::append;
-using asio::experimental::deferred;
+using asio::append;
+using asio::deferred;
template <typename CompletionToken>
auto async_wait_twice(asio::steady_timer& timer, CompletionToken&& token)
diff --git a/3rdparty/asio/src/examples/cpp14/deferred/deferred_7.cpp b/3rdparty/asio/src/examples/cpp14/deferred/deferred_7.cpp
index da49fc7040e..b0734542c79 100644
--- a/3rdparty/asio/src/examples/cpp14/deferred/deferred_7.cpp
+++ b/3rdparty/asio/src/examples/cpp14/deferred/deferred_7.cpp
@@ -2,19 +2,17 @@
// deferred_7.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <asio/experimental/append.hpp>
-#include <asio/experimental/deferred.hpp>
#include <iostream>
-using asio::experimental::append;
-using asio::experimental::deferred;
+using asio::append;
+using asio::deferred;
template <typename CompletionToken>
auto async_wait_twice(asio::steady_timer& timer, CompletionToken&& token)
diff --git a/3rdparty/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp
index 49f17c2a3c1..9bd1b727500 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/async_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
// async_tcp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp
index ea9a1da88a0..b059af95b82 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/async_udp_echo_server.cpp
@@ -2,7 +2,7 @@
// async_udp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp b/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp
index 96a843e41ad..8a281203f89 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_client.cpp
@@ -2,7 +2,7 @@
// blocking_tcp_echo_client.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp b/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp
index bcc5d4bb682..2116712616a 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/blocking_tcp_echo_server.cpp
@@ -2,7 +2,7 @@
// blocking_tcp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp b/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp
index 855f9e14e2a..4c8a2849d5b 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_client.cpp
@@ -2,7 +2,7 @@
// blocking_udp_echo_client.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp b/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp
index 816f6aeab6b..c3098bdb8fc 100644
--- a/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp14/echo/blocking_udp_echo_server.cpp
@@ -2,7 +2,7 @@
// blocking_udp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp b/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
index 2fb8ba56548..0d1bdfcb8bd 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
@@ -20,16 +20,14 @@ void async_getline(IoExecutor io_ex, std::istream& is, Handler handler)
execution::outstanding_work.tracked);
// Post a function object to do the work asynchronously.
- execution::execute(
- asio::require(io_ex, execution::blocking.never),
+ asio::require(io_ex, execution::blocking.never).execute(
[&is, work_ex, handler=std::move(handler)]() mutable
{
std::string line;
std::getline(is, line);
// Pass the result to the handler, via the associated executor.
- execution::execute(
- asio::prefer(work_ex, execution::blocking.possibly),
+ asio::prefer(work_ex, execution::blocking.possibly).execute(
[line=std::move(line), handler=std::move(handler)]() mutable
{
handler(std::move(line));
diff --git a/3rdparty/asio/src/examples/cpp14/executors/async_2.cpp b/3rdparty/asio/src/examples/cpp14/executors/async_2.cpp
index b8a28e68b87..ee4a72e80c3 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/async_2.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/async_2.cpp
@@ -20,16 +20,14 @@ void async_getline(IoExecutor io_ex, std::istream& is, Handler handler)
execution::outstanding_work.tracked);
// Post a function object to do the work asynchronously.
- execution::execute(
- asio::require(io_ex, execution::blocking.never),
+ asio::require(io_ex, execution::blocking.never).execute(
[&is, work_ex, handler=std::move(handler)]() mutable
{
std::string line;
std::getline(is, line);
// Pass the result to the handler, via the associated executor.
- execution::execute(
- asio::prefer(work_ex, execution::blocking.possibly),
+ asio::prefer(work_ex, execution::blocking.possibly).execute(
[line=std::move(line), handler=std::move(handler)]() mutable
{
handler(std::move(line));
diff --git a/3rdparty/asio/src/examples/cpp14/executors/bank_account_1.cpp b/3rdparty/asio/src/examples/cpp14/executors/bank_account_1.cpp
index abfd16a7ee0..a63d7fc059b 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/bank_account_1.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/bank_account_1.cpp
@@ -16,8 +16,7 @@ class bank_account
public:
void deposit(int amount)
{
- execution::execute(
- pool_.executor(),
+ pool_.executor().execute(
[this, amount]
{
balance_ += amount;
@@ -26,8 +25,7 @@ public:
void withdraw(int amount)
{
- execution::execute(
- pool_.executor(),
+ pool_.executor().execute(
[this, amount]
{
if (balance_ >= amount)
@@ -37,8 +35,7 @@ public:
void print_balance() const
{
- execution::execute(
- pool_.executor(),
+ pool_.executor().execute(
[this]
{
std::cout << "balance = " << balance_ << "\n";
diff --git a/3rdparty/asio/src/examples/cpp14/executors/bank_account_2.cpp b/3rdparty/asio/src/examples/cpp14/executors/bank_account_2.cpp
index 305d0ca5b86..c2de05156e8 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/bank_account_2.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/bank_account_2.cpp
@@ -16,9 +16,7 @@ class bank_account
public:
void deposit(int amount)
{
- execution::execute(
- asio::require(pool_.executor(),
- execution::blocking.always),
+ asio::require(pool_.executor(), execution::blocking.always).execute(
[this, amount]
{
balance_ += amount;
@@ -27,9 +25,8 @@ public:
void withdraw(int amount)
{
- execution::execute(
- asio::require(pool_.executor(),
- execution::blocking.always),
+ asio::require(pool_.executor(),
+ execution::blocking.always).execute(
[this, amount]
{
if (balance_ >= amount)
@@ -40,9 +37,7 @@ public:
int balance() const
{
int result = 0;
- execution::execute(
- asio::require(pool_.executor(),
- execution::blocking.always),
+ asio::require(pool_.executor(), execution::blocking.always).execute(
[this, &result]
{
result = balance_;
diff --git a/3rdparty/asio/src/examples/cpp14/executors/fork_join.cpp b/3rdparty/asio/src/examples/cpp14/executors/fork_join.cpp
index a76437efad9..7e8a827356d 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/fork_join.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/fork_join.cpp
@@ -32,8 +32,7 @@ public:
// it is time to shut down, i.e. the use count is zero.
for (thread_count_ = 0; thread_count_ < thread_count; ++thread_count_)
{
- execution::execute(
- threads_.executor(),
+ threads_.executor().execute(
[this]
{
std::unique_lock<std::mutex> lock(mutex_);
@@ -252,8 +251,8 @@ void fork_join_sort(Iterator begin, Iterator end)
{
fork_executor fork(pool);
join_guard join(fork);
- execution::execute(fork, [=]{ fork_join_sort(begin, begin + n / 2); });
- execution::execute(fork, [=]{ fork_join_sort(begin + n / 2, end); });
+ fork.execute([=]{ fork_join_sort(begin, begin + n / 2); });
+ fork.execute([=]{ fork_join_sort(begin + n / 2, end); });
}
std::inplace_merge(begin, begin + n / 2, end);
}
diff --git a/3rdparty/asio/src/examples/cpp14/executors/pipeline.cpp b/3rdparty/asio/src/examples/cpp14/executors/pipeline.cpp
index 2d75e04fc0c..9754a27d425 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/pipeline.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/pipeline.cpp
@@ -169,9 +169,7 @@ std::future<void> pipeline(queue_back<T> in, F f)
f(in);
});
std::future<void> fut = task.get_future();
- execution::execute(
- asio::require(ex, execution::blocking.never),
- std::move(task));
+ asio::require(ex, execution::blocking.never).execute(std::move(task));
return fut;
}
@@ -191,8 +189,7 @@ std::future<void> pipeline(queue_back<T> in, F f, Tail... t)
auto ex = get_associated_executor(f, thread_executor());
// Run the function.
- execution::execute(
- asio::require(ex, execution::blocking.never),
+ asio::require(ex, execution::blocking.never).execute(
[in, out, f = std::move(f)]() mutable
{
f(in, out);
@@ -219,8 +216,7 @@ std::future<void> pipeline(F f, Tail... t)
auto ex = get_associated_executor(f, thread_executor());
// Run the function.
- execution::execute(
- asio::require(ex, execution::blocking.never),
+ asio::require(ex, execution::blocking.never).execute(
[out, f = std::move(f)]() mutable
{
f(out);
diff --git a/3rdparty/asio/src/examples/cpp14/executors/priority_scheduler.cpp b/3rdparty/asio/src/examples/cpp14/executors/priority_scheduler.cpp
index da4caf0d0ef..20d36db933a 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/priority_scheduler.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/priority_scheduler.cpp
@@ -166,16 +166,16 @@ int main()
auto med = asio::require(ex, custom_props::normal_priority);
auto high = asio::require(ex, custom_props::high_priority);
execution::any_executor<custom_props::priority> poly_high(high);
- execution::execute(prefer_low, []{ std::cout << "1\n"; });
- execution::execute(low, []{ std::cout << "11\n"; });
- execution::execute(low, []{ std::cout << "111\n"; });
- execution::execute(med, []{ std::cout << "2\n"; });
- execution::execute(med, []{ std::cout << "22\n"; });
- execution::execute(high, []{ std::cout << "3\n"; });
- execution::execute(high, []{ std::cout << "33\n"; });
- execution::execute(high, []{ std::cout << "333\n"; });
- execution::execute(poly_high, []{ std::cout << "3333\n"; });
- execution::execute(asio::require(ex, custom_props::priority{-1}), [&]{ sched.stop(); });
+ prefer_low.execute([]{ std::cout << "1\n"; });
+ low.execute([]{ std::cout << "11\n"; });
+ low.execute([]{ std::cout << "111\n"; });
+ med.execute([]{ std::cout << "2\n"; });
+ med.execute([]{ std::cout << "22\n"; });
+ high.execute([]{ std::cout << "3\n"; });
+ high.execute([]{ std::cout << "33\n"; });
+ high.execute([]{ std::cout << "333\n"; });
+ poly_high.execute([]{ std::cout << "3333\n"; });
+ asio::require(ex, custom_props::priority{-1}).execute([&]{ sched.stop(); });
sched.run();
std::cout << "polymorphic query result = " << asio::query(poly_high, custom_props::priority{}) << "\n";
}
diff --git a/3rdparty/asio/src/examples/cpp14/iostreams/http_client.cpp b/3rdparty/asio/src/examples/cpp14/iostreams/http_client.cpp
index da64259bb50..3ae02e4f825 100644
--- a/3rdparty/asio/src/examples/cpp14/iostreams/http_client.cpp
+++ b/3rdparty/asio/src/examples/cpp14/iostreams/http_client.cpp
@@ -2,7 +2,7 @@
// http_client.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp14/operations/c_callback_wrapper.cpp b/3rdparty/asio/src/examples/cpp14/operations/c_callback_wrapper.cpp
new file mode 100644
index 00000000000..33b1c26e8ae
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/c_callback_wrapper.cpp
@@ -0,0 +1,230 @@
+//
+// c_callback_wrapper.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+#include <memory>
+#include <new>
+
+//------------------------------------------------------------------------------
+
+// This is a mock implementation of a C-based API that uses the function pointer
+// plus void* context idiom for exposing a callback.
+
+void read_input(const char* prompt, void (*cb)(void*, const char*), void* arg)
+{
+ std::thread(
+ [prompt = std::string(prompt), cb, arg]
+ {
+ std::cout << prompt << ": ";
+ std::cout.flush();
+ std::string line;
+ std::getline(std::cin, line);
+ cb(arg, line.c_str());
+ }).detach();
+}
+
+//------------------------------------------------------------------------------
+
+// This is an asynchronous operation that wraps the C-based API.
+
+// To map our completion handler into a function pointer / void* callback, we
+// need to allocate some state that will live for the duration of the
+// operation. A pointer to this state will be passed to the C-based API.
+template <typename Handler>
+class read_input_state
+{
+public:
+ read_input_state(Handler&& handler)
+ : handler_(std::move(handler)),
+ work_(asio::make_work_guard(handler_))
+ {
+ }
+
+ // Create the state using the handler's associated allocator.
+ static read_input_state* create(Handler&& handler)
+ {
+ // A unique_ptr deleter that is used to destroy uninitialised objects.
+ struct deleter
+ {
+ // Get the handler's associated allocator type. If the handler does not
+ // specify an associated allocator, we will use a recycling allocator as
+ // the default. As the associated allocator is a proto-allocator, we must
+ // rebind it to the correct type before we can use it to allocate objects.
+ typename std::allocator_traits<
+ asio::associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<read_input_state> alloc;
+
+ void operator()(read_input_state* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ } d{asio::get_associated_allocator(handler,
+ asio::recycling_allocator<void>())};
+
+ // Allocate memory for the state.
+ std::unique_ptr<read_input_state, deleter> uninit_ptr(
+ std::allocator_traits<decltype(d.alloc)>::allocate(d.alloc, 1), d);
+
+ // Construct the state into the newly allocated memory. This might throw.
+ read_input_state* ptr =
+ new (uninit_ptr.get()) read_input_state(std::move(handler));
+
+ // Release ownership of the memory and return the newly allocated state.
+ uninit_ptr.release();
+ return ptr;
+ }
+
+ static void callback(void* arg, const char* result)
+ {
+ read_input_state* self = static_cast<read_input_state*>(arg);
+
+ // A unique_ptr deleter that is used to destroy initialised objects.
+ struct deleter
+ {
+ // Get the handler's associated allocator type. If the handler does not
+ // specify an associated allocator, we will use a recycling allocator as
+ // the default. As the associated allocator is a proto-allocator, we must
+ // rebind it to the correct type before we can use it to allocate objects.
+ typename std::allocator_traits<
+ asio::associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<read_input_state> alloc;
+
+ void operator()(read_input_state* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::destroy(alloc, ptr);
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ } d{asio::get_associated_allocator(self->handler_,
+ asio::recycling_allocator<void>())};
+
+ // To conform to the rules regarding asynchronous operations and memory
+ // allocation, we must make a copy of the state and deallocate the memory
+ // before dispatching the completion handler.
+ std::unique_ptr<read_input_state, deleter> state_ptr(self, d);
+ read_input_state state(std::move(*self));
+ state_ptr.reset();
+
+ // Dispatch the completion handler through the handler's associated
+ // executor, using the handler's associated allocator.
+ asio::dispatch(state.work_.get_executor(),
+ asio::bind_allocator(d.alloc,
+ [
+ handler = std::move(state.handler_),
+ result = std::string(result)
+ ]() mutable
+ {
+ std::move(handler)(result);
+ }));
+ }
+
+private:
+ Handler handler_;
+
+ // According to the rules for asynchronous operations, we need to track
+ // outstanding work against the handler's associated executor until the
+ // asynchronous operation is complete.
+ asio::executor_work_guard<
+ asio::associated_executor_t<Handler>> work_;
+};
+
+// The initiating function for the asynchronous operation.
+template <typename CompletionToken>
+auto async_read_input(const std::string& prompt, CompletionToken&& token)
+{
+ // Define a function object that contains the code to launch the asynchronous
+ // operation. This is passed the concrete completion handler, followed by any
+ // additional arguments that were passed through the call to async_initiate.
+ auto init = [](auto handler, const std::string& prompt)
+ {
+ // The body of the initiation function object creates the long-lived state
+ // and passes it to the C-based API, along with the function pointer.
+ using state_type = read_input_state<decltype(handler)>;
+ read_input(prompt.c_str(), &state_type::callback,
+ state_type::create(std::move(handler)));
+ };
+
+ // The async_initiate function is used to transform the supplied completion
+ // token to the completion handler. When calling this function we explicitly
+ // specify the completion signature of the operation. We must also return the
+ // result of the call since the completion token may produce a return value,
+ // such as a future.
+ return asio::async_initiate<CompletionToken, void(std::string)>(
+ init, // First, pass the function object that launches the operation,
+ token, // then the completion token that will be transformed to a handler,
+ prompt); // and, finally, any additional arguments to the function object.
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ async_read_input("Enter your name",
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_read_input("Enter your name", asio::deferred);
+
+ // Launch our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ std::move(op)(
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::string> f =
+ async_read_input("Enter your name", asio::use_future);
+
+ std::string result = f.get();
+ std::cout << "Hello " << result << "\n";
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/callback_wrapper.cpp b/3rdparty/asio/src/examples/cpp14/operations/callback_wrapper.cpp
new file mode 100644
index 00000000000..3d5774c7421
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/operations/callback_wrapper.cpp
@@ -0,0 +1,152 @@
+//
+// callback_wrapper.cpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+//------------------------------------------------------------------------------
+
+// This is a mock implementation of an API that uses a move-only function object
+// for exposing a callback. The callback has the signature void(std::string).
+
+template <typename Callback>
+void read_input(const std::string& prompt, Callback cb)
+{
+ std::thread(
+ [prompt, cb = std::move(cb)]() mutable
+ {
+ std::cout << prompt << ": ";
+ std::cout.flush();
+ std::string line;
+ std::getline(std::cin, line);
+ std::move(cb)(std::move(line));
+ }).detach();
+}
+
+//------------------------------------------------------------------------------
+
+// This is an asynchronous operation that wraps the callback-based API.
+
+// The initiating function for the asynchronous operation.
+template <typename CompletionToken>
+auto async_read_input(const std::string& prompt, CompletionToken&& token)
+{
+ // Define a function object that contains the code to launch the asynchronous
+ // operation. This is passed the concrete completion handler, followed by any
+ // additional arguments that were passed through the call to async_initiate.
+ auto init = [](auto handler, const std::string& prompt)
+ {
+ // According to the rules for asynchronous operations, we need to track
+ // outstanding work against the handler's associated executor until the
+ // asynchronous operation is complete.
+ auto work = asio::make_work_guard(handler);
+
+ // Launch the operation with a callback that will receive the result and
+ // pass it through to the asynchronous operation's completion handler.
+ read_input(prompt,
+ [
+ handler = std::move(handler),
+ work = std::move(work)
+ ](std::string result) mutable
+ {
+ // Get the handler's associated allocator. If the handler does not
+ // specify an allocator, use the recycling allocator as the default.
+ auto alloc = asio::get_associated_allocator(
+ handler, asio::recycling_allocator<void>());
+
+ // Dispatch the completion handler through the handler's associated
+ // executor, using the handler's associated allocator.
+ asio::dispatch(work.get_executor(),
+ asio::bind_allocator(alloc,
+ [
+ handler = std::move(handler),
+ result = std::string(result)
+ ]() mutable
+ {
+ std::move(handler)(result);
+ }));
+ });
+ };
+
+ // The async_initiate function is used to transform the supplied completion
+ // token to the completion handler. When calling this function we explicitly
+ // specify the completion signature of the operation. We must also return the
+ // result of the call since the completion token may produce a return value,
+ // such as a future.
+ return asio::async_initiate<CompletionToken, void(std::string)>(
+ init, // First, pass the function object that launches the operation,
+ token, // then the completion token that will be transformed to a handler,
+ prompt); // and, finally, any additional arguments to the function object.
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to specify an associated executor.
+ async_read_input("Enter your name",
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_read_input("Enter your name", asio::deferred);
+
+ // Launch our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ std::move(op)(
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::string> f =
+ async_read_input("Enter your name", asio::use_future);
+
+ std::string result = f.get();
+ std::cout << "Hello " << result << "\n";
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_1.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_1.cpp
index 05b1479f2ff..80eaceddf71 100644
--- a/3rdparty/asio/src/examples/cpp14/operations/composed_1.cpp
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_1.cpp
@@ -2,12 +2,13 @@
// composed_1.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/use_future.hpp>
@@ -31,14 +32,21 @@ template <typename CompletionToken>
auto async_write_message(tcp::socket& socket,
const char* message, CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is void. However,
- // when the completion token is asio::yield_context (used for stackful
- // coroutines) the return type would be std::size_t, and when the completion
- // token is asio::use_future it would be std::future<std::size_t>.
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
//
// In C++14 we can omit the return type as it is automatically deduced from
- // the return type of our underlying asynchronous operation
+ // the return type of our underlying asynchronous operation.
{
// When delegating to the underlying operation we must take care to perfectly
// forward the completion token. This ensures that our operation works
@@ -77,6 +85,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -109,5 +150,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_2.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_2.cpp
index 15422454c40..18086bd0627 100644
--- a/3rdparty/asio/src/examples/cpp14/operations/composed_2.cpp
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_2.cpp
@@ -2,12 +2,13 @@
// composed_2.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/use_future.hpp>
@@ -20,6 +21,10 @@
using asio::ip::tcp;
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
//------------------------------------------------------------------------------
// This next simplest example of a composed asynchronous operation involves
@@ -33,38 +38,87 @@ auto async_write_message(tcp::socket& socket,
const char* message, bool allow_partial_write,
CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is void. However,
- // when the completion token is asio::yield_context (used for stackful
- // coroutines) the return type would be std::size_t, and when the completion
- // token is asio::use_future it would be std::future<std::size_t>.
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
//
// In C++14 we can omit the return type as it is automatically deduced from
- // the return type of our underlying asynchronous operation
+ // the return type of asio::async_initiate.
{
- // As the return type of the initiating function is deduced solely from the
- // CompletionToken and completion signature, we know that two different
- // asynchronous operations having the same completion signature will produce
- // the same return type, when passed the same CompletionToken. This allows us
- // to trivially delegate to alternate implementations.
- if (allow_partial_write)
- {
- // When delegating to an underlying operation we must take care to
- // perfectly forward the completion token. This ensures that our operation
- // works correctly with move-only function objects as callbacks, as well as
- // other completion token types.
- return socket.async_write_some(
- asio::buffer(message, std::strlen(message)),
- std::forward<CompletionToken>(token));
- }
- else
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error, std::size_t)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](auto&& completion_handler, tcp::socket& socket,
+ const char* message, bool allow_partial_write)
{
- // As above, we must perfectly forward the completion token when calling
- // the alternate underlying operation.
- return asio::async_write(socket,
- asio::buffer(message, std::strlen(message)),
- std::forward<CompletionToken>(token));
- }
+ if (allow_partial_write)
+ {
+ // When delegating to an underlying operation we must take care to
+ // perfectly forward the completion handler. This ensures that our
+ // operation works correctly with move-only function objects as
+ // callbacks.
+ return socket.async_write_some(
+ asio::buffer(message, std::strlen(message)),
+ std::forward<decltype(completion_handler)>(completion_handler));
+ }
+ else
+ {
+ // As above, we must perfectly forward the completion handler when calling
+ // the alternate underlying operation.
+ return asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<decltype(completion_handler)>(completion_handler));
+ }
+ };
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code, std::size_t)>(
+ initiation, token, std::ref(socket), message, allow_partial_write);
}
//------------------------------------------------------------------------------
@@ -95,6 +149,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", false, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -127,5 +214,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_3.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_3.cpp
index 0ac277f1e34..7b347944768 100644
--- a/3rdparty/asio/src/examples/cpp14/operations/composed_3.cpp
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_3.cpp
@@ -2,13 +2,14 @@
// composed_3.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/use_future.hpp>
@@ -37,12 +38,19 @@ template <typename CompletionToken>
auto async_write_message(tcp::socket& socket,
const char* message, CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
//
// In C++14 we can omit the return type as it is automatically deduced from
// the return type of asio::async_initiate.
@@ -149,6 +157,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -182,5 +223,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_4.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_4.cpp
index 879e38ca0db..808a179e2d3 100644
--- a/3rdparty/asio/src/examples/cpp14/operations/composed_4.cpp
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_4.cpp
@@ -2,13 +2,14 @@
// composed_4.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/use_future.hpp>
@@ -38,12 +39,19 @@ template <typename CompletionToken>
auto async_write_message(tcp::socket& socket,
const char* message, CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
//
// In C++14 we can omit the return type as it is automatically deduced from
// the return type of asio::async_initiate.
@@ -165,6 +173,38 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket, "", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -197,5 +237,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_5.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_5.cpp
index 560773217f6..c28cc8af129 100644
--- a/3rdparty/asio/src/examples/cpp14/operations/composed_5.cpp
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_5.cpp
@@ -2,12 +2,13 @@
// composed_5.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/use_future.hpp>
@@ -37,12 +38,19 @@ template <typename T, typename CompletionToken>
auto async_write_message(tcp::socket& socket,
const T& message, CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
//
// In C++14 we can omit the return type as it is automatically deduced from
// the return type of asio::async_initiate.
@@ -202,6 +210,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_message(socket,
+ std::string("abcdef"), asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -234,5 +275,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_6.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_6.cpp
index d0304de6a99..82c0cd72237 100644
--- a/3rdparty/asio/src/examples/cpp14/operations/composed_6.cpp
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_6.cpp
@@ -2,12 +2,13 @@
// composed_6.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
+#include <asio/deferred.hpp>
#include <asio/executor_work_guard.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
@@ -42,12 +43,19 @@ auto async_write_messages(tcp::socket& socket,
const T& message, std::size_t repeat_count,
CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
//
// In C++14 we can omit the return type as it is automatically deduced from
// the return type of asio::async_initiate.
@@ -108,9 +116,7 @@ auto async_write_messages(tcp::socket& socket,
// As our composed operation performs multiple underlying I/O operations,
// we should maintain a work object against the I/O executor. This tells
// the I/O executor that there is still more work to come in the future.
- typename std::decay<decltype(asio::prefer(
- std::declval<tcp::socket::executor_type>(),
- asio::execution::outstanding_work.tracked))>::type io_work_;
+ asio::executor_work_guard<tcp::socket::executor_type> io_work_;
// The user-supplied completion handler, called once only on completion
// of the entire composed operation.
@@ -147,6 +153,9 @@ auto async_write_messages(tcp::socket& socket,
// This point is reached only on completion of the entire composed
// operation.
+ // We no longer have any future work coming for the I/O executor.
+ io_work_.reset();
+
// Deallocate the encoded message before calling the user-supplied
// completion handler.
encoded_message_.reset();
@@ -197,8 +206,7 @@ auto async_write_messages(tcp::socket& socket,
socket, std::move(encoded_message),
repeat_count, std::move(delay_timer),
intermediate_completion_handler::starting,
- asio::prefer(socket.get_executor(),
- asio::execution::outstanding_work.tracked),
+ asio::make_work_guard(socket.get_executor()),
std::forward<decltype(completion_handler)>(completion_handler)});
};
@@ -262,6 +270,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -294,5 +335,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_7.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_7.cpp
index 0158292e9d9..841249bef5b 100644
--- a/3rdparty/asio/src/examples/cpp14/operations/composed_7.cpp
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_7.cpp
@@ -2,13 +2,14 @@
// composed_7.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio/compose.hpp>
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/steady_timer.hpp>
@@ -42,15 +43,22 @@ auto async_write_messages(tcp::socket& socket,
const T& message, std::size_t repeat_count,
CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
//
// In C++14 we can omit the return type as it is automatically deduced from
- // the return type of asio::async_initiate.
+ // the return type of asio::async_compose.
{
// Encode the message and copy it into an allocated buffer. The buffer will
// be maintained for the lifetime of the composed asynchronous operation.
@@ -183,6 +191,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -215,5 +256,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp14/operations/composed_8.cpp b/3rdparty/asio/src/examples/cpp14/operations/composed_8.cpp
index a22a500b67e..d1f46ddce54 100644
--- a/3rdparty/asio/src/examples/cpp14/operations/composed_8.cpp
+++ b/3rdparty/asio/src/examples/cpp14/operations/composed_8.cpp
@@ -2,7 +2,7 @@
// composed_8.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -10,6 +10,7 @@
#include <asio/compose.hpp>
#include <asio/coroutine.hpp>
+#include <asio/deferred.hpp>
#include <asio/io_context.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/steady_timer.hpp>
@@ -46,15 +47,22 @@ auto async_write_messages(tcp::socket& socket,
const T& message, std::size_t repeat_count,
CompletionToken&& token)
// The return type of the initiating function is deduced from the combination
- // of CompletionToken type and the completion handler's signature. When the
- // completion token is a simple callback, the return type is always void.
- // In this example, when the completion token is asio::yield_context
- // (used for stackful coroutines) the return type would be also be void, as
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
// there is no non-error argument to the completion handler. When the
- // completion token is asio::use_future it would be std::future<void>.
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
//
// In C++14 we can omit the return type as it is automatically deduced from
- // the return type of asio::async_initiate.
+ // the return type of asio::async_compose.
{
// Encode the message and copy it into an allocated buffer. The buffer will
// be maintained for the lifetime of the composed asynchronous operation.
@@ -176,6 +184,39 @@ void test_callback()
//------------------------------------------------------------------------------
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_write_messages(socket,
+ "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
void test_future()
{
asio::io_context io_context;
@@ -208,5 +249,6 @@ void test_future()
int main()
{
test_callback();
+ test_deferred();
test_future();
}
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp
index 4df92a0467d..8bb7cdfd719 100644
--- a/3rdparty/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/parallel_sort.cpp
@@ -2,14 +2,13 @@
// parallel_sort.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
#include <asio.hpp>
-#include <asio/experimental/append.hpp>
#include <asio/experimental/parallel_group.hpp>
#include <algorithm>
#include <chrono>
@@ -89,7 +88,7 @@ auto parallel_sort(
[self = std::make_shared<self_type>(std::move(self))]
{
asio::dispatch(
- asio::experimental::append(
+ asio::append(
std::move(*self), 0));
}
);
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/ranged_wait_for_all.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/ranged_wait_for_all.cpp
new file mode 100644
index 00000000000..18772884072
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/ranged_wait_for_all.cpp
@@ -0,0 +1,70 @@
+//
+// ranged_wait_for_all.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/parallel_group.hpp>
+#include <iostream>
+#include <vector>
+
+#ifdef ASIO_HAS_POSIX_STREAM_DESCRIPTOR
+
+int main()
+{
+ asio::io_context ctx;
+
+ asio::posix::stream_descriptor out(ctx, ::dup(STDOUT_FILENO));
+ asio::posix::stream_descriptor err(ctx, ::dup(STDERR_FILENO));
+
+ using op_type = decltype(
+ out.async_write_some(
+ asio::buffer("", 0),
+ asio::deferred
+ )
+ );
+
+ std::vector<op_type> ops;
+
+ ops.push_back(
+ out.async_write_some(
+ asio::buffer("first\r\n", 7),
+ asio::deferred
+ )
+ );
+
+ ops.push_back(
+ err.async_write_some(
+ asio::buffer("second\r\n", 8),
+ asio::deferred
+ )
+ );
+
+ asio::experimental::make_parallel_group(ops).async_wait(
+ asio::experimental::wait_for_all(),
+ [](
+ std::vector<std::size_t> completion_order,
+ std::vector<std::error_code> ec,
+ std::vector<std::size_t> n
+ )
+ {
+ for (std::size_t i = 0; i < completion_order.size(); ++i)
+ {
+ std::size_t idx = completion_order[i];
+ std::cout << "operation " << idx << " finished: ";
+ std::cout << ec[idx] << ", " << n[idx] << "\n";
+ }
+ }
+ );
+
+ ctx.run();
+}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_all.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_all.cpp
index b216c37d7cc..f007326326b 100644
--- a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_all.cpp
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_all.cpp
@@ -2,7 +2,7 @@
// wait_for_all.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,6 +12,8 @@
#include <asio/experimental/parallel_group.hpp>
#include <iostream>
+#ifdef ASIO_HAS_POSIX_STREAM_DESCRIPTOR
+
int main()
{
asio::io_context ctx;
@@ -56,3 +58,7 @@ int main()
ctx.run();
}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one.cpp
index aa83f4922c3..7b25e26d678 100644
--- a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one.cpp
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one.cpp
@@ -2,7 +2,7 @@
// wait_for_one.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,6 +12,8 @@
#include <asio/experimental/parallel_group.hpp>
#include <iostream>
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
int main()
{
asio::io_context ctx;
@@ -56,3 +58,7 @@ int main()
ctx.run();
}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_error.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_error.cpp
index 584c5c3fc00..c157d0b3355 100644
--- a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_error.cpp
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_error.cpp
@@ -2,7 +2,7 @@
// wait_for_one_error.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,6 +12,8 @@
#include <asio/experimental/parallel_group.hpp>
#include <iostream>
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
int main()
{
asio::io_context ctx;
@@ -56,3 +58,7 @@ int main()
ctx.run();
}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_success.cpp b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_success.cpp
index 45700024423..a328600a9fc 100644
--- a/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_success.cpp
+++ b/3rdparty/asio/src/examples/cpp14/parallel_group/wait_for_one_success.cpp
@@ -2,7 +2,7 @@
// wait_for_one_error.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,6 +12,8 @@
#include <asio/experimental/parallel_group.hpp>
#include <iostream>
+#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
int main()
{
asio::io_context ctx;
@@ -56,3 +58,7 @@ int main()
ctx.run();
}
+
+#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+int main() {}
+#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
diff --git a/3rdparty/asio/src/examples/cpp17/Makefile.in b/3rdparty/asio/src/examples/cpp17/Makefile.in
index 9e2fd3202dc..db35ec4f320 100644
--- a/3rdparty/asio/src/examples/cpp17/Makefile.in
+++ b/3rdparty/asio/src/examples/cpp17/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -244,8 +244,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -259,8 +257,9 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CXX = @CXX@
-CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -269,9 +268,8 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
-EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
-GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -338,9 +336,11 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -558,7 +558,6 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/chat_server.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/chat_server.cpp
index 052f6706e3b..cd5fba32486 100644
--- a/3rdparty/asio/src/examples/cpp17/coroutines_ts/chat_server.cpp
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/chat_server.cpp
@@ -2,7 +2,7 @@
// chat_server.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server.cpp
index 29dd889497b..a9532459f77 100644
--- a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server.cpp
@@ -2,7 +2,7 @@
// echo_server.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_single_default.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_single_default.cpp
index a733bed3b50..4a692acc872 100644
--- a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_single_default.cpp
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_single_default.cpp
@@ -2,7 +2,7 @@
// echo_server_with_as_single_default.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_tuple_default.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_tuple_default.cpp
index 29cb2191fdb..de162cad78e 100644
--- a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_tuple_default.cpp
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_as_tuple_default.cpp
@@ -2,13 +2,13 @@
// echo_server_with_as_tuple_default.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
//
-#include <asio/experimental/as_tuple.hpp>
+#include <asio/as_tuple.hpp>
#include <asio/co_spawn.hpp>
#include <asio/detached.hpp>
#include <asio/io_context.hpp>
@@ -17,7 +17,7 @@
#include <asio/write.hpp>
#include <cstdio>
-using asio::experimental::as_tuple_t;
+using asio::as_tuple_t;
using asio::ip::tcp;
using asio::awaitable;
using asio::co_spawn;
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_default.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_default.cpp
index b78b1c89090..54344d94d56 100644
--- a/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_default.cpp
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/echo_server_with_default.cpp
@@ -2,7 +2,7 @@
// echo_server_with_default.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/range_based_for.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/range_based_for.cpp
index 74210afe1a3..599ed80cd3f 100644
--- a/3rdparty/asio/src/examples/cpp17/coroutines_ts/range_based_for.cpp
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/range_based_for.cpp
@@ -2,7 +2,7 @@
// range_based_for.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp17/coroutines_ts/refactored_echo_server.cpp b/3rdparty/asio/src/examples/cpp17/coroutines_ts/refactored_echo_server.cpp
index 42130093c1c..dc7b03d86e2 100644
--- a/3rdparty/asio/src/examples/cpp17/coroutines_ts/refactored_echo_server.cpp
+++ b/3rdparty/asio/src/examples/cpp17/coroutines_ts/refactored_echo_server.cpp
@@ -2,7 +2,7 @@
// refactored_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/examples/cpp20/Makefile.am b/3rdparty/asio/src/examples/cpp20/Makefile.am
new file mode 100644
index 00000000000..619893c208e
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/Makefile.am
@@ -0,0 +1,79 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
+if SEPARATE_COMPILATION
+noinst_LIBRARIES = libasio.a
+libasio_a_SOURCES = ../../asio.cpp
+if HAVE_OPENSSL
+libasio_a_SOURCES += ../../asio_ssl.cpp
+endif
+LDADD = libasio.a
+endif
+
+noinst_PROGRAMS = \
+ invocation/completion_executor \
+ operations/c_callback_wrapper \
+ operations/callback_wrapper \
+ operations/composed_1 \
+ operations/composed_1 \
+ operations/composed_2 \
+ operations/composed_3 \
+ operations/composed_4 \
+ operations/composed_5 \
+ operations/composed_6 \
+ operations/composed_7 \
+ operations/composed_8
+
+if HAVE_COROUTINES
+noinst_PROGRAMS += \
+ channels/mutual_exclusion_1 \
+ channels/mutual_exclusion_2 \
+ channels/throttling_proxy \
+ coroutines/chat_server \
+ coroutines/echo_server \
+ coroutines/echo_server_with_default \
+ coroutines/echo_server_with_deferred \
+ coroutines/echo_server_with_deferred_default \
+ coroutines/echo_server_with_as_single_default \
+ coroutines/echo_server_with_as_tuple_default \
+ coroutines/refactored_echo_server \
+ coroutines/timeout \
+ type_erasure/type_erasure
+endif
+
+AM_CXXFLAGS = -I$(srcdir)/../../../include
+
+invocation_completion_executor_SOURCES = invocation/completion_executor.cpp
+operations_c_callback_wrapper_SOURCES = operations/c_callback_wrapper.cpp
+operations_callback_wrapper_SOURCES = operations/callback_wrapper.cpp
+operations_composed_1_SOURCES = operations/composed_1.cpp
+operations_composed_2_SOURCES = operations/composed_2.cpp
+operations_composed_3_SOURCES = operations/composed_3.cpp
+operations_composed_4_SOURCES = operations/composed_4.cpp
+operations_composed_5_SOURCES = operations/composed_5.cpp
+operations_composed_6_SOURCES = operations/composed_6.cpp
+operations_composed_7_SOURCES = operations/composed_7.cpp
+operations_composed_8_SOURCES = operations/composed_8.cpp
+
+if HAVE_COROUTINES
+channels_mutual_exclusion_1_SOURCES = channels/mutual_exclusion_1.cpp
+channels_mutual_exclusion_2_SOURCES = channels/mutual_exclusion_2.cpp
+channels_throttling_proxy_SOURCES = channels/throttling_proxy.cpp
+coroutines_chat_server_SOURCES = coroutines/chat_server.cpp
+coroutines_echo_server_SOURCES = coroutines/echo_server.cpp
+coroutines_echo_server_with_default_SOURCES = coroutines/echo_server_with_default.cpp
+coroutines_echo_server_with_deferred_SOURCES = coroutines/echo_server_with_deferred.cpp
+coroutines_echo_server_with_deferred_default_SOURCES = coroutines/echo_server_with_deferred_default.cpp
+coroutines_echo_server_with_as_single_default_SOURCES = coroutines/echo_server_with_as_single_default.cpp
+coroutines_echo_server_with_as_tuple_default_SOURCES = coroutines/echo_server_with_as_tuple_default.cpp
+coroutines_refactored_echo_server_SOURCES = coroutines/refactored_echo_server.cpp
+coroutines_timeout_SOURCES = coroutines/timeout.cpp
+type_erasure_type_erasure_SOURCES = type_erasure/main.cpp type_erasure/stdin_line_reader.cpp type_erasure/sleep.cpp
+endif
+
+EXTRA_DIST = \
+ type_erasure/line_reader.hpp \
+ type_erasure/stdin_line_reader.hpp \
+ type_erasure/sleep.hpp
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
diff --git a/3rdparty/asio/src/examples/cpp20/Makefile.in b/3rdparty/asio/src/examples/cpp20/Makefile.in
new file mode 100644
index 00000000000..87311465ece
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/Makefile.in
@@ -0,0 +1,1173 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__append_1 = ../../asio_ssl.cpp
+noinst_PROGRAMS = invocation/completion_executor$(EXEEXT) \
+ operations/c_callback_wrapper$(EXEEXT) \
+ operations/callback_wrapper$(EXEEXT) \
+ operations/composed_1$(EXEEXT) operations/composed_1$(EXEEXT) \
+ operations/composed_2$(EXEEXT) operations/composed_3$(EXEEXT) \
+ operations/composed_4$(EXEEXT) operations/composed_5$(EXEEXT) \
+ operations/composed_6$(EXEEXT) operations/composed_7$(EXEEXT) \
+ operations/composed_8$(EXEEXT) $(am__EXEEXT_1)
+@HAVE_COROUTINES_TRUE@am__append_2 = \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_1 \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_2 \
+@HAVE_COROUTINES_TRUE@ channels/throttling_proxy \
+@HAVE_COROUTINES_TRUE@ coroutines/chat_server \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_default \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_deferred \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_deferred_default \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_as_single_default \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_as_tuple_default \
+@HAVE_COROUTINES_TRUE@ coroutines/refactored_echo_server \
+@HAVE_COROUTINES_TRUE@ coroutines/timeout \
+@HAVE_COROUTINES_TRUE@ type_erasure/type_erasure
+
+subdir = src/examples/cpp20
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@HAVE_COROUTINES_TRUE@am__EXEEXT_1 = \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_1$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_2$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ channels/throttling_proxy$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/chat_server$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_default$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_deferred$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_deferred_default$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_as_single_default$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server_with_as_tuple_default$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/refactored_echo_server$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ coroutines/timeout$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@ type_erasure/type_erasure$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
+libasio_a_AR = $(AR) $(ARFLAGS)
+libasio_a_LIBADD =
+am__libasio_a_SOURCES_DIST = ../../asio.cpp ../../asio_ssl.cpp
+am__dirstamp = $(am__leading_dot)dirstamp
+@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__objects_1 = ../../asio_ssl.$(OBJEXT)
+@SEPARATE_COMPILATION_TRUE@am_libasio_a_OBJECTS = \
+@SEPARATE_COMPILATION_TRUE@ ../../asio.$(OBJEXT) \
+@SEPARATE_COMPILATION_TRUE@ $(am__objects_1)
+libasio_a_OBJECTS = $(am_libasio_a_OBJECTS)
+am__channels_mutual_exclusion_1_SOURCES_DIST = \
+ channels/mutual_exclusion_1.cpp
+@HAVE_COROUTINES_TRUE@am_channels_mutual_exclusion_1_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_1.$(OBJEXT)
+channels_mutual_exclusion_1_OBJECTS = \
+ $(am_channels_mutual_exclusion_1_OBJECTS)
+channels_mutual_exclusion_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@channels_mutual_exclusion_1_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__channels_mutual_exclusion_2_SOURCES_DIST = \
+ channels/mutual_exclusion_2.cpp
+@HAVE_COROUTINES_TRUE@am_channels_mutual_exclusion_2_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ channels/mutual_exclusion_2.$(OBJEXT)
+channels_mutual_exclusion_2_OBJECTS = \
+ $(am_channels_mutual_exclusion_2_OBJECTS)
+channels_mutual_exclusion_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@channels_mutual_exclusion_2_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__channels_throttling_proxy_SOURCES_DIST = \
+ channels/throttling_proxy.cpp
+@HAVE_COROUTINES_TRUE@am_channels_throttling_proxy_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ channels/throttling_proxy.$(OBJEXT)
+channels_throttling_proxy_OBJECTS = \
+ $(am_channels_throttling_proxy_OBJECTS)
+channels_throttling_proxy_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@channels_throttling_proxy_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_chat_server_SOURCES_DIST = coroutines/chat_server.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_chat_server_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ coroutines/chat_server.$(OBJEXT)
+coroutines_chat_server_OBJECTS = $(am_coroutines_chat_server_OBJECTS)
+coroutines_chat_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_chat_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_SOURCES_DIST = coroutines/echo_server.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ coroutines/echo_server.$(OBJEXT)
+coroutines_echo_server_OBJECTS = $(am_coroutines_echo_server_OBJECTS)
+coroutines_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_with_as_single_default_SOURCES_DIST = \
+ coroutines/echo_server_with_as_single_default.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_with_as_single_default_OBJECTS = coroutines/echo_server_with_as_single_default.$(OBJEXT)
+coroutines_echo_server_with_as_single_default_OBJECTS = \
+ $(am_coroutines_echo_server_with_as_single_default_OBJECTS)
+coroutines_echo_server_with_as_single_default_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_with_as_single_default_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_with_as_tuple_default_SOURCES_DIST = \
+ coroutines/echo_server_with_as_tuple_default.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_with_as_tuple_default_OBJECTS = coroutines/echo_server_with_as_tuple_default.$(OBJEXT)
+coroutines_echo_server_with_as_tuple_default_OBJECTS = \
+ $(am_coroutines_echo_server_with_as_tuple_default_OBJECTS)
+coroutines_echo_server_with_as_tuple_default_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_with_as_tuple_default_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_with_default_SOURCES_DIST = \
+ coroutines/echo_server_with_default.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_with_default_OBJECTS = coroutines/echo_server_with_default.$(OBJEXT)
+coroutines_echo_server_with_default_OBJECTS = \
+ $(am_coroutines_echo_server_with_default_OBJECTS)
+coroutines_echo_server_with_default_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_with_default_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_with_deferred_SOURCES_DIST = \
+ coroutines/echo_server_with_deferred.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_with_deferred_OBJECTS = coroutines/echo_server_with_deferred.$(OBJEXT)
+coroutines_echo_server_with_deferred_OBJECTS = \
+ $(am_coroutines_echo_server_with_deferred_OBJECTS)
+coroutines_echo_server_with_deferred_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_with_deferred_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_echo_server_with_deferred_default_SOURCES_DIST = \
+ coroutines/echo_server_with_deferred_default.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_echo_server_with_deferred_default_OBJECTS = coroutines/echo_server_with_deferred_default.$(OBJEXT)
+coroutines_echo_server_with_deferred_default_OBJECTS = \
+ $(am_coroutines_echo_server_with_deferred_default_OBJECTS)
+coroutines_echo_server_with_deferred_default_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_echo_server_with_deferred_default_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_refactored_echo_server_SOURCES_DIST = \
+ coroutines/refactored_echo_server.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_refactored_echo_server_OBJECTS = coroutines/refactored_echo_server.$(OBJEXT)
+coroutines_refactored_echo_server_OBJECTS = \
+ $(am_coroutines_refactored_echo_server_OBJECTS)
+coroutines_refactored_echo_server_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_refactored_echo_server_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__coroutines_timeout_SOURCES_DIST = coroutines/timeout.cpp
+@HAVE_COROUTINES_TRUE@am_coroutines_timeout_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ coroutines/timeout.$(OBJEXT)
+coroutines_timeout_OBJECTS = $(am_coroutines_timeout_OBJECTS)
+coroutines_timeout_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@coroutines_timeout_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_invocation_completion_executor_OBJECTS = \
+ invocation/completion_executor.$(OBJEXT)
+invocation_completion_executor_OBJECTS = \
+ $(am_invocation_completion_executor_OBJECTS)
+invocation_completion_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@invocation_completion_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_c_callback_wrapper_OBJECTS = \
+ operations/c_callback_wrapper.$(OBJEXT)
+operations_c_callback_wrapper_OBJECTS = \
+ $(am_operations_c_callback_wrapper_OBJECTS)
+operations_c_callback_wrapper_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_c_callback_wrapper_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_callback_wrapper_OBJECTS = \
+ operations/callback_wrapper.$(OBJEXT)
+operations_callback_wrapper_OBJECTS = \
+ $(am_operations_callback_wrapper_OBJECTS)
+operations_callback_wrapper_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_callback_wrapper_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_1_OBJECTS = operations/composed_1.$(OBJEXT)
+operations_composed_1_OBJECTS = $(am_operations_composed_1_OBJECTS)
+operations_composed_1_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_1_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_2_OBJECTS = operations/composed_2.$(OBJEXT)
+operations_composed_2_OBJECTS = $(am_operations_composed_2_OBJECTS)
+operations_composed_2_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_2_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_3_OBJECTS = operations/composed_3.$(OBJEXT)
+operations_composed_3_OBJECTS = $(am_operations_composed_3_OBJECTS)
+operations_composed_3_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_3_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_4_OBJECTS = operations/composed_4.$(OBJEXT)
+operations_composed_4_OBJECTS = $(am_operations_composed_4_OBJECTS)
+operations_composed_4_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_4_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_5_OBJECTS = operations/composed_5.$(OBJEXT)
+operations_composed_5_OBJECTS = $(am_operations_composed_5_OBJECTS)
+operations_composed_5_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_5_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_6_OBJECTS = operations/composed_6.$(OBJEXT)
+operations_composed_6_OBJECTS = $(am_operations_composed_6_OBJECTS)
+operations_composed_6_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_6_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_7_OBJECTS = operations/composed_7.$(OBJEXT)
+operations_composed_7_OBJECTS = $(am_operations_composed_7_OBJECTS)
+operations_composed_7_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_7_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_operations_composed_8_OBJECTS = operations/composed_8.$(OBJEXT)
+operations_composed_8_OBJECTS = $(am_operations_composed_8_OBJECTS)
+operations_composed_8_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@operations_composed_8_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__type_erasure_type_erasure_SOURCES_DIST = type_erasure/main.cpp \
+ type_erasure/stdin_line_reader.cpp type_erasure/sleep.cpp
+@HAVE_COROUTINES_TRUE@am_type_erasure_type_erasure_OBJECTS = \
+@HAVE_COROUTINES_TRUE@ type_erasure/main.$(OBJEXT) \
+@HAVE_COROUTINES_TRUE@ type_erasure/stdin_line_reader.$(OBJEXT) \
+@HAVE_COROUTINES_TRUE@ type_erasure/sleep.$(OBJEXT)
+type_erasure_type_erasure_OBJECTS = \
+ $(am_type_erasure_type_erasure_OBJECTS)
+type_erasure_type_erasure_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@type_erasure_type_erasure_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ../../$(DEPDIR)/asio.Po \
+ ../../$(DEPDIR)/asio_ssl.Po \
+ channels/$(DEPDIR)/mutual_exclusion_1.Po \
+ channels/$(DEPDIR)/mutual_exclusion_2.Po \
+ channels/$(DEPDIR)/throttling_proxy.Po \
+ coroutines/$(DEPDIR)/chat_server.Po \
+ coroutines/$(DEPDIR)/echo_server.Po \
+ coroutines/$(DEPDIR)/echo_server_with_as_single_default.Po \
+ coroutines/$(DEPDIR)/echo_server_with_as_tuple_default.Po \
+ coroutines/$(DEPDIR)/echo_server_with_default.Po \
+ coroutines/$(DEPDIR)/echo_server_with_deferred.Po \
+ coroutines/$(DEPDIR)/echo_server_with_deferred_default.Po \
+ coroutines/$(DEPDIR)/refactored_echo_server.Po \
+ coroutines/$(DEPDIR)/timeout.Po \
+ invocation/$(DEPDIR)/completion_executor.Po \
+ operations/$(DEPDIR)/c_callback_wrapper.Po \
+ operations/$(DEPDIR)/callback_wrapper.Po \
+ operations/$(DEPDIR)/composed_1.Po \
+ operations/$(DEPDIR)/composed_2.Po \
+ operations/$(DEPDIR)/composed_3.Po \
+ operations/$(DEPDIR)/composed_4.Po \
+ operations/$(DEPDIR)/composed_5.Po \
+ operations/$(DEPDIR)/composed_6.Po \
+ operations/$(DEPDIR)/composed_7.Po \
+ operations/$(DEPDIR)/composed_8.Po \
+ type_erasure/$(DEPDIR)/main.Po type_erasure/$(DEPDIR)/sleep.Po \
+ type_erasure/$(DEPDIR)/stdin_line_reader.Po
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
+SOURCES = $(libasio_a_SOURCES) $(channels_mutual_exclusion_1_SOURCES) \
+ $(channels_mutual_exclusion_2_SOURCES) \
+ $(channels_throttling_proxy_SOURCES) \
+ $(coroutines_chat_server_SOURCES) \
+ $(coroutines_echo_server_SOURCES) \
+ $(coroutines_echo_server_with_as_single_default_SOURCES) \
+ $(coroutines_echo_server_with_as_tuple_default_SOURCES) \
+ $(coroutines_echo_server_with_default_SOURCES) \
+ $(coroutines_echo_server_with_deferred_SOURCES) \
+ $(coroutines_echo_server_with_deferred_default_SOURCES) \
+ $(coroutines_refactored_echo_server_SOURCES) \
+ $(coroutines_timeout_SOURCES) \
+ $(invocation_completion_executor_SOURCES) \
+ $(operations_c_callback_wrapper_SOURCES) \
+ $(operations_callback_wrapper_SOURCES) \
+ $(operations_composed_1_SOURCES) \
+ $(operations_composed_2_SOURCES) \
+ $(operations_composed_3_SOURCES) \
+ $(operations_composed_4_SOURCES) \
+ $(operations_composed_5_SOURCES) \
+ $(operations_composed_6_SOURCES) \
+ $(operations_composed_7_SOURCES) \
+ $(operations_composed_8_SOURCES) \
+ $(type_erasure_type_erasure_SOURCES)
+DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
+ $(am__channels_mutual_exclusion_1_SOURCES_DIST) \
+ $(am__channels_mutual_exclusion_2_SOURCES_DIST) \
+ $(am__channels_throttling_proxy_SOURCES_DIST) \
+ $(am__coroutines_chat_server_SOURCES_DIST) \
+ $(am__coroutines_echo_server_SOURCES_DIST) \
+ $(am__coroutines_echo_server_with_as_single_default_SOURCES_DIST) \
+ $(am__coroutines_echo_server_with_as_tuple_default_SOURCES_DIST) \
+ $(am__coroutines_echo_server_with_default_SOURCES_DIST) \
+ $(am__coroutines_echo_server_with_deferred_SOURCES_DIST) \
+ $(am__coroutines_echo_server_with_deferred_default_SOURCES_DIST) \
+ $(am__coroutines_refactored_echo_server_SOURCES_DIST) \
+ $(am__coroutines_timeout_SOURCES_DIST) \
+ $(invocation_completion_executor_SOURCES) \
+ $(operations_c_callback_wrapper_SOURCES) \
+ $(operations_callback_wrapper_SOURCES) \
+ $(operations_composed_1_SOURCES) \
+ $(operations_composed_2_SOURCES) \
+ $(operations_composed_3_SOURCES) \
+ $(operations_composed_4_SOURCES) \
+ $(operations_composed_5_SOURCES) \
+ $(operations_composed_6_SOURCES) \
+ $(operations_composed_7_SOURCES) \
+ $(operations_composed_8_SOURCES) \
+ $(am__type_erasure_type_erasure_SOURCES_DIST)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = subdir-objects
+@SEPARATE_COMPILATION_TRUE@noinst_LIBRARIES = libasio.a
+@SEPARATE_COMPILATION_TRUE@libasio_a_SOURCES = ../../asio.cpp \
+@SEPARATE_COMPILATION_TRUE@ $(am__append_1)
+@SEPARATE_COMPILATION_TRUE@LDADD = libasio.a
+AM_CXXFLAGS = -I$(srcdir)/../../../include
+invocation_completion_executor_SOURCES = invocation/completion_executor.cpp
+operations_c_callback_wrapper_SOURCES = operations/c_callback_wrapper.cpp
+operations_callback_wrapper_SOURCES = operations/callback_wrapper.cpp
+operations_composed_1_SOURCES = operations/composed_1.cpp
+operations_composed_2_SOURCES = operations/composed_2.cpp
+operations_composed_3_SOURCES = operations/composed_3.cpp
+operations_composed_4_SOURCES = operations/composed_4.cpp
+operations_composed_5_SOURCES = operations/composed_5.cpp
+operations_composed_6_SOURCES = operations/composed_6.cpp
+operations_composed_7_SOURCES = operations/composed_7.cpp
+operations_composed_8_SOURCES = operations/composed_8.cpp
+@HAVE_COROUTINES_TRUE@channels_mutual_exclusion_1_SOURCES = channels/mutual_exclusion_1.cpp
+@HAVE_COROUTINES_TRUE@channels_mutual_exclusion_2_SOURCES = channels/mutual_exclusion_2.cpp
+@HAVE_COROUTINES_TRUE@channels_throttling_proxy_SOURCES = channels/throttling_proxy.cpp
+@HAVE_COROUTINES_TRUE@coroutines_chat_server_SOURCES = coroutines/chat_server.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_SOURCES = coroutines/echo_server.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_with_default_SOURCES = coroutines/echo_server_with_default.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_with_deferred_SOURCES = coroutines/echo_server_with_deferred.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_with_deferred_default_SOURCES = coroutines/echo_server_with_deferred_default.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_with_as_single_default_SOURCES = coroutines/echo_server_with_as_single_default.cpp
+@HAVE_COROUTINES_TRUE@coroutines_echo_server_with_as_tuple_default_SOURCES = coroutines/echo_server_with_as_tuple_default.cpp
+@HAVE_COROUTINES_TRUE@coroutines_refactored_echo_server_SOURCES = coroutines/refactored_echo_server.cpp
+@HAVE_COROUTINES_TRUE@coroutines_timeout_SOURCES = coroutines/timeout.cpp
+@HAVE_COROUTINES_TRUE@type_erasure_type_erasure_SOURCES = type_erasure/main.cpp type_erasure/stdin_line_reader.cpp type_erasure/sleep.cpp
+EXTRA_DIST = \
+ type_erasure/line_reader.hpp \
+ type_erasure/stdin_line_reader.hpp \
+ type_erasure/sleep.hpp
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/examples/cpp20/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/examples/cpp20/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+../../$(am__dirstamp):
+ @$(MKDIR_P) ../..
+ @: > ../../$(am__dirstamp)
+../../$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) ../../$(DEPDIR)
+ @: > ../../$(DEPDIR)/$(am__dirstamp)
+../../asio.$(OBJEXT): ../../$(am__dirstamp) \
+ ../../$(DEPDIR)/$(am__dirstamp)
+../../asio_ssl.$(OBJEXT): ../../$(am__dirstamp) \
+ ../../$(DEPDIR)/$(am__dirstamp)
+
+libasio.a: $(libasio_a_OBJECTS) $(libasio_a_DEPENDENCIES) $(EXTRA_libasio_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libasio.a
+ $(AM_V_AR)$(libasio_a_AR) libasio.a $(libasio_a_OBJECTS) $(libasio_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libasio.a
+channels/$(am__dirstamp):
+ @$(MKDIR_P) channels
+ @: > channels/$(am__dirstamp)
+channels/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) channels/$(DEPDIR)
+ @: > channels/$(DEPDIR)/$(am__dirstamp)
+channels/mutual_exclusion_1.$(OBJEXT): channels/$(am__dirstamp) \
+ channels/$(DEPDIR)/$(am__dirstamp)
+
+channels/mutual_exclusion_1$(EXEEXT): $(channels_mutual_exclusion_1_OBJECTS) $(channels_mutual_exclusion_1_DEPENDENCIES) $(EXTRA_channels_mutual_exclusion_1_DEPENDENCIES) channels/$(am__dirstamp)
+ @rm -f channels/mutual_exclusion_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(channels_mutual_exclusion_1_OBJECTS) $(channels_mutual_exclusion_1_LDADD) $(LIBS)
+channels/mutual_exclusion_2.$(OBJEXT): channels/$(am__dirstamp) \
+ channels/$(DEPDIR)/$(am__dirstamp)
+
+channels/mutual_exclusion_2$(EXEEXT): $(channels_mutual_exclusion_2_OBJECTS) $(channels_mutual_exclusion_2_DEPENDENCIES) $(EXTRA_channels_mutual_exclusion_2_DEPENDENCIES) channels/$(am__dirstamp)
+ @rm -f channels/mutual_exclusion_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(channels_mutual_exclusion_2_OBJECTS) $(channels_mutual_exclusion_2_LDADD) $(LIBS)
+channels/throttling_proxy.$(OBJEXT): channels/$(am__dirstamp) \
+ channels/$(DEPDIR)/$(am__dirstamp)
+
+channels/throttling_proxy$(EXEEXT): $(channels_throttling_proxy_OBJECTS) $(channels_throttling_proxy_DEPENDENCIES) $(EXTRA_channels_throttling_proxy_DEPENDENCIES) channels/$(am__dirstamp)
+ @rm -f channels/throttling_proxy$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(channels_throttling_proxy_OBJECTS) $(channels_throttling_proxy_LDADD) $(LIBS)
+coroutines/$(am__dirstamp):
+ @$(MKDIR_P) coroutines
+ @: > coroutines/$(am__dirstamp)
+coroutines/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) coroutines/$(DEPDIR)
+ @: > coroutines/$(DEPDIR)/$(am__dirstamp)
+coroutines/chat_server.$(OBJEXT): coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/chat_server$(EXEEXT): $(coroutines_chat_server_OBJECTS) $(coroutines_chat_server_DEPENDENCIES) $(EXTRA_coroutines_chat_server_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/chat_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_chat_server_OBJECTS) $(coroutines_chat_server_LDADD) $(LIBS)
+coroutines/echo_server.$(OBJEXT): coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server$(EXEEXT): $(coroutines_echo_server_OBJECTS) $(coroutines_echo_server_DEPENDENCIES) $(EXTRA_coroutines_echo_server_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_OBJECTS) $(coroutines_echo_server_LDADD) $(LIBS)
+coroutines/echo_server_with_as_single_default.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server_with_as_single_default$(EXEEXT): $(coroutines_echo_server_with_as_single_default_OBJECTS) $(coroutines_echo_server_with_as_single_default_DEPENDENCIES) $(EXTRA_coroutines_echo_server_with_as_single_default_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server_with_as_single_default$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_with_as_single_default_OBJECTS) $(coroutines_echo_server_with_as_single_default_LDADD) $(LIBS)
+coroutines/echo_server_with_as_tuple_default.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server_with_as_tuple_default$(EXEEXT): $(coroutines_echo_server_with_as_tuple_default_OBJECTS) $(coroutines_echo_server_with_as_tuple_default_DEPENDENCIES) $(EXTRA_coroutines_echo_server_with_as_tuple_default_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server_with_as_tuple_default$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_with_as_tuple_default_OBJECTS) $(coroutines_echo_server_with_as_tuple_default_LDADD) $(LIBS)
+coroutines/echo_server_with_default.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server_with_default$(EXEEXT): $(coroutines_echo_server_with_default_OBJECTS) $(coroutines_echo_server_with_default_DEPENDENCIES) $(EXTRA_coroutines_echo_server_with_default_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server_with_default$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_with_default_OBJECTS) $(coroutines_echo_server_with_default_LDADD) $(LIBS)
+coroutines/echo_server_with_deferred.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server_with_deferred$(EXEEXT): $(coroutines_echo_server_with_deferred_OBJECTS) $(coroutines_echo_server_with_deferred_DEPENDENCIES) $(EXTRA_coroutines_echo_server_with_deferred_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server_with_deferred$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_with_deferred_OBJECTS) $(coroutines_echo_server_with_deferred_LDADD) $(LIBS)
+coroutines/echo_server_with_deferred_default.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/echo_server_with_deferred_default$(EXEEXT): $(coroutines_echo_server_with_deferred_default_OBJECTS) $(coroutines_echo_server_with_deferred_default_DEPENDENCIES) $(EXTRA_coroutines_echo_server_with_deferred_default_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/echo_server_with_deferred_default$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_echo_server_with_deferred_default_OBJECTS) $(coroutines_echo_server_with_deferred_default_LDADD) $(LIBS)
+coroutines/refactored_echo_server.$(OBJEXT): \
+ coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/refactored_echo_server$(EXEEXT): $(coroutines_refactored_echo_server_OBJECTS) $(coroutines_refactored_echo_server_DEPENDENCIES) $(EXTRA_coroutines_refactored_echo_server_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/refactored_echo_server$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_refactored_echo_server_OBJECTS) $(coroutines_refactored_echo_server_LDADD) $(LIBS)
+coroutines/timeout.$(OBJEXT): coroutines/$(am__dirstamp) \
+ coroutines/$(DEPDIR)/$(am__dirstamp)
+
+coroutines/timeout$(EXEEXT): $(coroutines_timeout_OBJECTS) $(coroutines_timeout_DEPENDENCIES) $(EXTRA_coroutines_timeout_DEPENDENCIES) coroutines/$(am__dirstamp)
+ @rm -f coroutines/timeout$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(coroutines_timeout_OBJECTS) $(coroutines_timeout_LDADD) $(LIBS)
+invocation/$(am__dirstamp):
+ @$(MKDIR_P) invocation
+ @: > invocation/$(am__dirstamp)
+invocation/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) invocation/$(DEPDIR)
+ @: > invocation/$(DEPDIR)/$(am__dirstamp)
+invocation/completion_executor.$(OBJEXT): invocation/$(am__dirstamp) \
+ invocation/$(DEPDIR)/$(am__dirstamp)
+
+invocation/completion_executor$(EXEEXT): $(invocation_completion_executor_OBJECTS) $(invocation_completion_executor_DEPENDENCIES) $(EXTRA_invocation_completion_executor_DEPENDENCIES) invocation/$(am__dirstamp)
+ @rm -f invocation/completion_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(invocation_completion_executor_OBJECTS) $(invocation_completion_executor_LDADD) $(LIBS)
+operations/$(am__dirstamp):
+ @$(MKDIR_P) operations
+ @: > operations/$(am__dirstamp)
+operations/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) operations/$(DEPDIR)
+ @: > operations/$(DEPDIR)/$(am__dirstamp)
+operations/c_callback_wrapper.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/c_callback_wrapper$(EXEEXT): $(operations_c_callback_wrapper_OBJECTS) $(operations_c_callback_wrapper_DEPENDENCIES) $(EXTRA_operations_c_callback_wrapper_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/c_callback_wrapper$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_c_callback_wrapper_OBJECTS) $(operations_c_callback_wrapper_LDADD) $(LIBS)
+operations/callback_wrapper.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/callback_wrapper$(EXEEXT): $(operations_callback_wrapper_OBJECTS) $(operations_callback_wrapper_DEPENDENCIES) $(EXTRA_operations_callback_wrapper_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/callback_wrapper$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_callback_wrapper_OBJECTS) $(operations_callback_wrapper_LDADD) $(LIBS)
+operations/composed_1.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_1$(EXEEXT): $(operations_composed_1_OBJECTS) $(operations_composed_1_DEPENDENCIES) $(EXTRA_operations_composed_1_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_1$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_1_OBJECTS) $(operations_composed_1_LDADD) $(LIBS)
+operations/composed_2.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_2$(EXEEXT): $(operations_composed_2_OBJECTS) $(operations_composed_2_DEPENDENCIES) $(EXTRA_operations_composed_2_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_2$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_2_OBJECTS) $(operations_composed_2_LDADD) $(LIBS)
+operations/composed_3.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_3$(EXEEXT): $(operations_composed_3_OBJECTS) $(operations_composed_3_DEPENDENCIES) $(EXTRA_operations_composed_3_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_3$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_3_OBJECTS) $(operations_composed_3_LDADD) $(LIBS)
+operations/composed_4.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_4$(EXEEXT): $(operations_composed_4_OBJECTS) $(operations_composed_4_DEPENDENCIES) $(EXTRA_operations_composed_4_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_4$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_4_OBJECTS) $(operations_composed_4_LDADD) $(LIBS)
+operations/composed_5.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_5$(EXEEXT): $(operations_composed_5_OBJECTS) $(operations_composed_5_DEPENDENCIES) $(EXTRA_operations_composed_5_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_5$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_5_OBJECTS) $(operations_composed_5_LDADD) $(LIBS)
+operations/composed_6.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_6$(EXEEXT): $(operations_composed_6_OBJECTS) $(operations_composed_6_DEPENDENCIES) $(EXTRA_operations_composed_6_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_6$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_6_OBJECTS) $(operations_composed_6_LDADD) $(LIBS)
+operations/composed_7.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_7$(EXEEXT): $(operations_composed_7_OBJECTS) $(operations_composed_7_DEPENDENCIES) $(EXTRA_operations_composed_7_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_7$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_7_OBJECTS) $(operations_composed_7_LDADD) $(LIBS)
+operations/composed_8.$(OBJEXT): operations/$(am__dirstamp) \
+ operations/$(DEPDIR)/$(am__dirstamp)
+
+operations/composed_8$(EXEEXT): $(operations_composed_8_OBJECTS) $(operations_composed_8_DEPENDENCIES) $(EXTRA_operations_composed_8_DEPENDENCIES) operations/$(am__dirstamp)
+ @rm -f operations/composed_8$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(operations_composed_8_OBJECTS) $(operations_composed_8_LDADD) $(LIBS)
+type_erasure/$(am__dirstamp):
+ @$(MKDIR_P) type_erasure
+ @: > type_erasure/$(am__dirstamp)
+type_erasure/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) type_erasure/$(DEPDIR)
+ @: > type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/main.$(OBJEXT): type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/stdin_line_reader.$(OBJEXT): \
+ type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+type_erasure/sleep.$(OBJEXT): type_erasure/$(am__dirstamp) \
+ type_erasure/$(DEPDIR)/$(am__dirstamp)
+
+type_erasure/type_erasure$(EXEEXT): $(type_erasure_type_erasure_OBJECTS) $(type_erasure_type_erasure_DEPENDENCIES) $(EXTRA_type_erasure_type_erasure_DEPENDENCIES) type_erasure/$(am__dirstamp)
+ @rm -f type_erasure/type_erasure$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(type_erasure_type_erasure_OBJECTS) $(type_erasure_type_erasure_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f ../../*.$(OBJEXT)
+ -rm -f channels/*.$(OBJEXT)
+ -rm -f coroutines/*.$(OBJEXT)
+ -rm -f invocation/*.$(OBJEXT)
+ -rm -f operations/*.$(OBJEXT)
+ -rm -f type_erasure/*.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@../../$(DEPDIR)/asio_ssl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@channels/$(DEPDIR)/mutual_exclusion_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@channels/$(DEPDIR)/mutual_exclusion_2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@channels/$(DEPDIR)/throttling_proxy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/chat_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server_with_as_single_default.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server_with_as_tuple_default.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server_with_default.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server_with_deferred.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/echo_server_with_deferred_default.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/refactored_echo_server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@coroutines/$(DEPDIR)/timeout.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@invocation/$(DEPDIR)/completion_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/c_callback_wrapper.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/callback_wrapper.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_3.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_4.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_5.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_6.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_7.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@operations/$(DEPDIR)/composed_8.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/sleep.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@type_erasure/$(DEPDIR)/stdin_line_reader.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(LIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f ../../$(DEPDIR)/$(am__dirstamp)
+ -rm -f ../../$(am__dirstamp)
+ -rm -f channels/$(DEPDIR)/$(am__dirstamp)
+ -rm -f channels/$(am__dirstamp)
+ -rm -f coroutines/$(DEPDIR)/$(am__dirstamp)
+ -rm -f coroutines/$(am__dirstamp)
+ -rm -f invocation/$(DEPDIR)/$(am__dirstamp)
+ -rm -f invocation/$(am__dirstamp)
+ -rm -f operations/$(DEPDIR)/$(am__dirstamp)
+ -rm -f operations/$(am__dirstamp)
+ -rm -f type_erasure/$(DEPDIR)/$(am__dirstamp)
+ -rm -f type_erasure/$(am__dirstamp)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ../../$(DEPDIR)/asio.Po
+ -rm -f ../../$(DEPDIR)/asio_ssl.Po
+ -rm -f channels/$(DEPDIR)/mutual_exclusion_1.Po
+ -rm -f channels/$(DEPDIR)/mutual_exclusion_2.Po
+ -rm -f channels/$(DEPDIR)/throttling_proxy.Po
+ -rm -f coroutines/$(DEPDIR)/chat_server.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_as_single_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_as_tuple_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_deferred.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_deferred_default.Po
+ -rm -f coroutines/$(DEPDIR)/refactored_echo_server.Po
+ -rm -f coroutines/$(DEPDIR)/timeout.Po
+ -rm -f invocation/$(DEPDIR)/completion_executor.Po
+ -rm -f operations/$(DEPDIR)/c_callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/composed_1.Po
+ -rm -f operations/$(DEPDIR)/composed_2.Po
+ -rm -f operations/$(DEPDIR)/composed_3.Po
+ -rm -f operations/$(DEPDIR)/composed_4.Po
+ -rm -f operations/$(DEPDIR)/composed_5.Po
+ -rm -f operations/$(DEPDIR)/composed_6.Po
+ -rm -f operations/$(DEPDIR)/composed_7.Po
+ -rm -f operations/$(DEPDIR)/composed_8.Po
+ -rm -f type_erasure/$(DEPDIR)/main.Po
+ -rm -f type_erasure/$(DEPDIR)/sleep.Po
+ -rm -f type_erasure/$(DEPDIR)/stdin_line_reader.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ../../$(DEPDIR)/asio.Po
+ -rm -f ../../$(DEPDIR)/asio_ssl.Po
+ -rm -f channels/$(DEPDIR)/mutual_exclusion_1.Po
+ -rm -f channels/$(DEPDIR)/mutual_exclusion_2.Po
+ -rm -f channels/$(DEPDIR)/throttling_proxy.Po
+ -rm -f coroutines/$(DEPDIR)/chat_server.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_as_single_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_as_tuple_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_default.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_deferred.Po
+ -rm -f coroutines/$(DEPDIR)/echo_server_with_deferred_default.Po
+ -rm -f coroutines/$(DEPDIR)/refactored_echo_server.Po
+ -rm -f coroutines/$(DEPDIR)/timeout.Po
+ -rm -f invocation/$(DEPDIR)/completion_executor.Po
+ -rm -f operations/$(DEPDIR)/c_callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/callback_wrapper.Po
+ -rm -f operations/$(DEPDIR)/composed_1.Po
+ -rm -f operations/$(DEPDIR)/composed_2.Po
+ -rm -f operations/$(DEPDIR)/composed_3.Po
+ -rm -f operations/$(DEPDIR)/composed_4.Po
+ -rm -f operations/$(DEPDIR)/composed_5.Po
+ -rm -f operations/$(DEPDIR)/composed_6.Po
+ -rm -f operations/$(DEPDIR)/composed_7.Po
+ -rm -f operations/$(DEPDIR)/composed_8.Po
+ -rm -f type_erasure/$(DEPDIR)/main.Po
+ -rm -f type_erasure/$(DEPDIR)/sleep.Po
+ -rm -f type_erasure/$(DEPDIR)/stdin_line_reader.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp b/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp
new file mode 100644
index 00000000000..79654f1e8f1
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp
@@ -0,0 +1,182 @@
+//
+// mutual_exclusion_1.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/channel.hpp>
+#include <iostream>
+#include <memory>
+
+using asio::as_tuple;
+using asio::awaitable;
+using asio::dynamic_buffer;
+using asio::co_spawn;
+using asio::deferred;
+using asio::detached;
+using asio::experimental::channel;
+using asio::io_context;
+using asio::ip::tcp;
+using asio::steady_timer;
+using namespace asio::buffer_literals;
+using namespace std::literals::chrono_literals;
+
+// This class implements a simple line-based protocol:
+//
+// * For event line that is received from the client, the session sends a
+// message header followed by the content of the line as the message body.
+//
+// * The session generates heartbeat messages once a second.
+//
+// This protocol is implemented using two actors, handle_messages() and
+// send_heartbeats(), each written as a coroutine.
+class line_based_echo_session :
+ public std::enable_shared_from_this<line_based_echo_session>
+{
+ // The socket used to read from and write to the client. This socket is a
+ // data member as it is shared between the two actors.
+ tcp::socket socket_;
+
+ // As both of the actors will write to the socket, we need a lock to prevent
+ // these writes from overlapping. To achieve this, we use a channel with a
+ // buffer size of one. The lock is claimed by sending a message to the
+ // channel, and then released by receiving this message back again. If the
+ // lock is not held then the channel's buffer is empty, and the send will
+ // complete without delay. Otherwise, if the lock is held by the other actor,
+ // then the send operation will not complete until the lock is released.
+ channel<void()> write_lock_{socket_.get_executor(), 1};
+
+public:
+ line_based_echo_session(tcp::socket socket)
+ : socket_{std::move(socket)}
+ {
+ socket_.set_option(tcp::no_delay(true));
+ }
+
+ void start()
+ {
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->handle_messages(); },
+ detached);
+
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->send_heartbeats(); },
+ detached);
+ }
+
+private:
+ void stop()
+ {
+ socket_.close();
+ write_lock_.cancel();
+ }
+
+ awaitable<void> handle_messages()
+ {
+ try
+ {
+ constexpr std::size_t max_line_length = 1024;
+ std::string data;
+ for (;;)
+ {
+ // Read an entire line from the client.
+ std::size_t length = co_await async_read_until(socket_,
+ dynamic_buffer(data, max_line_length), '\n', deferred);
+
+ // Claim the write lock by sending a message to the channel. Since the
+ // channel signature is void(), there are no arguments to send in the
+ // message itself.
+ co_await write_lock_.async_send(deferred);
+
+ // Respond to the client with a message, echoing the line they sent.
+ co_await async_write(socket_, "<line>"_buf, deferred);
+ co_await async_write(socket_, dynamic_buffer(data, length), deferred);
+
+ // Release the lock by receiving the message back again.
+ write_lock_.try_receive([](auto...){});
+ }
+ }
+ catch (const std::exception&)
+ {
+ stop();
+ }
+ }
+
+ awaitable<void> send_heartbeats()
+ {
+ steady_timer timer{socket_.get_executor()};
+ try
+ {
+ for (;;)
+ {
+ // Wait one second before trying to send the next heartbeat.
+ timer.expires_after(1s);
+ co_await timer.async_wait(deferred);
+
+ // Claim the write lock by sending a message to the channel. Since the
+ // channel signature is void(), there are no arguments to send in the
+ // message itself.
+ co_await write_lock_.async_send(deferred);
+
+ // Send a heartbeat to the client. As the content of the heartbeat
+ // message never varies, a buffer literal can be used to specify the
+ // bytes of the message. The memory associated with a buffer literal is
+ // valid for the lifetime of the program, which mean that the buffer
+ // can be safely passed as-is to the asynchronous operation.
+ co_await async_write(socket_, "<heartbeat>\n"_buf, deferred);
+
+ // Release the lock by receiving the message back again.
+ write_lock_.try_receive([](auto...){});
+ }
+ }
+ catch (const std::exception&)
+ {
+ stop();
+ }
+ }
+
+};
+
+awaitable<void> listen(tcp::acceptor& acceptor)
+{
+ for (;;)
+ {
+ auto [e, socket] = co_await acceptor.async_accept(as_tuple(deferred));
+ if (!e)
+ {
+ std::make_shared<line_based_echo_session>(std::move(socket))->start();
+ }
+ }
+}
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: mutual_exclusion_1";
+ std::cerr << " <listen_address> <listen_port>\n";
+ return 1;
+ }
+
+ io_context ctx;
+
+ auto listen_endpoint =
+ *tcp::resolver(ctx).resolve(argv[1], argv[2],
+ tcp::resolver::passive).begin();
+
+ tcp::acceptor acceptor(ctx, listen_endpoint);
+ co_spawn(ctx, listen(acceptor), detached);
+ ctx.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp b/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp
new file mode 100644
index 00000000000..46cfeb647a2
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/channels/mutual_exclusion_2.cpp
@@ -0,0 +1,192 @@
+//
+// mutual_exclusion_2.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/channel.hpp>
+#include <iostream>
+#include <memory>
+
+using asio::as_tuple;
+using asio::awaitable;
+using asio::dynamic_buffer;
+using asio::co_spawn;
+using asio::deferred;
+using asio::detached;
+using asio::experimental::channel;
+using asio::io_context;
+using asio::ip::tcp;
+using asio::steady_timer;
+using namespace asio::buffer_literals;
+using namespace std::literals::chrono_literals;
+
+// This class implements a simple line-based protocol:
+//
+// * For event line that is received from the client, the session sends a
+// message header followed by the content of the line as the message body.
+//
+// * The session generates heartbeat messages once a second.
+//
+// This protocol is implemented using two actors, handle_messages() and
+// send_heartbeats(), each written as a coroutine.
+class line_based_echo_session :
+ public std::enable_shared_from_this<line_based_echo_session>
+{
+ // The socket used to read from and write to the client. This socket is a
+ // data member as it is shared between the two actors.
+ tcp::socket socket_;
+
+ // As both of the actors will write to the socket, we need a lock to prevent
+ // these writes from overlapping. To achieve this, we use a channel with a
+ // buffer size of one. The lock is claimed by sending a message to the
+ // channel, and then released by receiving this message back again. If the
+ // lock is not held then the channel's buffer is empty, and the send will
+ // complete without delay. Otherwise, if the lock is held by the other actor,
+ // then the send operation will not complete until the lock is released.
+ channel<void()> write_lock_{socket_.get_executor(), 1};
+
+public:
+ line_based_echo_session(tcp::socket socket)
+ : socket_{std::move(socket)}
+ {
+ socket_.set_option(tcp::no_delay(true));
+ }
+
+ void start()
+ {
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->handle_messages(); },
+ detached);
+
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->send_heartbeats(); },
+ detached);
+ }
+
+private:
+ void stop()
+ {
+ socket_.close();
+ write_lock_.cancel();
+ }
+
+ awaitable<void> handle_messages()
+ {
+ try
+ {
+ constexpr std::size_t max_line_length = 1024;
+ std::string data;
+ for (;;)
+ {
+ // Read an entire line from the client.
+ std::size_t length = co_await async_read_until(socket_,
+ dynamic_buffer(data, max_line_length), '\n', deferred);
+
+ // Claim the write lock by sending a message to the channel. Since the
+ // channel signature is void(), there are no arguments to send in the
+ // message itself. In this example we optimise for the common case,
+ // where the lock is not held by the other actor, by first trying a
+ // non-blocking send.
+ if (!write_lock_.try_send())
+ {
+ co_await write_lock_.async_send(deferred);
+ }
+
+ // Respond to the client with a message, echoing the line they sent.
+ co_await async_write(socket_, "<line>"_buf, deferred);
+ co_await async_write(socket_, dynamic_buffer(data, length), deferred);
+
+ // Release the lock by receiving the message back again.
+ write_lock_.try_receive([](auto...){});
+ }
+ }
+ catch (const std::exception&)
+ {
+ stop();
+ }
+ }
+
+ awaitable<void> send_heartbeats()
+ {
+ steady_timer timer{socket_.get_executor()};
+ try
+ {
+ for (;;)
+ {
+ // Wait one second before trying to send the next heartbeat.
+ timer.expires_after(1s);
+ co_await timer.async_wait(deferred);
+
+ // Claim the write lock by sending a message to the channel. Since the
+ // channel signature is void(), there are no arguments to send in the
+ // message itself. In this example we optimise for the common case,
+ // where the lock is not held by the other actor, by first trying a
+ // non-blocking send.
+ if (!write_lock_.try_send())
+ {
+ co_await write_lock_.async_send(deferred);
+ }
+
+ // Send a heartbeat to the client. As the content of the heartbeat
+ // message never varies, a buffer literal can be used to specify the
+ // bytes of the message. The memory associated with a buffer literal is
+ // valid for the lifetime of the program, which mean that the buffer
+ // can be safely passed as-is to the asynchronous operation.
+ co_await async_write(socket_, "<heartbeat>\n"_buf, deferred);
+
+ // Release the lock by receiving the message back again.
+ write_lock_.try_receive([](auto...){});
+ }
+ }
+ catch (const std::exception&)
+ {
+ stop();
+ }
+ }
+
+};
+
+awaitable<void> listen(tcp::acceptor& acceptor)
+{
+ for (;;)
+ {
+ auto [e, socket] = co_await acceptor.async_accept(as_tuple(deferred));
+ if (!e)
+ {
+ std::make_shared<line_based_echo_session>(std::move(socket))->start();
+ }
+ }
+}
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 3)
+ {
+ std::cerr << "Usage: mutual_exclusion_1";
+ std::cerr << " <listen_address> <listen_port>\n";
+ return 1;
+ }
+
+ io_context ctx;
+
+ auto listen_endpoint =
+ *tcp::resolver(ctx).resolve(argv[1], argv[2],
+ tcp::resolver::passive).begin();
+
+ tcp::acceptor acceptor(ctx, listen_endpoint);
+ co_spawn(ctx, listen(acceptor), detached);
+ ctx.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/channels/throttling_proxy.cpp b/3rdparty/asio/src/examples/cpp20/channels/throttling_proxy.cpp
new file mode 100644
index 00000000000..c54d2986af7
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/channels/throttling_proxy.cpp
@@ -0,0 +1,135 @@
+//
+// throttling_proxy.cpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/awaitable_operators.hpp>
+#include <asio/experimental/channel.hpp>
+#include <iostream>
+
+using asio::as_tuple;
+using asio::awaitable;
+using asio::buffer;
+using asio::co_spawn;
+using asio::detached;
+using asio::experimental::channel;
+using asio::io_context;
+using asio::ip::tcp;
+using asio::steady_timer;
+using asio::use_awaitable;
+namespace this_coro = asio::this_coro;
+using namespace asio::experimental::awaitable_operators;
+using namespace std::literals::chrono_literals;
+
+using token_channel = channel<void(asio::error_code, std::size_t)>;
+
+awaitable<void> produce_tokens(std::size_t bytes_per_token,
+ steady_timer::duration token_interval, token_channel& tokens)
+{
+ steady_timer timer(co_await this_coro::executor);
+ for (;;)
+ {
+ co_await tokens.async_send(
+ asio::error_code{}, bytes_per_token,
+ use_awaitable);
+
+ timer.expires_after(token_interval);
+ co_await timer.async_wait(use_awaitable);
+ }
+}
+
+awaitable<void> transfer(tcp::socket& from,
+ tcp::socket& to, token_channel& tokens)
+{
+ std::array<unsigned char, 4096> data;
+ for (;;)
+ {
+ std::size_t bytes_available = co_await tokens.async_receive(use_awaitable);
+ while (bytes_available > 0)
+ {
+ std::size_t n = co_await from.async_read_some(
+ buffer(data, bytes_available), use_awaitable);
+
+ co_await async_write(to, buffer(data, n), use_awaitable);
+
+ bytes_available -= n;
+ }
+ }
+}
+
+awaitable<void> proxy(tcp::socket client, tcp::endpoint target)
+{
+ constexpr std::size_t number_of_tokens = 100;
+ constexpr size_t bytes_per_token = 20 * 1024;
+ constexpr steady_timer::duration token_interval = 100ms;
+
+ auto ex = client.get_executor();
+ tcp::socket server(ex);
+ token_channel client_tokens(ex, number_of_tokens);
+ token_channel server_tokens(ex, number_of_tokens);
+
+ co_await server.async_connect(target, use_awaitable);
+ co_await (
+ produce_tokens(bytes_per_token, token_interval, client_tokens) &&
+ transfer(client, server, client_tokens) &&
+ produce_tokens(bytes_per_token, token_interval, server_tokens) &&
+ transfer(server, client, server_tokens)
+ );
+}
+
+awaitable<void> listen(tcp::acceptor& acceptor, tcp::endpoint target)
+{
+ for (;;)
+ {
+ auto [e, client] = co_await acceptor.async_accept(as_tuple(use_awaitable));
+ if (!e)
+ {
+ auto ex = client.get_executor();
+ co_spawn(ex, proxy(std::move(client), target), detached);
+ }
+ else
+ {
+ std::cerr << "Accept failed: " << e.message() << "\n";
+ steady_timer timer(co_await this_coro::executor);
+ timer.expires_after(100ms);
+ co_await timer.async_wait(use_awaitable);
+ }
+ }
+}
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc != 5)
+ {
+ std::cerr << "Usage: throttling_proxy";
+ std::cerr << " <listen_address> <listen_port>";
+ std::cerr << " <target_address> <target_port>\n";
+ return 1;
+ }
+
+ io_context ctx;
+
+ auto listen_endpoint =
+ *tcp::resolver(ctx).resolve(argv[1], argv[2],
+ tcp::resolver::passive).begin();
+
+ auto target_endpoint =
+ *tcp::resolver(ctx).resolve(argv[3], argv[4]).begin();
+
+ tcp::acceptor acceptor(ctx, listen_endpoint);
+ co_spawn(ctx, listen(acceptor, target_endpoint), detached);
+ ctx.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/chat_server.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/chat_server.cpp
new file mode 100644
index 00000000000..cd5fba32486
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/chat_server.cpp
@@ -0,0 +1,222 @@
+//
+// chat_server.cpp
+// ~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <cstdlib>
+#include <deque>
+#include <iostream>
+#include <list>
+#include <memory>
+#include <set>
+#include <string>
+#include <utility>
+#include <asio/awaitable.hpp>
+#include <asio/detached.hpp>
+#include <asio/co_spawn.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/read_until.hpp>
+#include <asio/redirect_error.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_awaitable.hpp>
+#include <asio/write.hpp>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::redirect_error;
+using asio::use_awaitable;
+
+//----------------------------------------------------------------------
+
+class chat_participant
+{
+public:
+ virtual ~chat_participant() {}
+ virtual void deliver(const std::string& msg) = 0;
+};
+
+typedef std::shared_ptr<chat_participant> chat_participant_ptr;
+
+//----------------------------------------------------------------------
+
+class chat_room
+{
+public:
+ void join(chat_participant_ptr participant)
+ {
+ participants_.insert(participant);
+ for (auto msg: recent_msgs_)
+ participant->deliver(msg);
+ }
+
+ void leave(chat_participant_ptr participant)
+ {
+ participants_.erase(participant);
+ }
+
+ void deliver(const std::string& msg)
+ {
+ recent_msgs_.push_back(msg);
+ while (recent_msgs_.size() > max_recent_msgs)
+ recent_msgs_.pop_front();
+
+ for (auto participant: participants_)
+ participant->deliver(msg);
+ }
+
+private:
+ std::set<chat_participant_ptr> participants_;
+ enum { max_recent_msgs = 100 };
+ std::deque<std::string> recent_msgs_;
+};
+
+//----------------------------------------------------------------------
+
+class chat_session
+ : public chat_participant,
+ public std::enable_shared_from_this<chat_session>
+{
+public:
+ chat_session(tcp::socket socket, chat_room& room)
+ : socket_(std::move(socket)),
+ timer_(socket_.get_executor()),
+ room_(room)
+ {
+ timer_.expires_at(std::chrono::steady_clock::time_point::max());
+ }
+
+ void start()
+ {
+ room_.join(shared_from_this());
+
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->reader(); },
+ detached);
+
+ co_spawn(socket_.get_executor(),
+ [self = shared_from_this()]{ return self->writer(); },
+ detached);
+ }
+
+ void deliver(const std::string& msg)
+ {
+ write_msgs_.push_back(msg);
+ timer_.cancel_one();
+ }
+
+private:
+ awaitable<void> reader()
+ {
+ try
+ {
+ for (std::string read_msg;;)
+ {
+ std::size_t n = co_await asio::async_read_until(socket_,
+ asio::dynamic_buffer(read_msg, 1024), "\n", use_awaitable);
+
+ room_.deliver(read_msg.substr(0, n));
+ read_msg.erase(0, n);
+ }
+ }
+ catch (std::exception&)
+ {
+ stop();
+ }
+ }
+
+ awaitable<void> writer()
+ {
+ try
+ {
+ while (socket_.is_open())
+ {
+ if (write_msgs_.empty())
+ {
+ asio::error_code ec;
+ co_await timer_.async_wait(redirect_error(use_awaitable, ec));
+ }
+ else
+ {
+ co_await asio::async_write(socket_,
+ asio::buffer(write_msgs_.front()), use_awaitable);
+ write_msgs_.pop_front();
+ }
+ }
+ }
+ catch (std::exception&)
+ {
+ stop();
+ }
+ }
+
+ void stop()
+ {
+ room_.leave(shared_from_this());
+ socket_.close();
+ timer_.cancel();
+ }
+
+ tcp::socket socket_;
+ asio::steady_timer timer_;
+ chat_room& room_;
+ std::deque<std::string> write_msgs_;
+};
+
+//----------------------------------------------------------------------
+
+awaitable<void> listener(tcp::acceptor acceptor)
+{
+ chat_room room;
+
+ for (;;)
+ {
+ std::make_shared<chat_session>(
+ co_await acceptor.async_accept(use_awaitable),
+ room
+ )->start();
+ }
+}
+
+//----------------------------------------------------------------------
+
+int main(int argc, char* argv[])
+{
+ try
+ {
+ if (argc < 2)
+ {
+ std::cerr << "Usage: chat_server <port> [<port> ...]\n";
+ return 1;
+ }
+
+ asio::io_context io_context(1);
+
+ for (int i = 1; i < argc; ++i)
+ {
+ unsigned short port = std::atoi(argv[i]);
+ co_spawn(io_context,
+ listener(tcp::acceptor(io_context, {tcp::v4(), port})),
+ detached);
+ }
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "Exception: " << e.what() << "\n";
+ }
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server.cpp
new file mode 100644
index 00000000000..a9532459f77
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server.cpp
@@ -0,0 +1,76 @@
+//
+// echo_server.cpp
+// ~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable;
+namespace this_coro = asio::this_coro;
+
+#if defined(ASIO_ENABLE_HANDLER_TRACKING)
+# define use_awaitable \
+ asio::use_awaitable_t(__FILE__, __LINE__, __PRETTY_FUNCTION__)
+#endif
+
+awaitable<void> echo(tcp::socket socket)
+{
+ try
+ {
+ char data[1024];
+ for (;;)
+ {
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data), use_awaitable);
+ co_await async_write(socket, asio::buffer(data, n), use_awaitable);
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp::acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ tcp::socket socket = co_await acceptor.async_accept(use_awaitable);
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_single_default.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_single_default.cpp
new file mode 100644
index 00000000000..4a692acc872
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_single_default.cpp
@@ -0,0 +1,71 @@
+//
+// echo_server_with_as_single_default.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/experimental/as_single.hpp>
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::experimental::as_single_t;
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable_t;
+using default_token = as_single_t<use_awaitable_t<>>;
+using tcp_acceptor = default_token::as_default_on_t<tcp::acceptor>;
+using tcp_socket = default_token::as_default_on_t<tcp::socket>;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp_socket socket)
+{
+ char data[1024];
+ for (;;)
+ {
+ auto [e1, nread] = co_await socket.async_read_some(asio::buffer(data));
+ if (nread == 0) break;
+ auto [e2, nwritten] = co_await async_write(socket, asio::buffer(data, nread));
+ if (nwritten != nread) break;
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp_acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ if (auto [e, socket] = co_await acceptor.async_accept(); socket.is_open())
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_tuple_default.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_tuple_default.cpp
new file mode 100644
index 00000000000..de162cad78e
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_as_tuple_default.cpp
@@ -0,0 +1,71 @@
+//
+// echo_server_with_as_tuple_default.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/as_tuple.hpp>
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::as_tuple_t;
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable_t;
+using default_token = as_tuple_t<use_awaitable_t<>>;
+using tcp_acceptor = default_token::as_default_on_t<tcp::acceptor>;
+using tcp_socket = default_token::as_default_on_t<tcp::socket>;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp_socket socket)
+{
+ char data[1024];
+ for (;;)
+ {
+ auto [e1, nread] = co_await socket.async_read_some(asio::buffer(data));
+ if (nread == 0) break;
+ auto [e2, nwritten] = co_await async_write(socket, asio::buffer(data, nread));
+ if (nwritten != nread) break;
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp_acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ if (auto [e, socket] = co_await acceptor.async_accept(); socket.is_open())
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_default.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_default.cpp
new file mode 100644
index 00000000000..54344d94d56
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_default.cpp
@@ -0,0 +1,73 @@
+//
+// echo_server_with_default.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable_t;
+using tcp_acceptor = use_awaitable_t<>::as_default_on_t<tcp::acceptor>;
+using tcp_socket = use_awaitable_t<>::as_default_on_t<tcp::socket>;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp_socket socket)
+{
+ try
+ {
+ char data[1024];
+ for (;;)
+ {
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data));
+ co_await async_write(socket, asio::buffer(data, n));
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp_acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ auto socket = co_await acceptor.async_accept();
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred.cpp
new file mode 100644
index 00000000000..54469ba7aba
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred.cpp
@@ -0,0 +1,72 @@
+//
+// echo_server.cpp
+// ~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/deferred.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::deferred;
+using asio::detached;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp::socket socket)
+{
+ try
+ {
+ char data[1024];
+ for (;;)
+ {
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data), deferred);
+ co_await async_write(socket, asio::buffer(data, n), deferred);
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp::acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ tcp::socket socket = co_await acceptor.async_accept(deferred);
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred_default.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred_default.cpp
new file mode 100644
index 00000000000..33c383311d2
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/echo_server_with_deferred_default.cpp
@@ -0,0 +1,74 @@
+//
+// echo_server.cpp
+// ~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/deferred.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using default_token = asio::deferred_t;
+using tcp_acceptor = default_token::as_default_on_t<tcp::acceptor>;
+using tcp_socket = default_token::as_default_on_t<tcp::socket>;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo(tcp_socket socket)
+{
+ try
+ {
+ char data[1024];
+ for (;;)
+ {
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data));
+ co_await async_write(socket, asio::buffer(data, n));
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp_acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ tcp::socket socket = co_await acceptor.async_accept();
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/refactored_echo_server.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/refactored_echo_server.cpp
new file mode 100644
index 00000000000..dc7b03d86e2
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/refactored_echo_server.cpp
@@ -0,0 +1,80 @@
+//
+// refactored_echo_server.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/signal_set.hpp>
+#include <asio/write.hpp>
+#include <cstdio>
+
+using asio::ip::tcp;
+using asio::awaitable;
+using asio::co_spawn;
+using asio::detached;
+using asio::use_awaitable;
+namespace this_coro = asio::this_coro;
+
+awaitable<void> echo_once(tcp::socket& socket)
+{
+ char data[128];
+ std::size_t n = co_await socket.async_read_some(asio::buffer(data), use_awaitable);
+ co_await async_write(socket, asio::buffer(data, n), use_awaitable);
+}
+
+awaitable<void> echo(tcp::socket socket)
+{
+ try
+ {
+ for (;;)
+ {
+ // The asynchronous operations to echo a single chunk of data have been
+ // refactored into a separate function. When this function is called, the
+ // operations are still performed in the context of the current
+ // coroutine, and the behaviour is functionally equivalent.
+ co_await echo_once(socket);
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::printf("echo Exception: %s\n", e.what());
+ }
+}
+
+awaitable<void> listener()
+{
+ auto executor = co_await this_coro::executor;
+ tcp::acceptor acceptor(executor, {tcp::v4(), 55555});
+ for (;;)
+ {
+ tcp::socket socket = co_await acceptor.async_accept(use_awaitable);
+ co_spawn(executor, echo(std::move(socket)), detached);
+ }
+}
+
+int main()
+{
+ try
+ {
+ asio::io_context io_context(1);
+
+ asio::signal_set signals(io_context, SIGINT, SIGTERM);
+ signals.async_wait([&](auto, auto){ io_context.stop(); });
+
+ co_spawn(io_context, listener(), detached);
+
+ io_context.run();
+ }
+ catch (std::exception& e)
+ {
+ std::printf("Exception: %s\n", e.what());
+ }
+}
diff --git a/3rdparty/asio/src/examples/cpp20/coroutines/timeout.cpp b/3rdparty/asio/src/examples/cpp20/coroutines/timeout.cpp
new file mode 100644
index 00000000000..2ffcab7ad35
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/coroutines/timeout.cpp
@@ -0,0 +1,66 @@
+//
+// timeout.cpp
+// ~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <asio/experimental/awaitable_operators.hpp>
+
+using namespace asio;
+using namespace asio::experimental::awaitable_operators;
+using time_point = std::chrono::steady_clock::time_point;
+using ip::tcp;
+
+awaitable<void> echo(tcp::socket& sock, time_point& deadline)
+{
+ char data[4196];
+ for (;;)
+ {
+ deadline = std::chrono::steady_clock::now() + std::chrono::seconds(10);
+ auto n = co_await sock.async_read_some(buffer(data), use_awaitable);
+ co_await async_write(sock, buffer(data, n), use_awaitable);
+ }
+}
+
+awaitable<void> watchdog(time_point& deadline)
+{
+ steady_timer timer(co_await this_coro::executor);
+ auto now = std::chrono::steady_clock::now();
+ while (deadline > now)
+ {
+ timer.expires_at(deadline);
+ co_await timer.async_wait(use_awaitable);
+ now = std::chrono::steady_clock::now();
+ }
+ throw std::system_error(std::make_error_code(std::errc::timed_out));
+}
+
+awaitable<void> handle_connection(tcp::socket sock)
+{
+ time_point deadline{};
+ co_await (echo(sock, deadline) && watchdog(deadline));
+}
+
+awaitable<void> listen(tcp::acceptor& acceptor)
+{
+ for (;;)
+ {
+ co_spawn(
+ acceptor.get_executor(),
+ handle_connection(co_await acceptor.async_accept(use_awaitable)),
+ detached);
+ }
+}
+
+int main()
+{
+ io_context ctx;
+ tcp::acceptor acceptor(ctx, {tcp::v4(), 54321});
+ co_spawn(ctx, listen(acceptor), detached);
+ ctx.run();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/invocation/completion_executor.cpp b/3rdparty/asio/src/examples/cpp20/invocation/completion_executor.cpp
new file mode 100644
index 00000000000..409be96d0f4
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/invocation/completion_executor.cpp
@@ -0,0 +1,83 @@
+//
+// completion_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include "asio.hpp"
+#include <concepts>
+#include <iostream>
+
+using asio::ip::tcp;
+
+//----------------------------------------------------------------------
+
+// The logging_executor class implements a minimal executor that satisfies the
+// requirements for use as a completion executor. This means it may be bound to
+// a handler using bind_executor.
+class logging_executor
+{
+public:
+ // All executors must be no-throw equality comparable.
+ bool operator==(const logging_executor&) const noexcept = default;
+
+ // All executors must provide a const member function execute().
+ void execute(std::invocable auto handler) const
+ {
+ try
+ {
+ std::cout << "handler invocation starting\n";
+ std::move(handler)();
+ std::cout << "handler invocation complete\n";
+ }
+ catch (...)
+ {
+ std::cout << "handler invocation completed with exception\n";
+ throw;
+ }
+ }
+};
+
+// Confirm that a logging_executor satisfies the executor requirements.
+static_assert(asio::execution::executor<logging_executor>);
+
+// Confirm that a logging_executor can be used as a completion executor.
+static_assert(std::convertible_to<
+ logging_executor, asio::any_completion_executor>);
+
+//----------------------------------------------------------------------
+
+int main()
+{
+ asio::io_context io_context(1);
+
+ // Post a completion handler to be run immediately.
+ asio::post(io_context,
+ asio::bind_executor(logging_executor{},
+ []{ std::cout << "post complete\n"; }));
+
+ // Start an asynchronous accept that will complete immediately.
+ tcp::endpoint endpoint(asio::ip::address_v4::loopback(), 0);
+ tcp::acceptor acceptor(io_context, endpoint);
+ tcp::socket server_socket(io_context);
+ acceptor.async_accept(
+ asio::bind_executor(logging_executor{},
+ [](auto...){ std::cout << "async_accept complete\n"; }));
+ tcp::socket client_socket(io_context);
+ client_socket.connect(acceptor.local_endpoint());
+
+ // Set a timer to expire immediately.
+ asio::steady_timer timer(io_context);
+ timer.expires_at(asio::steady_timer::clock_type::time_point::min());
+ timer.async_wait(
+ asio::bind_executor(logging_executor{},
+ [](auto){ std::cout << "async_wait complete\n"; }));
+
+ io_context.run();
+
+ return 0;
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/c_callback_wrapper.cpp b/3rdparty/asio/src/examples/cpp20/operations/c_callback_wrapper.cpp
new file mode 100644
index 00000000000..f4fbe2617ea
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/c_callback_wrapper.cpp
@@ -0,0 +1,232 @@
+//
+// c_callback_wrapper.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+#include <memory>
+#include <new>
+
+//------------------------------------------------------------------------------
+
+// This is a mock implementation of a C-based API that uses the function pointer
+// plus void* context idiom for exposing a callback.
+
+void read_input(const char* prompt, void (*cb)(void*, const char*), void* arg)
+{
+ std::thread(
+ [prompt = std::string(prompt), cb, arg]
+ {
+ std::cout << prompt << ": ";
+ std::cout.flush();
+ std::string line;
+ std::getline(std::cin, line);
+ cb(arg, line.c_str());
+ }).detach();
+}
+
+//------------------------------------------------------------------------------
+
+// This is an asynchronous operation that wraps the C-based API.
+
+// To map our completion handler into a function pointer / void* callback, we
+// need to allocate some state that will live for the duration of the
+// operation. A pointer to this state will be passed to the C-based API.
+template <asio::completion_handler_for<void(std::string)> Handler>
+class read_input_state
+{
+public:
+ read_input_state(Handler&& handler)
+ : handler_(std::move(handler)),
+ work_(asio::make_work_guard(handler_))
+ {
+ }
+
+ // Create the state using the handler's associated allocator.
+ static read_input_state* create(Handler&& handler)
+ {
+ // A unique_ptr deleter that is used to destroy uninitialised objects.
+ struct deleter
+ {
+ // Get the handler's associated allocator type. If the handler does not
+ // specify an associated allocator, we will use a recycling allocator as
+ // the default. As the associated allocator is a proto-allocator, we must
+ // rebind it to the correct type before we can use it to allocate objects.
+ typename std::allocator_traits<
+ asio::associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<read_input_state> alloc;
+
+ void operator()(read_input_state* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ } d{asio::get_associated_allocator(handler,
+ asio::recycling_allocator<void>())};
+
+ // Allocate memory for the state.
+ std::unique_ptr<read_input_state, deleter> uninit_ptr(
+ std::allocator_traits<decltype(d.alloc)>::allocate(d.alloc, 1), d);
+
+ // Construct the state into the newly allocated memory. This might throw.
+ read_input_state* ptr =
+ new (uninit_ptr.get()) read_input_state(std::move(handler));
+
+ // Release ownership of the memory and return the newly allocated state.
+ uninit_ptr.release();
+ return ptr;
+ }
+
+ static void callback(void* arg, const char* result)
+ {
+ read_input_state* self = static_cast<read_input_state*>(arg);
+
+ // A unique_ptr deleter that is used to destroy initialised objects.
+ struct deleter
+ {
+ // Get the handler's associated allocator type. If the handler does not
+ // specify an associated allocator, we will use a recycling allocator as
+ // the default. As the associated allocator is a proto-allocator, we must
+ // rebind it to the correct type before we can use it to allocate objects.
+ typename std::allocator_traits<
+ asio::associated_allocator_t<Handler,
+ asio::recycling_allocator<void>>>::template
+ rebind_alloc<read_input_state> alloc;
+
+ void operator()(read_input_state* ptr)
+ {
+ std::allocator_traits<decltype(alloc)>::destroy(alloc, ptr);
+ std::allocator_traits<decltype(alloc)>::deallocate(alloc, ptr, 1);
+ }
+ } d{asio::get_associated_allocator(self->handler_,
+ asio::recycling_allocator<void>())};
+
+ // To conform to the rules regarding asynchronous operations and memory
+ // allocation, we must make a copy of the state and deallocate the memory
+ // before dispatching the completion handler.
+ std::unique_ptr<read_input_state, deleter> state_ptr(self, d);
+ read_input_state state(std::move(*self));
+ state_ptr.reset();
+
+ // Dispatch the completion handler through the handler's associated
+ // executor, using the handler's associated allocator.
+ asio::dispatch(state.work_.get_executor(),
+ asio::bind_allocator(d.alloc,
+ [
+ handler = std::move(state.handler_),
+ result = std::string(result)
+ ]() mutable
+ {
+ std::move(handler)(result);
+ }));
+ }
+
+private:
+ Handler handler_;
+
+ // According to the rules for asynchronous operations, we need to track
+ // outstanding work against the handler's associated executor until the
+ // asynchronous operation is complete.
+ asio::executor_work_guard<
+ asio::associated_executor_t<Handler>> work_;
+};
+
+// The initiating function for the asynchronous operation.
+template <asio::completion_token_for<void(std::string)> CompletionToken>
+auto async_read_input(const std::string& prompt, CompletionToken&& token)
+{
+ // Define a function object that contains the code to launch the asynchronous
+ // operation. This is passed the concrete completion handler, followed by any
+ // additional arguments that were passed through the call to async_initiate.
+ auto init = [](
+ asio::completion_handler_for<void(std::string)> auto handler,
+ const std::string& prompt)
+ {
+ // The body of the initiation function object creates the long-lived state
+ // and passes it to the C-based API, along with the function pointer.
+ using state_type = read_input_state<decltype(handler)>;
+ read_input(prompt.c_str(), &state_type::callback,
+ state_type::create(std::move(handler)));
+ };
+
+ // The async_initiate function is used to transform the supplied completion
+ // token to the completion handler. When calling this function we explicitly
+ // specify the completion signature of the operation. We must also return the
+ // result of the call since the completion token may produce a return value,
+ // such as a future.
+ return asio::async_initiate<CompletionToken, void(std::string)>(
+ init, // First, pass the function object that launches the operation,
+ token, // then the completion token that will be transformed to a handler,
+ prompt); // and, finally, any additional arguments to the function object.
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ async_read_input("Enter your name",
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_read_input("Enter your name", asio::deferred);
+
+ // Launch our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ std::move(op)(
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::string> f =
+ async_read_input("Enter your name", asio::use_future);
+
+ std::string result = f.get();
+ std::cout << "Hello " << result << "\n";
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/callback_wrapper.cpp b/3rdparty/asio/src/examples/cpp20/operations/callback_wrapper.cpp
new file mode 100644
index 00000000000..f8f37b48944
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/callback_wrapper.cpp
@@ -0,0 +1,154 @@
+//
+// callback_wrapper.cpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio.hpp>
+#include <iostream>
+
+//------------------------------------------------------------------------------
+
+// This is a mock implementation of an API that uses a move-only function object
+// for exposing a callback. The callback has the signature void(std::string).
+
+template <typename Callback>
+void read_input(const std::string& prompt, Callback cb)
+{
+ std::thread(
+ [prompt, cb = std::move(cb)]() mutable
+ {
+ std::cout << prompt << ": ";
+ std::cout.flush();
+ std::string line;
+ std::getline(std::cin, line);
+ std::move(cb)(std::move(line));
+ }).detach();
+}
+
+//------------------------------------------------------------------------------
+
+// This is an asynchronous operation that wraps the callback-based API.
+
+// The initiating function for the asynchronous operation.
+template <asio::completion_token_for<void(std::string)> CompletionToken>
+auto async_read_input(const std::string& prompt, CompletionToken&& token)
+{
+ // Define a function object that contains the code to launch the asynchronous
+ // operation. This is passed the concrete completion handler, followed by any
+ // additional arguments that were passed through the call to async_initiate.
+ auto init = [](
+ asio::completion_handler_for<void(std::string)> auto handler,
+ const std::string& prompt)
+ {
+ // According to the rules for asynchronous operations, we need to track
+ // outstanding work against the handler's associated executor until the
+ // asynchronous operation is complete.
+ auto work = asio::make_work_guard(handler);
+
+ // Launch the operation with a callback that will receive the result and
+ // pass it through to the asynchronous operation's completion handler.
+ read_input(prompt,
+ [
+ handler = std::move(handler),
+ work = std::move(work)
+ ](std::string result) mutable
+ {
+ // Get the handler's associated allocator. If the handler does not
+ // specify an allocator, use the recycling allocator as the default.
+ auto alloc = asio::get_associated_allocator(
+ handler, asio::recycling_allocator<void>());
+
+ // Dispatch the completion handler through the handler's associated
+ // executor, using the handler's associated allocator.
+ asio::dispatch(work.get_executor(),
+ asio::bind_allocator(alloc,
+ [
+ handler = std::move(handler),
+ result = std::string(result)
+ ]() mutable
+ {
+ std::move(handler)(result);
+ }));
+ });
+ };
+
+ // The async_initiate function is used to transform the supplied completion
+ // token to the completion handler. When calling this function we explicitly
+ // specify the completion signature of the operation. We must also return the
+ // result of the call since the completion token may produce a return value,
+ // such as a future.
+ return asio::async_initiate<CompletionToken, void(std::string)>(
+ init, // First, pass the function object that launches the operation,
+ token, // then the completion token that will be transformed to a handler,
+ prompt); // and, finally, any additional arguments to the function object.
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to specify an associated executor.
+ async_read_input("Enter your name",
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ auto op = async_read_input("Enter your name", asio::deferred);
+
+ // Launch our asynchronous operation using a lambda as a callback. We will use
+ // an io_context to obtain an associated executor.
+ std::move(op)(
+ asio::bind_executor(io_context,
+ [](const std::string& result)
+ {
+ std::cout << "Hello " << result << "\n";
+ }));
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::string> f =
+ async_read_input("Enter your name", asio::use_future);
+
+ std::string result = f.get();
+ std::cout << "Hello " << result << "\n";
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_1.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_1.cpp
new file mode 100644
index 00000000000..e7f795e1756
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_1.cpp
@@ -0,0 +1,157 @@
+//
+// composed_1.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+//------------------------------------------------------------------------------
+
+// This is the simplest example of a composed asynchronous operation, where we
+// simply repackage an existing operation. The asynchronous operation
+// requirements are met by delegating responsibility to the underlying
+// operation.
+
+template <
+ asio::completion_token_for<void(std::error_code, std::size_t)>
+ CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of our underlying asynchronous operation.
+{
+ // When delegating to the underlying operation we must take care to perfectly
+ // forward the completion token. This ensures that our operation works
+ // correctly with move-only function objects as callbacks, as well as other
+ // completion token types.
+ return asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<CompletionToken>(token));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n",
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_message(
+ socket, "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::size_t> f = async_write_message(
+ socket, "Testing future\r\n", asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ std::size_t n = f.get();
+ std::cout << n << " bytes transferred\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_2.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_2.cpp
new file mode 100644
index 00000000000..ada029d38f0
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_2.cpp
@@ -0,0 +1,225 @@
+//
+// composed_2.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This next simplest example of a composed asynchronous operation involves
+// repackaging multiple operations but choosing to invoke just one of them. All
+// of these underlying operations have the same completion signature. The
+// asynchronous operation requirements are met by delegating responsibility to
+// the underlying operations.
+
+template <
+ asio::completion_token_for<void(std::error_code, std::size_t)>
+ CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, bool allow_partial_write,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is void.
+ // However, when the completion token is asio::yield_context (used for
+ // stackful coroutines) the return type would be std::size_t, and when the
+ // completion token is asio::use_future it would be std::future<std::size_t>.
+ // When the completion token is asio::deferred, the return type differs for
+ // each asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error, std::size_t)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](
+ asio::completion_handler_for<void(std::error_code, std::size_t)>
+ auto&& completion_handler,
+ tcp::socket& socket,
+ const char* message,
+ bool allow_partial_write)
+ {
+ if (allow_partial_write)
+ {
+ // When delegating to an underlying operation we must take care to
+ // perfectly forward the completion handler. This ensures that our
+ // operation works correctly with move-only function objects as
+ // callbacks.
+ return socket.async_write_some(
+ asio::buffer(message, std::strlen(message)),
+ std::forward<decltype(completion_handler)>(completion_handler));
+ }
+ else
+ {
+ // As above, we must perfectly forward the completion handler when calling
+ // the alternate underlying operation.
+ return asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ std::forward<decltype(completion_handler)>(completion_handler));
+ }
+ };
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code, std::size_t)>(
+ initiation, token, std::ref(socket), message, allow_partial_write);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n", false,
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_message(
+ socket, "Testing deferred\r\n", false, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error, std::size_t n)
+ {
+ if (!error)
+ {
+ std::cout << n << " bytes transferred\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<std::size_t> f = async_write_message(
+ socket, "Testing future\r\n", false, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ std::size_t n = f.get();
+ std::cout << n << " bytes transferred\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_3.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_3.cpp
new file mode 100644
index 00000000000..46436a68e28
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_3.cpp
@@ -0,0 +1,232 @@
+//
+// composed_3.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <functional>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// In this composed operation we repackage an existing operation, but with a
+// different completion handler signature. The asynchronous operation
+// requirements are met by delegating responsibility to the underlying
+// operation.
+
+template <
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](
+ asio::completion_handler_for<void(std::error_code)>
+ auto&& completion_handler,
+ tcp::socket& socket,
+ const char* message)
+ {
+ // The async_write operation has a completion handler signature of:
+ //
+ // void(std::error_code error, std::size n)
+ //
+ // This differs from our operation's signature in that it is also passed
+ // the number of bytes transferred as an argument of type std::size_t. We
+ // will adapt our completion handler to async_write's completion handler
+ // signature by using std::bind, which drops the additional argument.
+ //
+ // However, it is essential to the correctness of our composed operation
+ // that we preserve the executor of the user-supplied completion handler.
+ // The std::bind function will not do this for us, so we must do this by
+ // first obtaining the completion handler's associated executor (defaulting
+ // to the I/O executor - in this case the executor of the socket - if the
+ // completion handler does not have its own) ...
+ auto executor = asio::get_associated_executor(
+ completion_handler, socket.get_executor());
+
+ // ... and then binding this executor to our adapted completion handler
+ // using the asio::bind_executor function.
+ asio::async_write(socket,
+ asio::buffer(message, std::strlen(message)),
+ asio::bind_executor(executor,
+ std::bind(std::forward<decltype(completion_handler)>(
+ completion_handler), std::placeholders::_1)));
+ };
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket), message);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "Testing callback\r\n",
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_message(
+ socket, "Testing deferred\r\n", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, "Testing future\r\n", asio::use_future);
+
+ io_context.run();
+
+ // Get the result of the operation.
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_4.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_4.cpp
new file mode 100644
index 00000000000..069f57ce1ac
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_4.cpp
@@ -0,0 +1,247 @@
+//
+// composed_4.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/bind_executor.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <cstring>
+#include <functional>
+#include <iostream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// In this composed operation we repackage an existing operation, but with a
+// different completion handler signature. We will also intercept an empty
+// message as an invalid argument, and propagate the corresponding error to the
+// user. The asynchronous operation requirements are met by delegating
+// responsibility to the underlying operation.
+
+template <
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const char* message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](
+ asio::completion_handler_for<void(std::error_code)>
+ auto&& completion_handler,
+ tcp::socket& socket,
+ const char* message)
+ {
+ // The post operation has a completion handler signature of:
+ //
+ // void()
+ //
+ // and the async_write operation has a completion handler signature of:
+ //
+ // void(std::error_code error, std::size n)
+ //
+ // Both of these operations' completion handler signatures differ from our
+ // operation's completion handler signature. We will adapt our completion
+ // handler to these signatures by using std::bind, which drops the
+ // additional arguments.
+ //
+ // However, it is essential to the correctness of our composed operation
+ // that we preserve the executor of the user-supplied completion handler.
+ // The std::bind function will not do this for us, so we must do this by
+ // first obtaining the completion handler's associated executor (defaulting
+ // to the I/O executor - in this case the executor of the socket - if the
+ // completion handler does not have its own) ...
+ auto executor = asio::get_associated_executor(
+ completion_handler, socket.get_executor());
+
+ // ... and then binding this executor to our adapted completion handler
+ // using the asio::bind_executor function.
+ std::size_t length = std::strlen(message);
+ if (length == 0)
+ {
+ asio::post(
+ asio::bind_executor(executor,
+ std::bind(std::forward<decltype(completion_handler)>(
+ completion_handler), asio::error::invalid_argument)));
+ }
+ else
+ {
+ asio::async_write(socket,
+ asio::buffer(message, length),
+ asio::bind_executor(executor,
+ std::bind(std::forward<decltype(completion_handler)>(
+ completion_handler), std::placeholders::_1)));
+ }
+ };
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket), message);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, "",
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op =
+ async_write_message(socket, "", asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, "", asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Exception: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_5.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_5.cpp
new file mode 100644
index 00000000000..bec83ec3a59
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_5.cpp
@@ -0,0 +1,284 @@
+//
+// composed_5.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation automatically serialises a message, using its I/O
+// streams insertion operator, before sending it on the socket. To do this, it
+// must allocate a buffer for the encoded message and ensure this buffer's
+// validity until the underlying async_write operation completes.
+
+template <typename T,
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_message(tcp::socket& socket,
+ const T& message, CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](
+ asio::completion_handler_for<void(std::error_code)>
+ auto&& completion_handler,
+ tcp::socket& socket,
+ std::unique_ptr<std::string> encoded_message)
+ {
+ // In this example, the composed operation's intermediate completion
+ // handler is implemented as a hand-crafted function object, rather than
+ // using a lambda or std::bind.
+ struct intermediate_completion_handler
+ {
+ // The intermediate completion handler holds a reference to the socket so
+ // that it can obtain the I/O executor (see get_executor below).
+ tcp::socket& socket_;
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our intermediate
+ // completion handler is also move-only.
+ std::unique_ptr<std::string> encoded_message_;
+
+ // The user-supplied completion handler.
+ typename std::decay<decltype(completion_handler)>::type handler_;
+
+ // The function call operator matches the completion signature of the
+ // async_write operation.
+ void operator()(const std::error_code& error, std::size_t /*n*/)
+ {
+ // Deallocate the encoded message before calling the user-supplied
+ // completion handler.
+ encoded_message_.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ // The arguments must match the completion signature of our composed
+ // operation.
+ handler_(error);
+ }
+
+ // It is essential to the correctness of our composed operation that we
+ // preserve the executor of the user-supplied completion handler. With a
+ // hand-crafted function object we can do this by defining a nested type
+ // executor_type and member function get_executor. These obtain the
+ // completion handler's associated executor, and default to the I/O
+ // executor - in this case the executor of the socket - if the completion
+ // handler does not have its own.
+ using executor_type = asio::associated_executor_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ tcp::socket::executor_type>;
+
+ executor_type get_executor() const noexcept
+ {
+ return asio::get_associated_executor(
+ handler_, socket_.get_executor());
+ }
+
+ // Although not necessary for correctness, we may also preserve the
+ // allocator of the user-supplied completion handler. This is achieved by
+ // defining a nested type allocator_type and member function
+ // get_allocator. These obtain the completion handler's associated
+ // allocator, and default to std::allocator<void> if the completion
+ // handler does not have its own.
+ using allocator_type = asio::associated_allocator_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ std::allocator<void>>;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return asio::get_associated_allocator(
+ handler_, std::allocator<void>{});
+ }
+ };
+
+ // Initiate the underlying async_write operation using our intermediate
+ // completion handler.
+ auto encoded_message_buffer = asio::buffer(*encoded_message);
+ asio::async_write(socket, encoded_message_buffer,
+ intermediate_completion_handler{socket, std::move(encoded_message),
+ std::forward<decltype(completion_handler)>(completion_handler)});
+ };
+
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket),
+ std::move(encoded_message));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_message(socket, 123456,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_message(
+ socket, std::string("abcdef"), asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Message sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_message(
+ socket, 654.321, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Message sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Exception: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_6.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_6.cpp
new file mode 100644
index 00000000000..77e2f50f93e
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_6.cpp
@@ -0,0 +1,345 @@
+//
+// composed_6.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/deferred.hpp>
+#include <asio/executor_work_guard.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_initiate function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations.
+// It automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+template <typename T,
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_initiate.
+{
+ // In addition to determining the mechanism by which an asynchronous
+ // operation delivers its result, a completion token also determines the time
+ // when the operation commences. For example, when the completion token is a
+ // simple callback the operation commences before the initiating function
+ // returns. However, if the completion token's delivery mechanism uses a
+ // future, we might instead want to defer initiation of the operation until
+ // the returned future object is waited upon.
+ //
+ // To enable this, when implementing an asynchronous operation we must
+ // package the initiation step as a function object. The initiation function
+ // object's call operator is passed the concrete completion handler produced
+ // by the completion token. This completion handler matches the asynchronous
+ // operation's completion handler signature, which in this example is:
+ //
+ // void(std::error_code error)
+ //
+ // The initiation function object also receives any additional arguments
+ // required to start the operation. (Note: We could have instead passed these
+ // arguments in the lambda capture set. However, we should prefer to
+ // propagate them as function call arguments as this allows the completion
+ // token to optimise how they are passed. For example, a lazy future which
+ // defers initiation would need to make a decay-copy of the arguments, but
+ // when using a simple callback the arguments can be trivially forwarded
+ // straight through.)
+ auto initiation = [](
+ asio::completion_handler_for<void(std::error_code)>
+ auto&& completion_handler,
+ tcp::socket& socket,
+ std::unique_ptr<std::string> encoded_message,
+ std::size_t repeat_count,
+ std::unique_ptr<asio::steady_timer> delay_timer)
+ {
+ // In this example, the composed operation's intermediate completion
+ // handler is implemented as a hand-crafted function object.
+ struct intermediate_completion_handler
+ {
+ // The intermediate completion handler holds a reference to the socket as
+ // it is used for multiple async_write operations, as well as for
+ // obtaining the I/O executor (see get_executor below).
+ tcp::socket& socket_;
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our intermediate
+ // completion handler is also move-only.
+ std::unique_ptr<std::string> encoded_message_;
+
+ // The repeat count remaining.
+ std::size_t repeat_count_;
+
+ // A steady timer used for introducing a delay.
+ std::unique_ptr<asio::steady_timer> delay_timer_;
+
+ // To manage the cycle between the multiple underlying asychronous
+ // operations, our intermediate completion handler is implemented as a
+ // state machine.
+ enum { starting, waiting, writing } state_;
+
+ // As our composed operation performs multiple underlying I/O operations,
+ // we should maintain a work object against the I/O executor. This tells
+ // the I/O executor that there is still more work to come in the future.
+ asio::executor_work_guard<tcp::socket::executor_type> io_work_;
+
+ // The user-supplied completion handler, called once only on completion
+ // of the entire composed operation.
+ typename std::decay<decltype(completion_handler)>::type handler_;
+
+ // By having a default value for the second argument, this function call
+ // operator matches the completion signature of both the async_write and
+ // steady_timer::async_wait operations.
+ void operator()(const std::error_code& error, std::size_t = 0)
+ {
+ if (!error)
+ {
+ switch (state_)
+ {
+ case starting:
+ case writing:
+ if (repeat_count_ > 0)
+ {
+ --repeat_count_;
+ state_ = waiting;
+ delay_timer_->expires_after(std::chrono::seconds(1));
+ delay_timer_->async_wait(std::move(*this));
+ return; // Composed operation not yet complete.
+ }
+ break; // Composed operation complete, continue below.
+ case waiting:
+ state_ = writing;
+ asio::async_write(socket_,
+ asio::buffer(*encoded_message_), std::move(*this));
+ return; // Composed operation not yet complete.
+ }
+ }
+
+ // This point is reached only on completion of the entire composed
+ // operation.
+
+ // We no longer have any future work coming for the I/O executor.
+ io_work_.reset();
+
+ // Deallocate the encoded message before calling the user-supplied
+ // completion handler.
+ encoded_message_.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ handler_(error);
+ }
+
+ // It is essential to the correctness of our composed operation that we
+ // preserve the executor of the user-supplied completion handler. With a
+ // hand-crafted function object we can do this by defining a nested type
+ // executor_type and member function get_executor. These obtain the
+ // completion handler's associated executor, and default to the I/O
+ // executor - in this case the executor of the socket - if the completion
+ // handler does not have its own.
+ using executor_type = asio::associated_executor_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ tcp::socket::executor_type>;
+
+ executor_type get_executor() const noexcept
+ {
+ return asio::get_associated_executor(
+ handler_, socket_.get_executor());
+ }
+
+ // Although not necessary for correctness, we may also preserve the
+ // allocator of the user-supplied completion handler. This is achieved by
+ // defining a nested type allocator_type and member function
+ // get_allocator. These obtain the completion handler's associated
+ // allocator, and default to std::allocator<void> if the completion
+ // handler does not have its own.
+ using allocator_type = asio::associated_allocator_t<
+ typename std::decay<decltype(completion_handler)>::type,
+ std::allocator<void>>;
+
+ allocator_type get_allocator() const noexcept
+ {
+ return asio::get_associated_allocator(
+ handler_, std::allocator<void>{});
+ }
+ };
+
+ // Initiate the underlying async_write operation using our intermediate
+ // completion handler.
+ auto encoded_message_buffer = asio::buffer(*encoded_message);
+ asio::async_write(socket, encoded_message_buffer,
+ intermediate_completion_handler{
+ socket, std::move(encoded_message),
+ repeat_count, std::move(delay_timer),
+ intermediate_completion_handler::starting,
+ asio::make_work_guard(socket.get_executor()),
+ std::forward<decltype(completion_handler)>(completion_handler)});
+ };
+
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // The asio::async_initiate function takes:
+ //
+ // - our initiation function object,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any additional arguments we need to initiate the operation.
+ //
+ // It then asks the completion token to create a completion handler (i.e. a
+ // callback) with the specified signature, and invoke the initiation function
+ // object with this completion handler as well as the additional arguments.
+ // The return value of async_initiate is the result of our operation's
+ // initiating function.
+ //
+ // Note that we wrap non-const reference arguments in std::reference_wrapper
+ // to prevent incorrect decay-copies of these objects.
+ return asio::async_initiate<
+ CompletionToken, void(std::error_code)>(
+ initiation, token, std::ref(socket),
+ std::move(encoded_message), repeat_count,
+ std::move(delay_timer));
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_messages(
+ socket, "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_7.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_7.cpp
new file mode 100644
index 00000000000..9ae44c797fb
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_7.cpp
@@ -0,0 +1,262 @@
+//
+// composed_7.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/compose.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_compose function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations.
+// It automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+template <typename T,
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_compose.
+{
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // To manage the cycle between the multiple underlying asychronous
+ // operations, our implementation is a state machine.
+ enum { starting, waiting, writing };
+
+ // The asio::async_compose function takes:
+ //
+ // - our asynchronous operation implementation,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any I/O objects (or executors) used by the operation
+ //
+ // It then wraps our implementation, which is implemented here as a state
+ // machine in a lambda, in an intermediate completion handler that meets the
+ // requirements of a conforming asynchronous operation. This includes
+ // tracking outstanding work against the I/O executors associated with the
+ // operation (in this example, this is the socket's executor).
+ //
+ // The first argument to our lambda is a reference to the enclosing
+ // intermediate completion handler. This intermediate completion handler is
+ // provided for us by the asio::async_compose function, and takes care
+ // of all the details required to implement a conforming asynchronous
+ // operation. When calling an underlying asynchronous operation, we pass it
+ // this enclosing intermediate completion handler as the completion token.
+ //
+ // All arguments to our lambda after the first must be defaulted to allow the
+ // state machine to be started, as well as to allow the completion handler to
+ // match the completion signature of both the async_write and
+ // steady_timer::async_wait operations.
+ return asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ [
+ // The implementation holds a reference to the socket as it is used for
+ // multiple async_write operations.
+ &socket,
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our lambda
+ // implementation is also move-only.
+ encoded_message = std::move(encoded_message),
+
+ // The repeat count remaining.
+ repeat_count,
+
+ // A steady timer used for introducing a delay.
+ delay_timer = std::move(delay_timer),
+
+ // To manage the cycle between the multiple underlying asychronous
+ // operations, our implementation is a state machine.
+ state = starting
+ ]
+ (
+ auto& self,
+ const std::error_code& error = {},
+ std::size_t = 0
+ ) mutable
+ {
+ if (!error)
+ {
+ switch (state)
+ {
+ case starting:
+ case writing:
+ if (repeat_count > 0)
+ {
+ --repeat_count;
+ state = waiting;
+ delay_timer->expires_after(std::chrono::seconds(1));
+ delay_timer->async_wait(std::move(self));
+ return; // Composed operation not yet complete.
+ }
+ break; // Composed operation complete, continue below.
+ case waiting:
+ state = writing;
+ asio::async_write(socket,
+ asio::buffer(*encoded_message), std::move(self));
+ return; // Composed operation not yet complete.
+ }
+ }
+
+ // This point is reached only on completion of the entire composed
+ // operation.
+
+ // Deallocate the encoded message and delay timer before calling the
+ // user-supplied completion handler.
+ encoded_message.reset();
+ delay_timer.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ self.complete(error);
+ },
+ token, socket);
+}
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_messages(
+ socket, "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/operations/composed_8.cpp b/3rdparty/asio/src/examples/cpp20/operations/composed_8.cpp
new file mode 100644
index 00000000000..2735d74d047
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/operations/composed_8.cpp
@@ -0,0 +1,255 @@
+//
+// composed_8.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include <asio/compose.hpp>
+#include <asio/coroutine.hpp>
+#include <asio/deferred.hpp>
+#include <asio/io_context.hpp>
+#include <asio/ip/tcp.hpp>
+#include <asio/steady_timer.hpp>
+#include <asio/use_future.hpp>
+#include <asio/write.hpp>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+using asio::ip::tcp;
+
+// NOTE: This example requires the new asio::async_compose function. For
+// an example that works with the Networking TS style of completion tokens,
+// please see an older version of asio.
+
+//------------------------------------------------------------------------------
+
+// This composed operation shows composition of multiple underlying operations,
+// using asio's stackless coroutines support to express the flow of control. It
+// automatically serialises a message, using its I/O streams insertion
+// operator, before sending it N times on the socket. To do this, it must
+// allocate a buffer for the encoded message and ensure this buffer's validity
+// until all underlying async_write operation complete. A one second delay is
+// inserted prior to each write operation, using a steady_timer.
+
+#include <asio/yield.hpp>
+
+template <typename T,
+ asio::completion_token_for<void(std::error_code)> CompletionToken>
+auto async_write_messages(tcp::socket& socket,
+ const T& message, std::size_t repeat_count,
+ CompletionToken&& token)
+ // The return type of the initiating function is deduced from the combination
+ // of:
+ //
+ // - the CompletionToken type,
+ // - the completion handler signature, and
+ // - the asynchronous operation's initiation function object.
+ //
+ // When the completion token is a simple callback, the return type is always
+ // void. In this example, when the completion token is asio::yield_context
+ // (used for stackful coroutines) the return type would also be void, as
+ // there is no non-error argument to the completion handler. When the
+ // completion token is asio::use_future it would be std::future<void>. When
+ // the completion token is asio::deferred, the return type differs for each
+ // asynchronous operation.
+ //
+ // In C++20 we can omit the return type as it is automatically deduced from
+ // the return type of asio::async_compose.
+{
+ // Encode the message and copy it into an allocated buffer. The buffer will
+ // be maintained for the lifetime of the composed asynchronous operation.
+ std::ostringstream os;
+ os << message;
+ std::unique_ptr<std::string> encoded_message(new std::string(os.str()));
+
+ // Create a steady_timer to be used for the delay between messages.
+ std::unique_ptr<asio::steady_timer> delay_timer(
+ new asio::steady_timer(socket.get_executor()));
+
+ // The asio::async_compose function takes:
+ //
+ // - our asynchronous operation implementation,
+ // - the completion token,
+ // - the completion handler signature, and
+ // - any I/O objects (or executors) used by the operation
+ //
+ // It then wraps our implementation, which is implemented here as a stackless
+ // coroutine in a lambda, in an intermediate completion handler that meets the
+ // requirements of a conforming asynchronous operation. This includes
+ // tracking outstanding work against the I/O executors associated with the
+ // operation (in this example, this is the socket's executor).
+ //
+ // The first argument to our lambda is a reference to the enclosing
+ // intermediate completion handler. This intermediate completion handler is
+ // provided for us by the asio::async_compose function, and takes care
+ // of all the details required to implement a conforming asynchronous
+ // operation. When calling an underlying asynchronous operation, we pass it
+ // this enclosing intermediate completion handler as the completion token.
+ //
+ // All arguments to our lambda after the first must be defaulted to allow the
+ // state machine to be started, as well as to allow the completion handler to
+ // match the completion signature of both the async_write and
+ // steady_timer::async_wait operations.
+ return asio::async_compose<
+ CompletionToken, void(std::error_code)>(
+ [
+ // The implementation holds a reference to the socket as it is used for
+ // multiple async_write operations.
+ &socket,
+
+ // The allocated buffer for the encoded message. The std::unique_ptr
+ // smart pointer is move-only, and as a consequence our lambda
+ // implementation is also move-only.
+ encoded_message = std::move(encoded_message),
+
+ // The repeat count remaining.
+ repeat_count,
+
+ // A steady timer used for introducing a delay.
+ delay_timer = std::move(delay_timer),
+
+ // The coroutine state.
+ coro = asio::coroutine()
+ ]
+ (
+ auto& self,
+ const std::error_code& error = {},
+ std::size_t = 0
+ ) mutable
+ {
+ reenter (coro)
+ {
+ while (repeat_count > 0)
+ {
+ --repeat_count;
+
+ delay_timer->expires_after(std::chrono::seconds(1));
+ yield delay_timer->async_wait(std::move(self));
+ if (error)
+ break;
+
+ yield asio::async_write(socket,
+ asio::buffer(*encoded_message), std::move(self));
+ if (error)
+ break;
+ }
+
+ // Deallocate the encoded message and delay timer before calling the
+ // user-supplied completion handler.
+ encoded_message.reset();
+ delay_timer.reset();
+
+ // Call the user-supplied handler with the result of the operation.
+ self.complete(error);
+ }
+ },
+ token, socket);
+}
+
+#include <asio/unyield.hpp>
+
+//------------------------------------------------------------------------------
+
+void test_callback()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using a lambda as a callback.
+ async_write_messages(socket, "Testing callback\r\n", 5,
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_deferred()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the deferred completion token. This
+ // token causes the operation's initiating function to package up the
+ // operation with its arguments to return a function object, which may then be
+ // used to launch the asynchronous operation.
+ asio::async_operation auto op = async_write_messages(
+ socket, "Testing deferred\r\n", 5, asio::deferred);
+
+ // Launch the operation using a lambda as a callback.
+ std::move(op)(
+ [](const std::error_code& error)
+ {
+ if (!error)
+ {
+ std::cout << "Messages sent\n";
+ }
+ else
+ {
+ std::cout << "Error: " << error.message() << "\n";
+ }
+ });
+
+ io_context.run();
+}
+
+//------------------------------------------------------------------------------
+
+void test_future()
+{
+ asio::io_context io_context;
+
+ tcp::acceptor acceptor(io_context, {tcp::v4(), 55555});
+ tcp::socket socket = acceptor.accept();
+
+ // Test our asynchronous operation using the use_future completion token.
+ // This token causes the operation's initiating function to return a future,
+ // which may be used to synchronously wait for the result of the operation.
+ std::future<void> f = async_write_messages(
+ socket, "Testing future\r\n", 5, asio::use_future);
+
+ io_context.run();
+
+ try
+ {
+ // Get the result of the operation.
+ f.get();
+ std::cout << "Messages sent\n";
+ }
+ catch (const std::exception& e)
+ {
+ std::cout << "Error: " << e.what() << "\n";
+ }
+}
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+ test_callback();
+ test_deferred();
+ test_future();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/line_reader.hpp b/3rdparty/asio/src/examples/cpp20/type_erasure/line_reader.hpp
new file mode 100644
index 00000000000..fa19aec6b13
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/line_reader.hpp
@@ -0,0 +1,39 @@
+//
+// line_reader.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 LINE_READER_HPP
+#define LINE_READER_HPP
+
+#include <asio/any_completion_handler.hpp>
+#include <asio/async_result.hpp>
+#include <asio/error.hpp>
+#include <string>
+
+class line_reader
+{
+public:
+ virtual ~line_reader() {}
+
+ template <typename CompletionToken>
+ auto async_read_line(std::string prompt, CompletionToken&& token)
+ {
+ return asio::async_initiate<CompletionToken, void(asio::error_code, std::string)>(
+ [](auto handler, line_reader* self, std::string prompt)
+ {
+ self->async_read_line_impl(std::move(prompt), std::move(handler));
+ }, token, this, prompt);
+ }
+
+private:
+ virtual void async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(asio::error_code, std::string)> handler) = 0;
+};
+
+#endif // LINE_READER_HPP
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/main.cpp b/3rdparty/asio/src/examples/cpp20/type_erasure/main.cpp
new file mode 100644
index 00000000000..1b80dcd23ee
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/main.cpp
@@ -0,0 +1,35 @@
+//
+// main.cpp
+// ~~~~~~~~
+//
+// 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)
+//
+
+#include "line_reader.hpp"
+#include "sleep.hpp"
+#include "stdin_line_reader.hpp"
+#include <asio/co_spawn.hpp>
+#include <asio/detached.hpp>
+#include <asio/io_context.hpp>
+#include <asio/use_awaitable.hpp>
+#include <iostream>
+
+asio::awaitable<void> do_read(line_reader& reader)
+{
+ for (int i = 0; i < 10; ++i)
+ {
+ std::cout << co_await reader.async_read_line("Enter something: ", asio::use_awaitable);
+ co_await async_sleep(co_await asio::this_coro::executor, std::chrono::seconds(1), asio::use_awaitable);
+ }
+}
+
+int main()
+{
+ asio::io_context ctx{1};
+ stdin_line_reader reader{ctx.get_executor()};
+ co_spawn(ctx, do_read(reader), asio::detached);
+ ctx.run();
+}
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.cpp b/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.cpp
new file mode 100644
index 00000000000..b605866ebd7
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.cpp
@@ -0,0 +1,22 @@
+//
+// sleep.cpp
+// ~~~~~~~~~
+//
+// 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)
+//
+
+#include "sleep.hpp"
+#include <asio/consign.hpp>
+#include <asio/steady_timer.hpp>
+#include <memory>
+
+void async_sleep_impl(
+ asio::any_completion_handler<void(std::error_code)> handler,
+ asio::any_io_executor ex, std::chrono::nanoseconds duration)
+{
+ auto timer = std::make_shared<asio::steady_timer>(ex, duration);
+ timer->async_wait(asio::consign(std::move(handler), timer));
+}
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.hpp b/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.hpp
new file mode 100644
index 00000000000..7e057fc5862
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/sleep.hpp
@@ -0,0 +1,32 @@
+//
+// sleep.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 SLEEP_HPP
+#define SLEEP_HPP
+
+#include <asio/any_completion_handler.hpp>
+#include <asio/any_io_executor.hpp>
+#include <asio/async_result.hpp>
+#include <asio/error.hpp>
+#include <chrono>
+
+void async_sleep_impl(
+ asio::any_completion_handler<void(std::error_code)> handler,
+ asio::any_io_executor ex, std::chrono::nanoseconds duration);
+
+template <typename CompletionToken>
+inline auto async_sleep(asio::any_io_executor ex,
+ std::chrono::nanoseconds duration, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(std::error_code)>(
+ async_sleep_impl, token, std::move(ex), duration);
+}
+
+#endif // SLEEP_HPP
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.cpp b/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.cpp
new file mode 100644
index 00000000000..7467e820e7a
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.cpp
@@ -0,0 +1,44 @@
+//
+// stdin_line_reader.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+#include "stdin_line_reader.hpp"
+#include <asio/deferred.hpp>
+#include <asio/read_until.hpp>
+#include <iostream>
+
+stdin_line_reader::stdin_line_reader(asio::any_io_executor ex)
+ : stdin_(ex, ::dup(STDIN_FILENO))
+{
+}
+
+void stdin_line_reader::async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(asio::error_code, std::string)> handler)
+{
+ std::cout << prompt;
+ std::cout.flush();
+
+ asio::async_read_until(stdin_, asio::dynamic_buffer(buffer_), '\n',
+ asio::deferred(
+ [this](asio::error_code ec, std::size_t n)
+ {
+ if (!ec)
+ {
+ std::string result = buffer_.substr(0, n);
+ buffer_.erase(0, n);
+ return asio::deferred.values(ec, std::move(result));
+ }
+ else
+ {
+ return asio::deferred.values(ec, std::string{});
+ }
+ }
+ )
+ )(std::move(handler));
+}
diff --git a/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.hpp b/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.hpp
new file mode 100644
index 00000000000..fd54f707da0
--- /dev/null
+++ b/3rdparty/asio/src/examples/cpp20/type_erasure/stdin_line_reader.hpp
@@ -0,0 +1,30 @@
+//
+// stdin_line_reader.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 STDIN_LINE_READER_HPP
+#define STDIN_LINE_READER_HPP
+
+#include "line_reader.hpp"
+#include <asio/posix/stream_descriptor.hpp>
+
+class stdin_line_reader : public line_reader
+{
+public:
+ explicit stdin_line_reader(asio::any_io_executor ex);
+
+private:
+ void async_read_line_impl(std::string prompt,
+ asio::any_completion_handler<void(asio::error_code, std::string)> handler) override;
+
+ asio::posix::stream_descriptor stdin_;
+ std::string buffer_;
+};
+
+#endif
diff --git a/3rdparty/asio/src/tests/Makefile.am b/3rdparty/asio/src/tests/Makefile.am
index 71616985fb1..04f8a03a4ec 100644
--- a/3rdparty/asio/src/tests/Makefile.am
+++ b/3rdparty/asio/src/tests/Makefile.am
@@ -12,29 +12,43 @@ endif
SUBDIRS = properties
check_PROGRAMS = \
+ unit/any_completion_executor \
+ unit/any_completion_handler \
+ unit/any_io_executor \
+ unit/append \
+ unit/as_tuple \
unit/associated_allocator \
unit/associated_cancellation_slot \
unit/associated_executor \
+ unit/associated_immediate_executor \
unit/associator \
unit/async_result \
unit/awaitable \
unit/basic_datagram_socket \
unit/basic_deadline_timer \
+ unit/basic_file \
+ unit/basic_random_access_file \
unit/basic_raw_socket \
+ unit/basic_readable_pipe \
unit/basic_seq_packet_socket \
unit/basic_serial_port \
unit/basic_signal_set \
unit/basic_socket \
unit/basic_socket_acceptor \
+ unit/basic_stream_file \
unit/basic_stream_socket \
unit/basic_streambuf \
unit/basic_waitable_timer \
+ unit/basic_writable_pipe \
+ unit/bind_allocator \
unit/bind_cancellation_slot \
unit/bind_executor \
+ unit/bind_immediate_executor \
unit/buffered_read_stream \
unit/buffered_stream \
unit/buffered_write_stream \
unit/buffer \
+ unit/buffer_registration \
unit/buffers_iterator \
unit/cancellation_signal \
unit/cancellation_state \
@@ -43,39 +57,29 @@ check_PROGRAMS = \
unit/completion_condition \
unit/compose \
unit/connect \
+ unit/connect_pipe \
+ unit/consign \
unit/coroutine \
unit/deadline_timer \
unit/defer \
+ unit/deferred \
unit/detached \
unit/dispatch \
unit/error \
unit/execution/any_executor \
unit/execution/blocking \
unit/execution/blocking_adaptation \
- unit/execution/bulk_execute \
- unit/execution/bulk_guarantee \
- unit/execution/connect \
unit/execution/context_as \
- unit/execution/execute \
unit/execution/executor \
unit/execution/invocable_archetype \
unit/execution/mapping \
- unit/execution/operation_state \
unit/execution/outstanding_work \
unit/execution/prefer_only \
- unit/execution/receiver \
unit/execution/relationship \
- unit/execution/schedule \
- unit/execution/scheduler \
- unit/execution/sender \
- unit/execution/set_done \
- unit/execution/set_error \
- unit/execution/set_value \
- unit/execution/start \
- unit/execution/submit \
unit/execution_context \
unit/executor \
unit/executor_work_guard \
+ unit/file_base \
unit/generic/basic_endpoint \
unit/generic/datagram_protocol \
unit/generic/raw_protocol \
@@ -111,6 +115,7 @@ check_PROGRAMS = \
unit/local/basic_endpoint \
unit/local/connect_pair \
unit/local/datagram_protocol \
+ unit/local/seq_packet_protocol \
unit/local/stream_protocol \
unit/packaged_task \
unit/placeholders \
@@ -120,17 +125,24 @@ check_PROGRAMS = \
unit/posix/descriptor_base \
unit/posix/stream_descriptor \
unit/post \
+ unit/prepend \
+ unit/random_access_file \
unit/read \
unit/read_at \
unit/read_until \
+ unit/readable_pipe \
+ unit/recycling_allocator \
unit/redirect_error \
+ unit/registered_buffer \
unit/serial_port \
unit/serial_port_base \
unit/signal_set \
+ unit/signal_set_base \
unit/socket_base \
unit/static_thread_pool \
unit/steady_timer \
unit/strand \
+ unit/stream_file \
unit/streambuf \
unit/system_context \
unit/system_executor \
@@ -160,6 +172,7 @@ check_PROGRAMS = \
unit/windows/overlapped_ptr \
unit/windows/random_access_handle \
unit/windows/stream_handle \
+ unit/writable_pipe \
unit/write \
unit/write_at
@@ -173,9 +186,14 @@ noinst_PROGRAMS = \
performance/server
endif
-if HAVE_CXX14
+if HAVE_CXX11
check_PROGRAMS += \
- unit/experimental/deferred
+ unit/experimental/basic_channel \
+ unit/experimental/basic_concurrent_channel \
+ unit/experimental/channel \
+ unit/experimental/channel_traits \
+ unit/experimental/concurrent_channel \
+ unit/experimental/parallel_group
endif
if HAVE_CXX20
@@ -185,8 +203,12 @@ check_PROGRAMS += \
if HAVE_COROUTINES
check_PROGRAMS += \
unit/experimental/awaitable_operators \
+ unit/experimental/co_composed \
+ unit/experimental/coro/allocator \
unit/experimental/coro/cancel \
+ unit/experimental/coro/co_spawn \
unit/experimental/coro/exception \
+ unit/experimental/coro/executor \
unit/experimental/coro/partial \
unit/experimental/coro/simple_test \
unit/experimental/coro/stack_test \
@@ -206,29 +228,43 @@ check_PROGRAMS += \
endif
TESTS = \
+ unit/any_completion_executor \
+ unit/any_completion_handler \
+ unit/any_io_executor \
+ unit/append \
+ unit/as_tuple \
unit/associated_allocator \
unit/associated_cancellation_slot \
unit/associated_executor \
+ unit/associated_immediate_executor \
unit/associator \
unit/async_result \
unit/awaitable \
unit/basic_datagram_socket \
unit/basic_deadline_timer \
+ unit/basic_file \
+ unit/basic_random_access_file \
unit/basic_raw_socket \
+ unit/basic_readable_pipe \
unit/basic_seq_packet_socket \
unit/basic_serial_port \
unit/basic_signal_set \
unit/basic_socket \
unit/basic_socket_acceptor \
+ unit/basic_stream_file \
unit/basic_stream_socket \
unit/basic_streambuf \
unit/basic_waitable_timer \
+ unit/basic_writable_pipe \
+ unit/bind_allocator \
unit/bind_cancellation_slot \
unit/bind_executor \
+ unit/bind_immediate_executor \
unit/buffered_read_stream \
unit/buffered_stream \
unit/buffered_write_stream \
unit/buffer \
+ unit/buffer_registration \
unit/buffers_iterator \
unit/cancellation_signal \
unit/cancellation_state \
@@ -237,38 +273,28 @@ TESTS = \
unit/completion_condition \
unit/compose \
unit/connect \
+ unit/connect_pipe \
+ unit/consign \
unit/deadline_timer \
unit/defer \
+ unit/deferred \
unit/detached \
unit/dispatch \
unit/error \
unit/execution/any_executor \
unit/execution/blocking \
unit/execution/blocking_adaptation \
- unit/execution/bulk_execute \
- unit/execution/bulk_guarantee \
- unit/execution/connect \
unit/execution/context_as \
- unit/execution/execute \
unit/execution/executor \
unit/execution/invocable_archetype \
unit/execution/mapping \
- unit/execution/operation_state \
unit/execution/outstanding_work \
unit/execution/prefer_only \
- unit/execution/receiver \
unit/execution/relationship \
- unit/execution/schedule \
- unit/execution/scheduler \
- unit/execution/sender \
- unit/execution/set_done \
- unit/execution/set_error \
- unit/execution/set_value \
- unit/execution/start \
- unit/execution/submit \
unit/execution_context \
unit/executor \
unit/executor_work_guard \
+ unit/file_base \
unit/high_resolution_timer \
unit/io_context \
unit/io_context_strand \
@@ -299,6 +325,7 @@ TESTS = \
unit/local/basic_endpoint \
unit/local/connect_pair \
unit/local/datagram_protocol \
+ unit/local/seq_packet_protocol \
unit/local/stream_protocol \
unit/packaged_task \
unit/placeholders \
@@ -308,17 +335,24 @@ TESTS = \
unit/posix/descriptor_base \
unit/posix/stream_descriptor \
unit/post \
+ unit/prepend \
+ unit/random_access_file \
unit/read \
unit/read_at \
unit/read_until \
+ unit/readable_pipe \
+ unit/recycling_allocator \
unit/redirect_error \
+ unit/registered_buffer \
unit/serial_port \
unit/serial_port_base \
unit/signal_set \
+ unit/signal_set_base \
unit/socket_base \
unit/static_thread_pool \
unit/steady_timer \
unit/strand \
+ unit/stream_file \
unit/streambuf \
unit/system_context \
unit/system_executor \
@@ -348,12 +382,18 @@ TESTS = \
unit/windows/overlapped_ptr \
unit/windows/random_access_handle \
unit/windows/stream_handle \
+ unit/writable_pipe \
unit/write \
unit/write_at
-if HAVE_CXX14
+if HAVE_CXX11
TESTS += \
- unit/experimental/deferred
+ unit/experimental/basic_channel \
+ unit/experimental/basic_concurrent_channel \
+ unit/experimental/channel \
+ unit/experimental/channel_traits \
+ unit/experimental/concurrent_channel \
+ unit/experimental/parallel_group
endif
if HAVE_CXX20
@@ -363,8 +403,12 @@ TESTS += \
if HAVE_COROUTINES
TESTS += \
unit/experimental/awaitable_operators \
+ unit/experimental/co_composed \
+ unit/experimental/coro/allocator \
unit/experimental/coro/cancel \
+ unit/experimental/coro/co_spawn \
unit/experimental/coro/exception \
+ unit/experimental/coro/executor \
unit/experimental/coro/partial \
unit/experimental/coro/simple_test \
unit/experimental/coro/stack_test \
@@ -398,26 +442,40 @@ performance_client_SOURCES = performance/client.cpp
performance_server_SOURCES = performance/server.cpp
endif
+unit_any_completion_executor_SOURCES = unit/any_completion_executor.cpp
+unit_any_completion_handler_SOURCES = unit/any_completion_handler.cpp
+unit_any_io_executor_SOURCES = unit/any_io_executor.cpp
+unit_append_SOURCES = unit/append.cpp
+unit_as_tuple_SOURCES = unit/as_tuple.cpp
unit_associated_allocator_SOURCES = unit/associated_allocator.cpp
unit_associated_cancellation_slot_SOURCES = unit/associated_cancellation_slot.cpp
unit_associated_executor_SOURCES = unit/associated_executor.cpp
+unit_associated_immediate_executor_SOURCES = unit/associated_immediate_executor.cpp
unit_associator_SOURCES = unit/associator.cpp
unit_async_result_SOURCES = unit/async_result.cpp
unit_awaitable_SOURCES = unit/awaitable.cpp
unit_basic_datagram_socket_SOURCES = unit/basic_datagram_socket.cpp
unit_basic_deadline_timer_SOURCES = unit/basic_deadline_timer.cpp
+unit_basic_file_SOURCES = unit/basic_file.cpp
+unit_basic_random_access_file_SOURCES = unit/basic_random_access_file.cpp
unit_basic_raw_socket_SOURCES = unit/basic_raw_socket.cpp
+unit_basic_readable_pipe_SOURCES = unit/basic_readable_pipe.cpp
unit_basic_seq_packet_socket_SOURCES = unit/basic_seq_packet_socket.cpp
unit_basic_serial_port_SOURCES = unit/basic_serial_port.cpp
unit_basic_signal_set_SOURCES = unit/basic_signal_set.cpp
unit_basic_socket_SOURCES = unit/basic_socket.cpp
unit_basic_socket_acceptor_SOURCES = unit/basic_socket_acceptor.cpp
+unit_basic_stream_file_SOURCES = unit/basic_stream_file.cpp
unit_basic_stream_socket_SOURCES = unit/basic_stream_socket.cpp
unit_basic_streambuf_SOURCES = unit/basic_streambuf.cpp
unit_basic_waitable_timer_SOURCES = unit/basic_waitable_timer.cpp
+unit_basic_writable_pipe_SOURCES = unit/basic_writable_pipe.cpp
+unit_bind_allocator_SOURCES = unit/bind_allocator.cpp
unit_bind_cancellation_slot_SOURCES = unit/bind_cancellation_slot.cpp
unit_bind_executor_SOURCES = unit/bind_executor.cpp
+unit_bind_immediate_executor_SOURCES = unit/bind_immediate_executor.cpp
unit_buffer_SOURCES = unit/buffer.cpp
+unit_buffer_registration_SOURCES = unit/buffer_registration.cpp
unit_buffers_iterator_SOURCES = unit/buffers_iterator.cpp
unit_buffered_read_stream_SOURCES = unit/buffered_read_stream.cpp
unit_buffered_stream_SOURCES = unit/buffered_stream.cpp
@@ -429,39 +487,29 @@ unit_co_spawn_SOURCES = unit/co_spawn.cpp
unit_completion_condition_SOURCES = unit/completion_condition.cpp
unit_compose_SOURCES = unit/compose.cpp
unit_connect_SOURCES = unit/connect.cpp
+unit_connect_pipe_SOURCES = unit/connect_pipe.cpp
+unit_consign_SOURCES = unit/consign.cpp
unit_coroutine_SOURCES = unit/coroutine.cpp
unit_deadline_timer_SOURCES = unit/deadline_timer.cpp
unit_defer_SOURCES = unit/defer.cpp
+unit_deferred_SOURCES = unit/deferred.cpp
unit_detached_SOURCES = unit/detached.cpp
unit_dispatch_SOURCES = unit/dispatch.cpp
unit_error_SOURCES = unit/error.cpp
unit_execution_any_executor_SOURCES = unit/execution/any_executor.cpp
unit_execution_blocking_SOURCES = unit/execution/blocking.cpp
unit_execution_blocking_adaptation_SOURCES = unit/execution/blocking_adaptation.cpp
-unit_execution_bulk_execute_SOURCES = unit/execution/bulk_execute.cpp
-unit_execution_bulk_guarantee_SOURCES = unit/execution/bulk_guarantee.cpp
-unit_execution_connect_SOURCES = unit/execution/connect.cpp
unit_execution_context_as_SOURCES = unit/execution/context_as.cpp
-unit_execution_execute_SOURCES = unit/execution/execute.cpp
unit_execution_executor_SOURCES = unit/execution/executor.cpp
unit_execution_invocable_archetype_SOURCES = unit/execution/invocable_archetype.cpp
unit_execution_mapping_SOURCES = unit/execution/mapping.cpp
unit_execution_outstanding_work_SOURCES = unit/execution/outstanding_work.cpp
-unit_execution_operation_state_SOURCES = unit/execution/operation_state.cpp
unit_execution_prefer_only_SOURCES = unit/execution/prefer_only.cpp
-unit_execution_receiver_SOURCES = unit/execution/receiver.cpp
unit_execution_relationship_SOURCES = unit/execution/relationship.cpp
-unit_execution_schedule_SOURCES = unit/execution/schedule.cpp
-unit_execution_scheduler_SOURCES = unit/execution/scheduler.cpp
-unit_execution_sender_SOURCES = unit/execution/sender.cpp
-unit_execution_set_done_SOURCES = unit/execution/set_done.cpp
-unit_execution_set_error_SOURCES = unit/execution/set_error.cpp
-unit_execution_set_value_SOURCES = unit/execution/set_value.cpp
-unit_execution_start_SOURCES = unit/execution/start.cpp
-unit_execution_submit_SOURCES = unit/execution/submit.cpp
unit_execution_context_SOURCES = unit/execution_context.cpp
unit_executor_SOURCES = unit/executor.cpp
unit_executor_work_guard_SOURCES = unit/executor_work_guard.cpp
+unit_file_base_SOURCES = unit/file_base.cpp
unit_generic_basic_endpoint_SOURCES = unit/generic/basic_endpoint.cpp
unit_generic_datagram_protocol_SOURCES = unit/generic/datagram_protocol.cpp
unit_generic_raw_protocol_SOURCES = unit/generic/raw_protocol.cpp
@@ -497,6 +545,7 @@ unit_is_write_buffered_SOURCES = unit/is_write_buffered.cpp
unit_local_basic_endpoint_SOURCES = unit/local/basic_endpoint.cpp
unit_local_connect_pair_SOURCES = unit/local/connect_pair.cpp
unit_local_datagram_protocol_SOURCES = unit/local/datagram_protocol.cpp
+unit_local_seq_packet_protocol_SOURCES = unit/local/seq_packet_protocol.cpp
unit_local_stream_protocol_SOURCES = unit/local/stream_protocol.cpp
unit_packaged_task_SOURCES = unit/packaged_task.cpp
unit_placeholders_SOURCES = unit/placeholders.cpp
@@ -506,17 +555,24 @@ unit_posix_descriptor_SOURCES = unit/posix/descriptor.cpp
unit_posix_descriptor_base_SOURCES = unit/posix/descriptor_base.cpp
unit_posix_stream_descriptor_SOURCES = unit/posix/stream_descriptor.cpp
unit_post_SOURCES = unit/post.cpp
+unit_prepend_SOURCES = unit/prepend.cpp
+unit_random_access_file_SOURCES = unit/random_access_file.cpp
unit_read_SOURCES = unit/read.cpp
unit_read_at_SOURCES = unit/read_at.cpp
unit_read_until_SOURCES = unit/read_until.cpp
+unit_readable_pipe_SOURCES = unit/readable_pipe.cpp
+unit_recycling_allocator_SOURCES = unit/recycling_allocator.cpp
unit_redirect_error_SOURCES = unit/redirect_error.cpp
+unit_registered_buffer_SOURCES = unit/registered_buffer.cpp
unit_serial_port_SOURCES = unit/serial_port.cpp
unit_serial_port_base_SOURCES = unit/serial_port_base.cpp
unit_signal_set_SOURCES = unit/signal_set.cpp
+unit_signal_set_base_SOURCES = unit/signal_set_base.cpp
unit_socket_base_SOURCES = unit/socket_base.cpp
unit_static_thread_pool_SOURCES = unit/static_thread_pool.cpp
unit_steady_timer_SOURCES = unit/steady_timer.cpp
unit_strand_SOURCES = unit/strand.cpp
+unit_stream_file_SOURCES = unit/stream_file.cpp
unit_streambuf_SOURCES = unit/streambuf.cpp
unit_system_context_SOURCES = unit/system_context.cpp
unit_system_executor_SOURCES = unit/system_executor.cpp
@@ -546,11 +602,17 @@ unit_windows_overlapped_handle_SOURCES = unit/windows/overlapped_handle.cpp
unit_windows_overlapped_ptr_SOURCES = unit/windows/overlapped_ptr.cpp
unit_windows_random_access_handle_SOURCES = unit/windows/random_access_handle.cpp
unit_windows_stream_handle_SOURCES = unit/windows/stream_handle.cpp
+unit_writable_pipe_SOURCES = unit/writable_pipe.cpp
unit_write_SOURCES = unit/write.cpp
unit_write_at_SOURCES = unit/write_at.cpp
-if HAVE_CXX14
-unit_experimental_deferred_SOURCES = unit/experimental/deferred.cpp
+if HAVE_CXX11
+unit_experimental_basic_channel_SOURCES = unit/experimental/basic_channel.cpp
+unit_experimental_basic_concurrent_channel_SOURCES = unit/experimental/basic_concurrent_channel.cpp
+unit_experimental_channel_SOURCES = unit/experimental/channel.cpp
+unit_experimental_channel_traits_SOURCES = unit/experimental/channel_traits.cpp
+unit_experimental_concurrent_channel_SOURCES = unit/experimental/concurrent_channel.cpp
+unit_experimental_parallel_group_SOURCES = unit/experimental/parallel_group.cpp
endif
if HAVE_CXX20
@@ -558,8 +620,12 @@ unit_experimental_promise_SOURCES = unit/experimental/promise.cpp
if HAVE_COROUTINES
unit_experimental_awaitable_operators_SOURCES = unit/experimental/awaitable_operators.cpp
+unit_experimental_co_composed_SOURCES = unit/experimental/co_composed.cpp
+unit_experimental_coro_allocator_SOURCES = unit/experimental/coro/allocator.cpp
unit_experimental_coro_cancel_SOURCES = unit/experimental/coro/cancel.cpp
+unit_experimental_coro_co_spawn_SOURCES = unit/experimental/coro/co_spawn.cpp
unit_experimental_coro_exception_SOURCES = unit/experimental/coro/exception.cpp
+unit_experimental_coro_executor_SOURCES = unit/experimental/coro/executor.cpp
unit_experimental_coro_partial_SOURCES = unit/experimental/coro/partial.cpp
unit_experimental_coro_simple_test_SOURCES = unit/experimental/coro/simple_test.cpp
unit_experimental_coro_stack_test_SOURCES = unit/experimental/coro/stack_test.cpp
diff --git a/3rdparty/asio/src/tests/Makefile.in b/3rdparty/asio/src/tests/Makefile.in
index 792e3875566..a88bd89fec5 100644
--- a/3rdparty/asio/src/tests/Makefile.in
+++ b/3rdparty/asio/src/tests/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -91,56 +91,56 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@HAVE_OPENSSL_TRUE@@SEPARATE_COMPILATION_TRUE@am__append_1 = ../asio_ssl.cpp
-check_PROGRAMS = unit/associated_allocator$(EXEEXT) \
+check_PROGRAMS = unit/any_completion_executor$(EXEEXT) \
+ unit/any_completion_handler$(EXEEXT) \
+ unit/any_io_executor$(EXEEXT) unit/append$(EXEEXT) \
+ unit/as_tuple$(EXEEXT) unit/associated_allocator$(EXEEXT) \
unit/associated_cancellation_slot$(EXEEXT) \
- unit/associated_executor$(EXEEXT) unit/associator$(EXEEXT) \
- unit/async_result$(EXEEXT) unit/awaitable$(EXEEXT) \
- unit/basic_datagram_socket$(EXEEXT) \
- unit/basic_deadline_timer$(EXEEXT) \
+ unit/associated_executor$(EXEEXT) \
+ unit/associated_immediate_executor$(EXEEXT) \
+ unit/associator$(EXEEXT) unit/async_result$(EXEEXT) \
+ unit/awaitable$(EXEEXT) unit/basic_datagram_socket$(EXEEXT) \
+ unit/basic_deadline_timer$(EXEEXT) unit/basic_file$(EXEEXT) \
+ unit/basic_random_access_file$(EXEEXT) \
unit/basic_raw_socket$(EXEEXT) \
+ unit/basic_readable_pipe$(EXEEXT) \
unit/basic_seq_packet_socket$(EXEEXT) \
unit/basic_serial_port$(EXEEXT) unit/basic_signal_set$(EXEEXT) \
unit/basic_socket$(EXEEXT) unit/basic_socket_acceptor$(EXEEXT) \
+ unit/basic_stream_file$(EXEEXT) \
unit/basic_stream_socket$(EXEEXT) \
unit/basic_streambuf$(EXEEXT) \
unit/basic_waitable_timer$(EXEEXT) \
+ unit/basic_writable_pipe$(EXEEXT) unit/bind_allocator$(EXEEXT) \
unit/bind_cancellation_slot$(EXEEXT) \
- unit/bind_executor$(EXEEXT) unit/buffered_read_stream$(EXEEXT) \
+ unit/bind_executor$(EXEEXT) \
+ unit/bind_immediate_executor$(EXEEXT) \
+ unit/buffered_read_stream$(EXEEXT) \
unit/buffered_stream$(EXEEXT) \
unit/buffered_write_stream$(EXEEXT) unit/buffer$(EXEEXT) \
+ unit/buffer_registration$(EXEEXT) \
unit/buffers_iterator$(EXEEXT) \
unit/cancellation_signal$(EXEEXT) \
unit/cancellation_state$(EXEEXT) \
unit/cancellation_type$(EXEEXT) unit/co_spawn$(EXEEXT) \
unit/completion_condition$(EXEEXT) unit/compose$(EXEEXT) \
- unit/connect$(EXEEXT) unit/coroutine$(EXEEXT) \
+ unit/connect$(EXEEXT) unit/connect_pipe$(EXEEXT) \
+ unit/consign$(EXEEXT) unit/coroutine$(EXEEXT) \
unit/deadline_timer$(EXEEXT) unit/defer$(EXEEXT) \
- unit/detached$(EXEEXT) unit/dispatch$(EXEEXT) \
- unit/error$(EXEEXT) unit/execution/any_executor$(EXEEXT) \
+ unit/deferred$(EXEEXT) unit/detached$(EXEEXT) \
+ unit/dispatch$(EXEEXT) unit/error$(EXEEXT) \
+ unit/execution/any_executor$(EXEEXT) \
unit/execution/blocking$(EXEEXT) \
unit/execution/blocking_adaptation$(EXEEXT) \
- unit/execution/bulk_execute$(EXEEXT) \
- unit/execution/bulk_guarantee$(EXEEXT) \
- unit/execution/connect$(EXEEXT) \
unit/execution/context_as$(EXEEXT) \
- unit/execution/execute$(EXEEXT) \
unit/execution/executor$(EXEEXT) \
unit/execution/invocable_archetype$(EXEEXT) \
unit/execution/mapping$(EXEEXT) \
- unit/execution/operation_state$(EXEEXT) \
unit/execution/outstanding_work$(EXEEXT) \
unit/execution/prefer_only$(EXEEXT) \
- unit/execution/receiver$(EXEEXT) \
unit/execution/relationship$(EXEEXT) \
- unit/execution/schedule$(EXEEXT) \
- unit/execution/scheduler$(EXEEXT) \
- unit/execution/sender$(EXEEXT) \
- unit/execution/set_done$(EXEEXT) \
- unit/execution/set_error$(EXEEXT) \
- unit/execution/set_value$(EXEEXT) \
- unit/execution/start$(EXEEXT) unit/execution/submit$(EXEEXT) \
unit/execution_context$(EXEEXT) unit/executor$(EXEEXT) \
- unit/executor_work_guard$(EXEEXT) \
+ unit/executor_work_guard$(EXEEXT) unit/file_base$(EXEEXT) \
unit/generic/basic_endpoint$(EXEEXT) \
unit/generic/datagram_protocol$(EXEEXT) \
unit/generic/raw_protocol$(EXEEXT) \
@@ -168,6 +168,7 @@ check_PROGRAMS = unit/associated_allocator$(EXEEXT) \
unit/local/basic_endpoint$(EXEEXT) \
unit/local/connect_pair$(EXEEXT) \
unit/local/datagram_protocol$(EXEEXT) \
+ unit/local/seq_packet_protocol$(EXEEXT) \
unit/local/stream_protocol$(EXEEXT) \
unit/packaged_task$(EXEEXT) unit/placeholders$(EXEEXT) \
unit/posix/basic_descriptor$(EXEEXT) \
@@ -175,22 +176,25 @@ check_PROGRAMS = unit/associated_allocator$(EXEEXT) \
unit/posix/descriptor$(EXEEXT) \
unit/posix/descriptor_base$(EXEEXT) \
unit/posix/stream_descriptor$(EXEEXT) unit/post$(EXEEXT) \
+ unit/prepend$(EXEEXT) unit/random_access_file$(EXEEXT) \
unit/read$(EXEEXT) unit/read_at$(EXEEXT) \
- unit/read_until$(EXEEXT) unit/redirect_error$(EXEEXT) \
- unit/serial_port$(EXEEXT) unit/serial_port_base$(EXEEXT) \
- unit/signal_set$(EXEEXT) unit/socket_base$(EXEEXT) \
+ unit/read_until$(EXEEXT) unit/readable_pipe$(EXEEXT) \
+ unit/recycling_allocator$(EXEEXT) unit/redirect_error$(EXEEXT) \
+ unit/registered_buffer$(EXEEXT) unit/serial_port$(EXEEXT) \
+ unit/serial_port_base$(EXEEXT) unit/signal_set$(EXEEXT) \
+ unit/signal_set_base$(EXEEXT) unit/socket_base$(EXEEXT) \
unit/static_thread_pool$(EXEEXT) unit/steady_timer$(EXEEXT) \
- unit/strand$(EXEEXT) unit/streambuf$(EXEEXT) \
- unit/system_context$(EXEEXT) unit/system_executor$(EXEEXT) \
- unit/system_timer$(EXEEXT) unit/this_coro$(EXEEXT) \
- unit/thread$(EXEEXT) unit/thread_pool$(EXEEXT) \
- unit/time_traits$(EXEEXT) unit/ts/buffer$(EXEEXT) \
- unit/ts/executor$(EXEEXT) unit/ts/internet$(EXEEXT) \
- unit/ts/io_context$(EXEEXT) unit/ts/net$(EXEEXT) \
- unit/ts/netfwd$(EXEEXT) unit/ts/socket$(EXEEXT) \
- unit/ts/timer$(EXEEXT) unit/use_awaitable$(EXEEXT) \
- unit/use_future$(EXEEXT) unit/uses_executor$(EXEEXT) \
- unit/wait_traits$(EXEEXT) \
+ unit/strand$(EXEEXT) unit/stream_file$(EXEEXT) \
+ unit/streambuf$(EXEEXT) unit/system_context$(EXEEXT) \
+ unit/system_executor$(EXEEXT) unit/system_timer$(EXEEXT) \
+ unit/this_coro$(EXEEXT) unit/thread$(EXEEXT) \
+ unit/thread_pool$(EXEEXT) unit/time_traits$(EXEEXT) \
+ unit/ts/buffer$(EXEEXT) unit/ts/executor$(EXEEXT) \
+ unit/ts/internet$(EXEEXT) unit/ts/io_context$(EXEEXT) \
+ unit/ts/net$(EXEEXT) unit/ts/netfwd$(EXEEXT) \
+ unit/ts/socket$(EXEEXT) unit/ts/timer$(EXEEXT) \
+ unit/use_awaitable$(EXEEXT) unit/use_future$(EXEEXT) \
+ unit/uses_executor$(EXEEXT) unit/wait_traits$(EXEEXT) \
unit/windows/basic_object_handle$(EXEEXT) \
unit/windows/basic_overlapped_handle$(EXEEXT) \
unit/windows/basic_random_access_handle$(EXEEXT) \
@@ -199,7 +203,8 @@ check_PROGRAMS = unit/associated_allocator$(EXEEXT) \
unit/windows/overlapped_handle$(EXEEXT) \
unit/windows/overlapped_ptr$(EXEEXT) \
unit/windows/random_access_handle$(EXEEXT) \
- unit/windows/stream_handle$(EXEEXT) unit/write$(EXEEXT) \
+ unit/windows/stream_handle$(EXEEXT) \
+ unit/writable_pipe$(EXEEXT) unit/write$(EXEEXT) \
unit/write_at$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \
$(am__EXEEXT_3) $(am__EXEEXT_4)
@STANDALONE_FALSE@noinst_PROGRAMS = latency/tcp_client$(EXEEXT) \
@@ -208,16 +213,25 @@ check_PROGRAMS = unit/associated_allocator$(EXEEXT) \
@STANDALONE_FALSE@ latency/udp_server$(EXEEXT) \
@STANDALONE_FALSE@ performance/client$(EXEEXT) \
@STANDALONE_FALSE@ performance/server$(EXEEXT)
-@HAVE_CXX14_TRUE@am__append_2 = \
-@HAVE_CXX14_TRUE@ unit/experimental/deferred
+@HAVE_CXX11_TRUE@am__append_2 = \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_concurrent_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/channel \
+@HAVE_CXX11_TRUE@ unit/experimental/channel_traits \
+@HAVE_CXX11_TRUE@ unit/experimental/concurrent_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/parallel_group
@HAVE_CXX20_TRUE@am__append_3 = \
@HAVE_CXX20_TRUE@ unit/experimental/promise
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am__append_4 = \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/awaitable_operators \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/co_composed \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/allocator \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/cancel \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/co_spawn \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/exception \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/executor \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/partial \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/simple_test \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/stack_test \
@@ -232,56 +246,55 @@ check_PROGRAMS = unit/associated_allocator$(EXEEXT) \
@HAVE_OPENSSL_TRUE@ unit/ssl/stream_base \
@HAVE_OPENSSL_TRUE@ unit/ssl/stream
-TESTS = unit/associated_allocator$(EXEEXT) \
+TESTS = unit/any_completion_executor$(EXEEXT) \
+ unit/any_completion_handler$(EXEEXT) \
+ unit/any_io_executor$(EXEEXT) unit/append$(EXEEXT) \
+ unit/as_tuple$(EXEEXT) unit/associated_allocator$(EXEEXT) \
unit/associated_cancellation_slot$(EXEEXT) \
- unit/associated_executor$(EXEEXT) unit/associator$(EXEEXT) \
- unit/async_result$(EXEEXT) unit/awaitable$(EXEEXT) \
- unit/basic_datagram_socket$(EXEEXT) \
- unit/basic_deadline_timer$(EXEEXT) \
+ unit/associated_executor$(EXEEXT) \
+ unit/associated_immediate_executor$(EXEEXT) \
+ unit/associator$(EXEEXT) unit/async_result$(EXEEXT) \
+ unit/awaitable$(EXEEXT) unit/basic_datagram_socket$(EXEEXT) \
+ unit/basic_deadline_timer$(EXEEXT) unit/basic_file$(EXEEXT) \
+ unit/basic_random_access_file$(EXEEXT) \
unit/basic_raw_socket$(EXEEXT) \
+ unit/basic_readable_pipe$(EXEEXT) \
unit/basic_seq_packet_socket$(EXEEXT) \
unit/basic_serial_port$(EXEEXT) unit/basic_signal_set$(EXEEXT) \
unit/basic_socket$(EXEEXT) unit/basic_socket_acceptor$(EXEEXT) \
+ unit/basic_stream_file$(EXEEXT) \
unit/basic_stream_socket$(EXEEXT) \
unit/basic_streambuf$(EXEEXT) \
unit/basic_waitable_timer$(EXEEXT) \
+ unit/basic_writable_pipe$(EXEEXT) unit/bind_allocator$(EXEEXT) \
unit/bind_cancellation_slot$(EXEEXT) \
- unit/bind_executor$(EXEEXT) unit/buffered_read_stream$(EXEEXT) \
+ unit/bind_executor$(EXEEXT) \
+ unit/bind_immediate_executor$(EXEEXT) \
+ unit/buffered_read_stream$(EXEEXT) \
unit/buffered_stream$(EXEEXT) \
unit/buffered_write_stream$(EXEEXT) unit/buffer$(EXEEXT) \
+ unit/buffer_registration$(EXEEXT) \
unit/buffers_iterator$(EXEEXT) \
unit/cancellation_signal$(EXEEXT) \
unit/cancellation_state$(EXEEXT) \
unit/cancellation_type$(EXEEXT) unit/co_spawn$(EXEEXT) \
unit/completion_condition$(EXEEXT) unit/compose$(EXEEXT) \
- unit/connect$(EXEEXT) unit/deadline_timer$(EXEEXT) \
- unit/defer$(EXEEXT) unit/detached$(EXEEXT) \
- unit/dispatch$(EXEEXT) unit/error$(EXEEXT) \
- unit/execution/any_executor$(EXEEXT) \
+ unit/connect$(EXEEXT) unit/connect_pipe$(EXEEXT) \
+ unit/consign$(EXEEXT) unit/deadline_timer$(EXEEXT) \
+ unit/defer$(EXEEXT) unit/deferred$(EXEEXT) \
+ unit/detached$(EXEEXT) unit/dispatch$(EXEEXT) \
+ unit/error$(EXEEXT) unit/execution/any_executor$(EXEEXT) \
unit/execution/blocking$(EXEEXT) \
unit/execution/blocking_adaptation$(EXEEXT) \
- unit/execution/bulk_execute$(EXEEXT) \
- unit/execution/bulk_guarantee$(EXEEXT) \
- unit/execution/connect$(EXEEXT) \
unit/execution/context_as$(EXEEXT) \
- unit/execution/execute$(EXEEXT) \
unit/execution/executor$(EXEEXT) \
unit/execution/invocable_archetype$(EXEEXT) \
unit/execution/mapping$(EXEEXT) \
- unit/execution/operation_state$(EXEEXT) \
unit/execution/outstanding_work$(EXEEXT) \
unit/execution/prefer_only$(EXEEXT) \
- unit/execution/receiver$(EXEEXT) \
unit/execution/relationship$(EXEEXT) \
- unit/execution/schedule$(EXEEXT) \
- unit/execution/scheduler$(EXEEXT) \
- unit/execution/sender$(EXEEXT) \
- unit/execution/set_done$(EXEEXT) \
- unit/execution/set_error$(EXEEXT) \
- unit/execution/set_value$(EXEEXT) \
- unit/execution/start$(EXEEXT) unit/execution/submit$(EXEEXT) \
unit/execution_context$(EXEEXT) unit/executor$(EXEEXT) \
- unit/executor_work_guard$(EXEEXT) \
+ unit/executor_work_guard$(EXEEXT) unit/file_base$(EXEEXT) \
unit/high_resolution_timer$(EXEEXT) unit/io_context$(EXEEXT) \
unit/io_context_strand$(EXEEXT) unit/ip/address$(EXEEXT) \
unit/ip/address_v4$(EXEEXT) \
@@ -304,6 +317,7 @@ TESTS = unit/associated_allocator$(EXEEXT) \
unit/local/basic_endpoint$(EXEEXT) \
unit/local/connect_pair$(EXEEXT) \
unit/local/datagram_protocol$(EXEEXT) \
+ unit/local/seq_packet_protocol$(EXEEXT) \
unit/local/stream_protocol$(EXEEXT) \
unit/packaged_task$(EXEEXT) unit/placeholders$(EXEEXT) \
unit/posix/basic_descriptor$(EXEEXT) \
@@ -311,22 +325,25 @@ TESTS = unit/associated_allocator$(EXEEXT) \
unit/posix/descriptor$(EXEEXT) \
unit/posix/descriptor_base$(EXEEXT) \
unit/posix/stream_descriptor$(EXEEXT) unit/post$(EXEEXT) \
+ unit/prepend$(EXEEXT) unit/random_access_file$(EXEEXT) \
unit/read$(EXEEXT) unit/read_at$(EXEEXT) \
- unit/read_until$(EXEEXT) unit/redirect_error$(EXEEXT) \
- unit/serial_port$(EXEEXT) unit/serial_port_base$(EXEEXT) \
- unit/signal_set$(EXEEXT) unit/socket_base$(EXEEXT) \
+ unit/read_until$(EXEEXT) unit/readable_pipe$(EXEEXT) \
+ unit/recycling_allocator$(EXEEXT) unit/redirect_error$(EXEEXT) \
+ unit/registered_buffer$(EXEEXT) unit/serial_port$(EXEEXT) \
+ unit/serial_port_base$(EXEEXT) unit/signal_set$(EXEEXT) \
+ unit/signal_set_base$(EXEEXT) unit/socket_base$(EXEEXT) \
unit/static_thread_pool$(EXEEXT) unit/steady_timer$(EXEEXT) \
- unit/strand$(EXEEXT) unit/streambuf$(EXEEXT) \
- unit/system_context$(EXEEXT) unit/system_executor$(EXEEXT) \
- unit/system_timer$(EXEEXT) unit/this_coro$(EXEEXT) \
- unit/thread$(EXEEXT) unit/thread_pool$(EXEEXT) \
- unit/time_traits$(EXEEXT) unit/ts/buffer$(EXEEXT) \
- unit/ts/executor$(EXEEXT) unit/ts/internet$(EXEEXT) \
- unit/ts/io_context$(EXEEXT) unit/ts/net$(EXEEXT) \
- unit/ts/netfwd$(EXEEXT) unit/ts/socket$(EXEEXT) \
- unit/ts/timer$(EXEEXT) unit/use_awaitable$(EXEEXT) \
- unit/use_future$(EXEEXT) unit/uses_executor$(EXEEXT) \
- unit/wait_traits$(EXEEXT) \
+ unit/strand$(EXEEXT) unit/stream_file$(EXEEXT) \
+ unit/streambuf$(EXEEXT) unit/system_context$(EXEEXT) \
+ unit/system_executor$(EXEEXT) unit/system_timer$(EXEEXT) \
+ unit/this_coro$(EXEEXT) unit/thread$(EXEEXT) \
+ unit/thread_pool$(EXEEXT) unit/time_traits$(EXEEXT) \
+ unit/ts/buffer$(EXEEXT) unit/ts/executor$(EXEEXT) \
+ unit/ts/internet$(EXEEXT) unit/ts/io_context$(EXEEXT) \
+ unit/ts/net$(EXEEXT) unit/ts/netfwd$(EXEEXT) \
+ unit/ts/socket$(EXEEXT) unit/ts/timer$(EXEEXT) \
+ unit/use_awaitable$(EXEEXT) unit/use_future$(EXEEXT) \
+ unit/uses_executor$(EXEEXT) unit/wait_traits$(EXEEXT) \
unit/windows/basic_object_handle$(EXEEXT) \
unit/windows/basic_overlapped_handle$(EXEEXT) \
unit/windows/basic_random_access_handle$(EXEEXT) \
@@ -335,19 +352,29 @@ TESTS = unit/associated_allocator$(EXEEXT) \
unit/windows/overlapped_handle$(EXEEXT) \
unit/windows/overlapped_ptr$(EXEEXT) \
unit/windows/random_access_handle$(EXEEXT) \
- unit/windows/stream_handle$(EXEEXT) unit/write$(EXEEXT) \
+ unit/windows/stream_handle$(EXEEXT) \
+ unit/writable_pipe$(EXEEXT) unit/write$(EXEEXT) \
unit/write_at$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \
$(am__EXEEXT_3) $(am__EXEEXT_4)
-@HAVE_CXX14_TRUE@am__append_6 = \
-@HAVE_CXX14_TRUE@ unit/experimental/deferred
+@HAVE_CXX11_TRUE@am__append_6 = \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_concurrent_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/channel \
+@HAVE_CXX11_TRUE@ unit/experimental/channel_traits \
+@HAVE_CXX11_TRUE@ unit/experimental/concurrent_channel \
+@HAVE_CXX11_TRUE@ unit/experimental/parallel_group
@HAVE_CXX20_TRUE@am__append_7 = \
@HAVE_CXX20_TRUE@ unit/experimental/promise
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am__append_8 = \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/awaitable_operators \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/co_composed \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/allocator \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/cancel \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/co_spawn \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/exception \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/executor \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/partial \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/simple_test \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/stack_test \
@@ -372,11 +399,21 @@ DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-@HAVE_CXX14_TRUE@am__EXEEXT_1 = unit/experimental/deferred$(EXEEXT)
+@HAVE_CXX11_TRUE@am__EXEEXT_1 = \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_channel$(EXEEXT) \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_concurrent_channel$(EXEEXT) \
+@HAVE_CXX11_TRUE@ unit/experimental/channel$(EXEEXT) \
+@HAVE_CXX11_TRUE@ unit/experimental/channel_traits$(EXEEXT) \
+@HAVE_CXX11_TRUE@ unit/experimental/concurrent_channel$(EXEEXT) \
+@HAVE_CXX11_TRUE@ unit/experimental/parallel_group$(EXEEXT)
@HAVE_CXX20_TRUE@am__EXEEXT_2 = unit/experimental/promise$(EXEEXT)
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am__EXEEXT_3 = unit/experimental/awaitable_operators$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/co_composed$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/allocator$(EXEEXT) \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/cancel$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/co_spawn$(EXEEXT) \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/exception$(EXEEXT) \
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/executor$(EXEEXT) \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/partial$(EXEEXT) \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/simple_test$(EXEEXT) \
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@ unit/experimental/coro/stack_test$(EXEEXT) \
@@ -446,6 +483,33 @@ performance_server_OBJECTS = $(am_performance_server_OBJECTS)
performance_server_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@performance_server_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_any_completion_executor_OBJECTS = \
+ unit/any_completion_executor.$(OBJEXT)
+unit_any_completion_executor_OBJECTS = \
+ $(am_unit_any_completion_executor_OBJECTS)
+unit_any_completion_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_any_completion_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_any_completion_handler_OBJECTS = \
+ unit/any_completion_handler.$(OBJEXT)
+unit_any_completion_handler_OBJECTS = \
+ $(am_unit_any_completion_handler_OBJECTS)
+unit_any_completion_handler_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_any_completion_handler_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_any_io_executor_OBJECTS = unit/any_io_executor.$(OBJEXT)
+unit_any_io_executor_OBJECTS = $(am_unit_any_io_executor_OBJECTS)
+unit_any_io_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_any_io_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_append_OBJECTS = unit/append.$(OBJEXT)
+unit_append_OBJECTS = $(am_unit_append_OBJECTS)
+unit_append_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_append_DEPENDENCIES = libasio.a
+am_unit_as_tuple_OBJECTS = unit/as_tuple.$(OBJEXT)
+unit_as_tuple_OBJECTS = $(am_unit_as_tuple_OBJECTS)
+unit_as_tuple_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_as_tuple_DEPENDENCIES = libasio.a
am_unit_associated_allocator_OBJECTS = \
unit/associated_allocator.$(OBJEXT)
unit_associated_allocator_OBJECTS = \
@@ -467,6 +531,13 @@ unit_associated_executor_OBJECTS = \
unit_associated_executor_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_associated_executor_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_associated_immediate_executor_OBJECTS = \
+ unit/associated_immediate_executor.$(OBJEXT)
+unit_associated_immediate_executor_OBJECTS = \
+ $(am_unit_associated_immediate_executor_OBJECTS)
+unit_associated_immediate_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_associated_immediate_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_associator_OBJECTS = unit/associator.$(OBJEXT)
unit_associator_OBJECTS = $(am_unit_associator_OBJECTS)
unit_associator_LDADD = $(LDADD)
@@ -493,11 +564,29 @@ unit_basic_deadline_timer_OBJECTS = \
unit_basic_deadline_timer_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_basic_deadline_timer_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_file_OBJECTS = unit/basic_file.$(OBJEXT)
+unit_basic_file_OBJECTS = $(am_unit_basic_file_OBJECTS)
+unit_basic_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_file_DEPENDENCIES = libasio.a
+am_unit_basic_random_access_file_OBJECTS = \
+ unit/basic_random_access_file.$(OBJEXT)
+unit_basic_random_access_file_OBJECTS = \
+ $(am_unit_basic_random_access_file_OBJECTS)
+unit_basic_random_access_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_random_access_file_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_basic_raw_socket_OBJECTS = unit/basic_raw_socket.$(OBJEXT)
unit_basic_raw_socket_OBJECTS = $(am_unit_basic_raw_socket_OBJECTS)
unit_basic_raw_socket_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_basic_raw_socket_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_readable_pipe_OBJECTS = \
+ unit/basic_readable_pipe.$(OBJEXT)
+unit_basic_readable_pipe_OBJECTS = \
+ $(am_unit_basic_readable_pipe_OBJECTS)
+unit_basic_readable_pipe_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_readable_pipe_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_basic_seq_packet_socket_OBJECTS = \
unit/basic_seq_packet_socket.$(OBJEXT)
unit_basic_seq_packet_socket_OBJECTS = \
@@ -526,6 +615,11 @@ unit_basic_socket_acceptor_OBJECTS = \
unit_basic_socket_acceptor_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_basic_socket_acceptor_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_stream_file_OBJECTS = unit/basic_stream_file.$(OBJEXT)
+unit_basic_stream_file_OBJECTS = $(am_unit_basic_stream_file_OBJECTS)
+unit_basic_stream_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_stream_file_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_basic_stream_socket_OBJECTS = \
unit/basic_stream_socket.$(OBJEXT)
unit_basic_stream_socket_OBJECTS = \
@@ -545,6 +639,18 @@ unit_basic_waitable_timer_OBJECTS = \
unit_basic_waitable_timer_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_basic_waitable_timer_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_basic_writable_pipe_OBJECTS = \
+ unit/basic_writable_pipe.$(OBJEXT)
+unit_basic_writable_pipe_OBJECTS = \
+ $(am_unit_basic_writable_pipe_OBJECTS)
+unit_basic_writable_pipe_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_basic_writable_pipe_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_bind_allocator_OBJECTS = unit/bind_allocator.$(OBJEXT)
+unit_bind_allocator_OBJECTS = $(am_unit_bind_allocator_OBJECTS)
+unit_bind_allocator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_bind_allocator_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_bind_cancellation_slot_OBJECTS = \
unit/bind_cancellation_slot.$(OBJEXT)
unit_bind_cancellation_slot_OBJECTS = \
@@ -557,10 +663,24 @@ unit_bind_executor_OBJECTS = $(am_unit_bind_executor_OBJECTS)
unit_bind_executor_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_bind_executor_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_bind_immediate_executor_OBJECTS = \
+ unit/bind_immediate_executor.$(OBJEXT)
+unit_bind_immediate_executor_OBJECTS = \
+ $(am_unit_bind_immediate_executor_OBJECTS)
+unit_bind_immediate_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_bind_immediate_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_buffer_OBJECTS = unit/buffer.$(OBJEXT)
unit_buffer_OBJECTS = $(am_unit_buffer_OBJECTS)
unit_buffer_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_buffer_DEPENDENCIES = libasio.a
+am_unit_buffer_registration_OBJECTS = \
+ unit/buffer_registration.$(OBJEXT)
+unit_buffer_registration_OBJECTS = \
+ $(am_unit_buffer_registration_OBJECTS)
+unit_buffer_registration_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_buffer_registration_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_buffered_read_stream_OBJECTS = \
unit/buffered_read_stream.$(OBJEXT)
unit_buffered_read_stream_OBJECTS = \
@@ -623,6 +743,14 @@ am_unit_connect_OBJECTS = unit/connect.$(OBJEXT)
unit_connect_OBJECTS = $(am_unit_connect_OBJECTS)
unit_connect_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_connect_DEPENDENCIES = libasio.a
+am_unit_connect_pipe_OBJECTS = unit/connect_pipe.$(OBJEXT)
+unit_connect_pipe_OBJECTS = $(am_unit_connect_pipe_OBJECTS)
+unit_connect_pipe_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_connect_pipe_DEPENDENCIES = libasio.a
+am_unit_consign_OBJECTS = unit/consign.$(OBJEXT)
+unit_consign_OBJECTS = $(am_unit_consign_OBJECTS)
+unit_consign_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_consign_DEPENDENCIES = libasio.a
am_unit_coroutine_OBJECTS = unit/coroutine.$(OBJEXT)
unit_coroutine_OBJECTS = $(am_unit_coroutine_OBJECTS)
unit_coroutine_LDADD = $(LDADD)
@@ -636,6 +764,10 @@ am_unit_defer_OBJECTS = unit/defer.$(OBJEXT)
unit_defer_OBJECTS = $(am_unit_defer_OBJECTS)
unit_defer_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_defer_DEPENDENCIES = libasio.a
+am_unit_deferred_OBJECTS = unit/deferred.$(OBJEXT)
+unit_deferred_OBJECTS = $(am_unit_deferred_OBJECTS)
+unit_deferred_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_deferred_DEPENDENCIES = libasio.a
am_unit_detached_OBJECTS = unit/detached.$(OBJEXT)
unit_detached_OBJECTS = $(am_unit_detached_OBJECTS)
unit_detached_LDADD = $(LDADD)
@@ -669,25 +801,6 @@ unit_execution_blocking_adaptation_OBJECTS = \
unit_execution_blocking_adaptation_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_execution_blocking_adaptation_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_bulk_execute_OBJECTS = \
- unit/execution/bulk_execute.$(OBJEXT)
-unit_execution_bulk_execute_OBJECTS = \
- $(am_unit_execution_bulk_execute_OBJECTS)
-unit_execution_bulk_execute_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_bulk_execute_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_bulk_guarantee_OBJECTS = \
- unit/execution/bulk_guarantee.$(OBJEXT)
-unit_execution_bulk_guarantee_OBJECTS = \
- $(am_unit_execution_bulk_guarantee_OBJECTS)
-unit_execution_bulk_guarantee_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_bulk_guarantee_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_connect_OBJECTS = unit/execution/connect.$(OBJEXT)
-unit_execution_connect_OBJECTS = $(am_unit_execution_connect_OBJECTS)
-unit_execution_connect_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_connect_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_execution_context_as_OBJECTS = \
unit/execution/context_as.$(OBJEXT)
unit_execution_context_as_OBJECTS = \
@@ -695,11 +808,6 @@ unit_execution_context_as_OBJECTS = \
unit_execution_context_as_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_execution_context_as_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_execute_OBJECTS = unit/execution/execute.$(OBJEXT)
-unit_execution_execute_OBJECTS = $(am_unit_execution_execute_OBJECTS)
-unit_execution_execute_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_execute_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_execution_executor_OBJECTS = \
unit/execution/executor.$(OBJEXT)
unit_execution_executor_OBJECTS = \
@@ -719,13 +827,6 @@ unit_execution_mapping_OBJECTS = $(am_unit_execution_mapping_OBJECTS)
unit_execution_mapping_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_execution_mapping_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_operation_state_OBJECTS = \
- unit/execution/operation_state.$(OBJEXT)
-unit_execution_operation_state_OBJECTS = \
- $(am_unit_execution_operation_state_OBJECTS)
-unit_execution_operation_state_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_operation_state_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_execution_outstanding_work_OBJECTS = \
unit/execution/outstanding_work.$(OBJEXT)
unit_execution_outstanding_work_OBJECTS = \
@@ -740,13 +841,6 @@ unit_execution_prefer_only_OBJECTS = \
unit_execution_prefer_only_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_execution_prefer_only_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_receiver_OBJECTS = \
- unit/execution/receiver.$(OBJEXT)
-unit_execution_receiver_OBJECTS = \
- $(am_unit_execution_receiver_OBJECTS)
-unit_execution_receiver_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_receiver_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_execution_relationship_OBJECTS = \
unit/execution/relationship.$(OBJEXT)
unit_execution_relationship_OBJECTS = \
@@ -754,56 +848,6 @@ unit_execution_relationship_OBJECTS = \
unit_execution_relationship_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_execution_relationship_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_schedule_OBJECTS = \
- unit/execution/schedule.$(OBJEXT)
-unit_execution_schedule_OBJECTS = \
- $(am_unit_execution_schedule_OBJECTS)
-unit_execution_schedule_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_schedule_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_scheduler_OBJECTS = \
- unit/execution/scheduler.$(OBJEXT)
-unit_execution_scheduler_OBJECTS = \
- $(am_unit_execution_scheduler_OBJECTS)
-unit_execution_scheduler_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_scheduler_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_sender_OBJECTS = unit/execution/sender.$(OBJEXT)
-unit_execution_sender_OBJECTS = $(am_unit_execution_sender_OBJECTS)
-unit_execution_sender_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_sender_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_set_done_OBJECTS = \
- unit/execution/set_done.$(OBJEXT)
-unit_execution_set_done_OBJECTS = \
- $(am_unit_execution_set_done_OBJECTS)
-unit_execution_set_done_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_set_done_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_set_error_OBJECTS = \
- unit/execution/set_error.$(OBJEXT)
-unit_execution_set_error_OBJECTS = \
- $(am_unit_execution_set_error_OBJECTS)
-unit_execution_set_error_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_set_error_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_set_value_OBJECTS = \
- unit/execution/set_value.$(OBJEXT)
-unit_execution_set_value_OBJECTS = \
- $(am_unit_execution_set_value_OBJECTS)
-unit_execution_set_value_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_set_value_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_start_OBJECTS = unit/execution/start.$(OBJEXT)
-unit_execution_start_OBJECTS = $(am_unit_execution_start_OBJECTS)
-unit_execution_start_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_start_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
-am_unit_execution_submit_OBJECTS = unit/execution/submit.$(OBJEXT)
-unit_execution_submit_OBJECTS = $(am_unit_execution_submit_OBJECTS)
-unit_execution_submit_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_execution_submit_DEPENDENCIES = \
-@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_execution_context_OBJECTS = unit/execution_context.$(OBJEXT)
unit_execution_context_OBJECTS = $(am_unit_execution_context_OBJECTS)
unit_execution_context_LDADD = $(LDADD)
@@ -828,6 +872,65 @@ unit_experimental_awaitable_operators_OBJECTS = \
unit_experimental_awaitable_operators_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_experimental_awaitable_operators_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_basic_channel_SOURCES_DIST = \
+ unit/experimental/basic_channel.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_basic_channel_OBJECTS = \
+@HAVE_CXX11_TRUE@ unit/experimental/basic_channel.$(OBJEXT)
+unit_experimental_basic_channel_OBJECTS = \
+ $(am_unit_experimental_basic_channel_OBJECTS)
+unit_experimental_basic_channel_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_basic_channel_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_basic_concurrent_channel_SOURCES_DIST = \
+ unit/experimental/basic_concurrent_channel.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_basic_concurrent_channel_OBJECTS = unit/experimental/basic_concurrent_channel.$(OBJEXT)
+unit_experimental_basic_concurrent_channel_OBJECTS = \
+ $(am_unit_experimental_basic_concurrent_channel_OBJECTS)
+unit_experimental_basic_concurrent_channel_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_basic_concurrent_channel_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_channel_SOURCES_DIST = \
+ unit/experimental/channel.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_channel_OBJECTS = \
+@HAVE_CXX11_TRUE@ unit/experimental/channel.$(OBJEXT)
+unit_experimental_channel_OBJECTS = \
+ $(am_unit_experimental_channel_OBJECTS)
+unit_experimental_channel_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_channel_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_channel_traits_SOURCES_DIST = \
+ unit/experimental/channel_traits.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_channel_traits_OBJECTS = \
+@HAVE_CXX11_TRUE@ unit/experimental/channel_traits.$(OBJEXT)
+unit_experimental_channel_traits_OBJECTS = \
+ $(am_unit_experimental_channel_traits_OBJECTS)
+unit_experimental_channel_traits_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_channel_traits_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_co_composed_SOURCES_DIST = \
+ unit/experimental/co_composed.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_co_composed_OBJECTS = unit/experimental/co_composed.$(OBJEXT)
+unit_experimental_co_composed_OBJECTS = \
+ $(am_unit_experimental_co_composed_OBJECTS)
+unit_experimental_co_composed_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_co_composed_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_concurrent_channel_SOURCES_DIST = \
+ unit/experimental/concurrent_channel.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_concurrent_channel_OBJECTS = unit/experimental/concurrent_channel.$(OBJEXT)
+unit_experimental_concurrent_channel_OBJECTS = \
+ $(am_unit_experimental_concurrent_channel_OBJECTS)
+unit_experimental_concurrent_channel_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_concurrent_channel_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_allocator_SOURCES_DIST = \
+ unit/experimental/coro/allocator.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_allocator_OBJECTS = unit/experimental/coro/allocator.$(OBJEXT)
+unit_experimental_coro_allocator_OBJECTS = \
+ $(am_unit_experimental_coro_allocator_OBJECTS)
+unit_experimental_coro_allocator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_allocator_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am__unit_experimental_coro_cancel_SOURCES_DIST = \
unit/experimental/coro/cancel.cpp
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_cancel_OBJECTS = unit/experimental/coro/cancel.$(OBJEXT)
@@ -836,6 +939,14 @@ unit_experimental_coro_cancel_OBJECTS = \
unit_experimental_coro_cancel_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_cancel_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_co_spawn_SOURCES_DIST = \
+ unit/experimental/coro/co_spawn.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_co_spawn_OBJECTS = unit/experimental/coro/co_spawn.$(OBJEXT)
+unit_experimental_coro_co_spawn_OBJECTS = \
+ $(am_unit_experimental_coro_co_spawn_OBJECTS)
+unit_experimental_coro_co_spawn_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_co_spawn_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am__unit_experimental_coro_exception_SOURCES_DIST = \
unit/experimental/coro/exception.cpp
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_exception_OBJECTS = unit/experimental/coro/exception.$(OBJEXT)
@@ -844,6 +955,14 @@ unit_experimental_coro_exception_OBJECTS = \
unit_experimental_coro_exception_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_exception_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am__unit_experimental_coro_executor_SOURCES_DIST = \
+ unit/experimental/coro/executor.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_executor_OBJECTS = unit/experimental/coro/executor.$(OBJEXT)
+unit_experimental_coro_executor_OBJECTS = \
+ $(am_unit_experimental_coro_executor_OBJECTS)
+unit_experimental_coro_executor_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_executor_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am__unit_experimental_coro_partial_SOURCES_DIST = \
unit/experimental/coro/partial.cpp
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@am_unit_experimental_coro_partial_OBJECTS = unit/experimental/coro/partial.$(OBJEXT)
@@ -876,14 +995,14 @@ unit_experimental_coro_use_coro_OBJECTS = \
unit_experimental_coro_use_coro_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_experimental_coro_use_coro_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
-am__unit_experimental_deferred_SOURCES_DIST = \
- unit/experimental/deferred.cpp
-@HAVE_CXX14_TRUE@am_unit_experimental_deferred_OBJECTS = \
-@HAVE_CXX14_TRUE@ unit/experimental/deferred.$(OBJEXT)
-unit_experimental_deferred_OBJECTS = \
- $(am_unit_experimental_deferred_OBJECTS)
-unit_experimental_deferred_LDADD = $(LDADD)
-@SEPARATE_COMPILATION_TRUE@unit_experimental_deferred_DEPENDENCIES = \
+am__unit_experimental_parallel_group_SOURCES_DIST = \
+ unit/experimental/parallel_group.cpp
+@HAVE_CXX11_TRUE@am_unit_experimental_parallel_group_OBJECTS = \
+@HAVE_CXX11_TRUE@ unit/experimental/parallel_group.$(OBJEXT)
+unit_experimental_parallel_group_OBJECTS = \
+ $(am_unit_experimental_parallel_group_OBJECTS)
+unit_experimental_parallel_group_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_experimental_parallel_group_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
am__unit_experimental_promise_SOURCES_DIST = \
unit/experimental/promise.cpp
@@ -894,6 +1013,10 @@ unit_experimental_promise_OBJECTS = \
unit_experimental_promise_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_experimental_promise_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_file_base_OBJECTS = unit/file_base.$(OBJEXT)
+unit_file_base_OBJECTS = $(am_unit_file_base_OBJECTS)
+unit_file_base_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_file_base_DEPENDENCIES = libasio.a
am_unit_generic_basic_endpoint_OBJECTS = \
unit/generic/basic_endpoint.$(OBJEXT)
unit_generic_basic_endpoint_OBJECTS = \
@@ -1094,6 +1217,13 @@ unit_local_datagram_protocol_OBJECTS = \
unit_local_datagram_protocol_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_local_datagram_protocol_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_local_seq_packet_protocol_OBJECTS = \
+ unit/local/seq_packet_protocol.$(OBJEXT)
+unit_local_seq_packet_protocol_OBJECTS = \
+ $(am_unit_local_seq_packet_protocol_OBJECTS)
+unit_local_seq_packet_protocol_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_local_seq_packet_protocol_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_local_stream_protocol_OBJECTS = \
unit/local/stream_protocol.$(OBJEXT)
unit_local_stream_protocol_OBJECTS = \
@@ -1147,6 +1277,17 @@ am_unit_post_OBJECTS = unit/post.$(OBJEXT)
unit_post_OBJECTS = $(am_unit_post_OBJECTS)
unit_post_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_post_DEPENDENCIES = libasio.a
+am_unit_prepend_OBJECTS = unit/prepend.$(OBJEXT)
+unit_prepend_OBJECTS = $(am_unit_prepend_OBJECTS)
+unit_prepend_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_prepend_DEPENDENCIES = libasio.a
+am_unit_random_access_file_OBJECTS = \
+ unit/random_access_file.$(OBJEXT)
+unit_random_access_file_OBJECTS = \
+ $(am_unit_random_access_file_OBJECTS)
+unit_random_access_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_random_access_file_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_read_OBJECTS = unit/read.$(OBJEXT)
unit_read_OBJECTS = $(am_unit_read_OBJECTS)
unit_read_LDADD = $(LDADD)
@@ -1159,11 +1300,28 @@ am_unit_read_until_OBJECTS = unit/read_until.$(OBJEXT)
unit_read_until_OBJECTS = $(am_unit_read_until_OBJECTS)
unit_read_until_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_read_until_DEPENDENCIES = libasio.a
+am_unit_readable_pipe_OBJECTS = unit/readable_pipe.$(OBJEXT)
+unit_readable_pipe_OBJECTS = $(am_unit_readable_pipe_OBJECTS)
+unit_readable_pipe_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_readable_pipe_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_recycling_allocator_OBJECTS = \
+ unit/recycling_allocator.$(OBJEXT)
+unit_recycling_allocator_OBJECTS = \
+ $(am_unit_recycling_allocator_OBJECTS)
+unit_recycling_allocator_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_recycling_allocator_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_redirect_error_OBJECTS = unit/redirect_error.$(OBJEXT)
unit_redirect_error_OBJECTS = $(am_unit_redirect_error_OBJECTS)
unit_redirect_error_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_redirect_error_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_registered_buffer_OBJECTS = unit/registered_buffer.$(OBJEXT)
+unit_registered_buffer_OBJECTS = $(am_unit_registered_buffer_OBJECTS)
+unit_registered_buffer_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_registered_buffer_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_serial_port_OBJECTS = unit/serial_port.$(OBJEXT)
unit_serial_port_OBJECTS = $(am_unit_serial_port_OBJECTS)
unit_serial_port_LDADD = $(LDADD)
@@ -1177,6 +1335,11 @@ am_unit_signal_set_OBJECTS = unit/signal_set.$(OBJEXT)
unit_signal_set_OBJECTS = $(am_unit_signal_set_OBJECTS)
unit_signal_set_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_signal_set_DEPENDENCIES = libasio.a
+am_unit_signal_set_base_OBJECTS = unit/signal_set_base.$(OBJEXT)
+unit_signal_set_base_OBJECTS = $(am_unit_signal_set_base_OBJECTS)
+unit_signal_set_base_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_signal_set_base_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_socket_base_OBJECTS = unit/socket_base.$(OBJEXT)
unit_socket_base_OBJECTS = $(am_unit_socket_base_OBJECTS)
unit_socket_base_LDADD = $(LDADD)
@@ -1246,6 +1409,10 @@ am_unit_strand_OBJECTS = unit/strand.$(OBJEXT)
unit_strand_OBJECTS = $(am_unit_strand_OBJECTS)
unit_strand_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_strand_DEPENDENCIES = libasio.a
+am_unit_stream_file_OBJECTS = unit/stream_file.$(OBJEXT)
+unit_stream_file_OBJECTS = $(am_unit_stream_file_OBJECTS)
+unit_stream_file_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_stream_file_DEPENDENCIES = libasio.a
am_unit_streambuf_OBJECTS = unit/streambuf.$(OBJEXT)
unit_streambuf_OBJECTS = $(am_unit_streambuf_OBJECTS)
unit_streambuf_LDADD = $(LDADD)
@@ -1394,6 +1561,11 @@ unit_windows_stream_handle_OBJECTS = \
unit_windows_stream_handle_LDADD = $(LDADD)
@SEPARATE_COMPILATION_TRUE@unit_windows_stream_handle_DEPENDENCIES = \
@SEPARATE_COMPILATION_TRUE@ libasio.a
+am_unit_writable_pipe_OBJECTS = unit/writable_pipe.$(OBJEXT)
+unit_writable_pipe_OBJECTS = $(am_unit_writable_pipe_OBJECTS)
+unit_writable_pipe_LDADD = $(LDADD)
+@SEPARATE_COMPILATION_TRUE@unit_writable_pipe_DEPENDENCIES = \
+@SEPARATE_COMPILATION_TRUE@ libasio.a
am_unit_write_OBJECTS = unit/write.$(OBJEXT)
unit_write_OBJECTS = $(am_unit_write_OBJECTS)
unit_write_LDADD = $(LDADD)
@@ -1424,24 +1596,37 @@ am__depfiles_remade = ../$(DEPDIR)/asio.Po ../$(DEPDIR)/asio_ssl.Po \
latency/$(DEPDIR)/udp_server.Po \
performance/$(DEPDIR)/client.Po \
performance/$(DEPDIR)/server.Po \
+ unit/$(DEPDIR)/any_completion_executor.Po \
+ unit/$(DEPDIR)/any_completion_handler.Po \
+ unit/$(DEPDIR)/any_io_executor.Po unit/$(DEPDIR)/append.Po \
+ unit/$(DEPDIR)/as_tuple.Po \
unit/$(DEPDIR)/associated_allocator.Po \
unit/$(DEPDIR)/associated_cancellation_slot.Po \
unit/$(DEPDIR)/associated_executor.Po \
+ unit/$(DEPDIR)/associated_immediate_executor.Po \
unit/$(DEPDIR)/associator.Po unit/$(DEPDIR)/async_result.Po \
unit/$(DEPDIR)/awaitable.Po \
unit/$(DEPDIR)/basic_datagram_socket.Po \
unit/$(DEPDIR)/basic_deadline_timer.Po \
+ unit/$(DEPDIR)/basic_file.Po \
+ unit/$(DEPDIR)/basic_random_access_file.Po \
unit/$(DEPDIR)/basic_raw_socket.Po \
+ unit/$(DEPDIR)/basic_readable_pipe.Po \
unit/$(DEPDIR)/basic_seq_packet_socket.Po \
unit/$(DEPDIR)/basic_serial_port.Po \
unit/$(DEPDIR)/basic_signal_set.Po \
unit/$(DEPDIR)/basic_socket.Po \
unit/$(DEPDIR)/basic_socket_acceptor.Po \
+ unit/$(DEPDIR)/basic_stream_file.Po \
unit/$(DEPDIR)/basic_stream_socket.Po \
unit/$(DEPDIR)/basic_streambuf.Po \
unit/$(DEPDIR)/basic_waitable_timer.Po \
+ unit/$(DEPDIR)/basic_writable_pipe.Po \
+ unit/$(DEPDIR)/bind_allocator.Po \
unit/$(DEPDIR)/bind_cancellation_slot.Po \
- unit/$(DEPDIR)/bind_executor.Po unit/$(DEPDIR)/buffer.Po \
+ unit/$(DEPDIR)/bind_executor.Po \
+ unit/$(DEPDIR)/bind_immediate_executor.Po \
+ unit/$(DEPDIR)/buffer.Po unit/$(DEPDIR)/buffer_registration.Po \
unit/$(DEPDIR)/buffered_read_stream.Po \
unit/$(DEPDIR)/buffered_stream.Po \
unit/$(DEPDIR)/buffered_write_stream.Po \
@@ -1451,61 +1636,66 @@ am__depfiles_remade = ../$(DEPDIR)/asio.Po ../$(DEPDIR)/asio_ssl.Po \
unit/$(DEPDIR)/cancellation_type.Po unit/$(DEPDIR)/co_spawn.Po \
unit/$(DEPDIR)/completion_condition.Po \
unit/$(DEPDIR)/compose.Po unit/$(DEPDIR)/connect.Po \
+ unit/$(DEPDIR)/connect_pipe.Po unit/$(DEPDIR)/consign.Po \
unit/$(DEPDIR)/coroutine.Po unit/$(DEPDIR)/deadline_timer.Po \
- unit/$(DEPDIR)/defer.Po unit/$(DEPDIR)/detached.Po \
- unit/$(DEPDIR)/dispatch.Po unit/$(DEPDIR)/error.Po \
- unit/$(DEPDIR)/execution_context.Po unit/$(DEPDIR)/executor.Po \
+ unit/$(DEPDIR)/defer.Po unit/$(DEPDIR)/deferred.Po \
+ unit/$(DEPDIR)/detached.Po unit/$(DEPDIR)/dispatch.Po \
+ unit/$(DEPDIR)/error.Po unit/$(DEPDIR)/execution_context.Po \
+ unit/$(DEPDIR)/executor.Po \
unit/$(DEPDIR)/executor_work_guard.Po \
+ unit/$(DEPDIR)/file_base.Po \
unit/$(DEPDIR)/high_resolution_timer.Po \
unit/$(DEPDIR)/io_context.Po \
unit/$(DEPDIR)/io_context_strand.Po \
unit/$(DEPDIR)/is_read_buffered.Po \
unit/$(DEPDIR)/is_write_buffered.Po \
unit/$(DEPDIR)/packaged_task.Po unit/$(DEPDIR)/placeholders.Po \
- unit/$(DEPDIR)/post.Po unit/$(DEPDIR)/read.Po \
+ unit/$(DEPDIR)/post.Po unit/$(DEPDIR)/prepend.Po \
+ unit/$(DEPDIR)/random_access_file.Po unit/$(DEPDIR)/read.Po \
unit/$(DEPDIR)/read_at.Po unit/$(DEPDIR)/read_until.Po \
- unit/$(DEPDIR)/redirect_error.Po unit/$(DEPDIR)/serial_port.Po \
+ unit/$(DEPDIR)/readable_pipe.Po \
+ unit/$(DEPDIR)/recycling_allocator.Po \
+ unit/$(DEPDIR)/redirect_error.Po \
+ unit/$(DEPDIR)/registered_buffer.Po \
+ unit/$(DEPDIR)/serial_port.Po \
unit/$(DEPDIR)/serial_port_base.Po \
- unit/$(DEPDIR)/signal_set.Po unit/$(DEPDIR)/socket_base.Po \
+ unit/$(DEPDIR)/signal_set.Po unit/$(DEPDIR)/signal_set_base.Po \
+ unit/$(DEPDIR)/socket_base.Po \
unit/$(DEPDIR)/static_thread_pool.Po \
unit/$(DEPDIR)/steady_timer.Po unit/$(DEPDIR)/strand.Po \
- unit/$(DEPDIR)/streambuf.Po unit/$(DEPDIR)/system_context.Po \
+ unit/$(DEPDIR)/stream_file.Po unit/$(DEPDIR)/streambuf.Po \
+ unit/$(DEPDIR)/system_context.Po \
unit/$(DEPDIR)/system_executor.Po \
unit/$(DEPDIR)/system_timer.Po unit/$(DEPDIR)/this_coro.Po \
unit/$(DEPDIR)/thread.Po unit/$(DEPDIR)/thread_pool.Po \
unit/$(DEPDIR)/time_traits.Po unit/$(DEPDIR)/use_awaitable.Po \
unit/$(DEPDIR)/use_future.Po unit/$(DEPDIR)/uses_executor.Po \
- unit/$(DEPDIR)/wait_traits.Po unit/$(DEPDIR)/write.Po \
- unit/$(DEPDIR)/write_at.Po \
+ unit/$(DEPDIR)/wait_traits.Po unit/$(DEPDIR)/writable_pipe.Po \
+ unit/$(DEPDIR)/write.Po unit/$(DEPDIR)/write_at.Po \
unit/execution/$(DEPDIR)/any_executor.Po \
unit/execution/$(DEPDIR)/blocking.Po \
unit/execution/$(DEPDIR)/blocking_adaptation.Po \
- unit/execution/$(DEPDIR)/bulk_execute.Po \
- unit/execution/$(DEPDIR)/bulk_guarantee.Po \
- unit/execution/$(DEPDIR)/connect.Po \
unit/execution/$(DEPDIR)/context_as.Po \
- unit/execution/$(DEPDIR)/execute.Po \
unit/execution/$(DEPDIR)/executor.Po \
unit/execution/$(DEPDIR)/invocable_archetype.Po \
unit/execution/$(DEPDIR)/mapping.Po \
- unit/execution/$(DEPDIR)/operation_state.Po \
unit/execution/$(DEPDIR)/outstanding_work.Po \
unit/execution/$(DEPDIR)/prefer_only.Po \
- unit/execution/$(DEPDIR)/receiver.Po \
unit/execution/$(DEPDIR)/relationship.Po \
- unit/execution/$(DEPDIR)/schedule.Po \
- unit/execution/$(DEPDIR)/scheduler.Po \
- unit/execution/$(DEPDIR)/sender.Po \
- unit/execution/$(DEPDIR)/set_done.Po \
- unit/execution/$(DEPDIR)/set_error.Po \
- unit/execution/$(DEPDIR)/set_value.Po \
- unit/execution/$(DEPDIR)/start.Po \
- unit/execution/$(DEPDIR)/submit.Po \
unit/experimental/$(DEPDIR)/awaitable_operators.Po \
- unit/experimental/$(DEPDIR)/deferred.Po \
+ unit/experimental/$(DEPDIR)/basic_channel.Po \
+ unit/experimental/$(DEPDIR)/basic_concurrent_channel.Po \
+ unit/experimental/$(DEPDIR)/channel.Po \
+ unit/experimental/$(DEPDIR)/channel_traits.Po \
+ unit/experimental/$(DEPDIR)/co_composed.Po \
+ unit/experimental/$(DEPDIR)/concurrent_channel.Po \
+ unit/experimental/$(DEPDIR)/parallel_group.Po \
unit/experimental/$(DEPDIR)/promise.Po \
+ unit/experimental/coro/$(DEPDIR)/allocator.Po \
unit/experimental/coro/$(DEPDIR)/cancel.Po \
+ unit/experimental/coro/$(DEPDIR)/co_spawn.Po \
unit/experimental/coro/$(DEPDIR)/exception.Po \
+ unit/experimental/coro/$(DEPDIR)/executor.Po \
unit/experimental/coro/$(DEPDIR)/partial.Po \
unit/experimental/coro/$(DEPDIR)/simple_test.Po \
unit/experimental/coro/$(DEPDIR)/stack_test.Po \
@@ -1535,6 +1725,7 @@ am__depfiles_remade = ../$(DEPDIR)/asio.Po ../$(DEPDIR)/asio_ssl.Po \
unit/local/$(DEPDIR)/basic_endpoint.Po \
unit/local/$(DEPDIR)/connect_pair.Po \
unit/local/$(DEPDIR)/datagram_protocol.Po \
+ unit/local/$(DEPDIR)/seq_packet_protocol.Po \
unit/local/$(DEPDIR)/stream_protocol.Po \
unit/posix/$(DEPDIR)/basic_descriptor.Po \
unit/posix/$(DEPDIR)/basic_stream_descriptor.Po \
@@ -1577,22 +1768,35 @@ SOURCES = $(libasio_a_SOURCES) $(latency_tcp_client_SOURCES) \
$(latency_tcp_server_SOURCES) $(latency_udp_client_SOURCES) \
$(latency_udp_server_SOURCES) $(performance_client_SOURCES) \
$(performance_server_SOURCES) \
- $(unit_associated_allocator_SOURCES) \
+ $(unit_any_completion_executor_SOURCES) \
+ $(unit_any_completion_handler_SOURCES) \
+ $(unit_any_io_executor_SOURCES) $(unit_append_SOURCES) \
+ $(unit_as_tuple_SOURCES) $(unit_associated_allocator_SOURCES) \
$(unit_associated_cancellation_slot_SOURCES) \
- $(unit_associated_executor_SOURCES) $(unit_associator_SOURCES) \
- $(unit_async_result_SOURCES) $(unit_awaitable_SOURCES) \
+ $(unit_associated_executor_SOURCES) \
+ $(unit_associated_immediate_executor_SOURCES) \
+ $(unit_associator_SOURCES) $(unit_async_result_SOURCES) \
+ $(unit_awaitable_SOURCES) \
$(unit_basic_datagram_socket_SOURCES) \
$(unit_basic_deadline_timer_SOURCES) \
+ $(unit_basic_file_SOURCES) \
+ $(unit_basic_random_access_file_SOURCES) \
$(unit_basic_raw_socket_SOURCES) \
+ $(unit_basic_readable_pipe_SOURCES) \
$(unit_basic_seq_packet_socket_SOURCES) \
$(unit_basic_serial_port_SOURCES) \
$(unit_basic_signal_set_SOURCES) $(unit_basic_socket_SOURCES) \
$(unit_basic_socket_acceptor_SOURCES) \
+ $(unit_basic_stream_file_SOURCES) \
$(unit_basic_stream_socket_SOURCES) \
$(unit_basic_streambuf_SOURCES) \
$(unit_basic_waitable_timer_SOURCES) \
+ $(unit_basic_writable_pipe_SOURCES) \
+ $(unit_bind_allocator_SOURCES) \
$(unit_bind_cancellation_slot_SOURCES) \
- $(unit_bind_executor_SOURCES) $(unit_buffer_SOURCES) \
+ $(unit_bind_executor_SOURCES) \
+ $(unit_bind_immediate_executor_SOURCES) $(unit_buffer_SOURCES) \
+ $(unit_buffer_registration_SOURCES) \
$(unit_buffered_read_stream_SOURCES) \
$(unit_buffered_stream_SOURCES) \
$(unit_buffered_write_stream_SOURCES) \
@@ -1601,44 +1805,41 @@ SOURCES = $(libasio_a_SOURCES) $(latency_tcp_client_SOURCES) \
$(unit_cancellation_state_SOURCES) \
$(unit_cancellation_type_SOURCES) $(unit_co_spawn_SOURCES) \
$(unit_completion_condition_SOURCES) $(unit_compose_SOURCES) \
- $(unit_connect_SOURCES) $(unit_coroutine_SOURCES) \
+ $(unit_connect_SOURCES) $(unit_connect_pipe_SOURCES) \
+ $(unit_consign_SOURCES) $(unit_coroutine_SOURCES) \
$(unit_deadline_timer_SOURCES) $(unit_defer_SOURCES) \
- $(unit_detached_SOURCES) $(unit_dispatch_SOURCES) \
- $(unit_error_SOURCES) $(unit_execution_any_executor_SOURCES) \
+ $(unit_deferred_SOURCES) $(unit_detached_SOURCES) \
+ $(unit_dispatch_SOURCES) $(unit_error_SOURCES) \
+ $(unit_execution_any_executor_SOURCES) \
$(unit_execution_blocking_SOURCES) \
$(unit_execution_blocking_adaptation_SOURCES) \
- $(unit_execution_bulk_execute_SOURCES) \
- $(unit_execution_bulk_guarantee_SOURCES) \
- $(unit_execution_connect_SOURCES) \
$(unit_execution_context_as_SOURCES) \
- $(unit_execution_execute_SOURCES) \
$(unit_execution_executor_SOURCES) \
$(unit_execution_invocable_archetype_SOURCES) \
$(unit_execution_mapping_SOURCES) \
- $(unit_execution_operation_state_SOURCES) \
$(unit_execution_outstanding_work_SOURCES) \
$(unit_execution_prefer_only_SOURCES) \
- $(unit_execution_receiver_SOURCES) \
$(unit_execution_relationship_SOURCES) \
- $(unit_execution_schedule_SOURCES) \
- $(unit_execution_scheduler_SOURCES) \
- $(unit_execution_sender_SOURCES) \
- $(unit_execution_set_done_SOURCES) \
- $(unit_execution_set_error_SOURCES) \
- $(unit_execution_set_value_SOURCES) \
- $(unit_execution_start_SOURCES) \
- $(unit_execution_submit_SOURCES) \
$(unit_execution_context_SOURCES) $(unit_executor_SOURCES) \
$(unit_executor_work_guard_SOURCES) \
$(unit_experimental_awaitable_operators_SOURCES) \
+ $(unit_experimental_basic_channel_SOURCES) \
+ $(unit_experimental_basic_concurrent_channel_SOURCES) \
+ $(unit_experimental_channel_SOURCES) \
+ $(unit_experimental_channel_traits_SOURCES) \
+ $(unit_experimental_co_composed_SOURCES) \
+ $(unit_experimental_concurrent_channel_SOURCES) \
+ $(unit_experimental_coro_allocator_SOURCES) \
$(unit_experimental_coro_cancel_SOURCES) \
+ $(unit_experimental_coro_co_spawn_SOURCES) \
$(unit_experimental_coro_exception_SOURCES) \
+ $(unit_experimental_coro_executor_SOURCES) \
$(unit_experimental_coro_partial_SOURCES) \
$(unit_experimental_coro_simple_test_SOURCES) \
$(unit_experimental_coro_stack_test_SOURCES) \
$(unit_experimental_coro_use_coro_SOURCES) \
- $(unit_experimental_deferred_SOURCES) \
- $(unit_experimental_promise_SOURCES) \
+ $(unit_experimental_parallel_group_SOURCES) \
+ $(unit_experimental_promise_SOURCES) $(unit_file_base_SOURCES) \
$(unit_generic_basic_endpoint_SOURCES) \
$(unit_generic_datagram_protocol_SOURCES) \
$(unit_generic_raw_protocol_SOURCES) \
@@ -1667,6 +1868,7 @@ SOURCES = $(libasio_a_SOURCES) $(latency_tcp_client_SOURCES) \
$(unit_local_basic_endpoint_SOURCES) \
$(unit_local_connect_pair_SOURCES) \
$(unit_local_datagram_protocol_SOURCES) \
+ $(unit_local_seq_packet_protocol_SOURCES) \
$(unit_local_stream_protocol_SOURCES) \
$(unit_packaged_task_SOURCES) $(unit_placeholders_SOURCES) \
$(unit_posix_basic_descriptor_SOURCES) \
@@ -1674,10 +1876,14 @@ SOURCES = $(libasio_a_SOURCES) $(latency_tcp_client_SOURCES) \
$(unit_posix_descriptor_SOURCES) \
$(unit_posix_descriptor_base_SOURCES) \
$(unit_posix_stream_descriptor_SOURCES) $(unit_post_SOURCES) \
+ $(unit_prepend_SOURCES) $(unit_random_access_file_SOURCES) \
$(unit_read_SOURCES) $(unit_read_at_SOURCES) \
- $(unit_read_until_SOURCES) $(unit_redirect_error_SOURCES) \
- $(unit_serial_port_SOURCES) $(unit_serial_port_base_SOURCES) \
- $(unit_signal_set_SOURCES) $(unit_socket_base_SOURCES) \
+ $(unit_read_until_SOURCES) $(unit_readable_pipe_SOURCES) \
+ $(unit_recycling_allocator_SOURCES) \
+ $(unit_redirect_error_SOURCES) \
+ $(unit_registered_buffer_SOURCES) $(unit_serial_port_SOURCES) \
+ $(unit_serial_port_base_SOURCES) $(unit_signal_set_SOURCES) \
+ $(unit_signal_set_base_SOURCES) $(unit_socket_base_SOURCES) \
$(unit_ssl_context_SOURCES) $(unit_ssl_context_base_SOURCES) \
$(unit_ssl_error_SOURCES) \
$(unit_ssl_host_name_verification_SOURCES) \
@@ -1685,16 +1891,17 @@ SOURCES = $(libasio_a_SOURCES) $(latency_tcp_client_SOURCES) \
$(unit_ssl_stream_SOURCES) $(unit_ssl_stream_base_SOURCES) \
$(unit_static_thread_pool_SOURCES) \
$(unit_steady_timer_SOURCES) $(unit_strand_SOURCES) \
- $(unit_streambuf_SOURCES) $(unit_system_context_SOURCES) \
- $(unit_system_executor_SOURCES) $(unit_system_timer_SOURCES) \
- $(unit_this_coro_SOURCES) $(unit_thread_SOURCES) \
- $(unit_thread_pool_SOURCES) $(unit_time_traits_SOURCES) \
- $(unit_ts_buffer_SOURCES) $(unit_ts_executor_SOURCES) \
- $(unit_ts_internet_SOURCES) $(unit_ts_io_context_SOURCES) \
- $(unit_ts_net_SOURCES) $(unit_ts_netfwd_SOURCES) \
- $(unit_ts_socket_SOURCES) $(unit_ts_timer_SOURCES) \
- $(unit_use_awaitable_SOURCES) $(unit_use_future_SOURCES) \
- $(unit_uses_executor_SOURCES) $(unit_wait_traits_SOURCES) \
+ $(unit_stream_file_SOURCES) $(unit_streambuf_SOURCES) \
+ $(unit_system_context_SOURCES) $(unit_system_executor_SOURCES) \
+ $(unit_system_timer_SOURCES) $(unit_this_coro_SOURCES) \
+ $(unit_thread_SOURCES) $(unit_thread_pool_SOURCES) \
+ $(unit_time_traits_SOURCES) $(unit_ts_buffer_SOURCES) \
+ $(unit_ts_executor_SOURCES) $(unit_ts_internet_SOURCES) \
+ $(unit_ts_io_context_SOURCES) $(unit_ts_net_SOURCES) \
+ $(unit_ts_netfwd_SOURCES) $(unit_ts_socket_SOURCES) \
+ $(unit_ts_timer_SOURCES) $(unit_use_awaitable_SOURCES) \
+ $(unit_use_future_SOURCES) $(unit_uses_executor_SOURCES) \
+ $(unit_wait_traits_SOURCES) \
$(unit_windows_basic_object_handle_SOURCES) \
$(unit_windows_basic_overlapped_handle_SOURCES) \
$(unit_windows_basic_random_access_handle_SOURCES) \
@@ -1703,7 +1910,8 @@ SOURCES = $(libasio_a_SOURCES) $(latency_tcp_client_SOURCES) \
$(unit_windows_overlapped_handle_SOURCES) \
$(unit_windows_overlapped_ptr_SOURCES) \
$(unit_windows_random_access_handle_SOURCES) \
- $(unit_windows_stream_handle_SOURCES) $(unit_write_SOURCES) \
+ $(unit_windows_stream_handle_SOURCES) \
+ $(unit_writable_pipe_SOURCES) $(unit_write_SOURCES) \
$(unit_write_at_SOURCES)
DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(am__latency_tcp_client_SOURCES_DIST) \
@@ -1712,22 +1920,35 @@ DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(am__latency_udp_server_SOURCES_DIST) \
$(am__performance_client_SOURCES_DIST) \
$(am__performance_server_SOURCES_DIST) \
- $(unit_associated_allocator_SOURCES) \
+ $(unit_any_completion_executor_SOURCES) \
+ $(unit_any_completion_handler_SOURCES) \
+ $(unit_any_io_executor_SOURCES) $(unit_append_SOURCES) \
+ $(unit_as_tuple_SOURCES) $(unit_associated_allocator_SOURCES) \
$(unit_associated_cancellation_slot_SOURCES) \
- $(unit_associated_executor_SOURCES) $(unit_associator_SOURCES) \
- $(unit_async_result_SOURCES) $(unit_awaitable_SOURCES) \
+ $(unit_associated_executor_SOURCES) \
+ $(unit_associated_immediate_executor_SOURCES) \
+ $(unit_associator_SOURCES) $(unit_async_result_SOURCES) \
+ $(unit_awaitable_SOURCES) \
$(unit_basic_datagram_socket_SOURCES) \
$(unit_basic_deadline_timer_SOURCES) \
+ $(unit_basic_file_SOURCES) \
+ $(unit_basic_random_access_file_SOURCES) \
$(unit_basic_raw_socket_SOURCES) \
+ $(unit_basic_readable_pipe_SOURCES) \
$(unit_basic_seq_packet_socket_SOURCES) \
$(unit_basic_serial_port_SOURCES) \
$(unit_basic_signal_set_SOURCES) $(unit_basic_socket_SOURCES) \
$(unit_basic_socket_acceptor_SOURCES) \
+ $(unit_basic_stream_file_SOURCES) \
$(unit_basic_stream_socket_SOURCES) \
$(unit_basic_streambuf_SOURCES) \
$(unit_basic_waitable_timer_SOURCES) \
+ $(unit_basic_writable_pipe_SOURCES) \
+ $(unit_bind_allocator_SOURCES) \
$(unit_bind_cancellation_slot_SOURCES) \
- $(unit_bind_executor_SOURCES) $(unit_buffer_SOURCES) \
+ $(unit_bind_executor_SOURCES) \
+ $(unit_bind_immediate_executor_SOURCES) $(unit_buffer_SOURCES) \
+ $(unit_buffer_registration_SOURCES) \
$(unit_buffered_read_stream_SOURCES) \
$(unit_buffered_stream_SOURCES) \
$(unit_buffered_write_stream_SOURCES) \
@@ -1736,44 +1957,42 @@ DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(unit_cancellation_state_SOURCES) \
$(unit_cancellation_type_SOURCES) $(unit_co_spawn_SOURCES) \
$(unit_completion_condition_SOURCES) $(unit_compose_SOURCES) \
- $(unit_connect_SOURCES) $(unit_coroutine_SOURCES) \
+ $(unit_connect_SOURCES) $(unit_connect_pipe_SOURCES) \
+ $(unit_consign_SOURCES) $(unit_coroutine_SOURCES) \
$(unit_deadline_timer_SOURCES) $(unit_defer_SOURCES) \
- $(unit_detached_SOURCES) $(unit_dispatch_SOURCES) \
- $(unit_error_SOURCES) $(unit_execution_any_executor_SOURCES) \
+ $(unit_deferred_SOURCES) $(unit_detached_SOURCES) \
+ $(unit_dispatch_SOURCES) $(unit_error_SOURCES) \
+ $(unit_execution_any_executor_SOURCES) \
$(unit_execution_blocking_SOURCES) \
$(unit_execution_blocking_adaptation_SOURCES) \
- $(unit_execution_bulk_execute_SOURCES) \
- $(unit_execution_bulk_guarantee_SOURCES) \
- $(unit_execution_connect_SOURCES) \
$(unit_execution_context_as_SOURCES) \
- $(unit_execution_execute_SOURCES) \
$(unit_execution_executor_SOURCES) \
$(unit_execution_invocable_archetype_SOURCES) \
$(unit_execution_mapping_SOURCES) \
- $(unit_execution_operation_state_SOURCES) \
$(unit_execution_outstanding_work_SOURCES) \
$(unit_execution_prefer_only_SOURCES) \
- $(unit_execution_receiver_SOURCES) \
$(unit_execution_relationship_SOURCES) \
- $(unit_execution_schedule_SOURCES) \
- $(unit_execution_scheduler_SOURCES) \
- $(unit_execution_sender_SOURCES) \
- $(unit_execution_set_done_SOURCES) \
- $(unit_execution_set_error_SOURCES) \
- $(unit_execution_set_value_SOURCES) \
- $(unit_execution_start_SOURCES) \
- $(unit_execution_submit_SOURCES) \
$(unit_execution_context_SOURCES) $(unit_executor_SOURCES) \
$(unit_executor_work_guard_SOURCES) \
$(am__unit_experimental_awaitable_operators_SOURCES_DIST) \
+ $(am__unit_experimental_basic_channel_SOURCES_DIST) \
+ $(am__unit_experimental_basic_concurrent_channel_SOURCES_DIST) \
+ $(am__unit_experimental_channel_SOURCES_DIST) \
+ $(am__unit_experimental_channel_traits_SOURCES_DIST) \
+ $(am__unit_experimental_co_composed_SOURCES_DIST) \
+ $(am__unit_experimental_concurrent_channel_SOURCES_DIST) \
+ $(am__unit_experimental_coro_allocator_SOURCES_DIST) \
$(am__unit_experimental_coro_cancel_SOURCES_DIST) \
+ $(am__unit_experimental_coro_co_spawn_SOURCES_DIST) \
$(am__unit_experimental_coro_exception_SOURCES_DIST) \
+ $(am__unit_experimental_coro_executor_SOURCES_DIST) \
$(am__unit_experimental_coro_partial_SOURCES_DIST) \
$(am__unit_experimental_coro_simple_test_SOURCES_DIST) \
$(am__unit_experimental_coro_stack_test_SOURCES_DIST) \
$(am__unit_experimental_coro_use_coro_SOURCES_DIST) \
- $(am__unit_experimental_deferred_SOURCES_DIST) \
+ $(am__unit_experimental_parallel_group_SOURCES_DIST) \
$(am__unit_experimental_promise_SOURCES_DIST) \
+ $(unit_file_base_SOURCES) \
$(unit_generic_basic_endpoint_SOURCES) \
$(unit_generic_datagram_protocol_SOURCES) \
$(unit_generic_raw_protocol_SOURCES) \
@@ -1802,6 +2021,7 @@ DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(unit_local_basic_endpoint_SOURCES) \
$(unit_local_connect_pair_SOURCES) \
$(unit_local_datagram_protocol_SOURCES) \
+ $(unit_local_seq_packet_protocol_SOURCES) \
$(unit_local_stream_protocol_SOURCES) \
$(unit_packaged_task_SOURCES) $(unit_placeholders_SOURCES) \
$(unit_posix_basic_descriptor_SOURCES) \
@@ -1809,10 +2029,14 @@ DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(unit_posix_descriptor_SOURCES) \
$(unit_posix_descriptor_base_SOURCES) \
$(unit_posix_stream_descriptor_SOURCES) $(unit_post_SOURCES) \
+ $(unit_prepend_SOURCES) $(unit_random_access_file_SOURCES) \
$(unit_read_SOURCES) $(unit_read_at_SOURCES) \
- $(unit_read_until_SOURCES) $(unit_redirect_error_SOURCES) \
- $(unit_serial_port_SOURCES) $(unit_serial_port_base_SOURCES) \
- $(unit_signal_set_SOURCES) $(unit_socket_base_SOURCES) \
+ $(unit_read_until_SOURCES) $(unit_readable_pipe_SOURCES) \
+ $(unit_recycling_allocator_SOURCES) \
+ $(unit_redirect_error_SOURCES) \
+ $(unit_registered_buffer_SOURCES) $(unit_serial_port_SOURCES) \
+ $(unit_serial_port_base_SOURCES) $(unit_signal_set_SOURCES) \
+ $(unit_signal_set_base_SOURCES) $(unit_socket_base_SOURCES) \
$(am__unit_ssl_context_SOURCES_DIST) \
$(am__unit_ssl_context_base_SOURCES_DIST) \
$(am__unit_ssl_error_SOURCES_DIST) \
@@ -1822,16 +2046,17 @@ DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(am__unit_ssl_stream_base_SOURCES_DIST) \
$(unit_static_thread_pool_SOURCES) \
$(unit_steady_timer_SOURCES) $(unit_strand_SOURCES) \
- $(unit_streambuf_SOURCES) $(unit_system_context_SOURCES) \
- $(unit_system_executor_SOURCES) $(unit_system_timer_SOURCES) \
- $(unit_this_coro_SOURCES) $(unit_thread_SOURCES) \
- $(unit_thread_pool_SOURCES) $(unit_time_traits_SOURCES) \
- $(unit_ts_buffer_SOURCES) $(unit_ts_executor_SOURCES) \
- $(unit_ts_internet_SOURCES) $(unit_ts_io_context_SOURCES) \
- $(unit_ts_net_SOURCES) $(unit_ts_netfwd_SOURCES) \
- $(unit_ts_socket_SOURCES) $(unit_ts_timer_SOURCES) \
- $(unit_use_awaitable_SOURCES) $(unit_use_future_SOURCES) \
- $(unit_uses_executor_SOURCES) $(unit_wait_traits_SOURCES) \
+ $(unit_stream_file_SOURCES) $(unit_streambuf_SOURCES) \
+ $(unit_system_context_SOURCES) $(unit_system_executor_SOURCES) \
+ $(unit_system_timer_SOURCES) $(unit_this_coro_SOURCES) \
+ $(unit_thread_SOURCES) $(unit_thread_pool_SOURCES) \
+ $(unit_time_traits_SOURCES) $(unit_ts_buffer_SOURCES) \
+ $(unit_ts_executor_SOURCES) $(unit_ts_internet_SOURCES) \
+ $(unit_ts_io_context_SOURCES) $(unit_ts_net_SOURCES) \
+ $(unit_ts_netfwd_SOURCES) $(unit_ts_socket_SOURCES) \
+ $(unit_ts_timer_SOURCES) $(unit_use_awaitable_SOURCES) \
+ $(unit_use_future_SOURCES) $(unit_uses_executor_SOURCES) \
+ $(unit_wait_traits_SOURCES) \
$(unit_windows_basic_object_handle_SOURCES) \
$(unit_windows_basic_overlapped_handle_SOURCES) \
$(unit_windows_basic_random_access_handle_SOURCES) \
@@ -1840,7 +2065,8 @@ DIST_SOURCES = $(am__libasio_a_SOURCES_DIST) \
$(unit_windows_overlapped_handle_SOURCES) \
$(unit_windows_overlapped_ptr_SOURCES) \
$(unit_windows_random_access_handle_SOURCES) \
- $(unit_windows_stream_handle_SOURCES) $(unit_write_SOURCES) \
+ $(unit_windows_stream_handle_SOURCES) \
+ $(unit_writable_pipe_SOURCES) $(unit_write_SOURCES) \
$(unit_write_at_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
@@ -1881,8 +2107,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
@@ -2065,6 +2289,7 @@ am__set_TESTS_bases = \
bases='$(TEST_LOGS)'; \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
RECHECK_LOGS = $(TEST_LOGS)
TEST_SUITE_LOG = test-suite.log
TEST_EXTENSIONS = @EXEEXT@ .test
@@ -2126,8 +2351,9 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CXX = @CXX@
-CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -2136,9 +2362,8 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
-EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
-GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -2205,9 +2430,11 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -2233,26 +2460,40 @@ AM_CXXFLAGS = -I$(srcdir)/../../include
@STANDALONE_FALSE@latency_udp_server_SOURCES = latency/udp_server.cpp
@STANDALONE_FALSE@performance_client_SOURCES = performance/client.cpp
@STANDALONE_FALSE@performance_server_SOURCES = performance/server.cpp
+unit_any_completion_executor_SOURCES = unit/any_completion_executor.cpp
+unit_any_completion_handler_SOURCES = unit/any_completion_handler.cpp
+unit_any_io_executor_SOURCES = unit/any_io_executor.cpp
+unit_append_SOURCES = unit/append.cpp
+unit_as_tuple_SOURCES = unit/as_tuple.cpp
unit_associated_allocator_SOURCES = unit/associated_allocator.cpp
unit_associated_cancellation_slot_SOURCES = unit/associated_cancellation_slot.cpp
unit_associated_executor_SOURCES = unit/associated_executor.cpp
+unit_associated_immediate_executor_SOURCES = unit/associated_immediate_executor.cpp
unit_associator_SOURCES = unit/associator.cpp
unit_async_result_SOURCES = unit/async_result.cpp
unit_awaitable_SOURCES = unit/awaitable.cpp
unit_basic_datagram_socket_SOURCES = unit/basic_datagram_socket.cpp
unit_basic_deadline_timer_SOURCES = unit/basic_deadline_timer.cpp
+unit_basic_file_SOURCES = unit/basic_file.cpp
+unit_basic_random_access_file_SOURCES = unit/basic_random_access_file.cpp
unit_basic_raw_socket_SOURCES = unit/basic_raw_socket.cpp
+unit_basic_readable_pipe_SOURCES = unit/basic_readable_pipe.cpp
unit_basic_seq_packet_socket_SOURCES = unit/basic_seq_packet_socket.cpp
unit_basic_serial_port_SOURCES = unit/basic_serial_port.cpp
unit_basic_signal_set_SOURCES = unit/basic_signal_set.cpp
unit_basic_socket_SOURCES = unit/basic_socket.cpp
unit_basic_socket_acceptor_SOURCES = unit/basic_socket_acceptor.cpp
+unit_basic_stream_file_SOURCES = unit/basic_stream_file.cpp
unit_basic_stream_socket_SOURCES = unit/basic_stream_socket.cpp
unit_basic_streambuf_SOURCES = unit/basic_streambuf.cpp
unit_basic_waitable_timer_SOURCES = unit/basic_waitable_timer.cpp
+unit_basic_writable_pipe_SOURCES = unit/basic_writable_pipe.cpp
+unit_bind_allocator_SOURCES = unit/bind_allocator.cpp
unit_bind_cancellation_slot_SOURCES = unit/bind_cancellation_slot.cpp
unit_bind_executor_SOURCES = unit/bind_executor.cpp
+unit_bind_immediate_executor_SOURCES = unit/bind_immediate_executor.cpp
unit_buffer_SOURCES = unit/buffer.cpp
+unit_buffer_registration_SOURCES = unit/buffer_registration.cpp
unit_buffers_iterator_SOURCES = unit/buffers_iterator.cpp
unit_buffered_read_stream_SOURCES = unit/buffered_read_stream.cpp
unit_buffered_stream_SOURCES = unit/buffered_stream.cpp
@@ -2264,39 +2505,29 @@ unit_co_spawn_SOURCES = unit/co_spawn.cpp
unit_completion_condition_SOURCES = unit/completion_condition.cpp
unit_compose_SOURCES = unit/compose.cpp
unit_connect_SOURCES = unit/connect.cpp
+unit_connect_pipe_SOURCES = unit/connect_pipe.cpp
+unit_consign_SOURCES = unit/consign.cpp
unit_coroutine_SOURCES = unit/coroutine.cpp
unit_deadline_timer_SOURCES = unit/deadline_timer.cpp
unit_defer_SOURCES = unit/defer.cpp
+unit_deferred_SOURCES = unit/deferred.cpp
unit_detached_SOURCES = unit/detached.cpp
unit_dispatch_SOURCES = unit/dispatch.cpp
unit_error_SOURCES = unit/error.cpp
unit_execution_any_executor_SOURCES = unit/execution/any_executor.cpp
unit_execution_blocking_SOURCES = unit/execution/blocking.cpp
unit_execution_blocking_adaptation_SOURCES = unit/execution/blocking_adaptation.cpp
-unit_execution_bulk_execute_SOURCES = unit/execution/bulk_execute.cpp
-unit_execution_bulk_guarantee_SOURCES = unit/execution/bulk_guarantee.cpp
-unit_execution_connect_SOURCES = unit/execution/connect.cpp
unit_execution_context_as_SOURCES = unit/execution/context_as.cpp
-unit_execution_execute_SOURCES = unit/execution/execute.cpp
unit_execution_executor_SOURCES = unit/execution/executor.cpp
unit_execution_invocable_archetype_SOURCES = unit/execution/invocable_archetype.cpp
unit_execution_mapping_SOURCES = unit/execution/mapping.cpp
unit_execution_outstanding_work_SOURCES = unit/execution/outstanding_work.cpp
-unit_execution_operation_state_SOURCES = unit/execution/operation_state.cpp
unit_execution_prefer_only_SOURCES = unit/execution/prefer_only.cpp
-unit_execution_receiver_SOURCES = unit/execution/receiver.cpp
unit_execution_relationship_SOURCES = unit/execution/relationship.cpp
-unit_execution_schedule_SOURCES = unit/execution/schedule.cpp
-unit_execution_scheduler_SOURCES = unit/execution/scheduler.cpp
-unit_execution_sender_SOURCES = unit/execution/sender.cpp
-unit_execution_set_done_SOURCES = unit/execution/set_done.cpp
-unit_execution_set_error_SOURCES = unit/execution/set_error.cpp
-unit_execution_set_value_SOURCES = unit/execution/set_value.cpp
-unit_execution_start_SOURCES = unit/execution/start.cpp
-unit_execution_submit_SOURCES = unit/execution/submit.cpp
unit_execution_context_SOURCES = unit/execution_context.cpp
unit_executor_SOURCES = unit/executor.cpp
unit_executor_work_guard_SOURCES = unit/executor_work_guard.cpp
+unit_file_base_SOURCES = unit/file_base.cpp
unit_generic_basic_endpoint_SOURCES = unit/generic/basic_endpoint.cpp
unit_generic_datagram_protocol_SOURCES = unit/generic/datagram_protocol.cpp
unit_generic_raw_protocol_SOURCES = unit/generic/raw_protocol.cpp
@@ -2332,6 +2563,7 @@ unit_is_write_buffered_SOURCES = unit/is_write_buffered.cpp
unit_local_basic_endpoint_SOURCES = unit/local/basic_endpoint.cpp
unit_local_connect_pair_SOURCES = unit/local/connect_pair.cpp
unit_local_datagram_protocol_SOURCES = unit/local/datagram_protocol.cpp
+unit_local_seq_packet_protocol_SOURCES = unit/local/seq_packet_protocol.cpp
unit_local_stream_protocol_SOURCES = unit/local/stream_protocol.cpp
unit_packaged_task_SOURCES = unit/packaged_task.cpp
unit_placeholders_SOURCES = unit/placeholders.cpp
@@ -2341,17 +2573,24 @@ unit_posix_descriptor_SOURCES = unit/posix/descriptor.cpp
unit_posix_descriptor_base_SOURCES = unit/posix/descriptor_base.cpp
unit_posix_stream_descriptor_SOURCES = unit/posix/stream_descriptor.cpp
unit_post_SOURCES = unit/post.cpp
+unit_prepend_SOURCES = unit/prepend.cpp
+unit_random_access_file_SOURCES = unit/random_access_file.cpp
unit_read_SOURCES = unit/read.cpp
unit_read_at_SOURCES = unit/read_at.cpp
unit_read_until_SOURCES = unit/read_until.cpp
+unit_readable_pipe_SOURCES = unit/readable_pipe.cpp
+unit_recycling_allocator_SOURCES = unit/recycling_allocator.cpp
unit_redirect_error_SOURCES = unit/redirect_error.cpp
+unit_registered_buffer_SOURCES = unit/registered_buffer.cpp
unit_serial_port_SOURCES = unit/serial_port.cpp
unit_serial_port_base_SOURCES = unit/serial_port_base.cpp
unit_signal_set_SOURCES = unit/signal_set.cpp
+unit_signal_set_base_SOURCES = unit/signal_set_base.cpp
unit_socket_base_SOURCES = unit/socket_base.cpp
unit_static_thread_pool_SOURCES = unit/static_thread_pool.cpp
unit_steady_timer_SOURCES = unit/steady_timer.cpp
unit_strand_SOURCES = unit/strand.cpp
+unit_stream_file_SOURCES = unit/stream_file.cpp
unit_streambuf_SOURCES = unit/streambuf.cpp
unit_system_context_SOURCES = unit/system_context.cpp
unit_system_executor_SOURCES = unit/system_executor.cpp
@@ -2381,13 +2620,23 @@ unit_windows_overlapped_handle_SOURCES = unit/windows/overlapped_handle.cpp
unit_windows_overlapped_ptr_SOURCES = unit/windows/overlapped_ptr.cpp
unit_windows_random_access_handle_SOURCES = unit/windows/random_access_handle.cpp
unit_windows_stream_handle_SOURCES = unit/windows/stream_handle.cpp
+unit_writable_pipe_SOURCES = unit/writable_pipe.cpp
unit_write_SOURCES = unit/write.cpp
unit_write_at_SOURCES = unit/write_at.cpp
-@HAVE_CXX14_TRUE@unit_experimental_deferred_SOURCES = unit/experimental/deferred.cpp
+@HAVE_CXX11_TRUE@unit_experimental_basic_channel_SOURCES = unit/experimental/basic_channel.cpp
+@HAVE_CXX11_TRUE@unit_experimental_basic_concurrent_channel_SOURCES = unit/experimental/basic_concurrent_channel.cpp
+@HAVE_CXX11_TRUE@unit_experimental_channel_SOURCES = unit/experimental/channel.cpp
+@HAVE_CXX11_TRUE@unit_experimental_channel_traits_SOURCES = unit/experimental/channel_traits.cpp
+@HAVE_CXX11_TRUE@unit_experimental_concurrent_channel_SOURCES = unit/experimental/concurrent_channel.cpp
+@HAVE_CXX11_TRUE@unit_experimental_parallel_group_SOURCES = unit/experimental/parallel_group.cpp
@HAVE_CXX20_TRUE@unit_experimental_promise_SOURCES = unit/experimental/promise.cpp
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_awaitable_operators_SOURCES = unit/experimental/awaitable_operators.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_co_composed_SOURCES = unit/experimental/co_composed.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_allocator_SOURCES = unit/experimental/coro/allocator.cpp
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_cancel_SOURCES = unit/experimental/coro/cancel.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_co_spawn_SOURCES = unit/experimental/coro/co_spawn.cpp
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_exception_SOURCES = unit/experimental/coro/exception.cpp
+@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_executor_SOURCES = unit/experimental/coro/executor.cpp
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_partial_SOURCES = unit/experimental/coro/partial.cpp
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_simple_test_SOURCES = unit/experimental/coro/simple_test.cpp
@HAVE_COROUTINES_TRUE@@HAVE_CXX20_TRUE@unit_experimental_coro_stack_test_SOURCES = unit/experimental/coro/stack_test.cpp
@@ -2520,6 +2769,36 @@ unit/$(am__dirstamp):
unit/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) unit/$(DEPDIR)
@: > unit/$(DEPDIR)/$(am__dirstamp)
+unit/any_completion_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/any_completion_executor$(EXEEXT): $(unit_any_completion_executor_OBJECTS) $(unit_any_completion_executor_DEPENDENCIES) $(EXTRA_unit_any_completion_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/any_completion_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_any_completion_executor_OBJECTS) $(unit_any_completion_executor_LDADD) $(LIBS)
+unit/any_completion_handler.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/any_completion_handler$(EXEEXT): $(unit_any_completion_handler_OBJECTS) $(unit_any_completion_handler_DEPENDENCIES) $(EXTRA_unit_any_completion_handler_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/any_completion_handler$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_any_completion_handler_OBJECTS) $(unit_any_completion_handler_LDADD) $(LIBS)
+unit/any_io_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/any_io_executor$(EXEEXT): $(unit_any_io_executor_OBJECTS) $(unit_any_io_executor_DEPENDENCIES) $(EXTRA_unit_any_io_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/any_io_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_any_io_executor_OBJECTS) $(unit_any_io_executor_LDADD) $(LIBS)
+unit/append.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/append$(EXEEXT): $(unit_append_OBJECTS) $(unit_append_DEPENDENCIES) $(EXTRA_unit_append_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/append$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_append_OBJECTS) $(unit_append_LDADD) $(LIBS)
+unit/as_tuple.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/as_tuple$(EXEEXT): $(unit_as_tuple_OBJECTS) $(unit_as_tuple_DEPENDENCIES) $(EXTRA_unit_as_tuple_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/as_tuple$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_as_tuple_OBJECTS) $(unit_as_tuple_LDADD) $(LIBS)
unit/associated_allocator.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -2538,6 +2817,12 @@ unit/associated_executor.$(OBJEXT): unit/$(am__dirstamp) \
unit/associated_executor$(EXEEXT): $(unit_associated_executor_OBJECTS) $(unit_associated_executor_DEPENDENCIES) $(EXTRA_unit_associated_executor_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/associated_executor$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_associated_executor_OBJECTS) $(unit_associated_executor_LDADD) $(LIBS)
+unit/associated_immediate_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/associated_immediate_executor$(EXEEXT): $(unit_associated_immediate_executor_OBJECTS) $(unit_associated_immediate_executor_DEPENDENCIES) $(EXTRA_unit_associated_immediate_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/associated_immediate_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_associated_immediate_executor_OBJECTS) $(unit_associated_immediate_executor_LDADD) $(LIBS)
unit/associator.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -2568,12 +2853,30 @@ unit/basic_deadline_timer.$(OBJEXT): unit/$(am__dirstamp) \
unit/basic_deadline_timer$(EXEEXT): $(unit_basic_deadline_timer_OBJECTS) $(unit_basic_deadline_timer_DEPENDENCIES) $(EXTRA_unit_basic_deadline_timer_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/basic_deadline_timer$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_basic_deadline_timer_OBJECTS) $(unit_basic_deadline_timer_LDADD) $(LIBS)
+unit/basic_file.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_file$(EXEEXT): $(unit_basic_file_OBJECTS) $(unit_basic_file_DEPENDENCIES) $(EXTRA_unit_basic_file_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_file_OBJECTS) $(unit_basic_file_LDADD) $(LIBS)
+unit/basic_random_access_file.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_random_access_file$(EXEEXT): $(unit_basic_random_access_file_OBJECTS) $(unit_basic_random_access_file_DEPENDENCIES) $(EXTRA_unit_basic_random_access_file_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_random_access_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_random_access_file_OBJECTS) $(unit_basic_random_access_file_LDADD) $(LIBS)
unit/basic_raw_socket.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
unit/basic_raw_socket$(EXEEXT): $(unit_basic_raw_socket_OBJECTS) $(unit_basic_raw_socket_DEPENDENCIES) $(EXTRA_unit_basic_raw_socket_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/basic_raw_socket$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_basic_raw_socket_OBJECTS) $(unit_basic_raw_socket_LDADD) $(LIBS)
+unit/basic_readable_pipe.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_readable_pipe$(EXEEXT): $(unit_basic_readable_pipe_OBJECTS) $(unit_basic_readable_pipe_DEPENDENCIES) $(EXTRA_unit_basic_readable_pipe_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_readable_pipe$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_readable_pipe_OBJECTS) $(unit_basic_readable_pipe_LDADD) $(LIBS)
unit/basic_seq_packet_socket.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -2604,6 +2907,12 @@ unit/basic_socket_acceptor.$(OBJEXT): unit/$(am__dirstamp) \
unit/basic_socket_acceptor$(EXEEXT): $(unit_basic_socket_acceptor_OBJECTS) $(unit_basic_socket_acceptor_DEPENDENCIES) $(EXTRA_unit_basic_socket_acceptor_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/basic_socket_acceptor$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_basic_socket_acceptor_OBJECTS) $(unit_basic_socket_acceptor_LDADD) $(LIBS)
+unit/basic_stream_file.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_stream_file$(EXEEXT): $(unit_basic_stream_file_OBJECTS) $(unit_basic_stream_file_DEPENDENCIES) $(EXTRA_unit_basic_stream_file_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_stream_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_stream_file_OBJECTS) $(unit_basic_stream_file_LDADD) $(LIBS)
unit/basic_stream_socket.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -2622,6 +2931,18 @@ unit/basic_waitable_timer.$(OBJEXT): unit/$(am__dirstamp) \
unit/basic_waitable_timer$(EXEEXT): $(unit_basic_waitable_timer_OBJECTS) $(unit_basic_waitable_timer_DEPENDENCIES) $(EXTRA_unit_basic_waitable_timer_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/basic_waitable_timer$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_basic_waitable_timer_OBJECTS) $(unit_basic_waitable_timer_LDADD) $(LIBS)
+unit/basic_writable_pipe.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/basic_writable_pipe$(EXEEXT): $(unit_basic_writable_pipe_OBJECTS) $(unit_basic_writable_pipe_DEPENDENCIES) $(EXTRA_unit_basic_writable_pipe_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/basic_writable_pipe$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_basic_writable_pipe_OBJECTS) $(unit_basic_writable_pipe_LDADD) $(LIBS)
+unit/bind_allocator.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/bind_allocator$(EXEEXT): $(unit_bind_allocator_OBJECTS) $(unit_bind_allocator_DEPENDENCIES) $(EXTRA_unit_bind_allocator_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/bind_allocator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_bind_allocator_OBJECTS) $(unit_bind_allocator_LDADD) $(LIBS)
unit/bind_cancellation_slot.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -2634,12 +2955,24 @@ unit/bind_executor.$(OBJEXT): unit/$(am__dirstamp) \
unit/bind_executor$(EXEEXT): $(unit_bind_executor_OBJECTS) $(unit_bind_executor_DEPENDENCIES) $(EXTRA_unit_bind_executor_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/bind_executor$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_bind_executor_OBJECTS) $(unit_bind_executor_LDADD) $(LIBS)
+unit/bind_immediate_executor.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/bind_immediate_executor$(EXEEXT): $(unit_bind_immediate_executor_OBJECTS) $(unit_bind_immediate_executor_DEPENDENCIES) $(EXTRA_unit_bind_immediate_executor_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/bind_immediate_executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_bind_immediate_executor_OBJECTS) $(unit_bind_immediate_executor_LDADD) $(LIBS)
unit/buffer.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
unit/buffer$(EXEEXT): $(unit_buffer_OBJECTS) $(unit_buffer_DEPENDENCIES) $(EXTRA_unit_buffer_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/buffer$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_buffer_OBJECTS) $(unit_buffer_LDADD) $(LIBS)
+unit/buffer_registration.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/buffer_registration$(EXEEXT): $(unit_buffer_registration_OBJECTS) $(unit_buffer_registration_DEPENDENCIES) $(EXTRA_unit_buffer_registration_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/buffer_registration$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_buffer_registration_OBJECTS) $(unit_buffer_registration_LDADD) $(LIBS)
unit/buffered_read_stream.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -2706,6 +3039,18 @@ unit/connect.$(OBJEXT): unit/$(am__dirstamp) \
unit/connect$(EXEEXT): $(unit_connect_OBJECTS) $(unit_connect_DEPENDENCIES) $(EXTRA_unit_connect_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/connect$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_connect_OBJECTS) $(unit_connect_LDADD) $(LIBS)
+unit/connect_pipe.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/connect_pipe$(EXEEXT): $(unit_connect_pipe_OBJECTS) $(unit_connect_pipe_DEPENDENCIES) $(EXTRA_unit_connect_pipe_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/connect_pipe$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_connect_pipe_OBJECTS) $(unit_connect_pipe_LDADD) $(LIBS)
+unit/consign.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/consign$(EXEEXT): $(unit_consign_OBJECTS) $(unit_consign_DEPENDENCIES) $(EXTRA_unit_consign_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/consign$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_consign_OBJECTS) $(unit_consign_LDADD) $(LIBS)
unit/coroutine.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -2724,6 +3069,12 @@ unit/defer.$(OBJEXT): unit/$(am__dirstamp) \
unit/defer$(EXEEXT): $(unit_defer_OBJECTS) $(unit_defer_DEPENDENCIES) $(EXTRA_unit_defer_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/defer$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_defer_OBJECTS) $(unit_defer_LDADD) $(LIBS)
+unit/deferred.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/deferred$(EXEEXT): $(unit_deferred_OBJECTS) $(unit_deferred_DEPENDENCIES) $(EXTRA_unit_deferred_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/deferred$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_deferred_OBJECTS) $(unit_deferred_LDADD) $(LIBS)
unit/detached.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -2767,37 +3118,12 @@ unit/execution/blocking_adaptation.$(OBJEXT): \
unit/execution/blocking_adaptation$(EXEEXT): $(unit_execution_blocking_adaptation_OBJECTS) $(unit_execution_blocking_adaptation_DEPENDENCIES) $(EXTRA_unit_execution_blocking_adaptation_DEPENDENCIES) unit/execution/$(am__dirstamp)
@rm -f unit/execution/blocking_adaptation$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_execution_blocking_adaptation_OBJECTS) $(unit_execution_blocking_adaptation_LDADD) $(LIBS)
-unit/execution/bulk_execute.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/bulk_execute$(EXEEXT): $(unit_execution_bulk_execute_OBJECTS) $(unit_execution_bulk_execute_DEPENDENCIES) $(EXTRA_unit_execution_bulk_execute_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/bulk_execute$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_bulk_execute_OBJECTS) $(unit_execution_bulk_execute_LDADD) $(LIBS)
-unit/execution/bulk_guarantee.$(OBJEXT): \
- unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/bulk_guarantee$(EXEEXT): $(unit_execution_bulk_guarantee_OBJECTS) $(unit_execution_bulk_guarantee_DEPENDENCIES) $(EXTRA_unit_execution_bulk_guarantee_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/bulk_guarantee$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_bulk_guarantee_OBJECTS) $(unit_execution_bulk_guarantee_LDADD) $(LIBS)
-unit/execution/connect.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/connect$(EXEEXT): $(unit_execution_connect_OBJECTS) $(unit_execution_connect_DEPENDENCIES) $(EXTRA_unit_execution_connect_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/connect$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_connect_OBJECTS) $(unit_execution_connect_LDADD) $(LIBS)
unit/execution/context_as.$(OBJEXT): unit/execution/$(am__dirstamp) \
unit/execution/$(DEPDIR)/$(am__dirstamp)
unit/execution/context_as$(EXEEXT): $(unit_execution_context_as_OBJECTS) $(unit_execution_context_as_DEPENDENCIES) $(EXTRA_unit_execution_context_as_DEPENDENCIES) unit/execution/$(am__dirstamp)
@rm -f unit/execution/context_as$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_execution_context_as_OBJECTS) $(unit_execution_context_as_LDADD) $(LIBS)
-unit/execution/execute.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/execute$(EXEEXT): $(unit_execution_execute_OBJECTS) $(unit_execution_execute_DEPENDENCIES) $(EXTRA_unit_execution_execute_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/execute$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_execute_OBJECTS) $(unit_execution_execute_LDADD) $(LIBS)
unit/execution/executor.$(OBJEXT): unit/execution/$(am__dirstamp) \
unit/execution/$(DEPDIR)/$(am__dirstamp)
@@ -2817,13 +3143,6 @@ unit/execution/mapping.$(OBJEXT): unit/execution/$(am__dirstamp) \
unit/execution/mapping$(EXEEXT): $(unit_execution_mapping_OBJECTS) $(unit_execution_mapping_DEPENDENCIES) $(EXTRA_unit_execution_mapping_DEPENDENCIES) unit/execution/$(am__dirstamp)
@rm -f unit/execution/mapping$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_execution_mapping_OBJECTS) $(unit_execution_mapping_LDADD) $(LIBS)
-unit/execution/operation_state.$(OBJEXT): \
- unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/operation_state$(EXEEXT): $(unit_execution_operation_state_OBJECTS) $(unit_execution_operation_state_DEPENDENCIES) $(EXTRA_unit_execution_operation_state_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/operation_state$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_operation_state_OBJECTS) $(unit_execution_operation_state_LDADD) $(LIBS)
unit/execution/outstanding_work.$(OBJEXT): \
unit/execution/$(am__dirstamp) \
unit/execution/$(DEPDIR)/$(am__dirstamp)
@@ -2837,66 +3156,12 @@ unit/execution/prefer_only.$(OBJEXT): unit/execution/$(am__dirstamp) \
unit/execution/prefer_only$(EXEEXT): $(unit_execution_prefer_only_OBJECTS) $(unit_execution_prefer_only_DEPENDENCIES) $(EXTRA_unit_execution_prefer_only_DEPENDENCIES) unit/execution/$(am__dirstamp)
@rm -f unit/execution/prefer_only$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_execution_prefer_only_OBJECTS) $(unit_execution_prefer_only_LDADD) $(LIBS)
-unit/execution/receiver.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/receiver$(EXEEXT): $(unit_execution_receiver_OBJECTS) $(unit_execution_receiver_DEPENDENCIES) $(EXTRA_unit_execution_receiver_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/receiver$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_receiver_OBJECTS) $(unit_execution_receiver_LDADD) $(LIBS)
unit/execution/relationship.$(OBJEXT): unit/execution/$(am__dirstamp) \
unit/execution/$(DEPDIR)/$(am__dirstamp)
unit/execution/relationship$(EXEEXT): $(unit_execution_relationship_OBJECTS) $(unit_execution_relationship_DEPENDENCIES) $(EXTRA_unit_execution_relationship_DEPENDENCIES) unit/execution/$(am__dirstamp)
@rm -f unit/execution/relationship$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_execution_relationship_OBJECTS) $(unit_execution_relationship_LDADD) $(LIBS)
-unit/execution/schedule.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/schedule$(EXEEXT): $(unit_execution_schedule_OBJECTS) $(unit_execution_schedule_DEPENDENCIES) $(EXTRA_unit_execution_schedule_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/schedule$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_schedule_OBJECTS) $(unit_execution_schedule_LDADD) $(LIBS)
-unit/execution/scheduler.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/scheduler$(EXEEXT): $(unit_execution_scheduler_OBJECTS) $(unit_execution_scheduler_DEPENDENCIES) $(EXTRA_unit_execution_scheduler_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/scheduler$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_scheduler_OBJECTS) $(unit_execution_scheduler_LDADD) $(LIBS)
-unit/execution/sender.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/sender$(EXEEXT): $(unit_execution_sender_OBJECTS) $(unit_execution_sender_DEPENDENCIES) $(EXTRA_unit_execution_sender_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/sender$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_sender_OBJECTS) $(unit_execution_sender_LDADD) $(LIBS)
-unit/execution/set_done.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/set_done$(EXEEXT): $(unit_execution_set_done_OBJECTS) $(unit_execution_set_done_DEPENDENCIES) $(EXTRA_unit_execution_set_done_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/set_done$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_set_done_OBJECTS) $(unit_execution_set_done_LDADD) $(LIBS)
-unit/execution/set_error.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/set_error$(EXEEXT): $(unit_execution_set_error_OBJECTS) $(unit_execution_set_error_DEPENDENCIES) $(EXTRA_unit_execution_set_error_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/set_error$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_set_error_OBJECTS) $(unit_execution_set_error_LDADD) $(LIBS)
-unit/execution/set_value.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/set_value$(EXEEXT): $(unit_execution_set_value_OBJECTS) $(unit_execution_set_value_DEPENDENCIES) $(EXTRA_unit_execution_set_value_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/set_value$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_set_value_OBJECTS) $(unit_execution_set_value_LDADD) $(LIBS)
-unit/execution/start.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/start$(EXEEXT): $(unit_execution_start_OBJECTS) $(unit_execution_start_DEPENDENCIES) $(EXTRA_unit_execution_start_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/start$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_start_OBJECTS) $(unit_execution_start_LDADD) $(LIBS)
-unit/execution/submit.$(OBJEXT): unit/execution/$(am__dirstamp) \
- unit/execution/$(DEPDIR)/$(am__dirstamp)
-
-unit/execution/submit$(EXEEXT): $(unit_execution_submit_OBJECTS) $(unit_execution_submit_DEPENDENCIES) $(EXTRA_unit_execution_submit_DEPENDENCIES) unit/execution/$(am__dirstamp)
- @rm -f unit/execution/submit$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_execution_submit_OBJECTS) $(unit_execution_submit_LDADD) $(LIBS)
unit/execution_context.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -2928,12 +3193,61 @@ unit/experimental/awaitable_operators.$(OBJEXT): \
unit/experimental/awaitable_operators$(EXEEXT): $(unit_experimental_awaitable_operators_OBJECTS) $(unit_experimental_awaitable_operators_DEPENDENCIES) $(EXTRA_unit_experimental_awaitable_operators_DEPENDENCIES) unit/experimental/$(am__dirstamp)
@rm -f unit/experimental/awaitable_operators$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_awaitable_operators_OBJECTS) $(unit_experimental_awaitable_operators_LDADD) $(LIBS)
+unit/experimental/basic_channel.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/basic_channel$(EXEEXT): $(unit_experimental_basic_channel_OBJECTS) $(unit_experimental_basic_channel_DEPENDENCIES) $(EXTRA_unit_experimental_basic_channel_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/basic_channel$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_basic_channel_OBJECTS) $(unit_experimental_basic_channel_LDADD) $(LIBS)
+unit/experimental/basic_concurrent_channel.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/basic_concurrent_channel$(EXEEXT): $(unit_experimental_basic_concurrent_channel_OBJECTS) $(unit_experimental_basic_concurrent_channel_DEPENDENCIES) $(EXTRA_unit_experimental_basic_concurrent_channel_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/basic_concurrent_channel$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_basic_concurrent_channel_OBJECTS) $(unit_experimental_basic_concurrent_channel_LDADD) $(LIBS)
+unit/experimental/channel.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/channel$(EXEEXT): $(unit_experimental_channel_OBJECTS) $(unit_experimental_channel_DEPENDENCIES) $(EXTRA_unit_experimental_channel_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/channel$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_channel_OBJECTS) $(unit_experimental_channel_LDADD) $(LIBS)
+unit/experimental/channel_traits.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/channel_traits$(EXEEXT): $(unit_experimental_channel_traits_OBJECTS) $(unit_experimental_channel_traits_DEPENDENCIES) $(EXTRA_unit_experimental_channel_traits_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/channel_traits$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_channel_traits_OBJECTS) $(unit_experimental_channel_traits_LDADD) $(LIBS)
+unit/experimental/co_composed.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/co_composed$(EXEEXT): $(unit_experimental_co_composed_OBJECTS) $(unit_experimental_co_composed_DEPENDENCIES) $(EXTRA_unit_experimental_co_composed_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/co_composed$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_co_composed_OBJECTS) $(unit_experimental_co_composed_LDADD) $(LIBS)
+unit/experimental/concurrent_channel.$(OBJEXT): \
+ unit/experimental/$(am__dirstamp) \
+ unit/experimental/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/concurrent_channel$(EXEEXT): $(unit_experimental_concurrent_channel_OBJECTS) $(unit_experimental_concurrent_channel_DEPENDENCIES) $(EXTRA_unit_experimental_concurrent_channel_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/concurrent_channel$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_concurrent_channel_OBJECTS) $(unit_experimental_concurrent_channel_LDADD) $(LIBS)
unit/experimental/coro/$(am__dirstamp):
@$(MKDIR_P) unit/experimental/coro
@: > unit/experimental/coro/$(am__dirstamp)
unit/experimental/coro/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) unit/experimental/coro/$(DEPDIR)
@: > unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+unit/experimental/coro/allocator.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/allocator$(EXEEXT): $(unit_experimental_coro_allocator_OBJECTS) $(unit_experimental_coro_allocator_DEPENDENCIES) $(EXTRA_unit_experimental_coro_allocator_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/allocator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_allocator_OBJECTS) $(unit_experimental_coro_allocator_LDADD) $(LIBS)
unit/experimental/coro/cancel.$(OBJEXT): \
unit/experimental/coro/$(am__dirstamp) \
unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
@@ -2941,6 +3255,13 @@ unit/experimental/coro/cancel.$(OBJEXT): \
unit/experimental/coro/cancel$(EXEEXT): $(unit_experimental_coro_cancel_OBJECTS) $(unit_experimental_coro_cancel_DEPENDENCIES) $(EXTRA_unit_experimental_coro_cancel_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
@rm -f unit/experimental/coro/cancel$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_cancel_OBJECTS) $(unit_experimental_coro_cancel_LDADD) $(LIBS)
+unit/experimental/coro/co_spawn.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/co_spawn$(EXEEXT): $(unit_experimental_coro_co_spawn_OBJECTS) $(unit_experimental_coro_co_spawn_DEPENDENCIES) $(EXTRA_unit_experimental_coro_co_spawn_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/co_spawn$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_co_spawn_OBJECTS) $(unit_experimental_coro_co_spawn_LDADD) $(LIBS)
unit/experimental/coro/exception.$(OBJEXT): \
unit/experimental/coro/$(am__dirstamp) \
unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
@@ -2948,6 +3269,13 @@ unit/experimental/coro/exception.$(OBJEXT): \
unit/experimental/coro/exception$(EXEEXT): $(unit_experimental_coro_exception_OBJECTS) $(unit_experimental_coro_exception_DEPENDENCIES) $(EXTRA_unit_experimental_coro_exception_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
@rm -f unit/experimental/coro/exception$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_exception_OBJECTS) $(unit_experimental_coro_exception_LDADD) $(LIBS)
+unit/experimental/coro/executor.$(OBJEXT): \
+ unit/experimental/coro/$(am__dirstamp) \
+ unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
+
+unit/experimental/coro/executor$(EXEEXT): $(unit_experimental_coro_executor_OBJECTS) $(unit_experimental_coro_executor_DEPENDENCIES) $(EXTRA_unit_experimental_coro_executor_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
+ @rm -f unit/experimental/coro/executor$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_executor_OBJECTS) $(unit_experimental_coro_executor_LDADD) $(LIBS)
unit/experimental/coro/partial.$(OBJEXT): \
unit/experimental/coro/$(am__dirstamp) \
unit/experimental/coro/$(DEPDIR)/$(am__dirstamp)
@@ -2976,13 +3304,13 @@ unit/experimental/coro/use_coro.$(OBJEXT): \
unit/experimental/coro/use_coro$(EXEEXT): $(unit_experimental_coro_use_coro_OBJECTS) $(unit_experimental_coro_use_coro_DEPENDENCIES) $(EXTRA_unit_experimental_coro_use_coro_DEPENDENCIES) unit/experimental/coro/$(am__dirstamp)
@rm -f unit/experimental/coro/use_coro$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_coro_use_coro_OBJECTS) $(unit_experimental_coro_use_coro_LDADD) $(LIBS)
-unit/experimental/deferred.$(OBJEXT): \
+unit/experimental/parallel_group.$(OBJEXT): \
unit/experimental/$(am__dirstamp) \
unit/experimental/$(DEPDIR)/$(am__dirstamp)
-unit/experimental/deferred$(EXEEXT): $(unit_experimental_deferred_OBJECTS) $(unit_experimental_deferred_DEPENDENCIES) $(EXTRA_unit_experimental_deferred_DEPENDENCIES) unit/experimental/$(am__dirstamp)
- @rm -f unit/experimental/deferred$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_deferred_OBJECTS) $(unit_experimental_deferred_LDADD) $(LIBS)
+unit/experimental/parallel_group$(EXEEXT): $(unit_experimental_parallel_group_OBJECTS) $(unit_experimental_parallel_group_DEPENDENCIES) $(EXTRA_unit_experimental_parallel_group_DEPENDENCIES) unit/experimental/$(am__dirstamp)
+ @rm -f unit/experimental/parallel_group$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_parallel_group_OBJECTS) $(unit_experimental_parallel_group_LDADD) $(LIBS)
unit/experimental/promise.$(OBJEXT): \
unit/experimental/$(am__dirstamp) \
unit/experimental/$(DEPDIR)/$(am__dirstamp)
@@ -2990,6 +3318,12 @@ unit/experimental/promise.$(OBJEXT): \
unit/experimental/promise$(EXEEXT): $(unit_experimental_promise_OBJECTS) $(unit_experimental_promise_DEPENDENCIES) $(EXTRA_unit_experimental_promise_DEPENDENCIES) unit/experimental/$(am__dirstamp)
@rm -f unit/experimental/promise$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_experimental_promise_OBJECTS) $(unit_experimental_promise_LDADD) $(LIBS)
+unit/file_base.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/file_base$(EXEEXT): $(unit_file_base_OBJECTS) $(unit_file_base_DEPENDENCIES) $(EXTRA_unit_file_base_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/file_base$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_file_base_OBJECTS) $(unit_file_base_LDADD) $(LIBS)
unit/generic/$(am__dirstamp):
@$(MKDIR_P) unit/generic
@: > unit/generic/$(am__dirstamp)
@@ -3220,6 +3554,12 @@ unit/local/datagram_protocol.$(OBJEXT): unit/local/$(am__dirstamp) \
unit/local/datagram_protocol$(EXEEXT): $(unit_local_datagram_protocol_OBJECTS) $(unit_local_datagram_protocol_DEPENDENCIES) $(EXTRA_unit_local_datagram_protocol_DEPENDENCIES) unit/local/$(am__dirstamp)
@rm -f unit/local/datagram_protocol$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_local_datagram_protocol_OBJECTS) $(unit_local_datagram_protocol_LDADD) $(LIBS)
+unit/local/seq_packet_protocol.$(OBJEXT): unit/local/$(am__dirstamp) \
+ unit/local/$(DEPDIR)/$(am__dirstamp)
+
+unit/local/seq_packet_protocol$(EXEEXT): $(unit_local_seq_packet_protocol_OBJECTS) $(unit_local_seq_packet_protocol_DEPENDENCIES) $(EXTRA_unit_local_seq_packet_protocol_DEPENDENCIES) unit/local/$(am__dirstamp)
+ @rm -f unit/local/seq_packet_protocol$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_local_seq_packet_protocol_OBJECTS) $(unit_local_seq_packet_protocol_LDADD) $(LIBS)
unit/local/stream_protocol.$(OBJEXT): unit/local/$(am__dirstamp) \
unit/local/$(DEPDIR)/$(am__dirstamp)
@@ -3281,6 +3621,18 @@ unit/post.$(OBJEXT): unit/$(am__dirstamp) \
unit/post$(EXEEXT): $(unit_post_OBJECTS) $(unit_post_DEPENDENCIES) $(EXTRA_unit_post_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/post$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_post_OBJECTS) $(unit_post_LDADD) $(LIBS)
+unit/prepend.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/prepend$(EXEEXT): $(unit_prepend_OBJECTS) $(unit_prepend_DEPENDENCIES) $(EXTRA_unit_prepend_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/prepend$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_prepend_OBJECTS) $(unit_prepend_LDADD) $(LIBS)
+unit/random_access_file.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/random_access_file$(EXEEXT): $(unit_random_access_file_OBJECTS) $(unit_random_access_file_DEPENDENCIES) $(EXTRA_unit_random_access_file_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/random_access_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_random_access_file_OBJECTS) $(unit_random_access_file_LDADD) $(LIBS)
unit/read.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -3299,12 +3651,30 @@ unit/read_until.$(OBJEXT): unit/$(am__dirstamp) \
unit/read_until$(EXEEXT): $(unit_read_until_OBJECTS) $(unit_read_until_DEPENDENCIES) $(EXTRA_unit_read_until_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/read_until$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_read_until_OBJECTS) $(unit_read_until_LDADD) $(LIBS)
+unit/readable_pipe.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/readable_pipe$(EXEEXT): $(unit_readable_pipe_OBJECTS) $(unit_readable_pipe_DEPENDENCIES) $(EXTRA_unit_readable_pipe_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/readable_pipe$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_readable_pipe_OBJECTS) $(unit_readable_pipe_LDADD) $(LIBS)
+unit/recycling_allocator.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/recycling_allocator$(EXEEXT): $(unit_recycling_allocator_OBJECTS) $(unit_recycling_allocator_DEPENDENCIES) $(EXTRA_unit_recycling_allocator_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/recycling_allocator$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_recycling_allocator_OBJECTS) $(unit_recycling_allocator_LDADD) $(LIBS)
unit/redirect_error.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
unit/redirect_error$(EXEEXT): $(unit_redirect_error_OBJECTS) $(unit_redirect_error_DEPENDENCIES) $(EXTRA_unit_redirect_error_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/redirect_error$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_redirect_error_OBJECTS) $(unit_redirect_error_LDADD) $(LIBS)
+unit/registered_buffer.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/registered_buffer$(EXEEXT): $(unit_registered_buffer_OBJECTS) $(unit_registered_buffer_DEPENDENCIES) $(EXTRA_unit_registered_buffer_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/registered_buffer$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_registered_buffer_OBJECTS) $(unit_registered_buffer_LDADD) $(LIBS)
unit/serial_port.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -3323,6 +3693,12 @@ unit/signal_set.$(OBJEXT): unit/$(am__dirstamp) \
unit/signal_set$(EXEEXT): $(unit_signal_set_OBJECTS) $(unit_signal_set_DEPENDENCIES) $(EXTRA_unit_signal_set_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/signal_set$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_signal_set_OBJECTS) $(unit_signal_set_LDADD) $(LIBS)
+unit/signal_set_base.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/signal_set_base$(EXEEXT): $(unit_signal_set_base_OBJECTS) $(unit_signal_set_base_DEPENDENCIES) $(EXTRA_unit_signal_set_base_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/signal_set_base$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_signal_set_base_OBJECTS) $(unit_signal_set_base_LDADD) $(LIBS)
unit/socket_base.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -3395,6 +3771,12 @@ unit/strand.$(OBJEXT): unit/$(am__dirstamp) \
unit/strand$(EXEEXT): $(unit_strand_OBJECTS) $(unit_strand_DEPENDENCIES) $(EXTRA_unit_strand_DEPENDENCIES) unit/$(am__dirstamp)
@rm -f unit/strand$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_strand_OBJECTS) $(unit_strand_LDADD) $(LIBS)
+unit/stream_file.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/stream_file$(EXEEXT): $(unit_stream_file_OBJECTS) $(unit_stream_file_DEPENDENCIES) $(EXTRA_unit_stream_file_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/stream_file$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_stream_file_OBJECTS) $(unit_stream_file_LDADD) $(LIBS)
unit/streambuf.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -3587,6 +3969,12 @@ unit/windows/stream_handle.$(OBJEXT): unit/windows/$(am__dirstamp) \
unit/windows/stream_handle$(EXEEXT): $(unit_windows_stream_handle_OBJECTS) $(unit_windows_stream_handle_DEPENDENCIES) $(EXTRA_unit_windows_stream_handle_DEPENDENCIES) unit/windows/$(am__dirstamp)
@rm -f unit/windows/stream_handle$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(unit_windows_stream_handle_OBJECTS) $(unit_windows_stream_handle_LDADD) $(LIBS)
+unit/writable_pipe.$(OBJEXT): unit/$(am__dirstamp) \
+ unit/$(DEPDIR)/$(am__dirstamp)
+
+unit/writable_pipe$(EXEEXT): $(unit_writable_pipe_OBJECTS) $(unit_writable_pipe_DEPENDENCIES) $(EXTRA_unit_writable_pipe_DEPENDENCIES) unit/$(am__dirstamp)
+ @rm -f unit/writable_pipe$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(unit_writable_pipe_OBJECTS) $(unit_writable_pipe_LDADD) $(LIBS)
unit/write.$(OBJEXT): unit/$(am__dirstamp) \
unit/$(DEPDIR)/$(am__dirstamp)
@@ -3628,26 +4016,40 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@latency/$(DEPDIR)/udp_server.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@performance/$(DEPDIR)/client.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@performance/$(DEPDIR)/server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/any_completion_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/any_completion_handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/any_io_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/append.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/as_tuple.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/associated_allocator.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/associated_cancellation_slot.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/associated_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/associated_immediate_executor.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/associator.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/async_result.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/awaitable.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_datagram_socket.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_deadline_timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_file.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_random_access_file.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_raw_socket.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_readable_pipe.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_seq_packet_socket.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_serial_port.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_signal_set.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_socket.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_socket_acceptor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_stream_file.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_stream_socket.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_streambuf.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_waitable_timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/basic_writable_pipe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/bind_allocator.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/bind_cancellation_slot.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/bind_executor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/bind_immediate_executor.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/buffer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/buffer_registration.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/buffered_read_stream.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/buffered_stream.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/buffered_write_stream.Po@am__quote@ # am--include-marker
@@ -3659,15 +4061,19 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/completion_condition.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/compose.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/connect.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/connect_pipe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/consign.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/coroutine.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/deadline_timer.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/defer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/deferred.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/detached.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/dispatch.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/error.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/execution_context.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/executor.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/executor_work_guard.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/file_base.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/high_resolution_timer.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/io_context.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/io_context_strand.Po@am__quote@ # am--include-marker
@@ -3676,17 +4082,24 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/packaged_task.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/placeholders.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/post.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/prepend.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/random_access_file.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/read.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/read_at.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/read_until.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/readable_pipe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/recycling_allocator.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/redirect_error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/registered_buffer.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/serial_port.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/serial_port_base.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/signal_set.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/signal_set_base.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/socket_base.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/static_thread_pool.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/steady_timer.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/strand.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/stream_file.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/streambuf.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/system_context.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/system_executor.Po@am__quote@ # am--include-marker
@@ -3699,37 +4112,33 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/use_future.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/uses_executor.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/wait_traits.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/writable_pipe.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/write.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/$(DEPDIR)/write_at.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/any_executor.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/blocking.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/blocking_adaptation.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/bulk_execute.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/bulk_guarantee.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/connect.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/context_as.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/execute.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/executor.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/invocable_archetype.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/mapping.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/operation_state.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/outstanding_work.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/prefer_only.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/receiver.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/relationship.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/schedule.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/scheduler.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/sender.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/set_done.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/set_error.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/set_value.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/start.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/execution/$(DEPDIR)/submit.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/awaitable_operators.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/deferred.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/basic_channel.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/basic_concurrent_channel.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/channel.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/channel_traits.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/co_composed.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/concurrent_channel.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/parallel_group.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/$(DEPDIR)/promise.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/allocator.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/cancel.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/co_spawn.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/exception.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/executor.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/partial.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/simple_test.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/experimental/coro/$(DEPDIR)/stack_test.Po@am__quote@ # am--include-marker
@@ -3764,6 +4173,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@unit/local/$(DEPDIR)/basic_endpoint.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/local/$(DEPDIR)/connect_pair.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/local/$(DEPDIR)/datagram_protocol.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@unit/local/$(DEPDIR)/seq_packet_protocol.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/local/$(DEPDIR)/stream_protocol.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/posix/$(DEPDIR)/basic_descriptor.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@unit/posix/$(DEPDIR)/basic_stream_descriptor.Po@am__quote@ # am--include-marker
@@ -4023,7 +4433,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
echo "$${col}$$br$${std}"; \
- echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
echo "$${col}$$br$${std}"; \
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
@@ -4057,6 +4467,41 @@ recheck: all $(check_PROGRAMS)
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
+unit/any_completion_executor.log: unit/any_completion_executor$(EXEEXT)
+ @p='unit/any_completion_executor$(EXEEXT)'; \
+ b='unit/any_completion_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/any_completion_handler.log: unit/any_completion_handler$(EXEEXT)
+ @p='unit/any_completion_handler$(EXEEXT)'; \
+ b='unit/any_completion_handler'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/any_io_executor.log: unit/any_io_executor$(EXEEXT)
+ @p='unit/any_io_executor$(EXEEXT)'; \
+ b='unit/any_io_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/append.log: unit/append$(EXEEXT)
+ @p='unit/append$(EXEEXT)'; \
+ b='unit/append'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/as_tuple.log: unit/as_tuple$(EXEEXT)
+ @p='unit/as_tuple$(EXEEXT)'; \
+ b='unit/as_tuple'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/associated_allocator.log: unit/associated_allocator$(EXEEXT)
@p='unit/associated_allocator$(EXEEXT)'; \
b='unit/associated_allocator'; \
@@ -4078,6 +4523,13 @@ unit/associated_executor.log: unit/associated_executor$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/associated_immediate_executor.log: unit/associated_immediate_executor$(EXEEXT)
+ @p='unit/associated_immediate_executor$(EXEEXT)'; \
+ b='unit/associated_immediate_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/associator.log: unit/associator$(EXEEXT)
@p='unit/associator$(EXEEXT)'; \
b='unit/associator'; \
@@ -4113,6 +4565,20 @@ unit/basic_deadline_timer.log: unit/basic_deadline_timer$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_file.log: unit/basic_file$(EXEEXT)
+ @p='unit/basic_file$(EXEEXT)'; \
+ b='unit/basic_file'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_random_access_file.log: unit/basic_random_access_file$(EXEEXT)
+ @p='unit/basic_random_access_file$(EXEEXT)'; \
+ b='unit/basic_random_access_file'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/basic_raw_socket.log: unit/basic_raw_socket$(EXEEXT)
@p='unit/basic_raw_socket$(EXEEXT)'; \
b='unit/basic_raw_socket'; \
@@ -4120,6 +4586,13 @@ unit/basic_raw_socket.log: unit/basic_raw_socket$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_readable_pipe.log: unit/basic_readable_pipe$(EXEEXT)
+ @p='unit/basic_readable_pipe$(EXEEXT)'; \
+ b='unit/basic_readable_pipe'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/basic_seq_packet_socket.log: unit/basic_seq_packet_socket$(EXEEXT)
@p='unit/basic_seq_packet_socket$(EXEEXT)'; \
b='unit/basic_seq_packet_socket'; \
@@ -4155,6 +4628,13 @@ unit/basic_socket_acceptor.log: unit/basic_socket_acceptor$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_stream_file.log: unit/basic_stream_file$(EXEEXT)
+ @p='unit/basic_stream_file$(EXEEXT)'; \
+ b='unit/basic_stream_file'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/basic_stream_socket.log: unit/basic_stream_socket$(EXEEXT)
@p='unit/basic_stream_socket$(EXEEXT)'; \
b='unit/basic_stream_socket'; \
@@ -4176,6 +4656,20 @@ unit/basic_waitable_timer.log: unit/basic_waitable_timer$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/basic_writable_pipe.log: unit/basic_writable_pipe$(EXEEXT)
+ @p='unit/basic_writable_pipe$(EXEEXT)'; \
+ b='unit/basic_writable_pipe'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/bind_allocator.log: unit/bind_allocator$(EXEEXT)
+ @p='unit/bind_allocator$(EXEEXT)'; \
+ b='unit/bind_allocator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/bind_cancellation_slot.log: unit/bind_cancellation_slot$(EXEEXT)
@p='unit/bind_cancellation_slot$(EXEEXT)'; \
b='unit/bind_cancellation_slot'; \
@@ -4190,6 +4684,13 @@ unit/bind_executor.log: unit/bind_executor$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/bind_immediate_executor.log: unit/bind_immediate_executor$(EXEEXT)
+ @p='unit/bind_immediate_executor$(EXEEXT)'; \
+ b='unit/bind_immediate_executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/buffered_read_stream.log: unit/buffered_read_stream$(EXEEXT)
@p='unit/buffered_read_stream$(EXEEXT)'; \
b='unit/buffered_read_stream'; \
@@ -4218,6 +4719,13 @@ unit/buffer.log: unit/buffer$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/buffer_registration.log: unit/buffer_registration$(EXEEXT)
+ @p='unit/buffer_registration$(EXEEXT)'; \
+ b='unit/buffer_registration'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/buffers_iterator.log: unit/buffers_iterator$(EXEEXT)
@p='unit/buffers_iterator$(EXEEXT)'; \
b='unit/buffers_iterator'; \
@@ -4274,6 +4782,20 @@ unit/connect.log: unit/connect$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/connect_pipe.log: unit/connect_pipe$(EXEEXT)
+ @p='unit/connect_pipe$(EXEEXT)'; \
+ b='unit/connect_pipe'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/consign.log: unit/consign$(EXEEXT)
+ @p='unit/consign$(EXEEXT)'; \
+ b='unit/consign'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/deadline_timer.log: unit/deadline_timer$(EXEEXT)
@p='unit/deadline_timer$(EXEEXT)'; \
b='unit/deadline_timer'; \
@@ -4288,6 +4810,13 @@ unit/defer.log: unit/defer$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/deferred.log: unit/deferred$(EXEEXT)
+ @p='unit/deferred$(EXEEXT)'; \
+ b='unit/deferred'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/detached.log: unit/detached$(EXEEXT)
@p='unit/detached$(EXEEXT)'; \
b='unit/detached'; \
@@ -4330,27 +4859,6 @@ unit/execution/blocking_adaptation.log: unit/execution/blocking_adaptation$(EXEE
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/bulk_execute.log: unit/execution/bulk_execute$(EXEEXT)
- @p='unit/execution/bulk_execute$(EXEEXT)'; \
- b='unit/execution/bulk_execute'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/bulk_guarantee.log: unit/execution/bulk_guarantee$(EXEEXT)
- @p='unit/execution/bulk_guarantee$(EXEEXT)'; \
- b='unit/execution/bulk_guarantee'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/connect.log: unit/execution/connect$(EXEEXT)
- @p='unit/execution/connect$(EXEEXT)'; \
- b='unit/execution/connect'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/execution/context_as.log: unit/execution/context_as$(EXEEXT)
@p='unit/execution/context_as$(EXEEXT)'; \
b='unit/execution/context_as'; \
@@ -4358,13 +4866,6 @@ unit/execution/context_as.log: unit/execution/context_as$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/execute.log: unit/execution/execute$(EXEEXT)
- @p='unit/execution/execute$(EXEEXT)'; \
- b='unit/execution/execute'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/execution/executor.log: unit/execution/executor$(EXEEXT)
@p='unit/execution/executor$(EXEEXT)'; \
b='unit/execution/executor'; \
@@ -4386,13 +4887,6 @@ unit/execution/mapping.log: unit/execution/mapping$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/operation_state.log: unit/execution/operation_state$(EXEEXT)
- @p='unit/execution/operation_state$(EXEEXT)'; \
- b='unit/execution/operation_state'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/execution/outstanding_work.log: unit/execution/outstanding_work$(EXEEXT)
@p='unit/execution/outstanding_work$(EXEEXT)'; \
b='unit/execution/outstanding_work'; \
@@ -4407,13 +4901,6 @@ unit/execution/prefer_only.log: unit/execution/prefer_only$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/receiver.log: unit/execution/receiver$(EXEEXT)
- @p='unit/execution/receiver$(EXEEXT)'; \
- b='unit/execution/receiver'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/execution/relationship.log: unit/execution/relationship$(EXEEXT)
@p='unit/execution/relationship$(EXEEXT)'; \
b='unit/execution/relationship'; \
@@ -4421,62 +4908,6 @@ unit/execution/relationship.log: unit/execution/relationship$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/schedule.log: unit/execution/schedule$(EXEEXT)
- @p='unit/execution/schedule$(EXEEXT)'; \
- b='unit/execution/schedule'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/scheduler.log: unit/execution/scheduler$(EXEEXT)
- @p='unit/execution/scheduler$(EXEEXT)'; \
- b='unit/execution/scheduler'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/sender.log: unit/execution/sender$(EXEEXT)
- @p='unit/execution/sender$(EXEEXT)'; \
- b='unit/execution/sender'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/set_done.log: unit/execution/set_done$(EXEEXT)
- @p='unit/execution/set_done$(EXEEXT)'; \
- b='unit/execution/set_done'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/set_error.log: unit/execution/set_error$(EXEEXT)
- @p='unit/execution/set_error$(EXEEXT)'; \
- b='unit/execution/set_error'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/set_value.log: unit/execution/set_value$(EXEEXT)
- @p='unit/execution/set_value$(EXEEXT)'; \
- b='unit/execution/set_value'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/start.log: unit/execution/start$(EXEEXT)
- @p='unit/execution/start$(EXEEXT)'; \
- b='unit/execution/start'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/execution/submit.log: unit/execution/submit$(EXEEXT)
- @p='unit/execution/submit$(EXEEXT)'; \
- b='unit/execution/submit'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/execution_context.log: unit/execution_context$(EXEEXT)
@p='unit/execution_context$(EXEEXT)'; \
b='unit/execution_context'; \
@@ -4498,6 +4929,13 @@ unit/executor_work_guard.log: unit/executor_work_guard$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/file_base.log: unit/file_base$(EXEEXT)
+ @p='unit/file_base$(EXEEXT)'; \
+ b='unit/file_base'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/high_resolution_timer.log: unit/high_resolution_timer$(EXEEXT)
@p='unit/high_resolution_timer$(EXEEXT)'; \
b='unit/high_resolution_timer'; \
@@ -4708,6 +5146,13 @@ unit/local/datagram_protocol.log: unit/local/datagram_protocol$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/local/seq_packet_protocol.log: unit/local/seq_packet_protocol$(EXEEXT)
+ @p='unit/local/seq_packet_protocol$(EXEEXT)'; \
+ b='unit/local/seq_packet_protocol'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/local/stream_protocol.log: unit/local/stream_protocol$(EXEEXT)
@p='unit/local/stream_protocol$(EXEEXT)'; \
b='unit/local/stream_protocol'; \
@@ -4771,6 +5216,20 @@ unit/post.log: unit/post$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/prepend.log: unit/prepend$(EXEEXT)
+ @p='unit/prepend$(EXEEXT)'; \
+ b='unit/prepend'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/random_access_file.log: unit/random_access_file$(EXEEXT)
+ @p='unit/random_access_file$(EXEEXT)'; \
+ b='unit/random_access_file'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/read.log: unit/read$(EXEEXT)
@p='unit/read$(EXEEXT)'; \
b='unit/read'; \
@@ -4792,6 +5251,20 @@ unit/read_until.log: unit/read_until$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/readable_pipe.log: unit/readable_pipe$(EXEEXT)
+ @p='unit/readable_pipe$(EXEEXT)'; \
+ b='unit/readable_pipe'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/recycling_allocator.log: unit/recycling_allocator$(EXEEXT)
+ @p='unit/recycling_allocator$(EXEEXT)'; \
+ b='unit/recycling_allocator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/redirect_error.log: unit/redirect_error$(EXEEXT)
@p='unit/redirect_error$(EXEEXT)'; \
b='unit/redirect_error'; \
@@ -4799,6 +5272,13 @@ unit/redirect_error.log: unit/redirect_error$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/registered_buffer.log: unit/registered_buffer$(EXEEXT)
+ @p='unit/registered_buffer$(EXEEXT)'; \
+ b='unit/registered_buffer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/serial_port.log: unit/serial_port$(EXEEXT)
@p='unit/serial_port$(EXEEXT)'; \
b='unit/serial_port'; \
@@ -4820,6 +5300,13 @@ unit/signal_set.log: unit/signal_set$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/signal_set_base.log: unit/signal_set_base$(EXEEXT)
+ @p='unit/signal_set_base$(EXEEXT)'; \
+ b='unit/signal_set_base'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/socket_base.log: unit/socket_base$(EXEEXT)
@p='unit/socket_base$(EXEEXT)'; \
b='unit/socket_base'; \
@@ -4848,6 +5335,13 @@ unit/strand.log: unit/strand$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/stream_file.log: unit/stream_file$(EXEEXT)
+ @p='unit/stream_file$(EXEEXT)'; \
+ b='unit/stream_file'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/streambuf.log: unit/streambuf$(EXEEXT)
@p='unit/streambuf$(EXEEXT)'; \
b='unit/streambuf'; \
@@ -5051,6 +5545,13 @@ unit/windows/stream_handle.log: unit/windows/stream_handle$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/writable_pipe.log: unit/writable_pipe$(EXEEXT)
+ @p='unit/writable_pipe$(EXEEXT)'; \
+ b='unit/writable_pipe'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/write.log: unit/write$(EXEEXT)
@p='unit/write$(EXEEXT)'; \
b='unit/write'; \
@@ -5065,9 +5566,44 @@ unit/write_at.log: unit/write_at$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-unit/experimental/deferred.log: unit/experimental/deferred$(EXEEXT)
- @p='unit/experimental/deferred$(EXEEXT)'; \
- b='unit/experimental/deferred'; \
+unit/experimental/basic_channel.log: unit/experimental/basic_channel$(EXEEXT)
+ @p='unit/experimental/basic_channel$(EXEEXT)'; \
+ b='unit/experimental/basic_channel'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/basic_concurrent_channel.log: unit/experimental/basic_concurrent_channel$(EXEEXT)
+ @p='unit/experimental/basic_concurrent_channel$(EXEEXT)'; \
+ b='unit/experimental/basic_concurrent_channel'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/channel.log: unit/experimental/channel$(EXEEXT)
+ @p='unit/experimental/channel$(EXEEXT)'; \
+ b='unit/experimental/channel'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/channel_traits.log: unit/experimental/channel_traits$(EXEEXT)
+ @p='unit/experimental/channel_traits$(EXEEXT)'; \
+ b='unit/experimental/channel_traits'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/concurrent_channel.log: unit/experimental/concurrent_channel$(EXEEXT)
+ @p='unit/experimental/concurrent_channel$(EXEEXT)'; \
+ b='unit/experimental/concurrent_channel'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/parallel_group.log: unit/experimental/parallel_group$(EXEEXT)
+ @p='unit/experimental/parallel_group$(EXEEXT)'; \
+ b='unit/experimental/parallel_group'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -5086,6 +5622,20 @@ unit/experimental/awaitable_operators.log: unit/experimental/awaitable_operators
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/co_composed.log: unit/experimental/co_composed$(EXEEXT)
+ @p='unit/experimental/co_composed$(EXEEXT)'; \
+ b='unit/experimental/co_composed'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/allocator.log: unit/experimental/coro/allocator$(EXEEXT)
+ @p='unit/experimental/coro/allocator$(EXEEXT)'; \
+ b='unit/experimental/coro/allocator'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/experimental/coro/cancel.log: unit/experimental/coro/cancel$(EXEEXT)
@p='unit/experimental/coro/cancel$(EXEEXT)'; \
b='unit/experimental/coro/cancel'; \
@@ -5093,6 +5643,13 @@ unit/experimental/coro/cancel.log: unit/experimental/coro/cancel$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/co_spawn.log: unit/experimental/coro/co_spawn$(EXEEXT)
+ @p='unit/experimental/coro/co_spawn$(EXEEXT)'; \
+ b='unit/experimental/coro/co_spawn'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/experimental/coro/exception.log: unit/experimental/coro/exception$(EXEEXT)
@p='unit/experimental/coro/exception$(EXEEXT)'; \
b='unit/experimental/coro/exception'; \
@@ -5100,6 +5657,13 @@ unit/experimental/coro/exception.log: unit/experimental/coro/exception$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+unit/experimental/coro/executor.log: unit/experimental/coro/executor$(EXEEXT)
+ @p='unit/experimental/coro/executor$(EXEEXT)'; \
+ b='unit/experimental/coro/executor'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
unit/experimental/coro/partial.log: unit/experimental/coro/partial$(EXEEXT)
@p='unit/experimental/coro/partial$(EXEEXT)'; \
b='unit/experimental/coro/partial'; \
@@ -5191,7 +5755,6 @@ unit/ssl/stream.log: unit/ssl/stream$(EXEEXT)
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
-
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -5333,26 +5896,40 @@ distclean: distclean-recursive
-rm -f latency/$(DEPDIR)/udp_server.Po
-rm -f performance/$(DEPDIR)/client.Po
-rm -f performance/$(DEPDIR)/server.Po
+ -rm -f unit/$(DEPDIR)/any_completion_executor.Po
+ -rm -f unit/$(DEPDIR)/any_completion_handler.Po
+ -rm -f unit/$(DEPDIR)/any_io_executor.Po
+ -rm -f unit/$(DEPDIR)/append.Po
+ -rm -f unit/$(DEPDIR)/as_tuple.Po
-rm -f unit/$(DEPDIR)/associated_allocator.Po
-rm -f unit/$(DEPDIR)/associated_cancellation_slot.Po
-rm -f unit/$(DEPDIR)/associated_executor.Po
+ -rm -f unit/$(DEPDIR)/associated_immediate_executor.Po
-rm -f unit/$(DEPDIR)/associator.Po
-rm -f unit/$(DEPDIR)/async_result.Po
-rm -f unit/$(DEPDIR)/awaitable.Po
-rm -f unit/$(DEPDIR)/basic_datagram_socket.Po
-rm -f unit/$(DEPDIR)/basic_deadline_timer.Po
+ -rm -f unit/$(DEPDIR)/basic_file.Po
+ -rm -f unit/$(DEPDIR)/basic_random_access_file.Po
-rm -f unit/$(DEPDIR)/basic_raw_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_readable_pipe.Po
-rm -f unit/$(DEPDIR)/basic_seq_packet_socket.Po
-rm -f unit/$(DEPDIR)/basic_serial_port.Po
-rm -f unit/$(DEPDIR)/basic_signal_set.Po
-rm -f unit/$(DEPDIR)/basic_socket.Po
-rm -f unit/$(DEPDIR)/basic_socket_acceptor.Po
+ -rm -f unit/$(DEPDIR)/basic_stream_file.Po
-rm -f unit/$(DEPDIR)/basic_stream_socket.Po
-rm -f unit/$(DEPDIR)/basic_streambuf.Po
-rm -f unit/$(DEPDIR)/basic_waitable_timer.Po
+ -rm -f unit/$(DEPDIR)/basic_writable_pipe.Po
+ -rm -f unit/$(DEPDIR)/bind_allocator.Po
-rm -f unit/$(DEPDIR)/bind_cancellation_slot.Po
-rm -f unit/$(DEPDIR)/bind_executor.Po
+ -rm -f unit/$(DEPDIR)/bind_immediate_executor.Po
-rm -f unit/$(DEPDIR)/buffer.Po
+ -rm -f unit/$(DEPDIR)/buffer_registration.Po
-rm -f unit/$(DEPDIR)/buffered_read_stream.Po
-rm -f unit/$(DEPDIR)/buffered_stream.Po
-rm -f unit/$(DEPDIR)/buffered_write_stream.Po
@@ -5364,15 +5941,19 @@ distclean: distclean-recursive
-rm -f unit/$(DEPDIR)/completion_condition.Po
-rm -f unit/$(DEPDIR)/compose.Po
-rm -f unit/$(DEPDIR)/connect.Po
+ -rm -f unit/$(DEPDIR)/connect_pipe.Po
+ -rm -f unit/$(DEPDIR)/consign.Po
-rm -f unit/$(DEPDIR)/coroutine.Po
-rm -f unit/$(DEPDIR)/deadline_timer.Po
-rm -f unit/$(DEPDIR)/defer.Po
+ -rm -f unit/$(DEPDIR)/deferred.Po
-rm -f unit/$(DEPDIR)/detached.Po
-rm -f unit/$(DEPDIR)/dispatch.Po
-rm -f unit/$(DEPDIR)/error.Po
-rm -f unit/$(DEPDIR)/execution_context.Po
-rm -f unit/$(DEPDIR)/executor.Po
-rm -f unit/$(DEPDIR)/executor_work_guard.Po
+ -rm -f unit/$(DEPDIR)/file_base.Po
-rm -f unit/$(DEPDIR)/high_resolution_timer.Po
-rm -f unit/$(DEPDIR)/io_context.Po
-rm -f unit/$(DEPDIR)/io_context_strand.Po
@@ -5381,17 +5962,24 @@ distclean: distclean-recursive
-rm -f unit/$(DEPDIR)/packaged_task.Po
-rm -f unit/$(DEPDIR)/placeholders.Po
-rm -f unit/$(DEPDIR)/post.Po
+ -rm -f unit/$(DEPDIR)/prepend.Po
+ -rm -f unit/$(DEPDIR)/random_access_file.Po
-rm -f unit/$(DEPDIR)/read.Po
-rm -f unit/$(DEPDIR)/read_at.Po
-rm -f unit/$(DEPDIR)/read_until.Po
+ -rm -f unit/$(DEPDIR)/readable_pipe.Po
+ -rm -f unit/$(DEPDIR)/recycling_allocator.Po
-rm -f unit/$(DEPDIR)/redirect_error.Po
+ -rm -f unit/$(DEPDIR)/registered_buffer.Po
-rm -f unit/$(DEPDIR)/serial_port.Po
-rm -f unit/$(DEPDIR)/serial_port_base.Po
-rm -f unit/$(DEPDIR)/signal_set.Po
+ -rm -f unit/$(DEPDIR)/signal_set_base.Po
-rm -f unit/$(DEPDIR)/socket_base.Po
-rm -f unit/$(DEPDIR)/static_thread_pool.Po
-rm -f unit/$(DEPDIR)/steady_timer.Po
-rm -f unit/$(DEPDIR)/strand.Po
+ -rm -f unit/$(DEPDIR)/stream_file.Po
-rm -f unit/$(DEPDIR)/streambuf.Po
-rm -f unit/$(DEPDIR)/system_context.Po
-rm -f unit/$(DEPDIR)/system_executor.Po
@@ -5404,37 +5992,33 @@ distclean: distclean-recursive
-rm -f unit/$(DEPDIR)/use_future.Po
-rm -f unit/$(DEPDIR)/uses_executor.Po
-rm -f unit/$(DEPDIR)/wait_traits.Po
+ -rm -f unit/$(DEPDIR)/writable_pipe.Po
-rm -f unit/$(DEPDIR)/write.Po
-rm -f unit/$(DEPDIR)/write_at.Po
-rm -f unit/execution/$(DEPDIR)/any_executor.Po
-rm -f unit/execution/$(DEPDIR)/blocking.Po
-rm -f unit/execution/$(DEPDIR)/blocking_adaptation.Po
- -rm -f unit/execution/$(DEPDIR)/bulk_execute.Po
- -rm -f unit/execution/$(DEPDIR)/bulk_guarantee.Po
- -rm -f unit/execution/$(DEPDIR)/connect.Po
-rm -f unit/execution/$(DEPDIR)/context_as.Po
- -rm -f unit/execution/$(DEPDIR)/execute.Po
-rm -f unit/execution/$(DEPDIR)/executor.Po
-rm -f unit/execution/$(DEPDIR)/invocable_archetype.Po
-rm -f unit/execution/$(DEPDIR)/mapping.Po
- -rm -f unit/execution/$(DEPDIR)/operation_state.Po
-rm -f unit/execution/$(DEPDIR)/outstanding_work.Po
-rm -f unit/execution/$(DEPDIR)/prefer_only.Po
- -rm -f unit/execution/$(DEPDIR)/receiver.Po
-rm -f unit/execution/$(DEPDIR)/relationship.Po
- -rm -f unit/execution/$(DEPDIR)/schedule.Po
- -rm -f unit/execution/$(DEPDIR)/scheduler.Po
- -rm -f unit/execution/$(DEPDIR)/sender.Po
- -rm -f unit/execution/$(DEPDIR)/set_done.Po
- -rm -f unit/execution/$(DEPDIR)/set_error.Po
- -rm -f unit/execution/$(DEPDIR)/set_value.Po
- -rm -f unit/execution/$(DEPDIR)/start.Po
- -rm -f unit/execution/$(DEPDIR)/submit.Po
-rm -f unit/experimental/$(DEPDIR)/awaitable_operators.Po
- -rm -f unit/experimental/$(DEPDIR)/deferred.Po
+ -rm -f unit/experimental/$(DEPDIR)/basic_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/basic_concurrent_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/channel_traits.Po
+ -rm -f unit/experimental/$(DEPDIR)/co_composed.Po
+ -rm -f unit/experimental/$(DEPDIR)/concurrent_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/parallel_group.Po
-rm -f unit/experimental/$(DEPDIR)/promise.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/allocator.Po
-rm -f unit/experimental/coro/$(DEPDIR)/cancel.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/co_spawn.Po
-rm -f unit/experimental/coro/$(DEPDIR)/exception.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/executor.Po
-rm -f unit/experimental/coro/$(DEPDIR)/partial.Po
-rm -f unit/experimental/coro/$(DEPDIR)/simple_test.Po
-rm -f unit/experimental/coro/$(DEPDIR)/stack_test.Po
@@ -5469,6 +6053,7 @@ distclean: distclean-recursive
-rm -f unit/local/$(DEPDIR)/basic_endpoint.Po
-rm -f unit/local/$(DEPDIR)/connect_pair.Po
-rm -f unit/local/$(DEPDIR)/datagram_protocol.Po
+ -rm -f unit/local/$(DEPDIR)/seq_packet_protocol.Po
-rm -f unit/local/$(DEPDIR)/stream_protocol.Po
-rm -f unit/posix/$(DEPDIR)/basic_descriptor.Po
-rm -f unit/posix/$(DEPDIR)/basic_stream_descriptor.Po
@@ -5552,26 +6137,40 @@ maintainer-clean: maintainer-clean-recursive
-rm -f latency/$(DEPDIR)/udp_server.Po
-rm -f performance/$(DEPDIR)/client.Po
-rm -f performance/$(DEPDIR)/server.Po
+ -rm -f unit/$(DEPDIR)/any_completion_executor.Po
+ -rm -f unit/$(DEPDIR)/any_completion_handler.Po
+ -rm -f unit/$(DEPDIR)/any_io_executor.Po
+ -rm -f unit/$(DEPDIR)/append.Po
+ -rm -f unit/$(DEPDIR)/as_tuple.Po
-rm -f unit/$(DEPDIR)/associated_allocator.Po
-rm -f unit/$(DEPDIR)/associated_cancellation_slot.Po
-rm -f unit/$(DEPDIR)/associated_executor.Po
+ -rm -f unit/$(DEPDIR)/associated_immediate_executor.Po
-rm -f unit/$(DEPDIR)/associator.Po
-rm -f unit/$(DEPDIR)/async_result.Po
-rm -f unit/$(DEPDIR)/awaitable.Po
-rm -f unit/$(DEPDIR)/basic_datagram_socket.Po
-rm -f unit/$(DEPDIR)/basic_deadline_timer.Po
+ -rm -f unit/$(DEPDIR)/basic_file.Po
+ -rm -f unit/$(DEPDIR)/basic_random_access_file.Po
-rm -f unit/$(DEPDIR)/basic_raw_socket.Po
+ -rm -f unit/$(DEPDIR)/basic_readable_pipe.Po
-rm -f unit/$(DEPDIR)/basic_seq_packet_socket.Po
-rm -f unit/$(DEPDIR)/basic_serial_port.Po
-rm -f unit/$(DEPDIR)/basic_signal_set.Po
-rm -f unit/$(DEPDIR)/basic_socket.Po
-rm -f unit/$(DEPDIR)/basic_socket_acceptor.Po
+ -rm -f unit/$(DEPDIR)/basic_stream_file.Po
-rm -f unit/$(DEPDIR)/basic_stream_socket.Po
-rm -f unit/$(DEPDIR)/basic_streambuf.Po
-rm -f unit/$(DEPDIR)/basic_waitable_timer.Po
+ -rm -f unit/$(DEPDIR)/basic_writable_pipe.Po
+ -rm -f unit/$(DEPDIR)/bind_allocator.Po
-rm -f unit/$(DEPDIR)/bind_cancellation_slot.Po
-rm -f unit/$(DEPDIR)/bind_executor.Po
+ -rm -f unit/$(DEPDIR)/bind_immediate_executor.Po
-rm -f unit/$(DEPDIR)/buffer.Po
+ -rm -f unit/$(DEPDIR)/buffer_registration.Po
-rm -f unit/$(DEPDIR)/buffered_read_stream.Po
-rm -f unit/$(DEPDIR)/buffered_stream.Po
-rm -f unit/$(DEPDIR)/buffered_write_stream.Po
@@ -5583,15 +6182,19 @@ maintainer-clean: maintainer-clean-recursive
-rm -f unit/$(DEPDIR)/completion_condition.Po
-rm -f unit/$(DEPDIR)/compose.Po
-rm -f unit/$(DEPDIR)/connect.Po
+ -rm -f unit/$(DEPDIR)/connect_pipe.Po
+ -rm -f unit/$(DEPDIR)/consign.Po
-rm -f unit/$(DEPDIR)/coroutine.Po
-rm -f unit/$(DEPDIR)/deadline_timer.Po
-rm -f unit/$(DEPDIR)/defer.Po
+ -rm -f unit/$(DEPDIR)/deferred.Po
-rm -f unit/$(DEPDIR)/detached.Po
-rm -f unit/$(DEPDIR)/dispatch.Po
-rm -f unit/$(DEPDIR)/error.Po
-rm -f unit/$(DEPDIR)/execution_context.Po
-rm -f unit/$(DEPDIR)/executor.Po
-rm -f unit/$(DEPDIR)/executor_work_guard.Po
+ -rm -f unit/$(DEPDIR)/file_base.Po
-rm -f unit/$(DEPDIR)/high_resolution_timer.Po
-rm -f unit/$(DEPDIR)/io_context.Po
-rm -f unit/$(DEPDIR)/io_context_strand.Po
@@ -5600,17 +6203,24 @@ maintainer-clean: maintainer-clean-recursive
-rm -f unit/$(DEPDIR)/packaged_task.Po
-rm -f unit/$(DEPDIR)/placeholders.Po
-rm -f unit/$(DEPDIR)/post.Po
+ -rm -f unit/$(DEPDIR)/prepend.Po
+ -rm -f unit/$(DEPDIR)/random_access_file.Po
-rm -f unit/$(DEPDIR)/read.Po
-rm -f unit/$(DEPDIR)/read_at.Po
-rm -f unit/$(DEPDIR)/read_until.Po
+ -rm -f unit/$(DEPDIR)/readable_pipe.Po
+ -rm -f unit/$(DEPDIR)/recycling_allocator.Po
-rm -f unit/$(DEPDIR)/redirect_error.Po
+ -rm -f unit/$(DEPDIR)/registered_buffer.Po
-rm -f unit/$(DEPDIR)/serial_port.Po
-rm -f unit/$(DEPDIR)/serial_port_base.Po
-rm -f unit/$(DEPDIR)/signal_set.Po
+ -rm -f unit/$(DEPDIR)/signal_set_base.Po
-rm -f unit/$(DEPDIR)/socket_base.Po
-rm -f unit/$(DEPDIR)/static_thread_pool.Po
-rm -f unit/$(DEPDIR)/steady_timer.Po
-rm -f unit/$(DEPDIR)/strand.Po
+ -rm -f unit/$(DEPDIR)/stream_file.Po
-rm -f unit/$(DEPDIR)/streambuf.Po
-rm -f unit/$(DEPDIR)/system_context.Po
-rm -f unit/$(DEPDIR)/system_executor.Po
@@ -5623,37 +6233,33 @@ maintainer-clean: maintainer-clean-recursive
-rm -f unit/$(DEPDIR)/use_future.Po
-rm -f unit/$(DEPDIR)/uses_executor.Po
-rm -f unit/$(DEPDIR)/wait_traits.Po
+ -rm -f unit/$(DEPDIR)/writable_pipe.Po
-rm -f unit/$(DEPDIR)/write.Po
-rm -f unit/$(DEPDIR)/write_at.Po
-rm -f unit/execution/$(DEPDIR)/any_executor.Po
-rm -f unit/execution/$(DEPDIR)/blocking.Po
-rm -f unit/execution/$(DEPDIR)/blocking_adaptation.Po
- -rm -f unit/execution/$(DEPDIR)/bulk_execute.Po
- -rm -f unit/execution/$(DEPDIR)/bulk_guarantee.Po
- -rm -f unit/execution/$(DEPDIR)/connect.Po
-rm -f unit/execution/$(DEPDIR)/context_as.Po
- -rm -f unit/execution/$(DEPDIR)/execute.Po
-rm -f unit/execution/$(DEPDIR)/executor.Po
-rm -f unit/execution/$(DEPDIR)/invocable_archetype.Po
-rm -f unit/execution/$(DEPDIR)/mapping.Po
- -rm -f unit/execution/$(DEPDIR)/operation_state.Po
-rm -f unit/execution/$(DEPDIR)/outstanding_work.Po
-rm -f unit/execution/$(DEPDIR)/prefer_only.Po
- -rm -f unit/execution/$(DEPDIR)/receiver.Po
-rm -f unit/execution/$(DEPDIR)/relationship.Po
- -rm -f unit/execution/$(DEPDIR)/schedule.Po
- -rm -f unit/execution/$(DEPDIR)/scheduler.Po
- -rm -f unit/execution/$(DEPDIR)/sender.Po
- -rm -f unit/execution/$(DEPDIR)/set_done.Po
- -rm -f unit/execution/$(DEPDIR)/set_error.Po
- -rm -f unit/execution/$(DEPDIR)/set_value.Po
- -rm -f unit/execution/$(DEPDIR)/start.Po
- -rm -f unit/execution/$(DEPDIR)/submit.Po
-rm -f unit/experimental/$(DEPDIR)/awaitable_operators.Po
- -rm -f unit/experimental/$(DEPDIR)/deferred.Po
+ -rm -f unit/experimental/$(DEPDIR)/basic_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/basic_concurrent_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/channel_traits.Po
+ -rm -f unit/experimental/$(DEPDIR)/co_composed.Po
+ -rm -f unit/experimental/$(DEPDIR)/concurrent_channel.Po
+ -rm -f unit/experimental/$(DEPDIR)/parallel_group.Po
-rm -f unit/experimental/$(DEPDIR)/promise.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/allocator.Po
-rm -f unit/experimental/coro/$(DEPDIR)/cancel.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/co_spawn.Po
-rm -f unit/experimental/coro/$(DEPDIR)/exception.Po
+ -rm -f unit/experimental/coro/$(DEPDIR)/executor.Po
-rm -f unit/experimental/coro/$(DEPDIR)/partial.Po
-rm -f unit/experimental/coro/$(DEPDIR)/simple_test.Po
-rm -f unit/experimental/coro/$(DEPDIR)/stack_test.Po
@@ -5688,6 +6294,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f unit/local/$(DEPDIR)/basic_endpoint.Po
-rm -f unit/local/$(DEPDIR)/connect_pair.Po
-rm -f unit/local/$(DEPDIR)/datagram_protocol.Po
+ -rm -f unit/local/$(DEPDIR)/seq_packet_protocol.Po
-rm -f unit/local/$(DEPDIR)/stream_protocol.Po
-rm -f unit/posix/$(DEPDIR)/basic_descriptor.Po
-rm -f unit/posix/$(DEPDIR)/basic_stream_descriptor.Po
diff --git a/3rdparty/asio/src/tests/latency/allocator.hpp b/3rdparty/asio/src/tests/latency/allocator.hpp
index ec437013eb7..2b186aef8ec 100644
--- a/3rdparty/asio/src/tests/latency/allocator.hpp
+++ b/3rdparty/asio/src/tests/latency/allocator.hpp
@@ -2,7 +2,7 @@
// allocator.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/latency/high_res_clock.hpp b/3rdparty/asio/src/tests/latency/high_res_clock.hpp
index 1467f86cb80..a497834d6d8 100644
--- a/3rdparty/asio/src/tests/latency/high_res_clock.hpp
+++ b/3rdparty/asio/src/tests/latency/high_res_clock.hpp
@@ -2,7 +2,7 @@
// high_res_clock.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/latency/tcp_client.cpp b/3rdparty/asio/src/tests/latency/tcp_client.cpp
index eb4c96d6d3b..2a4c5b7640f 100644
--- a/3rdparty/asio/src/tests/latency/tcp_client.cpp
+++ b/3rdparty/asio/src/tests/latency/tcp_client.cpp
@@ -2,7 +2,7 @@
// tcp_client.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/latency/tcp_server.cpp b/3rdparty/asio/src/tests/latency/tcp_server.cpp
index 59569509b24..c26c8509a45 100644
--- a/3rdparty/asio/src/tests/latency/tcp_server.cpp
+++ b/3rdparty/asio/src/tests/latency/tcp_server.cpp
@@ -2,7 +2,7 @@
// tcp_server.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/latency/udp_client.cpp b/3rdparty/asio/src/tests/latency/udp_client.cpp
index cb55cfdb210..484ba085cd8 100644
--- a/3rdparty/asio/src/tests/latency/udp_client.cpp
+++ b/3rdparty/asio/src/tests/latency/udp_client.cpp
@@ -2,7 +2,7 @@
// udp_client.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/latency/udp_server.cpp b/3rdparty/asio/src/tests/latency/udp_server.cpp
index 0bf333cfc4f..13483fab76f 100644
--- a/3rdparty/asio/src/tests/latency/udp_server.cpp
+++ b/3rdparty/asio/src/tests/latency/udp_server.cpp
@@ -2,7 +2,7 @@
// udp_server.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/performance/client.cpp b/3rdparty/asio/src/tests/performance/client.cpp
index 720b909ad4a..b42a6c50930 100644
--- a/3rdparty/asio/src/tests/performance/client.cpp
+++ b/3rdparty/asio/src/tests/performance/client.cpp
@@ -2,7 +2,7 @@
// client.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/performance/handler_allocator.hpp b/3rdparty/asio/src/tests/performance/handler_allocator.hpp
index 4f4a94e9195..6c1b98532ab 100644
--- a/3rdparty/asio/src/tests/performance/handler_allocator.hpp
+++ b/3rdparty/asio/src/tests/performance/handler_allocator.hpp
@@ -2,7 +2,7 @@
// handler_allocator.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/performance/server.cpp b/3rdparty/asio/src/tests/performance/server.cpp
index 374992178b3..9de3c1294f8 100644
--- a/3rdparty/asio/src/tests/performance/server.cpp
+++ b/3rdparty/asio/src/tests/performance/server.cpp
@@ -2,7 +2,7 @@
// server.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/Makefile.in b/3rdparty/asio/src/tests/properties/Makefile.in
index 344bf54cf0e..fb6b500f02e 100644
--- a/3rdparty/asio/src/tests/properties/Makefile.in
+++ b/3rdparty/asio/src/tests/properties/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1898,8 +1898,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
@@ -2082,6 +2080,7 @@ am__set_TESTS_bases = \
bases='$(TEST_LOGS)'; \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
RECHECK_LOGS = $(TEST_LOGS)
AM_RECURSIVE_TARGETS = check recheck
TEST_SUITE_LOG = test-suite.log
@@ -2118,8 +2117,9 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CXX = @CXX@
-CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -2128,9 +2128,8 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
-EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
-GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -2197,9 +2196,11 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -3828,7 +3829,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
echo "$${col}$$br$${std}"; \
- echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
echo "$${col}$$br$${std}"; \
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
@@ -5073,7 +5074,6 @@ cpp14/can_prefer_not_preferable_unsupported.log: cpp14/can_prefer_not_preferable
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
-
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_prefer.cpp
index e24f31bb0c1..e9784f60661 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_require.cpp
index ef2d216581a..693a46150d1 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_free_require.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_prefer.cpp
index 968e252aad5..011a34764dc 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_require.cpp
index d388248b142..9364391c935 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_member_require.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_prefer.cpp
index 1f87fa26591..8fd11c6f659 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_applicable_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_require.cpp
index 03816adb6a8..5c205ada2e7 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_free_require.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_applicable_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_prefer.cpp
index f86fa17cea9..15e93fd3a51 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_applicable_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_require.cpp
index 9f99138e175..0a0f1f6ecf0 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_member_require.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_applicable_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_static.cpp
index 493405acdac..f564d2fae01 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_unsupported.cpp
index 4699ef77b51..0711d7c4a4d 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_prefer.cpp
index 1d49f4c2c7b..3a522e5bed4 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_preferable_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_require.cpp
index 47fa9662103..39ea91fefcb 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_free_require.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_preferable_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_prefer.cpp
index 31d460f6057..e61f89872d0 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_preferable_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_require.cpp
index b6be9cac436..0052cc3ee50 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_member_require.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_preferable_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_static.cpp
index d634c64a517..f3428066587 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_static.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_preferable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_unsupported.cpp
index 3fb6f0bc14c..14695938c99 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_not_preferable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_not_preferable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_static.cpp
index 3adeb26d02c..ac1f5c186aa 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_static.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_unsupported.cpp
index c3d95841f17..e59e5d098f8 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_prefer_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_prefer_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp03/can_prefer_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_free.cpp
index 9664a989e7d..d0d42fe7bdd 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_query_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_free.cpp
@@ -2,7 +2,7 @@
// cpp03/can_query_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_member.cpp
index 040dbba8baf..9ead9be9751 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_query_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_member.cpp
@@ -2,7 +2,7 @@
// cpp03/can_query_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_free.cpp
index 3a0344320f5..b360327c132 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_free.cpp
@@ -2,7 +2,7 @@
// cpp03/can_query_not_applicable_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_member.cpp
index b846c332943..be339d05522 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_member.cpp
@@ -2,7 +2,7 @@
// cpp03/can_query_not_applicable_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_static.cpp
index 4f41e2c2d6c..127e2ace42e 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp03/can_query_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_unsupported.cpp
index a59edd14b2b..ec1c07affc1 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp03/can_query_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_static.cpp
index a8c5e95d24d..9a305712f1d 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_query_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_static.cpp
@@ -2,7 +2,7 @@
// cpp03/can_query_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_query_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_query_unsupported.cpp
index bebd3cb3201..8eefbe9bd14 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_query_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_query_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp03/can_query_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_free.cpp
index a8cb9bbea0c..810dfc240a2 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_free.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_concept_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_member.cpp
index ca478809cfc..615e8a09cd7 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_member.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_concept_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_free.cpp
index 67b4b5fb245..c076dd416cd 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_free.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_concept_not_applicable_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_member.cpp
index e76a9838587..e6e258e8424 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_member.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_concept_not_applicable_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_static.cpp
index 171a7d254c4..c42a1b3fca4 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_concept_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_unsupported.cpp
index 02a6ff17515..261c4be3728 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_concept_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_static.cpp
index f2c328bf355..3c7d7bf4508 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_static.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_concept_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_unsupported.cpp
index 0d71c25c32c..0fbcbd36525 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_concept_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_concept_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_free.cpp
index e8eb9788268..fdd9241efa0 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_free.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_member.cpp
index 9a89c4146c8..3f9a427333a 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_member.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_free.cpp
index afa26616096..4bf8ca32a2c 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_free.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_not_applicable_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_member.cpp
index 1a3bbdd3819..842c8d4bee9 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_member.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_not_applicable_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_static.cpp
index f35a5a10fc2..e8d9ac63aa2 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_unsupported.cpp
index f8aa00678eb..6fe234731dc 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_static.cpp
index 858c685d37f..5d4a65749b2 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_static.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/can_require_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/can_require_unsupported.cpp
index a58f47c64c9..f3bf74b0499 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/can_require_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/can_require_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp03/can_require_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_free_prefer.cpp
index b663bbcd9ca..dcf89c7f4af 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/prefer_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp03/prefer_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_free_require.cpp
index 357e25c9654..223d3a60921 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/prefer_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_free_require.cpp
@@ -2,7 +2,7 @@
// cpp03/prefer_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_member_prefer.cpp
index 8b814d049ab..538f7b2662a 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/prefer_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp03/prefer_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_member_require.cpp
index ee0b5efb090..f659b6fc2bd 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/prefer_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_member_require.cpp
@@ -2,7 +2,7 @@
// cpp03/prefer_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_static.cpp
index e75139966a8..f5fcb7f89a0 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/prefer_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_static.cpp
@@ -2,7 +2,7 @@
// cpp03/prefer_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp03/prefer_unsupported.cpp
index 7fad5253acc..25e0f308a4a 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/prefer_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/prefer_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp03/prefer_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/query_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/query_free.cpp
index 8611f725972..a9aae563293 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/query_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/query_free.cpp
@@ -2,7 +2,7 @@
// cpp03/query_free.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/query_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/query_member.cpp
index 71be73d58a6..a1ab83e0200 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/query_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/query_member.cpp
@@ -2,7 +2,7 @@
// cpp03/query_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/query_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/query_static.cpp
index aab3f4e8ac4..b0e0b4040e4 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/query_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/query_static.cpp
@@ -2,7 +2,7 @@
// cpp03/query_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_concept_free.cpp
index 5476d5cb69c..6cccdd2774e 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/require_concept_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_concept_free.cpp
@@ -2,7 +2,7 @@
// cpp03/require_concept_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_concept_member.cpp
index e3359eb11cf..673493292be 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/require_concept_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_concept_member.cpp
@@ -2,7 +2,7 @@
// cpp03/require_concept_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_concept_static.cpp
index 7f514cf052e..e92ffa1ef61 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/require_concept_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_concept_static.cpp
@@ -2,7 +2,7 @@
// cpp03/require_concept_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_free.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_free.cpp
index 50e99283f14..04734ac3192 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/require_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_free.cpp
@@ -2,7 +2,7 @@
// cpp03/require_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_member.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_member.cpp
index b3fea49348b..fc6bdc2c9c9 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/require_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_member.cpp
@@ -2,7 +2,7 @@
// cpp03/require_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp03/require_static.cpp b/3rdparty/asio/src/tests/properties/cpp03/require_static.cpp
index 25e9e1d4ef1..33512b32924 100644
--- a/3rdparty/asio/src/tests/properties/cpp03/require_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp03/require_static.cpp
@@ -2,7 +2,7 @@
// cpp03/require_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_prefer.cpp
index 2ccdf2c7574..860fa6fad5b 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_require.cpp
index f5179ffb170..b842e9aa4e9 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_free_require.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_prefer.cpp
index 6c8d00a9b73..9f00cbcaf38 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_require.cpp
index 9ce08fa5cb7..a81bae1ae1c 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_member_require.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_prefer.cpp
index 766ba61c76a..9079c1fc832 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_applicable_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_require.cpp
index 29b19d39f7c..52fc618ac97 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_free_require.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_applicable_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_prefer.cpp
index 2774f1f29ef..93f0c85c934 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_applicable_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_require.cpp
index de3feb9e444..e17ec93f80a 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_member_require.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_applicable_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_static.cpp
index 73ddc0c3f11..9087ed42332 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_unsupported.cpp
index f3fd5a6e3e0..b09d15708a1 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_prefer.cpp
index 1d1dc98e199..28a1d151b2d 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_preferable_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_require.cpp
index ca4d5c3c8df..cbb105416a4 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_free_require.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_preferable_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_prefer.cpp
index a568e8b048b..2d460503b79 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_preferable_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_require.cpp
index 29eede3bd64..4e03c02d895 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_member_require.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_preferable_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_static.cpp
index 88d7fffd390..0791d8a02f5 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_static.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_preferable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_unsupported.cpp
index d1de18a0a81..059944ece37 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_not_preferable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_not_preferable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_static.cpp
index a7dd5dc3051..c928f7ffd63 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_static.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_unsupported.cpp
index cd3fc009075..32d6ac5c0d3 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_prefer_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_prefer_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp11/can_prefer_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_free.cpp
index 525c1111d80..330493ba328 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_query_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_free.cpp
@@ -2,7 +2,7 @@
// cpp11/can_query_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_member.cpp
index c4e562d16e8..e1442d9f296 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_query_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_member.cpp
@@ -2,7 +2,7 @@
// cpp11/can_query_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_free.cpp
index 76da584f8d6..2be49af0c64 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_free.cpp
@@ -2,7 +2,7 @@
// cpp11/can_query_not_applicable_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_member.cpp
index 8ae6d284998..788148df4a9 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_member.cpp
@@ -2,7 +2,7 @@
// cpp11/can_query_not_applicable_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_static.cpp
index 3f70747cb25..c57848c7a9f 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp11/can_query_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_unsupported.cpp
index 0eab9f9e0dd..79bff6231ab 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp11/can_query_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_static.cpp
index 1aae961ac63..6dc25819a43 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_query_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_static.cpp
@@ -2,7 +2,7 @@
// cpp11/can_query_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_query_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_query_unsupported.cpp
index 4d5bb401b7d..369955e474a 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_query_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_query_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp11/can_query_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_free.cpp
index 250bdce7df7..3dd617097a2 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_free.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_concept_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_member.cpp
index 81aaeadcc91..55ac468247b 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_member.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_concept_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_free.cpp
index 5a5acbbb962..af40b48bdec 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_free.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_concept_not_applicable_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_member.cpp
index dfa1d367d90..baf6b9f482f 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_member.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_concept_not_applicable_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_static.cpp
index ed1dbff5d45..7d7f13876d8 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_concept_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_unsupported.cpp
index 05ae9ff923a..13e05b231b5 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_concept_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_static.cpp
index 898f132f18b..07973a5bd14 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_static.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_concept_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_unsupported.cpp
index 878f16268f2..4a4fee1f705 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_concept_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_concept_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_free.cpp
index e248e9338f4..b66965e60e1 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_free.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_member.cpp
index 8f9fd03a97c..cac464174f1 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_member.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_free.cpp
index 20ed4ed0e8d..9705b87b244 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_free.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_not_applicable_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_member.cpp
index e896ad061a7..cd7f75fef34 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_member.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_not_applicable_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_static.cpp
index 6bb8faa0f75..f852e451513 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_unsupported.cpp
index 2dd98405224..e6286aba02c 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_static.cpp
index ee8d5555a67..4c1b38fc2c0 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_static.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/can_require_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/can_require_unsupported.cpp
index 0426abd46a6..bc9c4ed2072 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/can_require_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/can_require_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp11/can_require_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_free_prefer.cpp
index 0c42fdfc80b..3faf0019399 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/prefer_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp11/prefer_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_free_require.cpp
index 8597c0d38c1..f30d0fbb06f 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/prefer_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_free_require.cpp
@@ -2,7 +2,7 @@
// cpp11/prefer_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_member_prefer.cpp
index b97c45ff9ae..9803d5e5e95 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/prefer_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp11/prefer_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_member_require.cpp
index a896efd7437..701fb2dec81 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/prefer_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_member_require.cpp
@@ -2,7 +2,7 @@
// cpp11/prefer_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_static.cpp
index 721ff7ae037..18cd713d9d0 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/prefer_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_static.cpp
@@ -2,7 +2,7 @@
// cpp11/prefer_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp11/prefer_unsupported.cpp
index 0eaaf9105c5..8eb542301ec 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/prefer_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/prefer_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp11/prefer_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/query_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/query_free.cpp
index 0a872cd0233..17a14dc3f5a 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/query_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/query_free.cpp
@@ -2,7 +2,7 @@
// cpp11/query_free.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/query_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/query_member.cpp
index 0c9a576f8ea..18ea24171ab 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/query_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/query_member.cpp
@@ -2,7 +2,7 @@
// cpp11/query_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/query_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/query_static.cpp
index c7cde46cb01..3290ab0971f 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/query_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/query_static.cpp
@@ -2,7 +2,7 @@
// cpp11/query_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_concept_free.cpp
index 5179852e1ae..3f422988d2a 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/require_concept_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_concept_free.cpp
@@ -2,7 +2,7 @@
// cpp11/require_concept_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_concept_member.cpp
index 4f71dc0c22a..1f8bbf65b42 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/require_concept_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_concept_member.cpp
@@ -2,7 +2,7 @@
// cpp11/require_concept_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_concept_static.cpp
index 7f57963fb3d..b2a6f9dde39 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/require_concept_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_concept_static.cpp
@@ -2,7 +2,7 @@
// cpp11/require_concept_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_free.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_free.cpp
index bd1569f361c..1acd5bc78ce 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/require_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_free.cpp
@@ -2,7 +2,7 @@
// cpp11/require_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_member.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_member.cpp
index 545d2c3a112..e9192830811 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/require_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_member.cpp
@@ -2,7 +2,7 @@
// cpp11/require_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp11/require_static.cpp b/3rdparty/asio/src/tests/properties/cpp11/require_static.cpp
index 7ea70271312..e752dac10a4 100644
--- a/3rdparty/asio/src/tests/properties/cpp11/require_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp11/require_static.cpp
@@ -2,7 +2,7 @@
// cpp11/require_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_prefer.cpp
index 30e8a97bbdf..f7f2854233c 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_require.cpp
index 3f18f1c4f6e..a2a01e4d739 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_free_require.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_prefer.cpp
index 2140e3175c3..b0d9622bd5b 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_require.cpp
index 99b1cff35fa..9d1146ad323 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_member_require.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_prefer.cpp
index b1290243f7b..1a305fc3ae6 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_applicable_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_require.cpp
index e71bf759aa9..c5d732441d7 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_free_require.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_applicable_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_prefer.cpp
index 6caced35383..66af105ead3 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_applicable_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_require.cpp
index 3fb4c48c74a..a2bf20b6e89 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_member_require.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_applicable_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_static.cpp
index d5c275ee61d..123fd863f48 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_unsupported.cpp
index 2e9f78e7fed..ed67b39d6a2 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_prefer.cpp
index 7dc29e0d8a6..99cb8074746 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_preferable_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_require.cpp
index 964c259f883..0e3329de423 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_free_require.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_preferable_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_prefer.cpp
index 2f61538ea96..12213cd57e9 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_preferable_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_require.cpp
index 0bb32d97c5e..d801a808b4d 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_member_require.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_preferable_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_static.cpp
index 38c4309e9a0..cbaf4eecc46 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_static.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_preferable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_unsupported.cpp
index e9b18bf297f..aa37aedd3c6 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_not_preferable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_not_preferable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_static.cpp
index 8437f9b62ec..3933a78839b 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_static.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_unsupported.cpp
index 0bf1ce07d9d..09ce8e02f18 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_prefer_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_prefer_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp14/can_prefer_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_free.cpp
index 1a6c19e9766..7654a78a06a 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_query_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_free.cpp
@@ -2,7 +2,7 @@
// cpp14/can_query_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_member.cpp
index 49bf42c387e..6bd6c02c98b 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_query_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_member.cpp
@@ -2,7 +2,7 @@
// cpp14/can_query_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_free.cpp
index c1b7ed540e7..bda1770699b 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_free.cpp
@@ -2,7 +2,7 @@
// cpp14/can_query_not_applicable_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_member.cpp
index 56e2dc5342d..25b6ab9c793 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_member.cpp
@@ -2,7 +2,7 @@
// cpp14/can_query_not_applicable_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_static.cpp
index 28e27c3529d..299a5e1f2a5 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp14/can_query_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_unsupported.cpp
index 1b89d2b02a6..cec0aea9167 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp14/can_query_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_static.cpp
index 7d1bb34fd7c..67b19ac74ed 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_query_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_static.cpp
@@ -2,7 +2,7 @@
// cpp14/can_query_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_query_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_query_unsupported.cpp
index 34c752c367d..7e8f63f1405 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_query_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_query_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp14/can_query_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_free.cpp
index ff5163bc02b..e0dea96edf0 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_free.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_concept_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_member.cpp
index 8d2d1b16a53..7da0a580a6f 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_member.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_concept_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_free.cpp
index 80b857747ca..f6d48165356 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_free.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_concept_not_applicable_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_member.cpp
index 9e6691030b8..5252cb77447 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_member.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_concept_not_applicable_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_static.cpp
index 304acf95bdf..7da83a988fb 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_concept_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_unsupported.cpp
index d6154dc4e3b..939b450be73 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_concept_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_static.cpp
index 845e800d64c..577363a0eea 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_static.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_concept_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_unsupported.cpp
index 2b68ec48e3f..2bcdc6c7606 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_concept_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_concept_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_free.cpp
index 1d1bfe3cbda..f0bda074d5a 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_free.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_member.cpp
index 0bb144c24a6..0eeb0aa45c5 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_member.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_free.cpp
index ce377e825e3..f68576e2f1c 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_free.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_not_applicable_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_member.cpp
index 2e4479ee6a7..1c7aa953aeb 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_member.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_not_applicable_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_static.cpp
index 19fe61e0c12..ba7b5a80ccc 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_static.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_not_applicable_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_unsupported.cpp
index b86790f8269..25d71e35d48 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_not_applicable_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_not_applicable_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_static.cpp
index 27f802e4c52..f92c0b56c8a 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_static.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/can_require_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/can_require_unsupported.cpp
index 9c06f0dc905..4cf2756d40b 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/can_require_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/can_require_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp14/can_require_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_free_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_free_prefer.cpp
index 5c49b9d56bb..fce83ed6b9f 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/prefer_free_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_free_prefer.cpp
@@ -2,7 +2,7 @@
// cpp14/prefer_free_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_free_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_free_require.cpp
index 9244a030554..349aebeb515 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/prefer_free_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_free_require.cpp
@@ -2,7 +2,7 @@
// cpp14/prefer_free_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_member_prefer.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_member_prefer.cpp
index 0b0b03055d5..56d29efd34c 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/prefer_member_prefer.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_member_prefer.cpp
@@ -2,7 +2,7 @@
// cpp14/prefer_member_prefer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_member_require.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_member_require.cpp
index cdcad780c91..7b88df406e8 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/prefer_member_require.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_member_require.cpp
@@ -2,7 +2,7 @@
// cpp14/prefer_member_require.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_static.cpp
index 874f64673d6..8fd537ae74b 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/prefer_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_static.cpp
@@ -2,7 +2,7 @@
// cpp14/prefer_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/prefer_unsupported.cpp b/3rdparty/asio/src/tests/properties/cpp14/prefer_unsupported.cpp
index 34f7e0eb330..50b8da0f9d3 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/prefer_unsupported.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/prefer_unsupported.cpp
@@ -2,7 +2,7 @@
// cpp14/prefer_unsupported.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/query_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/query_free.cpp
index 128e0d184c3..24be8dbe945 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/query_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/query_free.cpp
@@ -2,7 +2,7 @@
// cpp14/query_free.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/query_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/query_member.cpp
index 8c61f5405d9..fab0bed9d03 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/query_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/query_member.cpp
@@ -2,7 +2,7 @@
// cpp14/query_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/query_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/query_static.cpp
index c277fffaa54..d13ad85c3c6 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/query_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/query_static.cpp
@@ -2,7 +2,7 @@
// cpp14/query_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_concept_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_concept_free.cpp
index 43ecc9c2328..d7323db95ba 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/require_concept_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_concept_free.cpp
@@ -2,7 +2,7 @@
// cpp14/require_concept_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_concept_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_concept_member.cpp
index 99c43d336ed..e21dda3f6e4 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/require_concept_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_concept_member.cpp
@@ -2,7 +2,7 @@
// cpp14/require_concept_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_concept_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_concept_static.cpp
index 1cb7c35d68c..523ed758061 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/require_concept_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_concept_static.cpp
@@ -2,7 +2,7 @@
// cpp14/require_concept_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_free.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_free.cpp
index a139175f032..32893ff26ee 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/require_free.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_free.cpp
@@ -2,7 +2,7 @@
// cpp14/require_free.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_member.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_member.cpp
index 80bde893291..f2e58aa2f76 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/require_member.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_member.cpp
@@ -2,7 +2,7 @@
// cpp14/require_member.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/properties/cpp14/require_static.cpp b/3rdparty/asio/src/tests/properties/cpp14/require_static.cpp
index 86403d5c6d6..acdd7fbf499 100644
--- a/3rdparty/asio/src/tests/properties/cpp14/require_static.cpp
+++ b/3rdparty/asio/src/tests/properties/cpp14/require_static.cpp
@@ -2,7 +2,7 @@
// cpp14/require_static.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/any_completion_executor.cpp b/3rdparty/asio/src/tests/unit/any_completion_executor.cpp
new file mode 100644
index 00000000000..5d1d5b1e271
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/any_completion_executor.cpp
@@ -0,0 +1,463 @@
+//
+// any_completion_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/any_completion_executor.hpp"
+
+#include <cstring>
+#include <functional>
+#include "asio/system_executor.hpp"
+#include "asio/thread_pool.hpp"
+#include "unit_test.hpp"
+
+using namespace asio;
+namespace bindns = std;
+
+static bool next_nothrow_new_fails = false;
+
+void* operator new(std::size_t n,
+ const std::nothrow_t&) noexcept
+{
+ if (next_nothrow_new_fails)
+ {
+ next_nothrow_new_fails = false;
+ return 0;
+ }
+ return ::operator new(n);
+}
+
+struct fat_executor
+{
+ fat_executor(int id)
+ : id_(id)
+ {
+ std::memset(data_, 0, sizeof(data_));
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ friend bool operator==(const fat_executor& a,
+ const fat_executor& b) noexcept
+ {
+ return a.id_ == b.id_;
+ }
+
+ friend bool operator!=(const fat_executor& a,
+ const fat_executor& b) noexcept
+ {
+ return a.id_ != b.id_;
+ }
+
+ int id_;
+ unsigned char data_[1024];
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<fat_executor, F>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<fat_executor>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void any_completion_executor_construction_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_completion_executor ex1;
+
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_completion_executor ex2(null_ptr);
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+ ASIO_CHECK(ex2 == null_ptr);
+ ASIO_CHECK(ex2 == ex1);
+
+ asio::any_completion_executor ex3(pool.executor());
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+ ASIO_CHECK(ex3 != null_ptr);
+ ASIO_CHECK(ex3 != ex1);
+
+ asio::any_completion_executor ex4(ex1);
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == null_ptr);
+ ASIO_CHECK(ex4 == ex1);
+
+ asio::any_completion_executor ex5(ex3);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 == ex3);
+
+ asio::any_completion_executor ex6 = fat_executor(1);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+
+ asio::any_completion_executor ex7 = fat_executor(1);
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex6);
+
+ asio::any_completion_executor ex8 = fat_executor(2);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex8 != null_ptr);
+ ASIO_CHECK(ex8 != ex1);
+ ASIO_CHECK(ex8 != ex6);
+ ASIO_CHECK(ex8 != ex7);
+
+ asio::any_completion_executor ex9(ex6);
+
+ ASIO_CHECK(ex9.target<void>() != 0);
+ ASIO_CHECK(ex9 != null_ptr);
+ ASIO_CHECK(ex9 != ex1);
+ ASIO_CHECK(ex9 == ex6);
+ ASIO_CHECK(ex9 == ex7);
+ ASIO_CHECK(ex9 != ex8);
+
+ asio::any_completion_executor ex10(std::move(ex1));
+
+ ASIO_CHECK(ex10.target<void>() == 0);
+ ASIO_CHECK(ex10 == null_ptr);
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_completion_executor ex11(std::move(ex3));
+
+ ASIO_CHECK(ex11.target<void>() != 0);
+ ASIO_CHECK(ex11 != null_ptr);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex3 == null_ptr);
+ ASIO_CHECK(ex11 == ex5);
+
+ asio::any_completion_executor ex12(std::move(ex7));
+
+ ASIO_CHECK(ex12.target<void>() != 0);
+ ASIO_CHECK(ex12 != null_ptr);
+ ASIO_CHECK(ex7.target<void>() == 0);
+ ASIO_CHECK(ex7 == null_ptr);
+ ASIO_CHECK(ex12 == ex6);
+ ASIO_CHECK(ex12 != ex8);
+}
+
+void any_completion_executor_nothrow_construction_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_completion_executor ex1;
+
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_completion_executor ex2(null_ptr);
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+ ASIO_CHECK(ex2 == null_ptr);
+ ASIO_CHECK(ex2 == ex1);
+
+ asio::any_completion_executor ex3(std::nothrow, pool.executor());
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+ ASIO_CHECK(ex3 != null_ptr);
+ ASIO_CHECK(ex3 != ex1);
+
+ asio::any_completion_executor ex4(std::nothrow, ex1);
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == null_ptr);
+ ASIO_CHECK(ex4 == ex1);
+
+ asio::any_completion_executor ex5(std::nothrow, ex3);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 == ex3);
+
+ asio::any_completion_executor ex6(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+
+ asio::any_completion_executor ex7(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex6);
+
+ asio::any_completion_executor ex8(std::nothrow, fat_executor(2));
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex8 != null_ptr);
+ ASIO_CHECK(ex8 != ex1);
+ ASIO_CHECK(ex8 != ex6);
+ ASIO_CHECK(ex8 != ex7);
+
+ asio::any_completion_executor ex9(std::nothrow, ex6);
+
+ ASIO_CHECK(ex9.target<void>() != 0);
+ ASIO_CHECK(ex9 != null_ptr);
+ ASIO_CHECK(ex9 != ex1);
+ ASIO_CHECK(ex9 == ex6);
+ ASIO_CHECK(ex9 == ex7);
+ ASIO_CHECK(ex9 != ex8);
+
+ asio::any_completion_executor ex10(std::nothrow, std::move(ex1));
+
+ ASIO_CHECK(ex10.target<void>() == 0);
+ ASIO_CHECK(ex10 == null_ptr);
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_completion_executor ex11(std::nothrow, std::move(ex3));
+
+ ASIO_CHECK(ex11.target<void>() != 0);
+ ASIO_CHECK(ex11 != null_ptr);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex3 == null_ptr);
+ ASIO_CHECK(ex11 == ex5);
+
+ asio::any_completion_executor ex12(std::nothrow, std::move(ex7));
+
+ ASIO_CHECK(ex12.target<void>() != 0);
+ ASIO_CHECK(ex12 != null_ptr);
+ ASIO_CHECK(ex7.target<void>() == 0);
+ ASIO_CHECK(ex7 == null_ptr);
+ ASIO_CHECK(ex12 == ex6);
+ ASIO_CHECK(ex12 != ex8);
+
+ next_nothrow_new_fails = true;
+ asio::any_completion_executor ex13(std::nothrow, fat_executor(3));
+
+ ASIO_CHECK(ex13.target<void>() == 0);
+ ASIO_CHECK(ex13 == null_ptr);
+ ASIO_CHECK(ex13 == ex1);
+}
+
+void any_completion_executor_assignment_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_completion_executor ex1;
+
+ asio::any_completion_executor ex2;
+ ex2 = null_ptr;
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+
+ asio::any_completion_executor ex3;
+ ex3 = pool.executor();
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+
+ asio::any_completion_executor ex4;
+ ex4 = ex1;
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == ex1);
+
+ ex4 = ex3;
+
+ ASIO_CHECK(ex4.target<void>() != 0);
+ ASIO_CHECK(ex4 == ex3);
+
+ asio::any_completion_executor ex5;
+ ex5 = fat_executor(1);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 != ex1);
+
+ asio::any_completion_executor ex6;
+ ex6 = fat_executor(1);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+ ASIO_CHECK(ex6 == ex5);
+
+ ex6 = fat_executor(2);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+ ASIO_CHECK(ex6 != ex5);
+
+ asio::any_completion_executor ex7;
+ ex7 = ex5;
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex5);
+ ASIO_CHECK(ex7 != ex6);
+
+ asio::any_completion_executor ex8;
+ ex8 = std::move(ex1);
+
+ ASIO_CHECK(ex8.target<void>() == 0);
+ ASIO_CHECK(ex1.target<void>() == 0);
+
+ ex8 = std::move(ex3);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex8 == ex4);
+
+ ex8 = std::move(ex5);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex5.target<void>() == 0);
+ ASIO_CHECK(ex8 == ex7);
+}
+
+void any_completion_executor_swap_test()
+{
+ thread_pool pool1(1);
+ thread_pool pool2(1);
+
+ asio::any_completion_executor ex1(pool1.executor());
+ asio::any_completion_executor ex2(pool2.executor());
+
+ asio::any_completion_executor ex3(ex1);
+ asio::any_completion_executor ex4(ex2);
+
+ ASIO_CHECK(ex3 == ex1);
+ ASIO_CHECK(ex4 == ex2);
+
+ ex3.swap(ex4);
+
+ ASIO_CHECK(ex3 == ex2);
+ ASIO_CHECK(ex4 == ex1);
+
+ execution::swap(ex3, ex4);
+
+ ASIO_CHECK(ex3 == ex1);
+ ASIO_CHECK(ex4 == ex2);
+}
+
+void any_completion_executor_query_test()
+{
+ thread_pool pool(1);
+ asio::any_completion_executor ex(pool.executor());
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::blocking)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::blocking.possibly)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::outstanding_work)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::outstanding_work.untracked)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::relationship)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::relationship.fork)
+ == asio::execution::relationship.fork);
+}
+
+void any_completion_executor_execute_test()
+{
+ int count = 0;
+ thread_pool pool(1);
+ asio::any_completion_executor ex(pool.executor());
+
+ ex.execute(bindns::bind(increment, &count));
+
+ asio::prefer(ex, asio::execution::blocking.possibly).execute(
+ bindns::bind(increment, &count));
+
+ asio::prefer(ex,
+ asio::execution::blocking.possibly,
+ asio::execution::outstanding_work.tracked
+ ).execute(bindns::bind(increment, &count));
+
+ asio::prefer(ex,
+ asio::execution::blocking.possibly,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
+
+ asio::prefer(ex,
+ asio::execution::blocking.possibly,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
+
+ pool.wait();
+
+ ASIO_CHECK(count == 5);
+}
+
+ASIO_TEST_SUITE
+(
+ "any_completion_executor",
+ ASIO_TEST_CASE(any_completion_executor_construction_test)
+ ASIO_TEST_CASE(any_completion_executor_nothrow_construction_test)
+ ASIO_TEST_CASE(any_completion_executor_assignment_test)
+ ASIO_TEST_CASE(any_completion_executor_swap_test)
+ ASIO_TEST_CASE(any_completion_executor_query_test)
+ ASIO_TEST_CASE(any_completion_executor_execute_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/any_completion_handler.cpp b/3rdparty/asio/src/tests/unit/any_completion_handler.cpp
new file mode 100644
index 00000000000..887402de8d3
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/any_completion_handler.cpp
@@ -0,0 +1,260 @@
+//
+// any_completion_handler.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/any_completion_handler.hpp"
+
+#include "unit_test.hpp"
+
+#include <functional>
+#include "asio/bind_allocator.hpp"
+#include "asio/bind_cancellation_slot.hpp"
+#include "asio/bind_executor.hpp"
+#include "asio/bind_immediate_executor.hpp"
+#include "asio/error.hpp"
+#include "asio/thread_pool.hpp"
+
+namespace bindns = std;
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void any_completion_handler_construction_test()
+{
+ int count = 0;
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_completion_handler<void()> h1;
+
+ ASIO_CHECK(!h1);
+ ASIO_CHECK(h1 == null_ptr);
+
+ asio::any_completion_handler<void()> h2(null_ptr);
+
+ ASIO_CHECK(!h2);
+ ASIO_CHECK(h2 == null_ptr);
+
+ asio::any_completion_handler<void()> h3(
+ bindns::bind(&increment, &count));
+
+ ASIO_CHECK(!!h3);
+ ASIO_CHECK(h3 != null_ptr);
+
+ asio::any_completion_handler<void()> h4(std::move(h1));
+
+ ASIO_CHECK(!h4);
+ ASIO_CHECK(h4 == null_ptr);
+ ASIO_CHECK(!h1);
+ ASIO_CHECK(h1 == null_ptr);
+
+ asio::any_completion_handler<void()> h5(std::move(h3));
+
+ ASIO_CHECK(!!h5);
+ ASIO_CHECK(h5 != null_ptr);
+ ASIO_CHECK(!h3);
+ ASIO_CHECK(h3 == null_ptr);
+
+ asio::any_completion_handler<void()> h6(std::move(h5));
+
+ ASIO_CHECK(!!h6);
+ ASIO_CHECK(h6 != null_ptr);
+ ASIO_CHECK(!h5);
+ ASIO_CHECK(h5 == null_ptr);
+}
+
+void any_completion_handler_assignment_test()
+{
+ int count = 0;
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_completion_handler<void()> h1;
+
+ asio::any_completion_handler<void()> h2;
+ h2 = null_ptr;
+
+ ASIO_CHECK(!h2);
+
+ asio::any_completion_handler<void()> h3;
+ h3 = bindns::bind(&increment, &count);
+
+ ASIO_CHECK(!!h3);
+
+ asio::any_completion_handler<void()> h4;
+ h4 = std::move(h1);
+
+ ASIO_CHECK(!h4);
+ ASIO_CHECK(!h1);
+
+ h4 = std::move(h3);
+
+ ASIO_CHECK(!!h4);
+ ASIO_CHECK(!h3);
+}
+
+template <typename T>
+class handler_allocator
+{
+public:
+ using value_type = T;
+
+ explicit handler_allocator(int* count)
+ : count_(count)
+ {
+ }
+
+ template <typename U>
+ handler_allocator(const handler_allocator<U>& other) noexcept
+ : count_(other.count_)
+ {
+ }
+
+ bool operator==(const handler_allocator& other) const noexcept
+ {
+ return &count_ == &other.count_;
+ }
+
+ bool operator!=(const handler_allocator& other) const noexcept
+ {
+ return &count_ != &other.count_;
+ }
+
+ T* allocate(std::size_t n) const
+ {
+ ++(*count_);
+ return static_cast<T*>(::operator new(sizeof(T) * n));
+ }
+
+ void deallocate(T* p, std::size_t /*n*/) const
+ {
+ ::operator delete(p);
+ }
+
+private:
+ template <typename> friend class handler_allocator;
+
+ int* count_;
+};
+
+class cancel_handler
+{
+public:
+ explicit cancel_handler(int* count)
+ : count_(count)
+ {
+ }
+
+ void operator()(asio::cancellation_type_t)
+ {
+ ++(*count_);
+ }
+
+private:
+ int* count_;
+};
+
+void any_completion_handler_associator_test()
+{
+ typedef asio::any_completion_handler<void()> handler_type;
+
+ int count = 0;
+ int alloc_count = 0;
+ int cancel_count = 0;
+ asio::thread_pool pool(1);
+ asio::cancellation_signal sig;
+
+ asio::any_completion_handler<void()> h1(
+ asio::bind_allocator(handler_allocator<char>(&alloc_count),
+ asio::bind_cancellation_slot(sig.slot(),
+ asio::bind_executor(pool.get_executor(),
+ asio::bind_immediate_executor(asio::system_executor(),
+ bindns::bind(&increment, &count))))));
+
+ ASIO_CHECK(alloc_count == 1);
+
+ ASIO_REBIND_ALLOC(asio::associated_allocator<handler_type>::type,
+ char) alloc1(asio::get_associated_allocator(h1));
+ alloc1.deallocate(alloc1.allocate(1), 1);
+
+ ASIO_CHECK(alloc_count == 2);
+
+ asio::associated_cancellation_slot<handler_type>::type slot1
+ = asio::get_associated_cancellation_slot(h1);
+
+ ASIO_CHECK(slot1.is_connected());
+
+ slot1.emplace<cancel_handler>(&cancel_count);
+
+ ASIO_CHECK(cancel_count == 0);
+
+ sig.emit(asio::cancellation_type::terminal);
+
+ ASIO_CHECK(cancel_count == 1);
+
+ asio::associated_executor<handler_type>::type ex1
+ = asio::get_associated_executor(h1);
+
+ ASIO_CHECK(ex1 == pool.get_executor());
+
+ asio::associated_immediate_executor<
+ handler_type, asio::thread_pool::executor_type>::type ex2
+ = asio::get_associated_immediate_executor(h1, pool.get_executor());
+
+ ASIO_CHECK(ex2 == asio::system_executor());
+}
+
+void increment_with_error(asio::error_code ec,
+ asio::error_code* out_ec, int* count)
+{
+ *out_ec = ec;
+ ++(*count);
+}
+
+void any_completion_handler_invocation_test()
+{
+ int count = 0;
+ asio::error_code ec;
+
+ asio::any_completion_handler<void()> h1(
+ bindns::bind(&increment, &count));
+
+ ASIO_CHECK(count == 0);
+
+ std::move(h1)();
+
+ ASIO_CHECK(count == 1);
+
+ asio::any_completion_handler<void(asio::error_code)> h2(
+ bindns::bind(&increment_with_error,
+ bindns::placeholders::_1, &ec, &count));
+
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(count == 1);
+
+ std::move(h2)(asio::error::eof);
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 2);
+}
+
+ASIO_TEST_SUITE
+(
+ "any_completion_handler",
+ ASIO_TEST_CASE(any_completion_handler_construction_test)
+ ASIO_TEST_CASE(any_completion_handler_assignment_test)
+ ASIO_TEST_CASE(any_completion_handler_associator_test)
+ ASIO_TEST_CASE(any_completion_handler_invocation_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/any_io_executor.cpp b/3rdparty/asio/src/tests/unit/any_io_executor.cpp
new file mode 100644
index 00000000000..e0a32ba3838
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/any_io_executor.cpp
@@ -0,0 +1,515 @@
+//
+// any_io_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/any_io_executor.hpp"
+
+#include <cstring>
+#include <functional>
+#include "asio/system_executor.hpp"
+#include "asio/thread_pool.hpp"
+#include "unit_test.hpp"
+
+using namespace asio;
+namespace bindns = std;
+
+static bool next_nothrow_new_fails = false;
+
+void* operator new(std::size_t n,
+ const std::nothrow_t&) noexcept
+{
+ if (next_nothrow_new_fails)
+ {
+ next_nothrow_new_fails = false;
+ return 0;
+ }
+ return ::operator new(n);
+}
+
+struct fat_executor
+{
+ fat_executor(int id)
+ : id_(id)
+ {
+ std::memset(data_, 0, sizeof(data_));
+ }
+
+ template <typename F>
+ void execute(const F&) const
+ {
+ }
+
+ execution_context& query(execution::context_t) const noexcept
+ {
+ return asio::query(system_executor(), execution::context);
+ }
+
+ constexpr static execution::blocking_t::never_t query(
+ execution::blocking_t) noexcept
+ {
+ return execution::blocking.never;
+ }
+
+ friend bool operator==(const fat_executor& a,
+ const fat_executor& b) noexcept
+ {
+ return a.id_ == b.id_;
+ }
+
+ friend bool operator!=(const fat_executor& a,
+ const fat_executor& b) noexcept
+ {
+ return a.id_ != b.id_;
+ }
+
+ int id_;
+ unsigned char data_[1024];
+};
+
+namespace asio {
+namespace traits {
+
+#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+template <typename F>
+struct execute_member<fat_executor, F>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
+ typedef void result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+template <>
+struct query_member<fat_executor, execution::context_t>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef execution_context& result_type;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+template <typename Property>
+struct query_static_constexpr_member<fat_executor, Property,
+ typename asio::enable_if<
+ asio::is_convertible<
+ Property,
+ asio::execution::blocking_t
+ >::value
+ >::type
+ >
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+ typedef execution::blocking_t::never_t result_type;
+
+ static constexpr result_type value() noexcept
+ {
+ return result_type();
+ }
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
+
+#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+template <>
+struct equality_comparable<fat_executor>
+{
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
+};
+
+#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
+
+} // namespace traits
+} // namespace asio
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void any_io_executor_construction_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_io_executor ex1;
+
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_io_executor ex2(null_ptr);
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+ ASIO_CHECK(ex2 == null_ptr);
+ ASIO_CHECK(ex2 == ex1);
+
+ asio::any_io_executor ex3(pool.executor());
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+ ASIO_CHECK(ex3 != null_ptr);
+ ASIO_CHECK(ex3 != ex1);
+
+ asio::any_io_executor ex4(ex1);
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == null_ptr);
+ ASIO_CHECK(ex4 == ex1);
+
+ asio::any_io_executor ex5(ex3);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 == ex3);
+
+ asio::any_io_executor ex6 = fat_executor(1);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+
+ asio::any_io_executor ex7 = fat_executor(1);
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex6);
+
+ asio::any_io_executor ex8 = fat_executor(2);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex8 != null_ptr);
+ ASIO_CHECK(ex8 != ex1);
+ ASIO_CHECK(ex8 != ex6);
+ ASIO_CHECK(ex8 != ex7);
+
+ asio::any_io_executor ex9(ex6);
+
+ ASIO_CHECK(ex9.target<void>() != 0);
+ ASIO_CHECK(ex9 != null_ptr);
+ ASIO_CHECK(ex9 != ex1);
+ ASIO_CHECK(ex9 == ex6);
+ ASIO_CHECK(ex9 == ex7);
+ ASIO_CHECK(ex9 != ex8);
+
+ asio::any_io_executor ex10(std::move(ex1));
+
+ ASIO_CHECK(ex10.target<void>() == 0);
+ ASIO_CHECK(ex10 == null_ptr);
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_io_executor ex11(std::move(ex3));
+
+ ASIO_CHECK(ex11.target<void>() != 0);
+ ASIO_CHECK(ex11 != null_ptr);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex3 == null_ptr);
+ ASIO_CHECK(ex11 == ex5);
+
+ asio::any_io_executor ex12(std::move(ex7));
+
+ ASIO_CHECK(ex12.target<void>() != 0);
+ ASIO_CHECK(ex12 != null_ptr);
+ ASIO_CHECK(ex7.target<void>() == 0);
+ ASIO_CHECK(ex7 == null_ptr);
+ ASIO_CHECK(ex12 == ex6);
+ ASIO_CHECK(ex12 != ex8);
+}
+
+void any_io_executor_nothrow_construction_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_io_executor ex1;
+
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_io_executor ex2(null_ptr);
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+ ASIO_CHECK(ex2 == null_ptr);
+ ASIO_CHECK(ex2 == ex1);
+
+ asio::any_io_executor ex3(std::nothrow, pool.executor());
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+ ASIO_CHECK(ex3 != null_ptr);
+ ASIO_CHECK(ex3 != ex1);
+
+ asio::any_io_executor ex4(std::nothrow, ex1);
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == null_ptr);
+ ASIO_CHECK(ex4 == ex1);
+
+ asio::any_io_executor ex5(std::nothrow, ex3);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 == ex3);
+
+ asio::any_io_executor ex6(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+
+ asio::any_io_executor ex7(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex6);
+
+ asio::any_io_executor ex8(std::nothrow, fat_executor(2));
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex8 != null_ptr);
+ ASIO_CHECK(ex8 != ex1);
+ ASIO_CHECK(ex8 != ex6);
+ ASIO_CHECK(ex8 != ex7);
+
+ asio::any_io_executor ex9(std::nothrow, ex6);
+
+ ASIO_CHECK(ex9.target<void>() != 0);
+ ASIO_CHECK(ex9 != null_ptr);
+ ASIO_CHECK(ex9 != ex1);
+ ASIO_CHECK(ex9 == ex6);
+ ASIO_CHECK(ex9 == ex7);
+ ASIO_CHECK(ex9 != ex8);
+
+ asio::any_io_executor ex10(std::nothrow, std::move(ex1));
+
+ ASIO_CHECK(ex10.target<void>() == 0);
+ ASIO_CHECK(ex10 == null_ptr);
+ ASIO_CHECK(ex1.target<void>() == 0);
+ ASIO_CHECK(ex1 == null_ptr);
+
+ asio::any_io_executor ex11(std::nothrow, std::move(ex3));
+
+ ASIO_CHECK(ex11.target<void>() != 0);
+ ASIO_CHECK(ex11 != null_ptr);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex3 == null_ptr);
+ ASIO_CHECK(ex11 == ex5);
+
+ asio::any_io_executor ex12(std::nothrow, std::move(ex7));
+
+ ASIO_CHECK(ex12.target<void>() != 0);
+ ASIO_CHECK(ex12 != null_ptr);
+ ASIO_CHECK(ex7.target<void>() == 0);
+ ASIO_CHECK(ex7 == null_ptr);
+ ASIO_CHECK(ex12 == ex6);
+ ASIO_CHECK(ex12 != ex8);
+
+ next_nothrow_new_fails = true;
+ asio::any_io_executor ex13(std::nothrow, fat_executor(3));
+
+ ASIO_CHECK(ex13.target<void>() == 0);
+ ASIO_CHECK(ex13 == null_ptr);
+ ASIO_CHECK(ex13 == ex1);
+}
+
+void any_io_executor_assignment_test()
+{
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ asio::any_io_executor ex1;
+
+ asio::any_io_executor ex2;
+ ex2 = null_ptr;
+
+ ASIO_CHECK(ex2.target<void>() == 0);
+
+ asio::any_io_executor ex3;
+ ex3 = pool.executor();
+
+ ASIO_CHECK(ex3.target<void>() != 0);
+
+ asio::any_io_executor ex4;
+ ex4 = ex1;
+
+ ASIO_CHECK(ex4.target<void>() == 0);
+ ASIO_CHECK(ex4 == ex1);
+
+ ex4 = ex3;
+
+ ASIO_CHECK(ex4.target<void>() != 0);
+ ASIO_CHECK(ex4 == ex3);
+
+ asio::any_io_executor ex5;
+ ex5 = fat_executor(1);
+
+ ASIO_CHECK(ex5.target<void>() != 0);
+ ASIO_CHECK(ex5 != null_ptr);
+ ASIO_CHECK(ex5 != ex1);
+
+ asio::any_io_executor ex6;
+ ex6 = fat_executor(1);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+ ASIO_CHECK(ex6 == ex5);
+
+ ex6 = fat_executor(2);
+
+ ASIO_CHECK(ex6.target<void>() != 0);
+ ASIO_CHECK(ex6 != null_ptr);
+ ASIO_CHECK(ex6 != ex1);
+ ASIO_CHECK(ex6 != ex5);
+
+ asio::any_io_executor ex7;
+ ex7 = ex5;
+
+ ASIO_CHECK(ex7.target<void>() != 0);
+ ASIO_CHECK(ex7 != null_ptr);
+ ASIO_CHECK(ex7 != ex1);
+ ASIO_CHECK(ex7 == ex5);
+ ASIO_CHECK(ex7 != ex6);
+
+ asio::any_io_executor ex8;
+ ex8 = std::move(ex1);
+
+ ASIO_CHECK(ex8.target<void>() == 0);
+ ASIO_CHECK(ex1.target<void>() == 0);
+
+ ex8 = std::move(ex3);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex3.target<void>() == 0);
+ ASIO_CHECK(ex8 == ex4);
+
+ ex8 = std::move(ex5);
+
+ ASIO_CHECK(ex8.target<void>() != 0);
+ ASIO_CHECK(ex5.target<void>() == 0);
+ ASIO_CHECK(ex8 == ex7);
+}
+
+void any_io_executor_swap_test()
+{
+ thread_pool pool1(1);
+ thread_pool pool2(1);
+
+ asio::any_io_executor ex1(pool1.executor());
+ asio::any_io_executor ex2(pool2.executor());
+
+ asio::any_io_executor ex3(ex1);
+ asio::any_io_executor ex4(ex2);
+
+ ASIO_CHECK(ex3 == ex1);
+ ASIO_CHECK(ex4 == ex2);
+
+ ex3.swap(ex4);
+
+ ASIO_CHECK(ex3 == ex2);
+ ASIO_CHECK(ex4 == ex1);
+
+ execution::swap(ex3, ex4);
+
+ ASIO_CHECK(ex3 == ex1);
+ ASIO_CHECK(ex4 == ex2);
+}
+
+void any_io_executor_query_test()
+{
+ thread_pool pool(1);
+ asio::any_io_executor ex(pool.executor());
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::blocking)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::blocking.possibly)
+ == asio::execution::blocking.possibly);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::outstanding_work)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::outstanding_work.untracked)
+ == asio::execution::outstanding_work.untracked);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::relationship)
+ == asio::execution::relationship.fork);
+
+ ASIO_CHECK(
+ asio::query(ex, asio::execution::relationship.fork)
+ == asio::execution::relationship.fork);
+}
+
+void any_io_executor_execute_test()
+{
+ int count = 0;
+ thread_pool pool(1);
+ asio::any_io_executor ex(pool.executor());
+
+ ex.execute(bindns::bind(increment, &count));
+
+ asio::prefer(ex, asio::execution::blocking.possibly).execute(
+ bindns::bind(increment, &count));
+
+ asio::require(ex, asio::execution::blocking.never).execute(
+ bindns::bind(increment, &count));
+
+ asio::require(
+ asio::prefer(ex, asio::execution::outstanding_work.tracked),
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(
+ asio::prefer(ex,
+ asio::execution::outstanding_work.untracked),
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(
+ asio::prefer(ex,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
+
+ pool.wait();
+
+ ASIO_CHECK(count == 6);
+}
+
+ASIO_TEST_SUITE
+(
+ "any_io_executor",
+ ASIO_TEST_CASE(any_io_executor_construction_test)
+ ASIO_TEST_CASE(any_io_executor_nothrow_construction_test)
+ ASIO_TEST_CASE(any_io_executor_assignment_test)
+ ASIO_TEST_CASE(any_io_executor_swap_test)
+ ASIO_TEST_CASE(any_io_executor_query_test)
+ ASIO_TEST_CASE(any_io_executor_execute_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/append.cpp b/3rdparty/asio/src/tests/unit/append.cpp
new file mode 100644
index 00000000000..9aa00e3bfa4
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/append.cpp
@@ -0,0 +1,58 @@
+//
+// append.cpp
+// ~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/append.hpp"
+
+#include "asio/bind_executor.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "asio/system_timer.hpp"
+#include "unit_test.hpp"
+
+void append_test()
+{
+ asio::io_context io1;
+ asio::io_context io2;
+ asio::system_timer timer1(io1);
+ int count = 0;
+
+ timer1.expires_after(asio::chrono::seconds(0));
+ timer1.async_wait(
+ asio::append(
+ asio::bind_executor(io2.get_executor(),
+ [&count](asio::error_code, int a, int b)
+ {
+ ++count;
+ ASIO_CHECK(a == 123);
+ ASIO_CHECK(b == 321);
+ }), 123, 321));
+
+ ASIO_CHECK(count == 0);
+
+ io1.run();
+
+ ASIO_CHECK(count == 0);
+
+ io2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+ASIO_TEST_SUITE
+(
+ "append",
+ ASIO_TEST_CASE(append_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/archetypes/async_ops.hpp b/3rdparty/asio/src/tests/unit/archetypes/async_ops.hpp
index 80364af575b..3c2b1308bd8 100644
--- a/3rdparty/asio/src/tests/unit/archetypes/async_ops.hpp
+++ b/3rdparty/asio/src/tests/unit/archetypes/async_ops.hpp
@@ -1,8 +1,8 @@
//
-// async_ops.hpp
-// ~~~~~~~~~~~~~
+// archetypes/async_ops.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -11,30 +11,22 @@
#ifndef ARCHETYPES_ASYNC_OPS_HPP
#define ARCHETYPES_ASYNC_OPS_HPP
-#include <asio/associated_allocator.hpp>
-#include <asio/associated_executor.hpp>
-#include <asio/async_result.hpp>
-#include <asio/error.hpp>
-
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
+#include <functional>
+#include "asio/associated_allocator.hpp"
+#include "asio/associated_executor.hpp"
+#include "asio/async_result.hpp"
+#include "asio/error.hpp"
namespace archetypes {
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void())
-async_op_0(ASIO_MOVE_ARG(CompletionToken) token)
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void()>::return_type
+async_op_0(CompletionToken&& token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void()>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -46,16 +38,17 @@ async_op_0(ASIO_MOVE_ARG(CompletionToken) token)
typename asio::associated_executor<handler_type>::type ex
= asio::get_associated_executor(completion.completion_handler);
- ex.post(ASIO_MOVE_CAST(handler_type)(completion.completion_handler), a);
+ ex.post(static_cast<handler_type&&>(completion.completion_handler), a);
return completion.result.get();
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(asio::error_code))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(asio::error_code)>::return_type
async_op_ec_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(asio::error_code)>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -71,14 +64,14 @@ async_op_ec_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code()), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(asio::error::operation_aborted)), a);
}
@@ -86,10 +79,11 @@ async_op_ec_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(std::exception_ptr))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(std::exception_ptr)>::return_type
async_op_ex_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(std::exception_ptr)>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -105,14 +99,14 @@ async_op_ex_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::exception_ptr()), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::make_exception_ptr(std::runtime_error("blah"))), a);
}
@@ -120,10 +114,11 @@ async_op_ex_0(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(int))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(int)>::return_type
async_op_1(ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(int)>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -137,18 +132,18 @@ async_op_1(ASIO_MOVE_ARG(CompletionToken) token)
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
42), a);
return completion.result.get();
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken,
- void(asio::error_code, int))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(asio::error_code, int)>::return_type
async_op_ec_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(asio::error_code, int)>::completion_handler_type
handler_type;
@@ -165,14 +160,14 @@ async_op_ec_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(), 42), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(asio::error::operation_aborted),
0), a);
}
@@ -181,10 +176,11 @@ async_op_ec_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(std::exception_ptr, int))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(std::exception_ptr, int)>::return_type
async_op_ex_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(std::exception_ptr, int)>::completion_handler_type
handler_type;
@@ -201,14 +197,14 @@ async_op_ex_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::exception_ptr(), 42), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::make_exception_ptr(std::runtime_error("blah")), 0), a);
}
@@ -216,10 +212,11 @@ async_op_ex_1(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(int, double))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(int, double)>::return_type
async_op_2(ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(int, double)>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -233,18 +230,18 @@ async_op_2(ASIO_MOVE_ARG(CompletionToken) token)
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
42, 2.0), a);
return completion.result.get();
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken,
- void(asio::error_code, int, double))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(asio::error_code, int, double)>::return_type
async_op_ec_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(asio::error_code, int, double)>::completion_handler_type
handler_type;
@@ -261,14 +258,14 @@ async_op_ec_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(), 42, 2.0), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(asio::error::operation_aborted),
0, 0.0), a);
}
@@ -277,11 +274,11 @@ async_op_ec_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken,
- void(std::exception_ptr, int, double))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(std::exception_ptr, int, double)>::return_type
async_op_ex_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(std::exception_ptr, int, double)>::completion_handler_type
handler_type;
@@ -298,14 +295,14 @@ async_op_ex_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::exception_ptr(), 42, 2.0), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::make_exception_ptr(std::runtime_error("blah")), 0, 0.0), a);
}
@@ -313,10 +310,11 @@ async_op_ex_2(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken, void(int, double, char))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(int, double, char)>::return_type
async_op_3(ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(int, double, char)>::completion_handler_type handler_type;
asio::async_completion<CompletionToken,
@@ -330,18 +328,18 @@ async_op_3(ASIO_MOVE_ARG(CompletionToken) token)
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
42, 2.0, 'a'), a);
return completion.result.get();
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken,
- void(asio::error_code, int, double, char))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(asio::error_code, int, double, char)>::return_type
async_op_ec_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(asio::error_code, int, double, char)>::completion_handler_type
handler_type;
@@ -358,14 +356,14 @@ async_op_ec_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(), 42, 2.0, 'a'), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
asio::error_code(asio::error::operation_aborted),
0, 0.0, 'z'), a);
}
@@ -374,11 +372,11 @@ async_op_ec_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
}
template <typename CompletionToken>
-ASIO_INITFN_RESULT_TYPE(CompletionToken,
- void(std::exception_ptr, int, double, char))
+typename asio::async_result<asio::decay_t<CompletionToken>,
+ void(std::exception_ptr, int, double, char)>::return_type
async_op_ex_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
- typedef typename asio::async_completion<CompletionToken,
+ typedef typename asio::async_result<asio::decay_t<CompletionToken>,
void(std::exception_ptr, int, double, char)>::completion_handler_type
handler_type;
@@ -395,14 +393,14 @@ async_op_ex_3(bool ok, ASIO_MOVE_ARG(CompletionToken) token)
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::exception_ptr(), 42, 2.0, 'a'), a);
}
else
{
ex.post(
bindns::bind(
- ASIO_MOVE_CAST(handler_type)(completion.completion_handler),
+ static_cast<handler_type&&>(completion.completion_handler),
std::make_exception_ptr(std::runtime_error("blah")),
0, 0.0, 'z'), a);
}
diff --git a/3rdparty/asio/src/tests/unit/archetypes/async_result.hpp b/3rdparty/asio/src/tests/unit/archetypes/async_result.hpp
index 4c26a3f0c61..bfd9cf1aac2 100644
--- a/3rdparty/asio/src/tests/unit/archetypes/async_result.hpp
+++ b/3rdparty/asio/src/tests/unit/archetypes/async_result.hpp
@@ -2,7 +2,7 @@
// async_result.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -12,9 +12,14 @@
#define ARCHETYPES_ASYNC_RESULT_HPP
#include <asio/async_result.hpp>
+#include <asio/system_executor.hpp>
namespace archetypes {
+struct immediate_handler
+{
+};
+
struct lazy_handler
{
};
@@ -25,7 +30,7 @@ struct concrete_handler;
template <typename R, typename Arg1>
struct concrete_handler<R(Arg1)>
{
- concrete_handler(lazy_handler)
+ concrete_handler()
{
}
@@ -33,29 +38,53 @@ struct concrete_handler<R(Arg1)>
{
}
-#if defined(ASIO_HAS_MOVE)
concrete_handler(concrete_handler&&) {}
private:
concrete_handler(const concrete_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
template <typename R, typename Arg1, typename Arg2>
struct concrete_handler<R(Arg1, Arg2)>
{
- concrete_handler(lazy_handler)
+ concrete_handler()
{
}
- void operator()(typename asio::decay<Arg1>::type, typename asio::decay<Arg2>::type)
+ void operator()(typename asio::decay<Arg1>::type,
+ typename asio::decay<Arg2>::type)
{
}
+};
-#if defined(ASIO_HAS_MOVE)
- concrete_handler(concrete_handler&&) {}
+template <typename Signature>
+struct immediate_concrete_handler : concrete_handler<Signature>
+{
+ typedef asio::system_executor immediate_executor_type;
+
+ immediate_concrete_handler(immediate_handler)
+ {
+ }
+
+ immediate_executor_type get_immediate_executor() const noexcept
+ {
+ return immediate_executor_type();
+ }
+
+ immediate_concrete_handler(immediate_concrete_handler&&) {}
private:
- concrete_handler(const concrete_handler&);
-#endif // defined(ASIO_HAS_MOVE)
+ immediate_concrete_handler(const immediate_concrete_handler&);
+};
+
+template <typename Signature>
+struct lazy_concrete_handler : concrete_handler<Signature>
+{
+ lazy_concrete_handler(lazy_handler)
+ {
+ }
+
+ lazy_concrete_handler(lazy_concrete_handler&&) {}
+private:
+ lazy_concrete_handler(const lazy_concrete_handler&);
};
} // namespace archetypes
@@ -63,11 +92,38 @@ private:
namespace asio {
template <typename Signature>
+class async_result<archetypes::immediate_handler, Signature>
+{
+public:
+ // The concrete completion handler type.
+ typedef archetypes::immediate_concrete_handler<Signature>
+ completion_handler_type;
+
+ // The return type of the initiating function.
+ typedef void return_type;
+
+ // Construct an async_result from a given handler.
+ explicit async_result(completion_handler_type&)
+ {
+ }
+
+ // Obtain the value to be returned from the initiating function.
+ void get()
+ {
+ }
+
+private:
+ // Disallow copying and assignment.
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
+};
+
+template <typename Signature>
class async_result<archetypes::lazy_handler, Signature>
{
public:
// The concrete completion handler type.
- typedef archetypes::concrete_handler<Signature> completion_handler_type;
+ typedef archetypes::lazy_concrete_handler<Signature> completion_handler_type;
// The return type of the initiating function.
typedef int return_type;
@@ -85,8 +141,8 @@ public:
private:
// Disallow copying and assignment.
- async_result(const async_result&) ASIO_DELETED;
- async_result& operator=(const async_result&) ASIO_DELETED;
+ async_result(const async_result&) = delete;
+ async_result& operator=(const async_result&) = delete;
};
} // namespace asio
diff --git a/3rdparty/asio/src/tests/unit/archetypes/gettable_socket_option.hpp b/3rdparty/asio/src/tests/unit/archetypes/gettable_socket_option.hpp
index 17f1518f3ba..e1c2d3f0d4e 100644
--- a/3rdparty/asio/src/tests/unit/archetypes/gettable_socket_option.hpp
+++ b/3rdparty/asio/src/tests/unit/archetypes/gettable_socket_option.hpp
@@ -2,7 +2,7 @@
// gettable_socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/archetypes/io_control_command.hpp b/3rdparty/asio/src/tests/unit/archetypes/io_control_command.hpp
index 00bdd657079..45ed07cf481 100644
--- a/3rdparty/asio/src/tests/unit/archetypes/io_control_command.hpp
+++ b/3rdparty/asio/src/tests/unit/archetypes/io_control_command.hpp
@@ -2,7 +2,7 @@
// io_control_command.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/archetypes/settable_socket_option.hpp b/3rdparty/asio/src/tests/unit/archetypes/settable_socket_option.hpp
index 50b33d3ffad..7a5867ba800 100644
--- a/3rdparty/asio/src/tests/unit/archetypes/settable_socket_option.hpp
+++ b/3rdparty/asio/src/tests/unit/archetypes/settable_socket_option.hpp
@@ -2,7 +2,7 @@
// settable_socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/as_tuple.cpp b/3rdparty/asio/src/tests/unit/as_tuple.cpp
new file mode 100644
index 00000000000..a176d95bb2e
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/as_tuple.cpp
@@ -0,0 +1,122 @@
+//
+// as_tuple.cpp
+// ~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/as_tuple.hpp"
+
+#include "asio/bind_executor.hpp"
+#include "asio/deferred.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "asio/system_timer.hpp"
+#include "asio/use_future.hpp"
+#include "unit_test.hpp"
+
+void as_tuple_test()
+{
+ asio::io_context io1;
+ asio::io_context io2;
+ asio::system_timer timer1(io1);
+ int count = 0;
+
+ timer1.expires_after(asio::chrono::seconds(0));
+ timer1.async_wait(
+ asio::as_tuple(
+ asio::bind_executor(io2.get_executor(),
+ [&count](std::tuple<asio::error_code>)
+ {
+ ++count;
+ })));
+
+ ASIO_CHECK(count == 0);
+
+ io1.run();
+
+ ASIO_CHECK(count == 0);
+
+ io2.run();
+
+ ASIO_CHECK(count == 1);
+
+ timer1.async_wait(
+ asio::as_tuple(
+ asio::bind_executor(io2.get_executor(),
+ asio::deferred)))(
+ [&count](std::tuple<asio::error_code>)
+ {
+ ++count;
+ });
+
+ ASIO_CHECK(count == 1);
+
+ io1.restart();
+ io1.run();
+
+ ASIO_CHECK(count == 1);
+
+ io2.restart();
+ io2.run();
+
+ ASIO_CHECK(count == 2);
+
+# if defined(ASIO_HAS_STD_FUTURE_CLASS)
+ std::future<std::tuple<asio::error_code> > f = timer1.async_wait(
+ asio::as_tuple(
+ asio::bind_executor(io2.get_executor(),
+ asio::use_future)));
+
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::timeout);
+
+ io1.restart();
+ io1.run();
+
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::timeout);
+
+ io2.restart();
+ io2.run();
+
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::ready);
+# endif // defined(ASIO_HAS_STD_FUTURE_CLASS)
+}
+
+void as_tuple_constness_test()
+{
+# if defined(ASIO_HAS_STD_FUTURE_CLASS)
+ asio::io_context io1;
+ asio::system_timer timer1(io1);
+
+ auto tok1 = asio::as_tuple(asio::use_future);
+ (void)timer1.async_wait(tok1);
+ (void)timer1.async_wait(std::move(tok1));
+
+ const auto tok2 = asio::as_tuple(asio::use_future);
+ (void)timer1.async_wait(tok2);
+ (void)timer1.async_wait(std::move(tok2));
+
+ constexpr auto tok3 = asio::as_tuple(asio::use_future);
+ (void)timer1.async_wait(tok3);
+ (void)timer1.async_wait(std::move(tok3));
+# endif // defined(ASIO_HAS_STD_FUTURE_CLASS)
+}
+
+ASIO_TEST_SUITE
+(
+ "as_tuple",
+ ASIO_TEST_CASE(as_tuple_test)
+ ASIO_COMPILE_TEST_CASE(as_tuple_constness_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/associated_allocator.cpp b/3rdparty/asio/src/tests/unit/associated_allocator.cpp
index 63ee6828ed2..69a8afb0d41 100644
--- a/3rdparty/asio/src/tests/unit/associated_allocator.cpp
+++ b/3rdparty/asio/src/tests/unit/associated_allocator.cpp
@@ -2,7 +2,7 @@
// associated_allocator.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/associated_cancellation_slot.cpp b/3rdparty/asio/src/tests/unit/associated_cancellation_slot.cpp
index 9e1105d5332..96d488458cb 100644
--- a/3rdparty/asio/src/tests/unit/associated_cancellation_slot.cpp
+++ b/3rdparty/asio/src/tests/unit/associated_cancellation_slot.cpp
@@ -2,7 +2,7 @@
// associated_cancellation_slot.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/associated_executor.cpp b/3rdparty/asio/src/tests/unit/associated_executor.cpp
index c9533a84609..60b1f00657f 100644
--- a/3rdparty/asio/src/tests/unit/associated_executor.cpp
+++ b/3rdparty/asio/src/tests/unit/associated_executor.cpp
@@ -2,7 +2,7 @@
// associated_executor.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/associated_immediate_executor.cpp b/3rdparty/asio/src/tests/unit/associated_immediate_executor.cpp
new file mode 100644
index 00000000000..f085a2cfcee
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/associated_immediate_executor.cpp
@@ -0,0 +1,25 @@
+//
+// associated_immediate_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2022 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/associated_immediate_executor.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "associated_immediate_executor",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/associator.cpp b/3rdparty/asio/src/tests/unit/associator.cpp
index e79fe677fe2..a35d95c66e0 100644
--- a/3rdparty/asio/src/tests/unit/associator.cpp
+++ b/3rdparty/asio/src/tests/unit/associator.cpp
@@ -2,7 +2,7 @@
// associator.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/async_result.cpp b/3rdparty/asio/src/tests/unit/async_result.cpp
index 5002559dd12..75a4e91b71e 100644
--- a/3rdparty/asio/src/tests/unit/async_result.cpp
+++ b/3rdparty/asio/src/tests/unit/async_result.cpp
@@ -2,7 +2,7 @@
// async_result.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/awaitable.cpp b/3rdparty/asio/src/tests/unit/awaitable.cpp
index a1e9077765d..39ca8ddfdbe 100644
--- a/3rdparty/asio/src/tests/unit/awaitable.cpp
+++ b/3rdparty/asio/src/tests/unit/awaitable.cpp
@@ -2,7 +2,7 @@
// awaitable.cpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_datagram_socket.cpp b/3rdparty/asio/src/tests/unit/basic_datagram_socket.cpp
index 28e78c10194..44fa2561646 100644
--- a/3rdparty/asio/src/tests/unit/basic_datagram_socket.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_datagram_socket.cpp
@@ -2,7 +2,7 @@
// basic_datagram_socket.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_deadline_timer.cpp b/3rdparty/asio/src/tests/unit/basic_deadline_timer.cpp
index 2ea478da3b3..ec6a6e37d18 100644
--- a/3rdparty/asio/src/tests/unit/basic_deadline_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_deadline_timer.cpp
@@ -2,7 +2,7 @@
// basic_deadline_timer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_file.cpp b/3rdparty/asio/src/tests/unit/basic_file.cpp
new file mode 100644
index 00000000000..5308d1268b0
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/basic_file.cpp
@@ -0,0 +1,25 @@
+//
+// basic_file.cpp
+// ~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/basic_file.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "basic_file",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/basic_random_access_file.cpp b/3rdparty/asio/src/tests/unit/basic_random_access_file.cpp
new file mode 100644
index 00000000000..fffaee3e8a2
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/basic_random_access_file.cpp
@@ -0,0 +1,25 @@
+//
+// basic_random_access_file.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/basic_random_access_file.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "basic_random_access_file",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/basic_raw_socket.cpp b/3rdparty/asio/src/tests/unit/basic_raw_socket.cpp
index 3e87d6dd915..127df060b0c 100644
--- a/3rdparty/asio/src/tests/unit/basic_raw_socket.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_raw_socket.cpp
@@ -2,7 +2,7 @@
// basic_raw_socket.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_readable_pipe.cpp b/3rdparty/asio/src/tests/unit/basic_readable_pipe.cpp
new file mode 100644
index 00000000000..f390acf4f98
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/basic_readable_pipe.cpp
@@ -0,0 +1,25 @@
+//
+// basic_readable_pipe.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/basic_readable_pipe.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "basic_readable_pipe",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/basic_seq_packet_socket.cpp b/3rdparty/asio/src/tests/unit/basic_seq_packet_socket.cpp
index 3c48c0353e1..c8b9bfa67bc 100644
--- a/3rdparty/asio/src/tests/unit/basic_seq_packet_socket.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_seq_packet_socket.cpp
@@ -2,7 +2,7 @@
// basic_seq_packet_socket.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_serial_port.cpp b/3rdparty/asio/src/tests/unit/basic_serial_port.cpp
index 519c04df421..1a64348a989 100644
--- a/3rdparty/asio/src/tests/unit/basic_serial_port.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_serial_port.cpp
@@ -2,7 +2,7 @@
// basic_serial_port.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/3rdparty/asio/src/tests/unit/basic_signal_set.cpp b/3rdparty/asio/src/tests/unit/basic_signal_set.cpp
index d2880b544f2..01340178e69 100644
--- a/3rdparty/asio/src/tests/unit/basic_signal_set.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_signal_set.cpp
@@ -2,7 +2,7 @@
// basic_signal_set.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_socket.cpp b/3rdparty/asio/src/tests/unit/basic_socket.cpp
index def16e0fab2..c2814e6b96d 100644
--- a/3rdparty/asio/src/tests/unit/basic_socket.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_socket.cpp
@@ -2,7 +2,7 @@
// basic_socket.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_socket_acceptor.cpp b/3rdparty/asio/src/tests/unit/basic_socket_acceptor.cpp
index 49cb72a953c..021a81628ae 100644
--- a/3rdparty/asio/src/tests/unit/basic_socket_acceptor.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_socket_acceptor.cpp
@@ -2,7 +2,7 @@
// basic_socket_acceptor.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_stream_file.cpp b/3rdparty/asio/src/tests/unit/basic_stream_file.cpp
new file mode 100644
index 00000000000..9902122c9cb
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/basic_stream_file.cpp
@@ -0,0 +1,25 @@
+//
+// basic_stream_file.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/basic_stream_file.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "basic_stream_file",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/basic_stream_socket.cpp b/3rdparty/asio/src/tests/unit/basic_stream_socket.cpp
index ab0e6d0759a..1edbe5a530c 100644
--- a/3rdparty/asio/src/tests/unit/basic_stream_socket.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_stream_socket.cpp
@@ -2,7 +2,7 @@
// basic_stream_socket.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_streambuf.cpp b/3rdparty/asio/src/tests/unit/basic_streambuf.cpp
index 8172bef62b6..9529dd801fe 100644
--- a/3rdparty/asio/src/tests/unit/basic_streambuf.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_streambuf.cpp
@@ -2,7 +2,7 @@
// basic_streambuf.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_waitable_timer.cpp b/3rdparty/asio/src/tests/unit/basic_waitable_timer.cpp
index 8cb0ca0ffb1..9d6be41b754 100644
--- a/3rdparty/asio/src/tests/unit/basic_waitable_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/basic_waitable_timer.cpp
@@ -2,7 +2,7 @@
// basic_waitable_timer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/basic_writable_pipe.cpp b/3rdparty/asio/src/tests/unit/basic_writable_pipe.cpp
new file mode 100644
index 00000000000..fc0d0fdd955
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/basic_writable_pipe.cpp
@@ -0,0 +1,25 @@
+//
+// basic_writable_pipe.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/basic_writable_pipe.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "basic_writable_pipe",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/bind_allocator.cpp b/3rdparty/asio/src/tests/unit/bind_allocator.cpp
new file mode 100644
index 00000000000..b7c11ffb53c
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/bind_allocator.cpp
@@ -0,0 +1,237 @@
+//
+// bind_allocator.cpp
+// ~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/bind_allocator.hpp"
+
+#include <functional>
+#include "asio/io_context.hpp"
+#include "asio/steady_timer.hpp"
+#include "unit_test.hpp"
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/deadline_timer.hpp"
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/steady_timer.hpp"
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+using namespace asio;
+namespace bindns = std;
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+typedef deadline_timer timer;
+namespace chronons = boost::posix_time;
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+typedef steady_timer timer;
+namespace chronons = asio::chrono;
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+template <typename T>
+class test_allocator
+{
+public:
+ typedef T value_type;
+
+ explicit test_allocator(int* allocations)
+ : allocations_(allocations)
+ {
+ }
+
+ template <typename U>
+ test_allocator(const test_allocator<U>& other)
+ : allocations_(other.allocations_)
+ {
+ }
+
+ template <typename U>
+ struct rebind
+ {
+ typedef test_allocator<U> other;
+ };
+
+ bool operator==(const test_allocator&) const
+ {
+ return true;
+ }
+
+ bool operator!=(const test_allocator&) const
+ {
+ return false;
+ }
+
+ T* allocate(std::size_t n) const
+ {
+ ++(*allocations_);
+ return static_cast<T*>(::operator new(sizeof(T) * n));
+ }
+
+ void deallocate(T* p, std::size_t /*n*/) const
+ {
+ --(*allocations_);
+ ::operator delete(p);
+ }
+
+//private:
+ int* allocations_;
+};
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void bind_allocator_to_function_object_test()
+{
+ io_context ioc;
+
+ int count = 0;
+ int allocations = 0;
+
+ timer t(ioc, chronons::seconds(1));
+ t.async_wait(
+ bind_allocator(
+ test_allocator<int>(&allocations),
+ bindns::bind(&increment, &count)));
+
+ ASIO_CHECK(count == 0);
+ ASIO_CHECK(allocations == 1);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(allocations == 0);
+
+ t.async_wait(
+ bind_allocator(
+ test_allocator<int>(&allocations),
+ bind_allocator(
+ std::allocator<void>(),
+ bindns::bind(&increment, &count))));
+
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(allocations == 1);
+
+ ioc.restart();
+ ioc.run();
+
+ ASIO_CHECK(count == 2);
+ ASIO_CHECK(allocations == 0);
+}
+
+struct incrementer_token_v1
+{
+ explicit incrementer_token_v1(int* c) : count(c) {}
+ int* count;
+};
+
+struct incrementer_handler_v1
+{
+ explicit incrementer_handler_v1(incrementer_token_v1 t) : count(t.count) {}
+ void operator()(asio::error_code){ increment(count); }
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v1, void(asio::error_code)>
+{
+public:
+ typedef incrementer_handler_v1 completion_handler_type;
+ typedef void return_type;
+ explicit async_result(completion_handler_type&) {}
+ return_type get() {}
+};
+
+} // namespace asio
+
+void bind_allocator_to_completion_token_v1_test()
+{
+ io_context ioc;
+
+ int count = 0;
+ int allocations = 0;
+
+ timer t(ioc, chronons::seconds(1));
+ t.async_wait(
+ bind_allocator(
+ test_allocator<int>(&allocations),
+ incrementer_token_v1(&count)));
+
+ ASIO_CHECK(count == 0);
+ ASIO_CHECK(allocations == 1);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(allocations == 0);
+}
+
+struct incrementer_token_v2
+{
+ explicit incrementer_token_v2(int* c) : count(c) {}
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v2, void(asio::error_code)>
+{
+public:
+#if !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+ typedef void return_type;
+#endif // !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+
+ template <typename Initiation, typename... Args>
+ static void initiate(Initiation initiation,
+ incrementer_token_v2 token, Args&&... args)
+ {
+ initiation(bindns::bind(&increment, token.count),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+} // namespace asio
+
+void bind_allocator_to_completion_token_v2_test()
+{
+ io_context ioc;
+
+ int count = 0;
+ int allocations = 0;
+
+ timer t(ioc, chronons::seconds(1));
+ t.async_wait(
+ bind_allocator(
+ test_allocator<int>(&allocations),
+ incrementer_token_v2(&count)));
+
+ ASIO_CHECK(count == 0);
+ ASIO_CHECK(allocations == 1);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 1);
+ ASIO_CHECK(allocations == 0);
+}
+
+ASIO_TEST_SUITE
+(
+ "bind_allocator",
+ ASIO_TEST_CASE(bind_allocator_to_function_object_test)
+ ASIO_TEST_CASE(bind_allocator_to_completion_token_v1_test)
+ ASIO_TEST_CASE(bind_allocator_to_completion_token_v2_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/bind_cancellation_slot.cpp b/3rdparty/asio/src/tests/unit/bind_cancellation_slot.cpp
index 48cc1baf17b..25b0ff1c995 100644
--- a/3rdparty/asio/src/tests/unit/bind_cancellation_slot.cpp
+++ b/3rdparty/asio/src/tests/unit/bind_cancellation_slot.cpp
@@ -2,7 +2,7 @@
// bind_cancellation_slot.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,6 +16,7 @@
// Test that header file is self-contained.
#include "asio/bind_cancellation_slot.hpp"
+#include <functional>
#include "asio/cancellation_signal.hpp"
#include "asio/io_context.hpp"
#include "asio/steady_timer.hpp"
@@ -27,24 +28,13 @@
# include "asio/steady_timer.hpp"
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
#if defined(ASIO_HAS_BOOST_DATE_TIME)
typedef deadline_timer timer;
namespace chronons = boost::posix_time;
-#elif defined(ASIO_HAS_CHRONO)
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
typedef steady_timer timer;
namespace chronons = asio::chrono;
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
@@ -77,64 +67,110 @@ void bind_cancellation_slot_to_function_object_test()
ioc.run();
ASIO_CHECK(count == 1);
+
+ t.async_wait(
+ bind_cancellation_slot(sig.slot(),
+ bind_cancellation_slot(sig.slot(),
+ bindns::bind(&increment_on_cancel,
+ &count, bindns::placeholders::_1))));
+
+ ioc.restart();
+ ioc.poll();
+
+ ASIO_CHECK(count == 1);
+
+ sig.emit(asio::cancellation_type::all);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 2);
}
-struct incrementer_token
+struct incrementer_token_v1
+{
+ explicit incrementer_token_v1(int* c) : count(c) {}
+ int* count;
+};
+
+struct incrementer_handler_v1
{
- explicit incrementer_token(int* c) : count(c) {}
+ explicit incrementer_handler_v1(incrementer_token_v1 t) : count(t.count) {}
+
+ void operator()(asio::error_code error)
+ {
+ increment_on_cancel(count, error);
+ }
+
int* count;
};
namespace asio {
template <>
-class async_result<incrementer_token, void(asio::error_code)>
+class async_result<incrementer_token_v1, void(asio::error_code)>
{
public:
+ typedef incrementer_handler_v1 completion_handler_type;
typedef void return_type;
+ explicit async_result(completion_handler_type&) {}
+ return_type get() {}
+};
+
+} // namespace asio
+
+void bind_cancellation_slot_to_completion_token_v1_test()
+{
+ io_context ioc;
+ cancellation_signal sig;
+
+ int count = 0;
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
+ timer t(ioc, chronons::seconds(5));
+ t.async_wait(
+ bind_cancellation_slot(sig.slot(),
+ incrementer_token_v1(&count)));
+
+ ioc.poll();
+
+ ASIO_CHECK(count == 0);
+
+ sig.emit(asio::cancellation_type::all);
+
+ ioc.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+struct incrementer_token_v2
+{
+ explicit incrementer_token_v2(int* c) : count(c) {}
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v2, void(asio::error_code)>
+{
+public:
+#if !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+ typedef void return_type;
+#endif // !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
template <typename Initiation, typename... Args>
static void initiate(Initiation initiation,
- incrementer_token token, ASIO_MOVE_ARG(Args)... args)
+ incrementer_token_v2 token, Args&&... args)
{
initiation(
bindns::bind(&increment_on_cancel,
token.count, bindns::placeholders::_1),
- ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Initiation>
- static void initiate(Initiation initiation, incrementer_token token)
- {
- initiation(
- bindns::bind(&increment_on_cancel,
- token.count, bindns::placeholders::_1));
+ static_cast<Args&&>(args)...);
}
-
-#define ASIO_PRIVATE_INITIATE_DEF(n) \
- template <typename Initiation, ASIO_VARIADIC_TPARAMS(n)> \
- static return_type initiate(Initiation initiation, \
- incrementer_token token, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- initiation( \
- bindns::bind(&increment_on_cancel, \
- token.count, bindns::placeholders::_1), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INITIATE_DEF)
-#undef ASIO_PRIVATE_INITIATE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
};
} // namespace asio
-void bind_cancellation_slot_to_completion_token_test()
+void bind_cancellation_slot_to_completion_token_v2_test()
{
io_context ioc;
cancellation_signal sig;
@@ -144,7 +180,7 @@ void bind_cancellation_slot_to_completion_token_test()
timer t(ioc, chronons::seconds(5));
t.async_wait(
bind_cancellation_slot(sig.slot(),
- incrementer_token(&count)));
+ incrementer_token_v2(&count)));
ioc.poll();
@@ -161,5 +197,6 @@ ASIO_TEST_SUITE
(
"bind_cancellation_slot",
ASIO_TEST_CASE(bind_cancellation_slot_to_function_object_test)
- ASIO_TEST_CASE(bind_cancellation_slot_to_completion_token_test)
+ ASIO_TEST_CASE(bind_cancellation_slot_to_completion_token_v1_test)
+ ASIO_TEST_CASE(bind_cancellation_slot_to_completion_token_v2_test)
)
diff --git a/3rdparty/asio/src/tests/unit/bind_executor.cpp b/3rdparty/asio/src/tests/unit/bind_executor.cpp
index 8b1ea70f6b2..59be1cd14f3 100644
--- a/3rdparty/asio/src/tests/unit/bind_executor.cpp
+++ b/3rdparty/asio/src/tests/unit/bind_executor.cpp
@@ -2,7 +2,7 @@
// bind_executor.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,6 +16,7 @@
// Test that header file is self-contained.
#include "asio/bind_executor.hpp"
+#include <functional>
#include "asio/io_context.hpp"
#include "asio/steady_timer.hpp"
#include "unit_test.hpp"
@@ -26,24 +27,13 @@
# include "asio/steady_timer.hpp"
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
#if defined(ASIO_HAS_BOOST_DATE_TIME)
typedef deadline_timer timer;
namespace chronons = boost::posix_time;
-#elif defined(ASIO_HAS_CHRONO)
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
typedef steady_timer timer;
namespace chronons = asio::chrono;
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
@@ -73,58 +63,102 @@ void bind_executor_to_function_object_test()
ioc2.run();
ASIO_CHECK(count == 1);
+
+ t.async_wait(
+ bind_executor(
+ ioc2.get_executor(),
+ bind_executor(
+ asio::system_executor(),
+ bindns::bind(&increment, &count))));
+
+ ioc1.restart();
+ ioc1.run();
+
+ ASIO_CHECK(count == 1);
+
+ ioc2.restart();
+ ioc2.run();
+
+ ASIO_CHECK(count == 2);
}
-struct incrementer_token
+struct incrementer_token_v1
{
- explicit incrementer_token(int* c) : count(c) {}
+ explicit incrementer_token_v1(int* c) : count(c) {}
+ int* count;
+};
+
+struct incrementer_handler_v1
+{
+ explicit incrementer_handler_v1(incrementer_token_v1 t) : count(t.count) {}
+ void operator()(asio::error_code){ increment(count); }
int* count;
};
namespace asio {
template <>
-class async_result<incrementer_token, void(asio::error_code)>
+class async_result<incrementer_token_v1, void(asio::error_code)>
{
public:
+ typedef incrementer_handler_v1 completion_handler_type;
typedef void return_type;
+ explicit async_result(completion_handler_type&) {}
+ return_type get() {}
+};
+
+} // namespace asio
+
+void bind_executor_to_completion_token_v1_test()
+{
+ io_context ioc1;
+ io_context ioc2;
+
+ int count = 0;
+
+ timer t(ioc1, chronons::seconds(1));
+ t.async_wait(
+ bind_executor(
+ ioc2.get_executor(),
+ incrementer_token_v1(&count)));
+
+ ioc1.run();
+
+ ASIO_CHECK(count == 0);
+
+ ioc2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+struct incrementer_token_v2
+{
+ explicit incrementer_token_v2(int* c) : count(c) {}
+ int* count;
+};
-#if defined(ASIO_HAS_VARIADIC_TEMPLATES)
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v2, void(asio::error_code)>
+{
+public:
+#if !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+ typedef void return_type;
+#endif // !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
template <typename Initiation, typename... Args>
static void initiate(Initiation initiation,
- incrementer_token token, ASIO_MOVE_ARG(Args)... args)
+ incrementer_token_v2 token, Args&&... args)
{
initiation(bindns::bind(&increment, token.count),
- ASIO_MOVE_CAST(Args)(args)...);
+ static_cast<Args&&>(args)...);
}
-
-#else // defined(ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename Initiation>
- static void initiate(Initiation initiation, incrementer_token token)
- {
- initiation(bindns::bind(&increment, token.count));
- }
-
-#define ASIO_PRIVATE_INITIATE_DEF(n) \
- template <typename Initiation, ASIO_VARIADIC_TPARAMS(n)> \
- static return_type initiate(Initiation initiation, \
- incrementer_token token, ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- initiation(bindns::bind(&increment, token.count), \
- ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INITIATE_DEF)
-#undef ASIO_PRIVATE_INITIATE_DEF
-
-#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES)
};
} // namespace asio
-void bind_executor_to_completion_token_test()
+void bind_executor_to_completion_token_v2_test()
{
io_context ioc1;
io_context ioc2;
@@ -135,7 +169,7 @@ void bind_executor_to_completion_token_test()
t.async_wait(
bind_executor(
ioc2.get_executor(),
- incrementer_token(&count)));
+ incrementer_token_v2(&count)));
ioc1.run();
@@ -150,5 +184,6 @@ ASIO_TEST_SUITE
(
"bind_executor",
ASIO_TEST_CASE(bind_executor_to_function_object_test)
- ASIO_TEST_CASE(bind_executor_to_completion_token_test)
+ ASIO_TEST_CASE(bind_executor_to_completion_token_v1_test)
+ ASIO_TEST_CASE(bind_executor_to_completion_token_v2_test)
)
diff --git a/3rdparty/asio/src/tests/unit/bind_immediate_executor.cpp b/3rdparty/asio/src/tests/unit/bind_immediate_executor.cpp
new file mode 100644
index 00000000000..ecf82de7470
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/bind_immediate_executor.cpp
@@ -0,0 +1,199 @@
+//
+// bind_immediate_executor.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/bind_immediate_executor.hpp"
+
+#include <functional>
+#include "asio/dispatch.hpp"
+#include "asio/io_context.hpp"
+#include "unit_test.hpp"
+
+#if defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/deadline_timer.hpp"
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
+# include "asio/steady_timer.hpp"
+#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
+
+using namespace asio;
+namespace bindns = std;
+
+struct initiate_immediate
+{
+ template <typename Handler>
+ void operator()(Handler&& handler, io_context* ctx) const
+ {
+ typename associated_immediate_executor<
+ Handler, io_context::executor_type>::type ex =
+ get_associated_immediate_executor(handler, ctx->get_executor());
+ dispatch(ex, static_cast<Handler&&>(handler));
+ }
+};
+
+template <ASIO_COMPLETION_TOKEN_FOR(void()) Token>
+ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(Token, void())
+async_immediate(io_context& ctx, Token&& token)
+ ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX((
+ async_initiate<Token, void()>(declval<initiate_immediate>(), token)))
+{
+ return async_initiate<Token, void()>(initiate_immediate(), token, &ctx);
+}
+
+void increment(int* count)
+{
+ ++(*count);
+}
+
+void bind_immediate_executor_to_function_object_test()
+{
+ io_context ioc1;
+ io_context ioc2;
+
+ int count = 0;
+
+ async_immediate(ioc1,
+ bind_immediate_executor(
+ ioc2.get_executor(),
+ bindns::bind(&increment, &count)));
+
+ ioc1.run();
+
+ ASIO_CHECK(count == 0);
+
+ ioc2.run();
+
+ ASIO_CHECK(count == 1);
+
+ async_immediate(ioc1,
+ bind_immediate_executor(
+ ioc2.get_executor(),
+ bind_immediate_executor(
+ asio::system_executor(),
+ bindns::bind(&increment, &count))));
+
+ ioc1.restart();
+ ioc1.run();
+
+ ASIO_CHECK(count == 1);
+
+ ioc2.restart();
+ ioc2.run();
+
+ ASIO_CHECK(count == 2);
+}
+
+struct incrementer_token_v1
+{
+ explicit incrementer_token_v1(int* c) : count(c) {}
+ int* count;
+};
+
+struct incrementer_handler_v1
+{
+ explicit incrementer_handler_v1(incrementer_token_v1 t) : count(t.count) {}
+ void operator()(){ increment(count); }
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v1, void()>
+{
+public:
+ typedef incrementer_handler_v1 completion_handler_type;
+ typedef void return_type;
+ explicit async_result(completion_handler_type&) {}
+ return_type get() {}
+};
+
+} // namespace asio
+
+void bind_immediate_executor_to_completion_token_v1_test()
+{
+ io_context ioc1;
+ io_context ioc2;
+
+ int count = 0;
+
+ async_immediate(ioc1,
+ bind_immediate_executor(
+ ioc2.get_executor(),
+ incrementer_token_v1(&count)));
+
+ ioc1.run();
+
+ ASIO_CHECK(count == 0);
+
+ ioc2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+struct incrementer_token_v2
+{
+ explicit incrementer_token_v2(int* c) : count(c) {}
+ int* count;
+};
+
+namespace asio {
+
+template <>
+class async_result<incrementer_token_v2, void()>
+{
+public:
+#if !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+ typedef void return_type;
+#endif // !defined(ASIO_HAS_RETURN_TYPE_DEDUCTION)
+
+ template <typename Initiation, typename... Args>
+ static void initiate(Initiation initiation,
+ incrementer_token_v2 token, Args&&... args)
+ {
+ initiation(bindns::bind(&increment, token.count),
+ static_cast<Args&&>(args)...);
+ }
+};
+
+} // namespace asio
+
+void bind_immediate_executor_to_completion_token_v2_test()
+{
+ io_context ioc1;
+ io_context ioc2;
+
+ int count = 0;
+
+ async_immediate(ioc1,
+ bind_immediate_executor(
+ ioc2.get_executor(),
+ incrementer_token_v2(&count)));
+
+ ioc1.run();
+
+ ASIO_CHECK(count == 0);
+
+ ioc2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+ASIO_TEST_SUITE
+(
+ "bind_immediate_executor",
+ ASIO_TEST_CASE(bind_immediate_executor_to_function_object_test)
+ ASIO_TEST_CASE(bind_immediate_executor_to_completion_token_v1_test)
+ ASIO_TEST_CASE(bind_immediate_executor_to_completion_token_v2_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/buffer.cpp b/3rdparty/asio/src/tests/unit/buffer.cpp
index f66a8f0122e..9fa1db6e67f 100644
--- a/3rdparty/asio/src/tests/unit/buffer.cpp
+++ b/3rdparty/asio/src/tests/unit/buffer.cpp
@@ -2,7 +2,7 @@
// buffer.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,16 +16,14 @@
// Test that header file is self-contained.
#include "asio/buffer.hpp"
+#include <array>
+#include <cstring>
#include "unit_test.hpp"
#if defined(ASIO_HAS_BOOST_ARRAY)
# include <boost/array.hpp>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
//------------------------------------------------------------------------------
// buffer_compile test
@@ -37,6 +35,42 @@ namespace buffer_compile {
using namespace asio;
+template <typename T>
+class mutable_contiguous_container
+{
+public:
+ typedef T value_type;
+ typedef T* iterator;
+ typedef const T* const_iterator;
+ typedef T& reference;
+ typedef const T& const_reference;
+
+ mutable_contiguous_container() {}
+ std::size_t size() const { return 0; }
+ iterator begin() { return 0; }
+ const_iterator begin() const { return 0; }
+ iterator end() { return 0; }
+ const_iterator end() const { return 0; }
+};
+
+template <typename T>
+class const_contiguous_container
+{
+public:
+ typedef const T value_type;
+ typedef const T* iterator;
+ typedef const T* const_iterator;
+ typedef const T& reference;
+ typedef const T& const_reference;
+
+ const_contiguous_container() {}
+ std::size_t size() const { return 0; }
+ iterator begin() { return 0; }
+ const_iterator begin() const { return 0; }
+ iterator end() { return 0; }
+ const_iterator end() const { return 0; }
+};
+
void test()
{
try
@@ -50,11 +84,9 @@ void test()
const boost::array<char, 1024>& const_array_data_1 = array_data;
boost::array<const char, 1024> const_array_data_2 = { { 0 } };
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
std::array<char, 1024> std_array_data;
const std::array<char, 1024>& const_std_array_data_1 = std_array_data;
std::array<const char, 1024> const_std_array_data_2 = { { 0 } };
-#endif // defined(ASIO_HAS_STD_ARRAY)
std::vector<char> vector_data(1024);
const std::vector<char>& const_vector_data = vector_data;
std::string string_data(1024, ' ');
@@ -66,6 +98,10 @@ void test()
#elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
std::experimental::string_view string_view_data(string_data);
#endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+ mutable_contiguous_container<char> mutable_contiguous_data;
+ const mutable_contiguous_container<char> const_mutable_contiguous_data;
+ const_contiguous_container<char> const_contiguous_data;
+ const const_contiguous_container<char> const_const_contiguous_data;
// mutable_buffer constructors.
@@ -189,14 +225,12 @@ void test()
cb1 = buffer(const_array_data_2);
cb1 = buffer(const_array_data_2, 1024);
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
mb1 = buffer(std_array_data);
mb1 = buffer(std_array_data, 1024);
cb1 = buffer(const_std_array_data_1);
cb1 = buffer(const_std_array_data_1, 1024);
cb1 = buffer(const_std_array_data_2);
cb1 = buffer(const_std_array_data_2, 1024);
-#endif // defined(ASIO_HAS_STD_ARRAY)
mb1 = buffer(vector_data);
mb1 = buffer(vector_data, 1024);
cb1 = buffer(const_vector_data);
@@ -209,6 +243,14 @@ void test()
cb1 = buffer(string_view_data);
cb1 = buffer(string_view_data, 1024);
#endif // defined(ASIO_HAS_STRING_VIEW)
+ mb1 = buffer(mutable_contiguous_data);
+ mb1 = buffer(mutable_contiguous_data, 1024);
+ cb1 = buffer(const_mutable_contiguous_data);
+ cb1 = buffer(const_mutable_contiguous_data, 1024);
+ cb1 = buffer(const_contiguous_data);
+ cb1 = buffer(const_contiguous_data, 1024);
+ cb1 = buffer(const_const_contiguous_data);
+ cb1 = buffer(const_const_contiguous_data, 1024);
// buffer_copy function overloads.
@@ -600,13 +642,11 @@ struct valid_const_a
const_buffer* end() const { return 0; }
};
-#if defined(ASIO_HAS_DECLTYPE)
struct valid_const_b
{
const_buffer* begin() const { return 0; }
const_buffer* end() const { return 0; }
};
-#endif // defined(ASIO_HAS_DECLTYPE)
struct valid_mutable_a
{
@@ -616,13 +656,11 @@ struct valid_mutable_a
mutable_buffer* end() const { return 0; }
};
-#if defined(ASIO_HAS_DECLTYPE)
struct valid_mutable_b
{
mutable_buffer* begin() const { return 0; }
mutable_buffer* end() const { return 0; }
};
-#endif // defined(ASIO_HAS_DECLTYPE)
struct invalid_const_a
{
@@ -643,7 +681,6 @@ struct invalid_const_c
const_buffer* end() const { return 0; }
};
-#if defined(ASIO_HAS_DECLTYPE)
struct invalid_const_d
{
int* begin() const { return 0; }
@@ -659,7 +696,6 @@ struct invalid_const_f
{
const_buffer* end() const { return 0; }
};
-#endif // defined(ASIO_HAS_DECLTYPE)
struct invalid_mutable_a
{
@@ -680,7 +716,6 @@ struct invalid_mutable_c
mutable_buffer* end() const { return 0; }
};
-#if defined(ASIO_HAS_DECLTYPE)
struct invalid_mutable_d
{
int* begin() const { return 0; }
@@ -696,7 +731,6 @@ struct invalid_mutable_f
{
mutable_buffer* end() const { return 0; }
};
-#endif // defined(ASIO_HAS_DECLTYPE)
void test()
{
@@ -751,14 +785,12 @@ void test()
ASIO_CHECK(buffer_sequence_begin(b7) == b7.begin());
ASIO_CHECK(buffer_sequence_end(b7) == b7.end());
-#if defined(ASIO_HAS_DECLTYPE)
ASIO_CHECK(is_const_buffer_sequence<valid_const_b>::value);
ASIO_CHECK(!is_mutable_buffer_sequence<valid_const_b>::value);
valid_const_b b8;
ASIO_CHECK(buffer_sequence_begin(b8) == b8.begin());
ASIO_CHECK(buffer_sequence_end(b8) == b8.end());
-#endif // defined(ASIO_HAS_DECLTYPE)
ASIO_CHECK(is_const_buffer_sequence<valid_mutable_a>::value);
ASIO_CHECK(is_mutable_buffer_sequence<valid_mutable_a>::value);
@@ -767,14 +799,12 @@ void test()
ASIO_CHECK(buffer_sequence_begin(b9) == b9.begin());
ASIO_CHECK(buffer_sequence_end(b9) == b9.end());
-#if defined(ASIO_HAS_DECLTYPE)
ASIO_CHECK(is_const_buffer_sequence<valid_mutable_b>::value);
ASIO_CHECK(is_mutable_buffer_sequence<valid_mutable_b>::value);
valid_mutable_b b10;
ASIO_CHECK(buffer_sequence_begin(b10) == b10.begin());
ASIO_CHECK(buffer_sequence_end(b10) == b10.end());
-#endif // defined(ASIO_HAS_DECLTYPE)
ASIO_CHECK(!is_const_buffer_sequence<invalid_const_a>::value);
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_const_a>::value);
@@ -785,7 +815,6 @@ void test()
ASIO_CHECK(!is_const_buffer_sequence<invalid_const_c>::value);
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_const_c>::value);
-#if defined(ASIO_HAS_DECLTYPE)
ASIO_CHECK(!is_const_buffer_sequence<invalid_const_d>::value);
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_const_d>::value);
@@ -794,7 +823,6 @@ void test()
ASIO_CHECK(!is_const_buffer_sequence<invalid_const_f>::value);
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_const_f>::value);
-#endif // defined(ASIO_HAS_DECLTYPE)
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_a>::value);
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_a>::value);
@@ -805,7 +833,6 @@ void test()
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_c>::value);
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_c>::value);
-#if defined(ASIO_HAS_DECLTYPE)
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_d>::value);
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_d>::value);
@@ -814,11 +841,66 @@ void test()
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_f>::value);
ASIO_CHECK(!is_mutable_buffer_sequence<invalid_mutable_f>::value);
-#endif // defined(ASIO_HAS_DECLTYPE)
}
} // namespace buffer_sequence
+namespace buffer_literals {
+
+void test()
+{
+#if defined(ASIO_HAS_USER_DEFINED_LITERALS)
+ using namespace asio::buffer_literals;
+ using namespace std; // For memcmp.
+
+ asio::const_buffer b1 = ""_buf;
+ ASIO_CHECK(b1.size() == 0);
+
+ asio::const_buffer b2 = "hello"_buf;
+ ASIO_CHECK(b2.size() == 5);
+ ASIO_CHECK(memcmp(b2.data(), "hello", 5) == 0);
+
+ asio::const_buffer b3 = 0x00_buf;
+ ASIO_CHECK(b3.size() == 1);
+ ASIO_CHECK(memcmp(b3.data(), "\x00", 1) == 0);
+
+ asio::const_buffer b4 = 0X01_buf;
+ ASIO_CHECK(b4.size() == 1);
+ ASIO_CHECK(memcmp(b4.data(), "\x01", 1) == 0);
+
+ asio::const_buffer b5 = 0xaB_buf;
+ ASIO_CHECK(b5.size() == 1);
+ ASIO_CHECK(memcmp(b5.data(), "\xab", 1) == 0);
+
+ asio::const_buffer b6 = 0xABcd_buf;
+ ASIO_CHECK(b6.size() == 2);
+ ASIO_CHECK(memcmp(b6.data(), "\xab\xcd", 2) == 0);
+
+ asio::const_buffer b7 = 0x01ab01cd01ef01ba01dc01fe_buf;
+ ASIO_CHECK(b7.size() == 12);
+ ASIO_CHECK(memcmp(b7.data(),
+ "\x01\xab\x01\xcd\x01\xef\x01\xba\x01\xdc\x01\xfe", 12) == 0);
+
+ asio::const_buffer b8 = 0b00000000_buf;
+ ASIO_CHECK(b8.size() == 1);
+ ASIO_CHECK(memcmp(b8.data(), "\x00", 1) == 0);
+
+ asio::const_buffer b9 = 0B00000001_buf;
+ ASIO_CHECK(b9.size() == 1);
+ ASIO_CHECK(memcmp(b9.data(), "\x01", 1) == 0);
+
+ asio::const_buffer b10 = 0B11111111_buf;
+ ASIO_CHECK(b10.size() == 1);
+ ASIO_CHECK(memcmp(b10.data(), "\xFF", 1) == 0);
+
+ asio::const_buffer b11 = 0b1111000000001111_buf;
+ ASIO_CHECK(b11.size() == 2);
+ ASIO_CHECK(memcmp(b11.data(), "\xF0\x0F", 2) == 0);
+#endif // (defined(ASIO_HAS_USER_DEFINED_LITERALS)
+}
+
+} // namespace buffer_literals
+
//------------------------------------------------------------------------------
ASIO_TEST_SUITE
@@ -827,4 +909,5 @@ ASIO_TEST_SUITE
ASIO_COMPILE_TEST_CASE(buffer_compile::test)
ASIO_TEST_CASE(buffer_copy_runtime::test)
ASIO_TEST_CASE(buffer_sequence::test)
+ ASIO_TEST_CASE(buffer_literals::test)
)
diff --git a/3rdparty/asio/src/tests/unit/buffer_registration.cpp b/3rdparty/asio/src/tests/unit/buffer_registration.cpp
new file mode 100644
index 00000000000..72826a394cc
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/buffer_registration.cpp
@@ -0,0 +1,25 @@
+//
+// buffer_registration.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/buffer_registration.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "buffer_registration",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/buffered_read_stream.cpp b/3rdparty/asio/src/tests/unit/buffered_read_stream.cpp
index d517dbb96ea..21b4abc0bbb 100644
--- a/3rdparty/asio/src/tests/unit/buffered_read_stream.cpp
+++ b/3rdparty/asio/src/tests/unit/buffered_read_stream.cpp
@@ -2,7 +2,7 @@
// buffered_read_stream.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,6 +17,7 @@
#include "asio/buffered_read_stream.hpp"
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/buffer.hpp"
#include "asio/io_context.hpp"
@@ -30,12 +31,6 @@
# include <array>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
typedef asio::buffered_read_stream<
asio::ip::tcp::socket> stream_type;
@@ -247,11 +242,7 @@ void test_async_operations()
{
using namespace std; // For memcmp.
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -332,7 +323,7 @@ void test_async_operations()
ASIO_TEST_SUITE
(
"buffered_read_stream",
- ASIO_TEST_CASE(test_compile)
+ ASIO_COMPILE_TEST_CASE(test_compile)
ASIO_TEST_CASE(test_sync_operations)
ASIO_TEST_CASE(test_async_operations)
)
diff --git a/3rdparty/asio/src/tests/unit/buffered_stream.cpp b/3rdparty/asio/src/tests/unit/buffered_stream.cpp
index d9cf845c0d0..4830ec277de 100644
--- a/3rdparty/asio/src/tests/unit/buffered_stream.cpp
+++ b/3rdparty/asio/src/tests/unit/buffered_stream.cpp
@@ -2,7 +2,7 @@
// buffered_stream.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,6 +17,7 @@
#include "asio/buffered_stream.hpp"
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/buffer.hpp"
#include "asio/io_context.hpp"
@@ -30,12 +31,6 @@
# include <array>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
typedef asio::buffered_stream<
asio::ip::tcp::socket> stream_type;
@@ -265,11 +260,7 @@ void test_async_operations()
{
using namespace std; // For memcmp.
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -358,7 +349,7 @@ void test_async_operations()
ASIO_TEST_SUITE
(
"buffered_stream",
- ASIO_TEST_CASE(test_compile)
+ ASIO_COMPILE_TEST_CASE(test_compile)
ASIO_TEST_CASE(test_sync_operations)
ASIO_TEST_CASE(test_async_operations)
)
diff --git a/3rdparty/asio/src/tests/unit/buffered_write_stream.cpp b/3rdparty/asio/src/tests/unit/buffered_write_stream.cpp
index 8ddbec7abb1..635ff984b8d 100644
--- a/3rdparty/asio/src/tests/unit/buffered_write_stream.cpp
+++ b/3rdparty/asio/src/tests/unit/buffered_write_stream.cpp
@@ -2,7 +2,7 @@
// buffered_write_stream.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,6 +17,7 @@
#include "asio/buffered_write_stream.hpp"
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/buffer.hpp"
#include "asio/io_context.hpp"
@@ -30,12 +31,6 @@
# include <array>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
typedef asio::buffered_write_stream<
asio::ip::tcp::socket> stream_type;
@@ -254,11 +249,7 @@ void test_async_operations()
{
using namespace std; // For memcmp.
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -347,7 +338,7 @@ void test_async_operations()
ASIO_TEST_SUITE
(
"buffered_write_stream",
- ASIO_TEST_CASE(test_compile)
+ ASIO_COMPILE_TEST_CASE(test_compile)
ASIO_TEST_CASE(test_sync_operations)
ASIO_TEST_CASE(test_async_operations)
)
diff --git a/3rdparty/asio/src/tests/unit/buffers_iterator.cpp b/3rdparty/asio/src/tests/unit/buffers_iterator.cpp
index 27df26340a4..071dc1bb8b3 100644
--- a/3rdparty/asio/src/tests/unit/buffers_iterator.cpp
+++ b/3rdparty/asio/src/tests/unit/buffers_iterator.cpp
@@ -2,7 +2,7 @@
// buffers_iterator.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,17 +16,10 @@
// Test that header file is self-contained.
#include "asio/buffers_iterator.hpp"
+#include <array>
#include "asio/buffer.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_ARRAY)
-# include <boost/array.hpp>
-#endif // defined(ASIO_HAS_BOOST_ARRAY)
-
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
//------------------------------------------------------------------------------
// buffers_iterator_compile test
@@ -36,11 +29,7 @@
namespace buffers_iterator_compile {
-#if defined(ASIO_HAS_BOOST_ARRAY)
-using boost::array;
-#elif defined(ASIO_HAS_STD_ARRAY)
using std::array;
-#endif // defined(ASIO_HAS_BOOST_ARRAY)
using std::vector;
using namespace asio;
@@ -288,5 +277,5 @@ void test()
ASIO_TEST_SUITE
(
"buffers_iterator",
- ASIO_TEST_CASE(buffers_iterator_compile::test)
+ ASIO_COMPILE_TEST_CASE(buffers_iterator_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/cancellation_signal.cpp b/3rdparty/asio/src/tests/unit/cancellation_signal.cpp
index 50ca93221d0..0b0f72fcbcb 100644
--- a/3rdparty/asio/src/tests/unit/cancellation_signal.cpp
+++ b/3rdparty/asio/src/tests/unit/cancellation_signal.cpp
@@ -2,7 +2,7 @@
// cancellation_signal.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/cancellation_state.cpp b/3rdparty/asio/src/tests/unit/cancellation_state.cpp
index 3e6023f4182..74bc6566916 100644
--- a/3rdparty/asio/src/tests/unit/cancellation_state.cpp
+++ b/3rdparty/asio/src/tests/unit/cancellation_state.cpp
@@ -2,7 +2,7 @@
// cancellation_state.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/cancellation_type.cpp b/3rdparty/asio/src/tests/unit/cancellation_type.cpp
index edf6ccf0c4c..fd6accb0a05 100644
--- a/3rdparty/asio/src/tests/unit/cancellation_type.cpp
+++ b/3rdparty/asio/src/tests/unit/cancellation_type.cpp
@@ -2,7 +2,7 @@
// cancellation_type.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/co_spawn.cpp b/3rdparty/asio/src/tests/unit/co_spawn.cpp
index e902e1f2d0a..c5d1fbf776d 100644
--- a/3rdparty/asio/src/tests/unit/co_spawn.cpp
+++ b/3rdparty/asio/src/tests/unit/co_spawn.cpp
@@ -2,7 +2,7 @@
// co_spawn.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -18,8 +18,116 @@
#include "unit_test.hpp"
+#if defined(ASIO_HAS_CO_AWAIT)
+
+#include <stdexcept>
+#include "asio/any_completion_handler.hpp"
+#include "asio/bind_cancellation_slot.hpp"
+#include "asio/io_context.hpp"
+
+asio::awaitable<void> void_returning_coroutine()
+{
+ co_return;
+}
+
+asio::awaitable<int> int_returning_coroutine()
+{
+ co_return 42;
+}
+
+void test_co_spawn_with_any_completion_handler()
+{
+ asio::io_context ctx;
+
+ bool called = false;
+ asio::co_spawn(ctx, void_returning_coroutine(),
+ asio::any_completion_handler<void(std::exception_ptr)>(
+ [&](std::exception_ptr)
+ {
+ called = true;
+ }));
+
+ ASIO_CHECK(!called);
+
+ ctx.run();
+
+ ASIO_CHECK(called);
+
+ int result = 0;
+ asio::co_spawn(ctx, int_returning_coroutine(),
+ asio::any_completion_handler<void(std::exception_ptr, int)>(
+ [&](std::exception_ptr, int i)
+ {
+ result = i;
+ }));
+
+ ASIO_CHECK(result == 0);
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(result == 42);
+}
+
+void test_co_spawn_immediate_cancel()
+{
+ asio::cancellation_signal sig;
+ asio::io_context ctx;
+
+ std::exception_ptr result = nullptr;
+ bool called = false;
+ asio::co_spawn(ctx, void_returning_coroutine(),
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](std::exception_ptr e)
+ {
+ result = e;
+ called = true;
+ }));
+
+ ASIO_CHECK(!called);
+ ASIO_CHECK(result == nullptr);
+
+ sig.emit(asio::cancellation_type::all);
+ ctx.run();
+
+ ASIO_CHECK(called);
+ ASIO_CHECK(result != nullptr);
+
+ result = nullptr;
+ called = false;
+ asio::co_spawn(ctx, int_returning_coroutine(),
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](std::exception_ptr e, int i)
+ {
+ ASIO_CHECK(i != 42);
+ result = e;
+ called = true;
+ }));
+
+ ASIO_CHECK(!called);
+ ASIO_CHECK(result == nullptr);
+
+ sig.emit(asio::cancellation_type::all);
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(called);
+ ASIO_CHECK(result != nullptr);
+}
+
+ASIO_TEST_SUITE
+(
+ "co_spawn",
+ ASIO_TEST_CASE(test_co_spawn_with_any_completion_handler)
+ ASIO_TEST_CASE(test_co_spawn_immediate_cancel)
+)
+
+#else // defined(ASIO_HAS_CO_AWAIT)
+
ASIO_TEST_SUITE
(
"co_spawn",
ASIO_TEST_CASE(null_test)
)
+
+#endif // defined(ASIO_HAS_CO_AWAIT)
diff --git a/3rdparty/asio/src/tests/unit/completion_condition.cpp b/3rdparty/asio/src/tests/unit/completion_condition.cpp
index 3986b5a545a..106789e5e3c 100644
--- a/3rdparty/asio/src/tests/unit/completion_condition.cpp
+++ b/3rdparty/asio/src/tests/unit/completion_condition.cpp
@@ -2,7 +2,7 @@
// completion_condition.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/compose.cpp b/3rdparty/asio/src/tests/unit/compose.cpp
index faf515fa184..c9820af2fd3 100644
--- a/3rdparty/asio/src/tests/unit/compose.cpp
+++ b/3rdparty/asio/src/tests/unit/compose.cpp
@@ -2,7 +2,7 @@
// compose.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,19 +16,13 @@
// Test that header file is self-contained.
#include "asio/compose.hpp"
-#include "unit_test.hpp"
-
+#include <functional>
#include "asio/bind_cancellation_slot.hpp"
#include "asio/cancellation_signal.hpp"
#include "asio/io_context.hpp"
#include "asio/post.hpp"
#include "asio/system_timer.hpp"
-
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
+#include "unit_test.hpp"
//------------------------------------------------------------------------------
@@ -48,7 +42,7 @@ public:
{
case starting:
state_ = posting;
- asio::post(ioc_, ASIO_MOVE_CAST(Self)(self));
+ asio::post(ioc_, static_cast<Self&&>(self));
break;
case posting:
self.complete();
@@ -66,7 +60,7 @@ private:
template <typename CompletionToken>
ASIO_INITFN_RESULT_TYPE(CompletionToken, void())
async_0_completion_args(asio::io_context& ioc,
- ASIO_MOVE_ARG(CompletionToken) token)
+ CompletionToken&& token)
{
return asio::async_compose<CompletionToken, void()>(
impl_0_completion_args(ioc), token);
@@ -89,11 +83,7 @@ struct compose_0_args_lvalue_handler
void compose_0_completion_args_test()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
asio::io_context ioc;
int count = 0;
@@ -145,7 +135,7 @@ public:
{
case starting:
state_ = posting;
- asio::post(ioc_, ASIO_MOVE_CAST(Self)(self));
+ asio::post(ioc_, static_cast<Self&&>(self));
break;
case posting:
self.complete(42);
@@ -163,7 +153,7 @@ private:
template <typename CompletionToken>
ASIO_INITFN_RESULT_TYPE(CompletionToken, void(int))
async_1_completion_arg(asio::io_context& ioc,
- ASIO_MOVE_ARG(CompletionToken) token)
+ CompletionToken&& token)
{
return asio::async_compose<CompletionToken, void(int)>(
impl_1_completion_arg(ioc), token);
@@ -189,11 +179,7 @@ struct compose_1_arg_lvalue_handler
void compose_1_completion_arg_test()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
asio::io_context ioc;
@@ -262,7 +248,7 @@ public:
self.reset_cancellation_state(cancellation_filter_);
state_ = waiting;
timer_.expires_after(asio::chrono::milliseconds(100));
- timer_.async_wait(ASIO_MOVE_CAST(Self)(self));
+ timer_.async_wait(static_cast<Self&&>(self));
break;
case waiting:
self.complete(!ec);
@@ -282,7 +268,7 @@ template <typename CancellationFilter, typename CompletionToken>
ASIO_INITFN_RESULT_TYPE(CompletionToken, void(bool))
async_cancellable(CancellationFilter cancellation_filter,
asio::system_timer& timer,
- ASIO_MOVE_ARG(CompletionToken) token)
+ CompletionToken&& token)
{
return asio::async_compose<CompletionToken, void(bool)>(
impl_cancellable<CancellationFilter>(cancellation_filter, timer), token);
@@ -297,11 +283,7 @@ void compose_partial_cancellation_handler(
void compose_default_cancellation_test()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
asio::io_context ioc;
@@ -379,11 +361,7 @@ void compose_default_cancellation_test()
void compose_partial_cancellation_test()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
asio::io_context ioc;
@@ -461,11 +439,7 @@ void compose_partial_cancellation_test()
void compose_total_cancellation_test()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
asio::io_context ioc;
diff --git a/3rdparty/asio/src/tests/unit/connect.cpp b/3rdparty/asio/src/tests/unit/connect.cpp
index b7306b02abe..16c0331b4a3 100644
--- a/3rdparty/asio/src/tests/unit/connect.cpp
+++ b/3rdparty/asio/src/tests/unit/connect.cpp
@@ -2,7 +2,7 @@
// connect.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,23 +16,13 @@
// Test that header file is self-contained.
#include "asio/connect.hpp"
+#include <functional>
#include <vector>
#include "asio/detail/thread.hpp"
#include "asio/ip/tcp.hpp"
-
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
diff --git a/3rdparty/asio/src/tests/unit/connect_pipe.cpp b/3rdparty/asio/src/tests/unit/connect_pipe.cpp
new file mode 100644
index 00000000000..8c71a5d093c
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/connect_pipe.cpp
@@ -0,0 +1,154 @@
+//
+// connect_pipe.cpp
+// ~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/connect_pipe.hpp"
+
+#include <functional>
+#include <string>
+#include "asio/io_context.hpp"
+#include "asio/read.hpp"
+#include "asio/readable_pipe.hpp"
+#include "asio/writable_pipe.hpp"
+#include "asio/write.hpp"
+#include "unit_test.hpp"
+
+//------------------------------------------------------------------------------
+
+// connect_pipe_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all connect_pipe functions compile and link
+// correctly. Runtime failures are ignored.
+
+namespace connect_pipe_compile {
+
+void test()
+{
+#if defined(ASIO_HAS_PIPE)
+ using namespace asio;
+
+ try
+ {
+ asio::io_context io_context;
+ asio::error_code ec1;
+
+ readable_pipe p1(io_context);
+ writable_pipe p2(io_context);
+ connect_pipe(p1, p2);
+
+ readable_pipe p3(io_context);
+ writable_pipe p4(io_context);
+ connect_pipe(p3, p4, ec1);
+ }
+ catch (std::exception&)
+ {
+ }
+#endif // defined(ASIO_HAS_PIPE)
+}
+
+} // namespace connect_pipe_compile
+
+//------------------------------------------------------------------------------
+
+// connect_pipe_runtime test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that connect_pipe operates correctly at runtime.
+
+namespace connect_pipe_runtime {
+
+static const char write_data[]
+ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+
+void handle_read(const asio::error_code& err,
+ size_t bytes_transferred, bool* called)
+{
+ *called = true;
+ ASIO_CHECK(!err);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+}
+
+void handle_write(const asio::error_code& err,
+ size_t bytes_transferred, bool* called)
+{
+ *called = true;
+ ASIO_CHECK(!err);
+ ASIO_CHECK(bytes_transferred == sizeof(write_data));
+}
+
+void test()
+{
+#if defined(ASIO_HAS_PIPE)
+ using namespace std; // For memcmp.
+ using namespace asio;
+
+ namespace bindns = std;
+ using bindns::placeholders::_1;
+ using bindns::placeholders::_2;
+
+ try
+ {
+ asio::io_context io_context;
+ asio::error_code ec1;
+ asio::error_code ec2;
+
+ readable_pipe p1(io_context);
+ writable_pipe p2(io_context);
+ connect_pipe(p1, p2);
+
+ std::string data1 = write_data;
+ asio::write(p2, asio::buffer(data1));
+
+ std::string data2;
+ data2.resize(data1.size());
+ asio::read(p1, asio::buffer(data2));
+
+ ASIO_CHECK(data1 == data2);
+
+ char read_buffer[sizeof(write_data)];
+ bool read_completed = false;
+ asio::async_read(p1,
+ asio::buffer(read_buffer),
+ bindns::bind(handle_read,
+ _1, _2, &read_completed));
+
+ bool write_completed = false;
+ asio::async_write(p2,
+ asio::buffer(write_data),
+ bindns::bind(handle_write,
+ _1, _2, &write_completed));
+
+ io_context.run();
+
+ ASIO_CHECK(read_completed);
+ ASIO_CHECK(write_completed);
+ ASIO_CHECK(memcmp(read_buffer, write_data, sizeof(write_data)) == 0);
+ }
+ catch (std::exception&)
+ {
+ ASIO_CHECK(false);
+ }
+#endif // defined(ASIO_HAS_PIPE)
+}
+
+} // namespace connect_pipe_compile
+
+//------------------------------------------------------------------------------
+
+ASIO_TEST_SUITE
+(
+ "connect_pipe",
+ ASIO_COMPILE_TEST_CASE(connect_pipe_compile::test)
+ ASIO_TEST_CASE(connect_pipe_runtime::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/consign.cpp b/3rdparty/asio/src/tests/unit/consign.cpp
new file mode 100644
index 00000000000..b24f5281c75
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/consign.cpp
@@ -0,0 +1,56 @@
+//
+// consign.cpp
+// ~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/consign.hpp"
+
+#include "asio/bind_executor.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "asio/system_timer.hpp"
+#include "unit_test.hpp"
+
+void consign_test()
+{
+ asio::io_context io1;
+ asio::io_context io2;
+ asio::system_timer timer1(io1);
+ int count = 0;
+
+ timer1.expires_after(asio::chrono::seconds(0));
+ timer1.async_wait(
+ asio::consign(
+ asio::bind_executor(io2.get_executor(),
+ [&count](asio::error_code)
+ {
+ ++count;
+ }), 123, 321));
+
+ ASIO_CHECK(count == 0);
+
+ io1.run();
+
+ ASIO_CHECK(count == 0);
+
+ io2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+ASIO_TEST_SUITE
+(
+ "consign",
+ ASIO_TEST_CASE(consign_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/coroutine.cpp b/3rdparty/asio/src/tests/unit/coroutine.cpp
index cd8fc9c12ba..72e6953a31a 100644
--- a/3rdparty/asio/src/tests/unit/coroutine.cpp
+++ b/3rdparty/asio/src/tests/unit/coroutine.cpp
@@ -2,7 +2,7 @@
// coroutine.cpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/deadline_timer.cpp b/3rdparty/asio/src/tests/unit/deadline_timer.cpp
index 15d00b0d83b..9bc7f16fcd2 100644
--- a/3rdparty/asio/src/tests/unit/deadline_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/deadline_timer.cpp
@@ -2,7 +2,7 @@
// deadline_timer.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -268,18 +268,18 @@ struct custom_allocation_timer_handler
typedef allocator<U> other;
};
- explicit allocator(int* count) ASIO_NOEXCEPT
+ explicit allocator(int* count) noexcept
: count_(count)
{
}
- allocator(const allocator& other) ASIO_NOEXCEPT
+ allocator(const allocator& other) noexcept
: count_(other.count_)
{
}
template <typename U>
- allocator(const allocator<U>& other) ASIO_NOEXCEPT
+ allocator(const allocator<U>& other) noexcept
: count_(other.count_)
{
}
@@ -316,7 +316,7 @@ struct custom_allocation_timer_handler
typedef allocator<int> allocator_type;
- allocator_type get_allocator() const ASIO_NOEXCEPT
+ allocator_type get_allocator() const noexcept
{
return allocator_type(count_);
}
@@ -396,7 +396,6 @@ void deadline_timer_async_result_test()
ioc.run();
}
-#if defined(ASIO_HAS_MOVE)
asio::deadline_timer make_timer(asio::io_context& ioc, int* count)
{
asio::deadline_timer t(ioc);
@@ -404,11 +403,9 @@ asio::deadline_timer make_timer(asio::io_context& ioc, int* count)
t.async_wait(boost::bind(increment, count));
return t;
}
-#endif // defined(ASIO_HAS_MOVE)
void deadline_timer_move_test()
{
-#if defined(ASIO_HAS_MOVE)
asio::io_context io_context1;
asio::io_context io_context2;
int count = 0;
@@ -426,7 +423,6 @@ void deadline_timer_move_test()
io_context1.run();
ASIO_CHECK(count == 2);
-#endif // defined(ASIO_HAS_MOVE)
}
ASIO_TEST_SUITE
diff --git a/3rdparty/asio/src/tests/unit/defer.cpp b/3rdparty/asio/src/tests/unit/defer.cpp
index f7f03b326bf..f41c1b9f025 100644
--- a/3rdparty/asio/src/tests/unit/defer.cpp
+++ b/3rdparty/asio/src/tests/unit/defer.cpp
@@ -2,7 +2,7 @@
// defer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/experimental/deferred.cpp b/3rdparty/asio/src/tests/unit/deferred.cpp
index a5ae8ed85e5..b2db70d4b3d 100644
--- a/3rdparty/asio/src/tests/unit/experimental/deferred.cpp
+++ b/3rdparty/asio/src/tests/unit/deferred.cpp
@@ -1,8 +1,8 @@
//
-// experimental/deferred.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
+// deferred.cpp
+// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -14,9 +14,9 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/experimental/deferred.hpp"
+#include "asio/deferred.hpp"
-#include "../unit_test.hpp"
+#include "unit_test.hpp"
ASIO_TEST_SUITE
(
diff --git a/3rdparty/asio/src/tests/unit/detached.cpp b/3rdparty/asio/src/tests/unit/detached.cpp
index 2ccd619cef0..506c13d8773 100644
--- a/3rdparty/asio/src/tests/unit/detached.cpp
+++ b/3rdparty/asio/src/tests/unit/detached.cpp
@@ -2,7 +2,7 @@
// detached.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/dispatch.cpp b/3rdparty/asio/src/tests/unit/dispatch.cpp
index 4d67530f5ba..f6fb84d4f91 100644
--- a/3rdparty/asio/src/tests/unit/dispatch.cpp
+++ b/3rdparty/asio/src/tests/unit/dispatch.cpp
@@ -2,7 +2,7 @@
// dispatch.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/error.cpp b/3rdparty/asio/src/tests/unit/error.cpp
index 79c0c75336c..3f8aa75efbe 100644
--- a/3rdparty/asio/src/tests/unit/error.cpp
+++ b/3rdparty/asio/src/tests/unit/error.cpp
@@ -2,7 +2,7 @@
// error.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/execution/any_executor.cpp b/3rdparty/asio/src/tests/unit/execution/any_executor.cpp
index d18c58c2843..3e2dabdc5a5 100644
--- a/3rdparty/asio/src/tests/unit/execution/any_executor.cpp
+++ b/3rdparty/asio/src/tests/unit/execution/any_executor.cpp
@@ -2,7 +2,7 @@
// any_executor.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,22 +17,25 @@
#include "asio/execution/any_executor.hpp"
#include <cstring>
+#include <functional>
#include "asio/thread_pool.hpp"
#include "../unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
+
+static bool next_nothrow_new_fails = false;
+
+void* operator new(std::size_t n,
+ const std::nothrow_t&) noexcept
+{
+ if (next_nothrow_new_fails)
+ {
+ next_nothrow_new_fails = false;
+ return 0;
+ }
+ return ::operator new(n);
+}
struct fat_executor
{
@@ -53,13 +56,13 @@ struct fat_executor
}
friend bool operator==(const fat_executor& a,
- const fat_executor& b) ASIO_NOEXCEPT
+ const fat_executor& b) noexcept
{
return a.id_ == b.id_;
}
friend bool operator!=(const fat_executor& a,
- const fat_executor& b) ASIO_NOEXCEPT
+ const fat_executor& b) noexcept
{
return a.id_ != b.id_;
}
@@ -76,8 +79,8 @@ namespace traits {
template <typename F>
struct execute_member<fat_executor, F>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef void result_type;
};
@@ -88,8 +91,8 @@ struct execute_member<fat_executor, F>
template <>
struct query_member<fat_executor, execution::occupancy_t>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef std::size_t result_type;
};
@@ -100,8 +103,8 @@ struct query_member<fat_executor, execution::occupancy_t>
template <>
struct equality_comparable<fat_executor>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -189,7 +192,6 @@ void any_executor_construction_test()
ASIO_CHECK(ex_two_props_9 == ex_two_props_7);
ASIO_CHECK(ex_two_props_9 != ex_two_props_8);
-#if defined(ASIO_HAS_MOVE)
ex_two_props_t ex_two_props_10(std::move(ex_two_props_1));
ASIO_CHECK(ex_two_props_10.target<void>() == 0);
@@ -213,7 +215,6 @@ void any_executor_construction_test()
ASIO_CHECK(ex_two_props_7 == null_ptr);
ASIO_CHECK(ex_two_props_12 == ex_two_props_6);
ASIO_CHECK(ex_two_props_12 != ex_two_props_8);
-#endif // defined(ASIO_HAS_MOVE)
ex_one_prop_t ex_one_prop_1;
@@ -274,7 +275,6 @@ void any_executor_construction_test()
ASIO_CHECK(ex_one_prop_9 == ex_one_prop_7);
ASIO_CHECK(ex_one_prop_9 != ex_one_prop_8);
-#if defined(ASIO_HAS_MOVE)
ex_one_prop_t ex_one_prop_10(std::move(ex_one_prop_1));
ASIO_CHECK(ex_one_prop_10.target<void>() == 0);
@@ -298,7 +298,6 @@ void any_executor_construction_test()
ASIO_CHECK(ex_one_prop_7 == null_ptr);
ASIO_CHECK(ex_one_prop_12 == ex_one_prop_6);
ASIO_CHECK(ex_one_prop_12 != ex_one_prop_8);
-#endif // defined(ASIO_HAS_MOVE)
ex_one_prop_t ex_one_prop_13(ex_two_props_1);
@@ -374,7 +373,6 @@ void any_executor_construction_test()
ASIO_CHECK(ex_no_props_9 == ex_no_props_7);
ASIO_CHECK(ex_no_props_9 != ex_no_props_8);
-#if defined(ASIO_HAS_MOVE)
ex_no_props_t ex_no_props_10(std::move(ex_no_props_1));
ASIO_CHECK(ex_no_props_10.target<void>() == 0);
@@ -398,7 +396,6 @@ void any_executor_construction_test()
ASIO_CHECK(ex_no_props_7 == null_ptr);
ASIO_CHECK(ex_no_props_12 == ex_no_props_6);
ASIO_CHECK(ex_no_props_12 != ex_no_props_8);
-#endif // defined(ASIO_HAS_MOVE)
ex_no_props_t ex_no_props_13(ex_two_props_1);
@@ -431,6 +428,338 @@ void any_executor_construction_test()
ASIO_CHECK(ex_no_props_18 != null_ptr);
}
+void any_executor_nothrow_construction_test()
+{
+ typedef execution::any_executor<> ex_no_props_t;
+
+ typedef execution::any_executor<
+ execution::blocking_t
+ > ex_one_prop_t;
+
+ typedef execution::any_executor<
+ execution::blocking_t,
+ execution::occupancy_t
+ > ex_two_props_t;
+
+ thread_pool pool(1);
+ asio::nullptr_t null_ptr = asio::nullptr_t();
+
+ ex_two_props_t ex_two_props_1;
+
+ ASIO_CHECK(ex_two_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_1 == null_ptr);
+
+ ex_two_props_t ex_two_props_2(null_ptr);
+
+ ASIO_CHECK(ex_two_props_2.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_2 == null_ptr);
+ ASIO_CHECK(ex_two_props_2 == ex_two_props_1);
+
+ ex_two_props_t ex_two_props_3(std::nothrow, pool.executor());
+
+ ASIO_CHECK(ex_two_props_3.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_3 != null_ptr);
+ ASIO_CHECK(ex_two_props_3 != ex_two_props_1);
+
+ ex_two_props_t ex_two_props_4(std::nothrow, ex_two_props_1);
+
+ ASIO_CHECK(ex_two_props_4.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_4 == null_ptr);
+ ASIO_CHECK(ex_two_props_4 == ex_two_props_1);
+
+ ex_two_props_t ex_two_props_5(std::nothrow, ex_two_props_3);
+
+ ASIO_CHECK(ex_two_props_5.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_5 != null_ptr);
+ ASIO_CHECK(ex_two_props_5 == ex_two_props_3);
+
+ ex_two_props_t ex_two_props_6(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex_two_props_6.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_6 != null_ptr);
+ ASIO_CHECK(ex_two_props_6 != ex_two_props_1);
+
+ ex_two_props_t ex_two_props_7(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex_two_props_7.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_7 != null_ptr);
+ ASIO_CHECK(ex_two_props_7 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_7 == ex_two_props_6);
+
+ ex_two_props_t ex_two_props_8(std::nothrow, fat_executor(2));
+
+ ASIO_CHECK(ex_two_props_8.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_8 != null_ptr);
+ ASIO_CHECK(ex_two_props_8 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_8 != ex_two_props_6);
+ ASIO_CHECK(ex_two_props_8 != ex_two_props_7);
+
+ ex_two_props_t ex_two_props_9(std::nothrow, ex_two_props_6);
+
+ ASIO_CHECK(ex_two_props_9.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_9 != null_ptr);
+ ASIO_CHECK(ex_two_props_9 != ex_two_props_1);
+ ASIO_CHECK(ex_two_props_9 == ex_two_props_6);
+ ASIO_CHECK(ex_two_props_9 == ex_two_props_7);
+ ASIO_CHECK(ex_two_props_9 != ex_two_props_8);
+
+ ex_two_props_t ex_two_props_10(std::nothrow, std::move(ex_two_props_1));
+
+ ASIO_CHECK(ex_two_props_10.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_10 == null_ptr);
+ ASIO_CHECK(ex_two_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_1 == null_ptr);
+
+ ex_two_props_t ex_two_props_11(std::nothrow, std::move(ex_two_props_3));
+
+ ASIO_CHECK(ex_two_props_11.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_11 != null_ptr);
+ ASIO_CHECK(ex_two_props_3.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_3 == null_ptr);
+ ASIO_CHECK(ex_two_props_11 == ex_two_props_5);
+
+ ex_two_props_t ex_two_props_12(std::nothrow, std::move(ex_two_props_7));
+
+ ASIO_CHECK(ex_two_props_12.target<void>() != 0);
+ ASIO_CHECK(ex_two_props_12 != null_ptr);
+ ASIO_CHECK(ex_two_props_7.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_7 == null_ptr);
+ ASIO_CHECK(ex_two_props_12 == ex_two_props_6);
+ ASIO_CHECK(ex_two_props_12 != ex_two_props_8);
+
+ next_nothrow_new_fails = true;
+ ex_two_props_t ex_two_props_13(std::nothrow, fat_executor(3));
+
+ ASIO_CHECK(ex_two_props_13.target<void>() == 0);
+ ASIO_CHECK(ex_two_props_13 == null_ptr);
+ ASIO_CHECK(ex_two_props_13 == ex_two_props_1);
+
+ ex_one_prop_t ex_one_prop_1;
+
+ ASIO_CHECK(ex_one_prop_1.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_1 == null_ptr);
+
+ ex_one_prop_t ex_one_prop_2(null_ptr);
+
+ ASIO_CHECK(ex_one_prop_2.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_2 == null_ptr);
+ ASIO_CHECK(ex_one_prop_2 == ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_3(std::nothrow, pool.executor());
+
+ ASIO_CHECK(ex_one_prop_3.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_3 != null_ptr);
+ ASIO_CHECK(ex_one_prop_3 != ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_4(std::nothrow, ex_one_prop_1);
+
+ ASIO_CHECK(ex_one_prop_4.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_4 == null_ptr);
+ ASIO_CHECK(ex_one_prop_4 == ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_5(std::nothrow, ex_one_prop_3);
+
+ ASIO_CHECK(ex_one_prop_5.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_5 != null_ptr);
+ ASIO_CHECK(ex_one_prop_5 == ex_one_prop_3);
+
+ ex_one_prop_t ex_one_prop_6 = fat_executor(1);
+
+ ASIO_CHECK(ex_one_prop_6.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_6 != null_ptr);
+ ASIO_CHECK(ex_one_prop_6 != ex_one_prop_1);
+
+ ex_one_prop_t ex_one_prop_7(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex_one_prop_7.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_7 != null_ptr);
+ ASIO_CHECK(ex_one_prop_7 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_7 == ex_one_prop_6);
+
+ ex_one_prop_t ex_one_prop_8(std::nothrow, fat_executor(2));
+
+ ASIO_CHECK(ex_one_prop_8.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_8 != null_ptr);
+ ASIO_CHECK(ex_one_prop_8 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_8 != ex_one_prop_6);
+ ASIO_CHECK(ex_one_prop_8 != ex_one_prop_7);
+
+ ex_one_prop_t ex_one_prop_9(std::nothrow, ex_one_prop_6);
+
+ ASIO_CHECK(ex_one_prop_9.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_9 != null_ptr);
+ ASIO_CHECK(ex_one_prop_9 != ex_one_prop_1);
+ ASIO_CHECK(ex_one_prop_9 == ex_one_prop_6);
+ ASIO_CHECK(ex_one_prop_9 == ex_one_prop_7);
+ ASIO_CHECK(ex_one_prop_9 != ex_one_prop_8);
+
+ ex_one_prop_t ex_one_prop_10(std::nothrow, std::move(ex_one_prop_1));
+
+ ASIO_CHECK(ex_one_prop_10.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_10 == null_ptr);
+ ASIO_CHECK(ex_one_prop_1.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_1 == null_ptr);
+
+ ex_one_prop_t ex_one_prop_11(std::nothrow, std::move(ex_one_prop_3));
+
+ ASIO_CHECK(ex_one_prop_11.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_11 != null_ptr);
+ ASIO_CHECK(ex_one_prop_3.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_3 == null_ptr);
+ ASIO_CHECK(ex_one_prop_11 == ex_one_prop_5);
+
+ ex_one_prop_t ex_one_prop_12(std::nothrow, std::move(ex_one_prop_7));
+
+ ASIO_CHECK(ex_one_prop_12.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_12 != null_ptr);
+ ASIO_CHECK(ex_one_prop_7.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_7 == null_ptr);
+ ASIO_CHECK(ex_one_prop_12 == ex_one_prop_6);
+ ASIO_CHECK(ex_one_prop_12 != ex_one_prop_8);
+
+ ex_one_prop_t ex_one_prop_13(std::nothrow, ex_two_props_1);
+
+ ASIO_CHECK(ex_one_prop_13.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_13 == null_ptr);
+
+ ex_one_prop_t ex_one_prop_14(std::nothrow, ex_two_props_5);
+
+ ASIO_CHECK(ex_one_prop_14.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_14 != null_ptr);
+
+ ex_one_prop_t ex_one_prop_15(std::nothrow, ex_two_props_9);
+
+ ASIO_CHECK(ex_one_prop_15.target<void>() != 0);
+ ASIO_CHECK(ex_one_prop_15 != null_ptr);
+
+ next_nothrow_new_fails = true;
+ ex_one_prop_t ex_one_prop_16(std::nothrow, fat_executor(3));
+
+ ASIO_CHECK(ex_one_prop_16.target<void>() == 0);
+ ASIO_CHECK(ex_one_prop_16 == null_ptr);
+ ASIO_CHECK(ex_one_prop_16 == ex_one_prop_1);
+
+ ex_no_props_t ex_no_props_1;
+
+ ASIO_CHECK(ex_no_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_1 == null_ptr);
+
+ ex_no_props_t ex_no_props_2(null_ptr);
+
+ ASIO_CHECK(ex_no_props_2.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_2 == null_ptr);
+ ASIO_CHECK(ex_no_props_2 == ex_no_props_1);
+
+ ex_no_props_t ex_no_props_3(std::nothrow, pool.executor());
+
+ ASIO_CHECK(ex_no_props_3.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_3 != null_ptr);
+ ASIO_CHECK(ex_no_props_3 != ex_no_props_1);
+
+ ex_no_props_t ex_no_props_4(std::nothrow, ex_no_props_1);
+
+ ASIO_CHECK(ex_no_props_4.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_4 == null_ptr);
+ ASIO_CHECK(ex_no_props_4 == ex_no_props_1);
+
+ ex_no_props_t ex_no_props_5(std::nothrow, ex_no_props_3);
+
+ ASIO_CHECK(ex_no_props_5.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_5 != null_ptr);
+ ASIO_CHECK(ex_no_props_5 == ex_no_props_3);
+
+ ex_no_props_t ex_no_props_6(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex_no_props_6.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_6 != null_ptr);
+ ASIO_CHECK(ex_no_props_6 != ex_no_props_1);
+
+ ex_no_props_t ex_no_props_7(std::nothrow, fat_executor(1));
+
+ ASIO_CHECK(ex_no_props_7.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_7 != null_ptr);
+ ASIO_CHECK(ex_no_props_7 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_7 == ex_no_props_6);
+
+ ex_no_props_t ex_no_props_8(std::nothrow, fat_executor(2));
+
+ ASIO_CHECK(ex_no_props_8.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_8 != null_ptr);
+ ASIO_CHECK(ex_no_props_8 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_8 != ex_no_props_6);
+ ASIO_CHECK(ex_no_props_8 != ex_no_props_7);
+
+ ex_no_props_t ex_no_props_9(std::nothrow, ex_no_props_6);
+
+ ASIO_CHECK(ex_no_props_9.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_9 != null_ptr);
+ ASIO_CHECK(ex_no_props_9 != ex_no_props_1);
+ ASIO_CHECK(ex_no_props_9 == ex_no_props_6);
+ ASIO_CHECK(ex_no_props_9 == ex_no_props_7);
+ ASIO_CHECK(ex_no_props_9 != ex_no_props_8);
+
+ ex_no_props_t ex_no_props_10(std::nothrow, std::move(ex_no_props_1));
+
+ ASIO_CHECK(ex_no_props_10.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_10 == null_ptr);
+ ASIO_CHECK(ex_no_props_1.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_1 == null_ptr);
+
+ ex_no_props_t ex_no_props_11(std::nothrow, std::move(ex_no_props_3));
+
+ ASIO_CHECK(ex_no_props_11.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_11 != null_ptr);
+ ASIO_CHECK(ex_no_props_3.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_3 == null_ptr);
+ ASIO_CHECK(ex_no_props_11 == ex_no_props_5);
+
+ ex_no_props_t ex_no_props_12(std::nothrow, std::move(ex_no_props_7));
+
+ ASIO_CHECK(ex_no_props_12.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_12 != null_ptr);
+ ASIO_CHECK(ex_no_props_7.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_7 == null_ptr);
+ ASIO_CHECK(ex_no_props_12 == ex_no_props_6);
+ ASIO_CHECK(ex_no_props_12 != ex_no_props_8);
+
+ ex_no_props_t ex_no_props_13(std::nothrow, ex_two_props_1);
+
+ ASIO_CHECK(ex_no_props_13.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_13 == null_ptr);
+
+ ex_no_props_t ex_no_props_14(std::nothrow, ex_two_props_5);
+
+ ASIO_CHECK(ex_no_props_14.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_14 != null_ptr);
+
+ ex_no_props_t ex_no_props_15(std::nothrow, ex_two_props_9);
+
+ ASIO_CHECK(ex_no_props_15.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_15 != null_ptr);
+
+ ex_no_props_t ex_no_props_16(std::nothrow, ex_one_prop_1);
+
+ ASIO_CHECK(ex_no_props_16.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_16 == null_ptr);
+
+ ex_no_props_t ex_no_props_17(std::nothrow, ex_one_prop_5);
+
+ ASIO_CHECK(ex_no_props_17.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_17 != null_ptr);
+
+ ex_no_props_t ex_no_props_18(std::nothrow, ex_one_prop_9);
+
+ ASIO_CHECK(ex_no_props_18.target<void>() != 0);
+ ASIO_CHECK(ex_no_props_18 != null_ptr);
+
+ next_nothrow_new_fails = true;
+ ex_no_props_t ex_no_props_19(std::nothrow, fat_executor(3));
+
+ ASIO_CHECK(ex_no_props_19.target<void>() == 0);
+ ASIO_CHECK(ex_no_props_19 == null_ptr);
+ ASIO_CHECK(ex_no_props_19 == ex_no_props_1);
+}
+
void any_executor_assignment_test()
{
typedef execution::any_executor<> ex_no_props_t;
@@ -501,7 +830,6 @@ void any_executor_assignment_test()
ASIO_CHECK(ex_two_props_7 == ex_two_props_5);
ASIO_CHECK(ex_two_props_7 != ex_two_props_6);
-#if defined(ASIO_HAS_MOVE)
ex_two_props_t ex_two_props_8;
ex_two_props_8 = std::move(ex_two_props_1);
@@ -519,7 +847,6 @@ void any_executor_assignment_test()
ASIO_CHECK(ex_two_props_8.target<void>() != 0);
ASIO_CHECK(ex_two_props_5.target<void>() == 0);
ASIO_CHECK(ex_two_props_8 == ex_two_props_7);
-#endif // defined(ASIO_HAS_MOVE)
ex_one_prop_t ex_one_prop_1;
@@ -575,7 +902,6 @@ void any_executor_assignment_test()
ASIO_CHECK(ex_one_prop_7 == ex_one_prop_5);
ASIO_CHECK(ex_one_prop_7 != ex_one_prop_6);
-#if defined(ASIO_HAS_MOVE)
ex_one_prop_t ex_one_prop_8;
ex_one_prop_8 = std::move(ex_one_prop_1);
@@ -593,7 +919,6 @@ void any_executor_assignment_test()
ASIO_CHECK(ex_one_prop_8.target<void>() != 0);
ASIO_CHECK(ex_one_prop_5.target<void>() == 0);
ASIO_CHECK(ex_one_prop_8 == ex_one_prop_7);
-#endif // defined(ASIO_HAS_MOVE)
ex_one_prop_t ex_one_prop_9;
ex_one_prop_9 = ex_two_props_1;
@@ -662,7 +987,6 @@ void any_executor_assignment_test()
ASIO_CHECK(ex_no_props_7 == ex_no_props_5);
ASIO_CHECK(ex_no_props_7 != ex_no_props_6);
-#if defined(ASIO_HAS_MOVE)
ex_no_props_t ex_no_props_8;
ex_no_props_8 = std::move(ex_no_props_1);
@@ -680,7 +1004,6 @@ void any_executor_assignment_test()
ASIO_CHECK(ex_no_props_8.target<void>() != 0);
ASIO_CHECK(ex_no_props_5.target<void>() == 0);
ASIO_CHECK(ex_no_props_8 == ex_no_props_7);
-#endif // defined(ASIO_HAS_MOVE)
ex_no_props_t ex_no_props_9;
ex_no_props_9 = ex_two_props_1;
@@ -838,37 +1161,29 @@ void any_executor_execute_test()
execution::relationship_t::continuation_t>
ex(pool.executor());
- asio::execution::execute(pool.executor(),
- bindns::bind(increment, &count));
+ ex.execute(bindns::bind(increment, &count));
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.possibly),
+ asio::require(ex, asio::execution::blocking.possibly).execute(
bindns::bind(increment, &count));
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.never),
+ asio::require(ex, asio::execution::blocking.never).execute(
bindns::bind(increment, &count));
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.tracked),
- bindns::bind(increment, &count));
+ asio::require(ex,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.tracked
+ ).execute(bindns::bind(increment, &count));
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked),
- bindns::bind(increment, &count));
+ asio::require(ex,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- bindns::bind(increment, &count));
+ asio::require(ex,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
pool.wait();
@@ -879,6 +1194,7 @@ ASIO_TEST_SUITE
(
"any_executor",
ASIO_TEST_CASE(any_executor_construction_test)
+ ASIO_TEST_CASE(any_executor_nothrow_construction_test)
ASIO_TEST_CASE(any_executor_assignment_test)
ASIO_TEST_CASE(any_executor_swap_test)
ASIO_TEST_CASE(any_executor_query_test)
diff --git a/3rdparty/asio/src/tests/unit/execution/blocking.cpp b/3rdparty/asio/src/tests/unit/execution/blocking.cpp
index 848841b6278..ce2ba2f8ea5 100644
--- a/3rdparty/asio/src/tests/unit/execution/blocking.cpp
+++ b/3rdparty/asio/src/tests/unit/execution/blocking.cpp
@@ -2,7 +2,7 @@
// blocking.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -35,12 +35,12 @@ struct ex_nq_nr
{
}
- friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) noexcept
{
return false;
}
@@ -64,7 +64,7 @@ struct is_executor<ex_nq_nr> : asio::true_type
template <typename ResultType, typename ParamType, typename Result>
struct ex_cq_nr
{
- static ASIO_CONSTEXPR ResultType query(ParamType) ASIO_NOEXCEPT
+ static constexpr ResultType query(ParamType) noexcept
{
return Result();
}
@@ -74,12 +74,12 @@ struct ex_cq_nr
{
}
- friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) noexcept
{
return false;
}
@@ -114,12 +114,12 @@ struct query_static_constexpr_member<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Result result_type; // Must return raw result type.
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return Result();
}
@@ -133,7 +133,7 @@ struct query_static_constexpr_member<
template <typename ResultType, typename ParamType, typename Result>
struct ex_mq_nr
{
- ResultType query(ParamType) const ASIO_NOEXCEPT
+ ResultType query(ParamType) const noexcept
{
return Result();
}
@@ -143,12 +143,12 @@ struct ex_mq_nr
{
}
- friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) noexcept
{
return false;
}
@@ -183,8 +183,8 @@ struct query_member<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ResultType result_type;
};
@@ -197,7 +197,7 @@ struct query_member<
template <typename ResultType, typename ParamType, typename Result>
struct ex_fq_nr
{
- friend ResultType query(const ex_fq_nr&, ParamType) ASIO_NOEXCEPT
+ friend ResultType query(const ex_fq_nr&, ParamType) noexcept
{
return Result();
}
@@ -207,12 +207,12 @@ struct ex_fq_nr
{
}
- friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) noexcept
{
return false;
}
@@ -247,8 +247,8 @@ struct query_free<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ResultType result_type;
};
@@ -261,24 +261,24 @@ struct query_free<
template <typename CurrentType, typename OtherType>
struct ex_mq_mr
{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
+ CurrentType query(CurrentType) const noexcept
{
return CurrentType();
}
- CurrentType query(OtherType) const ASIO_NOEXCEPT
+ CurrentType query(OtherType) const noexcept
{
return CurrentType();
}
ex_mq_mr<CurrentType, OtherType> require(
- CurrentType) const ASIO_NOEXCEPT
+ CurrentType) const noexcept
{
return ex_mq_mr<CurrentType, OtherType>();
}
ex_mq_mr<OtherType, CurrentType> require(
- OtherType) const ASIO_NOEXCEPT
+ OtherType) const noexcept
{
return ex_mq_mr<OtherType, CurrentType>();
}
@@ -288,12 +288,12 @@ struct ex_mq_mr
{
}
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return false;
}
@@ -302,13 +302,13 @@ struct ex_mq_mr
template <typename CurrentType>
struct ex_mq_mr<CurrentType, CurrentType>
{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
+ CurrentType query(CurrentType) const noexcept
{
return CurrentType();
}
ex_mq_mr<CurrentType, CurrentType> require(
- CurrentType) const ASIO_NOEXCEPT
+ CurrentType) const noexcept
{
return ex_mq_mr<CurrentType, CurrentType>();
}
@@ -318,12 +318,12 @@ struct ex_mq_mr<CurrentType, CurrentType>
{
}
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return false;
}
@@ -358,8 +358,8 @@ struct query_member<
|| asio::is_convertible<Param, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef CurrentType result_type;
};
@@ -375,8 +375,8 @@ struct require_member<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_mq_mr<CurrentType, OtherType> result_type;
};
@@ -389,8 +389,8 @@ struct require_member<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_mq_mr<OtherType, CurrentType> result_type;
};
@@ -403,36 +403,36 @@ struct require_member<
template <typename CurrentType, typename OtherType>
struct ex_fq_fr
{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
{
return CurrentType();
}
- friend CurrentType query(const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, OtherType) noexcept
{
return CurrentType();
}
friend ex_fq_fr<CurrentType, OtherType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, OtherType>();
}
friend ex_fq_fr<OtherType, CurrentType> require(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ const ex_fq_fr&, OtherType) noexcept
{
return ex_fq_fr<OtherType, CurrentType>();
}
friend ex_fq_fr<CurrentType, OtherType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, OtherType>();
}
friend ex_fq_fr<OtherType, CurrentType> prefer(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ const ex_fq_fr&, OtherType) noexcept
{
return ex_fq_fr<OtherType, CurrentType>();
}
@@ -442,12 +442,12 @@ struct ex_fq_fr
{
}
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return false;
}
@@ -456,19 +456,19 @@ struct ex_fq_fr
template <typename CurrentType>
struct ex_fq_fr<CurrentType, CurrentType>
{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
{
return CurrentType();
}
friend ex_fq_fr<CurrentType, CurrentType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, CurrentType>();
}
friend ex_fq_fr<CurrentType, CurrentType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, CurrentType>();
}
@@ -478,12 +478,12 @@ struct ex_fq_fr<CurrentType, CurrentType>
{
}
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return false;
}
@@ -518,8 +518,8 @@ struct query_free<
|| asio::is_convertible<Param, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef CurrentType result_type;
};
@@ -535,8 +535,8 @@ struct require_free<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<CurrentType, OtherType> result_type;
};
@@ -549,8 +549,8 @@ struct require_free<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<OtherType, CurrentType> result_type;
};
@@ -566,8 +566,8 @@ struct prefer_free<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<CurrentType, OtherType> result_type;
};
@@ -580,8 +580,8 @@ struct prefer_free<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<OtherType, CurrentType> result_type;
};
@@ -594,19 +594,19 @@ struct prefer_free<
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_query()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_query<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_query<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_query<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_query<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -629,29 +629,27 @@ void test_query()
template <typename Executor, typename Param, typename ExpectedResult>
void test_constexpr_query()
{
-#if defined(ASIO_HAS_CONSTEXPR)
constexpr Executor ex1 = {};
constexpr exec::blocking_t result1 = asio::query(ex1, Param());
ASIO_CHECK(result1 == ExpectedResult());
-#endif // defined(ASIO_HAS_CONSTEXPR)
}
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_require()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_require<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_require<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_require<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_require<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -680,19 +678,19 @@ void test_require()
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_prefer()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_prefer<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_prefer<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_prefer<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_prefer<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -721,9 +719,18 @@ void test_prefer()
void test_vars()
{
ASIO_CHECK(s() == exec::blocking);
+ ASIO_CHECK(s() != exec::blocking.possibly);
+ ASIO_CHECK(s() != exec::blocking.always);
+ ASIO_CHECK(s() != exec::blocking.never);
ASIO_CHECK(n1() == exec::blocking.possibly);
+ ASIO_CHECK(n1() != exec::blocking.always);
+ ASIO_CHECK(n1() != exec::blocking.never);
ASIO_CHECK(n2() == exec::blocking.always);
+ ASIO_CHECK(n2() != exec::blocking.possibly);
+ ASIO_CHECK(n2() != exec::blocking.never);
ASIO_CHECK(n3() == exec::blocking.never);
+ ASIO_CHECK(n3() != exec::blocking.possibly);
+ ASIO_CHECK(n3() != exec::blocking.always);
}
ASIO_TEST_SUITE
diff --git a/3rdparty/asio/src/tests/unit/execution/blocking_adaptation.cpp b/3rdparty/asio/src/tests/unit/execution/blocking_adaptation.cpp
index d16650ae799..b6e77dd31a9 100644
--- a/3rdparty/asio/src/tests/unit/execution/blocking_adaptation.cpp
+++ b/3rdparty/asio/src/tests/unit/execution/blocking_adaptation.cpp
@@ -2,7 +2,7 @@
// blocking_adaptation.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -34,12 +34,12 @@ struct ex_nq_nr
{
}
- friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) noexcept
{
return false;
}
@@ -53,8 +53,8 @@ namespace traits {
template <>
struct equality_comparable<ex_nq_nr>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -64,8 +64,8 @@ struct equality_comparable<ex_nq_nr>
template <typename Function>
struct execute_member<ex_nq_nr, Function>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
@@ -78,7 +78,7 @@ struct execute_member<ex_nq_nr, Function>
template <typename ResultType, typename ParamType, typename Result>
struct ex_cq_nr
{
- static ASIO_CONSTEXPR ResultType query(ParamType) ASIO_NOEXCEPT
+ static constexpr ResultType query(ParamType) noexcept
{
return Result();
}
@@ -88,12 +88,12 @@ struct ex_cq_nr
{
}
- friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) noexcept
{
return false;
}
@@ -107,8 +107,8 @@ namespace traits {
template <typename ResultType, typename ParamType, typename Result>
struct equality_comparable<ex_cq_nr<ResultType, ParamType, Result> >
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -119,8 +119,8 @@ template <typename ResultType, typename ParamType,
typename Result, typename Function>
struct execute_member<ex_cq_nr<ResultType, ParamType, Result>, Function>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
@@ -137,12 +137,12 @@ struct query_static_constexpr_member<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Result result_type; // Must return raw result type.
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return Result();
}
@@ -156,7 +156,7 @@ struct query_static_constexpr_member<
template <typename ResultType, typename ParamType, typename Result>
struct ex_mq_nr
{
- ResultType query(ParamType) const ASIO_NOEXCEPT
+ ResultType query(ParamType) const noexcept
{
return Result();
}
@@ -166,12 +166,12 @@ struct ex_mq_nr
{
}
- friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) noexcept
{
return false;
}
@@ -185,8 +185,8 @@ namespace traits {
template <typename ResultType, typename ParamType, typename Result>
struct equality_comparable<ex_mq_nr<ResultType, ParamType, Result> >
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -197,8 +197,8 @@ template <typename ResultType, typename ParamType,
typename Result, typename Function>
struct execute_member<ex_mq_nr<ResultType, ParamType, Result>, Function>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
@@ -215,8 +215,8 @@ struct query_member<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ResultType result_type;
};
@@ -229,7 +229,7 @@ struct query_member<
template <typename ResultType, typename ParamType, typename Result>
struct ex_fq_nr
{
- friend ResultType query(const ex_fq_nr&, ParamType) ASIO_NOEXCEPT
+ friend ResultType query(const ex_fq_nr&, ParamType) noexcept
{
return Result();
}
@@ -239,12 +239,12 @@ struct ex_fq_nr
{
}
- friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) noexcept
{
return false;
}
@@ -258,8 +258,8 @@ namespace traits {
template <typename ResultType, typename ParamType, typename Result>
struct equality_comparable<ex_fq_nr<ResultType, ParamType, Result> >
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -270,8 +270,8 @@ template <typename ResultType, typename ParamType,
typename Result, typename Function>
struct execute_member<ex_fq_nr<ResultType, ParamType, Result>, Function>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
@@ -288,8 +288,8 @@ struct query_free<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ResultType result_type;
};
@@ -302,24 +302,24 @@ struct query_free<
template <typename CurrentType, typename OtherType>
struct ex_mq_mr
{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
+ CurrentType query(CurrentType) const noexcept
{
return CurrentType();
}
- CurrentType query(OtherType) const ASIO_NOEXCEPT
+ CurrentType query(OtherType) const noexcept
{
return CurrentType();
}
ex_mq_mr<CurrentType, OtherType> require(
- CurrentType) const ASIO_NOEXCEPT
+ CurrentType) const noexcept
{
return ex_mq_mr<CurrentType, OtherType>();
}
ex_mq_mr<OtherType, CurrentType> require(
- OtherType) const ASIO_NOEXCEPT
+ OtherType) const noexcept
{
return ex_mq_mr<OtherType, CurrentType>();
}
@@ -329,12 +329,12 @@ struct ex_mq_mr
{
}
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return false;
}
@@ -343,13 +343,13 @@ struct ex_mq_mr
template <typename CurrentType>
struct ex_mq_mr<CurrentType, CurrentType>
{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
+ CurrentType query(CurrentType) const noexcept
{
return CurrentType();
}
ex_mq_mr<CurrentType, CurrentType> require(
- CurrentType) const ASIO_NOEXCEPT
+ CurrentType) const noexcept
{
return ex_mq_mr<CurrentType, CurrentType>();
}
@@ -359,12 +359,12 @@ struct ex_mq_mr<CurrentType, CurrentType>
{
}
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return false;
}
@@ -378,8 +378,8 @@ namespace traits {
template <typename CurrentType, typename OtherType>
struct equality_comparable<ex_mq_mr<CurrentType, OtherType> >
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -389,8 +389,8 @@ struct equality_comparable<ex_mq_mr<CurrentType, OtherType> >
template <typename CurrentType, typename OtherType, typename Function>
struct execute_member<ex_mq_mr<CurrentType, OtherType>, Function>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
@@ -407,8 +407,8 @@ struct query_member<
|| asio::is_convertible<Param, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef CurrentType result_type;
};
@@ -424,8 +424,8 @@ struct require_member<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_mq_mr<CurrentType, OtherType> result_type;
};
@@ -438,8 +438,8 @@ struct require_member<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_mq_mr<OtherType, CurrentType> result_type;
};
@@ -452,36 +452,36 @@ struct require_member<
template <typename CurrentType, typename OtherType>
struct ex_fq_fr
{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
{
return CurrentType();
}
- friend CurrentType query(const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, OtherType) noexcept
{
return CurrentType();
}
friend ex_fq_fr<CurrentType, OtherType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, OtherType>();
}
friend ex_fq_fr<OtherType, CurrentType> require(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ const ex_fq_fr&, OtherType) noexcept
{
return ex_fq_fr<OtherType, CurrentType>();
}
friend ex_fq_fr<CurrentType, OtherType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, OtherType>();
}
friend ex_fq_fr<OtherType, CurrentType> prefer(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ const ex_fq_fr&, OtherType) noexcept
{
return ex_fq_fr<OtherType, CurrentType>();
}
@@ -491,12 +491,12 @@ struct ex_fq_fr
{
}
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return false;
}
@@ -505,19 +505,19 @@ struct ex_fq_fr
template <typename CurrentType>
struct ex_fq_fr<CurrentType, CurrentType>
{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
{
return CurrentType();
}
friend ex_fq_fr<CurrentType, CurrentType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, CurrentType>();
}
friend ex_fq_fr<CurrentType, CurrentType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, CurrentType>();
}
@@ -527,12 +527,12 @@ struct ex_fq_fr<CurrentType, CurrentType>
{
}
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return false;
}
@@ -546,8 +546,8 @@ namespace traits {
template <typename CurrentType, typename OtherType>
struct equality_comparable<ex_fq_fr<CurrentType, OtherType> >
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -557,8 +557,8 @@ struct equality_comparable<ex_fq_fr<CurrentType, OtherType> >
template <typename CurrentType, typename OtherType, typename Function>
struct execute_member<ex_fq_fr<CurrentType, OtherType>, Function>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef void result_type;
};
@@ -575,8 +575,8 @@ struct query_free<
|| asio::is_convertible<Param, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef CurrentType result_type;
};
@@ -592,8 +592,8 @@ struct require_free<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<CurrentType, OtherType> result_type;
};
@@ -606,8 +606,8 @@ struct require_free<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<OtherType, CurrentType> result_type;
};
@@ -623,8 +623,8 @@ struct prefer_free<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<CurrentType, OtherType> result_type;
};
@@ -637,8 +637,8 @@ struct prefer_free<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<OtherType, CurrentType> result_type;
};
@@ -651,19 +651,19 @@ struct prefer_free<
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_query()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_query<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_query<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_query<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_query<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -686,29 +686,27 @@ void test_query()
template <typename Executor, typename Param, typename ExpectedResult>
void test_constexpr_query()
{
-#if defined(ASIO_HAS_CONSTEXPR)
constexpr Executor ex1 = {};
constexpr exec::blocking_adaptation_t result1 = asio::query(ex1, Param());
ASIO_CHECK(result1 == ExpectedResult());
-#endif // defined(ASIO_HAS_CONSTEXPR)
}
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_require()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_require<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_require<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_require<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_require<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -757,19 +755,19 @@ void test_require()
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_prefer()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_prefer<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_prefer<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_prefer<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_prefer<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -798,8 +796,12 @@ void test_prefer()
void test_vars()
{
ASIO_CHECK(s() == exec::blocking_adaptation);
+ ASIO_CHECK(s() != exec::blocking_adaptation.disallowed);
+ ASIO_CHECK(s() != exec::blocking_adaptation.allowed);
ASIO_CHECK(n1() == exec::blocking_adaptation.disallowed);
+ ASIO_CHECK(n1() != exec::blocking_adaptation.allowed);
ASIO_CHECK(n2() == exec::blocking_adaptation.allowed);
+ ASIO_CHECK(n2() != exec::blocking_adaptation.disallowed);
}
ASIO_TEST_SUITE
diff --git a/3rdparty/asio/src/tests/unit/execution/bulk_execute.cpp b/3rdparty/asio/src/tests/unit/execution/bulk_execute.cpp
deleted file mode 100644
index 55a2118e955..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/bulk_execute.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-//
-// bulk_execute.cpp
-// ~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/bulk_execute.hpp"
-
-#include "asio/execution.hpp"
-#include "../unit_test.hpp"
-
-namespace exec = asio::execution;
-
-int call_count = 0;
-
-struct operation_state
-{
- void start() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-template <>
-struct start_member<operation_state>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct sender : exec::sender_base
-{
- sender()
- {
- }
-
- template <typename R>
- operation_state connect(ASIO_MOVE_ARG(R) r) const
- {
- (void)r;
- return operation_state();
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-template <typename R>
-struct connect_member<const sender, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct no_bulk_execute
-{
-};
-
-struct const_member_bulk_execute
-{
- const_member_bulk_execute()
- {
- }
-
- template <typename F>
- sender bulk_execute(ASIO_MOVE_ARG(F), std::size_t) const
- {
- ++call_count;
- return sender();
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-template <typename F, typename N>
-struct bulk_execute_member<const const_member_bulk_execute, F, N>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef sender result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct free_bulk_execute
-{
- free_bulk_execute()
- {
- }
-
- template <typename F>
- friend sender bulk_execute(const free_bulk_execute&,
- ASIO_MOVE_ARG(F), std::size_t)
- {
- ++call_count;
- return sender();
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SUBMIT_FREE_TRAIT)
-
-template <typename F, typename N>
-struct bulk_execute_free<const free_bulk_execute, F, N>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef sender result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SUBMIT_FREE_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct executor
-{
- executor()
- {
- }
-
- executor(const executor&) ASIO_NOEXCEPT
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- executor(executor&&) ASIO_NOEXCEPT
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename F>
- void execute(ASIO_MOVE_ARG(F) f) const ASIO_NOEXCEPT
- {
- typename asio::decay<F>::type tmp(ASIO_MOVE_CAST(F)(f));
- tmp();
- }
-
- bool operator==(const executor&) const ASIO_NOEXCEPT
- {
- return true;
- }
-
- bool operator!=(const executor&) const ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-
-template <typename F>
-struct execute_member<executor, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-template <>
-struct equality_comparable<executor>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-void test_can_bulk_execute()
-{
- ASIO_CONSTEXPR bool b1 = exec::can_bulk_execute<
- no_bulk_execute&, exec::invocable_archetype, std::size_t>::value;
- ASIO_CHECK(b1 == false);
-
- ASIO_CONSTEXPR bool b2 = exec::can_bulk_execute<
- const no_bulk_execute&, exec::invocable_archetype, std::size_t>::value;
- ASIO_CHECK(b2 == false);
-
- ASIO_CONSTEXPR bool b3 = exec::can_bulk_execute<
- const_member_bulk_execute&, exec::invocable_archetype, std::size_t>::value;
- ASIO_CHECK(b3 == true);
-
- ASIO_CONSTEXPR bool b4 = exec::can_bulk_execute<
- const const_member_bulk_execute&,
- exec::invocable_archetype, std::size_t>::value;
- ASIO_CHECK(b4 == true);
-
- ASIO_CONSTEXPR bool b5 = exec::can_bulk_execute<
- free_bulk_execute&, exec::invocable_archetype, std::size_t>::value;
- ASIO_CHECK(b5 == true);
-
- ASIO_CONSTEXPR bool b6 = exec::can_bulk_execute<
- const free_bulk_execute&, exec::invocable_archetype, std::size_t>::value;
- ASIO_CHECK(b6 == true);
-
- ASIO_CONSTEXPR bool b7 = exec::can_bulk_execute<
- executor&, exec::invocable_archetype, std::size_t>::value;
- ASIO_CHECK(b7 == true);
-
- ASIO_CONSTEXPR bool b8 = exec::can_bulk_execute<
- const executor&, exec::invocable_archetype, std::size_t>::value;
- ASIO_CHECK(b8 == true);
-}
-
-void handler(std::size_t)
-{
-}
-
-void counting_handler(std::size_t)
-{
- ++call_count;
-}
-
-void completion_handler()
-{
- ++call_count;
-}
-
-void test_bulk_execute()
-{
- call_count = 0;
- const_member_bulk_execute ex1;
- exec::bulk_execute(ex1, handler, 2);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const const_member_bulk_execute ex2;
- exec::bulk_execute(ex2, handler, 2);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::bulk_execute(const_member_bulk_execute(), handler, 2);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_bulk_execute ex3;
- exec::bulk_execute(ex3, handler, 2);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const free_bulk_execute ex4;
- exec::bulk_execute(ex4, handler, 2);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::bulk_execute(free_bulk_execute(), handler, 2);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- executor ex5;
- exec::execute(
- exec::bulk_execute(ex5, counting_handler, 10u),
- completion_handler);
- ASIO_CHECK(call_count == 11);
-
- call_count = 0;
- const executor ex6;
- exec::execute(
- exec::bulk_execute(ex6, counting_handler, 10u),
- completion_handler);
- ASIO_CHECK(call_count == 11);
-
- call_count = 0;
- exec::execute(
- exec::bulk_execute(executor(), counting_handler, 10u),
- completion_handler);
- ASIO_CHECK(call_count == 11);
-}
-
-ASIO_TEST_SUITE
-(
- "bulk_execute",
- ASIO_TEST_CASE(test_can_bulk_execute)
- ASIO_TEST_CASE(test_bulk_execute)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/bulk_guarantee.cpp b/3rdparty/asio/src/tests/unit/execution/bulk_guarantee.cpp
deleted file mode 100644
index 3127ff89db3..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/bulk_guarantee.cpp
+++ /dev/null
@@ -1,1978 +0,0 @@
-//
-// bulk_guarantee.cpp
-// ~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/bulk_guarantee.hpp"
-
-#include "asio/prefer.hpp"
-#include "asio/query.hpp"
-#include "asio/require.hpp"
-#include "../unit_test.hpp"
-
-namespace exec = asio::execution;
-
-typedef exec::bulk_guarantee_t s;
-typedef exec::bulk_guarantee_t::unsequenced_t n1;
-typedef exec::bulk_guarantee_t::sequenced_t n2;
-typedef exec::bulk_guarantee_t::parallel_t n3;
-
-struct ex_nq_nr
-{
- template <typename F>
- void execute(const F&) const
- {
- }
-
- friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
- {
- return true;
- }
-
- friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-namespace asio {
-namespace execution {
-
-template <>
-struct is_executor<ex_nq_nr> : asio::true_type
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-template <typename ResultType, typename ParamType, typename Result>
-struct ex_cq_nr
-{
- static ASIO_CONSTEXPR ResultType query(ParamType) ASIO_NOEXCEPT
- {
- return Result();
- }
-
- template <typename F>
- void execute(const F&) const
- {
- }
-
- friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
- {
- return true;
- }
-
- friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-namespace asio {
-namespace execution {
-
-template <typename ResultType, typename ParamType, typename Result>
-struct is_executor<ex_cq_nr<ResultType, ParamType, Result> >
- : asio::true_type
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
-
-template <typename ResultType, typename ParamType,
- typename Result, typename Param>
-struct query_static_constexpr_member<
- ex_cq_nr<ResultType, ParamType, Result>, Param,
- typename asio::enable_if<
- asio::is_convertible<Param, ParamType>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef Result result_type; // Must return raw result type.
-
- static ASIO_CONSTEXPR result_type value()
- {
- return Result();
- }
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-template <typename ResultType, typename ParamType, typename Result>
-struct ex_mq_nr
-{
- ResultType query(ParamType) const ASIO_NOEXCEPT
- {
- return Result();
- }
-
- template <typename F>
- void execute(const F&) const
- {
- }
-
- friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
- {
- return true;
- }
-
- friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-namespace asio {
-namespace execution {
-
-template <typename ResultType, typename ParamType, typename Result>
-struct is_executor<ex_mq_nr<ResultType, ParamType, Result> >
- : asio::true_type
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
-
-template <typename ResultType, typename ParamType,
- typename Result, typename Param>
-struct query_member<
- ex_mq_nr<ResultType, ParamType, Result>, Param,
- typename asio::enable_if<
- asio::is_convertible<Param, ParamType>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef ResultType result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-template <typename ResultType, typename ParamType, typename Result>
-struct ex_fq_nr
-{
- friend ResultType query(const ex_fq_nr&, ParamType) ASIO_NOEXCEPT
- {
- return Result();
- }
-
- template <typename F>
- void execute(const F&) const
- {
- }
-
- friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
- {
- return true;
- }
-
- friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-namespace asio {
-namespace execution {
-
-template <typename ResultType, typename ParamType, typename Result>
-struct is_executor<ex_fq_nr<ResultType, ParamType, Result> >
- : asio::true_type
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
-
-template <typename ResultType, typename ParamType,
- typename Result, typename Param>
-struct query_free<
- ex_fq_nr<ResultType, ParamType, Result>, Param,
- typename asio::enable_if<
- asio::is_convertible<Param, ParamType>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef ResultType result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-template <typename CurrentType, typename OtherType>
-struct ex_mq_mr
-{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
- {
- return CurrentType();
- }
-
- CurrentType query(OtherType) const ASIO_NOEXCEPT
- {
- return CurrentType();
- }
-
- ex_mq_mr<CurrentType, OtherType> require(
- CurrentType) const ASIO_NOEXCEPT
- {
- return ex_mq_mr<CurrentType, OtherType>();
- }
-
- ex_mq_mr<OtherType, CurrentType> require(
- OtherType) const ASIO_NOEXCEPT
- {
- return ex_mq_mr<OtherType, CurrentType>();
- }
-
- template <typename F>
- void execute(const F&) const
- {
- }
-
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
- {
- return true;
- }
-
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-template <typename CurrentType>
-struct ex_mq_mr<CurrentType, CurrentType>
-{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
- {
- return CurrentType();
- }
-
- ex_mq_mr<CurrentType, CurrentType> require(
- CurrentType) const ASIO_NOEXCEPT
- {
- return ex_mq_mr<CurrentType, CurrentType>();
- }
-
- template <typename F>
- void execute(const F&) const
- {
- }
-
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
- {
- return true;
- }
-
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-namespace asio {
-namespace execution {
-
-template <typename CurrentType, typename OtherType>
-struct is_executor<ex_mq_mr<CurrentType, OtherType> >
- : asio::true_type
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
-
-template <typename CurrentType, typename OtherType, typename Param>
-struct query_member<
- ex_mq_mr<CurrentType, OtherType>, Param,
- typename asio::enable_if<
- asio::is_convertible<Param, CurrentType>::value
- || asio::is_convertible<Param, OtherType>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef CurrentType result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
-
-template <typename CurrentType, typename OtherType, typename Param>
-struct require_member<
- ex_mq_mr<CurrentType, OtherType>, Param,
- typename asio::enable_if<
- asio::is_convertible<Param, CurrentType>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef ex_mq_mr<CurrentType, OtherType> result_type;
-};
-
-template <typename CurrentType, typename OtherType, typename Param>
-struct require_member<
- ex_mq_mr<CurrentType, OtherType>, Param,
- typename asio::enable_if<
- asio::is_convertible<Param, OtherType>::value
- && !asio::is_same<CurrentType, OtherType>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef ex_mq_mr<OtherType, CurrentType> result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-template <typename CurrentType, typename OtherType>
-struct ex_fq_fr
-{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
- {
- return CurrentType();
- }
-
- friend CurrentType query(const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
- {
- return CurrentType();
- }
-
- friend ex_fq_fr<CurrentType, OtherType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
- {
- return ex_fq_fr<CurrentType, OtherType>();
- }
-
- friend ex_fq_fr<OtherType, CurrentType> require(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
- {
- return ex_fq_fr<OtherType, CurrentType>();
- }
-
- friend ex_fq_fr<CurrentType, OtherType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
- {
- return ex_fq_fr<CurrentType, OtherType>();
- }
-
- friend ex_fq_fr<OtherType, CurrentType> prefer(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
- {
- return ex_fq_fr<OtherType, CurrentType>();
- }
-
- template <typename F>
- void execute(const F&) const
- {
- }
-
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
- {
- return true;
- }
-
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-template <typename CurrentType>
-struct ex_fq_fr<CurrentType, CurrentType>
-{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
- {
- return CurrentType();
- }
-
- friend ex_fq_fr<CurrentType, CurrentType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
- {
- return ex_fq_fr<CurrentType, CurrentType>();
- }
-
- friend ex_fq_fr<CurrentType, CurrentType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
- {
- return ex_fq_fr<CurrentType, CurrentType>();
- }
-
- template <typename F>
- void execute(const F&) const
- {
- }
-
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
- {
- return true;
- }
-
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-namespace asio {
-namespace execution {
-
-template <typename CurrentType, typename OtherType>
-struct is_executor<ex_fq_fr<CurrentType, OtherType> >
- : asio::true_type
-{
-};
-
-} // namespace execution
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_EXECUTION_IS_EXECUTOR_TRAIT)
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
-
-template <typename CurrentType, typename OtherType, typename Param>
-struct query_free<
- ex_fq_fr<CurrentType, OtherType>, Param,
- typename asio::enable_if<
- asio::is_convertible<Param, CurrentType>::value
- || asio::is_convertible<Param, OtherType>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef CurrentType result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_QUERY_FREE_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
-
-template <typename CurrentType, typename OtherType, typename Param>
-struct require_free<
- ex_fq_fr<CurrentType, OtherType>, Param,
- typename asio::enable_if<
- asio::is_convertible<Param, CurrentType>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef ex_fq_fr<CurrentType, OtherType> result_type;
-};
-
-template <typename CurrentType, typename OtherType, typename Param>
-struct require_free<
- ex_fq_fr<CurrentType, OtherType>, Param,
- typename asio::enable_if<
- asio::is_convertible<Param, OtherType>::value
- && !asio::is_same<CurrentType, OtherType>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef ex_fq_fr<OtherType, CurrentType> result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_REQUIRE_FREE_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
-
-template <typename CurrentType, typename OtherType, typename Param>
-struct prefer_free<
- ex_fq_fr<CurrentType, OtherType>, Param,
- typename asio::enable_if<
- asio::is_convertible<Param, CurrentType>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef ex_fq_fr<CurrentType, OtherType> result_type;
-};
-
-template <typename CurrentType, typename OtherType, typename Param>
-struct prefer_free<
- ex_fq_fr<CurrentType, OtherType>, Param,
- typename asio::enable_if<
- asio::is_convertible<Param, OtherType>::value
- && !asio::is_same<CurrentType, OtherType>::value
- >::type>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-
- typedef ex_fq_fr<OtherType, CurrentType> result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_PREFER_FREE_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-template <typename Executor, typename Param, bool ExpectedResult>
-void test_can_query()
-{
- ASIO_CONSTEXPR bool b1 =
- asio::can_query<Executor, Param>::value;
- ASIO_CHECK(b1 == ExpectedResult);
-
- ASIO_CONSTEXPR bool b2 =
- asio::can_query<const Executor, Param>::value;
- ASIO_CHECK(b2 == ExpectedResult);
-
- ASIO_CONSTEXPR bool b3 =
- asio::can_query<Executor&, Param>::value;
- ASIO_CHECK(b3 == ExpectedResult);
-
- ASIO_CONSTEXPR bool b4 =
- asio::can_query<const Executor&, Param>::value;
- ASIO_CHECK(b4 == ExpectedResult);
-}
-
-template <typename Executor, typename Param, typename ExpectedResult>
-void test_query()
-{
- exec::bulk_guarantee_t result1 = asio::query(Executor(), Param());
- ASIO_CHECK(result1 == ExpectedResult());
-
- Executor ex1 = {};
- exec::bulk_guarantee_t result2 = asio::query(ex1, Param());
- ASIO_CHECK(result2 == ExpectedResult());
-
- const Executor ex2 = {};
- exec::bulk_guarantee_t result3 = asio::query(ex2, Param());
- ASIO_CHECK(result3 == ExpectedResult());
-}
-
-template <typename Executor, typename Param, typename ExpectedResult>
-void test_constexpr_query()
-{
-#if defined(ASIO_HAS_CONSTEXPR)
- constexpr Executor ex1 = {};
- constexpr exec::bulk_guarantee_t result1 = asio::query(ex1, Param());
- ASIO_CHECK(result1 == ExpectedResult());
-#endif // defined(ASIO_HAS_CONSTEXPR)
-}
-
-template <typename Executor, typename Param, bool ExpectedResult>
-void test_can_require()
-{
- ASIO_CONSTEXPR bool b1 =
- asio::can_require<Executor, Param>::value;
- ASIO_CHECK(b1 == ExpectedResult);
-
- ASIO_CONSTEXPR bool b2 =
- asio::can_require<const Executor, Param>::value;
- ASIO_CHECK(b2 == ExpectedResult);
-
- ASIO_CONSTEXPR bool b3 =
- asio::can_require<Executor&, Param>::value;
- ASIO_CHECK(b3 == ExpectedResult);
-
- ASIO_CONSTEXPR bool b4 =
- asio::can_require<const Executor&, Param>::value;
- ASIO_CHECK(b4 == ExpectedResult);
-}
-
-template <typename Executor, typename Param, typename ExpectedResult>
-void test_require()
-{
- ASIO_CHECK(
- asio::query(
- asio::require(Executor(), Param()),
- Param()) == ExpectedResult());
-
- Executor ex1 = {};
- ASIO_CHECK(
- asio::query(
- asio::require(ex1, Param()),
- Param()) == ExpectedResult());
-
- const Executor ex2 = {};
- ASIO_CHECK(
- asio::query(
- asio::require(ex2, Param()),
- Param()) == ExpectedResult());
-}
-
-template <typename Executor, typename Param, bool ExpectedResult>
-void test_can_prefer()
-{
- ASIO_CONSTEXPR bool b1 =
- asio::can_prefer<Executor, Param>::value;
- ASIO_CHECK(b1 == ExpectedResult);
-
- ASIO_CONSTEXPR bool b2 =
- asio::can_prefer<const Executor, Param>::value;
- ASIO_CHECK(b2 == ExpectedResult);
-
- ASIO_CONSTEXPR bool b3 =
- asio::can_prefer<Executor&, Param>::value;
- ASIO_CHECK(b3 == ExpectedResult);
-
- ASIO_CONSTEXPR bool b4 =
- asio::can_prefer<const Executor&, Param>::value;
- ASIO_CHECK(b4 == ExpectedResult);
-}
-
-template <typename Executor, typename Param, typename ExpectedResult>
-void test_prefer()
-{
- ASIO_CHECK(
- s(asio::query(
- asio::prefer(Executor(), Param()),
- s())) == s(ExpectedResult()));
-
- Executor ex1 = {};
- ASIO_CHECK(
- s(asio::query(
- asio::prefer(ex1, Param()),
- s())) == s(ExpectedResult()));
-
- const Executor ex2 = {};
- ASIO_CHECK(
- s(asio::query(
- asio::prefer(ex2, Param()),
- s())) == s(ExpectedResult()));
-}
-
-void test_vars()
-{
- ASIO_CHECK(s() == exec::bulk_guarantee);
- ASIO_CHECK(n1() == exec::bulk_guarantee.unsequenced);
- ASIO_CHECK(n2() == exec::bulk_guarantee.sequenced);
- ASIO_CHECK(n3() == exec::bulk_guarantee.parallel);
-}
-
-ASIO_TEST_SUITE
-(
- "bulk_guarantee",
-
- ASIO_TEST_CASE3(test_can_query<ex_nq_nr, s, true>)
- ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n1, true>)
- ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n2, false>)
- ASIO_TEST_CASE3(test_can_query<ex_nq_nr, n3, false>)
-
- ASIO_TEST_CASE3(test_query<ex_nq_nr, s, n1>)
- ASIO_TEST_CASE3(test_query<ex_nq_nr, n1, n1>)
-
- ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, s, n1>)
- ASIO_TEST_CASE3(test_constexpr_query<ex_nq_nr, n1, n1>)
-
- ASIO_TEST_CASE3(test_can_require<ex_nq_nr, s, false>)
- ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n1, true>)
- ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n2, false>)
- ASIO_TEST_CASE3(test_can_require<ex_nq_nr, n3, false>)
-
- ASIO_TEST_CASE3(test_require<ex_nq_nr, n1, n1>)
-
- ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, s, false>)
- ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n1, true>)
- ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n2, true>)
- ASIO_TEST_CASE3(test_can_prefer<ex_nq_nr, n3, true>)
-
- ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n1, n1>)
- ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n2, n1>)
- ASIO_TEST_CASE3(test_prefer<ex_nq_nr, n3, n1>)
-
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, s, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n1, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n2, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<s, n3, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n1, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n2, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_cq_nr<n3, s, n3>, n3, true>)
-
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, s, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n1, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n2, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<s, n3, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n1, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n2, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_query<ex_cq_nr<n3, s, n3>, n3, n3>)
-
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, s, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, s, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, s, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, s, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, s, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, s, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n3>, s, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n1, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, s, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, s, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n3>, s, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n2, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n1>, s, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n2>, s, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n3>, s, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<s, n3, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, s, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n1, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, s, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n2, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, s, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_constexpr_query<ex_cq_nr<n3, s, n3>, n3, n3>)
-
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, s, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n1, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n2, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<s, n3, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n1, s, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n2, s, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_cq_nr<n3, s, n3>, n3, true>)
-
- ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_require<ex_cq_nr<s, s, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n1, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n2, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_require<ex_cq_nr<s, n3, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_require<ex_cq_nr<n1, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_require<ex_cq_nr<n2, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_require<ex_cq_nr<n3, s, n3>, n3, n3>)
-
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, s, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n1, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n2, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<s, n3, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n1, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n2, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_cq_nr<n3, s, n3>, n3, true>)
-
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, s, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n1, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n2, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<s, n3, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n1, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n2, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n3, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n3, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_cq_nr<n3, s, n3>, n3, n3>)
-
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, s, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n1, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n2, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<s, n3, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n1, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n2, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_mq_nr<n3, s, n3>, n3, true>)
-
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, s, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n1, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n2, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<s, n3, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n1, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n2, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_query<ex_mq_nr<n3, s, n3>, n3, n3>)
-
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, s, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n1, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n2, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<s, n3, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n1, s, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n2, s, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_mq_nr<n3, s, n3>, n3, false>)
-
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, s, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n1, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n2, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<s, n3, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n1, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n2, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_mq_nr<n3, s, n3>, n3, true>)
-
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, s, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n1, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n2, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<s, n3, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n1, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n2, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n3, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n3, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_mq_nr<n3, s, n3>, n3, n3>)
-
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, s, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n1, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n2, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<s, n3, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n1, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n2, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, s, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_query<ex_fq_nr<n3, s, n3>, n3, true>)
-
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, s, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n1, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n2, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<s, n3, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, s, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n1, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, s, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n2, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, s, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_query<ex_fq_nr<n3, s, n3>, n3, n3>)
-
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, s, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n1, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n2, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<s, n3, n3>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n1, s, n1>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n2, s, n2>, n3, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, n1, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, n2, false>)
- ASIO_TEST_CASE5(test_can_require<ex_fq_nr<n3, s, n3>, n3, false>)
-
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, s, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n1, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n2, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<s, n3, n3>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n1, s, n1>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n2, s, n2>, n3, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, s, false>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, n1, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, n2, true>)
- ASIO_TEST_CASE5(test_can_prefer<ex_fq_nr<n3, s, n3>, n3, true>)
-
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, s, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n1, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n2, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<s, n3, n3>, n3, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n1, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n2, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n1, s, n1>, n3, n1>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n1, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n2, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n2, s, n2>, n3, n2>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n3, s, n3>, n1, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n3, s, n3>, n2, n3>)
- ASIO_TEST_CASE5(test_prefer<ex_fq_nr<n3, s, n3>, n3, n3>)
-
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n2, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n1>, n3, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n1, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n2>, n3, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, n1, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, n2, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n1, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n2, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n1>, n3, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n1, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n2>, n3, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, n1, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, n2, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n2, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, n2, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n1>, n3, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, n1, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n2>, n3, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, n1, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, n2, false>)
- ASIO_TEST_CASE4(test_can_query<ex_mq_mr<n3, n3>, n3, true>)
-
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, s, n1>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, s, n1>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n2>, n1, n1>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n3>, s, n1>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n1, n3>, n1, n1>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, s, n2>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n1>, n2, n2>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, s, n2>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n3>, s, n2>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n2, n3>, n2, n2>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n1>, s, n3>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n1>, n3, n3>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n2>, s, n3>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n2>, n3, n3>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n3>, s, n3>)
- ASIO_TEST_CASE4(test_query<ex_mq_mr<n3, n3>, n3, n3>)
-
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n2, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n1>, n3, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n1, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n2>, n3, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, n1, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, n2, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n1, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n2, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n1>, n3, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n1, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n2>, n3, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, n1, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, n2, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n2, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, n2, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n1>, n3, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, n1, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n2>, n3, true>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, n1, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, n2, false>)
- ASIO_TEST_CASE4(test_can_require<ex_mq_mr<n3, n3>, n3, true>)
-
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n1, n1>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n3>, n1, n1>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n1, n3>, n3, n3>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n1>, n2, n2>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n3>, n2, n2>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n2, n3>, n3, n3>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n1>, n3, n3>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n2>, n3, n3>)
- ASIO_TEST_CASE4(test_require<ex_mq_mr<n3, n3>, n3, n3>)
-
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n1>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n2>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n1, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n1>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n2>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n2, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n1>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n2>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_mq_mr<n3, n3>, n3, true>)
-
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n2, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n1>, n3, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n1, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n2>, n3, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n3>, n1, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n3>, n2, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n1, n3>, n3, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n2, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n1>, n3, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n1, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n2>, n3, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n3>, n1, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n3>, n2, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n2, n3>, n3, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n1>, n2, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n1>, n3, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n2>, n1, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n2>, n3, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n3>, n1, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n3>, n2, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_mq_mr<n3, n3>, n3, n3>)
-
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n2, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n1>, n3, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n1, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n2>, n3, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, n1, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, n2, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n1, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n2, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n1>, n3, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n1, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n2>, n3, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, n1, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, n2, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n2, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, n2, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n1>, n3, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, n1, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n2>, n3, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, s, true>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, n1, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, n2, false>)
- ASIO_TEST_CASE4(test_can_query<ex_fq_fr<n3, n3>, n3, true>)
-
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, s, n1>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, s, n1>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n2>, n1, n1>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n3>, s, n1>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n1, n3>, n1, n1>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, s, n2>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n1>, n2, n2>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, s, n2>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n3>, s, n2>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n2, n3>, n2, n2>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n1>, s, n3>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n1>, n3, n3>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n2>, s, n3>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n2>, n3, n3>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n3>, s, n3>)
- ASIO_TEST_CASE4(test_query<ex_fq_fr<n3, n3>, n3, n3>)
-
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n2, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n1>, n3, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n1, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n2>, n3, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, n1, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, n2, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n1, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n2, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n1>, n3, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n1, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n2>, n3, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, n1, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, n2, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n2, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, n2, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n1>, n3, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, n1, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n2>, n3, true>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, n1, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, n2, false>)
- ASIO_TEST_CASE4(test_can_require<ex_fq_fr<n3, n3>, n3, true>)
-
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n1, n1>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n3>, n1, n1>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n1, n3>, n3, n3>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n1>, n2, n2>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n3>, n2, n2>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n2, n3>, n3, n3>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n1>, n3, n3>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n2>, n3, n3>)
- ASIO_TEST_CASE4(test_require<ex_fq_fr<n3, n3>, n3, n3>)
-
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n1>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n2>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n1, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n1>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n2>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n2, n3>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n1>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n2>, n3, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, s, false>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, n1, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, n2, true>)
- ASIO_TEST_CASE4(test_can_prefer<ex_fq_fr<n3, n3>, n3, true>)
-
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n2, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n1>, n3, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n1, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n2>, n3, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n3>, n1, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n3>, n2, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n1, n3>, n3, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n2, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n1>, n3, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n1, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n2>, n3, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n3>, n1, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n3>, n2, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n2, n3>, n3, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n1>, n1, n1>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n1>, n2, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n1>, n3, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n2>, n1, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n2>, n2, n2>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n2>, n3, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n3>, n1, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n3>, n2, n3>)
- ASIO_TEST_CASE4(test_prefer<ex_fq_fr<n3, n3>, n3, n3>)
-
- ASIO_TEST_CASE(test_vars)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/connect.cpp b/3rdparty/asio/src/tests/unit/execution/connect.cpp
deleted file mode 100644
index 1f32e77cbe8..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/connect.cpp
+++ /dev/null
@@ -1,481 +0,0 @@
-//
-// connect.cpp
-// ~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/connect.hpp"
-
-#include "asio/error_code.hpp"
-#include "../unit_test.hpp"
-
-namespace exec = asio::execution;
-
-static int call_count = 0;
-
-struct operation_state
-{
- void start() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-template <>
-struct start_member<operation_state>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct no_connect_1
-{
-};
-
-struct no_connect_2 : exec::sender_base
-{
-};
-
-struct no_connect_3
-{
- template <typename R>
- operation_state connect(ASIO_MOVE_ARG(R) r)
- {
- (void)r;
- return operation_state();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename R>
-struct connect_member<no_connect_3, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-struct const_member_connect : exec::sender_base
-{
- const_member_connect()
- {
- }
-
- template <typename R>
- operation_state connect(ASIO_MOVE_ARG(R) r) const
- {
- (void)r;
- ++call_count;
- return operation_state();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename R>
-struct connect_member<const const_member_connect, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-struct free_connect_const_receiver : exec::sender_base
-{
- free_connect_const_receiver()
- {
- }
-
- template <typename R>
- friend operation_state connect(
- const free_connect_const_receiver&, ASIO_MOVE_ARG(R) r)
- {
- (void)r;
- ++call_count;
- return operation_state();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename R>
-struct connect_free<const free_connect_const_receiver, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT)
-
-struct non_const_member_connect : exec::sender_base
-{
- template <typename R>
- operation_state connect(ASIO_MOVE_ARG(R) r)
- {
- (void)r;
- ++call_count;
- return operation_state();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename R>
-struct connect_member<non_const_member_connect, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-struct free_connect_non_const_receiver : exec::sender_base
-{
- free_connect_non_const_receiver()
- {
- }
-
- template <typename R>
- friend operation_state connect(
- free_connect_non_const_receiver&, ASIO_MOVE_ARG(R) r)
- {
- (void)r;
- ++call_count;
- return operation_state();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename R>
-struct connect_free<free_connect_non_const_receiver, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT)
-
-struct receiver
-{
- receiver()
- {
- }
-
- receiver(const receiver&)
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- receiver(receiver&&) ASIO_NOEXCEPT
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E) e) ASIO_NOEXCEPT
- {
- (void)e;
- }
-
- void set_done() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename E>
-struct set_error_member<receiver, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_done_member<receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct executor
-{
- executor()
- {
- }
-
- executor(const executor&) ASIO_NOEXCEPT
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- executor(executor&&) ASIO_NOEXCEPT
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename F>
- void execute(ASIO_MOVE_ARG(F) f) const ASIO_NOEXCEPT
- {
- (void)f;
- }
-
- bool operator==(const executor&) const ASIO_NOEXCEPT
- {
- return true;
- }
-
- bool operator!=(const executor&) const ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-
-template <typename F>
-struct execute_member<executor, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-template <>
-struct equality_comparable<executor>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-void test_can_connect()
-{
- ASIO_CONSTEXPR bool b1 = exec::can_connect<
- no_connect_1&, receiver>::value;
- ASIO_CHECK(b1 == false);
-
- ASIO_CONSTEXPR bool b2 = exec::can_connect<
- const no_connect_1&, receiver>::value;
- ASIO_CHECK(b2 == false);
-
- ASIO_CONSTEXPR bool b3 = exec::can_connect<
- no_connect_2&, receiver>::value;
- ASIO_CHECK(b3 == false);
-
- ASIO_CONSTEXPR bool b4 = exec::can_connect<
- const no_connect_2&, receiver>::value;
- ASIO_CHECK(b4 == false);
-
- ASIO_CONSTEXPR bool b5 = exec::can_connect<
- no_connect_3&, receiver>::value;
- ASIO_CHECK(b5 == false);
-
- ASIO_CONSTEXPR bool b6 = exec::can_connect<
- const no_connect_3&, receiver>::value;
- ASIO_CHECK(b6 == false);
-
- ASIO_CONSTEXPR bool b7 = exec::can_connect<
- const_member_connect&, receiver>::value;
- ASIO_CHECK(b7 == true);
-
- ASIO_CONSTEXPR bool b8 = exec::can_connect<
- const const_member_connect&, receiver>::value;
- ASIO_CHECK(b8 == true);
-
- ASIO_CONSTEXPR bool b9 = exec::can_connect<
- free_connect_const_receiver&, receiver>::value;
- ASIO_CHECK(b9 == true);
-
- ASIO_CONSTEXPR bool b10 = exec::can_connect<
- const free_connect_const_receiver&, receiver>::value;
- ASIO_CHECK(b10 == true);
-
- ASIO_CONSTEXPR bool b11 = exec::can_connect<
- non_const_member_connect&, receiver>::value;
- ASIO_CHECK(b11 == true);
-
- ASIO_CONSTEXPR bool b12 = exec::can_connect<
- const non_const_member_connect&, receiver>::value;
- ASIO_CHECK(b12 == false);
-
- ASIO_CONSTEXPR bool b13 = exec::can_connect<
- free_connect_non_const_receiver&, receiver>::value;
- ASIO_CHECK(b13 == true);
-
- ASIO_CONSTEXPR bool b14 = exec::can_connect<
- const free_connect_non_const_receiver&, receiver>::value;
- ASIO_CHECK(b14 == false);
-
- ASIO_CONSTEXPR bool b15 = exec::can_connect<
- executor&, receiver>::value;
- ASIO_CHECK(b15 == true);
-
- ASIO_CONSTEXPR bool b16 = exec::can_connect<
- const executor&, receiver>::value;
- ASIO_CHECK(b16 == true);
-}
-
-void increment(int* count)
-{
- ++(*count);
-}
-
-void test_connect()
-{
- receiver r;
-
- call_count = 0;
- const_member_connect s1;
- operation_state o1 = exec::connect(s1, r);
- ASIO_CHECK(call_count == 1);
- (void)o1;
-
- call_count = 0;
- const const_member_connect s2;
- operation_state o2 = exec::connect(s2, r);
- ASIO_CHECK(call_count == 1);
- (void)o2;
-
- call_count = 0;
- operation_state o3 = exec::connect(const_member_connect(), r);
- ASIO_CHECK(call_count == 1);
- (void)o3;
-
- call_count = 0;
- free_connect_const_receiver s3;
- operation_state o4 = exec::connect(s3, r);
- ASIO_CHECK(call_count == 1);
- (void)o4;
-
- call_count = 0;
- const free_connect_const_receiver s4;
- operation_state o5 = exec::connect(s4, r);
- ASIO_CHECK(call_count == 1);
- (void)o5;
-
- call_count = 0;
- operation_state o6 = exec::connect(free_connect_const_receiver(), r);
- ASIO_CHECK(call_count == 1);
- (void)o6;
-
- call_count = 0;
- non_const_member_connect s5;
- operation_state o7 = exec::connect(s5, r);
- ASIO_CHECK(call_count == 1);
- (void)o7;
-
- call_count = 0;
- free_connect_non_const_receiver s6;
- operation_state o8 = exec::connect(s6, r);
- ASIO_CHECK(call_count == 1);
- (void)o8;
-
- executor s7;
- exec::connect_result<executor&,
- receiver&>::type o9 = exec::connect(s7, r);
- ASIO_CHECK((
- exec::is_operation_state<
- exec::connect_result<executor&, receiver&>::type
- >::value));
- (void)o9;
-
- const executor s8;
- exec::connect_result<const executor&,
- receiver&>::type o10 = exec::connect(s8, r);
- (void)exec::connect(s8, r);
- ASIO_CHECK((
- exec::is_operation_state<
- exec::connect_result<const executor&, receiver&>::type
- >::value));
- (void)o10;
-}
-
-ASIO_TEST_SUITE
-(
- "connect",
- ASIO_TEST_CASE(test_can_connect)
- ASIO_TEST_CASE(test_connect)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/context_as.cpp b/3rdparty/asio/src/tests/unit/execution/context_as.cpp
index d2bd956c1c9..13311ba262b 100644
--- a/3rdparty/asio/src/tests/unit/execution/context_as.cpp
+++ b/3rdparty/asio/src/tests/unit/execution/context_as.cpp
@@ -2,7 +2,7 @@
// context_as.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,24 +16,14 @@
// Test that header file is self-contained.
#include "asio/execution/context_as.hpp"
+#include <functional>
#include "asio/execution/any_executor.hpp"
#include "asio/io_context.hpp"
#include "asio/static_thread_pool.hpp"
#include "../unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
void context_as_executor_query_test()
{
diff --git a/3rdparty/asio/src/tests/unit/execution/execute.cpp b/3rdparty/asio/src/tests/unit/execution/execute.cpp
deleted file mode 100644
index 409233ed0e6..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/execute.cpp
+++ /dev/null
@@ -1,388 +0,0 @@
-//
-// execute.cpp
-// ~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/execute.hpp"
-#include "asio/execution/sender.hpp"
-#include "asio/execution/submit.hpp"
-
-#include "asio/execution/invocable_archetype.hpp"
-#include "../unit_test.hpp"
-
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
-namespace exec = asio::execution;
-
-struct no_execute
-{
-};
-
-struct const_member_execute
-{
- template <typename F>
- void execute(ASIO_MOVE_ARG(F) f) const
- {
- typename asio::decay<F>::type tmp(ASIO_MOVE_CAST(F)(f));
- tmp();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename F>
-struct execute_member<const_member_execute, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-
-struct free_execute_const_executor
-{
- template <typename F>
- friend void execute(const free_execute_const_executor&,
- ASIO_MOVE_ARG(F) f)
- {
- typename asio::decay<F>::type tmp(ASIO_MOVE_CAST(F)(f));
- tmp();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename F>
-struct execute_free<free_execute_const_executor, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_FREE_TRAIT)
-
-#if defined(ASIO_HAS_MOVE)
-
-// Support for rvalue references is required in order to use the execute
-// customisation point with non-const member functions and free functions
-// taking non-const arguments.
-
-struct non_const_member_execute
-{
- template <typename F>
- void execute(ASIO_MOVE_ARG(F) f)
- {
- typename asio::decay<F>::type tmp(ASIO_MOVE_CAST(F)(f));
- tmp();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename F>
-struct execute_member<non_const_member_execute, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename F>
-struct execute_member<const non_const_member_execute, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename F>
-struct execute_member<const non_const_member_execute&, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-
-struct free_execute_non_const_executor
-{
- template <typename F>
- friend void execute(free_execute_non_const_executor&,
- ASIO_MOVE_ARG(F) f)
- {
- typename asio::decay<F>::type tmp(ASIO_MOVE_CAST(F)(f));
- tmp();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename F>
-struct execute_free<free_execute_non_const_executor, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename F>
-struct execute_free<const free_execute_non_const_executor, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-template <typename F>
-struct execute_free<const free_execute_non_const_executor&, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = false);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_EXECUTE_FREE_TRAIT)
-
-#endif // defined(ASIO_HAS_MOVE)
-
-struct operation_state
-{
- void start() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-template <>
-struct start_member<operation_state>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct sender : exec::sender_base
-{
- sender()
- {
- }
-
- template <typename R>
- operation_state connect(ASIO_MOVE_ARG(R) r) const
- {
- (void)r;
- return operation_state();
- }
-
- template <typename R>
- void submit(ASIO_MOVE_ARG(R) r) const
- {
- exec::set_value(ASIO_MOVE_CAST(R)(r));
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-template <typename R>
-struct connect_member<const sender, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-template <typename R>
-struct submit_member<const sender, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-void test_can_execute()
-{
- ASIO_CONSTEXPR bool b1 = exec::can_execute<
- no_execute&, exec::invocable_archetype>::value;
- ASIO_CHECK(b1 == false);
-
- ASIO_CONSTEXPR bool b2 = exec::can_execute<
- const no_execute&, exec::invocable_archetype>::value;
- ASIO_CHECK(b2 == false);
-
- ASIO_CONSTEXPR bool b3 = exec::can_execute<
- const_member_execute&, exec::invocable_archetype>::value;
- ASIO_CHECK(b3 == true);
-
- ASIO_CONSTEXPR bool b4 = exec::can_execute<
- const const_member_execute&, exec::invocable_archetype>::value;
- ASIO_CHECK(b4 == true);
-
- ASIO_CONSTEXPR bool b5 = exec::can_execute<
- free_execute_const_executor&, exec::invocable_archetype>::value;
- ASIO_CHECK(b5 == true);
-
- ASIO_CONSTEXPR bool b6 = exec::can_execute<
- const free_execute_const_executor&, exec::invocable_archetype>::value;
- ASIO_CHECK(b6 == true);
-
-#if defined(ASIO_HAS_MOVE)
- ASIO_CONSTEXPR bool b7 = exec::can_execute<
- non_const_member_execute&, exec::invocable_archetype>::value;
- ASIO_CHECK(b7 == true);
-
- ASIO_CONSTEXPR bool b8 = exec::can_execute<
- const non_const_member_execute&, exec::invocable_archetype>::value;
- ASIO_CHECK(b8 == false);
-
- ASIO_CONSTEXPR bool b9 = exec::can_execute<
- free_execute_non_const_executor&, exec::invocable_archetype>::value;
- ASIO_CHECK(b9 == true);
-
- ASIO_CONSTEXPR bool b10 = exec::can_execute<
- const free_execute_non_const_executor&, exec::invocable_archetype>::value;
- ASIO_CHECK(b10 == false);
-#endif // defined(ASIO_HAS_MOVE)
-
- ASIO_CONSTEXPR bool b11 = exec::can_execute<
- sender&, exec::invocable_archetype>::value;
- ASIO_CHECK(b11 == true);
-
- ASIO_CONSTEXPR bool b12 = exec::can_execute<
- const sender&, exec::invocable_archetype>::value;
- ASIO_CHECK(b12 == true);
-}
-
-void increment(int* count)
-{
- ++(*count);
-}
-
-void test_execute()
-{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
- int count = 0;
- const_member_execute ex1 = {};
- exec::execute(ex1, bindns::bind(&increment, &count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- const const_member_execute ex2 = {};
- exec::execute(ex2, bindns::bind(&increment, &count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- exec::execute(const_member_execute(), bindns::bind(&increment, &count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- free_execute_const_executor ex3 = {};
- exec::execute(ex3, bindns::bind(&increment, &count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- const free_execute_const_executor ex4 = {};
- exec::execute(ex4, bindns::bind(&increment, &count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- exec::execute(free_execute_const_executor(),
- bindns::bind(&increment, &count));
- ASIO_CHECK(count == 1);
-
-#if defined(ASIO_HAS_MOVE)
- count = 0;
- non_const_member_execute ex5 = {};
- exec::execute(ex5, bindns::bind(&increment, &count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- free_execute_non_const_executor ex6 = {};
- exec::execute(ex6, bindns::bind(&increment, &count));
- ASIO_CHECK(count == 1);
-#endif // defined(ASIO_HAS_MOVE)
-
- count = 0;
- sender ex7;
- exec::execute(ex3, bindns::bind(&increment, &count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- const sender ex8;
- exec::execute(ex4, bindns::bind(&increment, &count));
- ASIO_CHECK(count == 1);
-}
-
-ASIO_TEST_SUITE
-(
- "blocking",
- ASIO_TEST_CASE(test_can_execute)
- ASIO_TEST_CASE(test_execute)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/executor.cpp b/3rdparty/asio/src/tests/unit/execution/executor.cpp
index 497c5835684..8b02622bdca 100644
--- a/3rdparty/asio/src/tests/unit/execution/executor.cpp
+++ b/3rdparty/asio/src/tests/unit/execution/executor.cpp
@@ -2,7 +2,7 @@
// executor.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -28,28 +28,26 @@ struct executor
{
}
- executor(const executor&) ASIO_NOEXCEPT
+ executor(const executor&) noexcept
{
}
-#if defined(ASIO_HAS_MOVE)
- executor(executor&&) ASIO_NOEXCEPT
+ executor(executor&&) noexcept
{
}
-#endif // defined(ASIO_HAS_MOVE)
template <typename F>
- void execute(ASIO_MOVE_ARG(F) f) const ASIO_NOEXCEPT
+ void execute(F&& f) const noexcept
{
(void)f;
}
- bool operator==(const executor&) const ASIO_NOEXCEPT
+ bool operator==(const executor&) const noexcept
{
return true;
}
- bool operator!=(const executor&) const ASIO_NOEXCEPT
+ bool operator!=(const executor&) const noexcept
{
return false;
}
@@ -63,8 +61,8 @@ namespace traits {
template <typename F>
struct execute_member<executor, F>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef void result_type;
};
@@ -74,8 +72,8 @@ struct execute_member<executor, F>
template <>
struct equality_comparable<executor>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -101,84 +99,8 @@ void is_executor_test()
>::value));
}
-void is_executor_of_test()
-{
- ASIO_CHECK((
- !asio::execution::is_executor_of<
- void,
- void(*)()
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_executor_of<
- not_an_executor,
- void(*)()
- >::value));
-
- ASIO_CHECK((
- asio::execution::is_executor_of<
- executor,
- void(*)()
- >::value));
-}
-
-struct executor_with_other_shape_type
-{
- typedef double shape_type;
-};
-
-void executor_shape_test()
-{
- ASIO_CHECK((
- asio::is_same<
- asio::execution::executor_shape<executor>::type,
- std::size_t
- >::value));
-
- ASIO_CHECK((
- asio::is_same<
- asio::execution::executor_shape<
- executor_with_other_shape_type
- >::type,
- double
- >::value));
-}
-
-struct executor_with_other_index_type
-{
- typedef unsigned char index_type;
-};
-
-void executor_index_test()
-{
- ASIO_CHECK((
- asio::is_same<
- asio::execution::executor_index<executor>::type,
- std::size_t
- >::value));
-
- ASIO_CHECK((
- asio::is_same<
- asio::execution::executor_index<
- executor_with_other_shape_type
- >::type,
- double
- >::value));
-
- ASIO_CHECK((
- asio::is_same<
- asio::execution::executor_index<
- executor_with_other_index_type
- >::type,
- unsigned char
- >::value));
-}
-
ASIO_TEST_SUITE
(
"executor",
ASIO_TEST_CASE(is_executor_test)
- ASIO_TEST_CASE(is_executor_of_test)
- ASIO_TEST_CASE(executor_shape_test)
- ASIO_TEST_CASE(executor_index_test)
)
diff --git a/3rdparty/asio/src/tests/unit/execution/invocable_archetype.cpp b/3rdparty/asio/src/tests/unit/execution/invocable_archetype.cpp
index 7ef66d9cdd2..5dbfb94d9f4 100644
--- a/3rdparty/asio/src/tests/unit/execution/invocable_archetype.cpp
+++ b/3rdparty/asio/src/tests/unit/execution/invocable_archetype.cpp
@@ -2,7 +2,7 @@
// invocable_archetype.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/execution/mapping.cpp b/3rdparty/asio/src/tests/unit/execution/mapping.cpp
index ca2deefe0ad..399aae3ea90 100644
--- a/3rdparty/asio/src/tests/unit/execution/mapping.cpp
+++ b/3rdparty/asio/src/tests/unit/execution/mapping.cpp
@@ -2,7 +2,7 @@
// mapping.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -35,12 +35,12 @@ struct ex_nq_nr
{
}
- friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) noexcept
{
return false;
}
@@ -64,7 +64,7 @@ struct is_executor<ex_nq_nr> : asio::true_type
template <typename ResultType, typename ParamType, typename Result>
struct ex_cq_nr
{
- static ASIO_CONSTEXPR ResultType query(ParamType) ASIO_NOEXCEPT
+ static constexpr ResultType query(ParamType) noexcept
{
return Result();
}
@@ -74,12 +74,12 @@ struct ex_cq_nr
{
}
- friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) noexcept
{
return false;
}
@@ -114,12 +114,12 @@ struct query_static_constexpr_member<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Result result_type; // Must return raw result type.
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return Result();
}
@@ -133,7 +133,7 @@ struct query_static_constexpr_member<
template <typename ResultType, typename ParamType, typename Result>
struct ex_mq_nr
{
- ResultType query(ParamType) const ASIO_NOEXCEPT
+ ResultType query(ParamType) const noexcept
{
return Result();
}
@@ -143,12 +143,12 @@ struct ex_mq_nr
{
}
- friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) noexcept
{
return false;
}
@@ -183,8 +183,8 @@ struct query_member<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ResultType result_type;
};
@@ -197,7 +197,7 @@ struct query_member<
template <typename ResultType, typename ParamType, typename Result>
struct ex_fq_nr
{
- friend ResultType query(const ex_fq_nr&, ParamType) ASIO_NOEXCEPT
+ friend ResultType query(const ex_fq_nr&, ParamType) noexcept
{
return Result();
}
@@ -207,12 +207,12 @@ struct ex_fq_nr
{
}
- friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) noexcept
{
return false;
}
@@ -247,8 +247,8 @@ struct query_free<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ResultType result_type;
};
@@ -261,24 +261,24 @@ struct query_free<
template <typename CurrentType, typename OtherType>
struct ex_mq_mr
{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
+ CurrentType query(CurrentType) const noexcept
{
return CurrentType();
}
- CurrentType query(OtherType) const ASIO_NOEXCEPT
+ CurrentType query(OtherType) const noexcept
{
return CurrentType();
}
ex_mq_mr<CurrentType, OtherType> require(
- CurrentType) const ASIO_NOEXCEPT
+ CurrentType) const noexcept
{
return ex_mq_mr<CurrentType, OtherType>();
}
ex_mq_mr<OtherType, CurrentType> require(
- OtherType) const ASIO_NOEXCEPT
+ OtherType) const noexcept
{
return ex_mq_mr<OtherType, CurrentType>();
}
@@ -288,12 +288,12 @@ struct ex_mq_mr
{
}
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return false;
}
@@ -302,13 +302,13 @@ struct ex_mq_mr
template <typename CurrentType>
struct ex_mq_mr<CurrentType, CurrentType>
{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
+ CurrentType query(CurrentType) const noexcept
{
return CurrentType();
}
ex_mq_mr<CurrentType, CurrentType> require(
- CurrentType) const ASIO_NOEXCEPT
+ CurrentType) const noexcept
{
return ex_mq_mr<CurrentType, CurrentType>();
}
@@ -318,12 +318,12 @@ struct ex_mq_mr<CurrentType, CurrentType>
{
}
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return false;
}
@@ -358,8 +358,8 @@ struct query_member<
|| asio::is_convertible<Param, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef CurrentType result_type;
};
@@ -375,8 +375,8 @@ struct require_member<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_mq_mr<CurrentType, OtherType> result_type;
};
@@ -389,8 +389,8 @@ struct require_member<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_mq_mr<OtherType, CurrentType> result_type;
};
@@ -403,36 +403,36 @@ struct require_member<
template <typename CurrentType, typename OtherType>
struct ex_fq_fr
{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
{
return CurrentType();
}
- friend CurrentType query(const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, OtherType) noexcept
{
return CurrentType();
}
friend ex_fq_fr<CurrentType, OtherType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, OtherType>();
}
friend ex_fq_fr<OtherType, CurrentType> require(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ const ex_fq_fr&, OtherType) noexcept
{
return ex_fq_fr<OtherType, CurrentType>();
}
friend ex_fq_fr<CurrentType, OtherType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, OtherType>();
}
friend ex_fq_fr<OtherType, CurrentType> prefer(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ const ex_fq_fr&, OtherType) noexcept
{
return ex_fq_fr<OtherType, CurrentType>();
}
@@ -442,12 +442,12 @@ struct ex_fq_fr
{
}
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return false;
}
@@ -456,19 +456,19 @@ struct ex_fq_fr
template <typename CurrentType>
struct ex_fq_fr<CurrentType, CurrentType>
{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
{
return CurrentType();
}
friend ex_fq_fr<CurrentType, CurrentType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, CurrentType>();
}
friend ex_fq_fr<CurrentType, CurrentType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, CurrentType>();
}
@@ -478,12 +478,12 @@ struct ex_fq_fr<CurrentType, CurrentType>
{
}
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return false;
}
@@ -518,8 +518,8 @@ struct query_free<
|| asio::is_convertible<Param, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef CurrentType result_type;
};
@@ -535,8 +535,8 @@ struct require_free<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<CurrentType, OtherType> result_type;
};
@@ -549,8 +549,8 @@ struct require_free<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<OtherType, CurrentType> result_type;
};
@@ -566,8 +566,8 @@ struct prefer_free<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<CurrentType, OtherType> result_type;
};
@@ -580,8 +580,8 @@ struct prefer_free<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<OtherType, CurrentType> result_type;
};
@@ -594,19 +594,19 @@ struct prefer_free<
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_query()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_query<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_query<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_query<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_query<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -629,29 +629,27 @@ void test_query()
template <typename Executor, typename Param, typename ExpectedResult>
void test_constexpr_query()
{
-#if defined(ASIO_HAS_CONSTEXPR)
constexpr Executor ex1 = {};
constexpr exec::mapping_t result1 = asio::query(ex1, Param());
ASIO_CHECK(result1 == ExpectedResult());
-#endif // defined(ASIO_HAS_CONSTEXPR)
}
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_require()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_require<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_require<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_require<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_require<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -680,19 +678,19 @@ void test_require()
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_prefer()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_prefer<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_prefer<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_prefer<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_prefer<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -721,9 +719,18 @@ void test_prefer()
void test_vars()
{
ASIO_CHECK(s() == exec::mapping);
+ ASIO_CHECK(s() != exec::mapping.thread);
+ ASIO_CHECK(s() != exec::mapping.new_thread);
+ ASIO_CHECK(s() != exec::mapping.other);
ASIO_CHECK(n1() == exec::mapping.thread);
+ ASIO_CHECK(n1() != exec::mapping.new_thread);
+ ASIO_CHECK(n1() != exec::mapping.other);
ASIO_CHECK(n2() == exec::mapping.new_thread);
+ ASIO_CHECK(n2() != exec::mapping.thread);
+ ASIO_CHECK(n2() != exec::mapping.other);
ASIO_CHECK(n3() == exec::mapping.other);
+ ASIO_CHECK(n3() != exec::mapping.thread);
+ ASIO_CHECK(n3() != exec::mapping.new_thread);
}
ASIO_TEST_SUITE
diff --git a/3rdparty/asio/src/tests/unit/execution/operation_state.cpp b/3rdparty/asio/src/tests/unit/execution/operation_state.cpp
deleted file mode 100644
index d492816a158..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/operation_state.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-//
-// operation_state.cpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/operation_state.hpp"
-
-#include <string>
-#include "asio/error_code.hpp"
-#include "../unit_test.hpp"
-
-struct not_an_operation_state_1
-{
-};
-
-struct not_an_operation_state_2
-{
- void start()
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-template <>
-struct start_member<not_an_operation_state_2>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct operation_state
-{
- void start() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-template <>
-struct start_member<operation_state>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-void is_operation_state_test()
-{
- ASIO_CHECK((
- !asio::execution::is_operation_state<
- void
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_operation_state<
- not_an_operation_state_1
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_operation_state<
- not_an_operation_state_2
- >::value));
-
- ASIO_CHECK((
- asio::execution::is_operation_state<
- operation_state
- >::value));
-}
-
-ASIO_TEST_SUITE
-(
- "operation_state",
- ASIO_TEST_CASE(is_operation_state_test)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/outstanding_work.cpp b/3rdparty/asio/src/tests/unit/execution/outstanding_work.cpp
index 3546a6b1d6a..cddd0b52c23 100644
--- a/3rdparty/asio/src/tests/unit/execution/outstanding_work.cpp
+++ b/3rdparty/asio/src/tests/unit/execution/outstanding_work.cpp
@@ -2,7 +2,7 @@
// outstanding_work.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -34,12 +34,12 @@ struct ex_nq_nr
{
}
- friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) noexcept
{
return false;
}
@@ -63,7 +63,7 @@ struct is_executor<ex_nq_nr> : asio::true_type
template <typename ResultType, typename ParamType, typename Result>
struct ex_cq_nr
{
- static ASIO_CONSTEXPR ResultType query(ParamType) ASIO_NOEXCEPT
+ static constexpr ResultType query(ParamType) noexcept
{
return Result();
}
@@ -73,12 +73,12 @@ struct ex_cq_nr
{
}
- friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) noexcept
{
return false;
}
@@ -113,12 +113,12 @@ struct query_static_constexpr_member<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Result result_type; // Must return raw result type.
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return Result();
}
@@ -132,7 +132,7 @@ struct query_static_constexpr_member<
template <typename ResultType, typename ParamType, typename Result>
struct ex_mq_nr
{
- ResultType query(ParamType) const ASIO_NOEXCEPT
+ ResultType query(ParamType) const noexcept
{
return Result();
}
@@ -142,12 +142,12 @@ struct ex_mq_nr
{
}
- friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) noexcept
{
return false;
}
@@ -182,8 +182,8 @@ struct query_member<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ResultType result_type;
};
@@ -196,7 +196,7 @@ struct query_member<
template <typename ResultType, typename ParamType, typename Result>
struct ex_fq_nr
{
- friend ResultType query(const ex_fq_nr&, ParamType) ASIO_NOEXCEPT
+ friend ResultType query(const ex_fq_nr&, ParamType) noexcept
{
return Result();
}
@@ -206,12 +206,12 @@ struct ex_fq_nr
{
}
- friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) noexcept
{
return false;
}
@@ -246,8 +246,8 @@ struct query_free<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ResultType result_type;
};
@@ -260,24 +260,24 @@ struct query_free<
template <typename CurrentType, typename OtherType>
struct ex_mq_mr
{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
+ CurrentType query(CurrentType) const noexcept
{
return CurrentType();
}
- CurrentType query(OtherType) const ASIO_NOEXCEPT
+ CurrentType query(OtherType) const noexcept
{
return CurrentType();
}
ex_mq_mr<CurrentType, OtherType> require(
- CurrentType) const ASIO_NOEXCEPT
+ CurrentType) const noexcept
{
return ex_mq_mr<CurrentType, OtherType>();
}
ex_mq_mr<OtherType, CurrentType> require(
- OtherType) const ASIO_NOEXCEPT
+ OtherType) const noexcept
{
return ex_mq_mr<OtherType, CurrentType>();
}
@@ -287,12 +287,12 @@ struct ex_mq_mr
{
}
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return false;
}
@@ -301,13 +301,13 @@ struct ex_mq_mr
template <typename CurrentType>
struct ex_mq_mr<CurrentType, CurrentType>
{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
+ CurrentType query(CurrentType) const noexcept
{
return CurrentType();
}
ex_mq_mr<CurrentType, CurrentType> require(
- CurrentType) const ASIO_NOEXCEPT
+ CurrentType) const noexcept
{
return ex_mq_mr<CurrentType, CurrentType>();
}
@@ -317,12 +317,12 @@ struct ex_mq_mr<CurrentType, CurrentType>
{
}
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return false;
}
@@ -357,8 +357,8 @@ struct query_member<
|| asio::is_convertible<Param, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef CurrentType result_type;
};
@@ -374,8 +374,8 @@ struct require_member<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_mq_mr<CurrentType, OtherType> result_type;
};
@@ -388,8 +388,8 @@ struct require_member<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_mq_mr<OtherType, CurrentType> result_type;
};
@@ -402,36 +402,36 @@ struct require_member<
template <typename CurrentType, typename OtherType>
struct ex_fq_fr
{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
{
return CurrentType();
}
- friend CurrentType query(const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, OtherType) noexcept
{
return CurrentType();
}
friend ex_fq_fr<CurrentType, OtherType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, OtherType>();
}
friend ex_fq_fr<OtherType, CurrentType> require(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ const ex_fq_fr&, OtherType) noexcept
{
return ex_fq_fr<OtherType, CurrentType>();
}
friend ex_fq_fr<CurrentType, OtherType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, OtherType>();
}
friend ex_fq_fr<OtherType, CurrentType> prefer(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ const ex_fq_fr&, OtherType) noexcept
{
return ex_fq_fr<OtherType, CurrentType>();
}
@@ -441,12 +441,12 @@ struct ex_fq_fr
{
}
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return false;
}
@@ -455,19 +455,19 @@ struct ex_fq_fr
template <typename CurrentType>
struct ex_fq_fr<CurrentType, CurrentType>
{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
{
return CurrentType();
}
friend ex_fq_fr<CurrentType, CurrentType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, CurrentType>();
}
friend ex_fq_fr<CurrentType, CurrentType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, CurrentType>();
}
@@ -477,12 +477,12 @@ struct ex_fq_fr<CurrentType, CurrentType>
{
}
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return false;
}
@@ -517,8 +517,8 @@ struct query_free<
|| asio::is_convertible<Param, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef CurrentType result_type;
};
@@ -534,8 +534,8 @@ struct require_free<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<CurrentType, OtherType> result_type;
};
@@ -548,8 +548,8 @@ struct require_free<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<OtherType, CurrentType> result_type;
};
@@ -565,8 +565,8 @@ struct prefer_free<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<CurrentType, OtherType> result_type;
};
@@ -579,8 +579,8 @@ struct prefer_free<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<OtherType, CurrentType> result_type;
};
@@ -593,19 +593,19 @@ struct prefer_free<
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_query()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_query<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_query<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_query<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_query<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -628,29 +628,27 @@ void test_query()
template <typename Executor, typename Param, typename ExpectedResult>
void test_constexpr_query()
{
-#if defined(ASIO_HAS_CONSTEXPR)
constexpr Executor ex1 = {};
constexpr exec::outstanding_work_t result1 = asio::query(ex1, Param());
ASIO_CHECK(result1 == ExpectedResult());
-#endif // defined(ASIO_HAS_CONSTEXPR)
}
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_require()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_require<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_require<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_require<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_require<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -679,19 +677,19 @@ void test_require()
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_prefer()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_prefer<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_prefer<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_prefer<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_prefer<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -720,8 +718,12 @@ void test_prefer()
void test_vars()
{
ASIO_CHECK(s() == exec::outstanding_work);
+ ASIO_CHECK(s() != exec::outstanding_work.untracked);
+ ASIO_CHECK(s() != exec::outstanding_work.tracked);
ASIO_CHECK(n1() == exec::outstanding_work.untracked);
+ ASIO_CHECK(n1() != exec::outstanding_work.tracked);
ASIO_CHECK(n2() == exec::outstanding_work.tracked);
+ ASIO_CHECK(n2() != exec::outstanding_work.untracked);
}
ASIO_TEST_SUITE
diff --git a/3rdparty/asio/src/tests/unit/execution/prefer_only.cpp b/3rdparty/asio/src/tests/unit/execution/prefer_only.cpp
index d7467d81114..60500002475 100644
--- a/3rdparty/asio/src/tests/unit/execution/prefer_only.cpp
+++ b/3rdparty/asio/src/tests/unit/execution/prefer_only.cpp
@@ -2,7 +2,7 @@
// prefer_only.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,22 +16,12 @@
// Test that header file is self-contained.
#include "asio/execution/prefer_only.hpp"
+#include <functional>
#include "asio/execution/any_executor.hpp"
#include "../unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
static int possibly_blocking_count = 0;
static int never_blocking_count = 0;
@@ -45,13 +35,13 @@ struct possibly_blocking_executor
}
friend bool operator==(const possibly_blocking_executor&,
- const possibly_blocking_executor&) ASIO_NOEXCEPT
+ const possibly_blocking_executor&) noexcept
{
return true;
}
friend bool operator!=(const possibly_blocking_executor&,
- const possibly_blocking_executor&) ASIO_NOEXCEPT
+ const possibly_blocking_executor&) noexcept
{
return false;
}
@@ -65,8 +55,8 @@ namespace traits {
template <typename F>
struct execute_member<possibly_blocking_executor, F>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef void result_type;
};
@@ -77,8 +67,8 @@ struct execute_member<possibly_blocking_executor, F>
template <>
struct equality_comparable<possibly_blocking_executor>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -88,8 +78,8 @@ struct equality_comparable<possibly_blocking_executor>
struct never_blocking_executor
{
- static ASIO_CONSTEXPR execution::blocking_t::never_t
- query(execution::blocking_t) ASIO_NOEXCEPT
+ static constexpr execution::blocking_t::never_t
+ query(execution::blocking_t) noexcept
{
return execution::blocking_t::never_t();
}
@@ -101,13 +91,13 @@ struct never_blocking_executor
}
friend bool operator==(const never_blocking_executor&,
- const never_blocking_executor&) ASIO_NOEXCEPT
+ const never_blocking_executor&) noexcept
{
return true;
}
friend bool operator!=(const never_blocking_executor&,
- const never_blocking_executor&) ASIO_NOEXCEPT
+ const never_blocking_executor&) noexcept
{
return false;
}
@@ -121,8 +111,8 @@ namespace traits {
template <typename F>
struct execute_member<never_blocking_executor, F>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef void result_type;
};
@@ -133,8 +123,8 @@ struct execute_member<never_blocking_executor, F>
template <>
struct equality_comparable<never_blocking_executor>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -148,12 +138,12 @@ struct query_static_constexpr_member<
asio::is_convertible<Param, execution::blocking_t>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::blocking_t::never_t result_type;
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return result_type();
}
@@ -173,7 +163,7 @@ struct either_blocking_executor
{
}
- execution::blocking_t query(execution::blocking_t) const ASIO_NOEXCEPT
+ execution::blocking_t query(execution::blocking_t) const noexcept
{
return blocking_;
}
@@ -198,13 +188,13 @@ struct either_blocking_executor
}
friend bool operator==(const either_blocking_executor& a,
- const either_blocking_executor& b) ASIO_NOEXCEPT
+ const either_blocking_executor& b) noexcept
{
return a.blocking_ == b.blocking_;
}
friend bool operator!=(const either_blocking_executor& a,
- const either_blocking_executor& b) ASIO_NOEXCEPT
+ const either_blocking_executor& b) noexcept
{
return a.blocking_ != b.blocking_;
}
@@ -218,8 +208,8 @@ namespace traits {
template <typename F>
struct execute_member<either_blocking_executor, F>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef void result_type;
};
@@ -230,8 +220,8 @@ struct execute_member<either_blocking_executor, F>
template <>
struct equality_comparable<either_blocking_executor>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
};
#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
@@ -245,8 +235,8 @@ struct query_member<
asio::is_convertible<Param, execution::blocking_t>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef execution::blocking_t result_type;
};
@@ -262,8 +252,8 @@ struct require_member<
asio::is_convertible<Param, execution::blocking_t>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = false;
typedef either_blocking_executor result_type;
};
@@ -464,73 +454,73 @@ void prefer_only_executor_execute_test()
executor_type ex1 = possibly_blocking_executor();
- execution::execute(ex1, &do_nothing);
+ ex1.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 1);
ASIO_CHECK(never_blocking_count == 0);
executor_type ex2 = asio::prefer(ex1, execution::blocking.possibly);
- execution::execute(ex2, &do_nothing);
+ ex2.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 2);
ASIO_CHECK(never_blocking_count == 0);
executor_type ex3 = asio::prefer(ex1, execution::blocking.never);
- execution::execute(ex3, &do_nothing);
+ ex3.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 3);
ASIO_CHECK(never_blocking_count == 0);
executor_type ex4 = never_blocking_executor();
- execution::execute(ex4, &do_nothing);
+ ex4.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 3);
ASIO_CHECK(never_blocking_count == 1);
executor_type ex5 = asio::prefer(ex4, execution::blocking.possibly);
- execution::execute(ex5, &do_nothing);
+ ex5.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 3);
ASIO_CHECK(never_blocking_count == 2);
executor_type ex6 = asio::prefer(ex4, execution::blocking.never);
- execution::execute(ex6, &do_nothing);
+ ex6.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 3);
ASIO_CHECK(never_blocking_count == 3);
executor_type ex7 = either_blocking_executor(execution::blocking.possibly);
- execution::execute(ex7, &do_nothing);
+ ex7.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 4);
ASIO_CHECK(never_blocking_count == 3);
executor_type ex8 = asio::prefer(ex7, execution::blocking.possibly);
- execution::execute(ex8, &do_nothing);
+ ex8.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 5);
ASIO_CHECK(never_blocking_count == 3);
executor_type ex9 = asio::prefer(ex7, execution::blocking.never);
- execution::execute(ex9, &do_nothing);
+ ex9.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 5);
ASIO_CHECK(never_blocking_count == 4);
executor_type ex10 = either_blocking_executor(execution::blocking.never);
- execution::execute(ex10, &do_nothing);
+ ex10.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 5);
ASIO_CHECK(never_blocking_count == 5);
executor_type ex11 = asio::prefer(ex7, execution::blocking.possibly);
- execution::execute(ex11, &do_nothing);
+ ex11.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 6);
ASIO_CHECK(never_blocking_count == 5);
executor_type ex12 = asio::prefer(ex7, execution::blocking.never);
- execution::execute(ex12, &do_nothing);
+ ex12.execute(&do_nothing);
ASIO_CHECK(possibly_blocking_count == 6);
ASIO_CHECK(never_blocking_count == 6);
}
diff --git a/3rdparty/asio/src/tests/unit/execution/receiver.cpp b/3rdparty/asio/src/tests/unit/execution/receiver.cpp
deleted file mode 100644
index ec373866e80..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/receiver.cpp
+++ /dev/null
@@ -1,549 +0,0 @@
-//
-// receiver.cpp
-// ~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/receiver.hpp"
-
-#include <string>
-#include "asio/error_code.hpp"
-#include "../unit_test.hpp"
-
-struct not_a_receiver
-{
-};
-
-struct receiver
-{
- receiver()
- {
- }
-
- receiver(const receiver&)
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- receiver(receiver&&)
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E) e) ASIO_NOEXCEPT
- {
- (void)e;
- }
-
- void set_done() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename E>
-struct set_error_member<receiver, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_done_member<receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct receiver_of_0
-{
- receiver_of_0()
- {
- }
-
- receiver_of_0(const receiver_of_0&)
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- receiver_of_0(receiver_of_0&&)
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E) e) ASIO_NOEXCEPT
- {
- (void)e;
- }
-
- void set_done() ASIO_NOEXCEPT
- {
- }
-
- void set_value()
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename E>
-struct set_error_member<receiver_of_0, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_done_member<receiver_of_0>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_value_member<receiver_of_0, void()>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct receiver_of_1
-{
- receiver_of_1()
- {
- }
-
- receiver_of_1(const receiver_of_1&)
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- receiver_of_1(receiver_of_1&&)
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E) e) ASIO_NOEXCEPT
- {
- (void)e;
- }
-
- void set_done() ASIO_NOEXCEPT
- {
- }
-
- void set_value(int) ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename E>
-struct set_error_member<receiver_of_1, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_done_member<receiver_of_1>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_value_member<receiver_of_1, void(int)>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct receiver_of_2
-{
- receiver_of_2()
- {
- }
-
- receiver_of_2(const receiver_of_2&)
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- receiver_of_2(receiver_of_2&&)
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E) e) ASIO_NOEXCEPT
- {
- (void)e;
- }
-
- void set_done() ASIO_NOEXCEPT
- {
- }
-
- void set_value(int, std::string)
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename E>
-struct set_error_member<receiver_of_2, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_done_member<receiver_of_2>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_value_member<receiver_of_2, void(int, std::string)>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-void is_receiver_test()
-{
- ASIO_CHECK((
- !asio::execution::is_receiver<
- void,
- asio::error_code
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver<
- not_a_receiver,
- asio::error_code
- >::value));
-
- ASIO_CHECK((
- asio::execution::is_receiver<
- receiver,
- asio::error_code
- >::value));
-
- ASIO_CHECK((
- asio::execution::is_receiver<
- receiver_of_0,
- asio::error_code
- >::value));
-
- ASIO_CHECK((
- asio::execution::is_receiver<
- receiver_of_1,
- asio::error_code
- >::value));
-
- ASIO_CHECK((
- asio::execution::is_receiver<
- receiver_of_2,
- asio::error_code
- >::value));
-}
-
-void is_receiver_of_test()
-{
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- void
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- void,
- int
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- not_a_receiver
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- not_a_receiver,
- int
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- not_a_receiver,
- int,
- std::string
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- receiver
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- receiver,
- int
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- receiver,
- int,
- std::string
- >::value));
-
- ASIO_CHECK((
- asio::execution::is_receiver_of<
- receiver_of_0
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- receiver_of_0,
- int
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- receiver_of_0,
- int,
- std::string
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- receiver_of_1
- >::value));
-
- ASIO_CHECK((
- asio::execution::is_receiver_of<
- receiver_of_1,
- int
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- receiver_of_1,
- int,
- std::string
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- receiver_of_2
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_receiver_of<
- receiver_of_2,
- int
- >::value));
-
- ASIO_CHECK((
- asio::execution::is_receiver_of<
- receiver_of_2,
- int,
- std::string
- >::value));
-}
-
-void is_nothrow_receiver_of_test()
-{
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- void
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- void,
- int
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- not_a_receiver
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- not_a_receiver,
- int
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- not_a_receiver,
- int,
- std::string
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- receiver
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- receiver,
- int
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- receiver,
- int,
- std::string
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- receiver_of_0
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- receiver_of_0,
- int
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- receiver_of_0,
- int,
- std::string
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- receiver_of_1
- >::value));
-
- ASIO_CHECK((
- asio::execution::is_nothrow_receiver_of<
- receiver_of_1,
- int
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- receiver_of_1,
- int,
- std::string
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- receiver_of_2
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- receiver_of_2,
- int
- >::value));
-
- ASIO_CHECK((
- !asio::execution::is_nothrow_receiver_of<
- receiver_of_2,
- int,
- std::string
- >::value));
-}
-
-ASIO_TEST_SUITE
-(
- "receiver",
- ASIO_TEST_CASE(is_receiver_test)
- ASIO_TEST_CASE(is_receiver_of_test)
- ASIO_TEST_CASE(is_nothrow_receiver_of_test)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/relationship.cpp b/3rdparty/asio/src/tests/unit/execution/relationship.cpp
index 3c3f2c3900e..a91144e8125 100644
--- a/3rdparty/asio/src/tests/unit/execution/relationship.cpp
+++ b/3rdparty/asio/src/tests/unit/execution/relationship.cpp
@@ -2,7 +2,7 @@
// relationship.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -34,12 +34,12 @@ struct ex_nq_nr
{
}
- friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_nq_nr&, const ex_nq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_nq_nr&, const ex_nq_nr&) noexcept
{
return false;
}
@@ -63,7 +63,7 @@ struct is_executor<ex_nq_nr> : asio::true_type
template <typename ResultType, typename ParamType, typename Result>
struct ex_cq_nr
{
- static ASIO_CONSTEXPR ResultType query(ParamType) ASIO_NOEXCEPT
+ static constexpr ResultType query(ParamType) noexcept
{
return Result();
}
@@ -73,12 +73,12 @@ struct ex_cq_nr
{
}
- friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_cq_nr&, const ex_cq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_cq_nr&, const ex_cq_nr&) noexcept
{
return false;
}
@@ -113,12 +113,12 @@ struct query_static_constexpr_member<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef Result result_type; // Must return raw result type.
- static ASIO_CONSTEXPR result_type value()
+ static constexpr result_type value()
{
return Result();
}
@@ -132,7 +132,7 @@ struct query_static_constexpr_member<
template <typename ResultType, typename ParamType, typename Result>
struct ex_mq_nr
{
- ResultType query(ParamType) const ASIO_NOEXCEPT
+ ResultType query(ParamType) const noexcept
{
return Result();
}
@@ -142,12 +142,12 @@ struct ex_mq_nr
{
}
- friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_nr&, const ex_mq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_nr&, const ex_mq_nr&) noexcept
{
return false;
}
@@ -182,8 +182,8 @@ struct query_member<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ResultType result_type;
};
@@ -196,7 +196,7 @@ struct query_member<
template <typename ResultType, typename ParamType, typename Result>
struct ex_fq_nr
{
- friend ResultType query(const ex_fq_nr&, ParamType) ASIO_NOEXCEPT
+ friend ResultType query(const ex_fq_nr&, ParamType) noexcept
{
return Result();
}
@@ -206,12 +206,12 @@ struct ex_fq_nr
{
}
- friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_nr&, const ex_fq_nr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_nr&, const ex_fq_nr&) noexcept
{
return false;
}
@@ -246,8 +246,8 @@ struct query_free<
asio::is_convertible<Param, ParamType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ResultType result_type;
};
@@ -260,24 +260,24 @@ struct query_free<
template <typename CurrentType, typename OtherType>
struct ex_mq_mr
{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
+ CurrentType query(CurrentType) const noexcept
{
return CurrentType();
}
- CurrentType query(OtherType) const ASIO_NOEXCEPT
+ CurrentType query(OtherType) const noexcept
{
return CurrentType();
}
ex_mq_mr<CurrentType, OtherType> require(
- CurrentType) const ASIO_NOEXCEPT
+ CurrentType) const noexcept
{
return ex_mq_mr<CurrentType, OtherType>();
}
ex_mq_mr<OtherType, CurrentType> require(
- OtherType) const ASIO_NOEXCEPT
+ OtherType) const noexcept
{
return ex_mq_mr<OtherType, CurrentType>();
}
@@ -287,12 +287,12 @@ struct ex_mq_mr
{
}
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return false;
}
@@ -301,13 +301,13 @@ struct ex_mq_mr
template <typename CurrentType>
struct ex_mq_mr<CurrentType, CurrentType>
{
- CurrentType query(CurrentType) const ASIO_NOEXCEPT
+ CurrentType query(CurrentType) const noexcept
{
return CurrentType();
}
ex_mq_mr<CurrentType, CurrentType> require(
- CurrentType) const ASIO_NOEXCEPT
+ CurrentType) const noexcept
{
return ex_mq_mr<CurrentType, CurrentType>();
}
@@ -317,12 +317,12 @@ struct ex_mq_mr<CurrentType, CurrentType>
{
}
- friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_mq_mr&, const ex_mq_mr&) noexcept
{
return false;
}
@@ -357,8 +357,8 @@ struct query_member<
|| asio::is_convertible<Param, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef CurrentType result_type;
};
@@ -374,8 +374,8 @@ struct require_member<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_mq_mr<CurrentType, OtherType> result_type;
};
@@ -388,8 +388,8 @@ struct require_member<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_mq_mr<OtherType, CurrentType> result_type;
};
@@ -402,36 +402,36 @@ struct require_member<
template <typename CurrentType, typename OtherType>
struct ex_fq_fr
{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
{
return CurrentType();
}
- friend CurrentType query(const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, OtherType) noexcept
{
return CurrentType();
}
friend ex_fq_fr<CurrentType, OtherType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, OtherType>();
}
friend ex_fq_fr<OtherType, CurrentType> require(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ const ex_fq_fr&, OtherType) noexcept
{
return ex_fq_fr<OtherType, CurrentType>();
}
friend ex_fq_fr<CurrentType, OtherType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, OtherType>();
}
friend ex_fq_fr<OtherType, CurrentType> prefer(
- const ex_fq_fr&, OtherType) ASIO_NOEXCEPT
+ const ex_fq_fr&, OtherType) noexcept
{
return ex_fq_fr<OtherType, CurrentType>();
}
@@ -441,12 +441,12 @@ struct ex_fq_fr
{
}
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return false;
}
@@ -455,19 +455,19 @@ struct ex_fq_fr
template <typename CurrentType>
struct ex_fq_fr<CurrentType, CurrentType>
{
- friend CurrentType query(const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ friend CurrentType query(const ex_fq_fr&, CurrentType) noexcept
{
return CurrentType();
}
friend ex_fq_fr<CurrentType, CurrentType> require(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, CurrentType>();
}
friend ex_fq_fr<CurrentType, CurrentType> prefer(
- const ex_fq_fr&, CurrentType) ASIO_NOEXCEPT
+ const ex_fq_fr&, CurrentType) noexcept
{
return ex_fq_fr<CurrentType, CurrentType>();
}
@@ -477,12 +477,12 @@ struct ex_fq_fr<CurrentType, CurrentType>
{
}
- friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator==(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return true;
}
- friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) ASIO_NOEXCEPT
+ friend bool operator!=(const ex_fq_fr&, const ex_fq_fr&) noexcept
{
return false;
}
@@ -517,8 +517,8 @@ struct query_free<
|| asio::is_convertible<Param, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef CurrentType result_type;
};
@@ -534,8 +534,8 @@ struct require_free<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<CurrentType, OtherType> result_type;
};
@@ -548,8 +548,8 @@ struct require_free<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<OtherType, CurrentType> result_type;
};
@@ -565,8 +565,8 @@ struct prefer_free<
asio::is_convertible<Param, CurrentType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<CurrentType, OtherType> result_type;
};
@@ -579,8 +579,8 @@ struct prefer_free<
&& !asio::is_same<CurrentType, OtherType>::value
>::type>
{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
+ static constexpr bool is_valid = true;
+ static constexpr bool is_noexcept = true;
typedef ex_fq_fr<OtherType, CurrentType> result_type;
};
@@ -593,19 +593,19 @@ struct prefer_free<
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_query()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_query<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_query<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_query<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_query<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -628,29 +628,27 @@ void test_query()
template <typename Executor, typename Param, typename ExpectedResult>
void test_constexpr_query()
{
-#if defined(ASIO_HAS_CONSTEXPR)
constexpr Executor ex1 = {};
constexpr exec::relationship_t result1 = asio::query(ex1, Param());
ASIO_CHECK(result1 == ExpectedResult());
-#endif // defined(ASIO_HAS_CONSTEXPR)
}
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_require()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_require<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_require<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_require<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_require<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -679,19 +677,19 @@ void test_require()
template <typename Executor, typename Param, bool ExpectedResult>
void test_can_prefer()
{
- ASIO_CONSTEXPR bool b1 =
+ constexpr bool b1 =
asio::can_prefer<Executor, Param>::value;
ASIO_CHECK(b1 == ExpectedResult);
- ASIO_CONSTEXPR bool b2 =
+ constexpr bool b2 =
asio::can_prefer<const Executor, Param>::value;
ASIO_CHECK(b2 == ExpectedResult);
- ASIO_CONSTEXPR bool b3 =
+ constexpr bool b3 =
asio::can_prefer<Executor&, Param>::value;
ASIO_CHECK(b3 == ExpectedResult);
- ASIO_CONSTEXPR bool b4 =
+ constexpr bool b4 =
asio::can_prefer<const Executor&, Param>::value;
ASIO_CHECK(b4 == ExpectedResult);
}
@@ -720,8 +718,12 @@ void test_prefer()
void test_vars()
{
ASIO_CHECK(s() == exec::relationship);
+ ASIO_CHECK(s() != exec::relationship.fork);
+ ASIO_CHECK(s() != exec::relationship.continuation);
ASIO_CHECK(n1() == exec::relationship.fork);
+ ASIO_CHECK(n1() != exec::relationship.continuation);
ASIO_CHECK(n2() == exec::relationship.continuation);
+ ASIO_CHECK(n2() != exec::relationship.fork);
}
ASIO_TEST_SUITE
diff --git a/3rdparty/asio/src/tests/unit/execution/schedule.cpp b/3rdparty/asio/src/tests/unit/execution/schedule.cpp
deleted file mode 100644
index a18b9520c2e..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/schedule.cpp
+++ /dev/null
@@ -1,490 +0,0 @@
-//
-// schedule.cpp
-// ~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/schedule.hpp"
-
-#include "asio/error_code.hpp"
-#include "asio/execution/sender.hpp"
-#include "asio/execution/submit.hpp"
-#include "asio/traits/connect_member.hpp"
-#include "asio/traits/start_member.hpp"
-#include "asio/traits/submit_member.hpp"
-#include "../unit_test.hpp"
-
-namespace exec = asio::execution;
-
-struct operation_state
-{
- void start() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-template <>
-struct start_member<operation_state>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct sender : exec::sender_base
-{
- sender()
- {
- }
-
- template <typename R>
- operation_state connect(ASIO_MOVE_ARG(R) r) const
- {
- (void)r;
- return operation_state();
- }
-
- template <typename R>
- void submit(ASIO_MOVE_ARG(R) r) const
- {
- typename asio::decay<R>::type tmp(ASIO_MOVE_CAST(R)(r));
- exec::set_value(tmp);
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-template <typename R>
-struct connect_member<const sender, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-template <typename R>
-struct submit_member<const sender, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct no_schedule
-{
-};
-
-struct const_member_schedule
-{
- sender schedule() const ASIO_NOEXCEPT
- {
- return sender();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SCHEDULE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct schedule_member<const const_member_schedule>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef sender result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SCHEDULE_MEMBER_TRAIT)
-
-struct free_schedule_const_receiver
-{
- friend sender schedule(
- const free_schedule_const_receiver&) ASIO_NOEXCEPT
- {
- return sender();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SCHEDULE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct schedule_free<const free_schedule_const_receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef sender result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SCHEDULE_FREE_TRAIT)
-
-struct non_const_member_schedule
-{
- sender schedule() ASIO_NOEXCEPT
- {
- return sender();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SCHEDULE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct schedule_member<non_const_member_schedule>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef sender result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SCHEDULE_MEMBER_TRAIT)
-
-struct free_schedule_non_const_receiver
-{
- friend sender schedule(
- free_schedule_non_const_receiver&) ASIO_NOEXCEPT
- {
- return sender();
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SCHEDULE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct schedule_free<free_schedule_non_const_receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef sender result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SCHEDULE_FREE_TRAIT)
-
-struct executor
-{
- executor()
- {
- }
-
- executor(const executor&) ASIO_NOEXCEPT
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- executor(executor&&) ASIO_NOEXCEPT
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename F>
- void execute(ASIO_MOVE_ARG(F) f) const ASIO_NOEXCEPT
- {
- typename asio::decay<F>::type tmp(ASIO_MOVE_CAST(F)(f));
- tmp();
- }
-
- bool operator==(const executor&) const ASIO_NOEXCEPT
- {
- return true;
- }
-
- bool operator!=(const executor&) const ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-
-template <typename F>
-struct execute_member<executor, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-template <>
-struct equality_comparable<executor>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-void test_can_schedule()
-{
- ASIO_CONSTEXPR bool b1 = exec::can_schedule<
- no_schedule&>::value;
- ASIO_CHECK(b1 == false);
-
- ASIO_CONSTEXPR bool b2 = exec::can_schedule<
- const no_schedule&>::value;
- ASIO_CHECK(b2 == false);
-
- ASIO_CONSTEXPR bool b3 = exec::can_schedule<
- const_member_schedule&>::value;
- ASIO_CHECK(b3 == true);
-
- ASIO_CONSTEXPR bool b4 = exec::can_schedule<
- const const_member_schedule&>::value;
- ASIO_CHECK(b4 == true);
-
- ASIO_CONSTEXPR bool b5 = exec::can_schedule<
- free_schedule_const_receiver&>::value;
- ASIO_CHECK(b5 == true);
-
- ASIO_CONSTEXPR bool b6 = exec::can_schedule<
- const free_schedule_const_receiver&>::value;
- ASIO_CHECK(b6 == true);
-
- ASIO_CONSTEXPR bool b7 = exec::can_schedule<
- non_const_member_schedule&>::value;
- ASIO_CHECK(b7 == true);
-
- ASIO_CONSTEXPR bool b8 = exec::can_schedule<
- const non_const_member_schedule&>::value;
- ASIO_CHECK(b8 == false);
-
- ASIO_CONSTEXPR bool b9 = exec::can_schedule<
- free_schedule_non_const_receiver&>::value;
- ASIO_CHECK(b9 == true);
-
- ASIO_CONSTEXPR bool b10 = exec::can_schedule<
- const free_schedule_non_const_receiver&>::value;
- ASIO_CHECK(b10 == false);
-
- ASIO_CONSTEXPR bool b11 = exec::can_schedule<
- executor&>::value;
- ASIO_CHECK(b11 == true);
-
- ASIO_CONSTEXPR bool b12 = exec::can_schedule<
- const executor&>::value;
- ASIO_CHECK(b12 == true);
-}
-
-struct receiver
-{
- int* count_;
-
- receiver(int* count)
- : count_(count)
- {
- }
-
- receiver(const receiver& other) ASIO_NOEXCEPT
- : count_(other.count_)
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- receiver(receiver&& other) ASIO_NOEXCEPT
- : count_(other.count_)
- {
- other.count_ = 0;
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- void set_value() ASIO_NOEXCEPT
- {
- ++(*count_);
- }
-
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E) e) ASIO_NOEXCEPT
- {
- (void)e;
- }
-
- void set_done() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-template <>
-struct set_value_member<receiver, void()>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename E>
-struct set_error_member<receiver, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_done_member<receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-void test_schedule()
-{
- int count = 0;
- const_member_schedule ex1 = {};
- exec::submit(
- exec::schedule(ex1),
- receiver(&count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- const const_member_schedule ex2 = {};
- exec::submit(
- exec::schedule(ex2),
- receiver(&count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- exec::submit(
- exec::schedule(const_member_schedule()),
- receiver(&count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- free_schedule_const_receiver ex3 = {};
- exec::submit(
- exec::schedule(ex3),
- receiver(&count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- const free_schedule_const_receiver ex4 = {};
- exec::submit(
- exec::schedule(ex4),
- receiver(&count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- exec::submit(
- exec::schedule(free_schedule_const_receiver()),
- receiver(&count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- non_const_member_schedule ex5 = {};
- exec::submit(
- exec::schedule(ex5),
- receiver(&count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- free_schedule_non_const_receiver ex6 = {};
- exec::submit(
- exec::schedule(ex6),
- receiver(&count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- executor ex7;
- exec::submit(
- exec::schedule(ex7),
- receiver(&count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- const executor ex8;
- exec::submit(
- exec::schedule(ex8),
- receiver(&count));
- ASIO_CHECK(count == 1);
-
- count = 0;
- exec::submit(
- exec::schedule(executor()),
- receiver(&count));
- ASIO_CHECK(count == 1);
-}
-
-ASIO_TEST_SUITE
-(
- "schedule",
- ASIO_TEST_CASE(test_can_schedule)
- ASIO_TEST_CASE(test_schedule)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/scheduler.cpp b/3rdparty/asio/src/tests/unit/execution/scheduler.cpp
deleted file mode 100644
index bdcab4dac25..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/scheduler.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// scheduler.cpp
-// ~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/scheduler.hpp"
-
-#include "../unit_test.hpp"
-
-namespace exec = asio::execution;
-
-struct not_a_scheduler
-{
-};
-
-struct executor
-{
- executor()
- {
- }
-
- executor(const executor&) ASIO_NOEXCEPT
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- executor(executor&&) ASIO_NOEXCEPT
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename F>
- void execute(ASIO_MOVE_ARG(F) f) const ASIO_NOEXCEPT
- {
- (void)f;
- }
-
- bool operator==(const executor&) const ASIO_NOEXCEPT
- {
- return true;
- }
-
- bool operator!=(const executor&) const ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-
-template <typename F>
-struct execute_member<executor, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-template <>
-struct equality_comparable<executor>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-void test_is_scheduler()
-{
- ASIO_CHECK(!exec::is_scheduler<void>::value);
- ASIO_CHECK(!exec::is_scheduler<not_a_scheduler>::value);
- ASIO_CHECK(exec::is_scheduler<executor>::value);
-}
-
-ASIO_TEST_SUITE
-(
- "scheduler",
- ASIO_TEST_CASE(test_is_scheduler)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/sender.cpp b/3rdparty/asio/src/tests/unit/execution/sender.cpp
deleted file mode 100644
index 4a497e819f7..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/sender.cpp
+++ /dev/null
@@ -1,231 +0,0 @@
-//
-// sender.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/sender.hpp"
-
-#include "asio/error_code.hpp"
-#include "../unit_test.hpp"
-
-namespace exec = asio::execution;
-
-struct not_a_sender
-{
-};
-
-struct sender_using_base :
- asio::execution::sender_base
-{
- sender_using_base()
- {
- }
-};
-
-struct executor
-{
- executor()
- {
- }
-
- executor(const executor&) ASIO_NOEXCEPT
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- executor(executor&&) ASIO_NOEXCEPT
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename F>
- void execute(ASIO_MOVE_ARG(F) f) const ASIO_NOEXCEPT
- {
- (void)f;
- }
-
- bool operator==(const executor&) const ASIO_NOEXCEPT
- {
- return true;
- }
-
- bool operator!=(const executor&) const ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-
-template <typename F>
-struct execute_member<executor, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-template <>
-struct equality_comparable<executor>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-#if defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
-
-struct operation_state
-{
- void start() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-template <>
-struct start_member<operation_state>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct typed_sender
-{
- template <
- template <typename...> class Tuple,
- template <typename...> class Variant>
- using value_types = Variant<Tuple<int>>;
-
- template <template <typename...> class Variant>
- using error_types = Variant<asio::error_code>;
-
- ASIO_STATIC_CONSTEXPR(bool, sends_done = true);
-
- typed_sender()
- {
- }
-
- template <typename R>
- operation_state connect(ASIO_MOVE_ARG(R) r) const
- {
- (void)r;
- return operation_state();
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-template <typename R>
-struct connect_member<const typed_sender, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-#endif // defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
-
-template <typename T>
-bool is_unspecialised(T*, ...)
-{
- return false;
-}
-
-template <typename T>
-bool is_unspecialised(T*,
- typename asio::void_type<
- typename exec::sender_traits<
- T>::asio_execution_sender_traits_base_is_unspecialised
- >::type*)
-{
- return true;
-}
-
-void test_sender_traits()
-{
- not_a_sender s1;
- ASIO_CHECK(is_unspecialised(&s1, static_cast<void*>(0)));
-
- sender_using_base s2;
- ASIO_CHECK(!is_unspecialised(&s2, static_cast<void*>(0)));
-
- executor s3;
- ASIO_CHECK(!is_unspecialised(&s3, static_cast<void*>(0)));
-
-#if defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
- typed_sender s4;
- ASIO_CHECK(!is_unspecialised(&s4, static_cast<void*>(0)));
-#endif // defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
-}
-
-void test_is_sender()
-{
- ASIO_CHECK(!exec::is_sender<void>::value);
- ASIO_CHECK(!exec::is_sender<not_a_sender>::value);
- ASIO_CHECK(exec::is_sender<sender_using_base>::value);
- ASIO_CHECK(exec::is_sender<executor>::value);
-
-#if defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
- ASIO_CHECK(exec::is_sender<typed_sender>::value);
-#endif // defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
-}
-
-void test_is_typed_sender()
-{
- ASIO_CHECK(!exec::is_typed_sender<void>::value);
- ASIO_CHECK(!exec::is_typed_sender<not_a_sender>::value);
- ASIO_CHECK(!exec::is_typed_sender<sender_using_base>::value);
-
-#if defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
- ASIO_CHECK(exec::is_typed_sender<executor>::value);
- ASIO_CHECK(exec::is_typed_sender<typed_sender>::value);
-#endif // defined(ASIO_HAS_DEDUCED_EXECUTION_IS_TYPED_SENDER_TRAIT)
-}
-
-ASIO_TEST_SUITE
-(
- "sender",
- ASIO_TEST_CASE(test_sender_traits)
- ASIO_TEST_CASE(test_is_sender)
- ASIO_TEST_CASE(test_is_typed_sender)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/set_done.cpp b/3rdparty/asio/src/tests/unit/execution/set_done.cpp
deleted file mode 100644
index 723a8fc515d..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/set_done.cpp
+++ /dev/null
@@ -1,228 +0,0 @@
-//
-// set_done.cpp
-// ~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/set_done.hpp"
-
-#include "asio/error_code.hpp"
-#include "../unit_test.hpp"
-
-namespace exec = asio::execution;
-
-static int call_count = 0;
-
-struct no_set_done
-{
-};
-
-struct const_member_set_done
-{
- void set_done() const ASIO_NOEXCEPT
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct set_done_member<const const_member_set_done>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-struct free_set_done_const_receiver
-{
- friend void set_done(const free_set_done_const_receiver&) ASIO_NOEXCEPT
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct set_done_free<const free_set_done_const_receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_FREE_TRAIT)
-
-struct non_const_member_set_done
-{
- void set_done() ASIO_NOEXCEPT
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct set_done_member<non_const_member_set_done>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-struct free_set_done_non_const_receiver
-{
- friend void set_done(free_set_done_non_const_receiver&) ASIO_NOEXCEPT
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct set_done_free<free_set_done_non_const_receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_FREE_TRAIT)
-
-void test_can_set_done()
-{
- ASIO_CONSTEXPR bool b1 = exec::can_set_done<
- no_set_done&>::value;
- ASIO_CHECK(b1 == false);
-
- ASIO_CONSTEXPR bool b2 = exec::can_set_done<
- const no_set_done&>::value;
- ASIO_CHECK(b2 == false);
-
- ASIO_CONSTEXPR bool b3 = exec::can_set_done<
- const_member_set_done&>::value;
- ASIO_CHECK(b3 == true);
-
- ASIO_CONSTEXPR bool b4 = exec::can_set_done<
- const const_member_set_done&>::value;
- ASIO_CHECK(b4 == true);
-
- ASIO_CONSTEXPR bool b5 = exec::can_set_done<
- free_set_done_const_receiver&>::value;
- ASIO_CHECK(b5 == true);
-
- ASIO_CONSTEXPR bool b6 = exec::can_set_done<
- const free_set_done_const_receiver&>::value;
- ASIO_CHECK(b6 == true);
-
- ASIO_CONSTEXPR bool b7 = exec::can_set_done<
- non_const_member_set_done&>::value;
- ASIO_CHECK(b7 == true);
-
- ASIO_CONSTEXPR bool b8 = exec::can_set_done<
- const non_const_member_set_done&>::value;
- ASIO_CHECK(b8 == false);
-
- ASIO_CONSTEXPR bool b9 = exec::can_set_done<
- free_set_done_non_const_receiver&>::value;
- ASIO_CHECK(b9 == true);
-
- ASIO_CONSTEXPR bool b10 = exec::can_set_done<
- const free_set_done_non_const_receiver&>::value;
- ASIO_CHECK(b10 == false);
-}
-
-void increment(int* count)
-{
- ++(*count);
-}
-
-void test_set_done()
-{
- call_count = 0;
- const_member_set_done ex1 = {};
- exec::set_done(ex1);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const const_member_set_done ex2 = {};
- exec::set_done(ex2);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::set_done(const_member_set_done());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_set_done_const_receiver ex3 = {};
- exec::set_done(ex3);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const free_set_done_const_receiver ex4 = {};
- exec::set_done(ex4);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::set_done(free_set_done_const_receiver());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- non_const_member_set_done ex5 = {};
- exec::set_done(ex5);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_set_done_non_const_receiver ex6 = {};
- exec::set_done(ex6);
- ASIO_CHECK(call_count == 1);
-}
-
-ASIO_TEST_SUITE
-(
- "set_done",
- ASIO_TEST_CASE(test_can_set_done)
- ASIO_TEST_CASE(test_set_done)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/set_error.cpp b/3rdparty/asio/src/tests/unit/execution/set_error.cpp
deleted file mode 100644
index 3b5924053b2..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/set_error.cpp
+++ /dev/null
@@ -1,244 +0,0 @@
-//
-// set_error.cpp
-// ~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/set_error.hpp"
-
-#include "asio/error_code.hpp"
-#include "../unit_test.hpp"
-
-namespace exec = asio::execution;
-
-static int call_count = 0;
-
-struct no_set_error
-{
-};
-
-struct const_member_set_error
-{
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E) e) const ASIO_NOEXCEPT
- {
- typename asio::decay<E>::type tmp(ASIO_MOVE_CAST(E)(e));
- (void)tmp;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename E>
-struct set_error_member<const const_member_set_error, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-struct free_set_error_const_receiver
-{
- template <typename E>
- friend void set_error(const free_set_error_const_receiver&,
- ASIO_MOVE_ARG(E) e) ASIO_NOEXCEPT
- {
- typename asio::decay<E>::type tmp(ASIO_MOVE_CAST(E)(e));
- (void)tmp;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename E>
-struct set_error_free<const free_set_error_const_receiver, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_FREE_TRAIT)
-
-struct non_const_member_set_error
-{
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E) e) ASIO_NOEXCEPT
- {
- typename asio::decay<E>::type tmp(ASIO_MOVE_CAST(E)(e));
- (void)tmp;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename E>
-struct set_error_member<non_const_member_set_error, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-struct free_set_error_non_const_receiver
-{
- template <typename E>
- friend void set_error(free_set_error_non_const_receiver&,
- ASIO_MOVE_ARG(E) e) ASIO_NOEXCEPT
- {
- typename asio::decay<E>::type tmp(ASIO_MOVE_CAST(E)(e));
- (void)tmp;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename E>
-struct set_error_free<free_set_error_non_const_receiver, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_FREE_TRAIT)
-
-void test_can_set_error()
-{
- ASIO_CONSTEXPR bool b1 = exec::can_set_error<
- no_set_error&, asio::error_code>::value;
- ASIO_CHECK(b1 == false);
-
- ASIO_CONSTEXPR bool b2 = exec::can_set_error<
- const no_set_error&, asio::error_code>::value;
- ASIO_CHECK(b2 == false);
-
- ASIO_CONSTEXPR bool b3 = exec::can_set_error<
- const_member_set_error&, asio::error_code>::value;
- ASIO_CHECK(b3 == true);
-
- ASIO_CONSTEXPR bool b4 = exec::can_set_error<
- const const_member_set_error&, asio::error_code>::value;
- ASIO_CHECK(b4 == true);
-
- ASIO_CONSTEXPR bool b5 = exec::can_set_error<
- free_set_error_const_receiver&, asio::error_code>::value;
- ASIO_CHECK(b5 == true);
-
- ASIO_CONSTEXPR bool b6 = exec::can_set_error<
- const free_set_error_const_receiver&, asio::error_code>::value;
- ASIO_CHECK(b6 == true);
-
- ASIO_CONSTEXPR bool b7 = exec::can_set_error<
- non_const_member_set_error&, asio::error_code>::value;
- ASIO_CHECK(b7 == true);
-
- ASIO_CONSTEXPR bool b8 = exec::can_set_error<
- const non_const_member_set_error&, asio::error_code>::value;
- ASIO_CHECK(b8 == false);
-
- ASIO_CONSTEXPR bool b9 = exec::can_set_error<
- free_set_error_non_const_receiver&, asio::error_code>::value;
- ASIO_CHECK(b9 == true);
-
- ASIO_CONSTEXPR bool b10 = exec::can_set_error<
- const free_set_error_non_const_receiver&, asio::error_code>::value;
- ASIO_CHECK(b10 == false);
-}
-
-void increment(int* count)
-{
- ++(*count);
-}
-
-void test_set_error()
-{
- asio::error_code ec;
-
- call_count = 0;
- const_member_set_error ex1 = {};
- exec::set_error(ex1, ec);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const const_member_set_error ex2 = {};
- exec::set_error(ex2, ec);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::set_error(const_member_set_error(), ec);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_set_error_const_receiver ex3 = {};
- exec::set_error(ex3, ec);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const free_set_error_const_receiver ex4 = {};
- exec::set_error(ex4, ec);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::set_error(free_set_error_const_receiver(), ec);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- non_const_member_set_error ex5 = {};
- exec::set_error(ex5, ec);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_set_error_non_const_receiver ex6 = {};
- exec::set_error(ex6, ec);
- ASIO_CHECK(call_count == 1);
-}
-
-ASIO_TEST_SUITE
-(
- "set_error",
- ASIO_TEST_CASE(test_can_set_error)
- ASIO_TEST_CASE(test_set_error)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/set_value.cpp b/3rdparty/asio/src/tests/unit/execution/set_value.cpp
deleted file mode 100644
index ed22478b3c9..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/set_value.cpp
+++ /dev/null
@@ -1,820 +0,0 @@
-//
-// set_value.cpp
-// ~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/set_value.hpp"
-
-#include <string>
-#include "../unit_test.hpp"
-
-namespace exec = asio::execution;
-
-static int call_count = 0;
-
-struct no_set_value
-{
-};
-
-struct const_member_set_value_0
-{
- void set_value() const
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct set_value_member<const const_member_set_value_0, void()>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-struct const_member_set_value_1
-{
- template <typename V1>
- void set_value(ASIO_MOVE_ARG(V1) v1) const
- {
- typename asio::decay<V1>::type tmp(ASIO_MOVE_CAST(V1)(v1));
- (void)tmp;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename V1>
-struct set_value_member<const const_member_set_value_1, void(V1)>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-struct const_member_set_value_2
-{
- template <typename V1, typename V2>
- void set_value(ASIO_MOVE_ARG(V1) v1, ASIO_MOVE_ARG(V2) v2) const
- {
- typename asio::decay<V1>::type tmp1(ASIO_MOVE_CAST(V1)(v1));
- (void)tmp1;
- typename asio::decay<V2>::type tmp2(ASIO_MOVE_CAST(V2)(v2));
- (void)tmp2;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename V1, typename V2>
-struct set_value_member<const const_member_set_value_2, void(V1, V2)>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-struct free_set_value_const_receiver_0
-{
- friend void set_value(const free_set_value_const_receiver_0&)
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct set_value_free<const free_set_value_const_receiver_0, void()>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-struct free_set_value_const_receiver_1
-{
- template <typename V1>
- friend void set_value(const free_set_value_const_receiver_1&,
- ASIO_MOVE_ARG(V1) v1)
- {
- typename asio::decay<V1>::type tmp(ASIO_MOVE_CAST(V1)(v1));
- (void)tmp;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename V1>
-struct set_value_free<const free_set_value_const_receiver_1, void(V1)>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-struct free_set_value_const_receiver_2
-{
- template <typename V1, typename V2>
- friend void set_value(const free_set_value_const_receiver_2&,
- ASIO_MOVE_ARG(V1) v1, ASIO_MOVE_ARG(V2) v2)
- {
- typename asio::decay<V1>::type tmp1(ASIO_MOVE_CAST(V1)(v1));
- (void)tmp1;
- typename asio::decay<V2>::type tmp2(ASIO_MOVE_CAST(V2)(v2));
- (void)tmp2;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename V1, typename V2>
-struct set_value_free<const free_set_value_const_receiver_2, void(V1, V2)>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-struct non_const_member_set_value_0
-{
- void set_value()
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct set_value_member<non_const_member_set_value_0, void()>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-struct non_const_member_set_value_1
-{
- template <typename V1>
- void set_value(ASIO_MOVE_ARG(V1) v1)
- {
- typename asio::decay<V1>::type tmp(ASIO_MOVE_CAST(V1)(v1));
- (void)tmp;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename V1>
-struct set_value_member<non_const_member_set_value_1, void(V1)>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-struct non_const_member_set_value_2
-{
- template <typename V1, typename V2>
- void set_value(ASIO_MOVE_ARG(V1) v1, ASIO_MOVE_ARG(V2) v2)
- {
- typename asio::decay<V1>::type tmp1(ASIO_MOVE_CAST(V1)(v1));
- (void)tmp1;
- typename asio::decay<V2>::type tmp2(ASIO_MOVE_CAST(V2)(v2));
- (void)tmp2;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename V1, typename V2>
-struct set_value_member<non_const_member_set_value_2, void(V1, V2)>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-struct free_set_value_non_const_receiver_0
-{
- friend void set_value(free_set_value_non_const_receiver_0&)
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct set_value_free<free_set_value_non_const_receiver_0, void()>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-struct free_set_value_non_const_receiver_1
-{
- template <typename V1>
- friend void set_value(free_set_value_non_const_receiver_1&,
- ASIO_MOVE_ARG(V1) v1)
- {
- typename asio::decay<V1>::type tmp(ASIO_MOVE_CAST(V1)(v1));
- (void)tmp;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename V1>
-struct set_value_free<free_set_value_non_const_receiver_1, void(V1)>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-struct free_set_value_non_const_receiver_2
-{
- template <typename V1, typename V2>
- friend void set_value(free_set_value_non_const_receiver_2&,
- ASIO_MOVE_ARG(V1) v1, ASIO_MOVE_ARG(V2) v2)
- {
- typename asio::decay<V1>::type tmp1(ASIO_MOVE_CAST(V1)(v1));
- (void)tmp1;
- typename asio::decay<V2>::type tmp2(ASIO_MOVE_CAST(V2)(v2));
- (void)tmp2;
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename V1, typename V2>
-struct set_value_free<free_set_value_non_const_receiver_2, void(V1, V2)>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_FREE_TRAIT)
-
-void test_can_set_value()
-{
- ASIO_CONSTEXPR bool b1 = exec::can_set_value<
- no_set_value&>::value;
- ASIO_CHECK(b1 == false);
-
- ASIO_CONSTEXPR bool b2 = exec::can_set_value<
- const no_set_value&>::value;
- ASIO_CHECK(b2 == false);
-
- ASIO_CONSTEXPR bool b3 = exec::can_set_value<
- no_set_value&, int>::value;
- ASIO_CHECK(b3 == false);
-
- ASIO_CONSTEXPR bool b4 = exec::can_set_value<
- const no_set_value&, int>::value;
- ASIO_CHECK(b4 == false);
-
- ASIO_CONSTEXPR bool b5 = exec::can_set_value<
- no_set_value&, int, std::string>::value;
- ASIO_CHECK(b5 == false);
-
- ASIO_CONSTEXPR bool b6 = exec::can_set_value<
- const no_set_value&, int, std::string>::value;
- ASIO_CHECK(b6 == false);
-
- ASIO_CONSTEXPR bool b7 = exec::can_set_value<
- const_member_set_value_0&>::value;
- ASIO_CHECK(b7 == true);
-
- ASIO_CONSTEXPR bool b8 = exec::can_set_value<
- const const_member_set_value_0&>::value;
- ASIO_CHECK(b8 == true);
-
- ASIO_CONSTEXPR bool b9 = exec::can_set_value<
- const_member_set_value_0&, int>::value;
- ASIO_CHECK(b9 == false);
-
- ASIO_CONSTEXPR bool b10 = exec::can_set_value<
- const const_member_set_value_0&, int>::value;
- ASIO_CHECK(b10 == false);
-
- ASIO_CONSTEXPR bool b11 = exec::can_set_value<
- const_member_set_value_0&, int, std::string>::value;
- ASIO_CHECK(b11 == false);
-
- ASIO_CONSTEXPR bool b12 = exec::can_set_value<
- const const_member_set_value_0&, int, std::string>::value;
- ASIO_CHECK(b12 == false);
-
- ASIO_CONSTEXPR bool b13 = exec::can_set_value<
- const_member_set_value_1&>::value;
- ASIO_CHECK(b13 == false);
-
- ASIO_CONSTEXPR bool b14 = exec::can_set_value<
- const const_member_set_value_1&>::value;
- ASIO_CHECK(b14 == false);
-
- ASIO_CONSTEXPR bool b15 = exec::can_set_value<
- const_member_set_value_1&, int>::value;
- ASIO_CHECK(b15 == true);
-
- ASIO_CONSTEXPR bool b16 = exec::can_set_value<
- const const_member_set_value_1&, int>::value;
- ASIO_CHECK(b16 == true);
-
- ASIO_CONSTEXPR bool b17 = exec::can_set_value<
- const_member_set_value_1&, int, std::string>::value;
- ASIO_CHECK(b17 == false);
-
- ASIO_CONSTEXPR bool b18 = exec::can_set_value<
- const const_member_set_value_1&, int, std::string>::value;
- ASIO_CHECK(b18 == false);
-
- ASIO_CONSTEXPR bool b19 = exec::can_set_value<
- const_member_set_value_2&>::value;
- ASIO_CHECK(b19 == false);
-
- ASIO_CONSTEXPR bool b20 = exec::can_set_value<
- const const_member_set_value_2&>::value;
- ASIO_CHECK(b20 == false);
-
- ASIO_CONSTEXPR bool b21 = exec::can_set_value<
- const_member_set_value_2&, int>::value;
- ASIO_CHECK(b21 == false);
-
- ASIO_CONSTEXPR bool b22 = exec::can_set_value<
- const const_member_set_value_2&, int>::value;
- ASIO_CHECK(b22 == false);
-
- ASIO_CONSTEXPR bool b23 = exec::can_set_value<
- const_member_set_value_2&, int, std::string>::value;
- ASIO_CHECK(b23 == true);
-
- ASIO_CONSTEXPR bool b24 = exec::can_set_value<
- const const_member_set_value_2&, int, std::string>::value;
- ASIO_CHECK(b24 == true);
-
- ASIO_CONSTEXPR bool b25 = exec::can_set_value<
- free_set_value_const_receiver_0&>::value;
- ASIO_CHECK(b25 == true);
-
- ASIO_CONSTEXPR bool b26 = exec::can_set_value<
- const free_set_value_const_receiver_0&>::value;
- ASIO_CHECK(b26 == true);
-
- ASIO_CONSTEXPR bool b27 = exec::can_set_value<
- free_set_value_const_receiver_0&, int>::value;
- ASIO_CHECK(b27 == false);
-
- ASIO_CONSTEXPR bool b28 = exec::can_set_value<
- const free_set_value_const_receiver_0&, int>::value;
- ASIO_CHECK(b28 == false);
-
- ASIO_CONSTEXPR bool b29 = exec::can_set_value<
- free_set_value_const_receiver_0&, int, std::string>::value;
- ASIO_CHECK(b29 == false);
-
- ASIO_CONSTEXPR bool b30 = exec::can_set_value<
- const free_set_value_const_receiver_0&, int, std::string>::value;
- ASIO_CHECK(b30 == false);
-
- ASIO_CONSTEXPR bool b31 = exec::can_set_value<
- free_set_value_const_receiver_1&>::value;
- ASIO_CHECK(b31 == false);
-
- ASIO_CONSTEXPR bool b32 = exec::can_set_value<
- const free_set_value_const_receiver_1&>::value;
- ASIO_CHECK(b32 == false);
-
- ASIO_CONSTEXPR bool b33 = exec::can_set_value<
- free_set_value_const_receiver_1&, int>::value;
- ASIO_CHECK(b33 == true);
-
- ASIO_CONSTEXPR bool b34 = exec::can_set_value<
- const free_set_value_const_receiver_1&, int>::value;
- ASIO_CHECK(b34 == true);
-
- ASIO_CONSTEXPR bool b35 = exec::can_set_value<
- free_set_value_const_receiver_1&, int, std::string>::value;
- ASIO_CHECK(b35 == false);
-
- ASIO_CONSTEXPR bool b36 = exec::can_set_value<
- const free_set_value_const_receiver_1&, int, std::string>::value;
- ASIO_CHECK(b36 == false);
-
- ASIO_CONSTEXPR bool b37 = exec::can_set_value<
- free_set_value_const_receiver_2&>::value;
- ASIO_CHECK(b37 == false);
-
- ASIO_CONSTEXPR bool b38 = exec::can_set_value<
- const free_set_value_const_receiver_2&>::value;
- ASIO_CHECK(b38 == false);
-
- ASIO_CONSTEXPR bool b39 = exec::can_set_value<
- free_set_value_const_receiver_2&, int>::value;
- ASIO_CHECK(b39 == false);
-
- ASIO_CONSTEXPR bool b40 = exec::can_set_value<
- const free_set_value_const_receiver_2&, int>::value;
- ASIO_CHECK(b40 == false);
-
- ASIO_CONSTEXPR bool b41 = exec::can_set_value<
- free_set_value_const_receiver_2&, int, std::string>::value;
- ASIO_CHECK(b41 == true);
-
- ASIO_CONSTEXPR bool b42 = exec::can_set_value<
- const free_set_value_const_receiver_2&, int, std::string>::value;
- ASIO_CHECK(b42 == true);
-
- ASIO_CONSTEXPR bool b43 = exec::can_set_value<
- non_const_member_set_value_0&>::value;
- ASIO_CHECK(b43 == true);
-
- ASIO_CONSTEXPR bool b44 = exec::can_set_value<
- const non_const_member_set_value_0&>::value;
- ASIO_CHECK(b44 == false);
-
- ASIO_CONSTEXPR bool b45 = exec::can_set_value<
- non_const_member_set_value_0&, int>::value;
- ASIO_CHECK(b45 == false);
-
- ASIO_CONSTEXPR bool b46 = exec::can_set_value<
- const non_const_member_set_value_0&, int>::value;
- ASIO_CHECK(b46 == false);
-
- ASIO_CONSTEXPR bool b47 = exec::can_set_value<
- non_const_member_set_value_0&, int, std::string>::value;
- ASIO_CHECK(b47 == false);
-
- ASIO_CONSTEXPR bool b48 = exec::can_set_value<
- const non_const_member_set_value_0&, int, std::string>::value;
- ASIO_CHECK(b48 == false);
-
- ASIO_CONSTEXPR bool b49 = exec::can_set_value<
- non_const_member_set_value_1&>::value;
- ASIO_CHECK(b49 == false);
-
- ASIO_CONSTEXPR bool b50 = exec::can_set_value<
- const non_const_member_set_value_1&>::value;
- ASIO_CHECK(b50 == false);
-
- ASIO_CONSTEXPR bool b51 = exec::can_set_value<
- non_const_member_set_value_1&, int>::value;
- ASIO_CHECK(b51 == true);
-
- ASIO_CONSTEXPR bool b52 = exec::can_set_value<
- const non_const_member_set_value_1&, int>::value;
- ASIO_CHECK(b52 == false);
-
- ASIO_CONSTEXPR bool b53 = exec::can_set_value<
- non_const_member_set_value_1&, int, std::string>::value;
- ASIO_CHECK(b53 == false);
-
- ASIO_CONSTEXPR bool b54 = exec::can_set_value<
- const non_const_member_set_value_1&, int, std::string>::value;
- ASIO_CHECK(b54 == false);
-
- ASIO_CONSTEXPR bool b55 = exec::can_set_value<
- non_const_member_set_value_2&>::value;
- ASIO_CHECK(b55 == false);
-
- ASIO_CONSTEXPR bool b56 = exec::can_set_value<
- const non_const_member_set_value_2&>::value;
- ASIO_CHECK(b56 == false);
-
- ASIO_CONSTEXPR bool b57 = exec::can_set_value<
- non_const_member_set_value_2&, int>::value;
- ASIO_CHECK(b57 == false);
-
- ASIO_CONSTEXPR bool b58 = exec::can_set_value<
- const non_const_member_set_value_2&, int>::value;
- ASIO_CHECK(b58 == false);
-
- ASIO_CONSTEXPR bool b59 = exec::can_set_value<
- non_const_member_set_value_2&, int, std::string>::value;
- ASIO_CHECK(b59 == true);
-
- ASIO_CONSTEXPR bool b60 = exec::can_set_value<
- const non_const_member_set_value_2&, int, std::string>::value;
- ASIO_CHECK(b60 == false);
-
- ASIO_CONSTEXPR bool b61 = exec::can_set_value<
- free_set_value_non_const_receiver_0&>::value;
- ASIO_CHECK(b61 == true);
-
- ASIO_CONSTEXPR bool b62 = exec::can_set_value<
- const free_set_value_non_const_receiver_0&>::value;
- ASIO_CHECK(b62 == false);
-
- ASIO_CONSTEXPR bool b63 = exec::can_set_value<
- free_set_value_non_const_receiver_0&, int>::value;
- ASIO_CHECK(b63 == false);
-
- ASIO_CONSTEXPR bool b64 = exec::can_set_value<
- const free_set_value_non_const_receiver_0&, int>::value;
- ASIO_CHECK(b64 == false);
-
- ASIO_CONSTEXPR bool b65 = exec::can_set_value<
- free_set_value_non_const_receiver_0&, int, std::string>::value;
- ASIO_CHECK(b65 == false);
-
- ASIO_CONSTEXPR bool b66 = exec::can_set_value<
- const free_set_value_non_const_receiver_0&, int, std::string>::value;
- ASIO_CHECK(b66 == false);
-
- ASIO_CONSTEXPR bool b67 = exec::can_set_value<
- free_set_value_non_const_receiver_1&>::value;
- ASIO_CHECK(b67 == false);
-
- ASIO_CONSTEXPR bool b68 = exec::can_set_value<
- const free_set_value_non_const_receiver_1&>::value;
- ASIO_CHECK(b68 == false);
-
- ASIO_CONSTEXPR bool b69 = exec::can_set_value<
- free_set_value_non_const_receiver_1&, int>::value;
- ASIO_CHECK(b69 == true);
-
- ASIO_CONSTEXPR bool b70 = exec::can_set_value<
- const free_set_value_non_const_receiver_1&, int>::value;
- ASIO_CHECK(b70 == false);
-
- ASIO_CONSTEXPR bool b71 = exec::can_set_value<
- free_set_value_non_const_receiver_1&, int, std::string>::value;
- ASIO_CHECK(b71 == false);
-
- ASIO_CONSTEXPR bool b72 = exec::can_set_value<
- const free_set_value_non_const_receiver_1&, int, std::string>::value;
- ASIO_CHECK(b72 == false);
-
- ASIO_CONSTEXPR bool b73 = exec::can_set_value<
- free_set_value_non_const_receiver_2&>::value;
- ASIO_CHECK(b73 == false);
-
- ASIO_CONSTEXPR bool b74 = exec::can_set_value<
- const free_set_value_non_const_receiver_2&>::value;
- ASIO_CHECK(b74 == false);
-
- ASIO_CONSTEXPR bool b75 = exec::can_set_value<
- free_set_value_non_const_receiver_2&, int>::value;
- ASIO_CHECK(b75 == false);
-
- ASIO_CONSTEXPR bool b76 = exec::can_set_value<
- const free_set_value_non_const_receiver_2&, int>::value;
- ASIO_CHECK(b76 == false);
-
- ASIO_CONSTEXPR bool b77 = exec::can_set_value<
- free_set_value_non_const_receiver_2&, int, std::string>::value;
- ASIO_CHECK(b77 == true);
-
- ASIO_CONSTEXPR bool b78 = exec::can_set_value<
- const free_set_value_non_const_receiver_2&, int, std::string>::value;
- ASIO_CHECK(b78 == false);
-}
-
-void increment(int* count)
-{
- ++(*count);
-}
-
-void test_set_value()
-{
- call_count = 0;
- const_member_set_value_0 ex1 = {};
- exec::set_value(ex1);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const const_member_set_value_0 ex2 = {};
- exec::set_value(ex2);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::set_value(const_member_set_value_0());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const_member_set_value_1 ex3 = {};
- exec::set_value(ex3, 123);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const const_member_set_value_1 ex4 = {};
- exec::set_value(ex4, 123);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::set_value(const_member_set_value_1(), 123);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const_member_set_value_2 ex5 = {};
- exec::set_value(ex5, 123, std::string());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const const_member_set_value_2 ex6 = {};
- exec::set_value(ex6, 123, std::string());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::set_value(const_member_set_value_2(), 123, std::string());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_set_value_const_receiver_0 ex7 = {};
- exec::set_value(ex7);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const free_set_value_const_receiver_0 ex8 = {};
- exec::set_value(ex8);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::set_value(free_set_value_const_receiver_0());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_set_value_const_receiver_1 ex9 = {};
- exec::set_value(ex9, 123);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const free_set_value_const_receiver_1 ex10 = {};
- exec::set_value(ex10, 123);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::set_value(free_set_value_const_receiver_1(), 123);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_set_value_const_receiver_2 ex11 = {};
- exec::set_value(ex11, 123, std::string());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const free_set_value_const_receiver_2 ex12 = {};
- exec::set_value(ex12, 123, std::string());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::set_value(free_set_value_const_receiver_2(), 123, std::string());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- non_const_member_set_value_0 ex13 = {};
- exec::set_value(ex13);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- non_const_member_set_value_1 ex14 = {};
- exec::set_value(ex14, 123);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- non_const_member_set_value_2 ex15 = {};
- exec::set_value(ex15, 123, std::string());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_set_value_non_const_receiver_0 ex16 = {};
- exec::set_value(ex16);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_set_value_non_const_receiver_1 ex17 = {};
- exec::set_value(ex17, 123);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_set_value_non_const_receiver_2 ex18 = {};
- exec::set_value(ex18, 123, std::string());
- ASIO_CHECK(call_count == 1);
-}
-
-ASIO_TEST_SUITE
-(
- "set_value",
- ASIO_TEST_CASE(test_can_set_value)
- ASIO_TEST_CASE(test_set_value)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/start.cpp b/3rdparty/asio/src/tests/unit/execution/start.cpp
deleted file mode 100644
index 8faae16d961..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/start.cpp
+++ /dev/null
@@ -1,228 +0,0 @@
-//
-// start.cpp
-// ~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/start.hpp"
-
-#include "asio/error_code.hpp"
-#include "../unit_test.hpp"
-
-namespace exec = asio::execution;
-
-static int call_count = 0;
-
-struct no_start
-{
-};
-
-struct const_member_start
-{
- void start() const ASIO_NOEXCEPT
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct start_member<const const_member_start>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-struct free_start_const_receiver
-{
- friend void start(const free_start_const_receiver&) ASIO_NOEXCEPT
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_START_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct start_free<const free_start_const_receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_FREE_TRAIT)
-
-struct non_const_member_start
-{
- void start() ASIO_NOEXCEPT
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct start_member<non_const_member_start>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-struct free_start_non_const_receiver
-{
- friend void start(free_start_non_const_receiver&) ASIO_NOEXCEPT
- {
- ++call_count;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_START_FREE_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <>
-struct start_free<free_start_non_const_receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_FREE_TRAIT)
-
-void test_can_start()
-{
- ASIO_CONSTEXPR bool b1 = exec::can_start<
- no_start&>::value;
- ASIO_CHECK(b1 == false);
-
- ASIO_CONSTEXPR bool b2 = exec::can_start<
- const no_start&>::value;
- ASIO_CHECK(b2 == false);
-
- ASIO_CONSTEXPR bool b3 = exec::can_start<
- const_member_start&>::value;
- ASIO_CHECK(b3 == true);
-
- ASIO_CONSTEXPR bool b4 = exec::can_start<
- const const_member_start&>::value;
- ASIO_CHECK(b4 == true);
-
- ASIO_CONSTEXPR bool b5 = exec::can_start<
- free_start_const_receiver&>::value;
- ASIO_CHECK(b5 == true);
-
- ASIO_CONSTEXPR bool b6 = exec::can_start<
- const free_start_const_receiver&>::value;
- ASIO_CHECK(b6 == true);
-
- ASIO_CONSTEXPR bool b7 = exec::can_start<
- non_const_member_start&>::value;
- ASIO_CHECK(b7 == true);
-
- ASIO_CONSTEXPR bool b8 = exec::can_start<
- const non_const_member_start&>::value;
- ASIO_CHECK(b8 == false);
-
- ASIO_CONSTEXPR bool b9 = exec::can_start<
- free_start_non_const_receiver&>::value;
- ASIO_CHECK(b9 == true);
-
- ASIO_CONSTEXPR bool b10 = exec::can_start<
- const free_start_non_const_receiver&>::value;
- ASIO_CHECK(b10 == false);
-}
-
-void increment(int* count)
-{
- ++(*count);
-}
-
-void test_start()
-{
- call_count = 0;
- const_member_start ex1 = {};
- exec::start(ex1);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const const_member_start ex2 = {};
- exec::start(ex2);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::start(const_member_start());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_start_const_receiver ex3 = {};
- exec::start(ex3);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const free_start_const_receiver ex4 = {};
- exec::start(ex4);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::start(free_start_const_receiver());
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- non_const_member_start ex5 = {};
- exec::start(ex5);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_start_non_const_receiver ex6 = {};
- exec::start(ex6);
- ASIO_CHECK(call_count == 1);
-}
-
-ASIO_TEST_SUITE
-(
- "start",
- ASIO_TEST_CASE(test_can_start)
- ASIO_TEST_CASE(test_start)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution/submit.cpp b/3rdparty/asio/src/tests/unit/execution/submit.cpp
deleted file mode 100644
index 6042ef18f1e..00000000000
--- a/3rdparty/asio/src/tests/unit/execution/submit.cpp
+++ /dev/null
@@ -1,546 +0,0 @@
-//
-// submit.cpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2021 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/execution/submit.hpp"
-
-#include "asio/error_code.hpp"
-#include "../unit_test.hpp"
-
-namespace exec = asio::execution;
-
-static int call_count = 0;
-
-struct operation_state
-{
- void start() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-template <>
-struct start_member<operation_state>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_START_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct no_submit_1
-{
-};
-
-struct no_submit_2 : exec::sender_base
-{
-};
-
-struct no_submit_3
-{
- template <typename R>
- void submit(ASIO_MOVE_ARG(R) r)
- {
- (void)r;
- }
-};
-
-#if !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-namespace asio {
-namespace traits {
-
-template <typename R>
-struct submit_member<no_submit_3, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-} // namespace traits
-} // namespace asio
-
-#endif // !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-struct const_member_submit : exec::sender_base
-{
- const_member_submit()
- {
- }
-
- template <typename R>
- operation_state connect(ASIO_MOVE_ARG(R) r) const
- {
- (void)r;
- return operation_state();
- }
-
- template <typename R>
- void submit(ASIO_MOVE_ARG(R) r) const
- {
- (void)r;
- ++call_count;
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-template <typename R>
-struct connect_member<const const_member_submit, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-template <typename R>
-struct submit_member<const const_member_submit, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct free_submit_const_receiver : exec::sender_base
-{
- free_submit_const_receiver()
- {
- }
-
- template <typename R>
- friend operation_state connect(
- const free_submit_const_receiver&, ASIO_MOVE_ARG(R) r)
- {
- (void)r;
- return operation_state();
- }
-
- template <typename R>
- friend void submit(
- const free_submit_const_receiver&, ASIO_MOVE_ARG(R) r)
- {
- (void)r;
- ++call_count;
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT)
-
-template <typename R>
-struct connect_free<const free_submit_const_receiver, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SUBMIT_FREE_TRAIT)
-
-template <typename R>
-struct submit_free<const free_submit_const_receiver, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SUBMIT_FREE_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct non_const_member_submit : exec::sender_base
-{
- non_const_member_submit()
- {
- }
-
- template <typename R>
- operation_state connect(ASIO_MOVE_ARG(R) r)
- {
- (void)r;
- return operation_state();
- }
-
- template <typename R>
- void submit(ASIO_MOVE_ARG(R) r)
- {
- (void)r;
- ++call_count;
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-template <typename R>
-struct connect_member<non_const_member_submit, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-template <typename R>
-struct submit_member<non_const_member_submit, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SUBMIT_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct free_submit_non_const_receiver : exec::sender_base
-{
- free_submit_non_const_receiver()
- {
- }
-
- template <typename R>
- friend operation_state connect(
- free_submit_non_const_receiver&, ASIO_MOVE_ARG(R) r)
- {
- (void)r;
- return operation_state();
- }
-
- template <typename R>
- friend void submit(
- free_submit_non_const_receiver&, ASIO_MOVE_ARG(R) r)
- {
- (void)r;
- ++call_count;
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT)
-
-template <typename R>
-struct connect_free<free_submit_non_const_receiver, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef operation_state result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_CONNECT_FREE_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SUBMIT_FREE_TRAIT)
-
-template <typename R>
-struct submit_free<free_submit_non_const_receiver, R>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SUBMIT_FREE_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct receiver
-{
- receiver()
- {
- }
-
- receiver(const receiver&)
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- receiver(receiver&&) ASIO_NOEXCEPT
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E) e) ASIO_NOEXCEPT
- {
- (void)e;
- }
-
- void set_done() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename E>
-struct set_error_member<receiver, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_done_member<receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-struct executor
-{
- executor()
- {
- }
-
- executor(const executor&) ASIO_NOEXCEPT
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- executor(executor&&) ASIO_NOEXCEPT
- {
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- template <typename F>
- void execute(ASIO_MOVE_ARG(F) f) const ASIO_NOEXCEPT
- {
- (void)f;
- ++call_count;
- }
-
- bool operator==(const executor&) const ASIO_NOEXCEPT
- {
- return true;
- }
-
- bool operator!=(const executor&) const ASIO_NOEXCEPT
- {
- return false;
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT)
-
-template <typename F>
-struct execute_member<executor, F>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-#if !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-template <>
-struct equality_comparable<executor>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-void test_can_submit()
-{
- ASIO_CONSTEXPR bool b1 = exec::can_submit<
- no_submit_1&, receiver>::value;
- ASIO_CHECK(b1 == false);
-
- ASIO_CONSTEXPR bool b2 = exec::can_submit<
- const no_submit_1&, receiver>::value;
- ASIO_CHECK(b2 == false);
-
- ASIO_CONSTEXPR bool b3 = exec::can_submit<
- no_submit_2&, receiver>::value;
- ASIO_CHECK(b3 == false);
-
- ASIO_CONSTEXPR bool b4 = exec::can_submit<
- const no_submit_2&, receiver>::value;
- ASIO_CHECK(b4 == false);
-
- ASIO_CONSTEXPR bool b5 = exec::can_submit<
- no_submit_3&, receiver>::value;
- ASIO_CHECK(b5 == false);
-
- ASIO_CONSTEXPR bool b6 = exec::can_submit<
- const no_submit_3&, receiver>::value;
- ASIO_CHECK(b6 == false);
-
- ASIO_CONSTEXPR bool b7 = exec::can_submit<
- const_member_submit&, receiver>::value;
- ASIO_CHECK(b7 == true);
-
- ASIO_CONSTEXPR bool b8 = exec::can_submit<
- const const_member_submit&, receiver>::value;
- ASIO_CHECK(b8 == true);
-
- ASIO_CONSTEXPR bool b9 = exec::can_submit<
- free_submit_const_receiver&, receiver>::value;
- ASIO_CHECK(b9 == true);
-
- ASIO_CONSTEXPR bool b10 = exec::can_submit<
- const free_submit_const_receiver&, receiver>::value;
- ASIO_CHECK(b10 == true);
-
- ASIO_CONSTEXPR bool b11 = exec::can_submit<
- non_const_member_submit&, receiver>::value;
- ASIO_CHECK(b11 == true);
-
- ASIO_CONSTEXPR bool b12 = exec::can_submit<
- const non_const_member_submit&, receiver>::value;
- ASIO_CHECK(b12 == false);
-
- ASIO_CONSTEXPR bool b13 = exec::can_submit<
- free_submit_non_const_receiver&, receiver>::value;
- ASIO_CHECK(b13 == true);
-
- ASIO_CONSTEXPR bool b14 = exec::can_submit<
- const free_submit_non_const_receiver&, receiver>::value;
- ASIO_CHECK(b14 == false);
-
- ASIO_CONSTEXPR bool b15 = exec::can_submit<
- executor&, receiver>::value;
- ASIO_CHECK(b15 == true);
-
- ASIO_CONSTEXPR bool b16 = exec::can_submit<
- const executor&, receiver>::value;
- ASIO_CHECK(b16 == true);
-}
-
-void increment(int* count)
-{
- ++(*count);
-}
-
-void test_submit()
-{
- receiver r;
-
- call_count = 0;
- const_member_submit s1;
- exec::submit(s1, r);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const const_member_submit s2;
- exec::submit(s2, r);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::submit(const_member_submit(), r);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_submit_const_receiver s3;
- exec::submit(s3, r);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const free_submit_const_receiver s4;
- exec::submit(s4, r);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::submit(free_submit_const_receiver(), r);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- non_const_member_submit s5;
- exec::submit(s5, r);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- free_submit_non_const_receiver s6;
- exec::submit(s6, r);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- executor s7;
- exec::submit(s7, r);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- const executor s8;
- exec::submit(s8, r);
- ASIO_CHECK(call_count == 1);
-
- call_count = 0;
- exec::submit(executor(), r);
- ASIO_CHECK(call_count == 1);
-}
-
-ASIO_TEST_SUITE
-(
- "submit",
- ASIO_TEST_CASE(test_can_submit)
- ASIO_TEST_CASE(test_submit)
-)
diff --git a/3rdparty/asio/src/tests/unit/execution_context.cpp b/3rdparty/asio/src/tests/unit/execution_context.cpp
index fff86c98a73..cf5a499e256 100644
--- a/3rdparty/asio/src/tests/unit/execution_context.cpp
+++ b/3rdparty/asio/src/tests/unit/execution_context.cpp
@@ -2,7 +2,7 @@
// execution_context.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/executor.cpp b/3rdparty/asio/src/tests/unit/executor.cpp
index 4ec2258c2fd..7ea75055aa4 100644
--- a/3rdparty/asio/src/tests/unit/executor.cpp
+++ b/3rdparty/asio/src/tests/unit/executor.cpp
@@ -2,7 +2,7 @@
// executor.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/executor_work_guard.cpp b/3rdparty/asio/src/tests/unit/executor_work_guard.cpp
index 9fb0b08da61..5d7aecd5c7c 100644
--- a/3rdparty/asio/src/tests/unit/executor_work_guard.cpp
+++ b/3rdparty/asio/src/tests/unit/executor_work_guard.cpp
@@ -2,7 +2,7 @@
// executor_work_guard.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/experimental/awaitable_operators.cpp b/3rdparty/asio/src/tests/unit/experimental/awaitable_operators.cpp
index 2323f0d7932..e79eeae3eea 100644
--- a/3rdparty/asio/src/tests/unit/experimental/awaitable_operators.cpp
+++ b/3rdparty/asio/src/tests/unit/experimental/awaitable_operators.cpp
@@ -2,7 +2,7 @@
// experimental/awaitable_operators.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/experimental/basic_channel.cpp b/3rdparty/asio/src/tests/unit/experimental/basic_channel.cpp
new file mode 100644
index 00000000000..a277efeb27c
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/basic_channel.cpp
@@ -0,0 +1,25 @@
+//
+// experimental/basic_channel.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/basic_channel.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "experimental/basic_channel",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/basic_concurrent_channel.cpp b/3rdparty/asio/src/tests/unit/experimental/basic_concurrent_channel.cpp
new file mode 100644
index 00000000000..413d1870bd9
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/basic_concurrent_channel.cpp
@@ -0,0 +1,25 @@
+//
+// experimental/basic_concurrent_channel.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/basic_concurrent_channel.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "experimental/basic_concurrent_channel",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/channel.cpp b/3rdparty/asio/src/tests/unit/experimental/channel.cpp
new file mode 100644
index 00000000000..6c5b67fe570
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/channel.cpp
@@ -0,0 +1,888 @@
+//
+// experimental/channel.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/channel.hpp"
+
+#include <utility>
+#include "asio/any_completion_handler.hpp"
+#include "asio/bind_executor.hpp"
+#include "asio/bind_immediate_executor.hpp"
+#include "asio/error.hpp"
+#include "asio/io_context.hpp"
+#include "asio/system_executor.hpp"
+#include "../unit_test.hpp"
+
+using namespace asio;
+using namespace asio::experimental;
+
+void unbuffered_channel_test()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send(asio::error::eof, "hello");
+
+ ASIO_CHECK(!b1);
+
+ std::string s1 = "abcdefghijklmnopqrstuvwxyz";
+ bool b2 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(!b2);
+ ASIO_CHECK(!s1.empty());
+
+ asio::error_code ec1;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s2 = std::move(s);
+ });
+
+ bool b3 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(b3);
+ ASIO_CHECK(s1.empty());
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s2 == "abcdefghijklmnopqrstuvwxyz");
+
+ bool b4 = ch1.try_receive([](asio::error_code, std::string){});
+
+ ASIO_CHECK(!b4);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s3 = "zyxwvutsrqponmlkjihgfedcba";
+ ch1.async_send(asio::error::eof, std::move(s3),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ asio::error_code ec3;
+ std::string s4;
+ bool b5 = ch1.try_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec3 = ec;
+ s4 = s;
+ });
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec3 == asio::error::eof);
+ ASIO_CHECK(s4 == "zyxwvutsrqponmlkjihgfedcba");
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec2);
+}
+
+void buffered_channel_test()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send(asio::error::eof, "hello");
+
+ ASIO_CHECK(b1);
+
+ std::string s1 = "abcdefghijklmnopqrstuvwxyz";
+ bool b2 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(!b2);
+ ASIO_CHECK(!s1.empty());
+
+ asio::error_code ec1;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s2 = std::move(s);
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s2 == "hello");
+
+ bool b4 = ch1.try_receive([](asio::error_code, std::string){});
+
+ ASIO_CHECK(!b4);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s3 = "zyxwvutsrqponmlkjihgfedcba";
+ ch1.async_send(asio::error::eof, std::move(s3),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ asio::error_code ec3;
+ std::string s4;
+ bool b5 = ch1.try_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec3 = ec;
+ s4 = s;
+ });
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec3 == asio::error::eof);
+ ASIO_CHECK(s4 == "zyxwvutsrqponmlkjihgfedcba");
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec2);
+
+ bool b6 = ch1.try_send(asio::error_code(), "goodbye");
+
+ ASIO_CHECK(b6);
+
+ ch1.close();
+
+ asio::error_code ec4;
+ std::string s5;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec4 = ec;
+ s5 = std::move(s);
+ });
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec4);
+ ASIO_CHECK(s5 == "goodbye");
+
+ asio::error_code ec5;
+ std::string s6;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec5 = ec;
+ s6 = std::move(s);
+ });
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec5 == asio::experimental::channel_errc::channel_closed);
+ ASIO_CHECK(s6.empty());
+}
+
+void buffered_error_channel_test()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code)> ch1(ctx, 1);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send(asio::error::eof);
+
+ ASIO_CHECK(b1);
+
+ bool b2 = ch1.try_send(asio::error::eof);
+
+ ASIO_CHECK(!b2);
+
+ asio::error_code ec1;
+ ch1.async_receive(
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+
+ bool b4 = ch1.try_receive([](asio::error_code){});
+
+ ASIO_CHECK(!b4);
+
+ asio::error_code ec2 = asio::error::would_block;
+ ch1.async_send(asio::error::eof,
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ asio::error_code ec3;
+ bool b5 = ch1.try_receive(
+ [&](asio::error_code ec)
+ {
+ ec3 = ec;
+ });
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec3 == asio::error::eof);
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec2);
+}
+
+void unbuffered_non_immediate_receive()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ });
+
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+}
+
+void unbuffered_immediate_receive()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ bind_immediate_executor(system_executor(),
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+}
+
+void unbuffered_executor_receive()
+{
+ io_context ctx;
+ io_context ctx2;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ bind_executor(ctx2,
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx2.run();
+
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+}
+
+void unbuffered_non_immediate_send()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s2),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "0123456789");
+ ASIO_CHECK(!ec2);
+}
+
+void unbuffered_immediate_send()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s2),
+ bind_immediate_executor(system_executor(),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(!ec2);
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "0123456789");
+}
+
+void unbuffered_executor_send()
+{
+ io_context ctx;
+ io_context ctx2;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s2),
+ bind_executor(ctx2,
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "0123456789");
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx2.run();
+
+ ASIO_CHECK(!ec2);
+}
+
+void buffered_non_immediate_receive()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ });
+
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+}
+
+void buffered_immediate_receive()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ bind_immediate_executor(system_executor(),
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+
+ ctx.restart();
+ ctx.run();
+}
+
+void buffered_executor_receive()
+{
+ io_context ctx;
+ io_context ctx2;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ bind_executor(ctx2,
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx2.run();
+
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+}
+
+void buffered_non_immediate_send()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ });
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(!ec1);
+}
+
+void buffered_immediate_send()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ bind_immediate_executor(system_executor(),
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ }));
+
+ ASIO_CHECK(!ec1);
+
+ ctx.run();
+}
+
+void buffered_executor_send()
+{
+ io_context ctx;
+ io_context ctx2;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1 = "0123456789";
+ ch1.async_send(asio::error::eof, std::move(s1),
+ bind_executor(ctx2,
+ [&](asio::error_code ec)
+ {
+ ec1 = ec;
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx2.run();
+
+ ASIO_CHECK(!ec1);
+}
+
+void try_send_via_dispatch()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ bind_executor(asio::system_executor(),
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.poll();
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ std::string s2 = "0123456789";
+ ch1.try_send_via_dispatch(asio::error::eof, std::move(s2));
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "0123456789");
+ ASIO_CHECK(s2.empty());
+}
+
+void try_send_n_via_dispatch()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ bind_executor(asio::system_executor(),
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2;
+ ch1.async_receive(
+ bind_executor(asio::system_executor(),
+ [&](asio::error_code ec, std::string s)
+ {
+ ec2 = ec;
+ s2 = std::move(s);
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ ctx.poll();
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ std::string s3 = "0123456789";
+ ch1.try_send_n_via_dispatch(2, asio::error::eof, std::move(s3));
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "0123456789");
+ ASIO_CHECK(ec2 == asio::error::eof);
+ ASIO_CHECK(s2 == "0123456789");
+ ASIO_CHECK(s3.empty());
+}
+
+struct multi_signature_handler
+{
+ std::string* s_;
+ asio::error_code* ec_;
+
+ void operator()(std::string s)
+ {
+ *s_ = s;
+ }
+
+ void operator()(asio::error_code ec)
+ {
+ *ec_ = ec;
+ }
+};
+
+void implicit_error_signature_channel_test()
+{
+ io_context ctx;
+
+ channel<void(std::string)> ch1(ctx);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send("hello");
+
+ ASIO_CHECK(!b1);
+
+ std::string s1 = "abcdefghijklmnopqrstuvwxyz";
+ bool b2 = ch1.try_send(std::move(s1));
+
+ ASIO_CHECK(!b2);
+ ASIO_CHECK(!s1.empty());
+
+ std::string s2;
+ asio::error_code ec1 = asio::error::would_block;
+ multi_signature_handler h1 = {&s2, &ec1};
+ ch1.async_receive(h1);
+
+ bool b3 = ch1.try_send(std::move(s1));
+
+ ASIO_CHECK(b3);
+ ASIO_CHECK(s1.empty());
+
+ ctx.run();
+
+ ASIO_CHECK(s2 == "abcdefghijklmnopqrstuvwxyz");
+ ASIO_CHECK(ec1 == asio::error::would_block);
+
+ std::string s3;
+ asio::error_code ec2;
+ multi_signature_handler h2 = {&s3, &ec2};
+ bool b4 = ch1.try_receive(h2);
+
+ ASIO_CHECK(!b4);
+
+ std::string s4 = "zyxwvutsrqponmlkjihgfedcba";
+ asio::error_code ec3;
+ ch1.async_send(std::move(s4),
+ [&](asio::error_code ec)
+ {
+ ec3 = ec;
+ });
+
+ std::string s5;
+ asio::error_code ec4 = asio::error::would_block;
+ multi_signature_handler h3 = {&s5, &ec4};
+ bool b5 = ch1.try_receive(h3);
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec4 == asio::error::would_block);
+ ASIO_CHECK(s5 == "zyxwvutsrqponmlkjihgfedcba");
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec3);
+
+ std::string s6;
+ asio::error_code ec5 = asio::error::would_block;
+ multi_signature_handler h4 = {&s6, &ec5};
+ ch1.async_receive(h4);
+
+ ch1.close();
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(s6.empty());
+ ASIO_CHECK(ec5 == asio::experimental::channel_errc::channel_closed);
+}
+
+void channel_with_any_completion_handler_test()
+{
+ io_context ctx;
+
+ channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ asio::error_code ec1 = asio::error::would_block;
+ std::string s1;
+ ch1.async_receive(
+ asio::any_completion_handler<
+ void(asio::error_code, std::string)>(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s1 = std::move(s);
+ }));
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s2 = "zyxwvutsrqponmlkjihgfedcba";
+ ch1.async_send(asio::error::eof, std::move(s2),
+ asio::any_completion_handler<void(asio::error_code)>(
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ }));
+
+ ASIO_CHECK(ec1 == asio::error::would_block);
+ ASIO_CHECK(ec2 == asio::error::would_block);
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s1 == "zyxwvutsrqponmlkjihgfedcba");
+ ASIO_CHECK(!ec2);
+}
+
+ASIO_TEST_SUITE
+(
+ "experimental/channel",
+ ASIO_TEST_CASE(unbuffered_channel_test)
+ ASIO_TEST_CASE(buffered_channel_test)
+ ASIO_TEST_CASE(buffered_error_channel_test)
+ ASIO_TEST_CASE(unbuffered_non_immediate_receive)
+ ASIO_TEST_CASE(unbuffered_immediate_receive)
+ ASIO_TEST_CASE(unbuffered_executor_receive)
+ ASIO_TEST_CASE(unbuffered_non_immediate_send)
+ ASIO_TEST_CASE(unbuffered_immediate_send)
+ ASIO_TEST_CASE(unbuffered_executor_send)
+ ASIO_TEST_CASE(buffered_non_immediate_receive)
+ ASIO_TEST_CASE(buffered_immediate_receive)
+ ASIO_TEST_CASE(buffered_executor_receive)
+ ASIO_TEST_CASE(buffered_non_immediate_send)
+ ASIO_TEST_CASE(buffered_immediate_send)
+ ASIO_TEST_CASE(buffered_executor_send)
+ ASIO_TEST_CASE(try_send_via_dispatch)
+ ASIO_TEST_CASE(try_send_n_via_dispatch)
+ ASIO_TEST_CASE(implicit_error_signature_channel_test)
+ ASIO_TEST_CASE(channel_with_any_completion_handler_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/channel_traits.cpp b/3rdparty/asio/src/tests/unit/experimental/channel_traits.cpp
new file mode 100644
index 00000000000..b1c326f874d
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/channel_traits.cpp
@@ -0,0 +1,25 @@
+//
+// experimental/channel_traits.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/channel_traits.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "experimental/channel_traits",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/co_composed.cpp b/3rdparty/asio/src/tests/unit/experimental/co_composed.cpp
new file mode 100644
index 00000000000..755cd46d788
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/co_composed.cpp
@@ -0,0 +1,518 @@
+//
+// experimental/co_composed.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/experimental/co_composed.hpp"
+
+#include "asio/bind_cancellation_slot.hpp"
+#include "asio/deferred.hpp"
+#include "asio/detached.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "../unit_test.hpp"
+
+template <typename CompletionToken>
+auto async_throw(CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ [](auto) { throw 42; }, token);
+}
+
+template <typename CompletionToken>
+auto throw_first(CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed(
+ [](auto state) -> void
+ {
+ throw 42;
+ co_yield state.complete();
+ }), token);
+}
+
+void test_throw_first()
+{
+ try
+ {
+ throw_first(asio::detached);
+ ASIO_CHECK(0);
+ }
+ catch (int)
+ {
+ }
+}
+
+template <typename CompletionToken>
+auto throw_after_await(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ co_await asio::post(ctx, asio::deferred);
+ throw 42;
+ co_yield state.complete();
+ }), token, std::ref(ctx));
+}
+
+void test_throw_after_await()
+{
+ try
+ {
+ asio::io_context ctx(1);
+ throw_after_await(ctx, asio::detached);
+ ctx.run();
+ ASIO_CHECK(0);
+ }
+ catch (int)
+ {
+ }
+}
+
+template <typename CompletionToken>
+auto throw_in_first_suspend(CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed(
+ [](auto state) -> void
+ {
+ co_await async_throw(asio::deferred);
+ co_yield state.complete();
+ }), token);
+}
+
+void test_throw_in_first_suspend()
+{
+ try
+ {
+ throw_in_first_suspend(asio::detached);
+ ASIO_CHECK(0);
+ }
+ catch (int)
+ {
+ }
+}
+
+template <typename CompletionToken>
+auto throw_in_suspend_after_await(
+ asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ co_await asio::post(ctx, asio::deferred);
+ co_await async_throw(asio::deferred);
+ co_yield state.complete();
+ }), token, std::ref(ctx));
+}
+
+void test_throw_in_suspend_after_await()
+{
+ try
+ {
+ asio::io_context ctx(1);
+ throw_in_suspend_after_await(ctx, asio::detached);
+ ctx.run();
+ ASIO_CHECK(0);
+ }
+ catch (int)
+ {
+ }
+}
+
+template <typename CompletionToken>
+auto post_loop(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(int)>(
+ asio::experimental::co_composed(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_yield state.complete(i);
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_post_loop()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ post_loop(ctx, [&](int i){ count = i; });
+ ctx.run();
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto nested_post(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ co_await asio::post(ctx, asio::deferred);
+ co_yield state.complete();
+ }, ctx), token, std::ref(ctx));
+}
+
+template <typename CompletionToken>
+auto nested_post_loop(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(int)>(
+ asio::experimental::co_composed(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await nested_post(ctx, asio::deferred);
+ co_yield state.complete(i);
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_nested_post_loop()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ nested_post_loop(ctx, [&](int i){ count = i; });
+ ctx.run();
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto post_loop_return_1_0(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void()>(
+ asio::experimental::co_composed<void()>(
+ [](auto, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_post_loop_return_1_0()
+{
+ asio::io_context ctx(1);
+ bool done = false;
+ post_loop_return_1_0(ctx, [&]{ done = true; });
+ ctx.run();
+ ASIO_CHECK(done);
+}
+
+template <typename CompletionToken>
+auto post_loop_return_1_1(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(int)>(
+ asio::experimental::co_composed<void(int)>(
+ [](auto, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {i};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_post_loop_return_1_1()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ post_loop_return_1_1(ctx, [&](int i){ count = i; });
+ ctx.run();
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto post_loop_return_1_2(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(int, char)>(
+ asio::experimental::co_composed<void(int, char)>(
+ [](auto, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {i, 'A'};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_post_loop_return_1_2()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ char ch = 0;
+ post_loop_return_1_2(ctx, [&](int i, char c){ count = i, ch = c; });
+ ctx.run();
+ ASIO_CHECK(count == 100);
+ ASIO_CHECK(ch == 'A');
+}
+
+template <typename CompletionToken>
+auto post_loop_return_2(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<CompletionToken, void(), void(int)>(
+ asio::experimental::co_composed<void(), void(int)>(
+ [](auto, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {i};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_post_loop_return_2()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ post_loop_return_2(ctx, [&](int i = 0){ count = i; });
+ ctx.run();
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto complete_on_cancel(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<
+ CompletionToken, void(asio::error_code, int)>(
+ asio::experimental::co_composed<
+ void(asio::error_code, int)>(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ state.on_cancellation_complete_with(
+ asio::error::invalid_argument, 42);
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {asio::error::eof, i};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_complete_on_cancel()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ asio::error_code ec;
+ asio::cancellation_signal cancel;
+
+ complete_on_cancel(ctx,
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+
+ complete_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run_one();
+ cancel.emit(asio::cancellation_type::all);
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::invalid_argument);
+ ASIO_CHECK(count == 42);
+
+ complete_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto complete_with_default_on_cancel(
+ asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<
+ CompletionToken, void(asio::error_code, int)>(
+ asio::experimental::co_composed<
+ void(asio::error_code, int)>(
+ [](auto, asio::io_context& ctx) -> void
+ {
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {asio::error::eof, i};
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_complete_with_default_on_cancel()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ asio::error_code ec;
+ asio::cancellation_signal cancel;
+
+ complete_with_default_on_cancel(ctx,
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+
+ complete_with_default_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run_one();
+ cancel.emit(asio::cancellation_type::all);
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::operation_aborted);
+ ASIO_CHECK(count == 0);
+
+ complete_with_default_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+}
+
+template <typename CompletionToken>
+auto throw_on_cancel(asio::io_context& ctx, CompletionToken&& token)
+{
+ return asio::async_initiate<
+ CompletionToken, void(asio::error_code, int)>(
+ asio::experimental::co_composed<
+ void(asio::error_code, int)>(
+ [](auto state, asio::io_context& ctx) -> void
+ {
+ try
+ {
+ state.throw_if_cancelled(true);
+ int i = 0;
+ for (; i < 100; ++i)
+ co_await asio::post(ctx, asio::deferred);
+ co_return {asio::error::eof, i};
+ }
+ catch (...)
+ {
+ co_return {asio::error::invalid_argument, 42};
+ }
+ }, ctx), token, std::ref(ctx));
+}
+
+void test_throw_on_cancel()
+{
+ asio::io_context ctx(1);
+ int count = 0;
+ asio::error_code ec;
+ asio::cancellation_signal cancel;
+
+ throw_on_cancel(ctx,
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+
+ throw_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run_one();
+ cancel.emit(asio::cancellation_type::all);
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::invalid_argument);
+ ASIO_CHECK(count == 42);
+
+ throw_on_cancel(ctx,
+ asio::bind_cancellation_slot(cancel.slot(),
+ [&](asio::error_code e, int i)
+ {
+ ec = e;
+ count = i;
+ }));
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(ec == asio::error::eof);
+ ASIO_CHECK(count == 100);
+}
+
+ASIO_TEST_SUITE
+(
+ "experimental/co_composed",
+ ASIO_TEST_CASE(test_throw_first)
+ ASIO_TEST_CASE(test_throw_after_await)
+ ASIO_TEST_CASE(test_throw_in_first_suspend)
+ ASIO_TEST_CASE(test_throw_in_suspend_after_await)
+ ASIO_TEST_CASE(test_post_loop)
+ ASIO_TEST_CASE(test_nested_post_loop)
+ ASIO_TEST_CASE(test_post_loop_return_1_0)
+ ASIO_TEST_CASE(test_post_loop_return_1_1)
+ ASIO_TEST_CASE(test_post_loop_return_1_2)
+ ASIO_TEST_CASE(test_post_loop_return_2)
+ ASIO_TEST_CASE(test_complete_on_cancel)
+ ASIO_TEST_CASE(test_complete_with_default_on_cancel)
+ ASIO_TEST_CASE(test_throw_on_cancel)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/concurrent_channel.cpp b/3rdparty/asio/src/tests/unit/experimental/concurrent_channel.cpp
new file mode 100644
index 00000000000..e64e9051638
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/concurrent_channel.cpp
@@ -0,0 +1,165 @@
+//
+// experimental/concurrent_channel.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/concurrent_channel.hpp"
+
+#include <utility>
+#include "asio/error.hpp"
+#include "asio/io_context.hpp"
+#include "../unit_test.hpp"
+
+using namespace asio;
+using namespace asio::experimental;
+
+void unbuffered_concurrent_channel_test()
+{
+ io_context ctx;
+
+ concurrent_channel<void(asio::error_code, std::string)> ch1(ctx);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send(asio::error::eof, "hello");
+
+ ASIO_CHECK(!b1);
+
+ std::string s1 = "abcdefghijklmnopqrstuvwxyz";
+ bool b2 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(!b2);
+ ASIO_CHECK(!s1.empty());
+
+ asio::error_code ec1;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s2 = std::move(s);
+ });
+
+ bool b3 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(b3);
+ ASIO_CHECK(s1.empty());
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s2 == "abcdefghijklmnopqrstuvwxyz");
+
+ bool b4 = ch1.try_receive([](asio::error_code, std::string){});
+
+ ASIO_CHECK(!b4);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s3 = "zyxwvutsrqponmlkjihgfedcba";
+ ch1.async_send(asio::error::eof, std::move(s3),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ asio::error_code ec3;
+ std::string s4;
+ bool b5 = ch1.try_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec3 = ec;
+ s4 = s;
+ });
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec3 == asio::error::eof);
+ ASIO_CHECK(s4 == "zyxwvutsrqponmlkjihgfedcba");
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec2);
+};
+
+void buffered_concurrent_channel_test()
+{
+ io_context ctx;
+
+ concurrent_channel<void(asio::error_code, std::string)> ch1(ctx, 1);
+
+ ASIO_CHECK(ch1.is_open());
+ ASIO_CHECK(!ch1.ready());
+
+ bool b1 = ch1.try_send(asio::error::eof, "hello");
+
+ ASIO_CHECK(b1);
+
+ std::string s1 = "abcdefghijklmnopqrstuvwxyz";
+ bool b2 = ch1.try_send(asio::error::eof, std::move(s1));
+
+ ASIO_CHECK(!b2);
+ ASIO_CHECK(!s1.empty());
+
+ asio::error_code ec1;
+ std::string s2;
+ ch1.async_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec1 = ec;
+ s2 = std::move(s);
+ });
+
+ ctx.run();
+
+ ASIO_CHECK(ec1 == asio::error::eof);
+ ASIO_CHECK(s2 == "hello");
+
+ bool b4 = ch1.try_receive([](asio::error_code, std::string){});
+
+ ASIO_CHECK(!b4);
+
+ asio::error_code ec2 = asio::error::would_block;
+ std::string s3 = "zyxwvutsrqponmlkjihgfedcba";
+ ch1.async_send(asio::error::eof, std::move(s3),
+ [&](asio::error_code ec)
+ {
+ ec2 = ec;
+ });
+
+ asio::error_code ec3;
+ std::string s4;
+ bool b5 = ch1.try_receive(
+ [&](asio::error_code ec, std::string s)
+ {
+ ec3 = ec;
+ s4 = s;
+ });
+
+ ASIO_CHECK(b5);
+ ASIO_CHECK(ec3 == asio::error::eof);
+ ASIO_CHECK(s4 == "zyxwvutsrqponmlkjihgfedcba");
+
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(!ec2);
+};
+
+ASIO_TEST_SUITE
+(
+ "experimental/concurrent_channel",
+ ASIO_TEST_CASE(unbuffered_concurrent_channel_test)
+ ASIO_TEST_CASE(buffered_concurrent_channel_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/allocator.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/allocator.cpp
new file mode 100644
index 00000000000..845906df853
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/allocator.cpp
@@ -0,0 +1,113 @@
+//
+// experimental/coro/partial.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/coro.hpp"
+
+#include <vector>
+#include "asio/io_context.hpp"
+#include "../../unit_test.hpp"
+
+namespace exp = asio::experimental;
+
+namespace coro {
+
+template<typename Value = void>
+struct tracked_allocator
+{
+ using value_type = Value;
+ std::vector<std::pair<void*, std::size_t>> & allocs, &deallocs;
+
+ tracked_allocator(std::vector<std::pair<void*, std::size_t>> & allocs,
+ std::vector<std::pair<void*, std::size_t>> & deallocs) : allocs(allocs), deallocs(deallocs) {}
+
+
+ template<typename T>
+ tracked_allocator(const tracked_allocator<T> & a) : allocs(a.allocs), deallocs(a.deallocs) {}
+
+ value_type* allocate(std::size_t n)
+ {
+ auto p = new char[n * sizeof(Value)];
+ allocs.emplace_back(p, n);
+ return reinterpret_cast<value_type*>(p);
+ }
+
+ void deallocate(void* p, std::size_t n)
+ {
+ deallocs.emplace_back(p, n);
+ delete[] static_cast<char*>(p);
+// ASIO_CHECK(allocs.back() == deallocs.back());
+ }
+
+ bool operator==(const tracked_allocator & rhs) const
+ {
+ return &allocs == &rhs.allocs
+ && &deallocs == &rhs.deallocs;
+ }
+};
+
+exp::coro<void, void, asio::any_io_executor, tracked_allocator<void>>
+ alloc_test_impl(asio::io_context & ctx, int, std::allocator_arg_t, tracked_allocator<void> ta, double)
+{
+ co_return ;
+}
+
+void alloc_test()
+{
+ std::vector<std::pair<void*, std::size_t>> allocs, deallocs;
+ asio::io_context ctx;
+ bool ran = false;
+
+ {
+ auto pp = alloc_test_impl(ctx, 42, std::allocator_arg, {allocs, deallocs}, 42.);
+
+ ASIO_CHECK(allocs.size() == 1u);
+ ASIO_CHECK(deallocs.empty());
+
+ pp.async_resume([&](auto e){ran = true; ASIO_CHECK(!e);});
+ ctx.run();
+ ASIO_CHECK(deallocs.size() == 0u);
+ }
+ ctx.restart();
+ ctx.run();
+ ASIO_CHECK(deallocs.size() == 1u);
+ ASIO_CHECK(allocs == deallocs);
+
+ ASIO_CHECK(ran);
+
+ ran = false;
+
+ auto p = asio::experimental::detail::post_coroutine(
+ ctx,
+ asio::bind_allocator(tracked_allocator{allocs, deallocs}, [&]{ran = true;})).handle;
+ ASIO_CHECK(allocs.size() == 2u);
+ ASIO_CHECK(deallocs.size() == 1u);
+ p.resume();
+ ASIO_CHECK(allocs.size() == 3u);
+ ASIO_CHECK(deallocs.size() == 2u);
+ ctx.restart();
+ ctx.run();
+
+ ASIO_CHECK(allocs == deallocs);
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/allocate",
+ ASIO_TEST_CASE(::coro::alloc_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/cancel.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/cancel.cpp
index 4f99ebd580d..38cf1067908 100644
--- a/3rdparty/asio/src/tests/unit/experimental/coro/cancel.cpp
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/cancel.cpp
@@ -2,8 +2,8 @@
// experimental/coro/cancel.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -17,10 +17,10 @@
// Test that header file is self-contained.
#include "asio/experimental/coro.hpp"
#include <iostream>
+#include "asio/bind_cancellation_slot.hpp"
#include "asio/io_context.hpp"
#include "asio/steady_timer.hpp"
#include "asio/this_coro.hpp"
-#include <boost/scope_exit.hpp>
#include "../../unit_test.hpp"
using namespace asio::experimental;
@@ -32,6 +32,9 @@ namespace coro {
auto coro_simple_cancel_impl(asio::io_context& ) noexcept
-> asio::experimental::coro<void() noexcept, asio::error_code>
{
+ ASIO_CHECK(
+ !(co_await this_coro::cancellation_state).cancelled());
+
asio::steady_timer timer{
co_await this_coro::executor,
std::chrono::seconds(1)};
@@ -50,12 +53,15 @@ auto coro_simple_cancel_impl(asio::io_context& ) noexcept
void coro_simple_cancel()
{
asio::io_context ctx;
+ asio::cancellation_signal sig;
auto k = coro_simple_cancel_impl(ctx);
asio::error_code res_ec;
- k.async_resume([&](asio::error_code ec) {res_ec = ec;});
- asio::post(ctx, [&]{k.cancel();});
+ k.async_resume(
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](asio::error_code ec) {res_ec = ec;}));
+ asio::post(ctx, [&]{sig.emit(asio::cancellation_type::all);});
ASIO_CHECK(!res_ec);
@@ -76,12 +82,15 @@ auto coro_throw_cancel_impl(asio::io_context& )
void coro_throw_cancel()
{
asio::io_context ctx;
+ asio::cancellation_signal sig;
auto k = coro_throw_cancel_impl(ctx);
std::exception_ptr res_ex;
- k.async_resume([&](std::exception_ptr ex) {res_ex = ex;});
- asio::post(ctx, [&]{k.cancel();});
+ k.async_resume(
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](std::exception_ptr ex) {res_ex = ex;}));
+ asio::post(ctx, [&]{sig.emit(asio::cancellation_type::all);});
ASIO_CHECK(!res_ex);
@@ -90,7 +99,8 @@ void coro_throw_cancel()
ASIO_CHECK(res_ex);
try
{
- std::rethrow_exception(res_ex);
+ if (res_ex)
+ std::rethrow_exception(res_ex);
}
catch (asio::system_error& se)
{
@@ -132,21 +142,26 @@ auto coro_simple_cancel_nested_kouter(
void coro_simple_cancel_nested()
{
asio::io_context ctx;
+ asio::cancellation_signal sig;
int cnt = 0;
auto kouter = coro_simple_cancel_nested_kouter(ctx, cnt);
asio::error_code res_ec;
- kouter.async_resume([&](asio::error_code ec) {res_ec = ec;});
- asio::post(ctx, [&]{kouter.cancel();});
+ kouter.async_resume(
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](asio::error_code ec) {res_ec = ec;}));
+ asio::post(ctx, [&]{sig.emit(asio::cancellation_type::all);});
ASIO_CHECK(!res_ec);
ctx.run();
ASIO_CHECK(res_ec == asio::error::operation_aborted);
ctx.restart();
res_ec = {};
- kouter.async_resume([&](asio::error_code ec) {res_ec = ec;});
- asio::post(ctx, [&]{kouter.cancel();});
+ kouter.async_resume(
+ asio::bind_cancellation_slot(sig.slot(),
+ [&](asio::error_code ec) {res_ec = ec;}));
+ asio::post(ctx, [&]{sig.emit(asio::cancellation_type::all);});
ASIO_CHECK(!res_ec);
ctx.run();
ASIO_CHECK(res_ec == asio::error::operation_aborted);
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/co_spawn.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/co_spawn.cpp
new file mode 100644
index 00000000000..8e6586252f2
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/co_spawn.cpp
@@ -0,0 +1,67 @@
+//
+// experimental/coro/co_spawn.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/co_spawn.hpp"
+
+#include <iostream>
+#include "asio/io_context.hpp"
+#include "asio/steady_timer.hpp"
+#include "asio/this_coro.hpp"
+#include "../../unit_test.hpp"
+
+using namespace asio::experimental;
+namespace this_coro = asio::this_coro;
+
+namespace coro {
+
+auto coro_simple_co_spawn_impl(asio::io_context& , bool &done) noexcept
+ -> asio::experimental::coro<void() noexcept, int>
+{
+ asio::steady_timer timer(
+ co_await this_coro::executor,
+ std::chrono::milliseconds(10));
+
+ done = true;
+
+ co_return 42;
+}
+
+void coro_co_spawn()
+{
+ asio::io_context ctx;
+
+ bool done1 = false;
+ bool done2 = false;
+ int res = 0;
+
+ co_spawn(coro_simple_co_spawn_impl(ctx, done1),
+ [&](int r){done2= true; res = r;});
+
+ ctx.run();
+
+ ASIO_CHECK(done1);
+ ASIO_CHECK(done2);
+ ASIO_CHECK(res == 42);
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/co_spawn",
+ ASIO_TEST_CASE(::coro::coro_co_spawn)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/exception.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/exception.cpp
index 49a91dc32e2..f4d782e9903 100644
--- a/3rdparty/asio/src/tests/unit/experimental/coro/exception.cpp
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/exception.cpp
@@ -2,8 +2,8 @@
// experimental/coro/exception.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -109,6 +109,8 @@ asio::experimental::coro<int(int)> throwing_stacked(
asio::any_io_executor exec, int &val,
bool &destroyed_inner, bool &destroyed)
{
+ ASIO_CHECK((co_await asio::this_coro::throw_if_cancelled()));
+
on_scope_exit x = [&]() noexcept { destroyed = true; };
(void)x;
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/executor.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/executor.cpp
new file mode 100644
index 00000000000..e0893da2e50
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/executor.cpp
@@ -0,0 +1,116 @@
+//
+// experimental/coro/executor.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/coro.hpp"
+
+#include "asio/thread_pool.hpp"
+#include "asio/io_context.hpp"
+#include "../../unit_test.hpp"
+
+using namespace asio::experimental;
+
+namespace coro {
+
+#define ASIO_CHECKPOINT() \
+ ASIO_TEST_IOSTREAM << __FILE__ << "(" << __LINE__ << "): " \
+ << asio::detail::test_name() << ": " \
+ << "Checkpoint" << std::endl;
+
+template <typename T>
+void different_execs()
+{
+ asio::thread_pool th_ctx{1u};
+ asio::io_context ctx;
+
+ auto o = std::make_optional(
+ asio::prefer(th_ctx.get_executor(),
+ asio::execution::outstanding_work.tracked));
+
+ static bool ran_inner = false, ran_outer = false;
+
+ struct c_inner_t
+ {
+ auto operator()(asio::any_io_executor e) -> asio::experimental::coro<T>
+ {
+ auto p = e.target<asio::thread_pool::executor_type>();
+ ASIO_CHECKPOINT();
+ ASIO_CHECK(p);
+ ASIO_CHECK(p->running_in_this_thread());
+ ran_inner = true;
+ co_return;
+ };
+
+ };
+
+ c_inner_t c_inner;
+
+ struct c_outer_t
+ {
+
+ auto operator()(asio::any_io_executor e, int,
+ asio::experimental::coro<T> tp)
+ -> asio::experimental::coro<void>
+ {
+ auto p = e.target<asio::io_context::executor_type>();
+
+ ASIO_CHECK(p);
+ ASIO_CHECK(p->running_in_this_thread());
+ ASIO_CHECKPOINT();
+
+ co_await tp;
+
+ ASIO_CHECKPOINT();
+ ASIO_CHECK(p->running_in_this_thread());
+
+ ran_outer = true;
+ };
+ };
+
+ c_outer_t c_outer;
+
+ bool ran = false;
+ std::exception_ptr ex;
+
+ auto c = c_outer(ctx.get_executor(), 10, c_inner(th_ctx.get_executor()));
+ c.async_resume(
+ [&](std::exception_ptr e)
+ {
+ ASIO_CHECK(!e);
+ ASIO_CHECKPOINT();
+ ran = true;
+ });
+
+ ASIO_CHECK(!ran);
+ ctx.run();
+ o.reset();
+ ASIO_CHECK(ran);
+ ASIO_CHECK(ran_inner);
+ ASIO_CHECK(ran_outer);
+ ASIO_CHECK(!ex);
+
+ th_ctx.stop();
+ th_ctx.join();
+}
+
+} // namespace coro
+
+ASIO_TEST_SUITE
+(
+ "coro/partial",
+ ASIO_TEST_CASE(::coro::different_execs<void>)
+ ASIO_TEST_CASE(::coro::different_execs<int()>)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/partial.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/partial.cpp
index 6a615a47461..651b8292204 100644
--- a/3rdparty/asio/src/tests/unit/experimental/coro/partial.cpp
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/partial.cpp
@@ -2,8 +2,8 @@
// experimental/coro/partial.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -28,7 +28,7 @@ void partial()
{
asio::io_context ctx;
bool ran = false;
- auto p = detail::post_coroutine(ctx, [&]{ran = true;});
+ auto p = detail::post_coroutine(ctx, [&]{ran = true;}).handle;
ASIO_CHECK(!ran);
p.resume();
ASIO_CHECK(!ran);
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/simple_test.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/simple_test.cpp
index 92eecd1d95a..5eac0688548 100644
--- a/3rdparty/asio/src/tests/unit/experimental/coro/simple_test.cpp
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/simple_test.cpp
@@ -2,8 +2,8 @@
// experimental/coro/simple_test.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/stack_test.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/stack_test.cpp
index 8b06587028e..9177161afcf 100644
--- a/3rdparty/asio/src/tests/unit/experimental/coro/stack_test.cpp
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/stack_test.cpp
@@ -2,8 +2,8 @@
// experimental/coro/stack_test.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
diff --git a/3rdparty/asio/src/tests/unit/experimental/coro/use_coro.cpp b/3rdparty/asio/src/tests/unit/experimental/coro/use_coro.cpp
index e8d13afeacf..f2cb7adfcdd 100644
--- a/3rdparty/asio/src/tests/unit/experimental/coro/use_coro.cpp
+++ b/3rdparty/asio/src/tests/unit/experimental/coro/use_coro.cpp
@@ -2,8 +2,8 @@
// experimental/coro/use_coro.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -37,7 +37,7 @@ asio::experimental::coro<void() noexcept, int>
awaiter_noexcept(asio::any_io_executor exec)
{
asio::steady_timer timer{exec};
- auto ec = co_await timer.async_wait(use_coro);
+ auto ec = co_await timer.async_wait(asio::deferred);
ASIO_CHECK(ec == asio::error_code{});
co_return 42;
}
diff --git a/3rdparty/asio/src/tests/unit/experimental/parallel_group.cpp b/3rdparty/asio/src/tests/unit/experimental/parallel_group.cpp
new file mode 100644
index 00000000000..c91c95f157d
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/experimental/parallel_group.cpp
@@ -0,0 +1,25 @@
+//
+// experimental/parallel_group.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/experimental/parallel_group.hpp"
+
+#include "../unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "experimental/parallel_group",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/experimental/promise.cpp b/3rdparty/asio/src/tests/unit/experimental/promise.cpp
index 540cae2008b..67923a4c726 100644
--- a/3rdparty/asio/src/tests/unit/experimental/promise.cpp
+++ b/3rdparty/asio/src/tests/unit/experimental/promise.cpp
@@ -2,8 +2,8 @@
// promise.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2021 Klemens D. Morgenstern
-// (klemens dot morgenstern at gmx dot net)
+// Copyright (c) 2021-2023 Klemens D. Morgenstern
+// (klemens dot morgenstern at gmx dot net)
//
// 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)
@@ -17,6 +17,11 @@
// Test that header file is self-contained.
#include "asio/experimental/promise.hpp"
+#include "asio/append.hpp"
+#include "asio/bind_cancellation_slot.hpp"
+#include "asio/compose.hpp"
+#include "asio/deferred.hpp"
+#include "asio/experimental/use_promise.hpp"
#include "asio/steady_timer.hpp"
#include "../unit_test.hpp"
@@ -25,7 +30,6 @@ namespace promise {
void promise_tester()
{
using namespace asio;
- using asio::error_code;
using namespace std::chrono;
io_context ctx;
@@ -33,16 +37,15 @@ void promise_tester()
steady_timer timer1{ctx}, timer2{ctx};
const auto started_when = steady_clock::now();
- timer1.expires_at(started_when + milliseconds(2000));
+ timer1.expires_at(started_when + milliseconds(5000));
timer2.expires_at(started_when + milliseconds(1000));
- auto p = timer1.async_wait(experimental::use_promise);
+ auto p1 = timer1.async_wait(experimental::use_promise);
steady_clock::time_point completed_when;
- error_code ec;
+ asio::error_code ec;
bool called = false;
- p.async_wait(
- [&](auto ec_)
+ p1([&](asio::error_code ec_)
{
ec = ec_;
called = true;
@@ -50,271 +53,174 @@ void promise_tester()
});
steady_clock::time_point timer2_done;
- timer2.async_wait([&](auto) {
- timer2_done = steady_clock::now();;
- p.cancel();
- });
+ timer2.async_wait(
+ [&](asio::error_code)
+ {
+ timer2_done = steady_clock::now();
+ p1.cancel();
+ });
ctx.run();
- ASIO_CHECK(timer2_done + milliseconds(1) > completed_when);
+ static_assert(
+ asio::is_async_operation<decltype(p1)>::value,
+ "promise is async_op");
+
+ ASIO_CHECK(timer2_done + milliseconds(1) > started_when);
+ ASIO_CHECK(completed_when > timer2_done);
ASIO_CHECK(called);
ASIO_CHECK(ec == error::operation_aborted);
-}
-void promise_race_tester()
-{
- using namespace asio;
- using asio::error_code;
- using namespace std::chrono;
-
- io_context ctx;
+ timer1.expires_after(milliseconds(0));
+ auto p2 = timer1.async_wait(
+ asio::append(experimental::use_promise, 123));
- steady_timer timer1{ctx}, timer2{ctx};
+ ec = asio::error::would_block;
+ called = false;
- const auto started_when = steady_clock::now();
- timer1.expires_at(started_when + milliseconds(2000));
- timer2.expires_at(started_when + milliseconds(1000));
-
- experimental::promise<void(std::variant<error_code, error_code>)> p =
- experimental::promise<>::race(
- timer1.async_wait(experimental::use_promise),
- timer2.async_wait(experimental::use_promise));
-
- auto called = false;
- error_code ec;
- steady_clock::time_point completed_when;
- p.async_wait(
- [&](auto v)
+ p2([&](asio::error_code ec_, int i)
{
- ASIO_CHECK(v.index() == 1);
- ec = get<1>(v);
+ ASIO_CHECK(i == 123);
+ ec = ec_;
called = true;
- completed_when = steady_clock::now();
});
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(!called);
+
+ ctx.restart();
ctx.run();
- ASIO_CHECK(started_when + milliseconds(1000) <= completed_when);
- ASIO_CHECK(started_when + milliseconds(1500) > completed_when);
- ASIO_CHECK(called);
+ static_assert(
+ asio::is_async_operation<decltype(p2)>::value,
+ "promise is async_op");
+
ASIO_CHECK(!ec);
+ ASIO_CHECK(called);
}
-void promise_all_tester()
+void promise_slot_tester()
{
using namespace asio;
- using asio::error_code;
using namespace std::chrono;
io_context ctx;
- steady_timer timer1{ctx},
- timer2{ctx};
+ steady_timer timer1{ctx}, timer2{ctx};
const auto started_when = steady_clock::now();
- timer1.expires_at(started_when + milliseconds(2000));
+ timer1.expires_at(started_when + milliseconds(2500));
timer2.expires_at(started_when + milliseconds(1000));
+ auto p = timer1.async_wait(experimental::use_promise);
- experimental::promise<void(error_code, error_code)> p =
- experimental::promise<>::all(
- timer1.async_wait(experimental::use_promise),
- timer2.async_wait(experimental::use_promise));
-
- bool called = false;
steady_clock::time_point completed_when;
+ asio::error_code ec;
+ bool called = false;
- p.async_wait(
- [&](auto ec1, auto ec2)
- {
- ASIO_CHECK(!ec1);
- ASIO_CHECK(!ec2);
- called = true;
- completed_when = steady_clock::now();
- });
-
- ctx.run();
-
- ASIO_CHECK(started_when + milliseconds(2000) <= completed_when);
- ASIO_CHECK(started_when + milliseconds(2500) > completed_when);
- ASIO_CHECK(called);
-}
-
-void promise_race_ranged_tester()
-{
- using namespace asio;
- using asio::error_code;
- using namespace std::chrono;
-
- io_context ctx;
-
- steady_timer timer1{ctx}, timer2{ctx};
+ asio::cancellation_signal sig;
- const auto started_when = steady_clock::now();
- timer1.expires_at(started_when + milliseconds(2000));
- timer2.expires_at(started_when + milliseconds(1000));
+ p(asio::bind_cancellation_slot(
+ sig.slot(),
+ [&](asio::error_code ec_)
+ {
+ ec = ec_;
+ called = true;
+ completed_when = steady_clock::now();
+ }));
- // promise<
- // std::variant<
- // tuple<error_code, std::size_t>,
- // tuple<error_code, std::size_t>>>
- experimental::promise<void(std::size_t, error_code)> p =
- experimental::promise<>::race(
- std::array{
- timer1.async_wait(experimental::use_promise),
- timer2.async_wait(experimental::use_promise)
- });
-
- auto called = false;
- auto completed_when = steady_clock::time_point();
-
- p.async_wait([&](auto idx, auto ec )
+ steady_clock::time_point timer2_done;
+ timer2.async_wait(
+ [&](asio::error_code)
{
- ASIO_CHECK(idx == 1);
- called = true;
- completed_when = steady_clock::now();
- ASIO_CHECK(!ec);
+ timer2_done = steady_clock::now();
+ sig.emit(asio::cancellation_type::all);
});
- std::array<experimental::promise<void()>, 0u> arr;
-
- experimental::promise<>::race(
- ctx.get_executor(), std::move(arr)
- ).async_wait(
- [](std::size_t idx) {ASIO_CHECK(idx == std::size_t(-1));}
- );
-
ctx.run();
- ASIO_CHECK(started_when + milliseconds(1000) <= completed_when);
- ASIO_CHECK(started_when + milliseconds(1500) > completed_when);
- ASIO_CHECK(called);
-
- std::exception_ptr ex;
-
- try
- {
- experimental::promise<>::race(std::move(arr));
- }
- catch (...)
- {
- ex = std::current_exception();
- }
+ static_assert(
+ asio::is_async_operation<decltype(p)>::value,
+ "promise is async_op");
- ASIO_CHECK(ex);
+ ASIO_CHECK(timer2_done + milliseconds(1) > started_when);
+ ASIO_CHECK(completed_when > timer2_done);
+ ASIO_CHECK(called);
+ ASIO_CHECK(ec == error::operation_aborted);
}
-void promise_all_ranged_tester()
+void early_completion()
{
using namespace asio;
- using asio::error_code;
using namespace std::chrono;
io_context ctx;
+ auto p = asio::post(ctx, asio::experimental::use_promise);
+ ctx.run();
- steady_timer timer1{ctx}, timer2{ctx};
-
- const auto started_when = steady_clock::now();
- timer1.expires_at(started_when + milliseconds(2000));
- timer2.expires_at(started_when + milliseconds(1000));
-
- // promise<
- // std::variant<
- // tuple<error_code, std::size_t>,
- // tuple<error_code, std::size_t>>>
- experimental::promise<void(std::vector<error_code>)> p =
- experimental::promise<>::all(
- std::array{
- timer1.async_wait(experimental::use_promise),
- timer2.async_wait(experimental::use_promise)
- });
-
- auto called = false;
- auto completed_when = steady_clock::time_point();
-
- p.async_wait(
- [&](auto v){
- ASIO_CHECK(v.size() == 2u);
- completed_when = steady_clock::now();
- ASIO_CHECK(!v[0]);
- ASIO_CHECK(!v[1]);
- called = true;
- });
-
- std::array<experimental::promise<void()>, 0u> arr;
- experimental::promise<>::all(
- ctx.get_executor(), std::move(arr)
- ).async_wait(
- [](auto v) {ASIO_CHECK(v.size() == 0);}
- );
+ ASIO_CHECK(p.completed());
+ bool completed = false;
+ p([&]{completed = true;});
+ ASIO_CHECK(!completed);
+ ctx.restart();
ctx.run();
+ ASIO_CHECK(completed);
+}
- ASIO_CHECK(started_when + milliseconds(2000) <= completed_when);
- ASIO_CHECK(started_when + milliseconds(2500) > completed_when);
- ASIO_CHECK(called == true);
-
- std::exception_ptr ex;
- try
+struct test_cancel_impl_op
+{
+ asio::steady_timer & tim;
+ asio::error_code &ec;
+ template<typename Self>
+ void operator()(Self& self)
{
- experimental::promise<>::all(std::move(arr));
+ tim.async_wait(std::forward<Self>(self));
}
- catch (...)
+
+ template<typename Self>
+ void operator()(Self& self, asio::error_code ec_)
{
- ex = std::current_exception();
+ ec = ec_;
+ self.complete(ec_);
}
-
- ASIO_CHECK(ex);
+};
+
+template <typename CompletionToken>
+ASIO_INITFN_AUTO_RESULT_TYPE(
+ CompletionToken, void(asio::error_code))
+test_cancel_impl(asio::steady_timer & tim,
+ asio::error_code &ec,
+ CompletionToken&& token)
+{
+ return asio::async_compose<CompletionToken, void(asio::error_code)>(
+ test_cancel_impl_op{tim, ec}, token, tim);
}
-void promise_cancel_tester()
+void test_cancel()
{
- using namespace asio;
- using asio::error_code;
- using namespace std::chrono;
-
- io_context ctx;
-
- steady_timer timer1{ctx}, timer2{ctx};
+ asio::io_context ctx;
+ asio::steady_timer tim{ctx, std::chrono::seconds(10)};
+ asio::error_code ec;
- const auto started_when = steady_clock::now();
- timer1.expires_at(started_when + milliseconds(2000));
- timer2.expires_at(started_when + milliseconds(1000));
-
- // promise<
- // std::variant<
- // tuple<error_code, std::size_t>,
- // tuple<error_code, std::size_t>>>
- experimental::promise<void(error_code, error_code)> p =
- experimental::promise<>::all(
- timer1.async_wait(experimental::use_promise),
- timer2.async_wait(experimental::use_promise));
-
- bool called = false;
- p.async_wait(
- [&](auto ec1, auto ec2)
- {
- called = true;
- ASIO_CHECK(ec1 == error::operation_aborted);
- ASIO_CHECK(ec2 == error::operation_aborted);
- });
-
- post(ctx, [&]{p.cancel();});
+ {
+ auto p = test_cancel_impl(
+ tim, ec, asio::experimental::use_promise);
+ }
ctx.run();
- ASIO_CHECK(called);
+ ASIO_CHECK_MESSAGE(
+ ec == asio::error::operation_aborted,
+ ec.message());
}
} // namespace promise
ASIO_TEST_SUITE
(
- "promise",
- ASIO_TEST_CASE(promise::promise_tester)
- ASIO_TEST_CASE(promise::promise_race_tester)
- ASIO_TEST_CASE(promise::promise_all_tester)
- ASIO_TEST_CASE(promise::promise_race_ranged_tester)
- ASIO_TEST_CASE(promise::promise_all_ranged_tester)
- ASIO_TEST_CASE(promise::promise_cancel_tester)
+ "promise",
+ ASIO_TEST_CASE(promise::promise_tester)
+ ASIO_TEST_CASE(promise::promise_slot_tester)
+ ASIO_TEST_CASE(promise::early_completion)
+ ASIO_TEST_CASE(promise::test_cancel)
)
diff --git a/3rdparty/asio/src/tests/unit/file_base.cpp b/3rdparty/asio/src/tests/unit/file_base.cpp
new file mode 100644
index 00000000000..9f517fd8e37
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/file_base.cpp
@@ -0,0 +1,25 @@
+//
+// file_base.cpp
+// ~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/post.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "file_base",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/generic/basic_endpoint.cpp b/3rdparty/asio/src/tests/unit/generic/basic_endpoint.cpp
index 72d9d428184..c02f32b8c73 100644
--- a/3rdparty/asio/src/tests/unit/generic/basic_endpoint.cpp
+++ b/3rdparty/asio/src/tests/unit/generic/basic_endpoint.cpp
@@ -2,7 +2,7 @@
// generic/basic_endpoint.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/generic/datagram_protocol.cpp b/3rdparty/asio/src/tests/unit/generic/datagram_protocol.cpp
index c072a8bc0a2..23957a7a15d 100644
--- a/3rdparty/asio/src/tests/unit/generic/datagram_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/generic/datagram_protocol.cpp
@@ -2,7 +2,7 @@
// generic/datagram_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,6 +20,7 @@
#include "asio/io_context.hpp"
#include "asio/ip/udp.hpp"
#include "../unit_test.hpp"
+#include "../archetypes/async_result.hpp"
#if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
# define generic cpp_generic
@@ -65,6 +66,7 @@ void test()
socket_base::message_flags in_flags = 0;
socket_base::send_buffer_size socket_option;
socket_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
asio::error_code ec;
// basic_datagram_socket constructors.
@@ -78,19 +80,15 @@ void test()
dp::socket socket4(ioc, dp(af_inet, ipproto_udp), native_socket1);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
dp::socket socket5(std::move(socket4));
asio::ip::udp::socket udp_socket(ioc);
dp::socket socket6(std::move(udp_socket));
-#endif // defined(ASIO_HAS_MOVE)
// basic_datagram_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = dp::socket(ioc);
socket1 = std::move(socket2);
socket1 = asio::ip::udp::socket(ioc);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -143,6 +141,7 @@ void test()
socket1.connect(dp::endpoint(), ec);
socket1.async_connect(dp::endpoint(), connect_handler);
+ socket1.async_connect(dp::endpoint(), immediate);
socket1.set_option(socket_option);
socket1.set_option(socket_option, ec);
@@ -184,6 +183,12 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
socket1.async_send(null_buffers(), in_flags, send_handler);
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
socket1.send_to(buffer(mutable_char_buffer),
dp::endpoint());
@@ -216,6 +221,18 @@ void test()
dp::endpoint(), in_flags, send_handler);
socket1.async_send_to(null_buffers(),
dp::endpoint(), in_flags, send_handler);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ dp::endpoint(), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ dp::endpoint(), immediate);
+ socket1.async_send_to(null_buffers(),
+ dp::endpoint(), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ dp::endpoint(), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ dp::endpoint(), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ dp::endpoint(), in_flags, immediate);
socket1.receive(buffer(mutable_char_buffer));
socket1.receive(null_buffers());
@@ -229,6 +246,10 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
receive_handler);
socket1.async_receive(null_buffers(), in_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
dp::endpoint endpoint;
socket1.receive_from(buffer(mutable_char_buffer), endpoint);
@@ -246,6 +267,14 @@ void test()
endpoint, in_flags, receive_handler);
socket1.async_receive_from(null_buffers(),
endpoint, in_flags, receive_handler);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, immediate);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, in_flags, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, in_flags, immediate);
}
catch (std::exception&)
{
@@ -259,5 +288,5 @@ void test()
ASIO_TEST_SUITE
(
"generic/datagram_protocol",
- ASIO_TEST_CASE(generic_datagram_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(generic_datagram_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/generic/raw_protocol.cpp b/3rdparty/asio/src/tests/unit/generic/raw_protocol.cpp
index afe17cf7065..d20ef5ba870 100644
--- a/3rdparty/asio/src/tests/unit/generic/raw_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/generic/raw_protocol.cpp
@@ -2,7 +2,7 @@
// generic/raw_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,6 +20,7 @@
#include "asio/io_context.hpp"
#include "asio/ip/icmp.hpp"
#include "../unit_test.hpp"
+#include "../archetypes/async_result.hpp"
#if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
# define generic cpp_generic
@@ -65,6 +66,7 @@ void test()
socket_base::message_flags in_flags = 0;
socket_base::send_buffer_size socket_option;
socket_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
asio::error_code ec;
// basic_raw_socket constructors.
@@ -78,19 +80,15 @@ void test()
rp::socket socket4(ioc, rp(af_inet, ipproto_icmp), native_socket1);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
rp::socket socket5(std::move(socket4));
asio::ip::icmp::socket icmp_socket(ioc);
rp::socket socket6(std::move(icmp_socket));
-#endif // defined(ASIO_HAS_MOVE)
// basic_datagram_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = rp::socket(ioc);
socket1 = std::move(socket2);
socket1 = asio::ip::icmp::socket(ioc);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -143,6 +141,7 @@ void test()
socket1.connect(rp::endpoint(), ec);
socket1.async_connect(rp::endpoint(), connect_handler);
+ socket1.async_connect(rp::endpoint(), immediate);
socket1.set_option(socket_option);
socket1.set_option(socket_option, ec);
@@ -184,6 +183,12 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
socket1.async_send(null_buffers(), in_flags, send_handler);
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
socket1.send_to(buffer(mutable_char_buffer),
rp::endpoint());
@@ -216,6 +221,18 @@ void test()
rp::endpoint(), in_flags, send_handler);
socket1.async_send_to(null_buffers(),
rp::endpoint(), in_flags, send_handler);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ rp::endpoint(), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ rp::endpoint(), immediate);
+ socket1.async_send_to(null_buffers(),
+ rp::endpoint(), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ rp::endpoint(), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ rp::endpoint(), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ rp::endpoint(), in_flags, immediate);
socket1.receive(buffer(mutable_char_buffer));
socket1.receive(null_buffers());
@@ -229,6 +246,11 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
receive_handler);
socket1.async_receive(null_buffers(), in_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags,
+ immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
rp::endpoint endpoint;
socket1.receive_from(buffer(mutable_char_buffer), endpoint);
@@ -246,6 +268,14 @@ void test()
endpoint, in_flags, receive_handler);
socket1.async_receive_from(null_buffers(),
endpoint, in_flags, receive_handler);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, immediate);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, in_flags, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, in_flags, immediate);
}
catch (std::exception&)
{
@@ -259,5 +289,5 @@ void test()
ASIO_TEST_SUITE
(
"generic/raw_protocol",
- ASIO_TEST_CASE(generic_raw_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(generic_raw_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/generic/seq_packet_protocol.cpp b/3rdparty/asio/src/tests/unit/generic/seq_packet_protocol.cpp
index c4de03bc58b..587445b1f05 100644
--- a/3rdparty/asio/src/tests/unit/generic/seq_packet_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/generic/seq_packet_protocol.cpp
@@ -2,7 +2,7 @@
// generic/seq_packet_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,6 +19,7 @@
#include <cstring>
#include "asio/io_context.hpp"
#include "../unit_test.hpp"
+#include "../archetypes/async_result.hpp"
#if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
# define generic cpp_generic
@@ -64,6 +65,7 @@ void test()
socket_base::message_flags out_flags = 0;
socket_base::send_buffer_size socket_option;
socket_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
asio::error_code ec;
// basic_seq_packet_socket constructors.
@@ -77,16 +79,12 @@ void test()
spp::socket socket4(ioc, spp(af_inet, 0), native_socket1);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
spp::socket socket5(std::move(socket4));
-#endif // defined(ASIO_HAS_MOVE)
// basic_seq_packet_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = spp::socket(ioc);
socket1 = std::move(socket2);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -139,6 +137,7 @@ void test()
socket1.connect(spp::endpoint(), ec);
socket1.async_connect(spp::endpoint(), connect_handler);
+ socket1.async_connect(spp::endpoint(), immediate);
socket1.set_option(socket_option);
socket1.set_option(socket_option, ec);
@@ -174,6 +173,9 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
socket1.async_send(null_buffers(), in_flags, send_handler);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
socket1.receive(buffer(mutable_char_buffer), out_flags);
socket1.receive(null_buffers(), out_flags);
@@ -188,6 +190,11 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
out_flags, receive_handler);
socket1.async_receive(null_buffers(), in_flags, out_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), out_flags, immediate);
+ socket1.async_receive(null_buffers(), out_flags, immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags,
+ out_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, out_flags, immediate);
}
catch (std::exception&)
{
@@ -201,5 +208,5 @@ void test()
ASIO_TEST_SUITE
(
"generic/seq_packet_protocol",
- ASIO_TEST_CASE(generic_seq_packet_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(generic_seq_packet_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/generic/stream_protocol.cpp b/3rdparty/asio/src/tests/unit/generic/stream_protocol.cpp
index 48c681db9f7..dedf6d76cee 100644
--- a/3rdparty/asio/src/tests/unit/generic/stream_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/generic/stream_protocol.cpp
@@ -2,7 +2,7 @@
// generic/stream_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,6 +20,7 @@
#include "asio/io_context.hpp"
#include "asio/ip/tcp.hpp"
#include "../unit_test.hpp"
+#include "../archetypes/async_result.hpp"
#if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
# define generic cpp_generic
@@ -73,6 +74,7 @@ void test()
socket_base::message_flags in_flags = 0;
socket_base::keep_alive socket_option;
socket_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
asio::error_code ec;
// basic_stream_socket constructors.
@@ -88,19 +90,15 @@ void test()
#endif // defined(ASIO_WINDOWS_RUNTIME)
sp::socket socket4(ioc, sp(af_inet, ipproto_tcp), native_socket1);
-#if defined(ASIO_HAS_MOVE)
sp::socket socket5(std::move(socket4));
asio::ip::tcp::socket tcp_socket(ioc);
sp::socket socket6(std::move(tcp_socket));
-#endif // defined(ASIO_HAS_MOVE)
// basic_stream_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = sp::socket(ioc);
socket1 = std::move(socket2);
socket1 = asio::ip::tcp::socket(ioc);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -159,6 +157,7 @@ void test()
socket1.connect(sp::endpoint(), ec);
socket1.async_connect(sp::endpoint(), connect_handler);
+ socket1.async_connect(sp::endpoint(), immediate);
socket1.set_option(socket_option);
socket1.set_option(socket_option, ec);
@@ -200,6 +199,12 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
socket1.async_send(null_buffers(), in_flags, send_handler);
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
socket1.receive(buffer(mutable_char_buffer));
socket1.receive(null_buffers());
@@ -213,6 +218,11 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
receive_handler);
socket1.async_receive(null_buffers(), in_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags,
+ immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
socket1.write_some(buffer(mutable_char_buffer));
socket1.write_some(buffer(const_char_buffer));
@@ -224,6 +234,9 @@ void test()
socket1.async_write_some(buffer(mutable_char_buffer), write_some_handler);
socket1.async_write_some(buffer(const_char_buffer), write_some_handler);
socket1.async_write_some(null_buffers(), write_some_handler);
+ socket1.async_write_some(buffer(mutable_char_buffer), immediate);
+ socket1.async_write_some(buffer(const_char_buffer), immediate);
+ socket1.async_write_some(null_buffers(), immediate);
socket1.read_some(buffer(mutable_char_buffer));
socket1.read_some(buffer(mutable_char_buffer), ec);
@@ -231,6 +244,8 @@ void test()
socket1.async_read_some(buffer(mutable_char_buffer), read_some_handler);
socket1.async_read_some(null_buffers(), read_some_handler);
+ socket1.async_read_some(buffer(mutable_char_buffer), immediate);
+ socket1.async_read_some(null_buffers(), immediate);
}
catch (std::exception&)
{
@@ -244,5 +259,5 @@ void test()
ASIO_TEST_SUITE
(
"generic/stream_protocol",
- ASIO_TEST_CASE(generic_stream_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(generic_stream_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/high_resolution_timer.cpp b/3rdparty/asio/src/tests/unit/high_resolution_timer.cpp
index d47717c98ab..b8dd448c321 100644
--- a/3rdparty/asio/src/tests/unit/high_resolution_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/high_resolution_timer.cpp
@@ -2,7 +2,7 @@
// high_resolution_timer.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/io_context.cpp b/3rdparty/asio/src/tests/unit/io_context.cpp
index 9e05fd9f78f..4341fb62e1e 100644
--- a/3rdparty/asio/src/tests/unit/io_context.cpp
+++ b/3rdparty/asio/src/tests/unit/io_context.cpp
@@ -2,7 +2,7 @@
// io_context.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,6 +16,7 @@
// Test that header file is self-contained.
#include "asio/io_context.hpp"
+#include <functional>
#include <sstream>
#include "asio/bind_executor.hpp"
#include "asio/dispatch.hpp"
@@ -29,24 +30,13 @@
# include "asio/steady_timer.hpp"
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
#if defined(ASIO_HAS_BOOST_DATE_TIME)
typedef deadline_timer timer;
namespace chronons = boost::posix_time;
-#elif defined(ASIO_HAS_CHRONO)
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
typedef steady_timer timer;
namespace chronons = asio::chrono;
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
@@ -409,8 +399,7 @@ void io_context_executor_execute_test()
io_context ioc;
int count = 0;
- asio::execution::execute(ioc.get_executor(),
- bindns::bind(increment, &count));
+ ioc.get_executor().execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -424,10 +413,9 @@ void io_context_executor_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::require(ioc.get_executor(),
- asio::execution::blocking.possibly),
- bindns::bind(increment, &count));
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.possibly
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -441,10 +429,9 @@ void io_context_executor_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::require(ioc.get_executor(),
- asio::execution::blocking.never),
- bindns::bind(increment, &count));
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -460,11 +447,10 @@ void io_context_executor_execute_test()
ioc.restart();
ASIO_CHECK(!ioc.stopped());
- asio::execution::execute(
- asio::require(ioc.get_executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.tracked),
- bindns::bind(increment, &count));
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.tracked
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -478,11 +464,10 @@ void io_context_executor_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::require(ioc.get_executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked),
- bindns::bind(increment, &count));
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -496,12 +481,11 @@ void io_context_executor_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::require(ioc.get_executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.fork),
- bindns::bind(increment, &count));
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.fork
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -515,12 +499,11 @@ void io_context_executor_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::require(ioc.get_executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- bindns::bind(increment, &count));
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -534,14 +517,13 @@ void io_context_executor_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::prefer(
- asio::require(ioc.get_executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator(std::allocator<void>())),
- bindns::bind(increment, &count));
+ asio::prefer(
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator(std::allocator<void>())
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -555,14 +537,13 @@ void io_context_executor_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::prefer(
- asio::require(ioc.get_executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator),
- bindns::bind(increment, &count));
+ asio::prefer(
+ asio::require(ioc.get_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
diff --git a/3rdparty/asio/src/tests/unit/io_context_strand.cpp b/3rdparty/asio/src/tests/unit/io_context_strand.cpp
index 45cb943eb23..be03eb40dd2 100644
--- a/3rdparty/asio/src/tests/unit/io_context_strand.cpp
+++ b/3rdparty/asio/src/tests/unit/io_context_strand.cpp
@@ -2,7 +2,7 @@
// io_context_strand.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,6 +16,7 @@
// Test that header file is self-contained.
#include "asio/io_context_strand.hpp"
+#include <functional>
#include <sstream>
#include "asio/io_context.hpp"
#include "asio/dispatch.hpp"
@@ -29,24 +30,14 @@
# include "asio/steady_timer.hpp"
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
#if defined(ASIO_HAS_BOOST_DATE_TIME)
typedef deadline_timer timer;
namespace chronons = boost::posix_time;
-#elif defined(ASIO_HAS_CHRONO)
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
typedef steady_timer timer;
namespace chronons = asio::chrono;
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
diff --git a/3rdparty/asio/src/tests/unit/ip/address.cpp b/3rdparty/asio/src/tests/unit/ip/address.cpp
index 1a7024d5d53..a13a343c8e9 100644
--- a/3rdparty/asio/src/tests/unit/ip/address.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address.cpp
@@ -2,7 +2,7 @@
// address.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -128,10 +128,8 @@ void test()
wos << addr1;
#endif // !defined(BOOST_NO_STD_WSTREAMBUF)
-#if defined(ASIO_HAS_STD_HASH)
std::size_t hash1 = std::hash<ip::address>()(addr1);
(void)hash1;
-#endif // defined(ASIO_HAS_STD_HASH)
}
catch (std::exception&)
{
@@ -145,5 +143,5 @@ void test()
ASIO_TEST_SUITE
(
"ip/address",
- ASIO_TEST_CASE(ip_address_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_address_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v4.cpp b/3rdparty/asio/src/tests/unit/ip/address_v4.cpp
index 8885f469d48..6fb361b9544 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v4.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v4.cpp
@@ -2,7 +2,7 @@
// address_v4.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -324,6 +324,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/address_v4",
- ASIO_TEST_CASE(ip_address_v4_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_address_v4_compile::test)
ASIO_TEST_CASE(ip_address_v4_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v4_iterator.cpp b/3rdparty/asio/src/tests/unit/ip/address_v4_iterator.cpp
index babcaeae268..8b651b52582 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v4_iterator.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v4_iterator.cpp
@@ -2,7 +2,7 @@
// address_v4_iterator.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v4_range.cpp b/3rdparty/asio/src/tests/unit/ip/address_v4_range.cpp
index 0733c18d089..1b36744cb53 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v4_range.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v4_range.cpp
@@ -2,7 +2,7 @@
// address_v4_range.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v6.cpp b/3rdparty/asio/src/tests/unit/ip/address_v6.cpp
index 8d5ee8a0965..026c5fa4f9a 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v6.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v6.cpp
@@ -2,7 +2,7 @@
// address_v6.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -409,6 +409,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/address_v6",
- ASIO_TEST_CASE(ip_address_v6_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_address_v6_compile::test)
ASIO_TEST_CASE(ip_address_v6_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v6_iterator.cpp b/3rdparty/asio/src/tests/unit/ip/address_v6_iterator.cpp
index c2a37dea8e2..ef62dc645c2 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v6_iterator.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v6_iterator.cpp
@@ -2,7 +2,7 @@
// address_v6_iterator.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/address_v6_range.cpp b/3rdparty/asio/src/tests/unit/ip/address_v6_range.cpp
index 1dbc6808c5c..b0477214d7e 100644
--- a/3rdparty/asio/src/tests/unit/ip/address_v6_range.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/address_v6_range.cpp
@@ -2,7 +2,7 @@
// address_v6_range.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/basic_endpoint.cpp b/3rdparty/asio/src/tests/unit/ip/basic_endpoint.cpp
index 7fc95dc246d..d4aadb6febc 100644
--- a/3rdparty/asio/src/tests/unit/ip/basic_endpoint.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/basic_endpoint.cpp
@@ -2,7 +2,7 @@
// basic_endpoint.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/basic_resolver.cpp b/3rdparty/asio/src/tests/unit/ip/basic_resolver.cpp
index a0d6d3e3353..698a2bad25f 100644
--- a/3rdparty/asio/src/tests/unit/ip/basic_resolver.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/basic_resolver.cpp
@@ -2,7 +2,7 @@
// basic_resolver.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/basic_resolver_entry.cpp b/3rdparty/asio/src/tests/unit/ip/basic_resolver_entry.cpp
index cdd4e567757..7de5b6fc2c0 100644
--- a/3rdparty/asio/src/tests/unit/ip/basic_resolver_entry.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/basic_resolver_entry.cpp
@@ -2,7 +2,7 @@
// basic_resolver_entry.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/basic_resolver_iterator.cpp b/3rdparty/asio/src/tests/unit/ip/basic_resolver_iterator.cpp
index 7fcf85732d7..df7a54a79af 100644
--- a/3rdparty/asio/src/tests/unit/ip/basic_resolver_iterator.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/basic_resolver_iterator.cpp
@@ -2,7 +2,7 @@
// basic_resolver_iterator.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/basic_resolver_query.cpp b/3rdparty/asio/src/tests/unit/ip/basic_resolver_query.cpp
index ebdb6aa5f2f..6d10e449482 100644
--- a/3rdparty/asio/src/tests/unit/ip/basic_resolver_query.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/basic_resolver_query.cpp
@@ -2,7 +2,7 @@
// basic_resolver_query.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/host_name.cpp b/3rdparty/asio/src/tests/unit/ip/host_name.cpp
index 61a2d8a24d1..6972cbf6f4a 100644
--- a/3rdparty/asio/src/tests/unit/ip/host_name.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/host_name.cpp
@@ -2,7 +2,7 @@
// host_name.cpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -51,5 +51,5 @@ void test()
ASIO_TEST_SUITE
(
"ip/host_name",
- ASIO_TEST_CASE(ip_host_name_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_host_name_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/icmp.cpp b/3rdparty/asio/src/tests/unit/ip/icmp.cpp
index 644e7bb9cde..ec60267b30f 100644
--- a/3rdparty/asio/src/tests/unit/ip/icmp.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/icmp.cpp
@@ -2,7 +2,7 @@
// icmp.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -38,33 +38,27 @@ struct connect_handler
{
connect_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
connect_handler(connect_handler&&) {}
private:
connect_handler(const connect_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct send_handler
{
send_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
send_handler(send_handler&&) {}
private:
send_handler(const send_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct receive_handler
{
receive_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
receive_handler(receive_handler&&) {}
private:
receive_handler(const receive_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -86,6 +80,7 @@ void test()
archetypes::gettable_socket_option<int> gettable_socket_option2;
archetypes::gettable_socket_option<double> gettable_socket_option3;
archetypes::io_control_command io_control_command;
+ archetypes::immediate_handler immediate;
archetypes::lazy_handler lazy;
asio::error_code ec;
@@ -113,16 +108,12 @@ void test()
ip::icmp::socket socket12(ioc_ex, ip::icmp::v4(), native_socket2);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
ip::icmp::socket socket13(std::move(socket6));
-#endif // defined(ASIO_HAS_MOVE)
// basic_datagram_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = ip::icmp::socket(ioc);
socket1 = std::move(socket2);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -193,6 +184,8 @@ void test()
connect_handler());
socket1.async_connect(ip::icmp::endpoint(ip::icmp::v6(), 0),
connect_handler());
+ socket1.async_connect(ip::icmp::endpoint(ip::icmp::v4(), 0), immediate);
+ socket1.async_connect(ip::icmp::endpoint(ip::icmp::v6(), 0), immediate);
int i1 = socket1.async_connect(ip::icmp::endpoint(ip::icmp::v4(), 0), lazy);
(void)i1;
int i2 = socket1.async_connect(ip::icmp::endpoint(ip::icmp::v6(), 0), lazy);
@@ -256,6 +249,12 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler());
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler());
socket1.async_send(null_buffers(), in_flags, send_handler());
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
int i3 = socket1.async_send(buffer(mutable_char_buffer), lazy);
(void)i3;
int i4 = socket1.async_send(buffer(const_char_buffer), lazy);
@@ -330,6 +329,30 @@ void test()
ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, send_handler());
socket1.async_send_to(null_buffers(),
ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, send_handler());
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::icmp::endpoint(ip::icmp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::icmp::endpoint(ip::icmp::v6(), 0), in_flags, immediate);
int i9 = socket1.async_send_to(buffer(mutable_char_buffer),
ip::icmp::endpoint(ip::icmp::v4(), 0), lazy);
(void)i9;
@@ -379,6 +402,10 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
receive_handler());
socket1.async_receive(null_buffers(), in_flags, receive_handler());
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
int i21 = socket1.async_receive(buffer(mutable_char_buffer), lazy);
(void)i21;
int i22 = socket1.async_receive(null_buffers(), lazy);
@@ -405,6 +432,14 @@ void test()
endpoint, in_flags, receive_handler());
socket1.async_receive_from(null_buffers(),
endpoint, in_flags, receive_handler());
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, immediate);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, in_flags, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, in_flags, immediate);
int i25 = socket1.async_receive_from(buffer(mutable_char_buffer),
endpoint, lazy);
(void)i25;
@@ -439,11 +474,9 @@ struct resolve_handler
resolve_handler() {}
void operator()(const asio::error_code&,
asio::ip::icmp::resolver::results_type) {}
-#if defined(ASIO_HAS_MOVE)
resolve_handler(resolve_handler&&) {}
private:
resolve_handler(const resolve_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -467,16 +500,12 @@ void test()
ip::icmp::resolver resolver(ioc);
ip::icmp::resolver resolver2(ioc_ex);
-#if defined(ASIO_HAS_MOVE)
ip::icmp::resolver resolver3(std::move(resolver));
-#endif // defined(ASIO_HAS_MOVE)
// basic_resolver operators.
-#if defined(ASIO_HAS_MOVE)
resolver = ip::icmp::resolver(ioc);
resolver = std::move(resolver3);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -572,6 +601,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/icmp",
- ASIO_TEST_CASE(ip_icmp_socket_compile::test)
- ASIO_TEST_CASE(ip_icmp_resolver_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_icmp_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_icmp_resolver_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/multicast.cpp b/3rdparty/asio/src/tests/unit/ip/multicast.cpp
index 7d8a9e7bc33..4f0b3f45e14 100644
--- a/3rdparty/asio/src/tests/unit/ip/multicast.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/multicast.cpp
@@ -2,7 +2,7 @@
// multicast.cpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -358,6 +358,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/multicast",
- ASIO_TEST_CASE(ip_multicast_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_multicast_compile::test)
ASIO_TEST_CASE(ip_multicast_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/network_v4.cpp b/3rdparty/asio/src/tests/unit/ip/network_v4.cpp
index 06fb34d0dbd..0b7a7a9c783 100644
--- a/3rdparty/asio/src/tests/unit/ip/network_v4.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/network_v4.cpp
@@ -2,7 +2,7 @@
// network_v4.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -309,6 +309,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/network_v4",
- ASIO_TEST_CASE(ip_network_v4_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_network_v4_compile::test)
ASIO_TEST_CASE(ip_network_v4_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/network_v6.cpp b/3rdparty/asio/src/tests/unit/ip/network_v6.cpp
index e1c7bcff6b4..d80b1d447b6 100644
--- a/3rdparty/asio/src/tests/unit/ip/network_v6.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/network_v6.cpp
@@ -2,7 +2,7 @@
// network_v6.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -233,6 +233,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/network_v6",
- ASIO_TEST_CASE(ip_network_v6_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_network_v6_compile::test)
ASIO_TEST_CASE(ip_network_v6_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/resolver_query_base.cpp b/3rdparty/asio/src/tests/unit/ip/resolver_query_base.cpp
index c59d75237ed..b38f5091b53 100644
--- a/3rdparty/asio/src/tests/unit/ip/resolver_query_base.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/resolver_query_base.cpp
@@ -2,7 +2,7 @@
// resolver_query_base.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ip/tcp.cpp b/3rdparty/asio/src/tests/unit/ip/tcp.cpp
index 4b7208a221b..2bbdc3a1071 100644
--- a/3rdparty/asio/src/tests/unit/ip/tcp.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/tcp.cpp
@@ -2,7 +2,7 @@
// tcp.cpp
// ~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -20,6 +20,7 @@
#include "asio/ip/tcp.hpp"
#include <cstring>
+#include <functional>
#include "asio/io_context.hpp"
#include "asio/read.hpp"
#include "asio/write.hpp"
@@ -35,12 +36,6 @@
# include <array>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
//------------------------------------------------------------------------------
// ip_tcp_compile test
@@ -71,10 +66,8 @@ void test()
(void)static_cast<bool>(!no_delay1);
(void)static_cast<bool>(no_delay1.value());
-#if defined(ASIO_HAS_STD_HASH)
ip::tcp::endpoint ep;
(void)static_cast<std::size_t>(std::hash<ip::tcp::endpoint>()(ep));
-#endif // defined(ASIO_HAS_STD_HASH)
}
catch (std::exception&)
{
@@ -146,66 +139,54 @@ struct connect_handler
{
connect_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
connect_handler(connect_handler&&) {}
private:
connect_handler(const connect_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct wait_handler
{
wait_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
wait_handler(wait_handler&&) {}
private:
wait_handler(const wait_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct send_handler
{
send_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
send_handler(send_handler&&) {}
private:
send_handler(const send_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct receive_handler
{
receive_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
receive_handler(receive_handler&&) {}
private:
receive_handler(const receive_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct write_some_handler
{
write_some_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
write_some_handler(write_some_handler&&) {}
private:
write_some_handler(const write_some_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct read_some_handler
{
read_some_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
read_some_handler(read_some_handler&&) {}
private:
read_some_handler(const read_some_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -239,6 +220,7 @@ void test()
archetypes::gettable_socket_option<int> gettable_socket_option2;
archetypes::gettable_socket_option<double> gettable_socket_option3;
archetypes::io_control_command io_control_command;
+ archetypes::immediate_handler immediate;
archetypes::lazy_handler lazy;
asio::error_code ec;
@@ -266,16 +248,12 @@ void test()
ip::tcp::socket socket12(ioc_ex, ip::tcp::v4(), native_socket2);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
ip::tcp::socket socket13(std::move(socket5));
-#endif // defined(ASIO_HAS_MOVE)
// basic_stream_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = ip::tcp::socket(ioc);
socket1 = std::move(socket2);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -346,6 +324,8 @@ void test()
connect_handler());
socket1.async_connect(ip::tcp::endpoint(ip::tcp::v6(), 0),
connect_handler());
+ socket1.async_connect(ip::tcp::endpoint(ip::tcp::v4(), 0), immediate);
+ socket1.async_connect(ip::tcp::endpoint(ip::tcp::v6(), 0), immediate);
int i1 = socket1.async_connect(ip::tcp::endpoint(ip::tcp::v4(), 0), lazy);
(void)i1;
int i2 = socket1.async_connect(ip::tcp::endpoint(ip::tcp::v6(), 0), lazy);
@@ -395,6 +375,7 @@ void test()
socket1.wait(socket_base::wait_write, ec);
socket1.async_wait(socket_base::wait_read, wait_handler());
+ socket1.async_wait(socket_base::wait_read, immediate);
int i3 = socket1.async_wait(socket_base::wait_write, lazy);
(void)i3;
@@ -426,6 +407,16 @@ void test()
socket1.async_send(mutable_buffers, in_flags, send_handler());
socket1.async_send(const_buffers, in_flags, send_handler());
socket1.async_send(null_buffers(), in_flags, send_handler());
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(mutable_buffers, immediate);
+ socket1.async_send(const_buffers, immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(mutable_buffers, in_flags, immediate);
+ socket1.async_send(const_buffers, in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
int i4 = socket1.async_send(buffer(mutable_char_buffer), lazy);
(void)i4;
int i5 = socket1.async_send(buffer(const_char_buffer), lazy);
@@ -464,6 +455,12 @@ void test()
receive_handler());
socket1.async_receive(mutable_buffers, in_flags, receive_handler());
socket1.async_receive(null_buffers(), in_flags, receive_handler());
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(mutable_buffers, immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_receive(mutable_buffers, in_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
int i14 = socket1.async_receive(buffer(mutable_char_buffer), lazy);
(void)i14;
int i15 = socket1.async_receive(mutable_buffers, lazy);
@@ -494,6 +491,11 @@ void test()
socket1.async_write_some(mutable_buffers, write_some_handler());
socket1.async_write_some(const_buffers, write_some_handler());
socket1.async_write_some(null_buffers(), write_some_handler());
+ socket1.async_write_some(buffer(mutable_char_buffer), immediate);
+ socket1.async_write_some(buffer(const_char_buffer), immediate);
+ socket1.async_write_some(mutable_buffers, immediate);
+ socket1.async_write_some(const_buffers, immediate);
+ socket1.async_write_some(null_buffers(), immediate);
int i20 = socket1.async_write_some(buffer(mutable_char_buffer), lazy);
(void)i20;
int i21 = socket1.async_write_some(buffer(const_char_buffer), lazy);
@@ -515,6 +517,9 @@ void test()
socket1.async_read_some(buffer(mutable_char_buffer), read_some_handler());
socket1.async_read_some(mutable_buffers, read_some_handler());
socket1.async_read_some(null_buffers(), read_some_handler());
+ socket1.async_read_some(buffer(mutable_char_buffer), immediate);
+ socket1.async_read_some(mutable_buffers, immediate);
+ socket1.async_read_some(null_buffers(), immediate);
int i25 = socket1.async_read_some(buffer(mutable_char_buffer), lazy);
(void)i25;
int i26 = socket1.async_read_some(mutable_buffers, lazy);
@@ -594,11 +599,7 @@ void test()
using namespace asio;
namespace ip = asio::ip;
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -706,25 +707,20 @@ struct wait_handler
{
wait_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
wait_handler(wait_handler&&) {}
private:
wait_handler(const wait_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct accept_handler
{
accept_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
accept_handler(accept_handler&&) {}
private:
accept_handler(const accept_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
-#if defined(ASIO_HAS_MOVE)
struct move_accept_handler
{
move_accept_handler() {}
@@ -745,7 +741,6 @@ struct move_accept_ioc_handler
private:
move_accept_ioc_handler(const move_accept_handler&) {}
};
-#endif // defined(ASIO_HAS_MOVE)
void test()
{
@@ -767,6 +762,7 @@ void test()
archetypes::gettable_socket_option<int> gettable_socket_option2;
archetypes::gettable_socket_option<double> gettable_socket_option3;
archetypes::io_control_command io_control_command;
+ archetypes::immediate_handler immediate;
archetypes::lazy_handler lazy;
asio::error_code ec;
@@ -794,16 +790,12 @@ void test()
ip::tcp::acceptor acceptor12(ioc_ex, ip::tcp::v4(), native_acceptor2);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
ip::tcp::acceptor acceptor13(std::move(acceptor5));
-#endif // defined(ASIO_HAS_MOVE)
// basic_socket_acceptor operators.
-#if defined(ASIO_HAS_MOVE)
acceptor1 = ip::tcp::acceptor(ioc);
acceptor1 = std::move(acceptor2);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -883,6 +875,7 @@ void test()
acceptor1.wait(socket_base::wait_write, ec);
acceptor1.async_wait(socket_base::wait_read, wait_handler());
+ acceptor1.async_wait(socket_base::wait_read, immediate);
int i1 = acceptor1.async_wait(socket_base::wait_write, lazy);
(void)i1;
@@ -896,7 +889,6 @@ void test()
acceptor1.accept(peer_socket2, peer_endpoint);
acceptor1.accept(peer_socket2, peer_endpoint, ec);
-#if defined(ASIO_HAS_MOVE)
peer_socket1 = acceptor1.accept();
peer_socket1 = acceptor1.accept(ioc);
peer_socket1 = acceptor1.accept(ioc_ex);
@@ -910,10 +902,11 @@ void test()
peer_socket2 = acceptor1.accept(ioc, peer_endpoint);
peer_socket2 = acceptor1.accept(ioc_ex, peer_endpoint);
(void)peer_socket2;
-#endif // defined(ASIO_HAS_MOVE)
acceptor1.async_accept(peer_socket1, accept_handler());
acceptor1.async_accept(peer_socket1, peer_endpoint, accept_handler());
+ acceptor1.async_accept(peer_socket1, immediate);
+ acceptor1.async_accept(peer_socket1, peer_endpoint, immediate);
int i2 = acceptor1.async_accept(peer_socket1, lazy);
(void)i2;
int i3 = acceptor1.async_accept(peer_socket1, peer_endpoint, lazy);
@@ -921,12 +914,13 @@ void test()
acceptor1.async_accept(peer_socket2, accept_handler());
acceptor1.async_accept(peer_socket2, peer_endpoint, accept_handler());
+ acceptor1.async_accept(peer_socket2, immediate);
+ acceptor1.async_accept(peer_socket2, peer_endpoint, immediate);
int i4 = acceptor1.async_accept(peer_socket2, lazy);
(void)i4;
int i5 = acceptor1.async_accept(peer_socket2, peer_endpoint, lazy);
(void)i5;
-#if defined(ASIO_HAS_MOVE)
acceptor1.async_accept(move_accept_handler());
acceptor1.async_accept(ioc, move_accept_handler());
acceptor1.async_accept(ioc_ex, move_accept_handler());
@@ -935,7 +929,12 @@ void test()
acceptor1.async_accept(ioc, peer_endpoint, move_accept_handler());
acceptor1.async_accept(ioc_ex, peer_endpoint, move_accept_handler());
acceptor1.async_accept(ioc_ex, peer_endpoint, move_accept_ioc_handler());
-#endif // defined(ASIO_HAS_MOVE)
+ acceptor1.async_accept(immediate);
+ acceptor1.async_accept(ioc, immediate);
+ acceptor1.async_accept(ioc_ex, immediate);
+ acceptor1.async_accept(peer_endpoint, immediate);
+ acceptor1.async_accept(ioc, peer_endpoint, immediate);
+ acceptor1.async_accept(ioc_ex, peer_endpoint, immediate);
}
catch (std::exception&)
{
@@ -1037,11 +1036,9 @@ struct resolve_handler
resolve_handler() {}
void operator()(const asio::error_code&,
asio::ip::tcp::resolver::results_type) {}
-#if defined(ASIO_HAS_MOVE)
resolve_handler(resolve_handler&&) {}
private:
resolve_handler(const resolve_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
#if !defined(ASIO_NO_DEPRECATED)
@@ -1050,11 +1047,9 @@ struct legacy_resolve_handler
legacy_resolve_handler() {}
void operator()(const asio::error_code&,
asio::ip::tcp::resolver::iterator) {}
-#if defined(ASIO_HAS_MOVE)
legacy_resolve_handler(legacy_resolve_handler&&) {}
private:
legacy_resolve_handler(const legacy_resolve_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
#endif // !defined(ASIO_NO_DEPRECATED)
@@ -1079,16 +1074,12 @@ void test()
ip::tcp::resolver resolver(ioc);
ip::tcp::resolver resolver2(ioc_ex);
-#if defined(ASIO_HAS_MOVE)
ip::tcp::resolver resolver3(std::move(resolver));
-#endif // defined(ASIO_HAS_MOVE)
// basic_resolver operators.
-#if defined(ASIO_HAS_MOVE)
resolver = ip::tcp::resolver(ioc);
resolver = std::move(resolver3);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -1224,9 +1215,7 @@ void test()
const ip::basic_resolver_entry<ip::tcp> entry1;
ip::basic_resolver_entry<ip::tcp> entry2(endpoint, host_name, service_name);
ip::basic_resolver_entry<ip::tcp> entry3(entry1);
-#if defined(ASIO_HAS_MOVE)
ip::basic_resolver_entry<ip::tcp> entry4(std::move(entry2));
-#endif // defined(ASIO_HAS_MOVE)
// basic_resolver_entry functions.
@@ -1287,19 +1276,15 @@ void test()
ip::tcp::iostream ios1;
-#if defined(ASIO_HAS_STD_IOSTREAM_MOVE)
ip::tcp::iostream ios2(std::move(sock));
-#endif // defined(ASIO_HAS_STD_IOSTREAM_MOVE)
ip::tcp::iostream ios3("hostname", "service");
// basic_socket_iostream operators.
-#if defined(ASIO_HAS_STD_IOSTREAM_MOVE)
ios1 = ip::tcp::iostream();
ios2 = std::move(ios1);
-#endif // defined(ASIO_HAS_STD_IOSTREAM_MOVE)
// basic_socket_iostream members.
@@ -1338,14 +1323,14 @@ void test()
ASIO_TEST_SUITE
(
"ip/tcp",
- ASIO_TEST_CASE(ip_tcp_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_compile::test)
ASIO_TEST_CASE(ip_tcp_runtime::test)
- ASIO_TEST_CASE(ip_tcp_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_socket_compile::test)
ASIO_TEST_CASE(ip_tcp_socket_runtime::test)
- ASIO_TEST_CASE(ip_tcp_acceptor_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_acceptor_compile::test)
ASIO_TEST_CASE(ip_tcp_acceptor_runtime::test)
- ASIO_TEST_CASE(ip_tcp_resolver_compile::test)
- ASIO_TEST_CASE(ip_tcp_resolver_entry_compile::test)
- ASIO_TEST_CASE(ip_tcp_resolver_entry_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_resolver_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_resolver_entry_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_tcp_resolver_entry_compile::test)
ASIO_COMPILE_TEST_CASE(ip_tcp_iostream_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/udp.cpp b/3rdparty/asio/src/tests/unit/ip/udp.cpp
index 507931d098e..ae67f9c9c73 100644
--- a/3rdparty/asio/src/tests/unit/ip/udp.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/udp.cpp
@@ -2,7 +2,7 @@
// udp.cpp
// ~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,6 +17,7 @@
#include "asio/ip/udp.hpp"
#include <cstring>
+#include <functional>
#include "asio/io_context.hpp"
#include "../unit_test.hpp"
#include "../archetypes/async_result.hpp"
@@ -24,12 +25,6 @@
#include "../archetypes/io_control_command.hpp"
#include "../archetypes/settable_socket_option.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
//------------------------------------------------------------------------------
// ip_udp_socket_compile test
@@ -43,44 +38,36 @@ struct connect_handler
{
connect_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
connect_handler(connect_handler&&) {}
private:
connect_handler(const connect_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct wait_handler
{
wait_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
wait_handler(wait_handler&&) {}
private:
wait_handler(const wait_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct send_handler
{
send_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
send_handler(send_handler&&) {}
private:
send_handler(const send_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct receive_handler
{
receive_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
receive_handler(receive_handler&&) {}
private:
receive_handler(const receive_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -102,6 +89,7 @@ void test()
archetypes::gettable_socket_option<int> gettable_socket_option2;
archetypes::gettable_socket_option<double> gettable_socket_option3;
archetypes::io_control_command io_control_command;
+ archetypes::immediate_handler immediate;
archetypes::lazy_handler lazy;
asio::error_code ec;
@@ -129,16 +117,12 @@ void test()
ip::udp::socket socket12(ioc_ex, ip::udp::v4(), native_socket2);
#endif // !defined(ASIO_WINDOWS_RUNTIME)
-#if defined(ASIO_HAS_MOVE)
ip::udp::socket socket13(std::move(socket6));
-#endif // defined(ASIO_HAS_MOVE)
// basic_datagram_socket operators.
-#if defined(ASIO_HAS_MOVE)
socket1 = ip::udp::socket(ioc);
socket1 = std::move(socket2);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -209,6 +193,8 @@ void test()
connect_handler());
socket1.async_connect(ip::udp::endpoint(ip::udp::v6(), 0),
connect_handler());
+ socket1.async_connect(ip::udp::endpoint(ip::udp::v4(), 0), immediate);
+ socket1.async_connect(ip::udp::endpoint(ip::udp::v6(), 0), immediate);
int i1 = socket1.async_connect(ip::udp::endpoint(ip::udp::v4(), 0), lazy);
(void)i1;
int i2 = socket1.async_connect(ip::udp::endpoint(ip::udp::v6(), 0), lazy);
@@ -258,6 +244,7 @@ void test()
socket1.wait(socket_base::wait_write, ec);
socket1.async_wait(socket_base::wait_read, wait_handler());
+ socket1.async_wait(socket_base::wait_read, immediate);
int i3 = socket1.async_wait(socket_base::wait_write, lazy);
(void)i3;
@@ -279,6 +266,12 @@ void test()
socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler());
socket1.async_send(buffer(const_char_buffer), in_flags, send_handler());
socket1.async_send(null_buffers(), in_flags, send_handler());
+ socket1.async_send(buffer(mutable_char_buffer), immediate);
+ socket1.async_send(buffer(const_char_buffer), immediate);
+ socket1.async_send(null_buffers(), immediate);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
int i4 = socket1.async_send(buffer(mutable_char_buffer), lazy);
(void)i4;
int i5 = socket1.async_send(buffer(const_char_buffer), lazy);
@@ -353,6 +346,30 @@ void test()
ip::udp::endpoint(ip::udp::v4(), 0), in_flags, send_handler());
socket1.async_send_to(null_buffers(),
ip::udp::endpoint(ip::udp::v6(), 0), in_flags, send_handler());
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::udp::endpoint(ip::udp::v4(), 0), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::udp::endpoint(ip::udp::v6(), 0), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::udp::endpoint(ip::udp::v4(), 0), immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::udp::endpoint(ip::udp::v6(), 0), immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v4(), 0), immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v6(), 0), immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::udp::endpoint(ip::udp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(mutable_char_buffer),
+ ip::udp::endpoint(ip::udp::v6(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::udp::endpoint(ip::udp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(buffer(const_char_buffer),
+ ip::udp::endpoint(ip::udp::v6(), 0), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v4(), 0), in_flags, immediate);
+ socket1.async_send_to(null_buffers(),
+ ip::udp::endpoint(ip::udp::v6(), 0), in_flags, immediate);
int i10 = socket1.async_send_to(buffer(mutable_char_buffer),
ip::udp::endpoint(ip::udp::v4(), 0), lazy);
(void)i10;
@@ -402,6 +419,10 @@ void test()
socket1.async_receive(buffer(mutable_char_buffer), in_flags,
receive_handler());
socket1.async_receive(null_buffers(), in_flags, receive_handler());
+ socket1.async_receive(buffer(mutable_char_buffer), immediate);
+ socket1.async_receive(null_buffers(), immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, immediate);
int i22 = socket1.async_receive(buffer(mutable_char_buffer), lazy);
(void)i22;
int i23 = socket1.async_receive(null_buffers(), lazy);
@@ -428,6 +449,14 @@ void test()
endpoint, in_flags, receive_handler());
socket1.async_receive_from(null_buffers(),
endpoint, in_flags, receive_handler());
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, immediate);
+ socket1.async_receive_from(buffer(mutable_char_buffer),
+ endpoint, in_flags, immediate);
+ socket1.async_receive_from(null_buffers(),
+ endpoint, in_flags, immediate);
int i26 = socket1.async_receive_from(buffer(mutable_char_buffer),
endpoint, lazy);
(void)i26;
@@ -476,11 +505,7 @@ void test()
using namespace asio;
namespace ip = asio::ip;
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -533,11 +558,9 @@ struct resolve_handler
resolve_handler() {}
void operator()(const asio::error_code&,
asio::ip::udp::resolver::results_type) {}
-#if defined(ASIO_HAS_MOVE)
resolve_handler(resolve_handler&&) {}
private:
resolve_handler(const resolve_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -561,16 +584,12 @@ void test()
ip::udp::resolver resolver(ioc);
ip::udp::resolver resolver2(ioc_ex);
-#if defined(ASIO_HAS_MOVE)
ip::udp::resolver resolver3(std::move(resolver));
-#endif // defined(ASIO_HAS_MOVE)
// basic_resolver operators.
-#if defined(ASIO_HAS_MOVE)
resolver = ip::udp::resolver(ioc);
resolver = std::move(resolver3);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -667,7 +686,7 @@ void test()
ASIO_TEST_SUITE
(
"ip/udp",
- ASIO_TEST_CASE(ip_udp_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_udp_socket_compile::test)
ASIO_TEST_CASE(ip_udp_socket_runtime::test)
- ASIO_TEST_CASE(ip_udp_resolver_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_udp_resolver_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/unicast.cpp b/3rdparty/asio/src/tests/unit/ip/unicast.cpp
index 84f1a8dc8b0..db3497f6e1c 100644
--- a/3rdparty/asio/src/tests/unit/ip/unicast.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/unicast.cpp
@@ -2,7 +2,7 @@
// unicast.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -166,6 +166,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/unicast",
- ASIO_TEST_CASE(ip_unicast_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_unicast_compile::test)
ASIO_TEST_CASE(ip_unicast_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ip/v6_only.cpp b/3rdparty/asio/src/tests/unit/ip/v6_only.cpp
index 9a6bb69c250..ba37fdb3954 100644
--- a/3rdparty/asio/src/tests/unit/ip/v6_only.cpp
+++ b/3rdparty/asio/src/tests/unit/ip/v6_only.cpp
@@ -2,7 +2,7 @@
// v6_only.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -130,6 +130,6 @@ void test()
ASIO_TEST_SUITE
(
"ip/v6_only",
- ASIO_TEST_CASE(ip_v6_only_compile::test)
+ ASIO_COMPILE_TEST_CASE(ip_v6_only_compile::test)
ASIO_TEST_CASE(ip_v6_only_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/is_read_buffered.cpp b/3rdparty/asio/src/tests/unit/is_read_buffered.cpp
index 9f1d2069dc1..031cd0fb34d 100644
--- a/3rdparty/asio/src/tests/unit/is_read_buffered.cpp
+++ b/3rdparty/asio/src/tests/unit/is_read_buffered.cpp
@@ -2,7 +2,7 @@
// is_read_buffered.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/is_write_buffered.cpp b/3rdparty/asio/src/tests/unit/is_write_buffered.cpp
index eff1a35a0f7..df7a9c86d79 100644
--- a/3rdparty/asio/src/tests/unit/is_write_buffered.cpp
+++ b/3rdparty/asio/src/tests/unit/is_write_buffered.cpp
@@ -2,7 +2,7 @@
// is_write_buffered.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/local/basic_endpoint.cpp b/3rdparty/asio/src/tests/unit/local/basic_endpoint.cpp
index 163bb7a1c1d..855888e52c9 100644
--- a/3rdparty/asio/src/tests/unit/local/basic_endpoint.cpp
+++ b/3rdparty/asio/src/tests/unit/local/basic_endpoint.cpp
@@ -2,7 +2,7 @@
// basic_endpoint.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/local/connect_pair.cpp b/3rdparty/asio/src/tests/unit/local/connect_pair.cpp
index 8dfb38e3083..095a0d89696 100644
--- a/3rdparty/asio/src/tests/unit/local/connect_pair.cpp
+++ b/3rdparty/asio/src/tests/unit/local/connect_pair.cpp
@@ -2,7 +2,7 @@
// connect_pair.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -72,5 +72,5 @@ void test()
ASIO_TEST_SUITE
(
"local/connect_pair",
- ASIO_TEST_CASE(local_connect_pair_compile::test)
+ ASIO_COMPILE_TEST_CASE(local_connect_pair_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp b/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp
index b73a67f02a2..23f677d6723 100644
--- a/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp
@@ -2,7 +2,7 @@
// datagram_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -238,5 +238,5 @@ void test()
ASIO_TEST_SUITE
(
"local/datagram_protocol",
- ASIO_TEST_CASE(local_datagram_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(local_datagram_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/local/seq_packet_protocol.cpp b/3rdparty/asio/src/tests/unit/local/seq_packet_protocol.cpp
new file mode 100644
index 00000000000..00934827aa6
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/local/seq_packet_protocol.cpp
@@ -0,0 +1,209 @@
+//
+// local/seq_packet_protocol.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/local/seq_packet_protocol.hpp"
+
+#include <cstring>
+#include "asio/io_context.hpp"
+#include "../unit_test.hpp"
+#include "../archetypes/async_result.hpp"
+
+#if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
+# define local cpp_local
+#endif
+
+//------------------------------------------------------------------------------
+
+// local_seq_packet_protocol_socket_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all public member functions on the class
+// local::seq_packet_socket::socket compile and link correctly. Runtime
+// failures are ignored.
+
+namespace local_seq_packet_protocol_socket_compile {
+
+void connect_handler(const asio::error_code&)
+{
+}
+
+void send_handler(const asio::error_code&, std::size_t)
+{
+}
+
+void receive_handler(const asio::error_code&, std::size_t)
+{
+}
+
+void test()
+{
+ using namespace asio;
+ namespace local = asio::local;
+ typedef local::seq_packet_protocol spp;
+
+ try
+ {
+ io_context ioc;
+ char mutable_char_buffer[128] = "";
+ const char const_char_buffer[128] = "";
+ const socket_base::message_flags in_flags = 0;
+ socket_base::message_flags out_flags = 0;
+ socket_base::send_buffer_size socket_option;
+ socket_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
+ asio::error_code ec;
+
+ // basic_seq_packet_socket constructors.
+
+ spp::socket socket1(ioc);
+ spp::socket socket2(ioc, spp());
+ spp::socket socket3(ioc, spp::endpoint());
+#if !defined(ASIO_WINDOWS_RUNTIME)
+ spp::socket::native_handle_type native_socket1
+ = ::socket(AF_UNIX, SOCK_SEQPACKET, 0);
+ spp::socket socket4(ioc, spp(), native_socket1);
+#endif // !defined(ASIO_WINDOWS_RUNTIME)
+
+ spp::socket socket5(std::move(socket4));
+
+ // basic_seq_packet_socket operators.
+
+ socket1 = spp::socket(ioc);
+ socket1 = std::move(socket2);
+
+ // basic_io_object functions.
+
+ spp::socket::executor_type ex = socket1.get_executor();
+ (void)ex;
+
+ // basic_socket functions.
+
+ spp::socket::lowest_layer_type& lowest_layer = socket1.lowest_layer();
+ (void)lowest_layer;
+
+ socket1.open(spp());
+ socket1.open(spp(), ec);
+
+#if !defined(ASIO_WINDOWS_RUNTIME)
+ spp::socket::native_handle_type native_socket2
+ = ::socket(AF_UNIX, SOCK_SEQPACKET, 0);
+ socket1.assign(spp(), native_socket2);
+ spp::socket::native_handle_type native_socket3
+ = ::socket(AF_UNIX, SOCK_SEQPACKET, 0);
+ socket1.assign(spp(), native_socket3, ec);
+#endif // !defined(ASIO_WINDOWS_RUNTIME)
+
+ bool is_open = socket1.is_open();
+ (void)is_open;
+
+ socket1.close();
+ socket1.close(ec);
+
+ spp::socket::native_handle_type native_socket4 = socket1.native_handle();
+ (void)native_socket4;
+
+ socket1.cancel();
+ socket1.cancel(ec);
+
+ bool at_mark1 = socket1.at_mark();
+ (void)at_mark1;
+ bool at_mark2 = socket1.at_mark(ec);
+ (void)at_mark2;
+
+ std::size_t available1 = socket1.available();
+ (void)available1;
+ std::size_t available2 = socket1.available(ec);
+ (void)available2;
+
+ socket1.bind(spp::endpoint());
+ socket1.bind(spp::endpoint(), ec);
+
+ socket1.connect(spp::endpoint());
+ socket1.connect(spp::endpoint(), ec);
+
+ socket1.async_connect(spp::endpoint(), connect_handler);
+ socket1.async_connect(spp::endpoint(), immediate);
+
+ socket1.set_option(socket_option);
+ socket1.set_option(socket_option, ec);
+
+ socket1.get_option(socket_option);
+ socket1.get_option(socket_option, ec);
+
+ socket1.io_control(io_control_command);
+ socket1.io_control(io_control_command, ec);
+
+ spp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
+ spp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
+
+ spp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
+ spp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
+
+ socket1.shutdown(socket_base::shutdown_both);
+ socket1.shutdown(socket_base::shutdown_both, ec);
+
+ // basic_seq_packet_socket functions.
+
+ socket1.send(buffer(mutable_char_buffer), in_flags);
+ socket1.send(buffer(const_char_buffer), in_flags);
+ socket1.send(null_buffers(), in_flags);
+ socket1.send(buffer(mutable_char_buffer), in_flags, ec);
+ socket1.send(buffer(const_char_buffer), in_flags, ec);
+ socket1.send(null_buffers(), in_flags, ec);
+
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, send_handler);
+ socket1.async_send(buffer(const_char_buffer), in_flags, send_handler);
+ socket1.async_send(null_buffers(), in_flags, send_handler);
+ socket1.async_send(buffer(mutable_char_buffer), in_flags, immediate);
+ socket1.async_send(buffer(const_char_buffer), in_flags, immediate);
+ socket1.async_send(null_buffers(), in_flags, immediate);
+
+ socket1.receive(buffer(mutable_char_buffer), out_flags);
+ socket1.receive(null_buffers(), out_flags);
+ socket1.receive(buffer(mutable_char_buffer), in_flags, out_flags);
+ socket1.receive(null_buffers(), in_flags, out_flags);
+ socket1.receive(buffer(mutable_char_buffer), in_flags, out_flags, ec);
+ socket1.receive(null_buffers(), in_flags, out_flags, ec);
+
+ socket1.async_receive(buffer(mutable_char_buffer), out_flags,
+ receive_handler);
+ socket1.async_receive(null_buffers(), out_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags,
+ out_flags, receive_handler);
+ socket1.async_receive(null_buffers(), in_flags, out_flags, receive_handler);
+ socket1.async_receive(buffer(mutable_char_buffer), out_flags, immediate);
+ socket1.async_receive(null_buffers(), out_flags, immediate);
+ socket1.async_receive(buffer(mutable_char_buffer), in_flags,
+ out_flags, immediate);
+ socket1.async_receive(null_buffers(), in_flags, out_flags, immediate);
+ }
+ catch (std::exception&)
+ {
+ }
+}
+
+} // namespace local_seq_packet_protocol_socket_compile
+
+//------------------------------------------------------------------------------
+
+ASIO_TEST_SUITE
+(
+ "local/seq_packet_protocol",
+ ASIO_COMPILE_TEST_CASE(local_seq_packet_protocol_socket_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp b/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp
index 18a3f63c158..985d143e412 100644
--- a/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp
@@ -2,7 +2,7 @@
// stream_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -215,5 +215,5 @@ void test()
ASIO_TEST_SUITE
(
"local/stream_protocol",
- ASIO_TEST_CASE(local_stream_protocol_socket_compile::test)
+ ASIO_COMPILE_TEST_CASE(local_stream_protocol_socket_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/packaged_task.cpp b/3rdparty/asio/src/tests/unit/packaged_task.cpp
index fb1b3e8a82c..90b36d9f335 100644
--- a/3rdparty/asio/src/tests/unit/packaged_task.cpp
+++ b/3rdparty/asio/src/tests/unit/packaged_task.cpp
@@ -2,7 +2,7 @@
// packaged_task.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/placeholders.cpp b/3rdparty/asio/src/tests/unit/placeholders.cpp
index 1d75daf6bf1..4f27d319b73 100644
--- a/3rdparty/asio/src/tests/unit/placeholders.cpp
+++ b/3rdparty/asio/src/tests/unit/placeholders.cpp
@@ -2,7 +2,7 @@
// placeholders.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/posix/basic_descriptor.cpp b/3rdparty/asio/src/tests/unit/posix/basic_descriptor.cpp
index 0f1d4944168..f05ed3153cc 100644
--- a/3rdparty/asio/src/tests/unit/posix/basic_descriptor.cpp
+++ b/3rdparty/asio/src/tests/unit/posix/basic_descriptor.cpp
@@ -2,7 +2,7 @@
// basic_descriptor.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/posix/basic_stream_descriptor.cpp b/3rdparty/asio/src/tests/unit/posix/basic_stream_descriptor.cpp
index 65c99df2c37..8ea66857eae 100644
--- a/3rdparty/asio/src/tests/unit/posix/basic_stream_descriptor.cpp
+++ b/3rdparty/asio/src/tests/unit/posix/basic_stream_descriptor.cpp
@@ -2,7 +2,7 @@
// basic_stream_descriptor.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/posix/descriptor.cpp b/3rdparty/asio/src/tests/unit/posix/descriptor.cpp
index 5a26f307f21..c08ef8f4963 100644
--- a/3rdparty/asio/src/tests/unit/posix/descriptor.cpp
+++ b/3rdparty/asio/src/tests/unit/posix/descriptor.cpp
@@ -2,7 +2,7 @@
// descriptor.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/posix/descriptor_base.cpp b/3rdparty/asio/src/tests/unit/posix/descriptor_base.cpp
index 0c28c029a7a..0437c9f852c 100644
--- a/3rdparty/asio/src/tests/unit/posix/descriptor_base.cpp
+++ b/3rdparty/asio/src/tests/unit/posix/descriptor_base.cpp
@@ -2,7 +2,7 @@
// descriptor_base.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/posix/stream_descriptor.cpp b/3rdparty/asio/src/tests/unit/posix/stream_descriptor.cpp
index 8826c937a9f..a8fdc4b2c19 100644
--- a/3rdparty/asio/src/tests/unit/posix/stream_descriptor.cpp
+++ b/3rdparty/asio/src/tests/unit/posix/stream_descriptor.cpp
@@ -2,7 +2,7 @@
// stream_descriptor.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -55,6 +55,7 @@ void test()
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
posix::descriptor_base::bytes_readable io_control_command;
+ archetypes::immediate_handler immediate;
archetypes::lazy_handler lazy;
asio::error_code ec;
@@ -66,16 +67,16 @@ void test()
posix::stream_descriptor descriptor3(ioc, native_descriptor1);
posix::stream_descriptor descriptor4(ioc_ex, native_descriptor1);
-#if defined(ASIO_HAS_MOVE)
posix::stream_descriptor descriptor5(std::move(descriptor2));
-#endif // defined(ASIO_HAS_MOVE)
+
+ posix::basic_stream_descriptor<io_context::executor_type> descriptor6(ioc);
+ posix::stream_descriptor descriptor7(std::move(descriptor6));
// basic_stream_descriptor operators.
-#if defined(ASIO_HAS_MOVE)
descriptor1 = posix::stream_descriptor(ioc);
descriptor1 = std::move(descriptor2);
-#endif // defined(ASIO_HAS_MOVE)
+ descriptor1 = std::move(descriptor6);
// basic_io_object functions.
@@ -88,9 +89,9 @@ void test()
= descriptor1.lowest_layer();
(void)lowest_layer;
- const posix::stream_descriptor& descriptor6 = descriptor1;
+ const posix::stream_descriptor& descriptor8 = descriptor1;
const posix::stream_descriptor::lowest_layer_type& lowest_layer2
- = descriptor6.lowest_layer();
+ = descriptor8.lowest_layer();
(void)lowest_layer2;
int native_descriptor2 = -1;
@@ -130,6 +131,7 @@ void test()
descriptor1.wait(posix::descriptor_base::wait_write, ec);
descriptor1.async_wait(posix::descriptor_base::wait_read, &wait_handler);
+ descriptor1.async_wait(posix::descriptor_base::wait_read, immediate);
int i1 = descriptor1.async_wait(posix::descriptor_base::wait_write, lazy);
(void)i1;
@@ -148,6 +150,9 @@ void test()
write_some_handler);
descriptor1.async_write_some(null_buffers(),
write_some_handler);
+ descriptor1.async_write_some(buffer(mutable_char_buffer), immediate);
+ descriptor1.async_write_some(buffer(const_char_buffer), immediate);
+ descriptor1.async_write_some(null_buffers(), immediate);
int i2 = descriptor1.async_write_some(buffer(mutable_char_buffer), lazy);
(void)i2;
int i3 = descriptor1.async_write_some(buffer(const_char_buffer), lazy);
@@ -161,6 +166,8 @@ void test()
descriptor1.async_read_some(buffer(mutable_char_buffer), read_some_handler);
descriptor1.async_read_some(null_buffers(), read_some_handler);
+ descriptor1.async_read_some(buffer(mutable_char_buffer), immediate);
+ descriptor1.async_read_some(null_buffers(), immediate);
int i5 = descriptor1.async_read_some(buffer(mutable_char_buffer), lazy);
(void)i5;
int i6 = descriptor1.async_read_some(null_buffers(), lazy);
@@ -179,5 +186,5 @@ void test()
ASIO_TEST_SUITE
(
"posix/stream_descriptor",
- ASIO_TEST_CASE(posix_stream_descriptor_compile::test)
+ ASIO_COMPILE_TEST_CASE(posix_stream_descriptor_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/post.cpp b/3rdparty/asio/src/tests/unit/post.cpp
index 550c38201b5..d2ef2352299 100644
--- a/3rdparty/asio/src/tests/unit/post.cpp
+++ b/3rdparty/asio/src/tests/unit/post.cpp
@@ -2,7 +2,7 @@
// post.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/prepend.cpp b/3rdparty/asio/src/tests/unit/prepend.cpp
new file mode 100644
index 00000000000..cc26bf9835c
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/prepend.cpp
@@ -0,0 +1,58 @@
+//
+// prepend.cpp
+// ~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/prepend.hpp"
+
+#include "asio/bind_executor.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "asio/system_timer.hpp"
+#include "unit_test.hpp"
+
+void prepend_test()
+{
+ asio::io_context io1;
+ asio::io_context io2;
+ asio::system_timer timer1(io1);
+ int count = 0;
+
+ timer1.expires_after(asio::chrono::seconds(0));
+ timer1.async_wait(
+ asio::prepend(
+ asio::bind_executor(io2.get_executor(),
+ [&count](int a, int b, asio::error_code)
+ {
+ ++count;
+ ASIO_CHECK(a == 123);
+ ASIO_CHECK(b == 321);
+ }), 123, 321));
+
+ ASIO_CHECK(count == 0);
+
+ io1.run();
+
+ ASIO_CHECK(count == 0);
+
+ io2.run();
+
+ ASIO_CHECK(count == 1);
+}
+
+ASIO_TEST_SUITE
+(
+ "prepend",
+ ASIO_TEST_CASE(prepend_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/random_access_file.cpp b/3rdparty/asio/src/tests/unit/random_access_file.cpp
new file mode 100644
index 00000000000..be703cd395e
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/random_access_file.cpp
@@ -0,0 +1,171 @@
+//
+// random_access_file.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/random_access_file.hpp"
+
+#include "archetypes/async_result.hpp"
+#include "asio/io_context.hpp"
+#include "unit_test.hpp"
+
+// random_access_file_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all public member functions on the class
+// random_access_file compile and link correctly. Runtime failures are ignored.
+
+namespace random_access_file_compile {
+
+struct write_some_at_handler
+{
+ write_some_at_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ write_some_at_handler(write_some_at_handler&&) {}
+private:
+ write_some_at_handler(const write_some_at_handler&);
+};
+
+struct read_some_at_handler
+{
+ read_some_at_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ read_some_at_handler(read_some_at_handler&&) {}
+private:
+ read_some_at_handler(const read_some_at_handler&);
+};
+
+void test()
+{
+#if defined(ASIO_HAS_FILE)
+ using namespace asio;
+
+ try
+ {
+ io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
+ char mutable_char_buffer[128] = "";
+ const char const_char_buffer[128] = "";
+ archetypes::lazy_handler lazy;
+ asio::error_code ec;
+ const std::string path;
+
+ // basic_random_access_file constructors.
+
+ random_access_file file1(ioc);
+ random_access_file file2(ioc, "", random_access_file::read_only);
+ random_access_file file3(ioc, path, random_access_file::read_only);
+ random_access_file::native_handle_type native_file1 = file1.native_handle();
+ random_access_file file4(ioc, native_file1);
+
+ random_access_file file5(ioc_ex);
+ random_access_file file6(ioc_ex, "", random_access_file::read_only);
+ random_access_file file7(ioc_ex, path, random_access_file::read_only);
+ random_access_file::native_handle_type native_file2 = file1.native_handle();
+ random_access_file file8(ioc_ex, native_file2);
+
+ random_access_file file9(std::move(file8));
+
+ basic_random_access_file<io_context::executor_type> file10(ioc);
+ random_access_file file11(std::move(file10));
+
+ // basic_random_access_file operators.
+
+ file1 = random_access_file(ioc);
+ file1 = std::move(file2);
+ file1 = std::move(file10);
+
+ // basic_io_object functions.
+
+ random_access_file::executor_type ex = file1.get_executor();
+ (void)ex;
+
+ // basic_random_access_file functions.
+
+ file1.open("", random_access_file::read_only);
+ file1.open("", random_access_file::read_only, ec);
+
+ file1.open(path, random_access_file::read_only);
+ file1.open(path, random_access_file::read_only, ec);
+
+ random_access_file::native_handle_type native_file3 = file1.native_handle();
+ file1.assign(native_file3);
+ random_access_file::native_handle_type native_file4 = file1.native_handle();
+ file1.assign(native_file4, ec);
+
+ bool is_open = file1.is_open();
+ (void)is_open;
+
+ file1.close();
+ file1.close(ec);
+
+ random_access_file::native_handle_type native_file5 = file1.native_handle();
+ (void)native_file5;
+
+ random_access_file::native_handle_type native_file6 = file1.release();
+ (void)native_file6;
+ random_access_file::native_handle_type native_file7 = file1.release(ec);
+ (void)native_file7;
+
+ file1.cancel();
+ file1.cancel(ec);
+
+ asio::uint64_t s1 = file1.size();
+ (void)s1;
+ asio::uint64_t s2 = file1.size(ec);
+ (void)s2;
+
+ file1.resize(asio::uint64_t(0));
+ file1.resize(asio::uint64_t(0), ec);
+
+ file1.sync_all();
+ file1.sync_all(ec);
+
+ file1.sync_data();
+ file1.sync_data(ec);
+
+ file1.write_some_at(0, buffer(mutable_char_buffer));
+ file1.write_some_at(0, buffer(const_char_buffer));
+ file1.write_some_at(0, buffer(mutable_char_buffer), ec);
+ file1.write_some_at(0, buffer(const_char_buffer), ec);
+
+ file1.async_write_some_at(0, buffer(mutable_char_buffer),
+ write_some_at_handler());
+ file1.async_write_some_at(0, buffer(const_char_buffer),
+ write_some_at_handler());
+ int i1 = file1.async_write_some_at(0, buffer(mutable_char_buffer), lazy);
+ (void)i1;
+ int i2 = file1.async_write_some_at(0, buffer(const_char_buffer), lazy);
+ (void)i2;
+
+ file1.read_some_at(0, buffer(mutable_char_buffer));
+ file1.read_some_at(0, buffer(mutable_char_buffer), ec);
+
+ file1.async_read_some_at(0, buffer(mutable_char_buffer),
+ read_some_at_handler());
+ int i3 = file1.async_read_some_at(0, buffer(mutable_char_buffer), lazy);
+ (void)i3;
+ }
+ catch (std::exception&)
+ {
+ }
+#endif // defined(ASIO_HAS_FILE)
+}
+
+} // namespace random_access_file_compile
+
+ASIO_TEST_SUITE
+(
+ "random_access_file",
+ ASIO_COMPILE_TEST_CASE(random_access_file_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/read.cpp b/3rdparty/asio/src/tests/unit/read.cpp
index bd0e9592ca9..a268c041d9b 100644
--- a/3rdparty/asio/src/tests/unit/read.cpp
+++ b/3rdparty/asio/src/tests/unit/read.cpp
@@ -2,7 +2,7 @@
// read.cpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,7 +16,9 @@
// Test that header file is self-contained.
#include "asio/read.hpp"
+#include <array>
#include <cstring>
+#include <functional>
#include <vector>
#include "archetypes/async_result.hpp"
#include "asio/io_context.hpp"
@@ -24,20 +26,10 @@
#include "asio/streambuf.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
#if defined(ASIO_HAS_BOOST_ARRAY)
#include <boost/array.hpp>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
using namespace std; // For memcmp, memcpy and memset.
class test_stream
@@ -53,7 +45,7 @@ public:
{
}
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return io_context_.get_executor();
}
@@ -121,12 +113,12 @@ public:
template <typename Mutable_Buffers, typename Handler>
void async_read_some(const Mutable_Buffers& buffers,
- ASIO_MOVE_ARG(Handler) handler)
+ Handler&& handler)
{
size_t bytes_transferred = read_some(buffers);
asio::post(get_executor(),
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler),
+ static_cast<Handler&&>(handler),
asio::error_code(), bytes_transferred));
}
@@ -439,11 +431,7 @@ bool old_style_transfer_all(const asio::error_code& ec,
struct short_transfer
{
short_transfer() {}
-#if defined(ASIO_HAS_MOVE)
short_transfer(short_transfer&&) {}
-#else // defined(ASIO_HAS_MOVE)
- short_transfer(const short_transfer&) {}
-#endif // defined(ASIO_HAS_MOVE)
size_t operator()(const asio::error_code& ec,
size_t /*bytes_transferred*/)
{
@@ -2475,11 +2463,7 @@ void async_read_handler(const asio::error_code& e,
void test_3_arg_mutable_buffer_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2535,11 +2519,7 @@ void test_3_arg_mutable_buffer_async_read()
void test_3_arg_boost_array_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2598,15 +2578,10 @@ void test_3_arg_boost_array_buffers_async_read()
void test_3_arg_std_array_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_stream s(ioc);
char read_buf[sizeof(read_data)];
@@ -2656,16 +2631,11 @@ void test_3_arg_std_array_buffers_async_read()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_3_arg_vector_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2723,11 +2693,7 @@ void test_3_arg_vector_buffers_async_read()
void test_3_arg_dynamic_string_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2789,11 +2755,7 @@ void test_3_arg_dynamic_string_async_read()
void test_3_arg_streambuf_async_read()
{
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2852,11 +2814,7 @@ void test_3_arg_streambuf_async_read()
void test_4_arg_mutable_buffer_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3193,11 +3151,7 @@ void test_4_arg_mutable_buffer_async_read()
void test_4_arg_boost_array_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3537,15 +3491,10 @@ void test_4_arg_boost_array_buffers_async_read()
void test_4_arg_std_array_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_stream s(ioc);
char read_buf[sizeof(read_data)];
@@ -3876,16 +3825,11 @@ void test_4_arg_std_array_buffers_async_read()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(buffers, sizeof(read_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_4_arg_vector_buffers_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -4224,11 +4168,7 @@ void test_4_arg_vector_buffers_async_read()
void test_4_arg_dynamic_string_async_read()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -4595,11 +4535,7 @@ void test_4_arg_dynamic_string_async_read()
void test_4_arg_streambuf_async_read()
{
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
diff --git a/3rdparty/asio/src/tests/unit/read_at.cpp b/3rdparty/asio/src/tests/unit/read_at.cpp
index bfe4af75d29..72d21bc3236 100644
--- a/3rdparty/asio/src/tests/unit/read_at.cpp
+++ b/3rdparty/asio/src/tests/unit/read_at.cpp
@@ -2,7 +2,7 @@
// read_at.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,27 +16,19 @@
// Test that header file is self-contained.
#include "asio/read_at.hpp"
+#include <array>
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/io_context.hpp"
#include "asio/post.hpp"
#include "asio/streambuf.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
#if defined(ASIO_HAS_BOOST_ARRAY)
#include <boost/array.hpp>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
using namespace std; // For memcmp, memcpy and memset.
class test_random_access_device
@@ -51,7 +43,7 @@ public:
{
}
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return io_context_.get_executor();
}
@@ -125,12 +117,12 @@ public:
template <typename Mutable_Buffers, typename Handler>
void async_read_some_at(asio::uint64_t offset,
- const Mutable_Buffers& buffers, ASIO_MOVE_ARG(Handler) handler)
+ const Mutable_Buffers& buffers, Handler&& handler)
{
size_t bytes_transferred = read_some_at(offset, buffers);
asio::post(get_executor(),
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler),
+ static_cast<Handler&&>(handler),
asio::error_code(), bytes_transferred));
}
@@ -479,11 +471,7 @@ bool old_style_transfer_all(const asio::error_code& ec,
struct short_transfer
{
short_transfer() {}
-#if defined(ASIO_HAS_MOVE)
short_transfer(short_transfer&&) {}
-#else // defined(ASIO_HAS_MOVE)
- short_transfer(const short_transfer&) {}
-#endif // defined(ASIO_HAS_MOVE)
size_t operator()(const asio::error_code& ec,
size_t /*bytes_transferred*/)
{
@@ -3436,11 +3424,7 @@ void async_read_handler(const asio::error_code& e,
void test_4_arg_mutable_buffer_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3532,11 +3516,7 @@ void test_4_arg_mutable_buffer_async_read_at()
void test_4_arg_boost_array_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3631,15 +3611,10 @@ void test_4_arg_boost_array_buffers_async_read_at()
void test_4_arg_std_array_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_random_access_device s(ioc);
char read_buf[sizeof(read_data)];
@@ -3725,16 +3700,11 @@ void test_4_arg_std_array_buffers_async_read_at()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_4_arg_vector_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3827,11 +3797,7 @@ void test_4_arg_vector_buffers_async_read_at()
void test_4_arg_streambuf_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3927,11 +3893,7 @@ void test_4_arg_streambuf_async_read_at()
void test_5_arg_mutable_buffer_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -4625,11 +4587,7 @@ void test_5_arg_mutable_buffer_async_read_at()
void test_5_arg_boost_array_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -5326,15 +5284,10 @@ void test_5_arg_boost_array_buffers_async_read_at()
void test_5_arg_std_array_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_random_access_device s(ioc);
char read_buf[sizeof(read_data)];
@@ -6022,16 +5975,11 @@ void test_5_arg_std_array_buffers_async_read_at()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(1234, buffers, sizeof(read_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_5_arg_vector_buffers_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -6726,11 +6674,7 @@ void test_5_arg_vector_buffers_async_read_at()
void test_5_arg_streambuf_async_read_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
diff --git a/3rdparty/asio/src/tests/unit/read_until.cpp b/3rdparty/asio/src/tests/unit/read_until.cpp
index 0b9979ed629..139fcf6f0a9 100644
--- a/3rdparty/asio/src/tests/unit/read_until.cpp
+++ b/3rdparty/asio/src/tests/unit/read_until.cpp
@@ -2,7 +2,7 @@
// read_until.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -17,18 +17,13 @@
#include "asio/read_until.hpp"
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/io_context.hpp"
#include "asio/post.hpp"
#include "asio/streambuf.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
class test_stream
{
public:
@@ -42,7 +37,7 @@ public:
{
}
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return io_context_.get_executor();
}
@@ -88,7 +83,7 @@ public:
size_t bytes_transferred = read_some(buffers);
asio::post(get_executor(),
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler),
+ static_cast<Handler&&>(handler),
asio::error_code(), bytes_transferred));
}
@@ -673,11 +668,7 @@ void async_read_handler(
void test_dynamic_string_async_read_until_char()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -836,11 +827,7 @@ void test_dynamic_string_async_read_until_char()
void test_streambuf_async_read_until_char()
{
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -996,11 +983,7 @@ void test_streambuf_async_read_until_char()
void test_dynamic_string_async_read_until_string()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -1159,11 +1142,7 @@ void test_dynamic_string_async_read_until_string()
void test_streambuf_async_read_until_string()
{
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -1319,11 +1298,7 @@ void test_streambuf_async_read_until_string()
void test_dynamic_string_async_read_until_match_condition()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -1482,11 +1457,7 @@ void test_dynamic_string_async_read_until_match_condition()
void test_streambuf_async_read_until_match_condition()
{
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
diff --git a/3rdparty/asio/src/tests/unit/readable_pipe.cpp b/3rdparty/asio/src/tests/unit/readable_pipe.cpp
new file mode 100644
index 00000000000..6f29710e3da
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/readable_pipe.cpp
@@ -0,0 +1,131 @@
+//
+// readable_pipe.cpp
+// ~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header pipe is self-contained.
+#include "asio/readable_pipe.hpp"
+
+#include "archetypes/async_result.hpp"
+#include "asio/io_context.hpp"
+#include "unit_test.hpp"
+
+// readable_pipe_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all public member functions on the class
+// readable_pipe compile and link correctly. Runtime failures are ignored.
+
+namespace readable_pipe_compile {
+
+struct write_some_handler
+{
+ write_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ write_some_handler(write_some_handler&&) {}
+private:
+ write_some_handler(const write_some_handler&);
+};
+
+struct read_some_handler
+{
+ read_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ read_some_handler(read_some_handler&&) {}
+private:
+ read_some_handler(const read_some_handler&);
+};
+
+void test()
+{
+#if defined(ASIO_HAS_PIPE)
+ using namespace asio;
+
+ try
+ {
+ io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
+ char mutable_char_buffer[128] = "";
+ archetypes::lazy_handler lazy;
+ asio::error_code ec;
+ const std::string path;
+
+ // basic_readable_pipe constructors.
+
+ readable_pipe pipe1(ioc);
+ readable_pipe::native_handle_type native_pipe1 = pipe1.native_handle();
+ readable_pipe pipe2(ioc, native_pipe1);
+
+ readable_pipe pipe3(ioc_ex);
+ readable_pipe::native_handle_type native_pipe2 = pipe1.native_handle();
+ readable_pipe pipe4(ioc_ex, native_pipe2);
+
+ readable_pipe pipe5(std::move(pipe4));
+
+ basic_readable_pipe<io_context::executor_type> pipe6(ioc);
+ readable_pipe pipe7(std::move(pipe6));
+
+ // basic_readable_pipe operators.
+
+ pipe1 = readable_pipe(ioc);
+ pipe1 = std::move(pipe2);
+ pipe1 = std::move(pipe6);
+
+ // basic_io_object functions.
+
+ readable_pipe::executor_type ex = pipe1.get_executor();
+ (void)ex;
+
+ // basic_readable_pipe functions.
+
+ readable_pipe::native_handle_type native_pipe3 = pipe1.native_handle();
+ pipe1.assign(native_pipe3);
+ readable_pipe::native_handle_type native_pipe4 = pipe1.native_handle();
+ pipe1.assign(native_pipe4, ec);
+
+ bool is_open = pipe1.is_open();
+ (void)is_open;
+
+ pipe1.close();
+ pipe1.close(ec);
+
+ readable_pipe::native_handle_type native_pipe5 = pipe1.release();
+ (void)native_pipe5;
+ readable_pipe::native_handle_type native_pipe6 = pipe1.release(ec);
+ (void)native_pipe6;
+
+ readable_pipe::native_handle_type native_pipe7 = pipe1.native_handle();
+ (void)native_pipe7;
+
+ pipe1.cancel();
+ pipe1.cancel(ec);
+
+ pipe1.read_some(buffer(mutable_char_buffer));
+ pipe1.read_some(buffer(mutable_char_buffer), ec);
+
+ pipe1.async_read_some(buffer(mutable_char_buffer), read_some_handler());
+ int i3 = pipe1.async_read_some(buffer(mutable_char_buffer), lazy);
+ (void)i3;
+ }
+ catch (std::exception&)
+ {
+ }
+#endif // defined(ASIO_HAS_PIPE)
+}
+
+} // namespace readable_pipe_compile
+
+ASIO_TEST_SUITE
+(
+ "readable_pipe",
+ ASIO_COMPILE_TEST_CASE(readable_pipe_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/recycling_allocator.cpp b/3rdparty/asio/src/tests/unit/recycling_allocator.cpp
new file mode 100644
index 00000000000..cc4654fc9f0
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/recycling_allocator.cpp
@@ -0,0 +1,80 @@
+//
+// recycling_allocator.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/recycling_allocator.hpp"
+
+#include "unit_test.hpp"
+#include <vector>
+#include "asio/detail/type_traits.hpp"
+
+void recycling_allocator_test()
+{
+ ASIO_CHECK((
+ asio::is_same<
+ asio::recycling_allocator<int>::value_type,
+ int
+ >::value));
+
+ ASIO_CHECK((
+ asio::is_same<
+ asio::recycling_allocator<void>::value_type,
+ void
+ >::value));
+
+ ASIO_CHECK((
+ asio::is_same<
+ asio::recycling_allocator<int>::rebind<char>::other,
+ asio::recycling_allocator<char>
+ >::value));
+
+ ASIO_CHECK((
+ asio::is_same<
+ asio::recycling_allocator<void>::rebind<char>::other,
+ asio::recycling_allocator<char>
+ >::value));
+
+ asio::recycling_allocator<int> a1;
+ asio::recycling_allocator<int> a2(a1);
+
+ ASIO_CHECK(a1 == a2);
+ ASIO_CHECK(!(a1 != a2));
+
+ asio::recycling_allocator<void> a3;
+ asio::recycling_allocator<void> a4(a3);
+
+ ASIO_CHECK(a3 == a4);
+ ASIO_CHECK(!(a3 != a4));
+
+ asio::recycling_allocator<int> a5(a4);
+ (void)a5;
+
+ asio::recycling_allocator<void> a6(a5);
+ (void)a6;
+
+ int* p = a1.allocate(42);
+ ASIO_CHECK(p != 0);
+
+ a1.deallocate(p, 42);
+
+ std::vector<int, asio::recycling_allocator<int> > v(42);
+ ASIO_CHECK(v.size() == 42);
+}
+
+ASIO_TEST_SUITE
+(
+ "recycling_allocator",
+ ASIO_TEST_CASE(recycling_allocator_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/redirect_error.cpp b/3rdparty/asio/src/tests/unit/redirect_error.cpp
index 219a5c5b355..7a581495566 100644
--- a/3rdparty/asio/src/tests/unit/redirect_error.cpp
+++ b/3rdparty/asio/src/tests/unit/redirect_error.cpp
@@ -2,7 +2,7 @@
// redirect_error.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,10 +16,106 @@
// Test that header file is self-contained.
#include "asio/redirect_error.hpp"
+#include "asio/bind_executor.hpp"
+#include "asio/deferred.hpp"
+#include "asio/io_context.hpp"
+#include "asio/post.hpp"
+#include "asio/system_timer.hpp"
+#include "asio/use_future.hpp"
#include "unit_test.hpp"
+struct redirect_error_handler
+{
+ int* count_;
+
+ explicit redirect_error_handler(int* c)
+ : count_(c)
+ {
+ }
+
+ void operator()()
+ {
+ ++(*count_);
+ }
+};
+
+void redirect_error_test()
+{
+ asio::io_context io1;
+ asio::io_context io2;
+ asio::system_timer timer1(io1);
+ asio::error_code ec = asio::error::would_block;
+ int count = 0;
+
+ timer1.expires_after(asio::chrono::seconds(0));
+ timer1.async_wait(
+ asio::redirect_error(
+ asio::bind_executor(io2.get_executor(),
+ redirect_error_handler(&count)), ec));
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(count == 0);
+
+ io1.run();
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(count == 0);
+
+ io2.run();
+
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(count == 1);
+
+ ec = asio::error::would_block;
+ timer1.async_wait(
+ asio::redirect_error(
+ asio::bind_executor(io2.get_executor(),
+ asio::deferred), ec))(redirect_error_handler(&count));
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(count == 1);
+
+ io1.restart();
+ io1.run();
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(count == 1);
+
+ io2.restart();
+ io2.run();
+
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(count == 2);
+
+#if defined(ASIO_HAS_STD_FUTURE_CLASS)
+ ec = asio::error::would_block;
+ std::future<void> f = timer1.async_wait(
+ asio::redirect_error(
+ asio::bind_executor(io2.get_executor(),
+ asio::use_future), ec));
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::timeout);
+
+ io1.restart();
+ io1.run();
+
+ ASIO_CHECK(ec == asio::error::would_block);
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::timeout);
+
+ io2.restart();
+ io2.run();
+
+ ASIO_CHECK(!ec);
+ ASIO_CHECK(f.wait_for(std::chrono::seconds(0))
+ == std::future_status::ready);
+#endif // defined(ASIO_HAS_STD_FUTURE_CLASS)
+}
+
ASIO_TEST_SUITE
(
"redirect_error",
- ASIO_TEST_CASE(null_test)
+ ASIO_TEST_CASE(redirect_error_test)
)
diff --git a/3rdparty/asio/src/tests/unit/registered_buffer.cpp b/3rdparty/asio/src/tests/unit/registered_buffer.cpp
new file mode 100644
index 00000000000..09c33415a14
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/registered_buffer.cpp
@@ -0,0 +1,111 @@
+//
+// registered_buffer.cpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/registered_buffer.hpp"
+
+#include "unit_test.hpp"
+
+//------------------------------------------------------------------------------
+
+// registered_buffer_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all the mutable_registered_buffer and
+// const_registered_buffer classes compile and link correctly. Runtime
+// failures are ignored.
+
+namespace registered_buffer_compile {
+
+using namespace asio;
+
+void test()
+{
+ try
+ {
+ // mutable_registered_buffer constructors.
+
+ mutable_registered_buffer mb1;
+ mutable_registered_buffer mb2(mb1);
+ (void)mb2;
+
+ // mutable_registered_buffer functions.
+
+ mutable_buffer b1 = mb1.buffer();
+ (void)b1;
+
+ void* ptr1 = mb1.data();
+ (void)ptr1;
+
+ std::size_t n1 = mb1.size();
+ (void)n1;
+
+ registered_buffer_id id1 = mb1.id();
+ (void)id1;
+
+ // mutable_registered_buffer operators.
+
+ mb1 += 128;
+ mb1 = mb2 + 128;
+ mb1 = 128 + mb2;
+
+ // const_registered_buffer constructors.
+
+ const_registered_buffer cb1;
+ const_registered_buffer cb2(cb1);
+ (void)cb2;
+ const_registered_buffer cb3(mb1);
+ (void)cb3;
+
+ // const_registered_buffer functions.
+
+ const_buffer b2 = cb1.buffer();
+ (void)b2;
+
+ const void* ptr2 = cb1.data();
+ (void)ptr2;
+
+ std::size_t n2 = cb1.size();
+ (void)n2;
+
+ registered_buffer_id id2 = cb1.id();
+ (void)id2;
+
+ // const_registered_buffer operators.
+
+ cb1 += 128;
+ cb1 = cb2 + 128;
+ cb1 = 128 + cb2;
+
+ // buffer function overloads.
+
+ mb1 = buffer(mb2);
+ mb1 = buffer(mb2, 128);
+ cb1 = buffer(cb2);
+ cb1 = buffer(cb2, 128);
+ }
+ catch (std::exception&)
+ {
+ }
+}
+
+} // namespace buffer_compile
+
+//------------------------------------------------------------------------------
+
+ASIO_TEST_SUITE
+(
+ "registered_buffer",
+ ASIO_COMPILE_TEST_CASE(registered_buffer_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/serial_port.cpp b/3rdparty/asio/src/tests/unit/serial_port.cpp
index 23f9610f982..9bbafd34d9b 100644
--- a/3rdparty/asio/src/tests/unit/serial_port.cpp
+++ b/3rdparty/asio/src/tests/unit/serial_port.cpp
@@ -2,7 +2,7 @@
// serial_port.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -34,22 +34,18 @@ struct write_some_handler
{
write_some_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
write_some_handler(write_some_handler&&) {}
private:
write_some_handler(const write_some_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
struct read_some_handler
{
read_some_handler() {}
void operator()(const asio::error_code&, std::size_t) {}
-#if defined(ASIO_HAS_MOVE)
read_some_handler(read_some_handler&&) {}
private:
read_some_handler(const read_some_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void test()
@@ -83,16 +79,16 @@ void test()
serial_port::native_handle_type native_port2 = port1.native_handle();
serial_port port6(ioc_ex, native_port2);
-#if defined(ASIO_HAS_MOVE)
serial_port port7(std::move(port6));
-#endif // defined(ASIO_HAS_MOVE)
+
+ basic_serial_port<io_context::executor_type> port8(ioc);
+ serial_port port9(std::move(port8));
// basic_serial_port operators.
-#if defined(ASIO_HAS_MOVE)
port1 = serial_port(ioc);
port1 = std::move(port2);
-#endif // defined(ASIO_HAS_MOVE)
+ port1 = std::move(port8);
// basic_io_object functions.
@@ -104,8 +100,8 @@ void test()
serial_port::lowest_layer_type& lowest_layer = port1.lowest_layer();
(void)lowest_layer;
- const serial_port& port8 = port1;
- const serial_port::lowest_layer_type& lowest_layer2 = port8.lowest_layer();
+ const serial_port& port10 = port1;
+ const serial_port::lowest_layer_type& lowest_layer2 = port10.lowest_layer();
(void)lowest_layer2;
port1.open("null");
@@ -169,5 +165,5 @@ void test()
ASIO_TEST_SUITE
(
"serial_port",
- ASIO_TEST_CASE(serial_port_compile::test)
+ ASIO_COMPILE_TEST_CASE(serial_port_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/serial_port_base.cpp b/3rdparty/asio/src/tests/unit/serial_port_base.cpp
index 1575a6d3a3d..1c888ef661c 100644
--- a/3rdparty/asio/src/tests/unit/serial_port_base.cpp
+++ b/3rdparty/asio/src/tests/unit/serial_port_base.cpp
@@ -2,7 +2,7 @@
// serial_port_base.cpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -95,5 +95,5 @@ void test()
ASIO_TEST_SUITE
(
"serial_port_base",
- ASIO_TEST_CASE(serial_port_base_compile::test)
+ ASIO_COMPILE_TEST_CASE(serial_port_base_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/signal_set.cpp b/3rdparty/asio/src/tests/unit/signal_set.cpp
index cd8bd004154..962be8ba92e 100644
--- a/3rdparty/asio/src/tests/unit/signal_set.cpp
+++ b/3rdparty/asio/src/tests/unit/signal_set.cpp
@@ -2,7 +2,7 @@
// signal_set.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -66,6 +66,9 @@ void test()
set1.add(1);
set1.add(1, ec);
+ set1.add(1, signal_set::flags::dont_care);
+ set1.add(1, signal_set::flags::dont_care, ec);
+
set1.remove(1);
set1.remove(1, ec);
@@ -91,5 +94,5 @@ void test()
ASIO_TEST_SUITE
(
"signal_set",
- ASIO_TEST_CASE(signal_set_compile::test)
+ ASIO_COMPILE_TEST_CASE(signal_set_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/signal_set_base.cpp b/3rdparty/asio/src/tests/unit/signal_set_base.cpp
new file mode 100644
index 00000000000..7f27e8ccc2e
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/signal_set_base.cpp
@@ -0,0 +1,30 @@
+//
+// signal_set_base.cpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Prevent link dependency on the Boost.System library.
+#if !defined(BOOST_SYSTEM_NO_DEPRECATED)
+#define BOOST_SYSTEM_NO_DEPRECATED
+#endif // !defined(BOOST_SYSTEM_NO_DEPRECATED)
+
+// Test that header file is self-contained.
+#include "asio/signal_set_base.hpp"
+
+#include "unit_test.hpp"
+
+ASIO_TEST_SUITE
+(
+ "signal_set_base",
+ ASIO_TEST_CASE(null_test)
+)
diff --git a/3rdparty/asio/src/tests/unit/socket_base.cpp b/3rdparty/asio/src/tests/unit/socket_base.cpp
index e6eb96b2351..21f63ab433c 100644
--- a/3rdparty/asio/src/tests/unit/socket_base.cpp
+++ b/3rdparty/asio/src/tests/unit/socket_base.cpp
@@ -2,7 +2,7 @@
// socket_base.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -645,6 +645,6 @@ void test()
ASIO_TEST_SUITE
(
"socket_base",
- ASIO_TEST_CASE(socket_base_compile::test)
+ ASIO_COMPILE_TEST_CASE(socket_base_compile::test)
ASIO_TEST_CASE(socket_base_runtime::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ssl/context.cpp b/3rdparty/asio/src/tests/unit/ssl/context.cpp
index 4ba3aa98c02..621bf11c4a0 100644
--- a/3rdparty/asio/src/tests/unit/ssl/context.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/context.cpp
@@ -2,7 +2,7 @@
// context.cpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ssl/context_base.cpp b/3rdparty/asio/src/tests/unit/ssl/context_base.cpp
index 40f07ca3850..9ddddad3a8e 100644
--- a/3rdparty/asio/src/tests/unit/ssl/context_base.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/context_base.cpp
@@ -2,7 +2,7 @@
// context_base.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ssl/error.cpp b/3rdparty/asio/src/tests/unit/ssl/error.cpp
index 90286d681bc..633d7b61e8f 100644
--- a/3rdparty/asio/src/tests/unit/ssl/error.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/error.cpp
@@ -2,7 +2,7 @@
// error.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ssl/host_name_verification.cpp b/3rdparty/asio/src/tests/unit/ssl/host_name_verification.cpp
index fc16dbe0426..7126e4b083a 100644
--- a/3rdparty/asio/src/tests/unit/ssl/host_name_verification.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/host_name_verification.cpp
@@ -2,7 +2,7 @@
// host_name_verification.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ssl/rfc2818_verification.cpp b/3rdparty/asio/src/tests/unit/ssl/rfc2818_verification.cpp
index 21cf82f1f4e..adcfa95ded8 100644
--- a/3rdparty/asio/src/tests/unit/ssl/rfc2818_verification.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/rfc2818_verification.cpp
@@ -2,7 +2,7 @@
// rfc2818_verification.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ssl/stream.cpp b/3rdparty/asio/src/tests/unit/ssl/stream.cpp
index 7a6eeb1f1f1..467115169b9 100644
--- a/3rdparty/asio/src/tests/unit/ssl/stream.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/stream.cpp
@@ -2,7 +2,7 @@
// stream.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -75,17 +75,13 @@ void test()
ip::tcp::socket socket1(ioc, ip::tcp::v4());
ssl::stream<ip::tcp::socket&> stream2(socket1, context);
-#if defined(ASIO_HAS_MOVE)
ssl::stream<ip::tcp::socket> stream3
= ssl::stream<ip::tcp::socket>(ioc, context);
ssl::stream<ip::tcp::socket> stream4(std::move(stream3));
-#endif // defined(ASIO_HAS_MOVE)
// ssl::stream assignment.
-#if defined(ASIO_HAS_MOVE)
stream3 = std::move(stream4);
-#endif // defined(ASIO_HAS_MOVE)
// basic_io_object functions.
@@ -199,5 +195,5 @@ void test()
ASIO_TEST_SUITE
(
"ssl/stream",
- ASIO_TEST_CASE(ssl_stream_compile::test)
+ ASIO_COMPILE_TEST_CASE(ssl_stream_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/ssl/stream_base.cpp b/3rdparty/asio/src/tests/unit/ssl/stream_base.cpp
index 03573e17aed..7e6a1e62ef0 100644
--- a/3rdparty/asio/src/tests/unit/ssl/stream_base.cpp
+++ b/3rdparty/asio/src/tests/unit/ssl/stream_base.cpp
@@ -2,7 +2,7 @@
// stream_base.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/static_thread_pool.cpp b/3rdparty/asio/src/tests/unit/static_thread_pool.cpp
index 64071223942..b9b050bf7ee 100644
--- a/3rdparty/asio/src/tests/unit/static_thread_pool.cpp
+++ b/3rdparty/asio/src/tests/unit/static_thread_pool.cpp
@@ -2,7 +2,7 @@
// static_thread_pool.cpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/steady_timer.cpp b/3rdparty/asio/src/tests/unit/steady_timer.cpp
index 054e80c961d..fe2c041db4e 100644
--- a/3rdparty/asio/src/tests/unit/steady_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/steady_timer.cpp
@@ -2,7 +2,7 @@
// steady_timer.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/strand.cpp b/3rdparty/asio/src/tests/unit/strand.cpp
index bf801049654..90ae2bc22a8 100644
--- a/3rdparty/asio/src/tests/unit/strand.cpp
+++ b/3rdparty/asio/src/tests/unit/strand.cpp
@@ -2,7 +2,7 @@
// strand.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,6 +16,7 @@
// Test that header file is self-contained.
#include "asio/strand.hpp"
+#include <functional>
#include <sstream>
#include "asio/executor.hpp"
#include "asio/io_context.hpp"
@@ -30,24 +31,13 @@
# include "asio/steady_timer.hpp"
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
#if defined(ASIO_HAS_BOOST_DATE_TIME)
typedef deadline_timer timer;
namespace chronons = boost::posix_time;
-#elif defined(ASIO_HAS_CHRONO)
+#else // defined(ASIO_HAS_BOOST_DATE_TIME)
typedef steady_timer timer;
namespace chronons = asio::chrono;
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
@@ -303,7 +293,7 @@ void strand_execute_test()
strand<io_context::executor_type> s1 = make_strand(ioc);
int count = 0;
- asio::execution::execute(s1, bindns::bind(increment, &count));
+ s1.execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -317,8 +307,7 @@ void strand_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::require(s1, asio::execution::blocking.possibly),
+ asio::require(s1, asio::execution::blocking.possibly).execute(
bindns::bind(increment, &count));
// No handlers can be called until run() is called.
@@ -333,8 +322,7 @@ void strand_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::require(s1, asio::execution::blocking.never),
+ asio::require(s1, asio::execution::blocking.never).execute(
bindns::bind(increment, &count));
// No handlers can be called until run() is called.
@@ -351,11 +339,10 @@ void strand_execute_test()
ioc.restart();
ASIO_CHECK(!ioc.stopped());
- asio::execution::execute(
- asio::require(s1,
- asio::execution::blocking.never,
- asio::execution::outstanding_work.tracked),
- bindns::bind(increment, &count));
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.tracked
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -369,11 +356,10 @@ void strand_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::require(s1,
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked),
- bindns::bind(increment, &count));
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -387,12 +373,11 @@ void strand_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::require(s1,
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.fork),
- bindns::bind(increment, &count));
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.fork
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -406,12 +391,11 @@ void strand_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::require(s1,
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- bindns::bind(increment, &count));
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -425,14 +409,13 @@ void strand_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::prefer(
- asio::require(s1,
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator(std::allocator<void>())),
- bindns::bind(increment, &count));
+ asio::prefer(
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator(std::allocator<void>())
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
@@ -446,14 +429,13 @@ void strand_execute_test()
count = 0;
ioc.restart();
- asio::execution::execute(
- asio::prefer(
- asio::require(s1,
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator),
- bindns::bind(increment, &count));
+ asio::prefer(
+ asio::require(s1,
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator
+ ).execute(bindns::bind(increment, &count));
// No handlers can be called until run() is called.
ASIO_CHECK(!ioc.stopped());
diff --git a/3rdparty/asio/src/tests/unit/stream_file.cpp b/3rdparty/asio/src/tests/unit/stream_file.cpp
new file mode 100644
index 00000000000..a4416751cd2
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/stream_file.cpp
@@ -0,0 +1,173 @@
+//
+// stream_file.cpp
+// ~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header file is self-contained.
+#include "asio/stream_file.hpp"
+
+#include "archetypes/async_result.hpp"
+#include "asio/io_context.hpp"
+#include "unit_test.hpp"
+
+// stream_file_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all public member functions on the class
+// stream_file compile and link correctly. Runtime failures are ignored.
+
+namespace stream_file_compile {
+
+struct write_some_handler
+{
+ write_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ write_some_handler(write_some_handler&&) {}
+private:
+ write_some_handler(const write_some_handler&);
+};
+
+struct read_some_handler
+{
+ read_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ read_some_handler(read_some_handler&&) {}
+private:
+ read_some_handler(const read_some_handler&);
+};
+
+void test()
+{
+#if defined(ASIO_HAS_FILE)
+ using namespace asio;
+
+ try
+ {
+ io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
+ char mutable_char_buffer[128] = "";
+ const char const_char_buffer[128] = "";
+ archetypes::lazy_handler lazy;
+ asio::error_code ec;
+ const std::string path;
+
+ // basic_stream_file constructors.
+
+ stream_file file1(ioc);
+ stream_file file2(ioc, "", stream_file::read_only);
+ stream_file file3(ioc, path, stream_file::read_only);
+ stream_file::native_handle_type native_file1 = file1.native_handle();
+ stream_file file4(ioc, native_file1);
+
+ stream_file file5(ioc_ex);
+ stream_file file6(ioc_ex, "", stream_file::read_only);
+ stream_file file7(ioc_ex, path, stream_file::read_only);
+ stream_file::native_handle_type native_file2 = file1.native_handle();
+ stream_file file8(ioc_ex, native_file2);
+
+ stream_file file9(std::move(file8));
+
+ basic_stream_file<io_context::executor_type> file10(ioc);
+ stream_file file11(std::move(file10));
+
+ // basic_stream_file operators.
+
+ file1 = stream_file(ioc);
+ file1 = std::move(file2);
+ file1 = std::move(file10);
+
+ // basic_io_object functions.
+
+ stream_file::executor_type ex = file1.get_executor();
+ (void)ex;
+
+ // basic_stream_file functions.
+
+ file1.open("", stream_file::read_only);
+ file1.open("", stream_file::read_only, ec);
+
+ file1.open(path, stream_file::read_only);
+ file1.open(path, stream_file::read_only, ec);
+
+ stream_file::native_handle_type native_file3 = file1.native_handle();
+ file1.assign(native_file3);
+ stream_file::native_handle_type native_file4 = file1.native_handle();
+ file1.assign(native_file4, ec);
+
+ bool is_open = file1.is_open();
+ (void)is_open;
+
+ file1.close();
+ file1.close(ec);
+
+ stream_file::native_handle_type native_file5 = file1.native_handle();
+ (void)native_file5;
+
+ stream_file::native_handle_type native_file6 = file1.release();
+ (void)native_file6;
+ stream_file::native_handle_type native_file7 = file1.release(ec);
+ (void)native_file7;
+
+ file1.cancel();
+ file1.cancel(ec);
+
+ asio::uint64_t s1 = file1.size();
+ (void)s1;
+ asio::uint64_t s2 = file1.size(ec);
+ (void)s2;
+
+ file1.resize(asio::uint64_t(0));
+ file1.resize(asio::uint64_t(0), ec);
+
+ file1.sync_all();
+ file1.sync_all(ec);
+
+ file1.sync_data();
+ file1.sync_data(ec);
+
+ asio::uint64_t s3 = file1.seek(0, stream_file::seek_set);
+ (void)s3;
+ asio::uint64_t s4 = file1.seek(0, stream_file::seek_set, ec);
+ (void)s4;
+
+ file1.write_some(buffer(mutable_char_buffer));
+ file1.write_some(buffer(const_char_buffer));
+ file1.write_some(buffer(mutable_char_buffer), ec);
+ file1.write_some(buffer(const_char_buffer), ec);
+
+ file1.async_write_some(buffer(mutable_char_buffer), write_some_handler());
+ file1.async_write_some(buffer(const_char_buffer), write_some_handler());
+ int i1 = file1.async_write_some(buffer(mutable_char_buffer), lazy);
+ (void)i1;
+ int i2 = file1.async_write_some(buffer(const_char_buffer), lazy);
+ (void)i2;
+
+ file1.read_some(buffer(mutable_char_buffer));
+ file1.read_some(buffer(mutable_char_buffer), ec);
+
+ file1.async_read_some(buffer(mutable_char_buffer), read_some_handler());
+ int i3 = file1.async_read_some(buffer(mutable_char_buffer), lazy);
+ (void)i3;
+ }
+ catch (std::exception&)
+ {
+ }
+#endif // defined(ASIO_HAS_FILE)
+}
+
+} // namespace stream_file_compile
+
+ASIO_TEST_SUITE
+(
+ "stream_file",
+ ASIO_COMPILE_TEST_CASE(stream_file_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/streambuf.cpp b/3rdparty/asio/src/tests/unit/streambuf.cpp
index 7409fce07dc..c1c8477a242 100644
--- a/3rdparty/asio/src/tests/unit/streambuf.cpp
+++ b/3rdparty/asio/src/tests/unit/streambuf.cpp
@@ -2,7 +2,7 @@
// streambuf.cpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/system_context.cpp b/3rdparty/asio/src/tests/unit/system_context.cpp
index 9d4adad4b20..297ab6bd7c1 100644
--- a/3rdparty/asio/src/tests/unit/system_context.cpp
+++ b/3rdparty/asio/src/tests/unit/system_context.cpp
@@ -2,7 +2,7 @@
// system_context.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/system_executor.cpp b/3rdparty/asio/src/tests/unit/system_executor.cpp
index 68d9236ba89..7b811ccac0c 100644
--- a/3rdparty/asio/src/tests/unit/system_executor.cpp
+++ b/3rdparty/asio/src/tests/unit/system_executor.cpp
@@ -2,7 +2,7 @@
// system_executor.cpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -21,23 +21,14 @@
// Test that header file is self-contained.
#include "asio/system_executor.hpp"
+#include <functional>
#include "asio/dispatch.hpp"
#include "asio/post.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
void increment(asio::detail::atomic_count* count)
{
@@ -83,11 +74,6 @@ void system_executor_query_test()
ASIO_CHECK(
asio::query(system_executor(),
- asio::execution::bulk_guarantee)
- == asio::execution::bulk_guarantee.unsequenced);
-
- ASIO_CHECK(
- asio::query(system_executor(),
asio::execution::mapping)
== asio::execution::mapping.thread);
@@ -101,61 +87,52 @@ void system_executor_execute_test()
{
asio::detail::atomic_count count(0);
- asio::execution::execute(system_executor(),
- bindns::bind(increment, &count));
+ system_executor().execute(bindns::bind(increment, &count));
- asio::execution::execute(
- asio::require(system_executor(),
- asio::execution::blocking.possibly),
- bindns::bind(increment, &count));
+ asio::require(system_executor(),
+ asio::execution::blocking.possibly
+ ).execute(bindns::bind(increment, &count));
- asio::execution::execute(
- asio::require(system_executor(),
- asio::execution::blocking.always),
- bindns::bind(increment, &count));
+ asio::require(system_executor(),
+ asio::execution::blocking.always
+ ).execute(bindns::bind(increment, &count));
- asio::execution::execute(
- asio::require(system_executor(),
- asio::execution::blocking.never),
- bindns::bind(increment, &count));
+ asio::require(system_executor(),
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
- asio::execution::execute(
- asio::require(system_executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked),
- bindns::bind(increment, &count));
+ asio::require(system_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
- asio::execution::execute(
+ asio::require(system_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.fork
+ ).execute(bindns::bind(increment, &count));
+
+ asio::require(system_executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
+
+ asio::prefer(
asio::require(system_executor(),
asio::execution::blocking.never,
asio::execution::outstanding_work.untracked,
- asio::execution::relationship.fork),
- bindns::bind(increment, &count));
+ asio::execution::relationship.continuation),
+ asio::execution::allocator(std::allocator<void>())
+ ).execute(bindns::bind(increment, &count));
- asio::execution::execute(
+ asio::prefer(
asio::require(system_executor(),
asio::execution::blocking.never,
asio::execution::outstanding_work.untracked,
asio::execution::relationship.continuation),
- bindns::bind(increment, &count));
-
- asio::execution::execute(
- asio::prefer(
- asio::require(system_executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator(std::allocator<void>())),
- bindns::bind(increment, &count));
-
- asio::execution::execute(
- asio::prefer(
- asio::require(system_executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator),
- bindns::bind(increment, &count));
+ asio::execution::allocator
+ ).execute(bindns::bind(increment, &count));
asio::query(system_executor(), execution::context).join();
diff --git a/3rdparty/asio/src/tests/unit/system_timer.cpp b/3rdparty/asio/src/tests/unit/system_timer.cpp
index 864a9f2e7fb..26a5720129f 100644
--- a/3rdparty/asio/src/tests/unit/system_timer.cpp
+++ b/3rdparty/asio/src/tests/unit/system_timer.cpp
@@ -2,7 +2,7 @@
// system_timer.cpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -21,27 +21,15 @@
// Test that header file is self-contained.
#include "asio/system_timer.hpp"
-#include "unit_test.hpp"
-
-#if defined(ASIO_HAS_STD_CHRONO)
-
+#include <functional>
#include "asio/bind_cancellation_slot.hpp"
#include "asio/cancellation_signal.hpp"
#include "asio/executor_work_guard.hpp"
#include "asio/io_context.hpp"
#include "asio/thread.hpp"
+#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
void increment(int* count)
{
@@ -237,11 +225,9 @@ struct timer_handler
{
timer_handler() {}
void operator()(const asio::error_code&) {}
-#if defined(ASIO_HAS_MOVE)
timer_handler(timer_handler&&) {}
private:
timer_handler(const timer_handler&);
-#endif // defined(ASIO_HAS_MOVE)
};
void system_timer_cancel_test()
@@ -290,18 +276,18 @@ struct custom_allocation_timer_handler
typedef allocator<U> other;
};
- explicit allocator(int* count) ASIO_NOEXCEPT
+ explicit allocator(int* count) noexcept
: count_(count)
{
}
- allocator(const allocator& other) ASIO_NOEXCEPT
+ allocator(const allocator& other) noexcept
: count_(other.count_)
{
}
template <typename U>
- allocator(const allocator<U>& other) ASIO_NOEXCEPT
+ allocator(const allocator<U>& other) noexcept
: count_(other.count_)
{
}
@@ -338,7 +324,7 @@ struct custom_allocation_timer_handler
typedef allocator<int> allocator_type;
- allocator_type get_allocator() const ASIO_NOEXCEPT
+ allocator_type get_allocator() const noexcept
{
return allocator_type(count_);
}
@@ -406,7 +392,6 @@ void system_timer_thread_test()
ASIO_CHECK(count == 1);
}
-#if defined(ASIO_HAS_MOVE)
asio::system_timer make_timer(asio::io_context& ioc, int* count)
{
asio::system_timer t(ioc);
@@ -427,11 +412,9 @@ io_context_system_timer make_convertible_timer(asio::io_context& ioc, int* count
t.async_wait(bindns::bind(increment, count));
return t;
}
-#endif
void system_timer_move_test()
{
-#if defined(ASIO_HAS_MOVE)
asio::io_context io_context1;
asio::io_context io_context2;
int count = 0;
@@ -465,7 +448,6 @@ void system_timer_move_test()
io_context1.run();
ASIO_CHECK(count == 4);
-#endif // defined(ASIO_HAS_MOVE)
}
void system_timer_op_cancel_test()
@@ -516,10 +498,3 @@ ASIO_TEST_SUITE
ASIO_TEST_CASE(system_timer_move_test)
ASIO_TEST_CASE(system_timer_op_cancel_test)
)
-#else // defined(ASIO_HAS_STD_CHRONO)
-ASIO_TEST_SUITE
-(
- "system_timer",
- ASIO_TEST_CASE(null_test)
-)
-#endif // defined(ASIO_HAS_STD_CHRONO)
diff --git a/3rdparty/asio/src/tests/unit/this_coro.cpp b/3rdparty/asio/src/tests/unit/this_coro.cpp
index ef8f67b918f..d1e0fc677c5 100644
--- a/3rdparty/asio/src/tests/unit/this_coro.cpp
+++ b/3rdparty/asio/src/tests/unit/this_coro.cpp
@@ -2,7 +2,7 @@
// this_coro.cpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/thread.cpp b/3rdparty/asio/src/tests/unit/thread.cpp
index a99ef219bb0..b84db72158e 100644
--- a/3rdparty/asio/src/tests/unit/thread.cpp
+++ b/3rdparty/asio/src/tests/unit/thread.cpp
@@ -2,7 +2,7 @@
// thread.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/thread_pool.cpp b/3rdparty/asio/src/tests/unit/thread_pool.cpp
index aec68023367..f65d7963c26 100644
--- a/3rdparty/asio/src/tests/unit/thread_pool.cpp
+++ b/3rdparty/asio/src/tests/unit/thread_pool.cpp
@@ -2,7 +2,7 @@
// thread_pool.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,23 +16,13 @@
// Test that header file is self-contained.
#include "asio/thread_pool.hpp"
+#include <functional>
#include "asio/dispatch.hpp"
#include "asio/post.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
using namespace asio;
-
-#if defined(ASIO_HAS_BOOST_BIND)
-namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif
void increment(int* count)
{
@@ -207,11 +197,6 @@ void thread_pool_executor_query_test()
ASIO_CHECK(
asio::query(pool.executor(),
- asio::execution::bulk_guarantee)
- == asio::execution::bulk_guarantee.parallel);
-
- ASIO_CHECK(
- asio::query(pool.executor(),
asio::execution::mapping)
== asio::execution::mapping.thread);
@@ -231,287 +216,61 @@ void thread_pool_executor_execute_test()
int count = 0;
thread_pool pool(1);
- asio::execution::execute(pool.executor(),
- bindns::bind(increment, &count));
-
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.possibly),
- bindns::bind(increment, &count));
-
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.always),
- bindns::bind(increment, &count));
-
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.never),
- bindns::bind(increment, &count));
-
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.tracked),
- bindns::bind(increment, &count));
-
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked),
- bindns::bind(increment, &count));
-
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.fork),
- bindns::bind(increment, &count));
-
- asio::execution::execute(
- asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- bindns::bind(increment, &count));
-
- asio::execution::execute(
- asio::prefer(
- asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator(std::allocator<void>())),
- bindns::bind(increment, &count));
-
- asio::execution::execute(
- asio::prefer(
- asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator),
- bindns::bind(increment, &count));
-
- pool.wait();
-
- ASIO_CHECK(count == 10);
-}
-
-struct receiver
-{
- int* count_;
-
- receiver(int* count)
- : count_(count)
- {
- }
-
- receiver(const receiver& other) ASIO_NOEXCEPT
- : count_(other.count_)
- {
- }
-
-#if defined(ASIO_HAS_MOVE)
- receiver(receiver&& other) ASIO_NOEXCEPT
- : count_(other.count_)
- {
- other.count_ = 0;
- }
-#endif // defined(ASIO_HAS_MOVE)
-
- void set_value() ASIO_NOEXCEPT
- {
- ++(*count_);
- }
-
- template <typename E>
- void set_error(ASIO_MOVE_ARG(E) e) ASIO_NOEXCEPT
- {
- (void)e;
- }
-
- void set_done() ASIO_NOEXCEPT
- {
- }
-};
-
-namespace asio {
-namespace traits {
-
-#if !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-template <>
-struct set_value_member<receiver, void()>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_VALUE_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-template <typename E>
-struct set_error_member<receiver, E>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_ERROR_MEMBER_TRAIT)
-
-#if !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-template <>
-struct set_done_member<receiver>
-{
- ASIO_STATIC_CONSTEXPR(bool, is_valid = true);
- ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true);
- typedef void result_type;
-};
-
-#endif // !defined(ASIO_HAS_DEDUCED_SET_DONE_MEMBER_TRAIT)
-
-} // namespace traits
-} // namespace asio
-
-void thread_pool_scheduler_test()
-{
- int count = 0;
- receiver r(&count);
- thread_pool pool(1);
-
- asio::execution::submit(
- asio::execution::schedule(pool.scheduler()), r);
-
- asio::execution::submit(
- asio::require(
- asio::execution::schedule(pool.executor()),
- asio::execution::blocking.possibly), r);
-
- asio::execution::submit(
- asio::require(
- asio::execution::schedule(pool.executor()),
- asio::execution::blocking.always), r);
-
- asio::execution::submit(
- asio::require(
- asio::execution::schedule(pool.executor()),
- asio::execution::blocking.never), r);
-
- asio::execution::submit(
- asio::require(
- asio::execution::schedule(pool.executor()),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.tracked), r);
-
- asio::execution::submit(
- asio::require(
- asio::execution::schedule(pool.executor()),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked), r);
-
- asio::execution::submit(
- asio::require(
- asio::execution::schedule(pool.executor()),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.fork), r);
-
- asio::execution::submit(
- asio::require(
- asio::execution::schedule(pool.executor()),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation), r);
-
- asio::execution::submit(
- asio::prefer(
- asio::require(
- asio::execution::schedule(pool.executor()),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator(std::allocator<void>())), r);
-
- asio::execution::submit(
- asio::prefer(
- asio::require(
- asio::execution::schedule(pool.executor()),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator), r);
-
- pool.wait();
-
- ASIO_CHECK(count == 10);
-}
-
-void thread_pool_executor_bulk_execute_test()
-{
- int count = 0;
- thread_pool pool(1);
-
- pool.executor().bulk_execute(
- bindns::bind(increment, &count), 2);
+ pool.executor().execute(bindns::bind(increment, &count));
asio::require(pool.executor(),
- asio::execution::blocking.possibly).bulk_execute(
- bindns::bind(increment, &count), 2);
+ asio::execution::blocking.possibly
+ ).execute(bindns::bind(increment, &count));
asio::require(pool.executor(),
- asio::execution::blocking.always).bulk_execute(
- bindns::bind(increment, &count), 2);
+ asio::execution::blocking.always
+ ).execute(bindns::bind(increment, &count));
asio::require(pool.executor(),
- asio::execution::blocking.never).bulk_execute(
- bindns::bind(increment, &count), 2);
+ asio::execution::blocking.never
+ ).execute(bindns::bind(increment, &count));
asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.tracked).bulk_execute(
- bindns::bind(increment, &count), 2);
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.tracked
+ ).execute(bindns::bind(increment, &count));
asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked).bulk_execute(
- bindns::bind(increment, &count), 2);
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked
+ ).execute(bindns::bind(increment, &count));
asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.fork).bulk_execute(
- bindns::bind(increment, &count), 2);
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.fork
+ ).execute(bindns::bind(increment, &count));
asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation).bulk_execute(
- bindns::bind(increment, &count), 2);
-
- asio::prefer(
- asio::require(pool.executor(),
asio::execution::blocking.never,
asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator(std::allocator<void>())).bulk_execute(
- bindns::bind(increment, &count), 2);
+ asio::execution::relationship.continuation
+ ).execute(bindns::bind(increment, &count));
asio::prefer(
- asio::require(pool.executor(),
- asio::execution::blocking.never,
- asio::execution::outstanding_work.untracked,
- asio::execution::relationship.continuation),
- asio::execution::allocator).bulk_execute(
- bindns::bind(increment, &count), 2);
+ asio::require(pool.executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator(std::allocator<void>())
+ ).execute(bindns::bind(increment, &count));
+
+ asio::prefer(
+ asio::require(pool.executor(),
+ asio::execution::blocking.never,
+ asio::execution::outstanding_work.untracked,
+ asio::execution::relationship.continuation),
+ asio::execution::allocator
+ ).execute(bindns::bind(increment, &count));
pool.wait();
- ASIO_CHECK(count == 20);
+ ASIO_CHECK(count == 10);
}
ASIO_TEST_SUITE
@@ -521,6 +280,4 @@ ASIO_TEST_SUITE
ASIO_TEST_CASE(thread_pool_service_test)
ASIO_TEST_CASE(thread_pool_executor_query_test)
ASIO_TEST_CASE(thread_pool_executor_execute_test)
- ASIO_TEST_CASE(thread_pool_executor_bulk_execute_test)
- ASIO_TEST_CASE(thread_pool_scheduler_test)
)
diff --git a/3rdparty/asio/src/tests/unit/time_traits.cpp b/3rdparty/asio/src/tests/unit/time_traits.cpp
index b64a75b0018..2763d9ecc30 100644
--- a/3rdparty/asio/src/tests/unit/time_traits.cpp
+++ b/3rdparty/asio/src/tests/unit/time_traits.cpp
@@ -2,7 +2,7 @@
// time_traits.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ts/buffer.cpp b/3rdparty/asio/src/tests/unit/ts/buffer.cpp
index a2ad558945a..8f09c4fecc9 100644
--- a/3rdparty/asio/src/tests/unit/ts/buffer.cpp
+++ b/3rdparty/asio/src/tests/unit/ts/buffer.cpp
@@ -2,7 +2,7 @@
// buffer.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ts/executor.cpp b/3rdparty/asio/src/tests/unit/ts/executor.cpp
index 840850370df..9e318d93dbd 100644
--- a/3rdparty/asio/src/tests/unit/ts/executor.cpp
+++ b/3rdparty/asio/src/tests/unit/ts/executor.cpp
@@ -2,7 +2,7 @@
// executor.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ts/internet.cpp b/3rdparty/asio/src/tests/unit/ts/internet.cpp
index 8680be6a46f..1ee8320d9d7 100644
--- a/3rdparty/asio/src/tests/unit/ts/internet.cpp
+++ b/3rdparty/asio/src/tests/unit/ts/internet.cpp
@@ -2,7 +2,7 @@
// internet.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ts/io_context.cpp b/3rdparty/asio/src/tests/unit/ts/io_context.cpp
index 616e911183f..365e2579e8c 100644
--- a/3rdparty/asio/src/tests/unit/ts/io_context.cpp
+++ b/3rdparty/asio/src/tests/unit/ts/io_context.cpp
@@ -2,7 +2,7 @@
// io_context.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ts/net.cpp b/3rdparty/asio/src/tests/unit/ts/net.cpp
index c59d1586c6f..25f65030994 100644
--- a/3rdparty/asio/src/tests/unit/ts/net.cpp
+++ b/3rdparty/asio/src/tests/unit/ts/net.cpp
@@ -2,7 +2,7 @@
// net.cpp
// ~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ts/netfwd.cpp b/3rdparty/asio/src/tests/unit/ts/netfwd.cpp
index 67523c4ceb0..55af93c87c3 100644
--- a/3rdparty/asio/src/tests/unit/ts/netfwd.cpp
+++ b/3rdparty/asio/src/tests/unit/ts/netfwd.cpp
@@ -2,7 +2,7 @@
// netfwd.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ts/socket.cpp b/3rdparty/asio/src/tests/unit/ts/socket.cpp
index d1e5df95c0d..4656fa2eb5a 100644
--- a/3rdparty/asio/src/tests/unit/ts/socket.cpp
+++ b/3rdparty/asio/src/tests/unit/ts/socket.cpp
@@ -2,7 +2,7 @@
// socket.cpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/ts/timer.cpp b/3rdparty/asio/src/tests/unit/ts/timer.cpp
index 8a6e855b9e6..e956bd463d5 100644
--- a/3rdparty/asio/src/tests/unit/ts/timer.cpp
+++ b/3rdparty/asio/src/tests/unit/ts/timer.cpp
@@ -2,7 +2,7 @@
// timer.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/unit_test.hpp b/3rdparty/asio/src/tests/unit/unit_test.hpp
index 5b2123e2030..8efae9987e6 100644
--- a/3rdparty/asio/src/tests/unit/unit_test.hpp
+++ b/3rdparty/asio/src/tests/unit/unit_test.hpp
@@ -2,7 +2,7 @@
// unit_test.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/use_awaitable.cpp b/3rdparty/asio/src/tests/unit/use_awaitable.cpp
index 84702c25e5b..815f57ebb1c 100644
--- a/3rdparty/asio/src/tests/unit/use_awaitable.cpp
+++ b/3rdparty/asio/src/tests/unit/use_awaitable.cpp
@@ -2,7 +2,7 @@
// use_awaitable.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/use_future.cpp b/3rdparty/asio/src/tests/unit/use_future.cpp
index 5c2bda5b577..ac12f7caa23 100644
--- a/3rdparty/asio/src/tests/unit/use_future.cpp
+++ b/3rdparty/asio/src/tests/unit/use_future.cpp
@@ -2,7 +2,7 @@
// use_future.cpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -19,7 +19,7 @@
#include <string>
#include "unit_test.hpp"
-#if defined(ASIO_HAS_STD_FUTURE)
+#if defined(ASIO_HAS_STD_FUTURE_CLASS)
#include "archetypes/async_ops.hpp"
@@ -659,7 +659,7 @@ ASIO_TEST_SUITE
ASIO_TEST_CASE(use_future_package_3_test)
)
-#else // defined(ASIO_HAS_STD_FUTURE)
+#else // defined(ASIO_HAS_STD_FUTURE_CLASS)
ASIO_TEST_SUITE
(
@@ -667,4 +667,4 @@ ASIO_TEST_SUITE
ASIO_TEST_CASE(null_test)
)
-#endif // defined(ASIO_HAS_STD_FUTURE)
+#endif // defined(ASIO_HAS_STD_FUTURE_CLASS)
diff --git a/3rdparty/asio/src/tests/unit/uses_executor.cpp b/3rdparty/asio/src/tests/unit/uses_executor.cpp
index 76d2fdbf0d9..f3d52c1d8fc 100644
--- a/3rdparty/asio/src/tests/unit/uses_executor.cpp
+++ b/3rdparty/asio/src/tests/unit/uses_executor.cpp
@@ -2,7 +2,7 @@
// uses_executor.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/wait_traits.cpp b/3rdparty/asio/src/tests/unit/wait_traits.cpp
index 2cea19a50ae..4bdb498d7bf 100644
--- a/3rdparty/asio/src/tests/unit/wait_traits.cpp
+++ b/3rdparty/asio/src/tests/unit/wait_traits.cpp
@@ -2,7 +2,7 @@
// wait_traits.cpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp b/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp
index 87cfb15b2c0..d4d6def159a 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp
@@ -2,7 +2,7 @@
// basic_object_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_overlapped_handle.cpp b/3rdparty/asio/src/tests/unit/windows/basic_overlapped_handle.cpp
index 668742a5f50..62b5419c69f 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_overlapped_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_overlapped_handle.cpp
@@ -2,7 +2,7 @@
// basic_overlapped_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp b/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp
index 6fa7a02a00e..4a2605ea335 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp
@@ -2,7 +2,7 @@
// basic_random_access_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp b/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp
index fdde859da95..9cdf0bd5c20 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp
@@ -2,7 +2,7 @@
// basic_stream_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/windows/object_handle.cpp b/3rdparty/asio/src/tests/unit/windows/object_handle.cpp
index 6fdde1d7940..0784ba9fdb7 100644
--- a/3rdparty/asio/src/tests/unit/windows/object_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/object_handle.cpp
@@ -2,7 +2,7 @@
// object_handle.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -61,16 +61,16 @@ void test()
HANDLE native_handle2 = INVALID_HANDLE_VALUE;
win::object_handle handle4(ioc_ex, native_handle2);
-#if defined(ASIO_HAS_MOVE)
win::object_handle handle5(std::move(handle4));
-#endif // defined(ASIO_HAS_MOVE)
+
+ win::basic_object_handle<io_context::executor_type> handle6(ioc);
+ win::object_handle handle7(std::move(handle6));
// basic_object_handle operators.
-#if defined(ASIO_HAS_MOVE)
handle1 = win::object_handle(ioc);
handle1 = std::move(handle3);
-#endif // defined(ASIO_HAS_MOVE)
+ handle1 = std::move(handle6);
// basic_io_object functions.
@@ -83,9 +83,9 @@ void test()
= handle1.lowest_layer();
(void)lowest_layer;
- const win::object_handle& handle6 = handle1;
+ const win::object_handle& handle8 = handle1;
const win::object_handle::lowest_layer_type& lowest_layer3
- = handle6.lowest_layer();
+ = handle8.lowest_layer();
(void)lowest_layer3;
HANDLE native_handle4 = INVALID_HANDLE_VALUE;
@@ -126,5 +126,5 @@ void test()
ASIO_TEST_SUITE
(
"windows/object_handle",
- ASIO_TEST_CASE(windows_object_handle_compile::test)
+ ASIO_COMPILE_TEST_CASE(windows_object_handle_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp b/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp
index 629299b7567..5cdd3da2db1 100644
--- a/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp
@@ -2,7 +2,7 @@
// overlapped_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
diff --git a/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp b/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp
index ff4173dcdf2..fda1b2cbd98 100644
--- a/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp
@@ -2,7 +2,7 @@
// overlapped_ptr.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -115,5 +115,5 @@ void test()
ASIO_TEST_SUITE
(
"windows/overlapped_ptr",
- ASIO_TEST_CASE(windows_overlapped_ptr_compile::test)
+ ASIO_COMPILE_TEST_CASE(windows_overlapped_ptr_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp b/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp
index 94fa29f2d96..613732c5128 100644
--- a/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp
@@ -2,7 +2,7 @@
// random_access_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -68,16 +68,16 @@ void test()
HANDLE native_handle2 = INVALID_HANDLE_VALUE;
win::random_access_handle handle4(ioc_ex, native_handle2);
-#if defined(ASIO_HAS_MOVE)
win::random_access_handle handle5(std::move(handle4));
-#endif // defined(ASIO_HAS_MOVE)
+
+ win::basic_random_access_handle<io_context::executor_type> handle6(ioc);
+ win::random_access_handle handle7(std::move(handle6));
// basic_random_access_handle operators.
-#if defined(ASIO_HAS_MOVE)
handle1 = win::random_access_handle(ioc);
handle1 = std::move(handle4);
-#endif // defined(ASIO_HAS_MOVE)
+ handle1 = std::move(handle6);
// basic_io_object functions.
@@ -90,9 +90,9 @@ void test()
= handle1.lowest_layer();
(void)lowest_layer;
- const win::random_access_handle& handle6 = handle1;
+ const win::random_access_handle& handle8 = handle1;
const win::random_access_handle::lowest_layer_type& lowest_layer2
- = handle6.lowest_layer();
+ = handle8.lowest_layer();
(void)lowest_layer2;
HANDLE native_handle3 = INVALID_HANDLE_VALUE;
@@ -105,8 +105,15 @@ void test()
handle1.close(ec);
win::random_access_handle::native_handle_type native_handle4
- = handle1.native_handle();
+ = handle1.release();
(void)native_handle4;
+ win::random_access_handle::native_handle_type native_handle5
+ = handle1.release(ec);
+ (void)native_handle5;
+
+ win::random_access_handle::native_handle_type native_handle6
+ = handle1.native_handle();
+ (void)native_handle6;
handle1.cancel();
handle1.cancel(ec);
@@ -151,5 +158,5 @@ void test()
ASIO_TEST_SUITE
(
"windows/random_access_handle",
- ASIO_TEST_CASE(windows_random_access_handle_compile::test)
+ ASIO_COMPILE_TEST_CASE(windows_random_access_handle_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp b/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp
index 6bb2d668ad8..1668dcea69a 100644
--- a/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp
@@ -2,7 +2,7 @@
// stream_handle.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -67,16 +67,16 @@ void test()
HANDLE native_handle2 = INVALID_HANDLE_VALUE;
win::stream_handle handle4(ioc_ex, native_handle2);
-#if defined(ASIO_HAS_MOVE)
win::stream_handle handle5(std::move(handle4));
-#endif // defined(ASIO_HAS_MOVE)
+
+ win::basic_stream_handle<io_context::executor_type> handle6(ioc);
+ win::stream_handle handle7(std::move(handle6));
// basic_stream_handle operators.
-#if defined(ASIO_HAS_MOVE)
handle1 = win::stream_handle(ioc);
handle1 = std::move(handle4);
-#endif // defined(ASIO_HAS_MOVE)
+ handle1 = std::move(handle6);
// basic_io_object functions.
@@ -89,9 +89,9 @@ void test()
= handle1.lowest_layer();
(void)lowest_layer;
- const win::stream_handle& handle6 = handle1;
+ const win::stream_handle& handle8 = handle1;
const win::stream_handle::lowest_layer_type& lowest_layer2
- = handle6.lowest_layer();
+ = handle8.lowest_layer();
(void)lowest_layer2;
HANDLE native_handle3 = INVALID_HANDLE_VALUE;
@@ -104,8 +104,15 @@ void test()
handle1.close(ec);
win::stream_handle::native_handle_type native_handle4
- = handle1.native_handle();
+ = handle1.release();
(void)native_handle4;
+ win::stream_handle::native_handle_type native_handle5
+ = handle1.release(ec);
+ (void)native_handle5;
+
+ win::stream_handle::native_handle_type native_handle6
+ = handle1.native_handle();
+ (void)native_handle6;
handle1.cancel();
handle1.cancel(ec);
@@ -144,5 +151,5 @@ void test()
ASIO_TEST_SUITE
(
"windows/stream_handle",
- ASIO_TEST_CASE(windows_stream_handle_compile::test)
+ ASIO_COMPILE_TEST_CASE(windows_stream_handle_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/writable_pipe.cpp b/3rdparty/asio/src/tests/unit/writable_pipe.cpp
new file mode 100644
index 00000000000..0cea7547aa2
--- /dev/null
+++ b/3rdparty/asio/src/tests/unit/writable_pipe.cpp
@@ -0,0 +1,136 @@
+//
+// writable_pipe.cpp
+// ~~~~~~~~~~~~~~~~~
+//
+// 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)
+//
+
+// Disable autolinking for unit tests.
+#if !defined(BOOST_ALL_NO_LIB)
+#define BOOST_ALL_NO_LIB 1
+#endif // !defined(BOOST_ALL_NO_LIB)
+
+// Test that header pipe is self-contained.
+#include "asio/writable_pipe.hpp"
+
+#include "archetypes/async_result.hpp"
+#include "asio/io_context.hpp"
+#include "unit_test.hpp"
+
+// writable_pipe_compile test
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+// The following test checks that all public member functions on the class
+// writable_pipe compile and link correctly. Runtime failures are ignored.
+
+namespace writable_pipe_compile {
+
+struct write_some_handler
+{
+ write_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ write_some_handler(write_some_handler&&) {}
+private:
+ write_some_handler(const write_some_handler&);
+};
+
+struct read_some_handler
+{
+ read_some_handler() {}
+ void operator()(const asio::error_code&, std::size_t) {}
+ read_some_handler(read_some_handler&&) {}
+private:
+ read_some_handler(const read_some_handler&);
+};
+
+void test()
+{
+#if defined(ASIO_HAS_PIPE)
+ using namespace asio;
+
+ try
+ {
+ io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
+ char mutable_char_buffer[128] = "";
+ const char const_char_buffer[128] = "";
+ archetypes::lazy_handler lazy;
+ asio::error_code ec;
+
+ // basic_writable_pipe constructors.
+
+ writable_pipe pipe1(ioc);
+ writable_pipe::native_handle_type native_pipe1 = pipe1.native_handle();
+ writable_pipe pipe2(ioc, native_pipe1);
+
+ writable_pipe pipe3(ioc_ex);
+ writable_pipe::native_handle_type native_pipe2 = pipe1.native_handle();
+ writable_pipe pipe4(ioc_ex, native_pipe2);
+
+ writable_pipe pipe5(std::move(pipe4));
+
+ basic_writable_pipe<io_context::executor_type> pipe6(ioc);
+ writable_pipe pipe7(std::move(pipe6));
+
+ // basic_writable_pipe operators.
+
+ pipe1 = writable_pipe(ioc);
+ pipe1 = std::move(pipe2);
+ pipe1 = std::move(pipe6);
+
+ // basic_io_object functions.
+
+ writable_pipe::executor_type ex = pipe1.get_executor();
+ (void)ex;
+
+ // basic_writable_pipe functions.
+
+ writable_pipe::native_handle_type native_pipe3 = pipe1.native_handle();
+ pipe1.assign(native_pipe3);
+ writable_pipe::native_handle_type native_pipe4 = pipe1.native_handle();
+ pipe1.assign(native_pipe4, ec);
+
+ bool is_open = pipe1.is_open();
+ (void)is_open;
+
+ pipe1.close();
+ pipe1.close(ec);
+
+ writable_pipe::native_handle_type native_pipe5 = pipe1.release();
+ (void)native_pipe5;
+ writable_pipe::native_handle_type native_pipe6 = pipe1.release(ec);
+ (void)native_pipe6;
+
+ writable_pipe::native_handle_type native_pipe7 = pipe1.native_handle();
+ (void)native_pipe7;
+
+ pipe1.cancel();
+ pipe1.cancel(ec);
+
+ pipe1.write_some(buffer(mutable_char_buffer));
+ pipe1.write_some(buffer(const_char_buffer));
+ pipe1.write_some(buffer(mutable_char_buffer), ec);
+ pipe1.write_some(buffer(const_char_buffer), ec);
+
+ pipe1.async_write_some(buffer(mutable_char_buffer), write_some_handler());
+ pipe1.async_write_some(buffer(const_char_buffer), write_some_handler());
+ int i1 = pipe1.async_write_some(buffer(mutable_char_buffer), lazy);
+ (void)i1;
+ int i2 = pipe1.async_write_some(buffer(const_char_buffer), lazy);
+ (void)i2;
+ }
+ catch (std::exception&)
+ {
+ }
+#endif // defined(ASIO_HAS_PIPE)
+}
+
+} // namespace writable_pipe_compile
+
+ASIO_TEST_SUITE
+(
+ "writable_pipe",
+ ASIO_COMPILE_TEST_CASE(writable_pipe_compile::test)
+)
diff --git a/3rdparty/asio/src/tests/unit/write.cpp b/3rdparty/asio/src/tests/unit/write.cpp
index 0343c02c71e..470972217c1 100644
--- a/3rdparty/asio/src/tests/unit/write.cpp
+++ b/3rdparty/asio/src/tests/unit/write.cpp
@@ -2,7 +2,7 @@
// write.cpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,7 +16,9 @@
// Test that header file is self-contained.
#include "asio/write.hpp"
+#include <array>
#include <cstring>
+#include <functional>
#include <vector>
#include "archetypes/async_result.hpp"
#include "asio/io_context.hpp"
@@ -24,20 +26,10 @@
#include "asio/streambuf.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
#if defined(ASIO_HAS_BOOST_ARRAY)
#include <boost/array.hpp>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
using namespace std; // For memcmp, memcpy and memset.
class test_stream
@@ -54,7 +46,7 @@ public:
memset(data_, 0, max_length);
}
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return io_context_.get_executor();
}
@@ -121,12 +113,12 @@ public:
template <typename Const_Buffers, typename Handler>
void async_write_some(const Const_Buffers& buffers,
- ASIO_MOVE_ARG(Handler) handler)
+ Handler&& handler)
{
size_t bytes_transferred = write_some(buffers);
asio::post(get_executor(),
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler),
+ static_cast<Handler&&>(handler),
asio::error_code(), bytes_transferred));
}
@@ -409,11 +401,7 @@ bool old_style_transfer_all(const asio::error_code& ec,
struct short_transfer
{
short_transfer() {}
-#if defined(ASIO_HAS_MOVE)
short_transfer(short_transfer&&) {}
-#else // defined(ASIO_HAS_MOVE)
- short_transfer(const short_transfer&) {}
-#endif // defined(ASIO_HAS_MOVE)
size_t operator()(const asio::error_code& ec,
size_t /*bytes_transferred*/)
{
@@ -2173,11 +2161,7 @@ void async_write_handler(const asio::error_code& e,
void test_3_arg_const_buffer_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2228,11 +2212,7 @@ void test_3_arg_const_buffer_async_write()
void test_3_arg_mutable_buffer_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2283,11 +2263,7 @@ void test_3_arg_mutable_buffer_async_write()
void test_3_arg_boost_array_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2341,15 +2317,10 @@ void test_3_arg_boost_array_buffers_async_write()
void test_3_arg_std_array_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_stream s(ioc);
std::array<asio::const_buffer, 2> buffers = { {
@@ -2394,16 +2365,11 @@ void test_3_arg_std_array_buffers_async_write()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_3_arg_vector_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2456,11 +2422,7 @@ void test_3_arg_vector_buffers_async_write()
void test_3_arg_dynamic_string_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2520,11 +2482,7 @@ void test_3_arg_dynamic_string_async_write()
void test_3_arg_streambuf_async_write()
{
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2585,11 +2543,7 @@ void test_3_arg_streambuf_async_write()
void test_4_arg_const_buffer_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -2897,11 +2851,7 @@ void test_4_arg_const_buffer_async_write()
void test_4_arg_mutable_buffer_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3209,11 +3159,7 @@ void test_4_arg_mutable_buffer_async_write()
void test_4_arg_boost_array_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3524,15 +3470,10 @@ void test_4_arg_boost_array_buffers_async_write()
void test_4_arg_std_array_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_stream s(ioc);
std::array<asio::const_buffer, 2> buffers = { {
@@ -3834,16 +3775,11 @@ void test_4_arg_std_array_buffers_async_write()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(buffers, sizeof(write_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_4_arg_vector_buffers_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -4153,11 +4089,7 @@ void test_4_arg_vector_buffers_async_write()
void test_4_arg_dynamic_string_async_write()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -4498,11 +4430,7 @@ void test_4_arg_dynamic_string_async_write()
void test_4_arg_streambuf_async_write()
{
#if !defined(ASIO_NO_DYNAMIC_BUFFER_V1)
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
diff --git a/3rdparty/asio/src/tests/unit/write_at.cpp b/3rdparty/asio/src/tests/unit/write_at.cpp
index c3760b0bf46..adc684d0e4f 100644
--- a/3rdparty/asio/src/tests/unit/write_at.cpp
+++ b/3rdparty/asio/src/tests/unit/write_at.cpp
@@ -2,7 +2,7 @@
// write_at.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// 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)
@@ -16,27 +16,19 @@
// Test that header file is self-contained.
#include "asio/write_at.hpp"
+#include <array>
#include <cstring>
+#include <functional>
#include "archetypes/async_result.hpp"
#include "asio/io_context.hpp"
#include "asio/post.hpp"
#include "asio/streambuf.hpp"
#include "unit_test.hpp"
-#if defined(ASIO_HAS_BOOST_BIND)
-# include <boost/bind/bind.hpp>
-#else // defined(ASIO_HAS_BOOST_BIND)
-# include <functional>
-#endif // defined(ASIO_HAS_BOOST_BIND)
-
#if defined(ASIO_HAS_BOOST_ARRAY)
#include <boost/array.hpp>
#endif // defined(ASIO_HAS_BOOST_ARRAY)
-#if defined(ASIO_HAS_STD_ARRAY)
-# include <array>
-#endif // defined(ASIO_HAS_STD_ARRAY)
-
using namespace std; // For memcmp, memcpy and memset.
class test_random_access_device
@@ -52,7 +44,7 @@ public:
memset(data_, 0, max_length);
}
- executor_type get_executor() ASIO_NOEXCEPT
+ executor_type get_executor() noexcept
{
return io_context_.get_executor();
}
@@ -118,12 +110,12 @@ public:
template <typename Const_Buffers, typename Handler>
void async_write_some_at(asio::uint64_t offset,
- const Const_Buffers& buffers, ASIO_MOVE_ARG(Handler) handler)
+ const Const_Buffers& buffers, Handler&& handler)
{
size_t bytes_transferred = write_some_at(offset, buffers);
asio::post(get_executor(),
asio::detail::bind_handler(
- ASIO_MOVE_CAST(Handler)(handler),
+ static_cast<Handler&&>(handler),
asio::error_code(), bytes_transferred));
}
@@ -424,11 +416,7 @@ bool old_style_transfer_all(const asio::error_code& ec,
struct short_transfer
{
short_transfer() {}
-#if defined(ASIO_HAS_MOVE)
short_transfer(short_transfer&&) {}
-#else // defined(ASIO_HAS_MOVE)
- short_transfer(const short_transfer&) {}
-#endif // defined(ASIO_HAS_MOVE)
size_t operator()(const asio::error_code& ec,
size_t /*bytes_transferred*/)
{
@@ -2947,11 +2935,7 @@ void async_write_handler(const asio::error_code& e,
void test_4_arg_const_buffer_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3046,11 +3030,7 @@ void test_4_arg_const_buffer_async_write_at()
void test_4_arg_mutable_buffer_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3145,11 +3125,7 @@ void test_4_arg_mutable_buffer_async_write_at()
void test_4_arg_boost_array_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3247,15 +3223,10 @@ void test_4_arg_boost_array_buffers_async_write_at()
void test_4_arg_std_array_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_random_access_device s(ioc);
std::array<asio::const_buffer, 2> buffers = { {
@@ -3344,16 +3315,11 @@ void test_4_arg_std_array_buffers_async_write_at()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_4_arg_vector_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3449,11 +3415,7 @@ void test_4_arg_vector_buffers_async_write_at()
void test_4_arg_streambuf_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -3565,11 +3527,7 @@ void test_4_arg_streambuf_async_write_at()
void test_5_arg_const_buffer_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -4207,11 +4165,7 @@ void test_5_arg_const_buffer_async_write_at()
void test_5_arg_mutable_buffer_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -4849,11 +4803,7 @@ void test_5_arg_mutable_buffer_async_write_at()
void test_5_arg_boost_array_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -5494,15 +5444,10 @@ void test_5_arg_boost_array_buffers_async_write_at()
void test_5_arg_std_array_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
-#if defined(ASIO_HAS_STD_ARRAY)
asio::io_context ioc;
test_random_access_device s(ioc);
std::array<asio::const_buffer, 2> buffers = { {
@@ -6134,16 +6079,11 @@ void test_5_arg_std_array_buffers_async_write_at()
ioc.restart();
ioc.run();
ASIO_CHECK(s.check_buffers(0, buffers, sizeof(write_data)));
-#endif // defined(ASIO_HAS_STD_ARRAY)
}
void test_5_arg_vector_buffers_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
@@ -6782,11 +6722,7 @@ void test_5_arg_vector_buffers_async_write_at()
void test_5_arg_streambuf_async_write_at()
{
-#if defined(ASIO_HAS_BOOST_BIND)
- namespace bindns = boost;
-#else // defined(ASIO_HAS_BOOST_BIND)
namespace bindns = std;
-#endif // defined(ASIO_HAS_BOOST_BIND)
using bindns::placeholders::_1;
using bindns::placeholders::_2;
diff --git a/3rdparty/asio/src/tools/handlerlive.pl b/3rdparty/asio/src/tools/handlerlive.pl
index f298075fb7f..e24b8acafba 100755
--- a/3rdparty/asio/src/tools/handlerlive.pl
+++ b/3rdparty/asio/src/tools/handlerlive.pl
@@ -9,7 +9,7 @@
# not yet finished their execution. Programs write this output to the standard
# error stream when compiled with the define `ASIO_ENABLE_HANDLER_TRACKING'.
#
-# Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+# 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)
diff --git a/3rdparty/asio/src/tools/handlertree.pl b/3rdparty/asio/src/tools/handlertree.pl
index 64e120f2716..83e95496699 100755
--- a/3rdparty/asio/src/tools/handlertree.pl
+++ b/3rdparty/asio/src/tools/handlertree.pl
@@ -7,7 +7,7 @@
# Programs write this output to the standard error stream when compiled with
# the define `ASIO_ENABLE_HANDLER_TRACKING'.
#
-# Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+# 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)
diff --git a/3rdparty/asio/src/tools/handlerviz.pl b/3rdparty/asio/src/tools/handlerviz.pl
index dcc364cffc8..6bef1b700bd 100755
--- a/3rdparty/asio/src/tools/handlerviz.pl
+++ b/3rdparty/asio/src/tools/handlerviz.pl
@@ -16,7 +16,7 @@
#
# perl handlerviz.pl < output.txt | dot -Tpdf > output.pdf
#
-# Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+# 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)
diff --git a/3rdparty/asio/test-driver b/3rdparty/asio/test-driver
index d30605660a0..be73b80adf9 100755
--- a/3rdparty/asio/test-driver
+++ b/3rdparty/asio/test-driver
@@ -1,9 +1,9 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
-scriptversion=2013-07-13.22; # UTC
+scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# Copyright (C) 2011-2021 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@ scriptversion=2013-07-13.22; # UTC
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -42,11 +42,13 @@ print_usage ()
{
cat <<END
Usage:
- test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
- [--expect-failure={yes|no}] [--color-tests={yes|no}]
- [--enable-hard-errors={yes|no}] [--]
+ test-driver --test-name NAME --log-file PATH --trs-file PATH
+ [--expect-failure {yes|no}] [--color-tests {yes|no}]
+ [--enable-hard-errors {yes|no}] [--]
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+See the GNU Automake documentation for information.
END
}
@@ -103,14 +105,20 @@ trap "st=130; $do_exit" 2
trap "st=141; $do_exit" 13
trap "st=143; $do_exit" 15
-# Test script is run here.
-"$@" >$log_file 2>&1
+# Test script is run here. We create the file first, then append to it,
+# to ameliorate tests themselves also writing to the log file. Our tests
+# don't, but others can (automake bug#35762).
+: >"$log_file"
+"$@" >>"$log_file" 2>&1
estatus=$?
+
if test $enable_hard_errors = no && test $estatus -eq 99; then
- estatus=1
+ tweaked_estatus=1
+else
+ tweaked_estatus=$estatus
fi
-case $estatus:$expect_failure in
+case $tweaked_estatus:$expect_failure in
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
0:*) col=$grn res=PASS recheck=no gcopy=no;;
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
@@ -119,6 +127,12 @@ case $estatus:$expect_failure in
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
esac
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>"$log_file"
+
# Report outcome to console.
echo "${col}${res}${std}: $test_name"
@@ -131,9 +145,9 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End: