From bc5c1440c393d7b1231d73f42f5cfa71fc9b7faa Mon Sep 17 00:00:00 2001 From: LHoG <1476261+lhog@users.noreply.github.com> Date: Mon, 4 Nov 2024 23:54:45 +0100 Subject: [PATCH] Update asio, because why not --- rts/lib/asio/include/Makefile.am | 52 - rts/lib/asio/include/Makefile.in | 52 - rts/lib/asio/include/asio.hpp | 19 +- .../include/asio/any_completion_executor.hpp | 58 +- .../include/asio/any_completion_handler.hpp | 176 +- rts/lib/asio/include/asio/any_io_executor.hpp | 76 +- rts/lib/asio/include/asio/append.hpp | 33 +- rts/lib/asio/include/asio/as_tuple.hpp | 55 +- .../include/asio/associated_allocator.hpp | 71 +- .../asio/associated_cancellation_slot.hpp | 69 +- .../asio/include/asio/associated_executor.hpp | 74 +- .../asio/associated_immediate_executor.hpp | 101 +- rts/lib/asio/include/asio/associator.hpp | 2 +- rts/lib/asio/include/asio/async_result.hpp | 1037 ++---------- rts/lib/asio/include/asio/awaitable.hpp | 2 +- .../include/asio/basic_datagram_socket.hpp | 162 +- .../include/asio/basic_deadline_timer.hpp | 39 +- rts/lib/asio/include/asio/basic_file.hpp | 41 +- rts/lib/asio/include/asio/basic_io_object.hpp | 12 +- .../include/asio/basic_random_access_file.hpp | 72 +- .../asio/include/asio/basic_raw_socket.hpp | 161 +- .../asio/include/asio/basic_readable_pipe.hpp | 49 +- .../include/asio/basic_seq_packet_socket.hpp | 84 +- .../asio/include/asio/basic_serial_port.hpp | 75 +- .../asio/include/asio/basic_signal_set.hpp | 41 +- rts/lib/asio/include/asio/basic_socket.hpp | 79 +- .../include/asio/basic_socket_acceptor.hpp | 259 ++- .../include/asio/basic_socket_iostream.hpp | 88 +- .../include/asio/basic_socket_streambuf.hpp | 57 +- .../asio/include/asio/basic_stream_file.hpp | 70 +- .../asio/include/asio/basic_stream_socket.hpp | 126 +- rts/lib/asio/include/asio/basic_streambuf.hpp | 28 +- .../asio/include/asio/basic_streambuf_fwd.hpp | 6 +- .../include/asio/basic_waitable_timer.hpp | 55 +- .../asio/include/asio/basic_writable_pipe.hpp | 49 +- rts/lib/asio/include/asio/bind_allocator.hpp | 395 ++--- .../include/asio/bind_cancellation_slot.hpp | 384 ++--- rts/lib/asio/include/asio/bind_executor.hpp | 377 +---- .../include/asio/bind_immediate_executor.hpp | 377 ++--- rts/lib/asio/include/asio/buffer.hpp | 498 ++---- .../asio/include/asio/buffer_registration.hpp | 68 +- .../include/asio/buffered_read_stream.hpp | 65 +- .../include/asio/buffered_read_stream_fwd.hpp | 2 +- rts/lib/asio/include/asio/buffered_stream.hpp | 80 +- .../asio/include/asio/buffered_stream_fwd.hpp | 2 +- .../include/asio/buffered_write_stream.hpp | 65 +- .../asio/buffered_write_stream_fwd.hpp | 2 +- .../asio/include/asio/buffers_iterator.hpp | 8 +- .../asio/include/asio/cancellation_signal.hpp | 110 +- .../asio/include/asio/cancellation_state.hpp | 32 +- .../asio/include/asio/cancellation_type.hpp | 33 +- rts/lib/asio/include/asio/co_spawn.hpp | 34 +- .../include/asio/completion_condition.hpp | 2 +- rts/lib/asio/include/asio/compose.hpp | 332 +--- rts/lib/asio/include/asio/connect.hpp | 131 +- rts/lib/asio/include/asio/connect_pipe.hpp | 2 +- rts/lib/asio/include/asio/consign.hpp | 35 +- rts/lib/asio/include/asio/coroutine.hpp | 3 +- rts/lib/asio/include/asio/deadline_timer.hpp | 2 +- rts/lib/asio/include/asio/defer.hpp | 48 +- rts/lib/asio/include/asio/deferred.hpp | 463 +++--- rts/lib/asio/include/asio/detached.hpp | 32 +- rts/lib/asio/include/asio/detail/array.hpp | 12 +- .../asio/include/asio/detail/array_fwd.hpp | 6 +- rts/lib/asio/include/asio/detail/assert.hpp | 2 +- .../asio/include/asio/detail/atomic_count.hpp | 18 +- .../detail/base_from_cancellation_state.hpp | 41 +- .../asio/detail/base_from_completion_cond.hpp | 4 +- .../asio/include/asio/detail/bind_handler.hpp | 692 ++------ .../asio/detail/blocking_executor_op.hpp | 5 +- .../asio/detail/buffer_resize_guard.hpp | 2 +- .../asio/detail/buffer_sequence_adapter.hpp | 10 +- .../asio/detail/buffered_stream_storage.hpp | 2 +- .../include/asio/detail/bulk_executor_op.hpp | 89 - .../asio/include/asio/detail/call_stack.hpp | 2 +- rts/lib/asio/include/asio/detail/chrono.hpp | 25 +- .../asio/detail/chrono_time_traits.hpp | 2 +- .../asio/detail/completion_handler.hpp | 8 +- .../include/asio/detail/composed_work.hpp | 118 +- .../include/asio/detail/concurrency_hint.hpp | 2 +- .../detail/conditionally_enabled_event.hpp | 2 +- .../detail/conditionally_enabled_mutex.hpp | 2 +- rts/lib/asio/include/asio/detail/config.hpp | 1085 ++----------- .../include/asio/detail/consuming_buffers.hpp | 14 +- rts/lib/asio/include/asio/detail/cstddef.hpp | 6 +- rts/lib/asio/include/asio/detail/cstdint.hpp | 26 +- .../include/asio/detail/date_time_fwd.hpp | 2 +- .../asio/detail/deadline_timer_service.hpp | 8 +- .../include/asio/detail/dependent_type.hpp | 2 +- .../include/asio/detail/descriptor_ops.hpp | 2 +- .../asio/detail/descriptor_read_op.hpp | 8 +- .../asio/detail/descriptor_write_op.hpp | 8 +- .../include/asio/detail/dev_poll_reactor.hpp | 5 +- .../include/asio/detail/epoll_reactor.hpp | 2 +- rts/lib/asio/include/asio/detail/event.hpp | 8 +- .../detail/eventfd_select_interrupter.hpp | 2 +- .../asio/include/asio/detail/exception.hpp | 15 +- .../include/asio/detail/executor_function.hpp | 68 +- .../asio/include/asio/detail/executor_op.hpp | 11 +- .../include/asio/detail/fd_set_adapter.hpp | 2 +- .../asio/include/asio/detail/fenced_block.hpp | 46 +- .../asio/include/asio/detail/functional.hpp | 13 +- rts/lib/asio/include/asio/detail/future.hpp | 19 +- .../asio/detail/gcc_arm_fenced_block.hpp | 91 -- .../asio/detail/gcc_hppa_fenced_block.hpp | 68 - .../asio/detail/gcc_sync_fenced_block.hpp | 65 - .../asio/detail/gcc_x86_fenced_block.hpp | 99 -- rts/lib/asio/include/asio/detail/global.hpp | 8 +- .../asio/detail/handler_alloc_helpers.hpp | 143 +- .../asio/detail/handler_cont_helpers.hpp | 2 +- .../asio/detail/handler_invoke_helpers.hpp | 80 - .../include/asio/detail/handler_tracking.hpp | 6 +- .../asio/detail/handler_type_requirements.hpp | 24 +- .../asio/include/asio/detail/handler_work.hpp | 200 +-- rts/lib/asio/include/asio/detail/hash_map.hpp | 2 +- .../detail/impl/buffer_sequence_adapter.ipp | 2 +- .../asio/detail/impl/descriptor_ops.ipp | 43 +- .../asio/detail/impl/dev_poll_reactor.hpp | 2 +- .../asio/detail/impl/dev_poll_reactor.ipp | 2 +- .../asio/detail/impl/epoll_reactor.hpp | 2 +- .../asio/detail/impl/epoll_reactor.ipp | 2 +- .../impl/eventfd_select_interrupter.ipp | 2 +- .../asio/detail/impl/handler_tracking.ipp | 10 +- .../impl/io_uring_descriptor_service.ipp | 4 +- .../detail/impl/io_uring_file_service.ipp | 2 +- .../asio/detail/impl/io_uring_service.hpp | 2 +- .../asio/detail/impl/io_uring_service.ipp | 63 +- .../impl/io_uring_socket_service_base.ipp | 4 +- .../asio/detail/impl/kqueue_reactor.hpp | 2 +- .../asio/detail/impl/kqueue_reactor.ipp | 2 +- .../include/asio/detail/impl/null_event.ipp | 2 +- .../detail/impl/pipe_select_interrupter.ipp | 2 +- .../include/asio/detail/impl/posix_event.ipp | 2 +- .../include/asio/detail/impl/posix_mutex.ipp | 2 +- .../detail/impl/posix_serial_port_service.ipp | 2 +- .../include/asio/detail/impl/posix_thread.ipp | 2 +- .../asio/detail/impl/posix_tss_ptr.ipp | 2 +- .../impl/reactive_descriptor_service.ipp | 4 +- .../impl/reactive_socket_service_base.ipp | 4 +- .../detail/impl/resolver_service_base.ipp | 6 +- .../include/asio/detail/impl/scheduler.ipp | 2 +- .../asio/detail/impl/select_reactor.hpp | 2 +- .../asio/detail/impl/select_reactor.ipp | 2 +- .../asio/detail/impl/service_registry.hpp | 5 +- .../asio/detail/impl/service_registry.ipp | 2 +- .../asio/detail/impl/signal_set_service.ipp | 4 +- .../include/asio/detail/impl/socket_ops.ipp | 68 +- .../detail/impl/socket_select_interrupter.ipp | 2 +- .../detail/impl/strand_executor_service.hpp | 115 +- .../detail/impl/strand_executor_service.ipp | 2 +- .../asio/detail/impl/strand_service.hpp | 5 +- .../asio/detail/impl/strand_service.ipp | 2 +- .../asio/detail/impl/thread_context.ipp | 2 +- .../include/asio/detail/impl/throw_error.ipp | 23 +- .../asio/detail/impl/timer_queue_ptime.ipp | 24 +- .../asio/detail/impl/timer_queue_set.ipp | 2 +- .../include/asio/detail/impl/win_event.ipp | 2 +- .../detail/impl/win_iocp_file_service.ipp | 31 +- .../detail/impl/win_iocp_handle_service.ipp | 2 +- .../asio/detail/impl/win_iocp_io_context.hpp | 3 +- .../asio/detail/impl/win_iocp_io_context.ipp | 5 +- .../impl/win_iocp_serial_port_service.ipp | 2 +- .../impl/win_iocp_socket_service_base.ipp | 4 +- .../include/asio/detail/impl/win_mutex.ipp | 2 +- .../detail/impl/win_object_handle_service.ipp | 2 +- .../asio/detail/impl/win_static_mutex.ipp | 2 +- .../include/asio/detail/impl/win_thread.ipp | 2 +- .../include/asio/detail/impl/win_tss_ptr.ipp | 2 +- .../impl/winrt_ssocket_service_base.ipp | 4 +- .../detail/impl/winrt_timer_scheduler.hpp | 2 +- .../detail/impl/winrt_timer_scheduler.ipp | 2 +- .../include/asio/detail/impl/winsock_init.ipp | 2 +- .../include/asio/detail/initiate_defer.hpp | 157 +- .../include/asio/detail/initiate_dispatch.hpp | 148 +- .../include/asio/detail/initiate_post.hpp | 157 +- .../asio/include/asio/detail/io_control.hpp | 2 +- .../include/asio/detail/io_object_impl.hpp | 16 +- .../detail/io_uring_descriptor_read_at_op.hpp | 6 +- .../detail/io_uring_descriptor_read_op.hpp | 6 +- .../detail/io_uring_descriptor_service.hpp | 18 +- .../io_uring_descriptor_write_at_op.hpp | 6 +- .../detail/io_uring_descriptor_write_op.hpp | 6 +- .../asio/detail/io_uring_file_service.hpp | 2 +- .../asio/detail/io_uring_null_buffers_op.hpp | 7 +- .../asio/detail/io_uring_operation.hpp | 2 +- .../include/asio/detail/io_uring_service.hpp | 2 +- .../asio/detail/io_uring_socket_accept_op.hpp | 19 +- .../detail/io_uring_socket_connect_op.hpp | 7 +- .../asio/detail/io_uring_socket_recv_op.hpp | 6 +- .../detail/io_uring_socket_recvfrom_op.hpp | 8 +- .../detail/io_uring_socket_recvmsg_op.hpp | 6 +- .../asio/detail/io_uring_socket_send_op.hpp | 6 +- .../asio/detail/io_uring_socket_sendto_op.hpp | 6 +- .../asio/detail/io_uring_socket_service.hpp | 24 +- .../detail/io_uring_socket_service_base.hpp | 18 +- .../include/asio/detail/io_uring_wait_op.hpp | 7 +- .../asio/detail/is_buffer_sequence.hpp | 56 +- .../asio/include/asio/detail/is_executor.hpp | 2 +- .../include/asio/detail/keyword_tss_ptr.hpp | 2 +- .../include/asio/detail/kqueue_reactor.hpp | 2 +- rts/lib/asio/include/asio/detail/limits.hpp | 7 +- .../asio/detail/local_free_on_block_exit.hpp | 2 +- .../asio/detail/macos_fenced_block.hpp | 62 - rts/lib/asio/include/asio/detail/memory.hpp | 67 +- rts/lib/asio/include/asio/detail/mutex.hpp | 8 +- .../include/asio/detail/non_const_lvalue.hpp | 19 +- .../asio/include/asio/detail/noncopyable.hpp | 2 +- .../asio/include/asio/detail/null_event.hpp | 2 +- .../include/asio/detail/null_fenced_block.hpp | 2 +- .../asio/include/asio/detail/null_global.hpp | 2 +- .../asio/include/asio/detail/null_mutex.hpp | 2 +- .../asio/include/asio/detail/null_reactor.hpp | 2 +- .../asio/detail/null_signal_blocker.hpp | 2 +- .../asio/detail/null_socket_service.hpp | 6 +- .../include/asio/detail/null_static_mutex.hpp | 2 +- .../asio/include/asio/detail/null_thread.hpp | 2 +- .../asio/include/asio/detail/null_tss_ptr.hpp | 2 +- .../asio/include/asio/detail/object_pool.hpp | 2 +- .../asio/detail/old_win_sdk_compat.hpp | 2 +- rts/lib/asio/include/asio/detail/op_queue.hpp | 2 +- .../asio/include/asio/detail/operation.hpp | 2 +- .../asio/detail/pipe_select_interrupter.hpp | 2 +- .../asio/include/asio/detail/pop_options.hpp | 2 +- .../asio/include/asio/detail/posix_event.hpp | 2 +- .../asio/detail/posix_fd_set_adapter.hpp | 2 +- .../asio/include/asio/detail/posix_global.hpp | 2 +- .../asio/include/asio/detail/posix_mutex.hpp | 2 +- .../asio/detail/posix_serial_port_service.hpp | 2 +- .../asio/detail/posix_signal_blocker.hpp | 2 +- .../asio/detail/posix_static_mutex.hpp | 2 +- .../asio/include/asio/detail/posix_thread.hpp | 2 +- .../include/asio/detail/posix_tss_ptr.hpp | 2 +- .../asio/include/asio/detail/push_options.hpp | 2 +- .../detail/reactive_descriptor_service.hpp | 18 +- .../asio/detail/reactive_null_buffers_op.hpp | 9 +- .../asio/detail/reactive_socket_accept_op.hpp | 27 +- .../detail/reactive_socket_connect_op.hpp | 9 +- .../asio/detail/reactive_socket_recv_op.hpp | 9 +- .../detail/reactive_socket_recvfrom_op.hpp | 9 +- .../detail/reactive_socket_recvmsg_op.hpp | 9 +- .../asio/detail/reactive_socket_send_op.hpp | 9 +- .../asio/detail/reactive_socket_sendto_op.hpp | 9 +- .../asio/detail/reactive_socket_service.hpp | 24 +- .../detail/reactive_socket_service_base.hpp | 34 +- .../include/asio/detail/reactive_wait_op.hpp | 9 +- rts/lib/asio/include/asio/detail/reactor.hpp | 2 +- .../asio/include/asio/detail/reactor_op.hpp | 2 +- .../include/asio/detail/reactor_op_queue.hpp | 2 +- .../asio/detail/recycling_allocator.hpp | 4 +- .../asio/include/asio/detail/regex_fwd.hpp | 17 +- .../asio/detail/resolve_endpoint_op.hpp | 7 +- .../asio/include/asio/detail/resolve_op.hpp | 2 +- .../include/asio/detail/resolve_query_op.hpp | 7 +- .../include/asio/detail/resolver_service.hpp | 6 +- .../asio/detail/resolver_service_base.hpp | 2 +- .../asio/include/asio/detail/scheduler.hpp | 2 +- .../asio/detail/scheduler_operation.hpp | 2 +- .../include/asio/detail/scheduler_task.hpp | 2 +- .../asio/detail/scheduler_thread_info.hpp | 2 +- .../asio/include/asio/detail/scoped_lock.hpp | 2 +- .../asio/include/asio/detail/scoped_ptr.hpp | 2 +- .../asio/detail/select_interrupter.hpp | 2 +- .../include/asio/detail/select_reactor.hpp | 2 +- .../include/asio/detail/service_registry.hpp | 5 +- .../include/asio/detail/signal_blocker.hpp | 2 +- .../include/asio/detail/signal_handler.hpp | 6 +- .../asio/include/asio/detail/signal_init.hpp | 2 +- .../asio/include/asio/detail/signal_op.hpp | 2 +- .../asio/detail/signal_set_service.hpp | 4 +- .../include/asio/detail/socket_holder.hpp | 2 +- .../asio/include/asio/detail/socket_ops.hpp | 2 +- .../include/asio/detail/socket_option.hpp | 2 +- .../asio/detail/socket_select_interrupter.hpp | 2 +- .../asio/include/asio/detail/socket_types.hpp | 2 +- .../asio/detail/solaris_fenced_block.hpp | 62 - .../include/asio/detail/source_location.hpp | 2 +- .../asio/include/asio/detail/static_mutex.hpp | 8 +- .../asio/include/asio/detail/std_event.hpp | 7 +- .../include/asio/detail/std_fenced_block.hpp | 7 +- .../asio/include/asio/detail/std_global.hpp | 7 +- .../asio/include/asio/detail/std_mutex.hpp | 7 +- .../include/asio/detail/std_static_mutex.hpp | 7 +- .../asio/include/asio/detail/std_thread.hpp | 7 +- .../asio/detail/strand_executor_service.hpp | 26 +- .../include/asio/detail/strand_service.hpp | 2 +- .../asio/include/asio/detail/string_view.hpp | 2 +- rts/lib/asio/include/asio/detail/thread.hpp | 8 +- .../include/asio/detail/thread_context.hpp | 2 +- .../asio/include/asio/detail/thread_group.hpp | 2 +- .../include/asio/detail/thread_info_base.hpp | 34 +- .../asio/include/asio/detail/throw_error.hpp | 2 +- .../include/asio/detail/throw_exception.hpp | 2 +- .../asio/include/asio/detail/timer_queue.hpp | 2 +- .../include/asio/detail/timer_queue_base.hpp | 2 +- .../include/asio/detail/timer_queue_ptime.hpp | 4 +- .../include/asio/detail/timer_queue_set.hpp | 2 +- .../include/asio/detail/timer_scheduler.hpp | 2 +- .../asio/detail/timer_scheduler_fwd.hpp | 2 +- rts/lib/asio/include/asio/detail/tss_ptr.hpp | 2 +- .../asio/include/asio/detail/type_traits.hpp | 194 +-- rts/lib/asio/include/asio/detail/utility.hpp | 8 +- .../asio/detail/variadic_templates.hpp | 294 ---- .../asio/include/asio/detail/wait_handler.hpp | 6 +- rts/lib/asio/include/asio/detail/wait_op.hpp | 2 +- .../asio/include/asio/detail/win_event.hpp | 2 +- .../asio/detail/win_fd_set_adapter.hpp | 2 +- .../include/asio/detail/win_fenced_block.hpp | 90 -- .../asio/include/asio/detail/win_global.hpp | 2 +- .../asio/detail/win_iocp_file_service.hpp | 2 +- .../asio/detail/win_iocp_handle_read_op.hpp | 7 +- .../asio/detail/win_iocp_handle_service.hpp | 10 +- .../asio/detail/win_iocp_handle_write_op.hpp | 7 +- .../asio/detail/win_iocp_io_context.hpp | 2 +- .../asio/detail/win_iocp_null_buffers_op.hpp | 7 +- .../asio/detail/win_iocp_operation.hpp | 2 +- .../asio/detail/win_iocp_overlapped_op.hpp | 7 +- .../asio/detail/win_iocp_overlapped_ptr.hpp | 14 +- .../detail/win_iocp_serial_port_service.hpp | 2 +- .../asio/detail/win_iocp_socket_accept_op.hpp | 19 +- .../detail/win_iocp_socket_connect_op.hpp | 7 +- .../asio/detail/win_iocp_socket_recv_op.hpp | 7 +- .../detail/win_iocp_socket_recvfrom_op.hpp | 7 +- .../detail/win_iocp_socket_recvmsg_op.hpp | 9 +- .../asio/detail/win_iocp_socket_send_op.hpp | 7 +- .../asio/detail/win_iocp_socket_service.hpp | 23 +- .../detail/win_iocp_socket_service_base.hpp | 17 +- .../asio/detail/win_iocp_thread_info.hpp | 2 +- .../include/asio/detail/win_iocp_wait_op.hpp | 7 +- .../asio/include/asio/detail/win_mutex.hpp | 2 +- .../asio/detail/win_object_handle_service.hpp | 3 +- .../include/asio/detail/win_static_mutex.hpp | 2 +- .../asio/include/asio/detail/win_thread.hpp | 2 +- .../asio/include/asio/detail/win_tss_ptr.hpp | 2 +- .../include/asio/detail/winapp_thread.hpp | 2 +- .../asio/include/asio/detail/wince_thread.hpp | 2 +- .../asio/detail/winrt_async_manager.hpp | 2 +- .../include/asio/detail/winrt_async_op.hpp | 2 +- .../include/asio/detail/winrt_resolve_op.hpp | 7 +- .../asio/detail/winrt_resolver_service.hpp | 6 +- .../asio/detail/winrt_socket_connect_op.hpp | 7 +- .../asio/detail/winrt_socket_recv_op.hpp | 7 +- .../asio/detail/winrt_socket_send_op.hpp | 7 +- .../asio/detail/winrt_ssocket_service.hpp | 8 +- .../detail/winrt_ssocket_service_base.hpp | 4 +- .../asio/detail/winrt_timer_scheduler.hpp | 2 +- .../asio/include/asio/detail/winrt_utils.hpp | 2 +- .../asio/include/asio/detail/winsock_init.hpp | 4 +- .../include/asio/detail/work_dispatcher.hpp | 54 +- .../include/asio/detail/wrapped_handler.hpp | 124 +- rts/lib/asio/include/asio/dispatch.hpp | 47 +- rts/lib/asio/include/asio/error.hpp | 4 +- rts/lib/asio/include/asio/error_code.hpp | 169 +- rts/lib/asio/include/asio/execution.hpp | 17 +- .../asio/include/asio/execution/allocator.hpp | 146 +- .../include/asio/execution/any_executor.hpp | 1248 +++------------ .../include/asio/execution/bad_executor.hpp | 7 +- .../asio/include/asio/execution/blocking.hpp | 832 ++++------ .../asio/execution/blocking_adaptation.hpp | 641 +++----- .../include/asio/execution/bulk_execute.hpp | 402 ----- .../include/asio/execution/bulk_guarantee.hpp | 1252 --------------- .../asio/include/asio/execution/connect.hpp | 494 ------ .../asio/include/asio/execution/context.hpp | 93 +- .../include/asio/execution/context_as.hpp | 102 +- .../asio/execution/detail/as_invocable.hpp | 152 -- .../asio/execution/detail/as_operation.hpp | 109 -- .../asio/execution/detail/as_receiver.hpp | 128 -- .../asio/execution/detail/bulk_sender.hpp | 261 --- .../asio/execution/detail/submit_receiver.hpp | 233 --- .../asio/execution/detail/void_receiver.hpp | 90 -- .../asio/include/asio/execution/execute.hpp | 290 ---- .../asio/include/asio/execution/executor.hpp | 194 +-- .../asio/execution/impl/bad_executor.ipp | 6 +- .../impl/receiver_invocation_error.ipp | 36 - .../asio/execution/invocable_archetype.hpp | 32 +- .../asio/include/asio/execution/mapping.hpp | 638 +++----- .../asio/include/asio/execution/occupancy.hpp | 93 +- .../asio/execution/operation_state.hpp | 99 -- .../asio/execution/outstanding_work.hpp | 445 ++--- .../include/asio/execution/prefer_only.hpp | 115 +- .../asio/include/asio/execution/receiver.hpp | 285 ---- .../execution/receiver_invocation_error.hpp | 48 - .../include/asio/execution/relationship.hpp | 445 ++--- .../asio/include/asio/execution/schedule.hpp | 292 ---- .../asio/include/asio/execution/scheduler.hpp | 91 -- .../asio/include/asio/execution/sender.hpp | 316 ---- .../asio/include/asio/execution/set_done.hpp | 255 --- .../asio/include/asio/execution/set_error.hpp | 255 --- .../asio/include/asio/execution/set_value.hpp | 488 ------ rts/lib/asio/include/asio/execution/start.hpp | 252 --- .../asio/include/asio/execution/submit.hpp | 455 ------ .../asio/include/asio/execution_context.hpp | 26 +- rts/lib/asio/include/asio/executor.hpp | 102 +- .../asio/include/asio/executor_work_guard.hpp | 117 +- .../asio/include/asio/experimental/append.hpp | 2 +- .../include/asio/experimental/as_single.hpp | 44 +- .../include/asio/experimental/as_tuple.hpp | 2 +- .../asio/experimental/awaitable_operators.hpp | 14 +- .../asio/experimental/basic_channel.hpp | 90 +- .../experimental/basic_concurrent_channel.hpp | 90 +- .../experimental/cancellation_condition.hpp | 53 +- .../include/asio/experimental/channel.hpp | 6 +- .../asio/experimental/channel_error.hpp | 4 +- .../asio/experimental/channel_traits.hpp | 30 +- .../include/asio/experimental/co_composed.hpp | 7 +- .../asio/experimental/concurrent_channel.hpp | 6 +- .../include/asio/experimental/deferred.hpp | 2 +- .../experimental/detail/channel_handler.hpp | 23 +- .../experimental/detail/channel_message.hpp | 40 +- .../experimental/detail/channel_operation.hpp | 183 ++- .../experimental/detail/channel_payload.hpp | 101 +- .../detail/channel_receive_op.hpp | 23 +- .../detail/channel_send_functions.hpp | 98 +- .../experimental/detail/channel_send_op.hpp | 24 +- .../experimental/detail/channel_service.hpp | 96 +- .../experimental/detail/has_signature.hpp | 2 +- .../detail/impl/channel_service.hpp | 69 +- .../asio/experimental/impl/as_single.hpp | 129 +- .../asio/experimental/impl/channel_error.ipp | 4 +- .../asio/experimental/impl/co_composed.hpp | 33 +- .../include/asio/experimental/impl/coro.hpp | 78 +- .../asio/experimental/impl/parallel_group.hpp | 116 +- .../asio/experimental/impl/promise.hpp | 5 +- .../asio/experimental/impl/use_promise.hpp | 4 +- .../asio/experimental/parallel_group.hpp | 58 +- .../include/asio/experimental/prepend.hpp | 2 +- .../include/asio/experimental/use_coro.hpp | 34 +- .../include/asio/experimental/use_promise.hpp | 22 +- rts/lib/asio/include/asio/file_base.hpp | 2 +- .../include/asio/generic/basic_endpoint.hpp | 8 +- .../asio/generic/datagram_protocol.hpp | 8 +- .../include/asio/generic/detail/endpoint.hpp | 2 +- .../asio/generic/detail/impl/endpoint.ipp | 2 +- .../include/asio/generic/raw_protocol.hpp | 8 +- .../asio/generic/seq_packet_protocol.hpp | 8 +- .../include/asio/generic/stream_protocol.hpp | 8 +- .../asio/include/asio/handler_alloc_hook.hpp | 104 -- .../asio/handler_continuation_hook.hpp | 2 +- .../asio/include/asio/handler_invoke_hook.hpp | 111 -- .../include/asio/high_resolution_timer.hpp | 7 +- .../asio/impl/any_completion_executor.ipp | 24 +- .../include/asio/impl/any_io_executor.ipp | 27 +- rts/lib/asio/include/asio/impl/append.hpp | 137 +- rts/lib/asio/include/asio/impl/as_tuple.hpp | 199 +-- rts/lib/asio/include/asio/impl/awaitable.hpp | 43 +- .../asio/impl/buffered_read_stream.hpp | 233 +-- .../asio/impl/buffered_write_stream.hpp | 233 +-- .../include/asio/impl/cancellation_signal.ipp | 2 +- rts/lib/asio/include/asio/impl/co_spawn.hpp | 196 ++- rts/lib/asio/include/asio/impl/connect.hpp | 318 +--- .../asio/include/asio/impl/connect_pipe.hpp | 2 +- .../asio/include/asio/impl/connect_pipe.ipp | 2 +- rts/lib/asio/include/asio/impl/consign.hpp | 129 +- rts/lib/asio/include/asio/impl/deferred.hpp | 73 +- rts/lib/asio/include/asio/impl/detached.hpp | 63 +- rts/lib/asio/include/asio/impl/error.ipp | 8 +- rts/lib/asio/include/asio/impl/error_code.ipp | 6 +- .../include/asio/impl/execution_context.hpp | 38 +- .../include/asio/impl/execution_context.ipp | 2 +- rts/lib/asio/include/asio/impl/executor.hpp | 103 +- rts/lib/asio/include/asio/impl/executor.ipp | 6 +- .../include/asio/impl/handler_alloc_hook.ipp | 62 - rts/lib/asio/include/asio/impl/io_context.hpp | 95 +- rts/lib/asio/include/asio/impl/io_context.ipp | 2 +- .../include/asio/impl/multiple_exceptions.ipp | 12 +- rts/lib/asio/include/asio/impl/prepend.hpp | 134 +- rts/lib/asio/include/asio/impl/read.hpp | 635 +++----- rts/lib/asio/include/asio/impl/read_at.hpp | 266 +-- rts/lib/asio/include/asio/impl/read_until.hpp | 1426 ++++++----------- .../asio/include/asio/impl/redirect_error.hpp | 456 +----- .../include/asio/impl/serial_port_base.hpp | 2 +- .../include/asio/impl/serial_port_base.ipp | 2 +- rts/lib/asio/include/asio/impl/spawn.hpp | 630 +++----- rts/lib/asio/include/asio/impl/src.hpp | 4 +- .../asio/include/asio/impl/system_context.hpp | 4 +- .../asio/include/asio/impl/system_context.ipp | 4 +- .../include/asio/impl/system_executor.hpp | 44 +- .../asio/include/asio/impl/thread_pool.hpp | 141 +- .../asio/include/asio/impl/thread_pool.ipp | 2 +- .../asio/include/asio/impl/use_awaitable.hpp | 4 +- rts/lib/asio/include/asio/impl/use_future.hpp | 500 +----- rts/lib/asio/include/asio/impl/write.hpp | 640 +++----- rts/lib/asio/include/asio/impl/write_at.hpp | 252 +-- rts/lib/asio/include/asio/io_context.hpp | 211 ++- .../asio/include/asio/io_context_strand.hpp | 58 +- rts/lib/asio/include/asio/io_service.hpp | 2 +- .../asio/include/asio/io_service_strand.hpp | 2 +- rts/lib/asio/include/asio/ip/address.hpp | 61 +- rts/lib/asio/include/asio/ip/address_v4.hpp | 59 +- .../include/asio/ip/address_v4_iterator.hpp | 32 +- .../asio/include/asio/ip/address_v4_range.hpp | 38 +- rts/lib/asio/include/asio/ip/address_v6.hpp | 75 +- .../include/asio/ip/address_v6_iterator.hpp | 31 +- .../asio/include/asio/ip/address_v6_range.hpp | 35 +- .../asio/include/asio/ip/bad_address_cast.hpp | 16 +- .../asio/include/asio/ip/basic_endpoint.hpp | 61 +- .../asio/include/asio/ip/basic_resolver.hpp | 122 +- .../include/asio/ip/basic_resolver_entry.hpp | 2 +- .../asio/ip/basic_resolver_iterator.hpp | 12 +- .../include/asio/ip/basic_resolver_query.hpp | 18 +- .../asio/ip/basic_resolver_results.hpp | 22 +- .../asio/include/asio/ip/detail/endpoint.hpp | 34 +- .../include/asio/ip/detail/impl/endpoint.ipp | 24 +- .../include/asio/ip/detail/socket_option.hpp | 2 +- rts/lib/asio/include/asio/ip/host_name.hpp | 2 +- rts/lib/asio/include/asio/ip/icmp.hpp | 14 +- rts/lib/asio/include/asio/ip/impl/address.hpp | 2 +- rts/lib/asio/include/asio/ip/impl/address.ipp | 40 +- .../asio/include/asio/ip/impl/address_v4.hpp | 2 +- .../asio/include/asio/ip/impl/address_v4.ipp | 22 +- .../asio/include/asio/ip/impl/address_v6.hpp | 2 +- .../asio/include/asio/ip/impl/address_v6.ipp | 56 +- .../include/asio/ip/impl/basic_endpoint.hpp | 2 +- .../asio/include/asio/ip/impl/host_name.ipp | 2 +- .../asio/include/asio/ip/impl/network_v4.hpp | 2 +- .../asio/include/asio/ip/impl/network_v4.ipp | 6 +- .../asio/include/asio/ip/impl/network_v6.hpp | 2 +- .../asio/include/asio/ip/impl/network_v6.ipp | 6 +- rts/lib/asio/include/asio/ip/multicast.hpp | 2 +- rts/lib/asio/include/asio/ip/network_v4.hpp | 36 +- rts/lib/asio/include/asio/ip/network_v6.hpp | 32 +- .../asio/include/asio/ip/resolver_base.hpp | 2 +- .../include/asio/ip/resolver_query_base.hpp | 2 +- rts/lib/asio/include/asio/ip/tcp.hpp | 14 +- rts/lib/asio/include/asio/ip/udp.hpp | 14 +- rts/lib/asio/include/asio/ip/unicast.hpp | 2 +- rts/lib/asio/include/asio/ip/v6_only.hpp | 2 +- .../include/asio/is_applicable_property.hpp | 12 +- .../include/asio/is_contiguous_iterator.hpp | 4 +- rts/lib/asio/include/asio/is_executor.hpp | 2 +- .../asio/include/asio/is_read_buffered.hpp | 2 +- .../asio/include/asio/is_write_buffered.hpp | 2 +- .../include/asio/local/basic_endpoint.hpp | 8 +- .../asio/include/asio/local/connect_pair.hpp | 2 +- .../include/asio/local/datagram_protocol.hpp | 8 +- .../include/asio/local/detail/endpoint.hpp | 2 +- .../asio/local/detail/impl/endpoint.ipp | 2 +- .../asio/local/seq_packet_protocol.hpp | 8 +- .../include/asio/local/stream_protocol.hpp | 8 +- .../asio/include/asio/multiple_exceptions.hpp | 12 +- rts/lib/asio/include/asio/packaged_task.hpp | 62 +- rts/lib/asio/include/asio/placeholders.hpp | 134 +- .../include/asio/posix/basic_descriptor.hpp | 50 +- .../asio/posix/basic_stream_descriptor.hpp | 58 +- .../asio/include/asio/posix/descriptor.hpp | 2 +- .../include/asio/posix/descriptor_base.hpp | 2 +- .../include/asio/posix/stream_descriptor.hpp | 2 +- rts/lib/asio/include/asio/post.hpp | 47 +- rts/lib/asio/include/asio/prefer.hpp | 509 ++---- rts/lib/asio/include/asio/prepend.hpp | 34 +- rts/lib/asio/include/asio/query.hpp | 127 +- .../asio/include/asio/random_access_file.hpp | 2 +- rts/lib/asio/include/asio/read.hpp | 304 ++-- rts/lib/asio/include/asio/read_at.hpp | 87 +- rts/lib/asio/include/asio/read_until.hpp | 554 +++---- rts/lib/asio/include/asio/readable_pipe.hpp | 2 +- .../asio/include/asio/recycling_allocator.hpp | 30 +- rts/lib/asio/include/asio/redirect_error.hpp | 16 +- .../asio/include/asio/registered_buffer.hpp | 82 +- rts/lib/asio/include/asio/require.hpp | 354 ++-- rts/lib/asio/include/asio/require_concept.hpp | 149 +- rts/lib/asio/include/asio/serial_port.hpp | 2 +- .../asio/include/asio/serial_port_base.hpp | 2 +- rts/lib/asio/include/asio/signal_set.hpp | 2 +- rts/lib/asio/include/asio/signal_set_base.hpp | 31 +- rts/lib/asio/include/asio/socket_base.hpp | 2 +- rts/lib/asio/include/asio/spawn.hpp | 288 ++-- rts/lib/asio/include/asio/ssl.hpp | 2 +- rts/lib/asio/include/asio/ssl/context.hpp | 4 +- .../asio/include/asio/ssl/context_base.hpp | 2 +- .../asio/ssl/detail/buffered_handshake_op.hpp | 6 +- .../asio/include/asio/ssl/detail/engine.hpp | 10 +- .../include/asio/ssl/detail/handshake_op.hpp | 6 +- .../include/asio/ssl/detail/impl/engine.ipp | 10 +- .../asio/ssl/detail/impl/openssl_init.ipp | 4 +- rts/lib/asio/include/asio/ssl/detail/io.hpp | 91 +- .../include/asio/ssl/detail/openssl_init.hpp | 2 +- .../include/asio/ssl/detail/openssl_types.hpp | 2 +- .../asio/ssl/detail/password_callback.hpp | 2 +- .../asio/include/asio/ssl/detail/read_op.hpp | 6 +- .../include/asio/ssl/detail/shutdown_op.hpp | 8 +- .../include/asio/ssl/detail/stream_core.hpp | 34 +- .../asio/ssl/detail/verify_callback.hpp | 4 +- .../asio/include/asio/ssl/detail/write_op.hpp | 6 +- rts/lib/asio/include/asio/ssl/error.hpp | 4 +- .../asio/ssl/host_name_verification.hpp | 2 +- .../asio/include/asio/ssl/impl/context.hpp | 2 +- .../asio/include/asio/ssl/impl/context.ipp | 6 +- rts/lib/asio/include/asio/ssl/impl/error.ipp | 6 +- .../asio/ssl/impl/host_name_verification.ipp | 2 +- .../asio/ssl/impl/rfc2818_verification.ipp | 2 +- rts/lib/asio/include/asio/ssl/impl/src.hpp | 2 +- .../include/asio/ssl/rfc2818_verification.hpp | 2 +- rts/lib/asio/include/asio/ssl/stream.hpp | 133 +- rts/lib/asio/include/asio/ssl/stream_base.hpp | 2 +- .../asio/include/asio/ssl/verify_context.hpp | 2 +- rts/lib/asio/include/asio/ssl/verify_mode.hpp | 2 +- .../asio/include/asio/static_thread_pool.hpp | 2 +- rts/lib/asio/include/asio/steady_timer.hpp | 7 +- rts/lib/asio/include/asio/strand.hpp | 209 ++- rts/lib/asio/include/asio/stream_file.hpp | 2 +- rts/lib/asio/include/asio/streambuf.hpp | 2 +- rts/lib/asio/include/asio/system_context.hpp | 6 +- rts/lib/asio/include/asio/system_error.hpp | 104 +- rts/lib/asio/include/asio/system_executor.hpp | 124 +- rts/lib/asio/include/asio/system_timer.hpp | 7 +- rts/lib/asio/include/asio/this_coro.hpp | 83 +- rts/lib/asio/include/asio/thread.hpp | 2 +- rts/lib/asio/include/asio/thread_pool.hpp | 364 ++--- rts/lib/asio/include/asio/time_traits.hpp | 2 +- .../include/asio/traits/bulk_execute_free.hpp | 114 -- .../asio/traits/bulk_execute_member.hpp | 114 -- .../asio/include/asio/traits/connect_free.hpp | 112 -- .../include/asio/traits/connect_member.hpp | 112 -- .../asio/traits/equality_comparable.hpp | 32 +- .../asio/include/asio/traits/execute_free.hpp | 108 -- .../include/asio/traits/execute_member.hpp | 36 +- .../asio/include/asio/traits/prefer_free.hpp | 36 +- .../include/asio/traits/prefer_member.hpp | 36 +- .../asio/include/asio/traits/query_free.hpp | 36 +- .../asio/include/asio/traits/query_member.hpp | 36 +- .../traits/query_static_constexpr_member.hpp | 37 +- .../asio/traits/require_concept_free.hpp | 36 +- .../asio/traits/require_concept_member.hpp | 36 +- .../asio/include/asio/traits/require_free.hpp | 36 +- .../include/asio/traits/require_member.hpp | 36 +- .../include/asio/traits/schedule_free.hpp | 108 -- .../include/asio/traits/schedule_member.hpp | 108 -- .../include/asio/traits/set_done_free.hpp | 108 -- .../include/asio/traits/set_done_member.hpp | 108 -- .../include/asio/traits/set_error_free.hpp | 112 -- .../include/asio/traits/set_error_member.hpp | 112 -- .../include/asio/traits/set_value_free.hpp | 234 --- .../include/asio/traits/set_value_member.hpp | 234 --- .../asio/include/asio/traits/start_free.hpp | 108 -- .../asio/include/asio/traits/start_member.hpp | 108 -- .../asio/include/asio/traits/static_query.hpp | 46 +- .../include/asio/traits/static_require.hpp | 52 +- .../asio/traits/static_require_concept.hpp | 52 +- .../asio/include/asio/traits/submit_free.hpp | 112 -- .../include/asio/traits/submit_member.hpp | 112 -- rts/lib/asio/include/asio/ts/buffer.hpp | 2 +- rts/lib/asio/include/asio/ts/executor.hpp | 2 +- rts/lib/asio/include/asio/ts/internet.hpp | 2 +- rts/lib/asio/include/asio/ts/io_context.hpp | 2 +- rts/lib/asio/include/asio/ts/net.hpp | 2 +- rts/lib/asio/include/asio/ts/netfwd.hpp | 30 +- rts/lib/asio/include/asio/ts/socket.hpp | 2 +- rts/lib/asio/include/asio/ts/timer.hpp | 2 +- rts/lib/asio/include/asio/unyield.hpp | 2 +- rts/lib/asio/include/asio/use_awaitable.hpp | 36 +- rts/lib/asio/include/asio/use_future.hpp | 20 +- rts/lib/asio/include/asio/uses_executor.hpp | 8 +- rts/lib/asio/include/asio/version.hpp | 4 +- rts/lib/asio/include/asio/wait_traits.hpp | 2 +- .../asio/windows/basic_object_handle.hpp | 48 +- .../asio/windows/basic_overlapped_handle.hpp | 31 +- .../windows/basic_random_access_handle.hpp | 58 +- .../asio/windows/basic_stream_handle.hpp | 56 +- .../include/asio/windows/object_handle.hpp | 2 +- .../asio/windows/overlapped_handle.hpp | 2 +- .../include/asio/windows/overlapped_ptr.hpp | 34 +- .../asio/windows/random_access_handle.hpp | 2 +- .../include/asio/windows/stream_handle.hpp | 2 +- rts/lib/asio/include/asio/writable_pipe.hpp | 2 +- rts/lib/asio/include/asio/write.hpp | 268 ++-- rts/lib/asio/include/asio/write_at.hpp | 84 +- rts/lib/asio/include/asio/yield.hpp | 2 +- 667 files changed, 10912 insertions(+), 31783 deletions(-) delete mode 100644 rts/lib/asio/include/asio/detail/bulk_executor_op.hpp delete mode 100644 rts/lib/asio/include/asio/detail/gcc_arm_fenced_block.hpp delete mode 100644 rts/lib/asio/include/asio/detail/gcc_hppa_fenced_block.hpp delete mode 100644 rts/lib/asio/include/asio/detail/gcc_sync_fenced_block.hpp delete mode 100644 rts/lib/asio/include/asio/detail/gcc_x86_fenced_block.hpp delete mode 100644 rts/lib/asio/include/asio/detail/handler_invoke_helpers.hpp delete mode 100644 rts/lib/asio/include/asio/detail/macos_fenced_block.hpp delete mode 100644 rts/lib/asio/include/asio/detail/solaris_fenced_block.hpp delete mode 100644 rts/lib/asio/include/asio/detail/variadic_templates.hpp delete mode 100644 rts/lib/asio/include/asio/detail/win_fenced_block.hpp delete mode 100644 rts/lib/asio/include/asio/execution/bulk_execute.hpp delete mode 100644 rts/lib/asio/include/asio/execution/bulk_guarantee.hpp delete mode 100644 rts/lib/asio/include/asio/execution/connect.hpp delete mode 100644 rts/lib/asio/include/asio/execution/detail/as_invocable.hpp delete mode 100644 rts/lib/asio/include/asio/execution/detail/as_operation.hpp delete mode 100644 rts/lib/asio/include/asio/execution/detail/as_receiver.hpp delete mode 100644 rts/lib/asio/include/asio/execution/detail/bulk_sender.hpp delete mode 100644 rts/lib/asio/include/asio/execution/detail/submit_receiver.hpp delete mode 100644 rts/lib/asio/include/asio/execution/detail/void_receiver.hpp delete mode 100644 rts/lib/asio/include/asio/execution/execute.hpp delete mode 100644 rts/lib/asio/include/asio/execution/impl/receiver_invocation_error.ipp delete mode 100644 rts/lib/asio/include/asio/execution/operation_state.hpp delete mode 100644 rts/lib/asio/include/asio/execution/receiver.hpp delete mode 100644 rts/lib/asio/include/asio/execution/receiver_invocation_error.hpp delete mode 100644 rts/lib/asio/include/asio/execution/schedule.hpp delete mode 100644 rts/lib/asio/include/asio/execution/scheduler.hpp delete mode 100644 rts/lib/asio/include/asio/execution/sender.hpp delete mode 100644 rts/lib/asio/include/asio/execution/set_done.hpp delete mode 100644 rts/lib/asio/include/asio/execution/set_error.hpp delete mode 100644 rts/lib/asio/include/asio/execution/set_value.hpp delete mode 100644 rts/lib/asio/include/asio/execution/start.hpp delete mode 100644 rts/lib/asio/include/asio/execution/submit.hpp delete mode 100644 rts/lib/asio/include/asio/handler_alloc_hook.hpp delete mode 100644 rts/lib/asio/include/asio/handler_invoke_hook.hpp delete mode 100644 rts/lib/asio/include/asio/impl/handler_alloc_hook.ipp delete mode 100644 rts/lib/asio/include/asio/traits/bulk_execute_free.hpp delete mode 100644 rts/lib/asio/include/asio/traits/bulk_execute_member.hpp delete mode 100644 rts/lib/asio/include/asio/traits/connect_free.hpp delete mode 100644 rts/lib/asio/include/asio/traits/connect_member.hpp delete mode 100644 rts/lib/asio/include/asio/traits/execute_free.hpp delete mode 100644 rts/lib/asio/include/asio/traits/schedule_free.hpp delete mode 100644 rts/lib/asio/include/asio/traits/schedule_member.hpp delete mode 100644 rts/lib/asio/include/asio/traits/set_done_free.hpp delete mode 100644 rts/lib/asio/include/asio/traits/set_done_member.hpp delete mode 100644 rts/lib/asio/include/asio/traits/set_error_free.hpp delete mode 100644 rts/lib/asio/include/asio/traits/set_error_member.hpp delete mode 100644 rts/lib/asio/include/asio/traits/set_value_free.hpp delete mode 100644 rts/lib/asio/include/asio/traits/set_value_member.hpp delete mode 100644 rts/lib/asio/include/asio/traits/start_free.hpp delete mode 100644 rts/lib/asio/include/asio/traits/start_member.hpp delete mode 100644 rts/lib/asio/include/asio/traits/submit_free.hpp delete mode 100644 rts/lib/asio/include/asio/traits/submit_member.hpp diff --git a/rts/lib/asio/include/Makefile.am b/rts/lib/asio/include/Makefile.am index d7a9b9c608..8f43766563 100644 --- a/rts/lib/asio/include/Makefile.am +++ b/rts/lib/asio/include/Makefile.am @@ -70,7 +70,6 @@ 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 \ @@ -100,14 +99,9 @@ nobase_include_HEADERS = \ 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 \ @@ -199,7 +193,6 @@ nobase_include_HEADERS = \ 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 \ @@ -271,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 \ @@ -298,14 +290,12 @@ nobase_include_HEADERS = \ asio/detail/tss_ptr.hpp \ asio/detail/type_traits.hpp \ asio/detail/utility.hpp \ - asio/detail/variadic_templates.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 \ @@ -356,38 +346,16 @@ 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 \ @@ -440,9 +408,7 @@ 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 \ @@ -466,7 +432,6 @@ nobase_include_HEADERS = \ 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 \ @@ -615,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 \ @@ -631,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 \ diff --git a/rts/lib/asio/include/Makefile.in b/rts/lib/asio/include/Makefile.in index 8ae22e5bd1..e71be1bf59 100644 --- a/rts/lib/asio/include/Makefile.in +++ b/rts/lib/asio/include/Makefile.in @@ -341,7 +341,6 @@ 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 \ @@ -371,14 +370,9 @@ nobase_include_HEADERS = \ 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 \ @@ -470,7 +464,6 @@ nobase_include_HEADERS = \ 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 \ @@ -542,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 \ @@ -569,14 +561,12 @@ nobase_include_HEADERS = \ asio/detail/tss_ptr.hpp \ asio/detail/type_traits.hpp \ asio/detail/utility.hpp \ - asio/detail/variadic_templates.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 \ @@ -627,38 +617,16 @@ 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 \ @@ -711,9 +679,7 @@ 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 \ @@ -737,7 +703,6 @@ nobase_include_HEADERS = \ 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 \ @@ -886,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 \ @@ -902,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 \ diff --git a/rts/lib/asio/include/asio.hpp b/rts/lib/asio/include/asio.hpp index a973ab178c..3421b58bda 100644 --- a/rts/lib/asio/include/asio.hpp +++ b/rts/lib/asio/include/asio.hpp @@ -2,7 +2,7 @@ // asio.hpp // ~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -81,30 +81,15 @@ #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" @@ -113,9 +98,7 @@ #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" diff --git a/rts/lib/asio/include/asio/any_completion_executor.hpp b/rts/lib/asio/include/asio/any_completion_executor.hpp index 420927cc1d..650ff7bafd 100644 --- a/rts/lib/asio/include/asio/any_completion_executor.hpp +++ b/rts/lib/asio/include/asio/any_completion_executor.hpp @@ -2,7 +2,7 @@ // any_completion_executor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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,20 +75,18 @@ class any_completion_executor : #endif // !defined(GENERATING_DOCUMENTATION) /// Default constructor. - ASIO_DECL any_completion_executor() ASIO_NOEXCEPT; + ASIO_DECL any_completion_executor() noexcept; /// Construct in an empty state. Equivalent effects to default constructor. - ASIO_DECL any_completion_executor(nullptr_t) ASIO_NOEXCEPT; + ASIO_DECL any_completion_executor(nullptr_t) noexcept; /// Copy constructor. ASIO_DECL any_completion_executor( - const any_completion_executor& e) ASIO_NOEXCEPT; + const any_completion_executor& e) noexcept; -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Move constructor. ASIO_DECL any_completion_executor( - any_completion_executor&& e) ASIO_NOEXCEPT; -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + any_completion_executor&& e) noexcept; /// Construct to point to the same target as another any_executor. #if defined(GENERATING_DOCUMENTATION) @@ -98,7 +96,7 @@ class any_completion_executor : #else // defined(GENERATING_DOCUMENTATION) template any_completion_executor(OtherAnyExecutor e, - typename constraint< + constraint_t< conditional< !is_same::value && is_base_of, false_type >::type::value - >::type = 0) - : base_type(ASIO_MOVE_CAST(OtherAnyExecutor)(e)) + > = 0) + : base_type(static_cast(e)) { } #endif // defined(GENERATING_DOCUMENTATION) @@ -122,7 +120,7 @@ class any_completion_executor : #else // defined(GENERATING_DOCUMENTATION) template any_completion_executor(std::nothrow_t, OtherAnyExecutor e, - typename constraint< + constraint_t< conditional< !is_same::value && is_base_of, false_type >::type::value - >::type = 0) ASIO_NOEXCEPT - : base_type(std::nothrow, ASIO_MOVE_CAST(OtherAnyExecutor)(e)) + > = 0) noexcept + : base_type(std::nothrow, static_cast(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) ASIO_NOEXCEPT; + const any_completion_executor& e) noexcept; -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Construct to point to the same target as another any_executor. ASIO_DECL any_completion_executor(std::nothrow_t, - any_completion_executor&& e) ASIO_NOEXCEPT; -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + any_completion_executor&& e) noexcept; /// Construct a polymorphic wrapper for the specified executor. #if defined(GENERATING_DOCUMENTATION) @@ -155,7 +151,7 @@ class any_completion_executor : #else // defined(GENERATING_DOCUMENTATION) template any_completion_executor(Executor e, - typename constraint< + constraint_t< conditional< !is_same::value && !is_base_of, false_type >::type::value - >::type = 0) - : base_type(ASIO_MOVE_CAST(Executor)(e)) + > = 0) + : base_type(static_cast(e)) { } #endif // defined(GENERATING_DOCUMENTATION) @@ -177,7 +173,7 @@ class any_completion_executor : #else // defined(GENERATING_DOCUMENTATION) template any_completion_executor(std::nothrow_t, Executor e, - typename constraint< + constraint_t< conditional< !is_same::value && !is_base_of, false_type >::type::value - >::type = 0) ASIO_NOEXCEPT - : base_type(std::nothrow, ASIO_MOVE_CAST(Executor)(e)) + > = 0) noexcept + : base_type(std::nothrow, static_cast(e)) { } #endif // defined(GENERATING_DOCUMENTATION) /// Assignment operator. ASIO_DECL any_completion_executor& operator=( - const any_completion_executor& e) ASIO_NOEXCEPT; + const any_completion_executor& e) noexcept; -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Move assignment operator. ASIO_DECL any_completion_executor& operator=( - any_completion_executor&& e) ASIO_NOEXCEPT; -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + any_completion_executor&& e) noexcept; /// Assignment operator that sets the polymorphic wrapper to the empty state. ASIO_DECL any_completion_executor& operator=(nullptr_t); @@ -209,7 +203,7 @@ class any_completion_executor : ASIO_DECL ~any_completion_executor(); /// Swap targets with another polymorphic wrapper. - ASIO_DECL void swap(any_completion_executor& other) ASIO_NOEXCEPT; + ASIO_DECL void swap(any_completion_executor& other) noexcept; /// Obtain a polymorphic wrapper with the specified property. /** @@ -222,9 +216,9 @@ class any_completion_executor : */ template any_completion_executor require(const Property& p, - typename constraint< + constraint_t< traits::require_member::is_valid - >::type = 0) const + > = 0) const { return static_cast(*this).require(p); } @@ -240,9 +234,9 @@ class any_completion_executor : */ template any_completion_executor prefer(const Property& p, - typename constraint< + constraint_t< traits::prefer_member::is_valid - >::type = 0) const + > = 0) const { return static_cast(*this).prefer(p); } diff --git a/rts/lib/asio/include/asio/any_completion_handler.hpp b/rts/lib/asio/include/asio/any_completion_handler.hpp index cd114537ff..45b3e75fec 100644 --- a/rts/lib/asio/include/asio/any_completion_handler.hpp +++ b/rts/lib/asio/include/asio/any_completion_handler.hpp @@ -2,7 +2,7 @@ // any_completion_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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,20 +12,16 @@ #define ASIO_ANY_COMPLETION_HANDLER_HPP #include "asio/detail/config.hpp" - -#if (defined(ASIO_HAS_STD_TUPLE) \ - && defined(ASIO_HAS_MOVE) \ - && defined(ASIO_HAS_VARIADIC_TEMPLATES)) \ - || defined(GENERATING_DOCUMENTATION) - #include #include #include #include #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" @@ -39,11 +35,11 @@ class any_completion_handler_impl_base public: template explicit any_completion_handler_impl_base(S&& slot) - : cancel_state_(ASIO_MOVE_CAST(S)(slot), enable_total_cancellation()) + : cancel_state_(static_cast(slot), enable_total_cancellation()) { } - cancellation_slot get_cancellation_slot() const ASIO_NOEXCEPT + cancellation_slot get_cancellation_slot() const noexcept { return cancel_state_.slot(); } @@ -59,8 +55,8 @@ class any_completion_handler_impl : public: template any_completion_handler_impl(S&& slot, H&& h) - : any_completion_handler_impl_base(ASIO_MOVE_CAST(S)(slot)), - handler_(ASIO_MOVE_CAST(H)(h)) + : any_completion_handler_impl_base(static_cast(slot)), + handler_(static_cast(h)) { } @@ -103,7 +99,7 @@ class any_completion_handler_impl : any_completion_handler_impl* ptr = new (uninit_ptr.get()) any_completion_handler_impl( - ASIO_MOVE_CAST(S)(slot), ASIO_MOVE_CAST(H)(h)); + static_cast(slot), static_cast(h)); uninit_ptr.release(); return ptr; @@ -119,12 +115,19 @@ class any_completion_handler_impl : } any_completion_executor executor( - const any_completion_executor& candidate) const ASIO_NOEXCEPT + 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< @@ -180,11 +183,11 @@ class any_completion_handler_impl : asio::recycling_allocator())}; std::unique_ptr ptr(this, d); - Handler handler(ASIO_MOVE_CAST(Handler)(handler_)); + Handler handler(static_cast(handler_)); ptr.reset(); - ASIO_MOVE_CAST(Handler)(handler)( - ASIO_MOVE_CAST(Args)(args)...); + static_cast(handler)( + static_cast(args)...); } private: @@ -207,14 +210,14 @@ class any_completion_handler_call_fn void call(any_completion_handler_impl_base* impl, Args... args) const { - call_fn_(impl, ASIO_MOVE_CAST(Args)(args)...); + call_fn_(impl, static_cast(args)...); } template static void impl(any_completion_handler_impl_base* impl, Args... args) { static_cast*>(impl)->call( - ASIO_MOVE_CAST(Args)(args)...); + static_cast(args)...); } private: @@ -305,6 +308,36 @@ class any_completion_handler_executor_fn 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 + static any_completion_executor impl(any_completion_handler_impl_base* impl, + const any_io_executor& candidate) + { + return static_cast*>( + impl)->immediate_executor(candidate); + } + +private: + type immediate_executor_fn_; +}; + class any_completion_handler_allocate_fn { public: @@ -367,6 +400,7 @@ template 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 @@ -376,11 +410,13 @@ class any_completion_handler_fn_table 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(call_fns...) @@ -389,6 +425,7 @@ class any_completion_handler_fn_table 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::call; @@ -401,6 +438,7 @@ struct any_completion_handler_fn_table_instance value = any_completion_handler_fn_table( &any_completion_handler_destroy_fn::impl, &any_completion_handler_executor_fn::impl, + &any_completion_handler_immediate_executor_fn::impl, &any_completion_handler_allocate_fn::impl, &any_completion_handler_deallocate_fn::impl, &any_completion_handler_call_fn::template impl...); @@ -431,7 +469,7 @@ class any_completion_handler_allocator detail::any_completion_handler_impl_base* impl_; constexpr any_completion_handler_allocator(int, - const any_completion_handler& h) ASIO_NOEXCEPT + const any_completion_handler& h) noexcept : fn_table_(h.fn_table_), impl_(h.impl_) { @@ -453,7 +491,7 @@ class any_completion_handler_allocator template constexpr any_completion_handler_allocator( const any_completion_handler_allocator& a) - ASIO_NOEXCEPT + noexcept : fn_table_(a.fn_table_), impl_(a.impl_) { @@ -461,14 +499,14 @@ class any_completion_handler_allocator /// Equality operator. constexpr bool operator==( - const any_completion_handler_allocator& other) const ASIO_NOEXCEPT + 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 ASIO_NOEXCEPT + const any_completion_handler_allocator& other) const noexcept { return fn_table_ != other.fn_table_ || impl_ != other.impl_; } @@ -476,9 +514,15 @@ class any_completion_handler_allocator /// Allocate space for @c n objects of the allocator's value type. T* allocate(std::size_t n) const { - return static_cast( - fn_table_->allocate( - impl_, sizeof(T) * n, alignof(T))); + if (fn_table_) + { + return static_cast( + 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. @@ -505,7 +549,7 @@ class any_completion_handler_allocator detail::any_completion_handler_impl_base* impl_; constexpr any_completion_handler_allocator(int, - const any_completion_handler& h) ASIO_NOEXCEPT + const any_completion_handler& h) noexcept : fn_table_(h.fn_table_), impl_(h.impl_) { @@ -527,7 +571,7 @@ class any_completion_handler_allocator template constexpr any_completion_handler_allocator( const any_completion_handler_allocator& a) - ASIO_NOEXCEPT + noexcept : fn_table_(a.fn_table_), impl_(a.impl_) { @@ -535,14 +579,14 @@ class any_completion_handler_allocator /// Equality operator. constexpr bool operator==( - const any_completion_handler_allocator& other) const ASIO_NOEXCEPT + 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 ASIO_NOEXCEPT + const any_completion_handler_allocator& other) const noexcept { return fn_table_ != other.fn_table_ || impl_ != other.impl_; } @@ -576,6 +620,9 @@ class any_completion_handler template friend struct associated_executor; + template + friend struct associated_immediate_executor; + const detail::any_completion_handler_fn_table* fn_table_; detail::any_completion_handler_impl_base* impl_; #endif // !defined(GENERATING_DOCUMENTATION) @@ -604,16 +651,16 @@ class any_completion_handler } /// Construct an @c any_completion_handler to contain the specified target. - template ::type> + template > any_completion_handler(H&& h, - typename constraint< - !is_same::type, any_completion_handler>::value - >::type = 0) + constraint_t< + !is_same, any_completion_handler>::value + > = 0) : fn_table_( &detail::any_completion_handler_fn_table_instance< Handler, Signatures...>::value), impl_(detail::any_completion_handler_impl::create( - (get_associated_cancellation_slot)(h), ASIO_MOVE_CAST(H)(h))) + (get_associated_cancellation_slot)(h), static_cast(h))) { } @@ -621,7 +668,7 @@ class any_completion_handler /** * After the operation, the moved-from object @c other has no target. */ - any_completion_handler(any_completion_handler&& other) ASIO_NOEXCEPT + any_completion_handler(any_completion_handler&& other) noexcept : fn_table_(other.fn_table_), impl_(other.impl_) { @@ -634,15 +681,15 @@ class any_completion_handler * After the operation, the moved-from object @c other has no target. */ any_completion_handler& operator=( - any_completion_handler&& other) ASIO_NOEXCEPT + any_completion_handler&& other) noexcept { any_completion_handler( - ASIO_MOVE_CAST(any_completion_handler)(other)).swap(*this); + static_cast(other)).swap(*this); return *this; } /// Assignment operator that sets the polymorphic wrapper to the empty state. - any_completion_handler& operator=(nullptr_t) ASIO_NOEXCEPT + any_completion_handler& operator=(nullptr_t) noexcept { any_completion_handler().swap(*this); return *this; @@ -656,34 +703,34 @@ class any_completion_handler } /// Test if the polymorphic wrapper is empty. - constexpr explicit operator bool() const ASIO_NOEXCEPT + constexpr explicit operator bool() const noexcept { return impl_ != nullptr; } /// Test if the polymorphic wrapper is non-empty. - constexpr bool operator!() const ASIO_NOEXCEPT + 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) ASIO_NOEXCEPT + 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 ASIO_NOEXCEPT + allocator_type get_allocator() const noexcept { return allocator_type(0, *this); } /// Get the associated cancellation slot. - cancellation_slot_type get_cancellation_slot() const ASIO_NOEXCEPT + cancellation_slot_type get_cancellation_slot() const noexcept { - return impl_->get_cancellation_slot(); + return impl_ ? impl_->get_cancellation_slot() : cancellation_slot_type(); } /// Function call operator. @@ -697,12 +744,12 @@ class any_completion_handler */ template auto operator()(Args&&... args) - -> decltype(fn_table_->call(impl_, ASIO_MOVE_CAST(Args)(args)...)) + -> decltype(fn_table_->call(impl_, static_cast(args)...)) { if (detail::any_completion_handler_impl_base* impl = impl_) { impl_ = nullptr; - return fn_table_->call(impl, ASIO_MOVE_CAST(Args)(args)...); + return fn_table_->call(impl, static_cast(args)...); } std::bad_function_call ex; asio::detail::throw_exception(ex); @@ -710,28 +757,28 @@ class any_completion_handler /// Equality operator. friend constexpr bool operator==( - const any_completion_handler& a, nullptr_t) ASIO_NOEXCEPT + 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) ASIO_NOEXCEPT + 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) ASIO_NOEXCEPT + 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) ASIO_NOEXCEPT + nullptr_t, const any_completion_handler& b) noexcept { return nullptr != b.impl_; } @@ -743,10 +790,28 @@ struct associated_executor, Candidate> using type = any_completion_executor; static type get(const any_completion_handler& handler, - const Candidate& candidate = Candidate()) ASIO_NOEXCEPT + const Candidate& candidate = Candidate()) noexcept { - return handler.fn_table_->executor(handler.impl_, - any_completion_executor(std::nothrow, candidate)); + any_completion_executor any_candidate(std::nothrow, candidate); + return handler.fn_table_ + ? handler.fn_table_->executor(handler.impl_, any_candidate) + : any_candidate; + } +}; + +template +struct associated_immediate_executor< + any_completion_handler, Candidate> +{ + using type = any_completion_executor; + + static type get(const any_completion_handler& 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; } }; @@ -754,9 +819,4 @@ struct associated_executor, Candidate> #include "asio/detail/pop_options.hpp" -#endif // (defined(ASIO_HAS_STD_TUPLE) - // && defined(ASIO_HAS_MOVE) - // && defined(ASIO_HAS_VARIADIC_TEMPLATES)) - // || defined(GENERATING_DOCUMENTATION) - #endif // ASIO_ANY_COMPLETION_HANDLER_HPP diff --git a/rts/lib/asio/include/asio/any_io_executor.hpp b/rts/lib/asio/include/asio/any_io_executor.hpp index 7a77c90d12..d35acf44ae 100644 --- a/rts/lib/asio/include/asio/any_io_executor.hpp +++ b/rts/lib/asio/include/asio/any_io_executor.hpp @@ -2,7 +2,7 @@ // any_io_executor.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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,18 +87,16 @@ class any_io_executor : #endif // !defined(GENERATING_DOCUMENTATION) /// Default constructor. - ASIO_DECL any_io_executor() ASIO_NOEXCEPT; + ASIO_DECL any_io_executor() noexcept; /// Construct in an empty state. Equivalent effects to default constructor. - ASIO_DECL any_io_executor(nullptr_t) ASIO_NOEXCEPT; + ASIO_DECL any_io_executor(nullptr_t) noexcept; /// Copy constructor. - ASIO_DECL any_io_executor(const any_io_executor& e) ASIO_NOEXCEPT; + ASIO_DECL any_io_executor(const any_io_executor& e) noexcept; -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Move constructor. - ASIO_DECL any_io_executor(any_io_executor&& e) ASIO_NOEXCEPT; -#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) @@ -107,8 +105,8 @@ class any_io_executor : #else // defined(GENERATING_DOCUMENTATION) template any_io_executor(OtherAnyExecutor e, - typename constraint< - conditional< + constraint_t< + conditional_t< !is_same::value && is_base_of::value, @@ -116,9 +114,9 @@ class any_io_executor : 0, supportable_properties_type>::template is_valid_target, false_type - >::type::value - >::type = 0) - : base_type(ASIO_MOVE_CAST(OtherAnyExecutor)(e)) + >::value + > = 0) + : base_type(static_cast(e)) { } #endif // defined(GENERATING_DOCUMENTATION) @@ -131,8 +129,8 @@ class any_io_executor : #else // defined(GENERATING_DOCUMENTATION) template any_io_executor(std::nothrow_t, OtherAnyExecutor e, - typename constraint< - conditional< + constraint_t< + conditional_t< !is_same::value && is_base_of::value, @@ -140,22 +138,19 @@ class any_io_executor : 0, supportable_properties_type>::template is_valid_target, false_type - >::type::value - >::type = 0) ASIO_NOEXCEPT - : base_type(std::nothrow, ASIO_MOVE_CAST(OtherAnyExecutor)(e)) + >::value + > = 0) noexcept + : base_type(std::nothrow, static_cast(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) ASIO_NOEXCEPT; + const any_io_executor& e) noexcept; -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Construct to point to the same target as another any_executor. - ASIO_DECL any_io_executor(std::nothrow_t, - any_io_executor&& e) ASIO_NOEXCEPT; -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + 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) @@ -164,17 +159,17 @@ class any_io_executor : #else // defined(GENERATING_DOCUMENTATION) template any_io_executor(Executor e, - typename constraint< - conditional< + constraint_t< + conditional_t< !is_same::value && !is_base_of::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(e)) { } #endif // defined(GENERATING_DOCUMENTATION) @@ -186,30 +181,27 @@ class any_io_executor : #else // defined(GENERATING_DOCUMENTATION) template any_io_executor(std::nothrow_t, Executor e, - typename constraint< - conditional< + constraint_t< + conditional_t< !is_same::value && !is_base_of::value, execution::detail::is_valid_target_executor< Executor, supportable_properties_type>, false_type - >::type::value - >::type = 0) ASIO_NOEXCEPT - : base_type(std::nothrow, ASIO_MOVE_CAST(Executor)(e)) + >::value + > = 0) noexcept + : base_type(std::nothrow, static_cast(e)) { } #endif // defined(GENERATING_DOCUMENTATION) /// Assignment operator. ASIO_DECL any_io_executor& operator=( - const any_io_executor& e) ASIO_NOEXCEPT; + const any_io_executor& e) noexcept; -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Move assignment operator. - ASIO_DECL any_io_executor& operator=( - any_io_executor&& e) ASIO_NOEXCEPT; -#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. ASIO_DECL any_io_executor& operator=(nullptr_t); @@ -218,7 +210,7 @@ class any_io_executor : ASIO_DECL ~any_io_executor(); /// Swap targets with another polymorphic wrapper. - ASIO_DECL void swap(any_io_executor& other) ASIO_NOEXCEPT; + ASIO_DECL void swap(any_io_executor& other) noexcept; /// Obtain a polymorphic wrapper with the specified property. /** @@ -231,9 +223,9 @@ class any_io_executor : */ template any_io_executor require(const Property& p, - typename constraint< + constraint_t< traits::require_member::is_valid - >::type = 0) const + > = 0) const { return static_cast(*this).require(p); } @@ -249,9 +241,9 @@ class any_io_executor : */ template any_io_executor prefer(const Property& p, - typename constraint< + constraint_t< traits::prefer_member::is_valid - >::type = 0) const + > = 0) const { return static_cast(*this).prefer(p); } diff --git a/rts/lib/asio/include/asio/append.hpp b/rts/lib/asio/include/asio/append.hpp index 9ac4a95044..0460892428 100644 --- a/rts/lib/asio/include/asio/append.hpp +++ b/rts/lib/asio/include/asio/append.hpp @@ -2,7 +2,7 @@ // append.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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,11 +16,6 @@ #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include "asio/detail/config.hpp" - -#if (defined(ASIO_HAS_STD_TUPLE) \ - && defined(ASIO_HAS_VARIADIC_TEMPLATES)) \ - || defined(GENERATING_DOCUMENTATION) - #include #include "asio/detail/type_traits.hpp" @@ -37,11 +32,9 @@ class append_t public: /// Constructor. template - 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)...) + constexpr explicit append_t(T&& completion_token, V&&... values) + : token_(static_cast(completion_token)), + values_(static_cast(values)...) { } @@ -54,15 +47,13 @@ class append_t /// arguments should be passed additional values after the results of the /// operation. template -ASIO_NODISCARD inline ASIO_CONSTEXPR append_t< - typename decay::type, typename decay::type...> -append(ASIO_MOVE_ARG(CompletionToken) completion_token, - ASIO_MOVE_ARG(Values)... values) +ASIO_NODISCARD inline constexpr +append_t, decay_t...> +append(CompletionToken&& completion_token, Values&&... values) { - return append_t< - typename decay::type, typename decay::type...>( - ASIO_MOVE_CAST(CompletionToken)(completion_token), - ASIO_MOVE_CAST(Values)(values)...); + return append_t, decay_t...>( + static_cast(completion_token), + static_cast(values)...); } } // namespace asio @@ -71,8 +62,4 @@ append(ASIO_MOVE_ARG(CompletionToken) completion_token, #include "asio/impl/append.hpp" -#endif // (defined(ASIO_HAS_STD_TUPLE) - // && defined(ASIO_HAS_VARIADIC_TEMPLATES)) - // || defined(GENERATING_DOCUMENTATION) - #endif // ASIO_APPEND_HPP diff --git a/rts/lib/asio/include/asio/as_tuple.hpp b/rts/lib/asio/include/asio/as_tuple.hpp index 96ac47c82e..60008bda5c 100644 --- a/rts/lib/asio/include/asio/as_tuple.hpp +++ b/rts/lib/asio/include/asio/as_tuple.hpp @@ -2,7 +2,7 @@ // as_tuple.hpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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,11 +16,6 @@ #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include "asio/detail/config.hpp" - -#if (defined(ASIO_HAS_STD_TUPLE) \ - && defined(ASIO_HAS_VARIADIC_TEMPLATES)) \ - || defined(GENERATING_DOCUMENTATION) - #include "asio/detail/type_traits.hpp" #include "asio/detail/push_options.hpp" @@ -50,18 +45,18 @@ class as_tuple_t * token is itself defaulted as an argument to allow it to capture a source * location. */ - ASIO_CONSTEXPR as_tuple_t( + constexpr as_tuple_t( default_constructor_tag = default_constructor_tag(), CompletionToken token = CompletionToken()) - : token_(ASIO_MOVE_CAST(CompletionToken)(token)) + : token_(static_cast(token)) { } /// Constructor. template - ASIO_CONSTEXPR explicit as_tuple_t( - ASIO_MOVE_ARG(T) completion_token) - : token_(ASIO_MOVE_CAST(T)(completion_token)) + constexpr explicit as_tuple_t( + T&& completion_token) + : token_(static_cast(completion_token)) { } @@ -76,13 +71,13 @@ class as_tuple_t /// Construct the adapted executor from the inner executor type. template executor_with_default(const InnerExecutor1& ex, - typename constraint< - conditional< + constraint_t< + conditional_t< !is_same::value, is_convertible, false_type - >::type::value - >::type = 0) ASIO_NOEXCEPT + >::value + > = 0) noexcept : InnerExecutor(ex) { } @@ -90,25 +85,21 @@ class as_tuple_t /// 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 using as_default_on_t = typename T::template rebind_executor< - executor_with_default >::other; -#endif // defined(ASIO_HAS_ALIAS_TEMPLATES) - // || defined(GENERATING_DOCUMENTATION) + executor_with_default>::other; /// Function helper to adapt an I/O object to use @c as_tuple_t as its /// default completion token type. template - static typename decay::type::template rebind_executor< - executor_with_default::type::executor_type> + static typename decay_t::template rebind_executor< + executor_with_default::executor_type> >::other - as_default_on(ASIO_MOVE_ARG(T) object) + as_default_on(T&& object) { - return typename decay::type::template rebind_executor< - executor_with_default::type::executor_type> - >::other(ASIO_MOVE_CAST(T)(object)); + return typename decay_t::template rebind_executor< + executor_with_default::executor_type> + >::other(static_cast(object)); } //private: @@ -119,11 +110,11 @@ class as_tuple_t /// arguments should be combined into a single tuple argument. template ASIO_NODISCARD inline -ASIO_CONSTEXPR as_tuple_t::type> -as_tuple(ASIO_MOVE_ARG(CompletionToken) completion_token) +constexpr as_tuple_t> +as_tuple(CompletionToken&& completion_token) { - return as_tuple_t::type>( - ASIO_MOVE_CAST(CompletionToken)(completion_token)); + return as_tuple_t>( + static_cast(completion_token)); } } // namespace asio @@ -132,8 +123,4 @@ as_tuple(ASIO_MOVE_ARG(CompletionToken) completion_token) #include "asio/impl/as_tuple.hpp" -#endif // (defined(ASIO_HAS_STD_TUPLE) - // && defined(ASIO_HAS_VARIADIC_TEMPLATES)) - // || defined(GENERATING_DOCUMENTATION) - #endif // ASIO_AS_TUPLE_HPP diff --git a/rts/lib/asio/include/asio/associated_allocator.hpp b/rts/lib/asio/include/asio/associated_allocator.hpp index 8e864673cd..f21ea250ef 100644 --- a/rts/lib/asio/include/asio/associated_allocator.hpp +++ b/rts/lib/asio/include/asio/associated_allocator.hpp @@ -2,7 +2,7 @@ // associated_allocator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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,9 +36,7 @@ struct has_allocator_type : false_type }; template -struct has_allocator_type::type> - : true_type +struct has_allocator_type> : true_type { }; @@ -49,33 +47,30 @@ struct associated_allocator_impl typedef A type; - static type get(const T&) ASIO_NOEXCEPT + static type get(const T&) noexcept { return type(); } - static const type& get(const T&, const A& a) ASIO_NOEXCEPT + static const type& get(const T&, const A& a) noexcept { return a; } }; template -struct associated_allocator_impl::type> +struct associated_allocator_impl> { typedef typename T::allocator_type type; - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get( - const T& t) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX((t.get_allocator())) + static auto get(const T& t) noexcept + -> decltype(t.get_allocator()) { return t.get_allocator(); } - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get( - const T& t, const A&) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX((t.get_allocator())) + static auto get(const T& t, const A&) noexcept + -> decltype(t.get_allocator()) { return t.get_allocator(); } @@ -83,12 +78,12 @@ struct associated_allocator_impl struct associated_allocator_impl::value - >::type, - typename void_type< + >, + void_t< typename associator::type - >::type> : associator + >> : associator { }; @@ -115,7 +110,7 @@ struct associated_allocator_impl > +template > struct associated_allocator #if !defined(GENERATING_DOCUMENTATION) : detail::associated_allocator_impl @@ -128,11 +123,11 @@ struct associated_allocator /// If @c T has a nested type @c allocator_type, returns /// t.get_allocator(). Otherwise returns @c type(). - static decltype(auto) get(const T& t) ASIO_NOEXCEPT; + static decltype(auto) get(const T& t) noexcept; /// If @c T has a nested type @c allocator_type, returns /// t.get_allocator(). Otherwise returns @c a. - static decltype(auto) get(const T& t, const Allocator& a) ASIO_NOEXCEPT; + static decltype(auto) get(const T& t, const Allocator& a) noexcept; #endif // defined(GENERATING_DOCUMENTATION) }; @@ -142,7 +137,7 @@ struct associated_allocator */ template ASIO_NODISCARD inline typename associated_allocator::type -get_associated_allocator(const T& t) ASIO_NOEXCEPT +get_associated_allocator(const T& t) noexcept { return associated_allocator::get(t); } @@ -152,23 +147,17 @@ get_associated_allocator(const T& t) ASIO_NOEXCEPT * @returns associated_allocator::get(t, a) */ template -ASIO_NODISCARD inline ASIO_AUTO_RETURN_TYPE_PREFIX2( - typename associated_allocator::type) -get_associated_allocator(const T& t, const Allocator& a) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX(( - associated_allocator::get(t, a))) +ASIO_NODISCARD inline auto get_associated_allocator( + const T& t, const Allocator& a) noexcept + -> decltype(associated_allocator::get(t, a)) { return associated_allocator::get(t, a); } -#if defined(ASIO_HAS_ALIAS_TEMPLATES) - -template > +template > using associated_allocator_t = typename associated_allocator::type; -#endif // defined(ASIO_HAS_ALIAS_TEMPLATES) - namespace detail { template @@ -178,22 +167,19 @@ struct associated_allocator_forwarding_base template struct associated_allocator_forwarding_base::asio_associated_allocator_is_unspecialised, void >::value - >::type> + >> { typedef void asio_associated_allocator_is_unspecialised; }; } // namespace detail -#if defined(ASIO_HAS_STD_REFERENCE_WRAPPER) \ - || defined(GENERATING_DOCUMENTATION) - /// Specialisation of associated_allocator for @c std::reference_wrapper. template struct associated_allocator, Allocator> @@ -207,25 +193,20 @@ struct associated_allocator, Allocator> /// Forwards the request to get the allocator to the associator specialisation /// for the unwrapped type @c T. - static type get(reference_wrapper t) ASIO_NOEXCEPT + static type get(reference_wrapper t) noexcept { return associated_allocator::get(t.get()); } /// Forwards the request to get the allocator to the associator specialisation /// for the unwrapped type @c T. - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get( - reference_wrapper t, const Allocator& a) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX(( - associated_allocator::get(t.get(), a))) + static auto get(reference_wrapper t, const Allocator& a) noexcept + -> decltype(associated_allocator::get(t.get(), a)) { return associated_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/rts/lib/asio/include/asio/associated_cancellation_slot.hpp b/rts/lib/asio/include/asio/associated_cancellation_slot.hpp index 65d82b646b..518bd881ea 100644 --- a/rts/lib/asio/include/asio/associated_cancellation_slot.hpp +++ b/rts/lib/asio/include/asio/associated_cancellation_slot.hpp @@ -2,7 +2,7 @@ // associated_cancellation_slot.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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,9 +36,8 @@ struct has_cancellation_slot_type : false_type }; template -struct has_cancellation_slot_type::type> - : true_type +struct has_cancellation_slot_type> + : true_type { }; @@ -49,12 +48,12 @@ struct associated_cancellation_slot_impl typedef S type; - static type get(const T&) ASIO_NOEXCEPT + static type get(const T&) noexcept { return type(); } - static const type& get(const T&, const S& s) ASIO_NOEXCEPT + static const type& get(const T&, const S& s) noexcept { return s; } @@ -62,20 +61,18 @@ struct associated_cancellation_slot_impl template struct associated_cancellation_slot_impl::type> + void_t> { typedef typename T::cancellation_slot_type type; - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get( - const T& t) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX((t.get_cancellation_slot())) + static auto get(const T& t) noexcept + -> decltype(t.get_cancellation_slot()) { return t.get_cancellation_slot(); } - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get( - const T& t, const S&) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX((t.get_cancellation_slot())) + static auto get(const T& t, const S&) noexcept + -> decltype(t.get_cancellation_slot()) { return t.get_cancellation_slot(); } @@ -83,12 +80,12 @@ struct associated_cancellation_slot_impl struct associated_cancellation_slot_impl::value - >::type, - typename void_type< + >, + void_t< typename associator::type - >::type> : associator + >> : associator { }; @@ -129,12 +126,12 @@ struct associated_cancellation_slot /// If @c T has a nested type @c cancellation_slot_type, returns /// t.get_cancellation_slot(). Otherwise returns @c type(). - static decltype(auto) get(const T& t) ASIO_NOEXCEPT; + static decltype(auto) get(const T& t) noexcept; /// If @c T has a nested type @c cancellation_slot_type, returns /// t.get_cancellation_slot(). Otherwise returns @c s. static decltype(auto) get(const T& t, - const CancellationSlot& s) ASIO_NOEXCEPT; + const CancellationSlot& s) noexcept; #endif // defined(GENERATING_DOCUMENTATION) }; @@ -144,7 +141,7 @@ struct associated_cancellation_slot */ template ASIO_NODISCARD inline typename associated_cancellation_slot::type -get_associated_cancellation_slot(const T& t) ASIO_NOEXCEPT +get_associated_cancellation_slot(const T& t) noexcept { return associated_cancellation_slot::get(t); } @@ -155,24 +152,17 @@ get_associated_cancellation_slot(const T& t) ASIO_NOEXCEPT * CancellationSlot>::get(t, st) */ template -ASIO_NODISCARD inline ASIO_AUTO_RETURN_TYPE_PREFIX2( - typename associated_cancellation_slot::type) -get_associated_cancellation_slot(const T& t, - const CancellationSlot& st) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX(( - associated_cancellation_slot::get(t, st))) +ASIO_NODISCARD inline auto get_associated_cancellation_slot( + const T& t, const CancellationSlot& st) noexcept + -> decltype(associated_cancellation_slot::get(t, st)) { return associated_cancellation_slot::get(t, st); } -#if defined(ASIO_HAS_ALIAS_TEMPLATES) - template using associated_cancellation_slot_t = typename associated_cancellation_slot::type; -#endif // defined(ASIO_HAS_ALIAS_TEMPLATES) - namespace detail { template @@ -182,22 +172,19 @@ struct associated_cancellation_slot_forwarding_base template struct associated_cancellation_slot_forwarding_base::asio_associated_cancellation_slot_is_unspecialised, void >::value - >::type> + >> { typedef void asio_associated_cancellation_slot_is_unspecialised; }; } // namespace detail -#if defined(ASIO_HAS_STD_REFERENCE_WRAPPER) \ - || defined(GENERATING_DOCUMENTATION) - /// Specialisation of associated_cancellation_slot for @c /// std::reference_wrapper. template @@ -212,25 +199,21 @@ struct associated_cancellation_slot, CancellationSlot> /// Forwards the request to get the cancellation slot to the associator /// specialisation for the unwrapped type @c T. - static type get(reference_wrapper t) ASIO_NOEXCEPT + static type get(reference_wrapper t) noexcept { return associated_cancellation_slot::get(t.get()); } /// Forwards the request to get the cancellation slot to the associator /// specialisation for the unwrapped type @c T. - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get(reference_wrapper t, - const CancellationSlot& s) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX(( - associated_cancellation_slot::get(t.get(), s))) + static auto get(reference_wrapper t, const CancellationSlot& s) noexcept + -> decltype( + associated_cancellation_slot::get(t.get(), s)) { return associated_cancellation_slot::get(t.get(), s); } }; -#endif // defined(ASIO_HAS_STD_REFERENCE_WRAPPER) - // || defined(GENERATING_DOCUMENTATION) - } // namespace asio #include "asio/detail/pop_options.hpp" diff --git a/rts/lib/asio/include/asio/associated_executor.hpp b/rts/lib/asio/include/asio/associated_executor.hpp index 92279891d6..4ca7ba149e 100644 --- a/rts/lib/asio/include/asio/associated_executor.hpp +++ b/rts/lib/asio/include/asio/associated_executor.hpp @@ -2,7 +2,7 @@ // associated_executor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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 -struct has_executor_type::type> +struct has_executor_type> : true_type { }; @@ -51,33 +50,30 @@ struct associated_executor_impl typedef E type; - static type get(const T&) ASIO_NOEXCEPT + static type get(const T&) noexcept { return type(); } - static const type& get(const T&, const E& e) ASIO_NOEXCEPT + static const type& get(const T&, const E& e) noexcept { return e; } }; template -struct associated_executor_impl::type> +struct associated_executor_impl> { typedef typename T::executor_type type; - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get( - const T& t) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX((t.get_executor())) + static auto get(const T& t) noexcept + -> decltype(t.get_executor()) { return t.get_executor(); } - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get( - const T& t, const E&) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX((t.get_executor())) + static auto get(const T& t, const E&) noexcept + -> decltype(t.get_executor()) { return t.get_executor(); } @@ -85,12 +81,12 @@ struct associated_executor_impl struct associated_executor_impl::value - >::type, - typename void_type< + >, + void_t< typename associator::type - >::type> : associator + >> : associator { }; @@ -130,11 +126,11 @@ struct associated_executor /// If @c T has a nested type @c executor_type, returns /// t.get_executor(). Otherwise returns @c type(). - static decltype(auto) get(const T& t) ASIO_NOEXCEPT; + static decltype(auto) get(const T& t) noexcept; /// If @c T has a nested type @c executor_type, returns /// t.get_executor(). Otherwise returns @c ex. - static decltype(auto) get(const T& t, const Executor& ex) ASIO_NOEXCEPT; + static decltype(auto) get(const T& t, const Executor& ex) noexcept; #endif // defined(GENERATING_DOCUMENTATION) }; @@ -144,7 +140,7 @@ struct associated_executor */ template ASIO_NODISCARD inline typename associated_executor::type -get_associated_executor(const T& t) ASIO_NOEXCEPT +get_associated_executor(const T& t) noexcept { return associated_executor::get(t); } @@ -154,14 +150,12 @@ get_associated_executor(const T& t) ASIO_NOEXCEPT * @returns associated_executor::get(t, ex) */ template -ASIO_NODISCARD inline ASIO_AUTO_RETURN_TYPE_PREFIX2( - typename associated_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::value || execution::is_executor::value - >::type = 0) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX(( - associated_executor::get(t, ex))) + > = 0) noexcept + -> decltype(associated_executor::get(t, ex)) { return associated_executor::get(t, ex); } @@ -175,20 +169,16 @@ template ASIO_NODISCARD inline typename associated_executor::type get_associated_executor(const T& t, ExecutionContext& ctx, - typename constraint::value>::type = 0) ASIO_NOEXCEPT + constraint_t::value> = 0) noexcept { return associated_executor::get(t, ctx.get_executor()); } -#if defined(ASIO_HAS_ALIAS_TEMPLATES) - template using associated_executor_t = typename associated_executor::type; -#endif // defined(ASIO_HAS_ALIAS_TEMPLATES) - namespace detail { template @@ -198,22 +188,19 @@ struct associated_executor_forwarding_base template struct associated_executor_forwarding_base::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 struct associated_executor, Executor> @@ -227,25 +214,20 @@ struct associated_executor, Executor> /// Forwards the request to get the executor to the associator specialisation /// for the unwrapped type @c T. - static type get(reference_wrapper t) ASIO_NOEXCEPT + static type get(reference_wrapper t) noexcept { return associated_executor::get(t.get()); } /// Forwards the request to get the executor to the associator specialisation /// for the unwrapped type @c T. - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get( - reference_wrapper t, const Executor& ex) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX(( - associated_executor::get(t.get(), ex))) + static auto get(reference_wrapper t, const Executor& ex) noexcept + -> decltype(associated_executor::get(t.get(), ex)) { return associated_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/rts/lib/asio/include/asio/associated_immediate_executor.hpp b/rts/lib/asio/include/asio/associated_immediate_executor.hpp index 54bced17a5..aa6e0fcfee 100644 --- a/rts/lib/asio/include/asio/associated_immediate_executor.hpp +++ b/rts/lib/asio/include/asio/associated_immediate_executor.hpp @@ -2,7 +2,7 @@ // associated_immediate_executor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -41,7 +41,7 @@ struct has_immediate_executor_type : false_type template struct has_immediate_executor_type::type> + void_t> : true_type { }; @@ -49,9 +49,9 @@ struct has_immediate_executor_type struct default_immediate_executor { - typedef typename require_result::type type; + typedef require_result_t type; - static type get(const E& e) ASIO_NOEXCEPT + static type get(const E& e) noexcept { return asio::require(e, execution::blocking.never); } @@ -59,59 +59,57 @@ struct default_immediate_executor template struct default_immediate_executor::value - >::type, - typename enable_if< + >, + enable_if_t< is_executor::value - >::type> + >> { class type : public E { public: template explicit type(const Executor1& e, - typename constraint< - conditional< + constraint_t< + conditional_t< !is_same::value, is_convertible, false_type - >::type::value - >::type = 0) ASIO_NOEXCEPT + >::value + > = 0) noexcept : E(e) { } - type(const type& other) ASIO_NOEXCEPT + type(const type& other) noexcept : E(static_cast(other)) { } -#if defined(ASIO_HAS_MOVE) - type(type&& other) ASIO_NOEXCEPT - : E(ASIO_MOVE_CAST(E)(other)) + type(type&& other) noexcept + : E(static_cast(other)) { } -#endif // defined(ASIO_HAS_MOVE) template - void dispatch(ASIO_MOVE_ARG(Function) f, const Allocator& a) const + void dispatch(Function&& f, const Allocator& a) const { - this->post(ASIO_MOVE_CAST(Function)(f), a); + this->post(static_cast(f), a); } - friend bool operator==(const type& a, const type& b) ASIO_NOEXCEPT + friend bool operator==(const type& a, const type& b) noexcept { return static_cast(a) == static_cast(b); } - friend bool operator!=(const type& a, const type& b) ASIO_NOEXCEPT + friend bool operator!=(const type& a, const type& b) noexcept { return static_cast(a) != static_cast(b); } }; - static type get(const E& e) ASIO_NOEXCEPT + static type get(const E& e) noexcept { return type(e); } @@ -124,9 +122,8 @@ struct associated_immediate_executor_impl typedef typename default_immediate_executor::type type; - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get( - const T&, const E& e) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX((default_immediate_executor::get(e))) + static auto get(const T&, const E& e) noexcept + -> decltype(default_immediate_executor::get(e)) { return default_immediate_executor::get(e); } @@ -134,13 +131,12 @@ struct associated_immediate_executor_impl template struct associated_immediate_executor_impl::type> + void_t> { typedef typename T::immediate_executor_type type; - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get( - const T& t, const E&) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX((t.get_immediate_executor())) + static auto get(const T& t, const E&) noexcept + -> decltype(t.get_immediate_executor()) { return t.get_immediate_executor(); } @@ -148,12 +144,12 @@ struct associated_immediate_executor_impl struct associated_immediate_executor_impl::value - >::type, - typename void_type< + >, + void_t< typename associator::type - >::type> : associator + >> : associator { }; @@ -194,7 +190,7 @@ struct associated_immediate_executor /// If @c T has a nested type @c immediate_executor_type, returns /// t.get_immediate_executor(). Otherwise returns /// asio::require(ex, asio::execution::blocking.never). - static decltype(auto) get(const T& t, const Executor& ex) ASIO_NOEXCEPT; + static decltype(auto) get(const T& t, const Executor& ex) noexcept; #endif // defined(GENERATING_DOCUMENTATION) }; @@ -203,14 +199,12 @@ struct associated_immediate_executor * @returns associated_immediate_executor::get(t, ex) */ template -ASIO_NODISCARD inline ASIO_AUTO_RETURN_TYPE_PREFIX2( - typename associated_immediate_executor::type) -get_associated_immediate_executor(const T& t, const Executor& ex, - typename constraint< +ASIO_NODISCARD inline auto get_associated_immediate_executor( + const T& t, const Executor& ex, + constraint_t< is_executor::value || execution::is_executor::value - >::type = 0) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX(( - associated_immediate_executor::get(t, ex))) + > = 0) noexcept + -> decltype(associated_immediate_executor::get(t, ex)) { return associated_immediate_executor::get(t, ex); } @@ -224,21 +218,18 @@ template ASIO_NODISCARD inline typename associated_immediate_executor::type get_associated_immediate_executor(const T& t, ExecutionContext& ctx, - typename constraint::value>::type = 0) ASIO_NOEXCEPT + constraint_t< + is_convertible::value + > = 0) noexcept { return associated_immediate_executor::get(t, ctx.get_executor()); } -#if defined(ASIO_HAS_ALIAS_TEMPLATES) - template using associated_immediate_executor_t = typename associated_immediate_executor::type; -#endif // defined(ASIO_HAS_ALIAS_TEMPLATES) - namespace detail { template @@ -248,22 +239,19 @@ struct associated_immediate_executor_forwarding_base template struct associated_immediate_executor_forwarding_base::asio_associated_immediate_executor_is_unspecialised, void >::value - >::type> + >> { typedef void asio_associated_immediate_executor_is_unspecialised; }; } // namespace detail -#if defined(ASIO_HAS_STD_REFERENCE_WRAPPER) \ - || defined(GENERATING_DOCUMENTATION) - /// Specialisation of associated_immediate_executor for /// @c std::reference_wrapper. template @@ -278,18 +266,13 @@ struct associated_immediate_executor, Executor> /// Forwards the request to get the executor to the associator specialisation /// for the unwrapped type @c T. - static ASIO_AUTO_RETURN_TYPE_PREFIX(type) get( - reference_wrapper t, const Executor& ex) ASIO_NOEXCEPT - ASIO_AUTO_RETURN_TYPE_SUFFIX(( - associated_immediate_executor::get(t.get(), ex))) + static auto get(reference_wrapper t, const Executor& ex) noexcept + -> decltype(associated_immediate_executor::get(t.get(), ex)) { return associated_immediate_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/rts/lib/asio/include/asio/associator.hpp b/rts/lib/asio/include/asio/associator.hpp index e954c44289..7952fcc51b 100644 --- a/rts/lib/asio/include/asio/associator.hpp +++ b/rts/lib/asio/include/asio/associator.hpp @@ -2,7 +2,7 @@ // associator.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/rts/lib/asio/include/asio/async_result.hpp b/rts/lib/asio/include/asio/async_result.hpp index a7f97b0a33..cdae9ede68 100644 --- a/rts/lib/asio/include/asio/async_result.hpp +++ b/rts/lib/asio/include/asio/async_result.hpp @@ -2,7 +2,7 @@ // async_result.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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 : true_type { }; -#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS) - template struct is_completion_signature : true_type { @@ -69,7 +64,6 @@ struct is_completion_signature : true_type }; # endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE) -#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS) template struct are_completion_signatures : false_type @@ -103,21 +97,19 @@ struct is_completion_handler_for : false_type template struct is_completion_handler_for - : integral_constant)> + : integral_constant, Args...>)> { }; -#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS) - template struct is_completion_handler_for - : integral_constant)> + : integral_constant&, Args...>)> { }; template struct is_completion_handler_for - : integral_constant)> + : integral_constant&&, Args...>)> { }; @@ -125,24 +117,23 @@ struct is_completion_handler_for template struct is_completion_handler_for - : integral_constant)> + : integral_constant, Args...>)> { }; template struct is_completion_handler_for - : integral_constant)> + : integral_constant&, Args...>)> { }; template struct is_completion_handler_for - : integral_constant)> + : integral_constant&&, Args...>)> { }; # endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE) -#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS) template struct is_completion_handler_for @@ -174,8 +165,6 @@ ASIO_CONCEPT completion_handler_for = ::asio::completion_handler_for #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,277 +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 -struct is_simple_completion_signature : false_type +struct is_lvalue_completion_signature : false_type { }; -template -struct simple_completion_signature; +template +struct is_lvalue_completion_signature : true_type +{ +}; -#if defined(ASIO_HAS_VARIADIC_TEMPLATES) +# if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE) template -struct is_simple_completion_signature : true_type +struct is_lvalue_completion_signature : true_type { }; +# endif // defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE) + template -struct are_simple_completion_signatures : false_type +struct are_any_lvalue_completion_signatures : false_type { }; template -struct are_simple_completion_signatures - : is_simple_completion_signature +struct are_any_lvalue_completion_signatures + : is_lvalue_completion_signature { }; template -struct are_simple_completion_signatures +struct are_any_lvalue_completion_signatures : integral_constant::value - && are_simple_completion_signatures::value)> -{ -}; - -template -struct simple_completion_signature + is_lvalue_completion_signature::value + || are_any_lvalue_completion_signatures::value)> { - typedef R type(Args...); }; -#if defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS) - -template -struct simple_completion_signature +template +struct is_rvalue_completion_signature : false_type { - typedef R type(Args...); }; template -struct simple_completion_signature +struct is_rvalue_completion_signature : true_type { - typedef R type(Args...); }; # if defined(ASIO_HAS_NOEXCEPT_FUNCTION_TYPE) template -struct simple_completion_signature -{ - typedef R type(Args...); -}; - -template -struct simple_completion_signature -{ - typedef R type(Args...); -}; - -template -struct simple_completion_signature +struct is_rvalue_completion_signature : true_type { - 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 -struct is_simple_completion_signature : true_type -{ -}; - -#define ASIO_PRIVATE_SIMPLE_SIG_DEF(n) \ - template \ - struct is_simple_completion_signature \ - : true_type \ - { \ - }; \ - /**/ - ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_SIMPLE_SIG_DEF) -#undef ASIO_PRIVATE_SIMPLE_SIG_DEF - -template -struct are_simple_completion_signatures : false_type +template +struct are_any_rvalue_completion_signatures : false_type { }; template -struct are_simple_completion_signatures - : is_simple_completion_signature +struct are_any_rvalue_completion_signatures + : is_rvalue_completion_signature { }; -template -struct are_simple_completion_signatures - : integral_constant::value - && is_simple_completion_signature::value)> -{ -}; - -template -struct are_simple_completion_signatures - : integral_constant::value - && is_simple_completion_signature::value - && is_simple_completion_signature::value)> +template +struct are_any_rvalue_completion_signatures + : integral_constant::value + || are_any_rvalue_completion_signatures::value)> { }; -template <> -struct simple_completion_signature -{ - typedef void type; -}; +template +struct simple_completion_signature; -template -struct simple_completion_signature +template +struct simple_completion_signature { - typedef R type(); + typedef R type(Args...); }; -#define ASIO_PRIVATE_SIMPLE_SIG_DEF(n) \ - template \ - struct simple_completion_signature \ - { \ - 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 -struct simple_completion_signature +template +struct simple_completion_signature { - typedef R type(); + typedef R type(Args...); }; -template -struct simple_completion_signature +template +struct simple_completion_signature { - typedef R type(); + typedef R type(Args...); }; -#define ASIO_PRIVATE_SIMPLE_SIG_DEF(n) \ - template \ - struct simple_completion_signature< \ - R(ASIO_VARIADIC_TARGS(n)) &> \ - { \ - typedef R type(ASIO_VARIADIC_TARGS(n)); \ - }; \ - \ - template \ - 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 -struct simple_completion_signature +template +struct simple_completion_signature { - typedef R type(); + typedef R type(Args...); }; -template -struct simple_completion_signature +template +struct simple_completion_signature { - typedef R type(); + typedef R type(Args...); }; -template -struct simple_completion_signature +template +struct simple_completion_signature { - typedef R type(); + typedef R type(Args...); }; -#define ASIO_PRIVATE_SIMPLE_SIG_DEF(n) \ - template \ - struct simple_completion_signature< \ - R(ASIO_VARIADIC_TARGS(n)) noexcept> \ - { \ - typedef R type(ASIO_VARIADIC_TARGS(n)); \ - }; \ - \ - template \ - struct simple_completion_signature< \ - R(ASIO_VARIADIC_TARGS(n)) & noexcept> \ - { \ - typedef R type(ASIO_VARIADIC_TARGS(n)); \ - }; \ - \ - template \ - 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::type, \ - typename ::asio::detail::simple_completion_signature::type, \ - typename ::asio::detail::simple_completion_signature::type - -#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES) - // || defined(GENERATING_DOCUMENTATION) - -template +template class completion_handler_async_result { public: @@ -468,56 +310,22 @@ class completion_handler_async_result { } -#if defined(ASIO_HAS_VARIADIC_TEMPLATES) - template - 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)( + static_cast(token), + static_cast(args)...); } -#else // defined(ASIO_HAS_VARIADIC_TEMPLATES) - - template - 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 \ - 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 @@ -542,7 +350,8 @@ class completion_handler_async_result * The primary template assumes that the CompletionToken is the completion * handler. */ -template +template class async_result { public: @@ -567,70 +376,46 @@ class async_result /// obtain the value to be returned from the initiating function. template 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 +template 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::value + || !detail::are_any_rvalue_completion_signatures::value, + detail::completion_handler_async_result, async_result - >::type + typename detail::simple_completion_signature::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::value + || !detail::are_any_rvalue_completion_signatures::value, + detail::completion_handler_async_result, async_result - >::type base_type; + typename detail::simple_completion_signature::type...> + > base_type; using base_type::base_type; 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(ASIO_HAS_REF_QUALIFIED_FUNCTIONS) - -template -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; -}; - -#endif // defined(ASIO_HAS_REF_QUALIFIED_FUNCTIONS) - -template -class async_result +template +class async_result { // Empty. }; @@ -640,65 +425,39 @@ class async_result /// 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 +template struct async_completion { /// The real handler type to be used for the asynchronous operation. typedef typename asio::async_result< - typename decay::type, - ASIO_COMPLETION_SIGNATURES_TARGS>::completion_handler_type - completion_handler_type; + decay_t, 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::value, - completion_handler_type&, CompletionToken&&>::type>(token)), - result(completion_handler) - { - } -#else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - explicit async_completion(typename decay::type& token) - : completion_handler(token), - result(completion_handler) - { - } - - explicit async_completion(const typename decay::type& token) - : completion_handler(token), + completion_handler_type&, CompletionToken&&>>(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::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::type, - ASIO_COMPLETION_SIGNATURES_TARGS> result; + async_result, Signatures...> result; }; namespace detail { -template -struct async_result_helper - : async_result::type, - ASIO_COMPLETION_SIGNATURES_TARGS> -{ -}; - struct async_result_memfns_base { void initiate(); @@ -724,11 +483,11 @@ char async_result_initiate_memfn_helper( void (async_result_memfns_base::*)(), &async_result_memfns_derived::initiate>*); -template +template struct async_result_has_initiate_memfn : integral_constant::type, - ASIO_COMPLETION_SIGNATURES_TARGS> + async_result, Signatures...> >(0)) != 1> { }; @@ -742,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< \ @@ -823,7 +563,7 @@ struct async_result_has_initiate_memfn # define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX3(ct, sig0, sig1, sig2) \ auto # define ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(expr) -#elif defined(ASIO_HAS_DECLTYPE) +#else # define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ct, sig) \ auto # define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX2(ct, sig0, sig1) \ @@ -831,14 +571,6 @@ struct async_result_has_initiate_memfn # define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX3(ct, sig0, sig1, sig2) \ auto # define ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(expr) -> decltype expr -#else -# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ct, sig) \ - ASIO_INITFN_RESULT_TYPE(ct, sig) -# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX2(ct, sig0, sig1) \ - ASIO_INITFN_RESULT_TYPE2(ct, sig0, sig1) -# define ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX3(ct, sig0, sig1, sig2) \ - ASIO_INITFN_RESULT_TYPE3(ct, sig0, sig1, sig2) -# define ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(expr) #endif #if defined(GENERATING_DOCUMENTATION) @@ -848,20 +580,13 @@ struct async_result_has_initiate_memfn 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) @@ -870,326 +595,57 @@ template 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& token, + Args&&... args); -#elif defined(ASIO_HAS_VARIADIC_TEMPLATES) +#else // defined(GENERATING_DOCUMENTATION) template -inline typename constraint< +inline auto async_initiate(Initiation&& initiation, + type_identity_t& token, Args&&... args) + -> constraint_t< detail::async_result_has_initiate_memfn< CompletionToken, Signatures...>::value, - ASIO_INITFN_DEDUCED_RESULT_TYPE(CompletionToken, Signatures..., - (async_result::type, - Signatures...>::initiate(declval(), - declval(), - declval()...)))>::type -async_initiate(ASIO_MOVE_ARG(Initiation) initiation, - ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token, - ASIO_MOVE_ARG(Args)... args) -{ - return async_result::type, - Signatures...>::initiate(ASIO_MOVE_CAST(Initiation)(initiation), - ASIO_MOVE_CAST(CompletionToken)(token), - ASIO_MOVE_CAST(Args)(args)...); + decltype( + async_result, Signatures...>::initiate( + static_cast(initiation), + static_cast(token), + static_cast(args)...))> +{ + return async_result, Signatures...>::initiate( + static_cast(initiation), + static_cast(token), + static_cast(args)...); } template -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, Signatures...>::return_type> +async_initiate(Initiation&& initiation, + type_identity_t& token, Args&&... args) { async_completion completion(token); - ASIO_MOVE_CAST(Initiation)(initiation)( - ASIO_MOVE_CAST(ASIO_HANDLER_TYPE(CompletionToken, - Signatures...))(completion.completion_handler), - ASIO_MOVE_CAST(Args)(args)...); - - return completion.result.get(); -} - -#else // defined(ASIO_HAS_VARIADIC_TEMPLATES) - -template -inline typename constraint< - detail::async_result_has_initiate_memfn< - CompletionToken, Sig0>::value, - ASIO_INITFN_DEDUCED_RESULT_TYPE(CompletionToken, Sig0, - (async_result::type, - Sig0>::initiate(declval(), - declval())))>::type -async_initiate(ASIO_MOVE_ARG(Initiation) initiation, - ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token) -{ - return async_result::type, - Sig0>::initiate(ASIO_MOVE_CAST(Initiation)(initiation), - ASIO_MOVE_CAST(CompletionToken)(token)); -} - -template -inline typename constraint< - detail::async_result_has_initiate_memfn< - CompletionToken, Sig0, Sig1>::value, - ASIO_INITFN_DEDUCED_RESULT_TYPE2(CompletionToken, Sig0, Sig1, - (async_result::type, - Sig0, Sig1>::initiate(declval(), - declval())))>::type -async_initiate(ASIO_MOVE_ARG(Initiation) initiation, - ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token) -{ - return async_result::type, - Sig0, Sig1>::initiate(ASIO_MOVE_CAST(Initiation)(initiation), - ASIO_MOVE_CAST(CompletionToken)(token)); -} - -template -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::type, - Sig0, Sig1, Sig2>::initiate(declval(), - declval())))>::type -async_initiate(ASIO_MOVE_ARG(Initiation) initiation, - ASIO_NONDEDUCED_MOVE_ARG(CompletionToken) token) -{ - return async_result::type, - Sig0, Sig1, Sig2>::initiate(ASIO_MOVE_CAST(Initiation)(initiation), - ASIO_MOVE_CAST(CompletionToken)(token)); -} - -template -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 completion(token); - - ASIO_MOVE_CAST(Initiation)(initiation)( - ASIO_MOVE_CAST(ASIO_HANDLER_TYPE(CompletionToken, - Sig0))(completion.completion_handler)); + static_cast(initiation)( + static_cast< + typename async_result, + Signatures...>::completion_handler_type&&>( + completion.completion_handler), + static_cast(args)...); return completion.result.get(); } -template -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 completion(token); - - ASIO_MOVE_CAST(Initiation)(initiation)( - ASIO_MOVE_CAST(ASIO_HANDLER_TYPE2(CompletionToken, - Sig0, Sig1))(completion.completion_handler)); - - return completion.result.get(); -} - -template -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 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 \ - inline typename constraint< \ - detail::async_result_has_initiate_memfn< \ - CompletionToken, Sig0>::value, \ - ASIO_INITFN_DEDUCED_RESULT_TYPE( \ - CompletionToken, Sig0, \ - (async_result::type, \ - Sig0>::initiate( \ - declval(), \ - declval(), \ - 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::type, \ - Sig0>::initiate( \ - ASIO_MOVE_CAST(Initiation)(initiation), \ - ASIO_MOVE_CAST(CompletionToken)(token), \ - ASIO_VARIADIC_MOVE_ARGS(n)); \ - } \ - \ - template \ - inline typename constraint< \ - detail::async_result_has_initiate_memfn< \ - CompletionToken, Sig0, Sig1>::value, \ - ASIO_INITFN_DEDUCED_RESULT_TYPE2( \ - CompletionToken, Sig0, Sig1, \ - (async_result::type, \ - Sig0, Sig1>::initiate( \ - declval(), \ - declval(), \ - 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::type, \ - Sig0, Sig1>::initiate( \ - ASIO_MOVE_CAST(Initiation)(initiation), \ - ASIO_MOVE_CAST(CompletionToken)(token), \ - ASIO_VARIADIC_MOVE_ARGS(n)); \ - } \ - \ - template \ - 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::type, \ - Sig0, Sig1, Sig2>::initiate( \ - declval(), \ - declval(), \ - 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::type, \ - Sig0, Sig1, Sig2>::initiate( \ - ASIO_MOVE_CAST(Initiation)(initiation), \ - ASIO_MOVE_CAST(CompletionToken)(token), \ - ASIO_VARIADIC_MOVE_ARGS(n)); \ - } \ - \ - template \ - 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 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 \ - 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 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 \ - 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 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 { @@ -1222,16 +678,12 @@ ASIO_CONCEPT completion_token_for = ::asio::completion_token_for #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 { @@ -1245,21 +697,21 @@ struct is_async_operation_call : false_type template struct is_async_operation_call::type, + result_of_t, async_operation_probe_result >::value - >::type - >::type> : true_type + > + > + > : true_type { }; } // namespace detail #if !defined(GENERATING_DOCUMENTATION) -#if defined(ASIO_HAS_VARIADIC_TEMPLATES) template class async_result @@ -1268,56 +720,13 @@ class async_result typedef detail::async_operation_probe_result return_type; template - static return_type initiate(ASIO_MOVE_ARG(Initiation), - detail::async_operation_probe, ASIO_MOVE_ARG(InitArgs)...) + static return_type initiate(Initiation&&, + detail::async_operation_probe, InitArgs&&...) { return return_type(); } }; -#else // defined(ASIO_HAS_VARIADIC_TEMPLATES) - -namespace detail { - -struct async_result_probe_base -{ - typedef detail::async_operation_probe_result return_type; - - template - static return_type initiate(ASIO_MOVE_ARG(Initiation), - detail::async_operation_probe) - { - return return_type(); - } - -#define ASIO_PRIVATE_INITIATE_DEF(n) \ - template \ - static return_type initiate(ASIO_MOVE_ARG(Initiation), \ - detail::async_operation_probe, \ - ASIO_VARIADIC_UNNAMED_MOVE_PARAMS(n)) \ - { \ - return return_type(); \ - } \ - /**/ - ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INITIATE_DEF) -#undef ASIO_PRIVATE_INITIATE_DEF -}; - -} // namespace detail - -template -class async_result - : public detail::async_result_probe_base {}; - -template -class async_result - : public detail::async_result_probe_base {}; - -template -class async_result - : public detail::async_result_probe_base {}; - -#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES) #endif // !defined(GENERATING_DOCUMENTATION) #if defined(GENERATING_DOCUMENTATION) @@ -1335,7 +744,7 @@ struct is_async_operation : integral_constant { }; -#elif defined(ASIO_HAS_VARIADIC_TEMPLATES) +#else // defined(GENERATING_DOCUMENTATION) template struct is_async_operation : @@ -1344,35 +753,9 @@ struct is_async_operation : { }; -#else // defined(ASIO_HAS_VARIADIC_TEMPLATES) - -template -struct is_async_operation; - -template -struct is_async_operation : - detail::is_async_operation_call< - T(detail::async_operation_probe)> -{ -}; - -#define ASIO_PRIVATE_IS_ASYNC_OP_DEF(n) \ - template \ - struct is_async_operation : \ - detail::is_async_operation_call< \ - T(ASIO_VARIADIC_TARGS(n), detail::async_operation_probe)> \ - { \ - }; \ - /**/ - ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_IS_ASYNC_OP_DEF) -#undef ASIO_PRIVATE_IS_ASYNC_OP_DEF - -#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES) +#endif // defined(GENERATING_DOCUMENTATION) -#if defined(ASIO_HAS_CONCEPTS) \ - && defined(ASIO_HAS_VARIADIC_TEMPLATES) +#if defined(ASIO_HAS_CONCEPTS) template ASIO_CONCEPT async_operation = is_async_operation::value; @@ -1387,7 +770,6 @@ ASIO_CONCEPT async_operation = is_async_operation::value; ::asio::async_operation #else // defined(ASIO_HAS_CONCEPTS) - // && defined(ASIO_HAS_VARIADIC_TEMPLATES) #define ASIO_ASYNC_OPERATION(t) typename #define ASIO_ASYNC_OPERATION1(t, a0) typename @@ -1395,14 +777,11 @@ ASIO_CONCEPT async_operation = is_async_operation::value; #define ASIO_ASYNC_OPERATION3(t, a0, a1, a2) typename #endif // defined(ASIO_HAS_CONCEPTS) - // && defined(ASIO_HAS_VARIADIC_TEMPLATES) namespace detail { struct completion_signature_probe {}; -#if defined(ASIO_HAS_VARIADIC_TEMPLATES) - template struct completion_signature_probe_result { @@ -1435,25 +814,9 @@ struct completion_signature_probe_result }; }; -#else // defined(ASIO_HAS_VARIADIC_TEMPLATES) - -template -struct completion_signature_probe_result -{ - typedef T type; -}; - -template <> -struct completion_signature_probe_result -{ -}; - -#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES) - } // namespace detail #if !defined(GENERATING_DOCUMENTATION) -#if defined(ASIO_HAS_VARIADIC_TEMPLATES) template class async_result @@ -1462,8 +825,8 @@ class async_result typedef detail::completion_signature_probe_result return_type; template - static return_type initiate(ASIO_MOVE_ARG(Initiation), - detail::completion_signature_probe, ASIO_MOVE_ARG(InitArgs)...) + static return_type initiate(Initiation&&, + detail::completion_signature_probe, InitArgs&&...) { return return_type(); } @@ -1476,62 +839,13 @@ class async_result typedef detail::completion_signature_probe_result return_type; template - static return_type initiate(ASIO_MOVE_ARG(Initiation), - detail::completion_signature_probe, ASIO_MOVE_ARG(InitArgs)...) + static return_type initiate(Initiation&&, + detail::completion_signature_probe, InitArgs&&...) { return return_type(); } }; -#else // defined(ASIO_HAS_VARIADIC_TEMPLATES) - -namespace detail { - -template -class async_result_sig_probe_base -{ -public: - typedef detail::completion_signature_probe_result return_type; - - template - static return_type initiate(ASIO_MOVE_ARG(Initiation), - detail::async_operation_probe) - { - return return_type(); - } - -#define ASIO_PRIVATE_INITIATE_DEF(n) \ - template \ - static return_type initiate(ASIO_MOVE_ARG(Initiation), \ - detail::completion_signature_probe, \ - ASIO_VARIADIC_UNNAMED_MOVE_PARAMS(n)) \ - { \ - return return_type(); \ - } \ - /**/ - ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_INITIATE_DEF) -#undef ASIO_PRIVATE_INITIATE_DEF -}; - -} // namespace detail - -template <> -class async_result - : public detail::async_result_sig_probe_base {}; - -template -class async_result - : public detail::async_result_sig_probe_base {}; - -template -class async_result - : public detail::async_result_sig_probe_base {}; - -template -class async_result - : public detail::async_result_sig_probe_base {}; - -#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES) #endif // !defined(GENERATING_DOCUMENTATION) #if defined(GENERATING_DOCUMENTATION) @@ -1554,50 +868,19 @@ struct completion_signature_of typedef automatically_determined type; }; -template -using completion_signature_of_t = - typename completion_signature_of::type; - -#elif defined(ASIO_HAS_VARIADIC_TEMPLATES) +#else // defined(GENERATING_DOCUMENTATION) template struct completion_signature_of : - result_of::type + result_of_t { }; -#if defined(ASIO_HAS_ALIAS_TEMPLATES) +#endif // defined(GENERATING_DOCUMENTATION) + template using completion_signature_of_t = typename completion_signature_of::type; -#endif // defined(ASIO_HAS_ALIAS_TEMPLATES) - -#else // defined(ASIO_HAS_VARIADIC_TEMPLATES) - -template -struct completion_signature_of; - -template -struct completion_signature_of : - result_of::type -{ -}; - -#define ASIO_PRIVATE_COMPLETION_SIG_OF_DEF(n) \ - template \ - struct completion_signature_of : \ - result_of< \ - T(ASIO_VARIADIC_TARGS(n), \ - detail::completion_signature_probe)>::type \ - { \ - }; \ - /**/ - ASIO_VARIADIC_GENERATE(ASIO_PRIVATE_COMPLETION_SIG_OF_DEF) -#undef ASIO_PRIVATE_COMPLETION_SIG_OF_DEF - -#endif // defined(ASIO_HAS_VARIADIC_TEMPLATES) namespace detail { @@ -1609,7 +892,8 @@ struct default_completion_token_impl template struct default_completion_token_impl::type> + void_t + > { typedef typename T::default_completion_token_type type; }; @@ -1643,27 +927,14 @@ struct default_completion_token }; #endif -#if defined(ASIO_HAS_ALIAS_TEMPLATES) - template using default_completion_token_t = typename default_completion_token::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::type #define ASIO_DEFAULT_COMPLETION_TOKEN(e) \ = typename ::asio::default_completion_token::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/rts/lib/asio/include/asio/awaitable.hpp b/rts/lib/asio/include/asio/awaitable.hpp index 8511595a2b..7e4ee7a2f2 100644 --- a/rts/lib/asio/include/asio/awaitable.hpp +++ b/rts/lib/asio/include/asio/awaitable.hpp @@ -2,7 +2,7 @@ // awaitable.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/rts/lib/asio/include/asio/basic_datagram_socket.hpp b/rts/lib/asio/include/asio/basic_datagram_socket.hpp index 2ec611b996..3d72a38475 100644 --- a/rts/lib/asio/include/asio/basic_datagram_socket.hpp +++ b/rts/lib/asio/include/asio/basic_datagram_socket.hpp @@ -2,7 +2,7 @@ // basic_datagram_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -113,9 +113,9 @@ class basic_datagram_socket */ template explicit basic_datagram_socket(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(context) { } @@ -151,10 +151,10 @@ class basic_datagram_socket template basic_datagram_socket(ExecutionContext& context, const protocol_type& protocol, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_socket(context, protocol) { } @@ -198,9 +198,9 @@ class basic_datagram_socket template basic_datagram_socket(ExecutionContext& context, const endpoint_type& endpoint, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(context, endpoint) { } @@ -243,14 +243,13 @@ class basic_datagram_socket template basic_datagram_socket(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_socket, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(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. @@ -262,7 +261,7 @@ class basic_datagram_socket * 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(std::move(other)) { } @@ -299,10 +298,10 @@ class basic_datagram_socket */ template basic_datagram_socket(basic_datagram_socket&& other, - typename constraint< + constraint_t< is_convertible::value && is_convertible::value - >::type = 0) + > = 0) : basic_socket(std::move(other)) { } @@ -321,16 +320,15 @@ class basic_datagram_socket * constructor. */ template - typename constraint< + constraint_t< is_convertible::value && is_convertible::value, basic_datagram_socket& - >::type operator=(basic_datagram_socket&& other) + > operator=(basic_datagram_socket&& other) { basic_socket::operator=(std::move(other)); return *this; } -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the socket. /** @@ -479,18 +477,14 @@ class basic_datagram_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_send(const ConstBufferSequence& buffers, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) WriteToken = default_completion_token_t> + auto async_send(const ConstBufferSequence& buffers, + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, socket_base::message_flags(0)))) + buffers, socket_base::message_flags(0))) { return async_initiate( @@ -544,18 +538,14 @@ class basic_datagram_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_send(const ConstBufferSequence& buffers, + std::size_t)) WriteToken = default_completion_token_t> + auto async_send(const ConstBufferSequence& buffers, socket_base::message_flags flags, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers, flags))) + declval(), token, buffers, flags)) { return async_initiate( @@ -705,19 +695,15 @@ class basic_datagram_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_send_to(const ConstBufferSequence& buffers, + std::size_t)) WriteToken = default_completion_token_t> + auto async_send_to(const ConstBufferSequence& buffers, const endpoint_type& destination, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, buffers, - destination, socket_base::message_flags(0)))) + destination, socket_base::message_flags(0))) { return async_initiate( @@ -770,19 +756,15 @@ class basic_datagram_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_send_to(const ConstBufferSequence& buffers, + std::size_t)) WriteToken = default_completion_token_t> + auto async_send_to(const ConstBufferSequence& buffers, const endpoint_type& destination, socket_base::message_flags flags, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, destination, flags))) + buffers, destination, flags)) { return async_initiate( @@ -933,18 +915,14 @@ class basic_datagram_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive(const MutableBufferSequence& buffers, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) ReadToken = default_completion_token_t> + auto async_receive(const MutableBufferSequence& buffers, + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, socket_base::message_flags(0)))) + buffers, socket_base::message_flags(0))) { return async_initiate( @@ -998,18 +976,14 @@ class basic_datagram_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive(const MutableBufferSequence& buffers, + std::size_t)) ReadToken = default_completion_token_t> + auto async_receive(const MutableBufferSequence& buffers, socket_base::message_flags flags, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers, flags))) + declval(), token, buffers, flags)) { return async_initiate( @@ -1159,19 +1133,15 @@ class basic_datagram_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive_from(const MutableBufferSequence& buffers, + std::size_t)) ReadToken = default_completion_token_t> + auto async_receive_from(const MutableBufferSequence& buffers, endpoint_type& sender_endpoint, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, buffers, - &sender_endpoint, socket_base::message_flags(0)))) + &sender_endpoint, socket_base::message_flags(0))) { return async_initiate( @@ -1226,19 +1196,15 @@ class basic_datagram_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive_from(const MutableBufferSequence& buffers, + std::size_t)) ReadToken = default_completion_token_t> + auto async_receive_from(const MutableBufferSequence& buffers, endpoint_type& sender_endpoint, socket_base::message_flags flags, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, &sender_endpoint, flags))) + buffers, &sender_endpoint, flags)) { return async_initiate( @@ -1248,9 +1214,9 @@ class basic_datagram_socket 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 { @@ -1262,13 +1228,13 @@ class basic_datagram_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - void operator()(ASIO_MOVE_ARG(WriteHandler) handler, + void operator()(WriteHandler&& handler, const ConstBufferSequence& buffers, socket_base::message_flags flags) const { @@ -1296,13 +1262,13 @@ class basic_datagram_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - void operator()(ASIO_MOVE_ARG(WriteHandler) handler, + void operator()(WriteHandler&& handler, const ConstBufferSequence& buffers, const endpoint_type& destination, socket_base::message_flags flags) const { @@ -1330,13 +1296,13 @@ class basic_datagram_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - void operator()(ASIO_MOVE_ARG(ReadHandler) handler, + void operator()(ReadHandler&& handler, const MutableBufferSequence& buffers, socket_base::message_flags flags) const { @@ -1364,13 +1330,13 @@ class basic_datagram_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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/rts/lib/asio/include/asio/basic_deadline_timer.hpp b/rts/lib/asio/include/asio/basic_deadline_timer.hpp index d0d44d0e5a..9343591bf8 100644 --- a/rts/lib/asio/include/asio/basic_deadline_timer.hpp +++ b/rts/lib/asio/include/asio/basic_deadline_timer.hpp @@ -2,7 +2,7 @@ // basic_deadline_timer.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -178,9 +178,9 @@ class basic_deadline_timer */ template explicit basic_deadline_timer(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { } @@ -216,9 +216,9 @@ class basic_deadline_timer */ template basic_deadline_timer(ExecutionContext& context, const time_type& expiry_time, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -260,9 +260,9 @@ class basic_deadline_timer template basic_deadline_timer(ExecutionContext& context, const duration_type& expiry_time, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -271,7 +271,6 @@ class basic_deadline_timer 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. @@ -305,7 +304,6 @@ class basic_deadline_timer impl_ = std::move(other.impl_); return *this; } -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the timer. /** @@ -317,7 +315,7 @@ class basic_deadline_timer } /// Get the executor associated with the object. - const executor_type& get_executor() ASIO_NOEXCEPT + const executor_type& get_executor() noexcept { return impl_.get_executor(); } @@ -649,15 +647,12 @@ class basic_deadline_timer */ template < ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code)) - WaitToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WaitToken, - void (asio::error_code)) - async_wait( - ASIO_MOVE_ARG(WaitToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WaitToken = default_completion_token_t> + auto async_wait( + WaitToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token))) + declval(), token)) { return async_initiate( initiate_async_wait(this), token); @@ -665,9 +660,9 @@ class basic_deadline_timer 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 { @@ -679,13 +674,13 @@ class basic_deadline_timer { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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/rts/lib/asio/include/asio/basic_file.hpp b/rts/lib/asio/include/asio/basic_file.hpp index eb690ac795..dbdb6d843d 100644 --- a/rts/lib/asio/include/asio/basic_file.hpp +++ b/rts/lib/asio/include/asio/basic_file.hpp @@ -2,7 +2,7 @@ // basic_file.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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,6 +21,7 @@ || defined(GENERATING_DOCUMENTATION) #include +#include #include "asio/any_io_executor.hpp" #include "asio/async_result.hpp" #include "asio/detail/cstdint.hpp" @@ -39,10 +40,6 @@ # include "asio/detail/io_uring_file_service.hpp" #endif -#if defined(ASIO_HAS_MOVE) -# include -#endif // defined(ASIO_HAS_MOVE) - #include "asio/detail/push_options.hpp" namespace asio { @@ -112,10 +109,10 @@ class basic_file */ template explicit basic_file(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { } @@ -157,10 +154,10 @@ class basic_file template explicit basic_file(ExecutionContext& context, const char* path, file_base::flags open_flags, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { asio::error_code ec; @@ -206,10 +203,10 @@ class basic_file template explicit basic_file(ExecutionContext& context, const std::string& path, file_base::flags open_flags, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { asio::error_code ec; @@ -252,10 +249,10 @@ class basic_file */ template basic_file(ExecutionContext& context, const native_handle_type& native_file, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { asio::error_code ec; @@ -264,7 +261,6 @@ class basic_file asio::detail::throw_error(ec, "assign"); } -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Move-construct a basic_file from another. /** * This constructor moves a file from one object to another. @@ -275,7 +271,7 @@ class basic_file * @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) ASIO_NOEXCEPT + basic_file(basic_file&& other) noexcept : impl_(std::move(other.impl_)) { } @@ -312,10 +308,10 @@ class basic_file */ template basic_file(basic_file&& other, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(std::move(other.impl_)) { } @@ -331,19 +327,18 @@ class basic_file * constructed using the @c basic_file(const executor_type&) constructor. */ template - typename constraint< + constraint_t< is_convertible::value, basic_file& - >::type operator=(basic_file&& other) + > operator=(basic_file&& other) { basic_file 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. - const executor_type& get_executor() ASIO_NOEXCEPT + const executor_type& get_executor() noexcept { return impl_.get_executor(); } @@ -815,8 +810,8 @@ class basic_file private: // Disallow copying and assignment. - basic_file(const basic_file&) ASIO_DELETED; - basic_file& operator=(const basic_file&) ASIO_DELETED; + basic_file(const basic_file&) = delete; + basic_file& operator=(const basic_file&) = delete; }; } // namespace asio diff --git a/rts/lib/asio/include/asio/basic_io_object.hpp b/rts/lib/asio/include/asio/basic_io_object.hpp index 6d16a2b77b..7e502206ff 100644 --- a/rts/lib/asio/include/asio/basic_io_object.hpp +++ b/rts/lib/asio/include/asio/basic_io_object.hpp @@ -2,7 +2,7 @@ // basic_io_object.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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(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 #else template class basic_io_object @@ -213,7 +210,7 @@ class basic_io_object 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 @@ class basic_io_object IoObjectService* service_; implementation_type implementation_; }; -#endif // defined(ASIO_HAS_MOVE) } // namespace asio diff --git a/rts/lib/asio/include/asio/basic_random_access_file.hpp b/rts/lib/asio/include/asio/basic_random_access_file.hpp index ed5b231e43..fe88f42056 100644 --- a/rts/lib/asio/include/asio/basic_random_access_file.hpp +++ b/rts/lib/asio/include/asio/basic_random_access_file.hpp @@ -2,7 +2,7 @@ // basic_random_access_file.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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 @@ class basic_random_access_file */ template explicit basic_random_access_file(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_file(context) { } @@ -153,10 +153,10 @@ class basic_random_access_file template basic_random_access_file(ExecutionContext& context, const char* path, file_base::flags open_flags, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_file(context, path, open_flags) { } @@ -199,10 +199,10 @@ class basic_random_access_file template basic_random_access_file(ExecutionContext& context, const std::string& path, file_base::flags open_flags, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_file(context, path, open_flags) { } @@ -241,15 +241,14 @@ class basic_random_access_file template basic_random_access_file(ExecutionContext& context, const native_handle_type& native_file, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_file(context, native_file) { } -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Move-construct a basic_random_access_file from another. /** * This constructor moves a random-access file from one object to another. @@ -261,7 +260,7 @@ class basic_random_access_file * constructed using the @c basic_random_access_file(const executor_type&) * constructor. */ - basic_random_access_file(basic_random_access_file&& other) ASIO_NOEXCEPT + basic_random_access_file(basic_random_access_file&& other) noexcept : basic_file(std::move(other)) { } @@ -298,10 +297,10 @@ class basic_random_access_file */ template basic_random_access_file(basic_random_access_file&& other, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_file(std::move(other)) { } @@ -320,15 +319,14 @@ class basic_random_access_file * constructor. */ template - typename constraint< + constraint_t< is_convertible::value, basic_random_access_file& - >::type operator=(basic_random_access_file&& other) + > operator=(basic_random_access_file&& other) { basic_file::operator=(std::move(other)); return *this; } -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the file. /** @@ -459,18 +457,13 @@ class basic_random_access_file */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_write_some_at(uint64_t offset, - const ConstBufferSequence& buffers, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) WriteToken = default_completion_token_t> + auto async_write_some_at(uint64_t offset, const ConstBufferSequence& buffers, + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, offset, buffers))) + declval(), token, offset, buffers)) { return async_initiate( @@ -600,18 +593,13 @@ class basic_random_access_file */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_read_some_at(uint64_t offset, - const MutableBufferSequence& buffers, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) ReadToken = default_completion_token_t> + auto async_read_some_at(uint64_t offset, const MutableBufferSequence& buffers, + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, offset, buffers))) + declval(), token, offset, buffers)) { return async_initiate( @@ -620,9 +608,9 @@ class basic_random_access_file private: // Disallow copying and assignment. - basic_random_access_file(const basic_random_access_file&) ASIO_DELETED; + basic_random_access_file(const basic_random_access_file&) = delete; basic_random_access_file& operator=( - const basic_random_access_file&) ASIO_DELETED; + const basic_random_access_file&) = delete; class initiate_async_write_some_at { @@ -634,13 +622,13 @@ class basic_random_access_file { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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 @@ -667,13 +655,13 @@ class basic_random_access_file { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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/rts/lib/asio/include/asio/basic_raw_socket.hpp b/rts/lib/asio/include/asio/basic_raw_socket.hpp index 50583e5975..112090900c 100644 --- a/rts/lib/asio/include/asio/basic_raw_socket.hpp +++ b/rts/lib/asio/include/asio/basic_raw_socket.hpp @@ -2,7 +2,7 @@ // basic_raw_socket.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -113,9 +113,9 @@ class basic_raw_socket */ template explicit basic_raw_socket(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(context) { } @@ -150,10 +150,10 @@ class basic_raw_socket */ template basic_raw_socket(ExecutionContext& context, const protocol_type& protocol, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_socket(context, protocol) { } @@ -196,9 +196,9 @@ class basic_raw_socket */ template basic_raw_socket(ExecutionContext& context, const endpoint_type& endpoint, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(context, endpoint) { } @@ -241,14 +241,13 @@ class basic_raw_socket template basic_raw_socket(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_socket, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(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. @@ -260,7 +259,7 @@ class basic_raw_socket * 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(std::move(other)) { } @@ -296,10 +295,10 @@ class basic_raw_socket */ template basic_raw_socket(basic_raw_socket&& other, - typename constraint< + constraint_t< is_convertible::value && is_convertible::value - >::type = 0) + > = 0) : basic_socket(std::move(other)) { } @@ -316,16 +315,15 @@ class basic_raw_socket * constructor. */ template - typename constraint< + constraint_t< is_convertible::value && is_convertible::value, basic_raw_socket& - >::type operator=(basic_raw_socket&& other) + > operator=(basic_raw_socket&& other) { basic_socket::operator=(std::move(other)); return *this; } -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the socket. /** @@ -471,18 +469,14 @@ class basic_raw_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_send(const ConstBufferSequence& buffers, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) WriteToken = default_completion_token_t> + auto async_send(const ConstBufferSequence& buffers, + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, socket_base::message_flags(0)))) + buffers, socket_base::message_flags(0))) { return async_initiate( @@ -536,18 +530,14 @@ class basic_raw_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_send(const ConstBufferSequence& buffers, + std::size_t)) WriteToken = default_completion_token_t> + auto async_send(const ConstBufferSequence& buffers, socket_base::message_flags flags, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers, flags))) + declval(), token, buffers, flags)) { return async_initiate( @@ -697,19 +687,15 @@ class basic_raw_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_send_to(const ConstBufferSequence& buffers, + std::size_t)) WriteToken = default_completion_token_t> + auto async_send_to(const ConstBufferSequence& buffers, const endpoint_type& destination, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, buffers, - destination, socket_base::message_flags(0)))) + destination, socket_base::message_flags(0))) { return async_initiate( @@ -762,19 +748,15 @@ class basic_raw_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_send_to(const ConstBufferSequence& buffers, + std::size_t)) WriteToken = default_completion_token_t> + auto async_send_to(const ConstBufferSequence& buffers, const endpoint_type& destination, socket_base::message_flags flags, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, destination, flags))) + buffers, destination, flags)) { return async_initiate( @@ -925,18 +907,14 @@ class basic_raw_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive(const MutableBufferSequence& buffers, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) ReadToken = default_completion_token_t> + auto async_receive(const MutableBufferSequence& buffers, + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, socket_base::message_flags(0)))) + buffers, socket_base::message_flags(0))) { return async_initiate( @@ -991,17 +969,14 @@ class basic_raw_socket template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive(const MutableBufferSequence& buffers, + = default_completion_token_t> + auto async_receive(const MutableBufferSequence& buffers, socket_base::message_flags flags, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers, flags))) + declval(), token, buffers, flags)) { return async_initiate( @@ -1151,19 +1126,16 @@ class basic_raw_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive_from(const MutableBufferSequence& buffers, + std::size_t)) ReadToken = default_completion_token_t> + auto async_receive_from(const MutableBufferSequence& buffers, endpoint_type& sender_endpoint, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + ReadToken&& token + = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, buffers, - &sender_endpoint, socket_base::message_flags(0)))) + &sender_endpoint, socket_base::message_flags(0))) { return async_initiate( @@ -1219,18 +1191,15 @@ class basic_raw_socket template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive_from(const MutableBufferSequence& buffers, + = default_completion_token_t> + auto async_receive_from(const MutableBufferSequence& buffers, endpoint_type& sender_endpoint, socket_base::message_flags flags, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, &sender_endpoint, flags))) + buffers, &sender_endpoint, flags)) { return async_initiate( @@ -1240,8 +1209,8 @@ class basic_raw_socket 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 { @@ -1253,13 +1222,13 @@ class basic_raw_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - void operator()(ASIO_MOVE_ARG(WriteHandler) handler, + void operator()(WriteHandler&& handler, const ConstBufferSequence& buffers, socket_base::message_flags flags) const { @@ -1287,13 +1256,13 @@ class basic_raw_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - void operator()(ASIO_MOVE_ARG(WriteHandler) handler, + void operator()(WriteHandler&& handler, const ConstBufferSequence& buffers, const endpoint_type& destination, socket_base::message_flags flags) const { @@ -1321,13 +1290,13 @@ class basic_raw_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - void operator()(ASIO_MOVE_ARG(ReadHandler) handler, + void operator()(ReadHandler&& handler, const MutableBufferSequence& buffers, socket_base::message_flags flags) const { @@ -1355,13 +1324,13 @@ class basic_raw_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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/rts/lib/asio/include/asio/basic_readable_pipe.hpp b/rts/lib/asio/include/asio/basic_readable_pipe.hpp index b774e1c22e..9a5a0653f6 100644 --- a/rts/lib/asio/include/asio/basic_readable_pipe.hpp +++ b/rts/lib/asio/include/asio/basic_readable_pipe.hpp @@ -2,7 +2,7 @@ // basic_readable_pipe.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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,6 +21,7 @@ || defined(GENERATING_DOCUMENTATION) #include +#include #include "asio/any_io_executor.hpp" #include "asio/async_result.hpp" #include "asio/detail/handler_type_requirements.hpp" @@ -38,10 +39,6 @@ # include "asio/detail/reactive_descriptor_service.hpp" #endif -#if defined(ASIO_HAS_MOVE) -# include -#endif // defined(ASIO_HAS_MOVE) - #include "asio/detail/push_options.hpp" namespace asio { @@ -112,10 +109,10 @@ class basic_readable_pipe */ template explicit basic_readable_pipe(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { } @@ -159,9 +156,9 @@ class basic_readable_pipe template basic_readable_pipe(ExecutionContext& context, const native_handle_type& native_pipe, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -170,7 +167,6 @@ class basic_readable_pipe asio::detail::throw_error(ec, "assign"); } -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Move-construct a basic_readable_pipe from another. /** * This constructor moves a pipe from one object to another. @@ -221,10 +217,10 @@ class basic_readable_pipe */ template basic_readable_pipe(basic_readable_pipe&& other, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(std::move(other.impl_)) { } @@ -241,16 +237,15 @@ class basic_readable_pipe * constructor. */ template - typename constraint< + constraint_t< is_convertible::value, basic_readable_pipe& - >::type operator=(basic_readable_pipe&& other) + > operator=(basic_readable_pipe&& other) { basic_readable_pipe tmp(std::move(other)); impl_ = std::move(tmp.impl_); return *this; } -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the pipe. /** @@ -263,7 +258,7 @@ class basic_readable_pipe } /// Get the executor associated with the object. - const executor_type& get_executor() ASIO_NOEXCEPT + const executor_type& get_executor() noexcept { return impl_.get_executor(); } @@ -561,17 +556,13 @@ class basic_readable_pipe */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_read_some(const MutableBufferSequence& buffers, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) ReadToken = default_completion_token_t> + auto async_read_some(const MutableBufferSequence& buffers, + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers))) + declval(), token, buffers)) { return async_initiate( @@ -580,8 +571,8 @@ class basic_readable_pipe private: // Disallow copying and assignment. - basic_readable_pipe(const basic_readable_pipe&) ASIO_DELETED; - basic_readable_pipe& operator=(const basic_readable_pipe&) ASIO_DELETED; + basic_readable_pipe(const basic_readable_pipe&) = delete; + basic_readable_pipe& operator=(const basic_readable_pipe&) = delete; class initiate_async_read_some { @@ -593,13 +584,13 @@ class basic_readable_pipe { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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/rts/lib/asio/include/asio/basic_seq_packet_socket.hpp b/rts/lib/asio/include/asio/basic_seq_packet_socket.hpp index b81ab88acc..cf2a4b6ad7 100644 --- a/rts/lib/asio/include/asio/basic_seq_packet_socket.hpp +++ b/rts/lib/asio/include/asio/basic_seq_packet_socket.hpp @@ -2,7 +2,7 @@ // basic_seq_packet_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -111,9 +111,9 @@ class basic_seq_packet_socket */ template explicit basic_seq_packet_socket(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(context) { } @@ -154,10 +154,10 @@ class basic_seq_packet_socket template basic_seq_packet_socket(ExecutionContext& context, const protocol_type& protocol, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_socket(context, protocol) { } @@ -202,9 +202,9 @@ class basic_seq_packet_socket template basic_seq_packet_socket(ExecutionContext& context, const endpoint_type& endpoint, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(context, endpoint) { } @@ -247,14 +247,13 @@ class basic_seq_packet_socket template basic_seq_packet_socket(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_socket, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(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 @@ -267,7 +266,7 @@ class basic_seq_packet_socket * 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(std::move(other)) { } @@ -305,10 +304,10 @@ class basic_seq_packet_socket */ template basic_seq_packet_socket(basic_seq_packet_socket&& other, - typename constraint< + constraint_t< is_convertible::value && is_convertible::value - >::type = 0) + > = 0) : basic_socket(std::move(other)) { } @@ -327,16 +326,15 @@ class basic_seq_packet_socket * constructor. */ template - typename constraint< + constraint_t< is_convertible::value && is_convertible::value, basic_seq_packet_socket& - >::type operator=(basic_seq_packet_socket&& other) + > operator=(basic_seq_packet_socket&& other) { basic_socket::operator=(std::move(other)); return *this; } -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the socket. /** @@ -459,17 +457,15 @@ class basic_seq_packet_socket template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_send(const ConstBufferSequence& buffers, + = default_completion_token_t> + auto async_send(const ConstBufferSequence& buffers, socket_base::message_flags flags, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WriteToken&& token + = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers, flags))) + declval(), token, buffers, flags)) { return async_initiate( @@ -651,19 +647,15 @@ class basic_seq_packet_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive(const MutableBufferSequence& buffers, + std::size_t)) ReadToken = default_completion_token_t> + auto async_receive(const MutableBufferSequence& buffers, socket_base::message_flags& out_flags, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, socket_base::message_flags(0), &out_flags))) + buffers, socket_base::message_flags(0), &out_flags)) { return async_initiate( @@ -731,20 +723,16 @@ class basic_seq_packet_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive(const MutableBufferSequence& buffers, + std::size_t)) ReadToken = default_completion_token_t> + auto async_receive(const MutableBufferSequence& buffers, socket_base::message_flags in_flags, socket_base::message_flags& out_flags, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), - token, buffers, in_flags, &out_flags))) + token, buffers, in_flags, &out_flags)) { return async_initiate( @@ -754,9 +742,9 @@ class basic_seq_packet_socket 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 { @@ -768,13 +756,13 @@ class basic_seq_packet_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - void operator()(ASIO_MOVE_ARG(WriteHandler) handler, + void operator()(WriteHandler&& handler, const ConstBufferSequence& buffers, socket_base::message_flags flags) const { @@ -802,13 +790,13 @@ class basic_seq_packet_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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/rts/lib/asio/include/asio/basic_serial_port.hpp b/rts/lib/asio/include/asio/basic_serial_port.hpp index 59d5d363d0..8fa66c0b0d 100644 --- a/rts/lib/asio/include/asio/basic_serial_port.hpp +++ b/rts/lib/asio/include/asio/basic_serial_port.hpp @@ -2,7 +2,7 @@ // basic_serial_port.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 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 +#include #include "asio/any_io_executor.hpp" #include "asio/async_result.hpp" #include "asio/detail/handler_type_requirements.hpp" @@ -38,10 +39,6 @@ # include "asio/detail/posix_serial_port_service.hpp" #endif -#if defined(ASIO_HAS_MOVE) -# include -#endif // defined(ASIO_HAS_MOVE) - #include "asio/detail/push_options.hpp" namespace asio { @@ -112,10 +109,10 @@ class basic_serial_port */ template explicit basic_serial_port(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { } @@ -154,9 +151,9 @@ class basic_serial_port */ template basic_serial_port(ExecutionContext& context, const char* device, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -198,9 +195,9 @@ class basic_serial_port */ template basic_serial_port(ExecutionContext& context, const std::string& device, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -247,9 +244,9 @@ class basic_serial_port template basic_serial_port(ExecutionContext& context, const native_handle_type& native_serial_port, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -258,7 +255,6 @@ class basic_serial_port 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. @@ -310,10 +306,10 @@ class basic_serial_port */ template basic_serial_port(basic_serial_port&& other, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(std::move(other.impl_)) { } @@ -331,16 +327,15 @@ class basic_serial_port * constructor. */ template - typename constraint< + constraint_t< is_convertible::value, basic_serial_port& - >::type operator=(basic_serial_port&& other) + > operator=(basic_serial_port&& other) { basic_serial_port tmp(std::move(other)); impl_ = std::move(tmp.impl_); return *this; } -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the serial port. /** @@ -353,7 +348,7 @@ class basic_serial_port } /// Get the executor associated with the object. - const executor_type& get_executor() ASIO_NOEXCEPT + const executor_type& get_executor() noexcept { return impl_.get_executor(); } @@ -760,17 +755,13 @@ class basic_serial_port */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_write_some(const ConstBufferSequence& buffers, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) WriteToken = default_completion_token_t> + auto async_write_some(const ConstBufferSequence& buffers, + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers))) + declval(), token, buffers)) { return async_initiate( @@ -895,17 +886,13 @@ class basic_serial_port */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_read_some(const MutableBufferSequence& buffers, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) ReadToken = default_completion_token_t> + auto async_read_some(const MutableBufferSequence& buffers, + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers))) + declval(), token, buffers)) { return async_initiate( @@ -914,8 +901,8 @@ class basic_serial_port 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 { @@ -927,13 +914,13 @@ class basic_serial_port { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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 @@ -960,13 +947,13 @@ class basic_serial_port { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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/rts/lib/asio/include/asio/basic_signal_set.hpp b/rts/lib/asio/include/asio/basic_signal_set.hpp index cf70f13502..bf74c39b3a 100644 --- a/rts/lib/asio/include/asio/basic_signal_set.hpp +++ b/rts/lib/asio/include/asio/basic_signal_set.hpp @@ -2,7 +2,7 @@ // basic_signal_set.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -134,10 +134,10 @@ class basic_signal_set : public signal_set_base */ template explicit basic_signal_set(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { } @@ -180,10 +180,10 @@ class basic_signal_set : public signal_set_base */ template basic_signal_set(ExecutionContext& context, int signal_number_1, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { asio::error_code ec; @@ -239,10 +239,10 @@ class basic_signal_set : public signal_set_base template basic_signal_set(ExecutionContext& context, int signal_number_1, int signal_number_2, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { asio::error_code ec; @@ -308,10 +308,10 @@ class basic_signal_set : public signal_set_base template basic_signal_set(ExecutionContext& context, int signal_number_1, int signal_number_2, int signal_number_3, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { asio::error_code ec; @@ -334,7 +334,7 @@ class basic_signal_set : public signal_set_base } /// Get the executor associated with the object. - const executor_type& get_executor() ASIO_NOEXCEPT + const executor_type& get_executor() noexcept { return impl_.get_executor(); } @@ -590,15 +590,12 @@ class basic_signal_set : public signal_set_base */ template < ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code, int)) - SignalToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(SignalToken, - void (asio::error_code, int)) - async_wait( - ASIO_MOVE_ARG(SignalToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + SignalToken = default_completion_token_t> + auto async_wait( + SignalToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token))) + declval(), token)) { return async_initiate( initiate_async_wait(this), token); @@ -606,8 +603,8 @@ class basic_signal_set : public signal_set_base 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 { @@ -619,13 +616,13 @@ class basic_signal_set : public signal_set_base { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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/rts/lib/asio/include/asio/basic_socket.hpp b/rts/lib/asio/include/asio/basic_socket.hpp index b2c8e499b1..88c4b03fe1 100644 --- a/rts/lib/asio/include/asio/basic_socket.hpp +++ b/rts/lib/asio/include/asio/basic_socket.hpp @@ -2,7 +2,7 @@ // basic_socket.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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 #include "asio/any_io_executor.hpp" #include "asio/detail/config.hpp" #include "asio/async_result.hpp" @@ -38,10 +39,6 @@ # include "asio/detail/reactive_socket_service.hpp" #endif -#if defined(ASIO_HAS_MOVE) -# include -#endif // defined(ASIO_HAS_MOVE) - #include "asio/detail/push_options.hpp" namespace asio { @@ -134,9 +131,9 @@ class basic_socket */ template explicit basic_socket(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { } @@ -174,10 +171,10 @@ class basic_socket */ template basic_socket(ExecutionContext& context, const protocol_type& protocol, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { asio::error_code ec; @@ -229,9 +226,9 @@ class basic_socket */ template basic_socket(ExecutionContext& context, const endpoint_type& endpoint, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -282,9 +279,9 @@ class basic_socket template basic_socket(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_socket, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -293,7 +290,6 @@ class basic_socket 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. @@ -304,7 +300,7 @@ class basic_socket * @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_)) { } @@ -341,10 +337,10 @@ class basic_socket */ template basic_socket(basic_socket&& other, - typename constraint< + constraint_t< is_convertible::value && is_convertible::value - >::type = 0) + > = 0) : impl_(std::move(other.impl_)) { } @@ -360,20 +356,19 @@ class basic_socket * constructed using the @c basic_socket(const executor_type&) constructor. */ template - typename constraint< + constraint_t< is_convertible::value && is_convertible::value, basic_socket& - >::type operator=(basic_socket&& other) + > operator=(basic_socket&& 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. - const executor_type& get_executor() ASIO_NOEXCEPT + const executor_type& get_executor() noexcept { return impl_.get_executor(); } @@ -967,16 +962,13 @@ class basic_socket */ template < ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code)) - ConnectToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ConnectToken, - void (asio::error_code)) - async_connect(const endpoint_type& peer_endpoint, - ASIO_MOVE_ARG(ConnectToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + ConnectToken = default_completion_token_t> + auto async_connect(const endpoint_type& peer_endpoint, + ConnectToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, - peer_endpoint, declval()))) + declval(), token, + peer_endpoint, declval())) { asio::error_code open_ec; if (!is_open()) @@ -1821,15 +1813,12 @@ class basic_socket */ template < ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code)) - WaitToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WaitToken, - void (asio::error_code)) - async_wait(wait_type w, - ASIO_MOVE_ARG(WaitToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WaitToken = default_completion_token_t> + auto async_wait(wait_type w, + WaitToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, w))) + declval(), token, w)) { return async_initiate( initiate_async_wait(this), token, w); @@ -1861,8 +1850,8 @@ class basic_socket 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 { @@ -1874,13 +1863,13 @@ class basic_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - void operator()(ASIO_MOVE_ARG(ConnectHandler) handler, + void operator()(ConnectHandler&& handler, const endpoint_type& peer_endpoint, const asio::error_code& open_ec) const { @@ -1892,7 +1881,7 @@ class basic_socket { asio::post(self_->impl_.get_executor(), asio::detail::bind_handler( - ASIO_MOVE_CAST(ConnectHandler)(handler), open_ec)); + static_cast(handler), open_ec)); } else { @@ -1917,13 +1906,13 @@ class basic_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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/rts/lib/asio/include/asio/basic_socket_acceptor.hpp b/rts/lib/asio/include/asio/basic_socket_acceptor.hpp index f0f7ed017a..059d33ead5 100644 --- a/rts/lib/asio/include/asio/basic_socket_acceptor.hpp +++ b/rts/lib/asio/include/asio/basic_socket_acceptor.hpp @@ -2,7 +2,7 @@ // basic_socket_acceptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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 #include "asio/detail/config.hpp" #include "asio/any_io_executor.hpp" #include "asio/basic_socket.hpp" @@ -37,10 +38,6 @@ # include "asio/detail/reactive_socket_service.hpp" #endif -#if defined(ASIO_HAS_MOVE) -# include -#endif // defined(ASIO_HAS_MOVE) - #include "asio/detail/push_options.hpp" namespace asio { @@ -151,9 +148,9 @@ class basic_socket_acceptor */ template explicit basic_socket_acceptor(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { } @@ -193,10 +190,10 @@ class basic_socket_acceptor template basic_socket_acceptor(ExecutionContext& context, const protocol_type& protocol, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { asio::error_code ec; @@ -282,9 +279,9 @@ class basic_socket_acceptor template basic_socket_acceptor(ExecutionContext& context, const endpoint_type& endpoint, bool reuse_addr = true, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -347,9 +344,9 @@ class basic_socket_acceptor template basic_socket_acceptor(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_acceptor, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -358,7 +355,6 @@ class basic_socket_acceptor 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. @@ -370,7 +366,7 @@ class basic_socket_acceptor * 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_)) { } @@ -410,10 +406,10 @@ class basic_socket_acceptor */ template basic_socket_acceptor(basic_socket_acceptor&& other, - typename constraint< + constraint_t< is_convertible::value && is_convertible::value - >::type = 0) + > = 0) : impl_(std::move(other.impl_)) { } @@ -431,17 +427,16 @@ class basic_socket_acceptor * constructor. */ template - typename constraint< + constraint_t< is_convertible::value && is_convertible::value, basic_socket_acceptor& - >::type operator=(basic_socket_acceptor&& other) + > operator=(basic_socket_acceptor&& 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. /** @@ -454,7 +449,7 @@ class basic_socket_acceptor } /// Get the executor associated with the object. - const executor_type& get_executor() ASIO_NOEXCEPT + const executor_type& get_executor() noexcept { return impl_.get_executor(); } @@ -1254,15 +1249,12 @@ class basic_socket_acceptor */ template < ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code)) - WaitToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WaitToken, - void (asio::error_code)) - async_wait(wait_type w, - ASIO_MOVE_ARG(WaitToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WaitToken = default_completion_token_t> + auto async_wait(wait_type w, + WaitToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, w))) + declval(), token, w)) { return async_initiate( initiate_async_wait(this), token, w); @@ -1289,9 +1281,9 @@ class basic_socket_acceptor */ template void accept(basic_socket& peer, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) { asio::error_code ec; impl_.get_service().accept(impl_.get_implementation(), @@ -1325,9 +1317,9 @@ class basic_socket_acceptor template ASIO_SYNC_OP_VOID accept( basic_socket& peer, asio::error_code& ec, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) { impl_.get_service().accept(impl_.get_implementation(), peer, static_cast(0), ec); @@ -1391,19 +1383,16 @@ class basic_socket_acceptor */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(AcceptToken, - void (asio::error_code)) - async_accept(basic_socket& peer, - ASIO_MOVE_ARG(AcceptToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type), - typename constraint< + AcceptToken = default_completion_token_t> + auto async_accept(basic_socket& peer, + AcceptToken&& token = default_completion_token_t(), + constraint_t< is_convertible::value - >::type = 0) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + > = 0) + -> decltype( async_initiate( - declval(), token, - &peer, static_cast(0)))) + declval(), token, + &peer, static_cast(0))) { return async_initiate( initiate_async_accept(this), token, @@ -1524,23 +1513,19 @@ class basic_socket_acceptor */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(AcceptToken, - void (asio::error_code)) - async_accept(basic_socket& peer, + AcceptToken = default_completion_token_t> + auto async_accept(basic_socket& peer, endpoint_type& peer_endpoint, - ASIO_MOVE_ARG(AcceptToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + AcceptToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, &peer, &peer_endpoint))) + declval(), token, &peer, &peer_endpoint)) { return async_initiate( 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 @@ -1670,22 +1655,17 @@ class basic_socket_acceptor ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code, typename Protocol::socket::template rebind_executor< executor_type>::other)) MoveAcceptToken - ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(MoveAcceptToken, - void (asio::error_code, - typename Protocol::socket::template - rebind_executor::other)) - async_accept( - ASIO_MOVE_ARG(MoveAcceptToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + = default_completion_token_t> + auto async_accept( + MoveAcceptToken&& token = default_completion_token_t()) + -> decltype( async_initiate::other)>( declval(), token, - declval(), static_cast(0), + declval(), static_cast(0), static_cast::other*>(0)))) + rebind_executor::other*>(0))) { return async_initiate typename Protocol::socket::template rebind_executor::other accept(const Executor1& ex, - typename constraint< + constraint_t< is_executor::value || execution::is_executor::value - >::type = 0) + > = 0) { asio::error_code ec; typename Protocol::socket::template @@ -1762,9 +1742,9 @@ class basic_socket_acceptor typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other accept(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) { asio::error_code ec; typename Protocol::socket::template rebind_executor< @@ -1805,10 +1785,10 @@ class basic_socket_acceptor template typename Protocol::socket::template rebind_executor::other accept(const Executor1& ex, asio::error_code& ec, - typename constraint< + constraint_t< is_executor::value || execution::is_executor::value - >::type = 0) + > = 0) { typename Protocol::socket::template rebind_executor::other peer(ex); @@ -1848,9 +1828,9 @@ class basic_socket_acceptor typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other accept(ExecutionContext& context, asio::error_code& ec, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) { typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other peer(context); @@ -1924,22 +1904,17 @@ class basic_socket_acceptor template ::value + constraint_t::value || execution::is_executor::value, - Executor1>::type>::other)) MoveAcceptToken - ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(MoveAcceptToken, - void (asio::error_code, - typename Protocol::socket::template rebind_executor< - Executor1>::other)) - async_accept(const Executor1& ex, - ASIO_MOVE_ARG(MoveAcceptToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type), - typename constraint< + Executor1>>::other)) MoveAcceptToken + = default_completion_token_t> + auto async_accept(const Executor1& ex, + MoveAcceptToken&& token = default_completion_token_t(), + constraint_t< is_executor::value || execution::is_executor::value - >::type = 0) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + > = 0) + -> decltype( async_initiate(), token, ex, static_cast(0), static_cast::other*>(0)))) + rebind_executor::other*>(0))) { return async_initiate::other)) MoveAcceptToken - ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(MoveAcceptToken, - void (asio::error_code, - typename Protocol::socket::template rebind_executor< - typename ExecutionContext::executor_type>::other)) - async_accept(ExecutionContext& context, - ASIO_MOVE_ARG(MoveAcceptToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type), - typename constraint< + = default_completion_token_t> + auto async_accept(ExecutionContext& context, + MoveAcceptToken&& token = default_completion_token_t(), + constraint_t< is_convertible::value - >::type = 0) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + > = 0) + -> decltype( async_initiate(), token, context.get_executor(), static_cast(0), static_cast::other*>(0)))) + typename ExecutionContext::executor_type>::other*>(0))) { return async_initiate::other)) MoveAcceptToken - ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(MoveAcceptToken, - void (asio::error_code, - typename Protocol::socket::template - rebind_executor::other)) - async_accept(endpoint_type& peer_endpoint, - ASIO_MOVE_ARG(MoveAcceptToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + = default_completion_token_t> + auto async_accept(endpoint_type& peer_endpoint, + MoveAcceptToken&& token = default_completion_token_t()) + -> decltype( async_initiate::other)>( declval(), token, - declval(), &peer_endpoint, + declval(), &peer_endpoint, static_cast::other*>(0)))) + rebind_executor::other*>(0))) { return async_initiate typename Protocol::socket::template rebind_executor::other accept(const Executor1& ex, endpoint_type& peer_endpoint, - typename constraint< + constraint_t< is_executor::value || execution::is_executor::value - >::type = 0) + > = 0) { asio::error_code ec; typename Protocol::socket::template @@ -2305,9 +2270,9 @@ class basic_socket_acceptor typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other accept(ExecutionContext& context, endpoint_type& peer_endpoint, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) { asio::error_code ec; typename Protocol::socket::template rebind_executor< @@ -2355,10 +2320,10 @@ class basic_socket_acceptor typename Protocol::socket::template rebind_executor::other accept(const executor_type& ex, endpoint_type& peer_endpoint, asio::error_code& ec, - typename constraint< + constraint_t< is_executor::value || execution::is_executor::value - >::type = 0) + > = 0) { typename Protocol::socket::template rebind_executor::other peer(ex); @@ -2405,9 +2370,9 @@ class basic_socket_acceptor typename ExecutionContext::executor_type>::other accept(ExecutionContext& context, endpoint_type& peer_endpoint, asio::error_code& ec, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) { typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other peer(context); @@ -2488,29 +2453,24 @@ class basic_socket_acceptor template ::value + constraint_t::value || execution::is_executor::value, - Executor1>::type>::other)) MoveAcceptToken - ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(MoveAcceptToken, - void (asio::error_code, - typename Protocol::socket::template rebind_executor< - Executor1>::other)) - async_accept(const Executor1& ex, endpoint_type& peer_endpoint, - ASIO_MOVE_ARG(MoveAcceptToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type), - typename constraint< + Executor1>>::other)) MoveAcceptToken + = default_completion_token_t> + auto async_accept(const Executor1& ex, endpoint_type& peer_endpoint, + MoveAcceptToken&& token = default_completion_token_t(), + constraint_t< is_executor::value || execution::is_executor::value - >::type = 0) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + > = 0) + -> decltype( async_initiate::other)>( declval(), token, ex, &peer_endpoint, static_cast::other*>(0)))) + rebind_executor::other*>(0))) { return async_initiate::other)) MoveAcceptToken - ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(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(MoveAcceptToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type), - typename constraint< + = default_completion_token_t> + auto async_accept(ExecutionContext& context, endpoint_type& peer_endpoint, + MoveAcceptToken&& token = default_completion_token_t(), + constraint_t< is_convertible::value - >::type = 0) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + > = 0) + -> decltype( async_initiate(), token, context.get_executor(), &peer_endpoint, static_cast::other*>(0)))) + typename ExecutionContext::executor_type>::other*>(0))) { return async_initiate::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 { @@ -2643,13 +2596,13 @@ class basic_socket_acceptor { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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. @@ -2675,13 +2628,13 @@ class basic_socket_acceptor { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - void operator()(ASIO_MOVE_ARG(AcceptHandler) handler, + void operator()(AcceptHandler&& handler, basic_socket* peer, endpoint_type* peer_endpoint) const { @@ -2709,13 +2662,13 @@ class basic_socket_acceptor { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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 diff --git a/rts/lib/asio/include/asio/basic_socket_iostream.hpp b/rts/lib/asio/include/asio/basic_socket_iostream.hpp index 13e73eb435..902898d950 100644 --- a/rts/lib/asio/include/asio/basic_socket_iostream.hpp +++ b/rts/lib/asio/include/asio/basic_socket_iostream.hpp @@ -2,7 +2,7 @@ // basic_socket_iostream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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 #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 -// explicit basic_socket_iostream(T1 x1, ..., Tn xn) -// : std::basic_iostream( -// &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 \ - explicit basic_socket_iostream(ASIO_VARIADIC_BYVAL_PARAMS(n)) \ - : std::basic_iostream( \ - &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 -// 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 \ - 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 @@ class socket_iostream_base { } -#if defined(ASIO_HAS_MOVE) socket_iostream_base(socket_iostream_base&& other) : streambuf_(std::move(other.streambuf_)) { @@ -103,7 +53,6 @@ class socket_iostream_base streambuf_ = std::move(other.streambuf_); return *this; } -#endif // defined(ASIO_HAS_MOVE) basic_socket_streambuf streambuf_; }; @@ -118,11 +67,11 @@ template > + typename WaitTraits = time_traits> #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 > + typename WaitTraits = wait_traits> #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 WaitTraits = wait_traits> #else // defined(GENERATING_DOCUMENTATION) template #endif // defined(GENERATING_DOCUMENTATION) @@ -193,7 +142,6 @@ class basic_socket_iostream 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 s) : detail::socket_iostream_base< @@ -205,8 +153,6 @@ class basic_socket_iostream 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 @@ class basic_socket_iostream 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 - explicit basic_socket_iostream(T1 t1, ..., TN tn); -#elif defined(ASIO_HAS_VARIADIC_TEMPLATES) template explicit basic_socket_iostream(T... x) : std::basic_iostream( @@ -249,29 +188,19 @@ class basic_socket_iostream 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 - void connect(T1 t1, ..., TN tn); -#elif defined(ASIO_HAS_VARIADIC_TEMPLATES) template 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 @@ class basic_socket_iostream 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/rts/lib/asio/include/asio/basic_socket_streambuf.hpp b/rts/lib/asio/include/asio/basic_socket_streambuf.hpp index cdfb24a852..e3a5f83638 100644 --- a/rts/lib/asio/include/asio/basic_socket_streambuf.hpp +++ b/rts/lib/asio/include/asio/basic_socket_streambuf.hpp @@ -2,7 +2,7 @@ // basic_socket_streambuf.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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 -// 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 \ - 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 WaitTraits = time_traits> #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 > + typename WaitTraits = wait_traits> #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 WaitTraits = wait_traits> #else // defined(GENERATING_DOCUMENTATION) template #endif // defined(GENERATING_DOCUMENTATION) @@ -197,7 +165,6 @@ class basic_socket_streambuf 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 s) : detail::socket_streambuf_io_context(0), @@ -241,7 +208,6 @@ class basic_socket_streambuf 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 @@ class basic_socket_streambuf 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 @@ class basic_socket_streambuf * @return \c this if a connection was successfully established, a null * pointer otherwise. */ - template - basic_socket_streambuf* connect(T1 t1, ..., TN tn); -#elif defined(ASIO_HAS_VARIADIC_TEMPLATES) template basic_socket_streambuf* connect(T... x) { @@ -287,9 +249,6 @@ class basic_socket_streambuf 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 @@ class basic_socket_streambuf 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 @@ class basic_socket_streambuf #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/rts/lib/asio/include/asio/basic_stream_file.hpp b/rts/lib/asio/include/asio/basic_stream_file.hpp index af47d0d1d4..4b2ca8775e 100644 --- a/rts/lib/asio/include/asio/basic_stream_file.hpp +++ b/rts/lib/asio/include/asio/basic_stream_file.hpp @@ -2,7 +2,7 @@ // basic_stream_file.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -106,10 +106,10 @@ class basic_stream_file */ template explicit basic_stream_file(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_file(context) { this->impl_.get_service().set_is_stream( @@ -161,10 +161,10 @@ class basic_stream_file template basic_stream_file(ExecutionContext& context, const char* path, file_base::flags open_flags, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_file(context) { asio::error_code ec; @@ -221,10 +221,10 @@ class basic_stream_file template basic_stream_file(ExecutionContext& context, const std::string& path, file_base::flags open_flags, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_file(context) { asio::error_code ec; @@ -272,17 +272,16 @@ class basic_stream_file template basic_stream_file(ExecutionContext& context, const native_handle_type& native_file, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_file(context, native_file) { this->impl_.get_service().set_is_stream( this->impl_.get_implementation(), true); } -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Move-construct a basic_stream_file from another. /** * This constructor moves a stream file from one object to another. @@ -294,7 +293,7 @@ class basic_stream_file * constructed using the @c basic_stream_file(const executor_type&) * constructor. */ - basic_stream_file(basic_stream_file&& other) ASIO_NOEXCEPT + basic_stream_file(basic_stream_file&& other) noexcept : basic_file(std::move(other)) { } @@ -330,10 +329,10 @@ class basic_stream_file */ template basic_stream_file(basic_stream_file&& other, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_file(std::move(other)) { } @@ -350,15 +349,14 @@ class basic_stream_file * constructor. */ template - typename constraint< + constraint_t< is_convertible::value, basic_stream_file& - >::type operator=(basic_stream_file&& other) + > operator=(basic_stream_file&& other) { basic_file::operator=(std::move(other)); return *this; } -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the file. /** @@ -522,17 +520,13 @@ class basic_stream_file */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_write_some(const ConstBufferSequence& buffers, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) WriteToken = default_completion_token_t> + auto async_write_some(const ConstBufferSequence& buffers, + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers))) + declval(), token, buffers)) { return async_initiate( @@ -655,17 +649,13 @@ class basic_stream_file */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_read_some(const MutableBufferSequence& buffers, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) ReadToken = default_completion_token_t> + auto async_read_some(const MutableBufferSequence& buffers, + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers))) + declval(), token, buffers)) { return async_initiate( @@ -674,8 +664,8 @@ class basic_stream_file private: // Disallow copying and assignment. - basic_stream_file(const basic_stream_file&) ASIO_DELETED; - basic_stream_file& operator=(const basic_stream_file&) ASIO_DELETED; + basic_stream_file(const basic_stream_file&) = delete; + basic_stream_file& operator=(const basic_stream_file&) = delete; class initiate_async_write_some { @@ -687,13 +677,13 @@ class basic_stream_file { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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 @@ -720,13 +710,13 @@ class basic_stream_file { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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/rts/lib/asio/include/asio/basic_stream_socket.hpp b/rts/lib/asio/include/asio/basic_stream_socket.hpp index afe7c765be..e3a7945003 100644 --- a/rts/lib/asio/include/asio/basic_stream_socket.hpp +++ b/rts/lib/asio/include/asio/basic_stream_socket.hpp @@ -2,7 +2,7 @@ // basic_stream_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -116,9 +116,9 @@ class basic_stream_socket */ template explicit basic_stream_socket(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(context) { } @@ -155,10 +155,10 @@ class basic_stream_socket */ template basic_stream_socket(ExecutionContext& context, const protocol_type& protocol, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : basic_socket(context, protocol) { } @@ -201,9 +201,9 @@ class basic_stream_socket */ template basic_stream_socket(ExecutionContext& context, const endpoint_type& endpoint, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(context, endpoint) { } @@ -246,14 +246,13 @@ class basic_stream_socket template basic_stream_socket(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_socket, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : basic_socket(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. @@ -265,7 +264,7 @@ class basic_stream_socket * 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(std::move(other)) { } @@ -301,10 +300,10 @@ class basic_stream_socket */ template basic_stream_socket(basic_stream_socket&& other, - typename constraint< + constraint_t< is_convertible::value && is_convertible::value - >::type = 0) + > = 0) : basic_socket(std::move(other)) { } @@ -321,16 +320,15 @@ class basic_stream_socket * constructor. */ template - typename constraint< + constraint_t< is_convertible::value && is_convertible::value, basic_stream_socket& - >::type operator=(basic_stream_socket&& other) + > operator=(basic_stream_socket&& other) { basic_socket::operator=(std::move(other)); return *this; } -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the socket. /** @@ -493,18 +491,14 @@ class basic_stream_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_send(const ConstBufferSequence& buffers, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) WriteToken = default_completion_token_t> + auto async_send(const ConstBufferSequence& buffers, + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, socket_base::message_flags(0)))) + buffers, socket_base::message_flags(0))) { return async_initiate( @@ -567,18 +561,14 @@ class basic_stream_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_send(const ConstBufferSequence& buffers, + std::size_t)) WriteToken = default_completion_token_t> + auto async_send(const ConstBufferSequence& buffers, socket_base::message_flags flags, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers, flags))) + declval(), token, buffers, flags)) { return async_initiate( @@ -745,18 +735,14 @@ class basic_stream_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive(const MutableBufferSequence& buffers, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) ReadToken = default_completion_token_t> + auto async_receive(const MutableBufferSequence& buffers, + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, socket_base::message_flags(0)))) + buffers, socket_base::message_flags(0))) { return async_initiate( @@ -821,18 +807,14 @@ class basic_stream_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_receive(const MutableBufferSequence& buffers, + std::size_t)) ReadToken = default_completion_token_t> + auto async_receive(const MutableBufferSequence& buffers, socket_base::message_flags flags, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers, flags))) + declval(), token, buffers, flags)) { return async_initiate( @@ -953,18 +935,14 @@ class basic_stream_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_write_some(const ConstBufferSequence& buffers, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) WriteToken = default_completion_token_t> + auto async_write_some(const ConstBufferSequence& buffers, + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, socket_base::message_flags(0)))) + buffers, socket_base::message_flags(0))) { return async_initiate( @@ -1089,18 +1067,14 @@ class basic_stream_socket */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(ReadToken, - void (asio::error_code, std::size_t)) - async_read_some(const MutableBufferSequence& buffers, - ASIO_MOVE_ARG(ReadToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) ReadToken = default_completion_token_t> + auto async_read_some(const MutableBufferSequence& buffers, + ReadToken&& token = default_completion_token_t()) + -> decltype( async_initiate( declval(), token, - buffers, socket_base::message_flags(0)))) + buffers, socket_base::message_flags(0))) { return async_initiate( @@ -1110,8 +1084,8 @@ class basic_stream_socket 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 { @@ -1123,13 +1097,13 @@ class basic_stream_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - void operator()(ASIO_MOVE_ARG(WriteHandler) handler, + void operator()(WriteHandler&& handler, const ConstBufferSequence& buffers, socket_base::message_flags flags) const { @@ -1157,13 +1131,13 @@ class basic_stream_socket { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - void operator()(ASIO_MOVE_ARG(ReadHandler) handler, + void operator()(ReadHandler&& handler, const MutableBufferSequence& buffers, socket_base::message_flags flags) const { diff --git a/rts/lib/asio/include/asio/basic_streambuf.hpp b/rts/lib/asio/include/asio/basic_streambuf.hpp index 61e6dc4c39..0450811dca 100644 --- a/rts/lib/asio/include/asio/basic_streambuf.hpp +++ b/rts/lib/asio/include/asio/basic_streambuf.hpp @@ -2,7 +2,7 @@ // basic_streambuf.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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 > +template > #else template #endif @@ -155,7 +155,7 @@ class basic_streambuf * } * @endcode */ - std::size_t size() const ASIO_NOEXCEPT + std::size_t size() const noexcept { return pptr() - gptr(); } @@ -165,7 +165,7 @@ class basic_streambuf * @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 @@ class basic_streambuf * @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 @@ class basic_streambuf * @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 @@ class basic_streambuf /// Adapts basic_streambuf to the dynamic buffer sequence type requirements. #if defined(GENERATING_DOCUMENTATION) -template > +template > #else template #endif @@ -383,39 +383,37 @@ class basic_streambuf_ref } /// 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/rts/lib/asio/include/asio/basic_streambuf_fwd.hpp b/rts/lib/asio/include/asio/basic_streambuf_fwd.hpp index 2f74881e30..1ff320d463 100644 --- a/rts/lib/asio/include/asio/basic_streambuf_fwd.hpp +++ b/rts/lib/asio/include/asio/basic_streambuf_fwd.hpp @@ -2,7 +2,7 @@ // basic_streambuf_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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 > +template > class basic_streambuf; -template > +template > class basic_streambuf_ref; } // namespace asio diff --git a/rts/lib/asio/include/asio/basic_waitable_timer.hpp b/rts/lib/asio/include/asio/basic_waitable_timer.hpp index dccb546ac9..5e9df3ef4f 100644 --- a/rts/lib/asio/include/asio/basic_waitable_timer.hpp +++ b/rts/lib/asio/include/asio/basic_waitable_timer.hpp @@ -2,7 +2,7 @@ // basic_waitable_timer.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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 +#include #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 -#endif // defined(ASIO_HAS_MOVE) - #include "asio/detail/push_options.hpp" namespace asio { @@ -194,9 +191,9 @@ class basic_waitable_timer */ template explicit basic_waitable_timer(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { } @@ -233,9 +230,9 @@ class basic_waitable_timer template explicit basic_waitable_timer(ExecutionContext& context, const time_point& expiry_time, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -276,9 +273,9 @@ class basic_waitable_timer template explicit basic_waitable_timer(ExecutionContext& context, const duration& expiry_time, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -287,7 +284,6 @@ class basic_waitable_timer 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. @@ -340,9 +336,9 @@ class basic_waitable_timer template basic_waitable_timer( basic_waitable_timer&& other, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(std::move(other.impl_)) { } @@ -360,16 +356,15 @@ class basic_waitable_timer * constructor. */ template - typename constraint< + constraint_t< is_convertible::value, basic_waitable_timer& - >::type operator=(basic_waitable_timer&& other) + > operator=(basic_waitable_timer&& 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. /** @@ -381,7 +376,7 @@ class basic_waitable_timer } /// Get the executor associated with the object. - const executor_type& get_executor() ASIO_NOEXCEPT + const executor_type& get_executor() noexcept { return impl_.get_executor(); } @@ -768,15 +763,12 @@ class basic_waitable_timer */ template < ASIO_COMPLETION_TOKEN_FOR(void (asio::error_code)) - WaitToken ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX( - WaitToken, void (asio::error_code)) - async_wait( - ASIO_MOVE_ARG(WaitToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + WaitToken = default_completion_token_t> + auto async_wait( + WaitToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token))) + declval(), token)) { return async_initiate( initiate_async_wait(this), token); @@ -784,9 +776,8 @@ class basic_waitable_timer 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 { @@ -798,13 +789,13 @@ class basic_waitable_timer { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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. @@ -822,7 +813,7 @@ class basic_waitable_timer detail::io_object_impl< detail::deadline_timer_service< - detail::chrono_time_traits >, + detail::chrono_time_traits>, executor_type > impl_; }; diff --git a/rts/lib/asio/include/asio/basic_writable_pipe.hpp b/rts/lib/asio/include/asio/basic_writable_pipe.hpp index 3c305fa9be..4c389c9b46 100644 --- a/rts/lib/asio/include/asio/basic_writable_pipe.hpp +++ b/rts/lib/asio/include/asio/basic_writable_pipe.hpp @@ -2,7 +2,7 @@ // basic_writable_pipe.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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,6 +21,7 @@ || defined(GENERATING_DOCUMENTATION) #include +#include #include "asio/any_io_executor.hpp" #include "asio/async_result.hpp" #include "asio/detail/handler_type_requirements.hpp" @@ -38,10 +39,6 @@ # include "asio/detail/reactive_descriptor_service.hpp" #endif -#if defined(ASIO_HAS_MOVE) -# include -#endif // defined(ASIO_HAS_MOVE) - #include "asio/detail/push_options.hpp" namespace asio { @@ -112,10 +109,10 @@ class basic_writable_pipe */ template explicit basic_writable_pipe(ExecutionContext& context, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(0, 0, context) { } @@ -159,9 +156,9 @@ class basic_writable_pipe template basic_writable_pipe(ExecutionContext& context, const native_handle_type& native_pipe, - typename constraint< + constraint_t< is_convertible::value - >::type = 0) + > = 0) : impl_(0, 0, context) { asio::error_code ec; @@ -170,7 +167,6 @@ class basic_writable_pipe asio::detail::throw_error(ec, "assign"); } -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Move-construct a basic_writable_pipe from another. /** * This constructor moves a pipe from one object to another. @@ -221,10 +217,10 @@ class basic_writable_pipe */ template basic_writable_pipe(basic_writable_pipe&& other, - typename constraint< + constraint_t< is_convertible::value, defaulted_constraint - >::type = defaulted_constraint()) + > = defaulted_constraint()) : impl_(std::move(other.impl_)) { } @@ -241,16 +237,15 @@ class basic_writable_pipe * constructor. */ template - typename constraint< + constraint_t< is_convertible::value, basic_writable_pipe& - >::type operator=(basic_writable_pipe&& other) + > operator=(basic_writable_pipe&& other) { basic_writable_pipe tmp(std::move(other)); impl_ = std::move(tmp.impl_); return *this; } -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the pipe. /** @@ -263,7 +258,7 @@ class basic_writable_pipe } /// Get the executor associated with the object. - const executor_type& get_executor() ASIO_NOEXCEPT + const executor_type& get_executor() noexcept { return impl_.get_executor(); } @@ -557,17 +552,13 @@ class basic_writable_pipe */ template - ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(WriteToken, - void (asio::error_code, std::size_t)) - async_write_some(const ConstBufferSequence& buffers, - ASIO_MOVE_ARG(WriteToken) token - ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) - ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX(( + std::size_t)) WriteToken = default_completion_token_t> + auto async_write_some(const ConstBufferSequence& buffers, + WriteToken&& token = default_completion_token_t()) + -> decltype( async_initiate( - declval(), token, buffers))) + declval(), token, buffers)) { return async_initiate( @@ -576,8 +567,8 @@ class basic_writable_pipe private: // Disallow copying and assignment. - basic_writable_pipe(const basic_writable_pipe&) ASIO_DELETED; - basic_writable_pipe& operator=(const basic_writable_pipe&) ASIO_DELETED; + basic_writable_pipe(const basic_writable_pipe&) = delete; + basic_writable_pipe& operator=(const basic_writable_pipe&) = delete; class initiate_async_write_some { @@ -589,13 +580,13 @@ class basic_writable_pipe { } - const executor_type& get_executor() const ASIO_NOEXCEPT + const executor_type& get_executor() const noexcept { return self_->get_executor(); } template - 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 diff --git a/rts/lib/asio/include/asio/bind_allocator.hpp b/rts/lib/asio/include/asio/bind_allocator.hpp index 03fc2c5de0..27910a2ec6 100644 --- a/rts/lib/asio/include/asio/bind_allocator.hpp +++ b/rts/lib/asio/include/asio/bind_allocator.hpp @@ -2,7 +2,7 @@ // bind_allocator.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the 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_allocator.hpp" #include "asio/associator.hpp" #include "asio/async_result.hpp" @@ -37,8 +36,7 @@ struct allocator_binder_result_type }; template -struct allocator_binder_result_type::type> +struct allocator_binder_result_type> { typedef typename T::result_type result_type; protected: @@ -99,8 +97,7 @@ template struct allocator_binder_argument_type {}; template -struct allocator_binder_argument_type::type> +struct allocator_binder_argument_type> { typedef typename T::argument_type argument_type; }; @@ -125,7 +122,7 @@ struct allocator_binder_argument_types {}; template struct allocator_binder_argument_types::type> + void_t> { typedef typename T::first_argument_type first_argument_type; typedef typename T::second_argument_type second_argument_type; @@ -145,21 +142,6 @@ struct allocator_binder_argument_type typedef A2 second_argument_type; }; -// Helper to enable SFINAE on zero-argument operator() below. - -template -struct allocator_binder_result_of0 -{ - typedef void type; -}; - -template -struct allocator_binder_result_of0::type>::type> -{ - typedef typename result_of::type type; -}; - } // namespace detail /// A call wrapper type to bind an allocator of type @c Allocator @@ -247,10 +229,9 @@ class allocator_binder * @c U. */ template - allocator_binder(const allocator_type& s, - ASIO_MOVE_ARG(U) u) + allocator_binder(const allocator_type& s, U&& u) : allocator_(s), - target_(ASIO_MOVE_CAST(U)(u)) + target_(static_cast(u)) { } @@ -262,8 +243,7 @@ class allocator_binder } /// Construct a copy, but specify a different allocator. - allocator_binder(const allocator_type& s, - const allocator_binder& other) + allocator_binder(const allocator_type& s, const allocator_binder& other) : allocator_(s), target_(other.get()) { @@ -276,8 +256,9 @@ class allocator_binder * constructible from type @c U. */ template - allocator_binder( - const allocator_binder& other) + allocator_binder(const allocator_binder& other, + constraint_t::value> = 0, + constraint_t::value> = 0) : allocator_(other.get_allocator()), target_(other.get()) { @@ -291,19 +272,18 @@ class allocator_binder */ template allocator_binder(const allocator_type& s, - const allocator_binder& other) + const allocator_binder& other, + constraint_t::value> = 0) : allocator_(s), target_(other.get()) { } -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - /// Move constructor. allocator_binder(allocator_binder&& other) - : allocator_(ASIO_MOVE_CAST(allocator_type)( + : allocator_(static_cast( other.get_allocator())), - target_(ASIO_MOVE_CAST(T)(other.get())) + target_(static_cast(other.get())) { } @@ -311,17 +291,19 @@ class allocator_binder allocator_binder(const allocator_type& s, allocator_binder&& other) : allocator_(s), - target_(ASIO_MOVE_CAST(T)(other.get())) + target_(static_cast(other.get())) { } /// Move construct from a different allocator wrapper type. template allocator_binder( - allocator_binder&& other) - : allocator_(ASIO_MOVE_CAST(OtherAllocator)( + allocator_binder&& other, + constraint_t::value> = 0, + constraint_t::value> = 0) + : allocator_(static_cast( other.get_allocator())), - target_(ASIO_MOVE_CAST(U)(other.get())) + target_(static_cast(other.get())) { } @@ -329,126 +311,50 @@ class allocator_binder /// specify a different allocator. template allocator_binder(const allocator_type& s, - allocator_binder&& other) + allocator_binder&& other, + constraint_t::value> = 0) : allocator_(s), - target_(ASIO_MOVE_CAST(U)(other.get())) + target_(static_cast(other.get())) { } -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - /// Destructor. ~allocator_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 allocator. - allocator_type get_allocator() const ASIO_NOEXCEPT + allocator_type get_allocator() const noexcept { return allocator_; } -#if defined(GENERATING_DOCUMENTATION) - - template auto operator()(Args&& ...); - template auto operator()(Args&& ...) const; - -#elif defined(ASIO_HAS_VARIADIC_TEMPLATES) - /// Forwarding function call operator. template - typename result_of::type operator()( - ASIO_MOVE_ARG(Args)... args) + result_of_t operator()(Args&&... args) { - return target_(ASIO_MOVE_CAST(Args)(args)...); + return target_(static_cast(args)...); } /// Forwarding function call operator. template - typename result_of::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::allocator_binder_result_of0::type operator()() - { - return target_(); - } - - typename detail::allocator_binder_result_of0::type - operator()() const + result_of_t operator()(Args&&... args) const { - return target_(); + return target_(static_cast(args)...); } -#define ASIO_PRIVATE_BINDER_CALL_DEF(n) \ - template \ - typename result_of::type operator()( \ - ASIO_VARIADIC_MOVE_PARAMS(n)) \ - { \ - return target_(ASIO_VARIADIC_MOVE_ARGS(n)); \ - } \ - \ - template \ - typename result_of::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::allocator_binder_result_type< - T>::result_type_or_void result_type_or_void; - - result_type_or_void operator()() - { - return target_(); - } - - result_type_or_void operator()() const - { - return target_(); - } - -#define ASIO_PRIVATE_BINDER_CALL_DEF(n) \ - template \ - result_type_or_void operator()( \ - ASIO_VARIADIC_MOVE_PARAMS(n)) \ - { \ - return target_(ASIO_VARIADIC_MOVE_ARGS(n)); \ - } \ - \ - template \ - 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: Allocator allocator_; T target_; @@ -457,34 +363,49 @@ class allocator_binder /// Associate an object of type @c T with an allocator of type /// @c Allocator. template -ASIO_NODISCARD inline allocator_binder::type, Allocator> -bind_allocator(const Allocator& s, ASIO_MOVE_ARG(T) t) +ASIO_NODISCARD inline allocator_binder, Allocator> +bind_allocator(const Allocator& s, T&& t) { - return allocator_binder< - typename decay::type, Allocator>( - s, ASIO_MOVE_CAST(T)(t)); + return allocator_binder, Allocator>(s, static_cast(t)); } #if !defined(GENERATING_DOCUMENTATION) namespace detail { -template -struct allocator_binder_async_result_completion_handler_type +template +class allocator_binder_completion_handler_async_result { +public: + template + explicit allocator_binder_completion_handler_async_result(T&) + { + } }; template -struct allocator_binder_async_result_completion_handler_type< - TargetAsyncResult, Allocator, - typename void_type< - typename TargetAsyncResult::completion_handler_type - >::type> +class allocator_binder_completion_handler_async_result< + TargetAsyncResult, Allocator, + void_t> { +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 @@ -494,10 +415,7 @@ struct allocator_binder_async_result_return_type template struct allocator_binder_async_result_return_type< - TargetAsyncResult, - typename void_type< - typename TargetAsyncResult::return_type - >::type> + TargetAsyncResult, void_type> { typedef typename TargetAsyncResult::return_type return_type; }; @@ -506,219 +424,98 @@ struct allocator_binder_async_result_return_type< template class async_result, Signature> : - public detail::allocator_binder_async_result_completion_handler_type< - async_result, Allocator>, + public detail::allocator_binder_completion_handler_async_result< + async_result, Allocator>, public detail::allocator_binder_async_result_return_type< - async_result > + async_result> { public: explicit async_result(allocator_binder& b) - : target_(b.get()) - { - } - - typename async_result::return_type get() + : detail::allocator_binder_completion_handler_async_result< + async_result, Allocator>(b.get()) { - return target_.get(); } template struct init_wrapper { template - init_wrapper(const Allocator& allocator, ASIO_MOVE_ARG(Init) init) + init_wrapper(const Allocator& allocator, Init&& init) : allocator_(allocator), - initiation_(ASIO_MOVE_CAST(Init)(init)) + initiation_(static_cast(init)) { } -#if defined(ASIO_HAS_VARIADIC_TEMPLATES) - template - void operator()( - ASIO_MOVE_ARG(Handler) handler, - ASIO_MOVE_ARG(Args)... args) + void operator()(Handler&& handler, Args&&... args) { - ASIO_MOVE_CAST(Initiation)(initiation_)( - allocator_binder< - typename decay::type, Allocator>( - allocator_, ASIO_MOVE_CAST(Handler)(handler)), - ASIO_MOVE_CAST(Args)(args)...); + static_cast(initiation_)( + allocator_binder, Allocator>( + allocator_, static_cast(handler)), + static_cast(args)...); } template - void operator()( - ASIO_MOVE_ARG(Handler) handler, - ASIO_MOVE_ARG(Args)... args) const + void operator()(Handler&& handler, Args&&... args) const { initiation_( - allocator_binder< - typename decay::type, Allocator>( - allocator_, ASIO_MOVE_CAST(Handler)(handler)), - ASIO_MOVE_CAST(Args)(args)...); + allocator_binder, Allocator>( + allocator_, static_cast(handler)), + static_cast(args)...); } -#else // defined(ASIO_HAS_VARIADIC_TEMPLATES) - - template - void operator()( - ASIO_MOVE_ARG(Handler) handler) - { - ASIO_MOVE_CAST(Initiation)(initiation_)( - allocator_binder< - typename decay::type, Allocator>( - allocator_, ASIO_MOVE_CAST(Handler)(handler))); - } - - template - void operator()( - ASIO_MOVE_ARG(Handler) handler) const - { - initiation_( - allocator_binder< - typename decay::type, Allocator>( - allocator_, ASIO_MOVE_CAST(Handler)(handler))); - } - -#define ASIO_PRIVATE_INIT_WRAPPER_DEF(n) \ - template \ - void operator()( \ - ASIO_MOVE_ARG(Handler) handler, \ - ASIO_VARIADIC_MOVE_PARAMS(n)) \ - { \ - ASIO_MOVE_CAST(Initiation)(initiation_)( \ - allocator_binder< \ - typename decay::type, Allocator>( \ - allocator_, ASIO_MOVE_CAST(Handler)(handler)), \ - ASIO_VARIADIC_MOVE_ARGS(n)); \ - } \ - \ - template \ - void operator()( \ - ASIO_MOVE_ARG(Handler) handler, \ - ASIO_VARIADIC_MOVE_PARAMS(n)) const \ - { \ - initiation_( \ - allocator_binder< \ - typename decay::type, Allocator>( \ - allocator_, 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) - Allocator allocator_; Initiation initiation_; }; -#if defined(ASIO_HAS_VARIADIC_TEMPLATES) - template - static ASIO_INITFN_DEDUCED_RESULT_TYPE(T, Signature, - (async_initiate( - declval::type> >(), - declval().get(), - declval()...))) - initiate( - ASIO_MOVE_ARG(Initiation) initiation, - ASIO_MOVE_ARG(RawCompletionToken) token, - ASIO_MOVE_ARG(Args)... args) - { - return async_initiate( - init_wrapper::type>( - token.get_allocator(), - ASIO_MOVE_CAST(Initiation)(initiation)), - token.get(), ASIO_MOVE_CAST(Args)(args)...); - } - -#else // defined(ASIO_HAS_VARIADIC_TEMPLATES) - - template - static ASIO_INITFN_DEDUCED_RESULT_TYPE(T, Signature, - (async_initiate( - declval::type> >(), - declval().get()))) - initiate( - ASIO_MOVE_ARG(Initiation) initiation, - ASIO_MOVE_ARG(RawCompletionToken) token) + static auto initiate(Initiation&& initiation, + RawCompletionToken&& token, Args&&... args) + -> decltype( + async_initiate( + declval>>(), + token.get(), static_cast(args)...)) { return async_initiate( - init_wrapper::type>( - token.get_allocator(), - ASIO_MOVE_CAST(Initiation)(initiation)), - token.get()); + init_wrapper>(token.get_allocator(), + static_cast(initiation)), + token.get(), static_cast(args)...); } -#define ASIO_PRIVATE_INITIATE_DEF(n) \ - template \ - static ASIO_INITFN_DEDUCED_RESULT_TYPE(T, Signature, \ - (async_initiate( \ - declval::type> >(), \ - declval().get(), \ - ASIO_VARIADIC_MOVE_DECLVAL(n)))) \ - initiate( \ - ASIO_MOVE_ARG(Initiation) initiation, \ - ASIO_MOVE_ARG(RawCompletionToken) token, \ - ASIO_VARIADIC_MOVE_PARAMS(n)) \ - { \ - return async_initiate( \ - init_wrapper::type>( \ - token.get_allocator(), \ - 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 target_; }; template