passenger 6.0.18 → 6.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG +48 -2
- data/CONTRIBUTORS +2 -0
- data/build/integration_tests.rb +2 -1
- data/build/test_basics.rb +6 -2
- data/dev/copy_boost_headers +77 -61
- data/package.json +15 -15
- data/src/agent/Core/Config.h +1 -1
- data/src/agent/Core/Controller/Config.h +1 -1
- data/src/agent/Core/SecurityUpdateChecker.h +4 -4
- data/src/agent/Watchdog/Config.h +1 -1
- data/src/cxx_supportlib/Constants.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +3 -0
- data/src/cxx_supportlib/ServerKit/http_parser.cpp +740 -430
- data/src/cxx_supportlib/ServerKit/http_parser.h +156 -34
- data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_handler.hpp +142 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/any_io_executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/append.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/as_tuple.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_cancellation_slot.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_executor.hpp +3 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_immediate_executor.hpp +299 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/associator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +49 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/awaitable.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_file.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_io_object.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_random_access_file.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_readable_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +55 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +9 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_iostream.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_streambuf.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_file.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_writable_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_allocator.hpp +32 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_cancellation_slot.hpp +32 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +7 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_immediate_executor.hpp +753 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +234 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffer_registration.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream.hpp +6 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream.hpp +6 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffers_iterator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_signal.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_state.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_type.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/co_spawn.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/compose.hpp +8 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/connect_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/consign.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp +19 -12
- data/src/cxx_supportlib/vendor-modified/boost/asio/deferred.hpp +184 -57
- data/src/cxx_supportlib/vendor-modified/boost/asio/detached.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/assert.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/atomic_count.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_cancellation_state.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_completion_cond.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/blocking_executor_op.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_resize_guard.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_sequence_adapter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bulk_executor_op.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/call_stack.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono_time_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_handler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/composed_work.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/concurrency_hint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_event.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +79 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/consuming_buffers.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstddef.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstdint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/date_time_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dependent_type.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_ops.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_read_op.hpp +39 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_write_op.hpp +38 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dev_poll_reactor.hpp +20 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/epoll_reactor.hpp +20 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/event.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/eventfd_select_interrupter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/exception.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_function.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_op.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fd_set_adapter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fenced_block.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/functional.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/future.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_arm_fenced_block.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_hppa_fenced_block.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_sync_fenced_block.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_x86_fenced_block.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/global.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_cont_helpers.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_invoke_helpers.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_tracking.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_type_requirements.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_work.hpp +33 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/hash_map.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/buffer_sequence_adapter.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +13 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.ipp +17 -8
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/eventfd_select_interrupter.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_descriptor_service.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_file_service.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_service.ipp +69 -35
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_socket_service_base.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.ipp +15 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/null_event.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/pipe_select_interrupter.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_event.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_mutex.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_serial_port_service.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_thread.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_tss_ptr.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +25 -17
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/resolver_service_base.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/scheduler.ipp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +12 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/signal_set_service.ipp +57 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/thread_context.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/throw_error.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_ptime.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_set.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/{impl/defer.hpp → detail/initiate_defer.hpp} +6 -52
- data/src/cxx_supportlib/vendor-modified/boost/asio/{impl/dispatch.hpp → detail/initiate_dispatch.hpp} +6 -50
- data/src/cxx_supportlib/vendor-modified/boost/asio/{impl/post.hpp → detail/initiate_post.hpp} +6 -52
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_control.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_object_impl.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_read_at_op.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_read_op.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_service.hpp +9 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_write_at_op.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_write_op.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_file_service.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_null_buffers_op.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_operation.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_service.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_accept_op.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_connect_op.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recv_op.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recvfrom_op.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recvmsg_op.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_send_op.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_sendto_op.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_service_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_wait_op.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_buffer_sequence.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/keyword_tss_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/kqueue_reactor.hpp +20 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/local_free_on_block_exit.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/macos_fenced_block.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/non_const_lvalue.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/noncopyable.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_event.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_fenced_block.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_global.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_reactor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_signal_blocker.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_socket_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_static_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_thread.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_tss_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/object_pool.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/old_win_sdk_compat.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/op_queue.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/operation.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pipe_select_interrupter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pop_options.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_event.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_fd_set_adapter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_global.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_serial_port_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_signal_blocker.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_static_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_thread.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_tss_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/push_options.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +55 -19
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_null_buffers_op.hpp +35 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_accept_op.hpp +83 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_connect_op.hpp +39 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recv_op.hpp +38 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvfrom_op.hpp +39 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvmsg_op.hpp +39 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +39 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_sendto_op.hpp +38 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +10 -8
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +127 -30
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_wait_op.hpp +35 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op_queue.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/recycling_allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/regex_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_query_op.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_operation.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_task.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_thread_info.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_lock.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_interrupter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_reactor.hpp +20 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/service_registry.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_blocker.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_handler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_init.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_set_service.hpp +11 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_holder.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_ops.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_option.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_select_interrupter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_types.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/solaris_fenced_block.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/source_location.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/static_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_event.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_fenced_block.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_global.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_static_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_thread.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_executor_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/string_view.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_group.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_exception.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_ptime.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_set.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/tss_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/type_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/utility.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/variadic_templates.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_handler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/winsock_init.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/work_dispatcher.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/dispatch.hpp +19 -12
- data/src/cxx_supportlib/vendor-modified/boost/asio/error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/any_executor.hpp +73 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bad_executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking_adaptation.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_execute.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_guarantee.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/connect.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context_as.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_invocable.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_operation.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_receiver.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/bulk_sender.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/submit_receiver.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/void_receiver.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/execute.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/impl/bad_executor.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/impl/receiver_invocation_error.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/invocable_archetype.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/mapping.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/occupancy.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/operation_state.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/outstanding_work.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/prefer_only.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver_invocation_error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/relationship.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/schedule.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/scheduler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/sender.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_done.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_value.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/start.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/submit.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/executor_work_guard.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/append.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/as_single.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/as_tuple.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/awaitable_operators.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_channel.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_concurrent_channel.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/cancellation_condition.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel_error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_composed.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_spawn.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/concurrent_channel.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/coro.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/coro_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/deferred.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_handler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_message.hpp +10 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_operation.hpp +87 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_payload.hpp +65 -19
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_receive_op.hpp +11 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_functions.hpp +13 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_op.hpp +10 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_service.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_completion_handler.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_promise_allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/has_signature.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/impl/channel_service.hpp +11 -8
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/partial_promise.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/as_single.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/channel_error.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/co_composed.hpp +47 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/coro.hpp +34 -31
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/parallel_group.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/promise.hpp +15 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_coro.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_promise.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/parallel_group.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/prepend.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/promise.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_coro.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_promise.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/file_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/basic_endpoint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/datagram_protocol.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/endpoint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/impl/endpoint.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/raw_protocol.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/seq_packet_protocol.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/stream_protocol.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_alloc_hook.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_continuation_hook.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_invoke_hook.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/high_resolution_timer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_completion_executor.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_io_executor.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/append.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/as_tuple.hpp +78 -11
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/awaitable.hpp +46 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/cancellation_signal.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/co_spawn.hpp +92 -50
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect_pipe.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/consign.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/deferred.hpp +58 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/detached.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/error.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.ipp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/multiple_exceptions.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/prepend.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/redirect_error.hpp +47 -31
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.ipp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_awaitable.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_context_strand.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_service_strand.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_iterator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_range.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_iterator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_range.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/bad_address_cast.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_endpoint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_entry.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_iterator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_query.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_results.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/endpoint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/impl/endpoint.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/host_name.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/icmp.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/basic_endpoint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/host_name.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/multicast.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v4.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v6.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_query_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/tcp.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/udp.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/unicast.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/v6_only.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_applicable_property.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_contiguous_iterator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_read_buffered.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_write_buffered.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/basic_endpoint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/connect_pair.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/datagram_protocol.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/endpoint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/impl/endpoint.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/seq_packet_protocol.hpp +86 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/stream_protocol.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/multiple_exceptions.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/packaged_task.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/post.hpp +19 -12
- data/src/cxx_supportlib/vendor-modified/boost/asio/prefer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/prepend.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/query.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/random_access_file.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/readable_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/recycling_allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/redirect_error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/registered_buffer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/require.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/require_concept.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set_base.hpp +184 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/socket_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_base.hpp +24 -24
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/buffered_handshake_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/engine.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/handshake_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/engine.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_init.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_types.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/password_callback.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/read_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/shutdown_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/stream_core.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/verify_callback.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/write_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/host_name_verification.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/error.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/host_name_verification.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/rfc2818_verification.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/src.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/rfc2818_verification.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_mode.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/static_thread_pool.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/steady_timer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/stream_file.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/streambuf.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/system_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/system_executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/system_timer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/this_coro.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/thread_pool.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/time_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/bulk_execute_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/bulk_execute_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/connect_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/connect_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/equality_comparable.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/execute_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/execute_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_static_constexpr_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/schedule_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/schedule_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_done_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_done_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_error_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_error_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_value_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_value_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/start_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/start_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_query.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require_concept.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/submit_free.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/submit_member.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/buffer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/internet.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/io_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/net.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/netfwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/socket.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/timer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/unyield.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/use_awaitable.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/uses_executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/wait_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_overlapped_handle.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_handle.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/writable_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/yield.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +6 -2
- data/src/cxx_supportlib/vendor-modified/boost/assert/source_location.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic.hpp +0 -13
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_ref_impl.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +6 -4
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +0 -49
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_x86.hpp +107 -40
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_msvc_x86.hpp +32 -5
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/remove_cv.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/apply.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind_mf_cc.hpp +18 -18
- data/src/cxx_supportlib/vendor-modified/boost/bind/detail/is_same.hpp +36 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/detail/requires_cxx11.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/detail/result_traits.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/bind/protect.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/std_placeholders.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/storage.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/config.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/requires_cxx11.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_get.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io_v1/chrono_io.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/hp_acc.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp_zos.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/detail/suffix.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +16 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +0 -29
- data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +32 -33
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +8 -9
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/allocator_version_traits.hpp +14 -15
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +41 -44
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +32 -34
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +36 -24
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +48 -12
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +12 -14
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool_impl.hpp +10 -11
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/placement_new.hpp +0 -8
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +6 -7
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +33 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +3 -7
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +0 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/node_handle.hpp +11 -9
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/polymorphic_allocator.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +0 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +0 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +35 -16
- data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +8 -9
- data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +23 -12
- data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +101 -37
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_range.hpp +285 -48
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_tuple_like.hpp +156 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/mulx.hpp +79 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/requires_cxx11.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +17 -2
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash_fwd.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_contiguous_range.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_range.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_tuple_like.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/alignof.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/allocator_access.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/core/bit.hpp +344 -31
- data/src/cxx_supportlib/vendor-modified/boost/core/checked_delete.hpp +20 -3
- data/src/cxx_supportlib/vendor-modified/boost/core/data.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/is_same.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/lwt_unattended.hpp +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/sp_thread_pause.hpp +71 -0
- data/src/cxx_supportlib/vendor-modified/boost/{smart_ptr → core}/detail/sp_thread_sleep.hpp +39 -21
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/sp_thread_yield.hpp +100 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/sp_win32_sleep.hpp +54 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/string_view.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/core/identity.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/is_same.hpp +10 -15
- data/src/cxx_supportlib/vendor-modified/boost/core/launder.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +33 -36
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test_trait.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/core/make_span.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/max_align.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/memory_resource.hpp +108 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/ref.hpp +23 -16
- data/src/cxx_supportlib/vendor-modified/boost/core/serialization.hpp +131 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/size.hpp +31 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/snprintf.hpp +173 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/span.hpp +17 -17
- data/src/cxx_supportlib/vendor-modified/boost/core/swap.hpp +27 -8
- data/src/cxx_supportlib/vendor-modified/boost/core/type_name.hpp +29 -5
- data/src/cxx_supportlib/vendor-modified/boost/core/yield_primitives.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/describe/members.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/exception_ptr.hpp +20 -8
- data/src/cxx_supportlib/vendor-modified/boost/exception/diagnostic_information.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/exception/to_string.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/function/detail/epilogue.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/detail/prologue.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/detail/requires_cxx11.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +28 -32
- data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +10 -2
- data/src/cxx_supportlib/vendor-modified/boost/function.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_list_algorithms.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/array_initializer.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/common_slist_algorithms.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_iterator.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +26 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/facade_iterator_category.hpp +10 -11
- data/src/cxx_supportlib/vendor-modified/boost/iterator/is_iterator.hpp +148 -0
- data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_concepts.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +5 -16
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +19 -1
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/posix_api.cpp +10 -18
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wide_posix_api.cpp +13 -14
- data/src/cxx_supportlib/vendor-modified/boost/limits.hpp +12 -12
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_merge.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_sort.hpp +19 -19
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +36 -37
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/basic_op.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/heap_sort.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp +17 -19
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/move.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/predicate.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/algorithm.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/default_delete.hpp +5 -6
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/nsec_clock.hpp +65 -24
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +5 -6
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +77 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/unique_ptr.hpp +17 -18
- data/src/cxx_supportlib/vendor-modified/boost/move/utility.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/move/utility_core.hpp +8 -6
- data/src/cxx_supportlib/vendor-modified/boost/mp11/algorithm.hpp +38 -17
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/config.hpp +11 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_append.hpp +140 -4
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_defer.hpp +119 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_fold.hpp +105 -3
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_front.hpp +13 -1
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_is_value_list.hpp +41 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_list_v.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_map_find.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_plus.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_rename.hpp +18 -5
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_value.hpp +25 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/integral.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/list.hpp +171 -3
- data/src/cxx_supportlib/vendor-modified/boost/mp11/utility.hpp +2 -96
- data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/mpl/assert.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/next_prior.hpp +3 -44
- data/src/cxx_supportlib/vendor-modified/boost/nondet_random.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_config.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_trivially_copyable_base.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/tag_keyword_arg_ref.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/unmatched_argument.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/overloads.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/tag.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/unwrap_cv_reference.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/void.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/binding.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/parameter/match.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/template_keyword.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/value_type.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/pool/simple_segregated_storage.hpp +13 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/config.hpp +7 -2
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/requires_cxx11.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/plus.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/regex/v5/icu.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_workaround.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/requires_cxx11.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/yield_k.hpp +4 -6
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/enable_shared_from_this.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_array.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/weak_ptr.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category.hpp +10 -2
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category_impl.hpp +11 -26
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_code.hpp +13 -2
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/mutex.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/requires_cxx11.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/std_category.hpp +13 -8
- data/src/cxx_supportlib/vendor-modified/boost/throw_exception.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_swappable_cxx_11.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_integral.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_swappable.hpp +4 -24
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_swappable.hpp +92 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/detail/requires_cxx11.hpp +18 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/functional.hpp +6 -1
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/memory.hpp +6 -1
- data/src/cxx_supportlib/vendor-modified/boost/typeof/typeof.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map.hpp +818 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map_fwd.hpp +54 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/concurrent_table.hpp +1324 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/{foa.hpp → foa/core.hpp} +901 -703
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/element_type.hpp +60 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/flat_map_types.hpp +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/flat_set_types.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/ignore_wshadow.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_handle.hpp +210 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_map_types.hpp +132 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_set_types.hpp +95 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/restore_wshadow.hpp +11 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/rw_spinlock.hpp +179 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/table.hpp +556 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/tuple_rotate_right.hpp +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fwd.hpp +86 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +24 -93
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/mulx.hpp +129 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/narrow_cast.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/prime_fmod.hpp +2 -7
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/requires_cxx11.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/type_traits.hpp +15 -2
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +111 -62
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map_fwd.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +29 -23
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set_fwd.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +192 -12
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map.hpp +884 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map_fwd.hpp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set.hpp +688 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set_fwd.hpp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/modp_b64_strict_aliasing.cpp +1 -1
- data/src/helper-scripts/wsgi-loader.py +34 -17
- data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +3 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +5 -3
- data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +3 -1
- data/src/ruby_supportlib/phusion_passenger/ruby_core_enhancements.rb +5 -0
- data/src/ruby_supportlib/phusion_passenger.rb +1 -1
- metadata +72 -15
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/hash_table.hpp +0 -1278
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_tuple.hpp +0 -133
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp +0 -51
- data/src/cxx_supportlib/vendor-modified/boost/type_index/stl_type_index.hpp +0 -278
- data/src/cxx_supportlib/vendor-modified/boost/type_index/type_index_facade.hpp +0 -297
- data/src/cxx_supportlib/vendor-modified/boost/type_index.hpp +0 -265
@@ -1,6 +1,7 @@
|
|
1
|
-
/*
|
1
|
+
/* Common base for Boost.Unordered open-addressing tables.
|
2
2
|
*
|
3
|
-
* Copyright 2022 Joaquin M Lopez Munoz.
|
3
|
+
* Copyright 2022-2023 Joaquin M Lopez Munoz.
|
4
|
+
* Copyright 2023 Christian Mazakas.
|
4
5
|
* Distributed under the Boost Software License, Version 1.0.
|
5
6
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
6
7
|
* http://www.boost.org/LICENSE_1_0.txt)
|
@@ -8,8 +9,8 @@
|
|
8
9
|
* See https://www.boost.org/libs/unordered for library home page.
|
9
10
|
*/
|
10
11
|
|
11
|
-
#ifndef
|
12
|
-
#define
|
12
|
+
#ifndef BOOST_UNORDERED_DETAIL_FOA_CORE_HPP
|
13
|
+
#define BOOST_UNORDERED_DETAIL_FOA_CORE_HPP
|
13
14
|
|
14
15
|
#include <boost/assert.hpp>
|
15
16
|
#include <boost/config.hpp>
|
@@ -21,25 +22,43 @@
|
|
21
22
|
#include <boost/core/pointer_traits.hpp>
|
22
23
|
#include <boost/cstdint.hpp>
|
23
24
|
#include <boost/predef.h>
|
25
|
+
#include <boost/static_assert.hpp>
|
26
|
+
#include <boost/type_traits/has_trivial_constructor.hpp>
|
27
|
+
#include <boost/type_traits/has_trivial_copy.hpp>
|
28
|
+
#include <boost/type_traits/has_trivial_assign.hpp>
|
24
29
|
#include <boost/type_traits/is_nothrow_swappable.hpp>
|
25
|
-
#include <boost/unordered/detail/
|
30
|
+
#include <boost/unordered/detail/narrow_cast.hpp>
|
31
|
+
#include <boost/unordered/detail/mulx.hpp>
|
26
32
|
#include <boost/unordered/hash_traits.hpp>
|
27
33
|
#include <climits>
|
28
34
|
#include <cmath>
|
29
35
|
#include <cstddef>
|
30
36
|
#include <cstring>
|
31
|
-
#include <iterator>
|
32
37
|
#include <limits>
|
38
|
+
#include <memory>
|
39
|
+
#include <new>
|
33
40
|
#include <tuple>
|
34
41
|
#include <type_traits>
|
35
42
|
#include <utility>
|
36
43
|
|
37
|
-
#if defined(
|
44
|
+
#if !defined(BOOST_UNORDERED_DISABLE_SSE2)
|
45
|
+
#if defined(BOOST_UNORDERED_ENABLE_SSE2)|| \
|
46
|
+
defined(__SSE2__)|| \
|
38
47
|
defined(_M_X64)||(defined(_M_IX86_FP)&&_M_IX86_FP>=2)
|
39
48
|
#define BOOST_UNORDERED_SSE2
|
40
|
-
#
|
41
|
-
#
|
49
|
+
#endif
|
50
|
+
#endif
|
51
|
+
|
52
|
+
#if !defined(BOOST_UNORDERED_DISABLE_NEON)
|
53
|
+
#if defined(BOOST_UNORDERED_ENABLE_NEON)||\
|
54
|
+
(defined(__ARM_NEON)&&!defined(__ARM_BIG_ENDIAN))
|
42
55
|
#define BOOST_UNORDERED_LITTLE_ENDIAN_NEON
|
56
|
+
#endif
|
57
|
+
#endif
|
58
|
+
|
59
|
+
#if defined(BOOST_UNORDERED_SSE2)
|
60
|
+
#include <emmintrin.h>
|
61
|
+
#elif defined(BOOST_UNORDERED_LITTLE_ENDIAN_NEON)
|
43
62
|
#include <arm_neon.h>
|
44
63
|
#endif
|
45
64
|
|
@@ -67,15 +86,70 @@
|
|
67
86
|
}while(0)
|
68
87
|
#endif
|
69
88
|
|
89
|
+
/* We use BOOST_UNORDERED_PREFETCH[_ELEMENTS] macros rather than proper
|
90
|
+
* functions because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109985
|
91
|
+
*/
|
92
|
+
|
93
|
+
#if defined(BOOST_GCC)||defined(BOOST_CLANG)
|
94
|
+
#define BOOST_UNORDERED_PREFETCH(p) __builtin_prefetch((const char*)(p))
|
95
|
+
#elif defined(BOOST_UNORDERED_SSE2)
|
96
|
+
#define BOOST_UNORDERED_PREFETCH(p) _mm_prefetch((const char*)(p),_MM_HINT_T0)
|
97
|
+
#else
|
98
|
+
#define BOOST_UNORDERED_PREFETCH(p) ((void)0)
|
99
|
+
#endif
|
100
|
+
|
101
|
+
/* We have experimentally confirmed that ARM architectures get a higher
|
102
|
+
* speedup when around the first half of the element slots in a group are
|
103
|
+
* prefetched, whereas for Intel just the first cache line is best.
|
104
|
+
* Please report back if you find better tunings for some particular
|
105
|
+
* architectures.
|
106
|
+
*/
|
107
|
+
|
108
|
+
#if BOOST_ARCH_ARM
|
109
|
+
/* Cache line size can't be known at compile time, so we settle on
|
110
|
+
* the very frequent value of 64B.
|
111
|
+
*/
|
112
|
+
|
113
|
+
#define BOOST_UNORDERED_PREFETCH_ELEMENTS(p,N) \
|
114
|
+
do{ \
|
115
|
+
auto BOOST_UNORDERED_P=(p); \
|
116
|
+
constexpr int cache_line=64; \
|
117
|
+
const char *p0=reinterpret_cast<const char*>(BOOST_UNORDERED_P), \
|
118
|
+
*p1=p0+sizeof(*BOOST_UNORDERED_P)*(N)/2; \
|
119
|
+
for(;p0<p1;p0+=cache_line)BOOST_UNORDERED_PREFETCH(p0); \
|
120
|
+
}while(0)
|
121
|
+
#else
|
122
|
+
#define BOOST_UNORDERED_PREFETCH_ELEMENTS(p,N) BOOST_UNORDERED_PREFETCH(p)
|
123
|
+
#endif
|
124
|
+
|
125
|
+
#ifdef __has_feature
|
126
|
+
#define BOOST_UNORDERED_HAS_FEATURE(x) __has_feature(x)
|
127
|
+
#else
|
128
|
+
#define BOOST_UNORDERED_HAS_FEATURE(x) 0
|
129
|
+
#endif
|
130
|
+
|
131
|
+
#if BOOST_UNORDERED_HAS_FEATURE(thread_sanitizer)|| \
|
132
|
+
defined(__SANITIZE_THREAD__)
|
133
|
+
#define BOOST_UNORDERED_THREAD_SANITIZER
|
134
|
+
#endif
|
135
|
+
|
136
|
+
#define BOOST_UNORDERED_STATIC_ASSERT_HASH_PRED(Hash, Pred) \
|
137
|
+
static_assert(boost::is_nothrow_swappable<Hash>::value, \
|
138
|
+
"Template parameter Hash is required to be nothrow Swappable."); \
|
139
|
+
static_assert(boost::is_nothrow_swappable<Pred>::value, \
|
140
|
+
"Template parameter Pred is required to be nothrow Swappable");
|
141
|
+
|
70
142
|
namespace boost{
|
71
143
|
namespace unordered{
|
72
144
|
namespace detail{
|
73
145
|
namespace foa{
|
74
146
|
|
75
|
-
static
|
147
|
+
static constexpr std::size_t default_bucket_count=0;
|
76
148
|
|
77
|
-
/* foa::
|
78
|
-
*
|
149
|
+
/* foa::table_core is the common base of foa::table and foa::concurrent_table,
|
150
|
+
* which in their turn serve as the foundational core of
|
151
|
+
* boost::unordered_(flat|node)_(map|set) and boost::concurrent_flat_map,
|
152
|
+
* respectively. Its main internal design aspects are:
|
79
153
|
*
|
80
154
|
* - Element slots are logically split into groups of size N=15. The number
|
81
155
|
* of groups is always a power of two, so the number of allocated slots
|
@@ -128,23 +202,32 @@ static const std::size_t default_bucket_count = 0;
|
|
128
202
|
* "logical" 128-bit word, and so forth. With this layout, match can be
|
129
203
|
* implemented with 4 ANDs, 3 shifts, 2 XORs, 1 OR and 1 NOT.
|
130
204
|
*
|
131
|
-
*
|
132
|
-
*
|
133
|
-
*
|
205
|
+
* IntegralWrapper<Integral> is used to implement group15's underlying
|
206
|
+
* metadata: it behaves as a plain integral for foa::table or introduces
|
207
|
+
* atomic ops for foa::concurrent_table. If IntegralWrapper<...> is trivially
|
208
|
+
* constructible, so is group15, in which case it can be initialized via memset
|
209
|
+
* etc. Where needed, group15::initialize resets the metadata to the all
|
210
|
+
* zeros (default state).
|
134
211
|
*/
|
135
212
|
|
136
213
|
#if defined(BOOST_UNORDERED_SSE2)
|
137
214
|
|
215
|
+
template<template<typename> class IntegralWrapper>
|
138
216
|
struct group15
|
139
217
|
{
|
140
|
-
static constexpr
|
218
|
+
static constexpr std::size_t N=15;
|
219
|
+
static constexpr bool regular_layout=true;
|
141
220
|
|
142
221
|
struct dummy_group_type
|
143
222
|
{
|
144
223
|
alignas(16) unsigned char storage[N+1]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0};
|
145
224
|
};
|
146
225
|
|
147
|
-
inline void initialize()
|
226
|
+
inline void initialize()
|
227
|
+
{
|
228
|
+
_mm_store_si128(
|
229
|
+
reinterpret_cast<__m128i*>(m),_mm_setzero_si128());
|
230
|
+
}
|
148
231
|
|
149
232
|
inline void set(std::size_t pos,std::size_t hash)
|
150
233
|
{
|
@@ -163,6 +246,11 @@ struct group15
|
|
163
246
|
return at(pos)==sentinel_;
|
164
247
|
}
|
165
248
|
|
249
|
+
static inline bool is_sentinel(unsigned char* pc)noexcept
|
250
|
+
{
|
251
|
+
return *pc==sentinel_;
|
252
|
+
}
|
253
|
+
|
166
254
|
inline void reset(std::size_t pos)
|
167
255
|
{
|
168
256
|
BOOST_ASSERT(pos<N);
|
@@ -171,13 +259,13 @@ struct group15
|
|
171
259
|
|
172
260
|
static inline void reset(unsigned char* pc)
|
173
261
|
{
|
174
|
-
*pc=available_;
|
262
|
+
*reinterpret_cast<slot_type*>(pc)=available_;
|
175
263
|
}
|
176
264
|
|
177
265
|
inline int match(std::size_t hash)const
|
178
266
|
{
|
179
267
|
return _mm_movemask_epi8(
|
180
|
-
_mm_cmpeq_epi8(
|
268
|
+
_mm_cmpeq_epi8(load_metadata(),_mm_set1_epi32(match_word(hash))))&0x7FFF;
|
181
269
|
}
|
182
270
|
|
183
271
|
inline bool is_not_overflowed(std::size_t hash)const
|
@@ -189,11 +277,7 @@ struct group15
|
|
189
277
|
|
190
278
|
inline void mark_overflow(std::size_t hash)
|
191
279
|
{
|
192
|
-
#if BOOST_WORKAROUND(BOOST_GCC, >= 50000 && BOOST_GCC < 60000)
|
193
|
-
overflow() = static_cast<unsigned char>( overflow() | static_cast<unsigned char>(1<<(hash%8)) );
|
194
|
-
#else
|
195
280
|
overflow()|=static_cast<unsigned char>(1<<(hash%8));
|
196
|
-
#endif
|
197
281
|
}
|
198
282
|
|
199
283
|
static inline bool maybe_caused_overflow(unsigned char* pc)
|
@@ -201,28 +285,54 @@ struct group15
|
|
201
285
|
std::size_t pos=reinterpret_cast<uintptr_t>(pc)%sizeof(group15);
|
202
286
|
group15 *pg=reinterpret_cast<group15*>(pc-pos);
|
203
287
|
return !pg->is_not_overflowed(*pc);
|
204
|
-
}
|
288
|
+
}
|
205
289
|
|
206
290
|
inline int match_available()const
|
207
291
|
{
|
208
292
|
return _mm_movemask_epi8(
|
209
|
-
_mm_cmpeq_epi8(
|
293
|
+
_mm_cmpeq_epi8(load_metadata(),_mm_setzero_si128()))&0x7FFF;
|
210
294
|
}
|
211
295
|
|
212
|
-
inline
|
296
|
+
inline bool is_occupied(std::size_t pos)const
|
213
297
|
{
|
214
|
-
|
298
|
+
BOOST_ASSERT(pos<N);
|
299
|
+
return at(pos)!=available_;
|
215
300
|
}
|
216
301
|
|
217
|
-
inline
|
302
|
+
static inline bool is_occupied(unsigned char* pc)noexcept
|
303
|
+
{
|
304
|
+
return *reinterpret_cast<slot_type*>(pc)!=available_;
|
305
|
+
}
|
306
|
+
|
307
|
+
inline int match_occupied()const
|
218
308
|
{
|
219
|
-
return
|
309
|
+
return (~match_available())&0x7FFF;
|
220
310
|
}
|
221
311
|
|
222
312
|
private:
|
313
|
+
using slot_type=IntegralWrapper<unsigned char>;
|
314
|
+
BOOST_STATIC_ASSERT(sizeof(slot_type)==1);
|
315
|
+
|
223
316
|
static constexpr unsigned char available_=0,
|
224
317
|
sentinel_=1;
|
225
318
|
|
319
|
+
inline __m128i load_metadata()const
|
320
|
+
{
|
321
|
+
#if defined(BOOST_UNORDERED_THREAD_SANITIZER)
|
322
|
+
/* ThreadSanitizer complains on 1-byte atomic writes combined with
|
323
|
+
* 16-byte atomic reads.
|
324
|
+
*/
|
325
|
+
|
326
|
+
return _mm_set_epi8(
|
327
|
+
(char)m[15],(char)m[14],(char)m[13],(char)m[12],
|
328
|
+
(char)m[11],(char)m[10],(char)m[ 9],(char)m[ 8],
|
329
|
+
(char)m[ 7],(char)m[ 6],(char)m[ 5],(char)m[ 4],
|
330
|
+
(char)m[ 3],(char)m[ 2],(char)m[ 1],(char)m[ 0]);
|
331
|
+
#else
|
332
|
+
return _mm_load_si128(reinterpret_cast<const __m128i*>(m));
|
333
|
+
#endif
|
334
|
+
}
|
335
|
+
|
226
336
|
inline static int match_word(std::size_t hash)
|
227
337
|
{
|
228
338
|
static constexpr boost::uint32_t word[]=
|
@@ -261,57 +371,54 @@ private:
|
|
261
371
|
0xF8F8F8F8u,0xF9F9F9F9u,0xFAFAFAFAu,0xFBFBFBFBu,0xFCFCFCFCu,0xFDFDFDFDu,0xFEFEFEFEu,0xFFFFFFFFu,
|
262
372
|
};
|
263
373
|
|
264
|
-
|
265
|
-
return (int)word[hash&0xffu];
|
266
|
-
#else
|
267
|
-
return (int)word[(unsigned char)hash];
|
268
|
-
#endif
|
374
|
+
return (int)word[narrow_cast<unsigned char>(hash)];
|
269
375
|
}
|
270
376
|
|
271
377
|
inline static unsigned char reduced_hash(std::size_t hash)
|
272
378
|
{
|
273
|
-
|
274
|
-
return match_word(hash)&0xffu;
|
275
|
-
#else
|
276
|
-
return (unsigned char)match_word(hash);
|
277
|
-
#endif
|
379
|
+
return narrow_cast<unsigned char>(match_word(hash));
|
278
380
|
}
|
279
381
|
|
280
|
-
inline
|
382
|
+
inline slot_type& at(std::size_t pos)
|
281
383
|
{
|
282
|
-
return
|
384
|
+
return m[pos];
|
283
385
|
}
|
284
386
|
|
285
|
-
inline
|
387
|
+
inline const slot_type& at(std::size_t pos)const
|
286
388
|
{
|
287
|
-
return
|
389
|
+
return m[pos];
|
288
390
|
}
|
289
391
|
|
290
|
-
inline
|
392
|
+
inline slot_type& overflow()
|
291
393
|
{
|
292
394
|
return at(N);
|
293
395
|
}
|
294
396
|
|
295
|
-
inline
|
397
|
+
inline const slot_type& overflow()const
|
296
398
|
{
|
297
399
|
return at(N);
|
298
400
|
}
|
299
401
|
|
300
|
-
alignas(16)
|
402
|
+
alignas(16) slot_type m[16];
|
301
403
|
};
|
302
404
|
|
303
405
|
#elif defined(BOOST_UNORDERED_LITTLE_ENDIAN_NEON)
|
304
406
|
|
407
|
+
template<template<typename> class IntegralWrapper>
|
305
408
|
struct group15
|
306
409
|
{
|
307
|
-
static constexpr
|
410
|
+
static constexpr std::size_t N=15;
|
411
|
+
static constexpr bool regular_layout=true;
|
308
412
|
|
309
413
|
struct dummy_group_type
|
310
414
|
{
|
311
415
|
alignas(16) unsigned char storage[N+1]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0};
|
312
416
|
};
|
313
417
|
|
314
|
-
inline void initialize()
|
418
|
+
inline void initialize()
|
419
|
+
{
|
420
|
+
vst1q_u8(reinterpret_cast<uint8_t*>(m),vdupq_n_u8(0));
|
421
|
+
}
|
315
422
|
|
316
423
|
inline void set(std::size_t pos,std::size_t hash)
|
317
424
|
{
|
@@ -330,6 +437,11 @@ struct group15
|
|
330
437
|
return pos==N-1&&at(N-1)==sentinel_;
|
331
438
|
}
|
332
439
|
|
440
|
+
static inline bool is_sentinel(unsigned char* pc)noexcept
|
441
|
+
{
|
442
|
+
return *reinterpret_cast<slot_type*>(pc)==sentinel_;
|
443
|
+
}
|
444
|
+
|
333
445
|
inline void reset(std::size_t pos)
|
334
446
|
{
|
335
447
|
BOOST_ASSERT(pos<N);
|
@@ -338,13 +450,13 @@ struct group15
|
|
338
450
|
|
339
451
|
static inline void reset(unsigned char* pc)
|
340
452
|
{
|
341
|
-
*pc=available_;
|
453
|
+
*reinterpret_cast<slot_type*>(pc)=available_;
|
342
454
|
}
|
343
455
|
|
344
456
|
inline int match(std::size_t hash)const
|
345
457
|
{
|
346
|
-
return simde_mm_movemask_epi8(
|
347
|
-
|
458
|
+
return simde_mm_movemask_epi8(vceqq_u8(
|
459
|
+
load_metadata(),vdupq_n_u8(reduced_hash(hash))))&0x7FFF;
|
348
460
|
}
|
349
461
|
|
350
462
|
inline bool is_not_overflowed(std::size_t hash)const
|
@@ -368,24 +480,50 @@ struct group15
|
|
368
480
|
|
369
481
|
inline int match_available()const
|
370
482
|
{
|
371
|
-
return simde_mm_movemask_epi8(
|
483
|
+
return simde_mm_movemask_epi8(vceqq_u8(
|
484
|
+
load_metadata(),vdupq_n_u8(0)))&0x7FFF;
|
372
485
|
}
|
373
486
|
|
374
|
-
inline
|
487
|
+
inline bool is_occupied(std::size_t pos)const
|
488
|
+
{
|
489
|
+
BOOST_ASSERT(pos<N);
|
490
|
+
return at(pos)!=available_;
|
491
|
+
}
|
492
|
+
|
493
|
+
static inline bool is_occupied(unsigned char* pc)noexcept
|
375
494
|
{
|
376
|
-
return
|
377
|
-
vcgtq_u8(vreinterpretq_u8_s8(m),vdupq_n_u8(0)))&0x7FFF;
|
495
|
+
return *reinterpret_cast<slot_type*>(pc)!=available_;
|
378
496
|
}
|
379
497
|
|
380
|
-
inline int
|
498
|
+
inline int match_occupied()const
|
381
499
|
{
|
382
|
-
return
|
500
|
+
return simde_mm_movemask_epi8(vcgtq_u8(
|
501
|
+
load_metadata(),vdupq_n_u8(0)))&0x7FFF;
|
383
502
|
}
|
384
503
|
|
385
504
|
private:
|
505
|
+
using slot_type=IntegralWrapper<unsigned char>;
|
506
|
+
BOOST_STATIC_ASSERT(sizeof(slot_type)==1);
|
507
|
+
|
386
508
|
static constexpr unsigned char available_=0,
|
387
509
|
sentinel_=1;
|
388
510
|
|
511
|
+
inline uint8x16_t load_metadata()const
|
512
|
+
{
|
513
|
+
#if defined(BOOST_UNORDERED_THREAD_SANITIZER)
|
514
|
+
/* ThreadSanitizer complains on 1-byte atomic writes combined with
|
515
|
+
* 16-byte atomic reads.
|
516
|
+
*/
|
517
|
+
|
518
|
+
alignas(16) uint8_t data[16]={
|
519
|
+
m[ 0],m[ 1],m[ 2],m[ 3],m[ 4],m[ 5],m[ 6],m[ 7],
|
520
|
+
m[ 8],m[ 9],m[10],m[11],m[12],m[13],m[14],m[15]};
|
521
|
+
return vld1q_u8(data);
|
522
|
+
#else
|
523
|
+
return vld1q_u8(reinterpret_cast<const uint8_t*>(m));
|
524
|
+
#endif
|
525
|
+
}
|
526
|
+
|
389
527
|
inline static unsigned char reduced_hash(std::size_t hash)
|
390
528
|
{
|
391
529
|
static constexpr unsigned char table[]={
|
@@ -435,34 +573,36 @@ private:
|
|
435
573
|
#endif
|
436
574
|
}
|
437
575
|
|
438
|
-
inline
|
576
|
+
inline slot_type& at(std::size_t pos)
|
439
577
|
{
|
440
|
-
return
|
578
|
+
return m[pos];
|
441
579
|
}
|
442
580
|
|
443
|
-
inline
|
581
|
+
inline const slot_type& at(std::size_t pos)const
|
444
582
|
{
|
445
|
-
return
|
583
|
+
return m[pos];
|
446
584
|
}
|
447
585
|
|
448
|
-
inline
|
586
|
+
inline slot_type& overflow()
|
449
587
|
{
|
450
588
|
return at(N);
|
451
589
|
}
|
452
590
|
|
453
|
-
inline
|
591
|
+
inline const slot_type& overflow()const
|
454
592
|
{
|
455
593
|
return at(N);
|
456
594
|
}
|
457
595
|
|
458
|
-
alignas(16)
|
596
|
+
alignas(16) slot_type m[16];
|
459
597
|
};
|
460
598
|
|
461
599
|
#else /* non-SIMD */
|
462
600
|
|
601
|
+
template<template<typename> class IntegralWrapper>
|
463
602
|
struct group15
|
464
603
|
{
|
465
|
-
static constexpr
|
604
|
+
static constexpr std::size_t N=15;
|
605
|
+
static constexpr bool regular_layout=false;
|
466
606
|
|
467
607
|
struct dummy_group_type
|
468
608
|
{
|
@@ -525,11 +665,7 @@ struct group15
|
|
525
665
|
std::size_t pos=reinterpret_cast<uintptr_t>(pc)%sizeof(group15);
|
526
666
|
group15 *pg=reinterpret_cast<group15*>(pc-pos);
|
527
667
|
boost::uint64_t x=((pg->m[0])>>pos)&0x000100010001ull;
|
528
|
-
|
529
|
-
boost::uint32_t y=(x|(x>>15)|(x>>30))&0xffffffffu;
|
530
|
-
#else
|
531
|
-
boost::uint32_t y=static_cast<boost::uint32_t>(x|(x>>15)|(x>>30));
|
532
|
-
#endif
|
668
|
+
boost::uint32_t y=narrow_cast<boost::uint32_t>(x|(x>>15)|(x>>30));
|
533
669
|
return !pg->is_not_overflowed(y);
|
534
670
|
};
|
535
671
|
|
@@ -541,24 +677,25 @@ struct group15
|
|
541
677
|
return y&0x7FFF;
|
542
678
|
}
|
543
679
|
|
544
|
-
inline
|
680
|
+
inline bool is_occupied(std::size_t pos)const
|
545
681
|
{
|
682
|
+
BOOST_ASSERT(pos<N);
|
546
683
|
boost::uint64_t x=m[0]|m[1];
|
547
|
-
|
548
|
-
boost::uint32_t y=(x|(x>>32))&0xffffffffu;
|
549
|
-
#else
|
550
|
-
boost::uint32_t y=static_cast<boost::uint32_t>(x|(x>>32));
|
551
|
-
#endif
|
552
|
-
y|=y>>16;
|
553
|
-
return y&0x7FFF;
|
684
|
+
return (x&(0x0001000100010001ull<<pos))!=0;
|
554
685
|
}
|
555
686
|
|
556
|
-
inline int
|
687
|
+
inline int match_occupied()const
|
557
688
|
{
|
558
|
-
|
689
|
+
boost::uint64_t x=m[0]|m[1];
|
690
|
+
boost::uint32_t y=narrow_cast<boost::uint32_t>(x|(x>>32));
|
691
|
+
y|=y>>16;
|
692
|
+
return y&0x7FFF;
|
559
693
|
}
|
560
694
|
|
561
695
|
private:
|
696
|
+
using word_type=IntegralWrapper<uint64_t>;
|
697
|
+
BOOST_STATIC_ASSERT(sizeof(word_type)==8);
|
698
|
+
|
562
699
|
static constexpr unsigned char available_=0,
|
563
700
|
sentinel_=1;
|
564
701
|
|
@@ -583,11 +720,7 @@ private:
|
|
583
720
|
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
|
584
721
|
};
|
585
722
|
|
586
|
-
|
587
|
-
return table[hash&0xffu];
|
588
|
-
#else
|
589
|
-
return table[(unsigned char)hash];
|
590
|
-
#endif
|
723
|
+
return table[narrow_cast<unsigned char>(hash)];
|
591
724
|
}
|
592
725
|
|
593
726
|
inline void set_impl(std::size_t pos,std::size_t n)
|
@@ -597,7 +730,7 @@ private:
|
|
597
730
|
set_impl(m[1],pos,n>>4);
|
598
731
|
}
|
599
732
|
|
600
|
-
static inline void set_impl(
|
733
|
+
static inline void set_impl(word_type& x,std::size_t pos,std::size_t n)
|
601
734
|
{
|
602
735
|
static constexpr boost::uint64_t mask[]=
|
603
736
|
{
|
@@ -643,14 +776,14 @@ private:
|
|
643
776
|
return y&0x7FFF;
|
644
777
|
}
|
645
778
|
|
646
|
-
alignas(16)
|
779
|
+
alignas(16) word_type m[2];
|
647
780
|
};
|
648
781
|
|
649
782
|
#endif
|
650
783
|
|
651
|
-
/* foa::
|
652
|
-
* array (and, by implication, the element array) and to do the
|
653
|
-
* mapping.
|
784
|
+
/* foa::table_core uses a size policy to obtain the permissible sizes of the
|
785
|
+
* group array (and, by implication, the element array) and to do the
|
786
|
+
* hash->group mapping.
|
654
787
|
*
|
655
788
|
* - size_index(n) returns an unspecified "index" number used in other policy
|
656
789
|
* operations.
|
@@ -736,10 +869,12 @@ private:
|
|
736
869
|
std::size_t pos,step=0;
|
737
870
|
};
|
738
871
|
|
739
|
-
/* Mixing policies: no_mix is the identity function and
|
740
|
-
*
|
741
|
-
*
|
742
|
-
*
|
872
|
+
/* Mixing policies: no_mix is the identity function, and mulx_mix
|
873
|
+
* uses the mulx function from <boost/unordered/detail/mulx.hpp>.
|
874
|
+
*
|
875
|
+
* foa::table_core mixes hash results with mulx_mix unless the hash is marked
|
876
|
+
* as avalanching, i.e. of good quality
|
877
|
+
* (see <boost/unordered/hash_traits.hpp>).
|
743
878
|
*/
|
744
879
|
|
745
880
|
struct no_mix
|
@@ -751,12 +886,12 @@ struct no_mix
|
|
751
886
|
}
|
752
887
|
};
|
753
888
|
|
754
|
-
struct
|
889
|
+
struct mulx_mix
|
755
890
|
{
|
756
891
|
template<typename Hash,typename T>
|
757
892
|
static inline std::size_t mix(const Hash& h,const T& x)
|
758
893
|
{
|
759
|
-
return
|
894
|
+
return mulx(h(x));
|
760
895
|
}
|
761
896
|
};
|
762
897
|
|
@@ -776,112 +911,6 @@ inline unsigned int unchecked_countr_zero(int x)
|
|
776
911
|
#endif
|
777
912
|
}
|
778
913
|
|
779
|
-
template<typename,typename,typename,typename>
|
780
|
-
class table;
|
781
|
-
|
782
|
-
/* table_iterator keeps two pointers:
|
783
|
-
*
|
784
|
-
* - A pointer p to the element slot.
|
785
|
-
* - A pointer pc to the n-th byte of the associated group metadata, where n
|
786
|
-
* is the position of the element in the group.
|
787
|
-
*
|
788
|
-
* A simpler solution would have been to keep a pointer p to the element, a
|
789
|
-
* pointer pg to the group, and the position n, but that would increase
|
790
|
-
* sizeof(table_iterator) by 4/8 bytes. In order to make this compact
|
791
|
-
* representation feasible, it is required that group objects are aligned
|
792
|
-
* to their size, so that we can recover pg and n as
|
793
|
-
*
|
794
|
-
* - n = pc%sizeof(group)
|
795
|
-
* - pg = pc-n
|
796
|
-
*
|
797
|
-
* (for explanatory purposes pg and pc are treated above as if they were memory
|
798
|
-
* addresses rather than pointers).The main drawback of this two-pointer
|
799
|
-
* representation is that iterator increment is relatively slow.
|
800
|
-
*
|
801
|
-
* p = nullptr is conventionally used to mark end() iterators.
|
802
|
-
*/
|
803
|
-
|
804
|
-
/* internal conversion from const_iterator to iterator */
|
805
|
-
class const_iterator_cast_tag {};
|
806
|
-
|
807
|
-
template<typename Value,typename Group,bool Const>
|
808
|
-
class table_iterator
|
809
|
-
{
|
810
|
-
public:
|
811
|
-
using difference_type=std::ptrdiff_t;
|
812
|
-
using value_type=Value;
|
813
|
-
using pointer=
|
814
|
-
typename std::conditional<Const,value_type const*,value_type*>::type;
|
815
|
-
using reference=
|
816
|
-
typename std::conditional<Const,value_type const&,value_type&>::type;
|
817
|
-
using iterator_category=std::forward_iterator_tag;
|
818
|
-
using element_type=
|
819
|
-
typename std::conditional<Const,value_type const,value_type>::type;
|
820
|
-
|
821
|
-
table_iterator()=default;
|
822
|
-
template<bool Const2,typename std::enable_if<!Const2>::type* =nullptr>
|
823
|
-
table_iterator(const table_iterator<Value,Group,Const2>& x):
|
824
|
-
pc{x.pc},p{x.p}{}
|
825
|
-
table_iterator(
|
826
|
-
const_iterator_cast_tag, const table_iterator<Value,Group,true>& x):
|
827
|
-
pc{x.pc},p{x.p}{}
|
828
|
-
|
829
|
-
inline reference operator*()const noexcept{return *p;}
|
830
|
-
inline pointer operator->()const noexcept{return p;}
|
831
|
-
inline table_iterator& operator++()noexcept{increment();return *this;}
|
832
|
-
inline table_iterator operator++(int)noexcept
|
833
|
-
{auto x=*this;increment();return x;}
|
834
|
-
friend inline bool operator==(
|
835
|
-
const table_iterator& x,const table_iterator& y)
|
836
|
-
{return x.p==y.p;}
|
837
|
-
friend inline bool operator!=(
|
838
|
-
const table_iterator& x,const table_iterator& y)
|
839
|
-
{return !(x==y);}
|
840
|
-
|
841
|
-
private:
|
842
|
-
template<typename,typename,bool> friend class table_iterator;
|
843
|
-
template<typename,typename,typename,typename> friend class table;
|
844
|
-
|
845
|
-
table_iterator(Group* pg,std::size_t n,const Value* p_):
|
846
|
-
pc{reinterpret_cast<unsigned char*>(const_cast<Group*>(pg))+n},
|
847
|
-
p{const_cast<Value*>(p_)}
|
848
|
-
{}
|
849
|
-
|
850
|
-
inline std::size_t rebase() noexcept
|
851
|
-
{
|
852
|
-
std::size_t off=reinterpret_cast<uintptr_t>(pc)%sizeof(Group);
|
853
|
-
pc-=off;
|
854
|
-
return off;
|
855
|
-
}
|
856
|
-
|
857
|
-
inline void increment()noexcept
|
858
|
-
{
|
859
|
-
std::size_t n0=rebase();
|
860
|
-
|
861
|
-
int mask=(reinterpret_cast<Group*>(pc)->match_occupied()>>(n0+1))<<(n0+1);
|
862
|
-
if(!mask){
|
863
|
-
do{
|
864
|
-
pc+=sizeof(Group);
|
865
|
-
p+=Group::N;
|
866
|
-
}
|
867
|
-
while((mask=reinterpret_cast<Group*>(pc)->match_occupied())==0);
|
868
|
-
}
|
869
|
-
|
870
|
-
auto n=unchecked_countr_zero(mask);
|
871
|
-
if(BOOST_UNLIKELY(reinterpret_cast<Group*>(pc)->is_sentinel(n))){
|
872
|
-
p=nullptr;
|
873
|
-
}
|
874
|
-
else{
|
875
|
-
pc+=n;
|
876
|
-
p-=n0;
|
877
|
-
p+=n;
|
878
|
-
}
|
879
|
-
}
|
880
|
-
|
881
|
-
unsigned char *pc=nullptr;
|
882
|
-
Value *p=nullptr;
|
883
|
-
};
|
884
|
-
|
885
914
|
/* table_arrays controls allocation, initialization and deallocation of
|
886
915
|
* paired arrays of groups and element slots. Only one chunk of memory is
|
887
916
|
* allocated to place both arrays: this is not done for efficiency reasons,
|
@@ -917,10 +946,15 @@ struct table_arrays
|
|
917
946
|
static constexpr auto N=group_type::N;
|
918
947
|
using size_policy=SizePolicy;
|
919
948
|
|
949
|
+
table_arrays(std::size_t gsi,std::size_t gsm,group_type *pg,value_type *pe):
|
950
|
+
groups_size_index{gsi},groups_size_mask{gsm},groups{pg},elements{pe}{}
|
951
|
+
|
920
952
|
template<typename Allocator>
|
921
953
|
static table_arrays new_(Allocator& al,std::size_t n)
|
922
954
|
{
|
923
|
-
using
|
955
|
+
using storage_allocator=
|
956
|
+
typename boost::allocator_rebind<Allocator, Value>::type;
|
957
|
+
using storage_traits=boost::allocator_traits<storage_allocator>;
|
924
958
|
|
925
959
|
auto groups_size_index=size_index_for<group_type,size_policy>(n);
|
926
960
|
auto groups_size=size_policy::size(groups_size_index);
|
@@ -930,8 +964,9 @@ struct table_arrays
|
|
930
964
|
arrays.groups=dummy_groups<group_type,size_policy::min_size()>();
|
931
965
|
}
|
932
966
|
else{
|
933
|
-
|
934
|
-
|
967
|
+
auto sal=storage_allocator(al);
|
968
|
+
arrays.elements=boost::to_address(
|
969
|
+
storage_traits::allocate(sal,buffer_size(groups_size)));
|
935
970
|
|
936
971
|
/* Align arrays.groups to sizeof(group_type). table_iterator critically
|
937
972
|
* depends on such alignment for its increment operation.
|
@@ -942,11 +977,17 @@ struct table_arrays
|
|
942
977
|
reinterpret_cast<uintptr_t>(p))%sizeof(group_type);
|
943
978
|
arrays.groups=reinterpret_cast<group_type*>(p);
|
944
979
|
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
980
|
+
initialize_groups(
|
981
|
+
arrays.groups,groups_size,
|
982
|
+
std::integral_constant<
|
983
|
+
bool,
|
984
|
+
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION,<50000)
|
985
|
+
/* std::is_trivially_constructible not provided */
|
986
|
+
boost::has_trivial_constructor<group_type>::value
|
987
|
+
#else
|
988
|
+
std::is_trivially_constructible<group_type>::value
|
989
|
+
#endif
|
990
|
+
>{});
|
950
991
|
arrays.groups[groups_size-1].set_sentinel();
|
951
992
|
}
|
952
993
|
return arrays;
|
@@ -955,13 +996,15 @@ struct table_arrays
|
|
955
996
|
template<typename Allocator>
|
956
997
|
static void delete_(Allocator& al,table_arrays& arrays)noexcept
|
957
998
|
{
|
958
|
-
using
|
959
|
-
using
|
999
|
+
using storage_alloc=typename boost::allocator_rebind<Allocator,Value>::type;
|
1000
|
+
using storage_traits=boost::allocator_traits<storage_alloc>;
|
1001
|
+
using pointer=typename storage_traits::pointer;
|
960
1002
|
using pointer_traits=boost::pointer_traits<pointer>;
|
961
1003
|
|
1004
|
+
auto sal=storage_alloc(al);
|
962
1005
|
if(arrays.elements){
|
963
|
-
|
964
|
-
|
1006
|
+
storage_traits::deallocate(
|
1007
|
+
sal,pointer_traits::pointer_to(*arrays.elements),
|
965
1008
|
buffer_size(arrays.groups_size_mask+1));
|
966
1009
|
}
|
967
1010
|
}
|
@@ -980,6 +1023,25 @@ struct table_arrays
|
|
980
1023
|
return (buffer_bytes+sizeof(value_type)-1)/sizeof(value_type);
|
981
1024
|
}
|
982
1025
|
|
1026
|
+
static void initialize_groups(
|
1027
|
+
group_type* groups_,std::size_t size,std::true_type /* memset */)
|
1028
|
+
{
|
1029
|
+
/* memset faster/not slower than manual, assumes all zeros is group_type's
|
1030
|
+
* default layout.
|
1031
|
+
* reinterpret_cast: GCC may complain about group_type not being trivially
|
1032
|
+
* copy-assignable when we're relying on trivial copy constructibility.
|
1033
|
+
*/
|
1034
|
+
|
1035
|
+
std::memset(
|
1036
|
+
reinterpret_cast<unsigned char*>(groups_),0,sizeof(group_type)*size);
|
1037
|
+
}
|
1038
|
+
|
1039
|
+
static void initialize_groups(
|
1040
|
+
group_type* groups_,std::size_t size,std::false_type /* manual */)
|
1041
|
+
{
|
1042
|
+
while(size--!=0)::new (groups_++) group_type();
|
1043
|
+
}
|
1044
|
+
|
983
1045
|
std::size_t groups_size_index;
|
984
1046
|
std::size_t groups_size_mask;
|
985
1047
|
group_type *groups;
|
@@ -1012,130 +1074,195 @@ void swap_if(T& x,T& y){using std::swap; swap(x,y);}
|
|
1012
1074
|
template<bool B,typename T,typename std::enable_if<!B>::type* =nullptr>
|
1013
1075
|
void swap_if(T&,T&){}
|
1014
1076
|
|
1015
|
-
|
1016
|
-
{
|
1017
|
-
(void) p;
|
1018
|
-
#if defined(BOOST_GCC)||defined(BOOST_CLANG)
|
1019
|
-
__builtin_prefetch((const char*)p);
|
1020
|
-
#elif defined(BOOST_UNORDERED_SSE2)
|
1021
|
-
_mm_prefetch((const char*)p,_MM_HINT_T0);
|
1022
|
-
#endif
|
1023
|
-
}
|
1077
|
+
template<typename Allocator>
|
1078
|
+
struct is_std_allocator:std::false_type{};
|
1024
1079
|
|
1025
|
-
|
1026
|
-
|
1027
|
-
*
|
1028
|
-
* struct foo{};
|
1029
|
-
* template<typename Base>
|
1030
|
-
* struct derived:Base
|
1031
|
-
* {
|
1032
|
-
* void f(){int foo;}
|
1033
|
-
* };
|
1034
|
-
*
|
1035
|
-
* derived<foo>x;
|
1036
|
-
* x.f(); // declaration of "foo" in derived::f shadows base type "foo"
|
1037
|
-
*
|
1038
|
-
* This makes shadowing warnings unavoidable in general when a class template
|
1039
|
-
* derives from user-provided classes, as is the case with table and
|
1040
|
-
* empty_value's below.
|
1041
|
-
*/
|
1080
|
+
template<typename T>
|
1081
|
+
struct is_std_allocator<std::allocator<T>>:std::true_type{};
|
1042
1082
|
|
1043
|
-
|
1044
|
-
#
|
1083
|
+
/* std::allocator::construct marked as deprecated */
|
1084
|
+
#if defined(_LIBCPP_SUPPRESS_DEPRECATED_PUSH)
|
1085
|
+
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
1086
|
+
#elif defined(_STL_DISABLE_DEPRECATED_WARNING)
|
1087
|
+
_STL_DISABLE_DEPRECATED_WARNING
|
1088
|
+
#elif defined(_MSC_VER)
|
1089
|
+
#pragma warning(push)
|
1090
|
+
#pragma warning(disable:4996)
|
1045
1091
|
#endif
|
1046
1092
|
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1093
|
+
template<typename Allocator,typename Ptr,typename... Args>
|
1094
|
+
struct alloc_has_construct
|
1095
|
+
{
|
1096
|
+
private:
|
1097
|
+
template<typename Allocator2>
|
1098
|
+
static decltype(
|
1099
|
+
std::declval<Allocator2&>().construct(
|
1100
|
+
std::declval<Ptr>(),std::declval<Args&&>()...),
|
1101
|
+
std::true_type{}
|
1102
|
+
) check(int);
|
1103
|
+
|
1104
|
+
template<typename> static std::false_type check(...);
|
1105
|
+
|
1106
|
+
public:
|
1107
|
+
static constexpr bool value=decltype(check<Allocator>(0))::value;
|
1108
|
+
};
|
1109
|
+
|
1110
|
+
#if defined(_LIBCPP_SUPPRESS_DEPRECATED_POP)
|
1111
|
+
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
1112
|
+
#elif defined(_STL_RESTORE_DEPRECATED_WARNING)
|
1113
|
+
_STL_RESTORE_DEPRECATED_WARNING
|
1114
|
+
#elif defined(_MSC_VER)
|
1115
|
+
#pragma warning(pop)
|
1050
1116
|
#endif
|
1051
1117
|
|
1052
|
-
|
1053
|
-
|
1054
|
-
*
|
1118
|
+
/* We expose the hard-coded max load factor so that tests can use it without
|
1119
|
+
* needing to pull it from an instantiated class template such as the table
|
1120
|
+
* class.
|
1055
1121
|
*/
|
1056
|
-
|
1057
|
-
#pragma warning(disable:4702)
|
1058
|
-
#endif
|
1122
|
+
static constexpr float mlf=0.875f;
|
1059
1123
|
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
*
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1124
|
+
template<typename Group,typename Element>
|
1125
|
+
struct table_locator
|
1126
|
+
{
|
1127
|
+
table_locator()=default;
|
1128
|
+
table_locator(Group* pg_,unsigned int n_,Element* p_):pg{pg_},n{n_},p{p_}{}
|
1129
|
+
|
1130
|
+
explicit operator bool()const noexcept{return p!=nullptr;}
|
1131
|
+
|
1132
|
+
Group *pg=nullptr;
|
1133
|
+
unsigned int n=0;
|
1134
|
+
Element *p=nullptr;
|
1135
|
+
};
|
1136
|
+
|
1137
|
+
struct try_emplace_args_t{};
|
1138
|
+
|
1139
|
+
template<typename TypePolicy,typename Allocator,typename... Args>
|
1140
|
+
class alloc_cted_insert_type
|
1141
|
+
{
|
1142
|
+
using emplace_type=typename std::conditional<
|
1143
|
+
std::is_constructible<typename TypePolicy::init_type,Args...>::value,
|
1144
|
+
typename TypePolicy::init_type,
|
1145
|
+
typename TypePolicy::value_type
|
1146
|
+
>::type;
|
1147
|
+
|
1148
|
+
using insert_type=typename std::conditional<
|
1149
|
+
std::is_constructible<typename TypePolicy::value_type,emplace_type>::value,
|
1150
|
+
emplace_type,typename TypePolicy::element_type
|
1151
|
+
>::type;
|
1152
|
+
|
1153
|
+
alignas(insert_type) unsigned char storage[sizeof(insert_type)];
|
1154
|
+
Allocator al;
|
1155
|
+
|
1156
|
+
public:
|
1157
|
+
alloc_cted_insert_type(const Allocator& al_,Args&&... args):al{al_}
|
1158
|
+
{
|
1159
|
+
TypePolicy::construct(al,data(),std::forward<Args>(args)...);
|
1160
|
+
}
|
1161
|
+
|
1162
|
+
~alloc_cted_insert_type()
|
1163
|
+
{
|
1164
|
+
TypePolicy::destroy(al,data());
|
1165
|
+
}
|
1166
|
+
|
1167
|
+
insert_type* data(){return reinterpret_cast<insert_type*>(&storage);}
|
1168
|
+
insert_type& value(){return *data();}
|
1169
|
+
};
|
1170
|
+
|
1171
|
+
template<typename TypePolicy,typename Allocator,typename... Args>
|
1172
|
+
alloc_cted_insert_type<TypePolicy,Allocator,Args...>
|
1173
|
+
alloc_make_insert_type(const Allocator& al,Args&&... args)
|
1174
|
+
{
|
1175
|
+
return {al,std::forward<Args>(args)...};
|
1176
|
+
}
|
1177
|
+
|
1178
|
+
/* table_core. The TypePolicy template parameter is used to generate
|
1179
|
+
* instantiations suitable for either maps or sets, and introduces non-standard
|
1180
|
+
* init_type and element_type:
|
1181
|
+
*
|
1076
1182
|
* - TypePolicy::key_type and TypePolicy::value_type have the obvious
|
1077
1183
|
* meaning.
|
1184
|
+
*
|
1078
1185
|
* - TypePolicy::init_type is the type implicitly converted to when
|
1079
1186
|
* writing x.insert({...}). For maps, this is std::pair<Key,T> rather
|
1080
1187
|
* than std::pair<const Key,T> so that, for instance, x.insert({"hello",0})
|
1081
1188
|
* produces a cheaply moveable std::string&& ("hello") rather than
|
1082
1189
|
* a copyable const std::string&&. foa::table::insert is extended to accept
|
1083
1190
|
* both init_type and value_type references.
|
1084
|
-
*
|
1085
|
-
*
|
1086
|
-
*
|
1087
|
-
*
|
1191
|
+
*
|
1192
|
+
* - TypePolicy::construct and TypePolicy::destroy are used for the
|
1193
|
+
* construction and destruction of the internal types: value_type, init_type
|
1194
|
+
* and element_type.
|
1195
|
+
*
|
1196
|
+
* - TypePolicy::move is used to provide move semantics for the internal
|
1197
|
+
* types used by the container during rehashing and emplace. These types
|
1198
|
+
* are init_type, value_type and emplace_type. During insertion, a
|
1199
|
+
* stack-local type will be created based on the constructibility of the
|
1200
|
+
* value_type and the supplied arguments. TypePolicy::move is used here
|
1201
|
+
* for transfer of ownership. Similarly, TypePolicy::move is also used
|
1202
|
+
* during rehashing when elements are moved to the new table.
|
1203
|
+
*
|
1088
1204
|
* - TypePolicy::extract returns a const reference to the key part of
|
1089
|
-
* a value of type value_type, init_type or
|
1205
|
+
* a value of type value_type, init_type, element_type or
|
1090
1206
|
* decltype(TypePolicy::move(...)).
|
1091
|
-
*
|
1092
|
-
*
|
1093
|
-
*
|
1094
|
-
*
|
1095
|
-
*
|
1096
|
-
*
|
1097
|
-
*
|
1207
|
+
*
|
1208
|
+
* - TypePolicy::element_type is the type that table_arrays uses when
|
1209
|
+
* allocating buckets, which allows us to have flat and node container.
|
1210
|
+
* For flat containers, element_type is value_type. For node
|
1211
|
+
* containers, it is a strong typedef to value_type*.
|
1212
|
+
*
|
1213
|
+
* - TypePolicy::value_from returns a mutable reference to value_type from
|
1214
|
+
* a given element_type. This is used when elements of the table themselves
|
1215
|
+
* need to be moved, such as during move construction/assignment when
|
1216
|
+
* allocators are unequal and there is no propagation. For all other cases,
|
1217
|
+
* the element_type itself is moved.
|
1098
1218
|
*/
|
1099
1219
|
|
1100
|
-
|
1101
|
-
|
1220
|
+
#include <boost/unordered/detail/foa/ignore_wshadow.hpp>
|
1221
|
+
|
1222
|
+
#if defined(BOOST_MSVC)
|
1223
|
+
#pragma warning(push)
|
1224
|
+
#pragma warning(disable:4714) /* marked as __forceinline not inlined */
|
1225
|
+
#endif
|
1226
|
+
|
1227
|
+
#if BOOST_WORKAROUND(BOOST_MSVC,<=1900)
|
1228
|
+
/* VS2015 marks as unreachable generic catch clauses around non-throwing
|
1229
|
+
* code.
|
1102
1230
|
*/
|
1103
|
-
|
1231
|
+
#pragma warning(push)
|
1232
|
+
#pragma warning(disable:4702)
|
1233
|
+
#endif
|
1104
1234
|
|
1105
|
-
template<
|
1235
|
+
template<
|
1236
|
+
typename TypePolicy,typename Group,template<typename...> class Arrays,
|
1237
|
+
typename SizeControl,typename Hash,typename Pred,typename Allocator
|
1238
|
+
>
|
1106
1239
|
class
|
1107
1240
|
|
1108
1241
|
#if defined(_MSC_VER)&&_MSC_FULL_VER>=190023918
|
1109
1242
|
__declspec(empty_bases) /* activate EBO with multiple inheritance */
|
1110
1243
|
#endif
|
1111
1244
|
|
1112
|
-
|
1245
|
+
table_core:empty_value<Hash,0>,empty_value<Pred,1>,empty_value<Allocator,2>
|
1113
1246
|
{
|
1114
|
-
|
1115
|
-
using pred_base=empty_value<Pred,1>;
|
1116
|
-
using allocator_base=empty_value<Allocator,2>;
|
1247
|
+
public:
|
1117
1248
|
using type_policy=TypePolicy;
|
1118
|
-
using group_type=
|
1249
|
+
using group_type=Group;
|
1119
1250
|
static constexpr auto N=group_type::N;
|
1120
1251
|
using size_policy=pow2_size_policy;
|
1121
1252
|
using prober=pow2_quadratic_prober;
|
1122
1253
|
using mix_policy=typename std::conditional<
|
1123
1254
|
hash_is_avalanching<Hash>::value,
|
1124
1255
|
no_mix,
|
1125
|
-
|
1256
|
+
mulx_mix
|
1126
1257
|
>::type;
|
1127
1258
|
using alloc_traits=boost::allocator_traits<Allocator>;
|
1259
|
+
using element_type=typename type_policy::element_type;
|
1260
|
+
using arrays_type=Arrays<element_type,group_type,size_policy>;
|
1261
|
+
using size_ctrl_type=SizeControl;
|
1128
1262
|
|
1129
|
-
public:
|
1130
1263
|
using key_type=typename type_policy::key_type;
|
1131
1264
|
using init_type=typename type_policy::init_type;
|
1132
1265
|
using value_type=typename type_policy::value_type;
|
1133
|
-
|
1134
|
-
private:
|
1135
|
-
static constexpr bool has_mutable_iterator=
|
1136
|
-
!std::is_same<key_type,value_type>::value;
|
1137
|
-
|
1138
|
-
public:
|
1139
1266
|
using hasher=Hash;
|
1140
1267
|
using key_equal=Pred;
|
1141
1268
|
using allocator_type=Allocator;
|
@@ -1145,24 +1272,20 @@ public:
|
|
1145
1272
|
using const_reference=const value_type&;
|
1146
1273
|
using size_type=std::size_t;
|
1147
1274
|
using difference_type=std::ptrdiff_t;
|
1148
|
-
using
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
table(
|
1155
|
-
std::size_t n=0,const Hash& h_=Hash(),const Pred& pred_=Pred(),
|
1156
|
-
const Allocator& al_=Allocator()):
|
1275
|
+
using locator=table_locator<group_type,element_type>;
|
1276
|
+
|
1277
|
+
table_core(
|
1278
|
+
std::size_t n=default_bucket_count,const Hash& h_=Hash(),
|
1279
|
+
const Pred& pred_=Pred(),const Allocator& al_=Allocator()):
|
1157
1280
|
hash_base{empty_init,h_},pred_base{empty_init,pred_},
|
1158
|
-
allocator_base{empty_init,al_},
|
1159
|
-
|
1281
|
+
allocator_base{empty_init,al_},arrays(new_arrays(n)),
|
1282
|
+
size_ctrl{initial_max_load(),0}
|
1160
1283
|
{}
|
1161
1284
|
|
1162
|
-
|
1163
|
-
|
1285
|
+
table_core(const table_core& x):
|
1286
|
+
table_core{x,alloc_traits::select_on_container_copy_construction(x.al())}{}
|
1164
1287
|
|
1165
|
-
|
1288
|
+
table_core(table_core&& x)
|
1166
1289
|
noexcept(
|
1167
1290
|
std::is_nothrow_move_constructible<Hash>::value&&
|
1168
1291
|
std::is_nothrow_move_constructible<Pred>::value&&
|
@@ -1170,28 +1293,26 @@ public:
|
|
1170
1293
|
hash_base{empty_init,std::move(x.h())},
|
1171
1294
|
pred_base{empty_init,std::move(x.pred())},
|
1172
1295
|
allocator_base{empty_init,std::move(x.al())},
|
1173
|
-
|
1296
|
+
arrays(x.arrays),size_ctrl(x.size_ctrl)
|
1174
1297
|
{
|
1175
|
-
x.size_=0;
|
1176
1298
|
x.arrays=x.new_arrays(0);
|
1177
|
-
x.ml=x.initial_max_load();
|
1299
|
+
x.size_ctrl.ml=x.initial_max_load();
|
1300
|
+
x.size_ctrl.size=0;
|
1178
1301
|
}
|
1179
1302
|
|
1180
|
-
|
1181
|
-
|
1303
|
+
table_core(const table_core& x,const Allocator& al_):
|
1304
|
+
table_core{std::size_t(std::ceil(float(x.size())/mlf)),x.h(),x.pred(),al_}
|
1182
1305
|
{
|
1183
|
-
x
|
1184
|
-
unchecked_insert(*p);
|
1185
|
-
});
|
1306
|
+
copy_elements_from(x);
|
1186
1307
|
}
|
1187
1308
|
|
1188
|
-
|
1189
|
-
|
1309
|
+
table_core(table_core&& x,const Allocator& al_):
|
1310
|
+
table_core{std::move(x.h()),std::move(x.pred()),al_}
|
1190
1311
|
{
|
1191
1312
|
if(al()==x.al()){
|
1192
|
-
std::swap
|
1193
|
-
|
1194
|
-
|
1313
|
+
using std::swap;
|
1314
|
+
swap(arrays,x.arrays);
|
1315
|
+
swap(size_ctrl,x.size_ctrl);
|
1195
1316
|
}
|
1196
1317
|
else{
|
1197
1318
|
reserve(x.size());
|
@@ -1201,38 +1322,54 @@ public:
|
|
1201
1322
|
/* This works because subsequent x.clear() does not depend on the
|
1202
1323
|
* elements' values.
|
1203
1324
|
*/
|
1204
|
-
x.for_all_elements([this](
|
1205
|
-
unchecked_insert(type_policy::move(*p));
|
1325
|
+
x.for_all_elements([this](element_type* p){
|
1326
|
+
unchecked_insert(type_policy::move(type_policy::value_from(*p)));
|
1206
1327
|
});
|
1207
1328
|
}
|
1208
1329
|
}
|
1209
1330
|
|
1210
|
-
~
|
1331
|
+
~table_core()noexcept
|
1211
1332
|
{
|
1212
|
-
for_all_elements([this](
|
1333
|
+
for_all_elements([this](element_type* p){
|
1213
1334
|
destroy_element(p);
|
1214
1335
|
});
|
1215
1336
|
delete_arrays(arrays);
|
1216
1337
|
}
|
1217
1338
|
|
1218
|
-
|
1339
|
+
table_core& operator=(const table_core& x)
|
1219
1340
|
{
|
1341
|
+
BOOST_UNORDERED_STATIC_ASSERT_HASH_PRED(Hash, Pred)
|
1342
|
+
|
1220
1343
|
static constexpr auto pocca=
|
1221
1344
|
alloc_traits::propagate_on_container_copy_assignment::value;
|
1222
1345
|
|
1223
1346
|
if(this!=std::addressof(x)){
|
1347
|
+
/* If copy construction here winds up throwing, the container is still
|
1348
|
+
* left intact so we perform these operations first.
|
1349
|
+
*/
|
1350
|
+
hasher tmp_h=x.h();
|
1351
|
+
key_equal tmp_p=x.pred();
|
1352
|
+
|
1353
|
+
/* already noexcept, clear() before we swap the Hash, Pred just in case
|
1354
|
+
* the clear() impl relies on them at some point in the future.
|
1355
|
+
*/
|
1224
1356
|
clear();
|
1225
|
-
|
1226
|
-
|
1357
|
+
|
1358
|
+
/* Because we've asserted at compile-time that Hash and Pred are nothrow
|
1359
|
+
* swappable, we can safely mutate our source container and maintain
|
1360
|
+
* consistency between the Hash, Pred compatibility.
|
1361
|
+
*/
|
1362
|
+
using std::swap;
|
1363
|
+
swap(h(),tmp_h);
|
1364
|
+
swap(pred(),tmp_p);
|
1365
|
+
|
1227
1366
|
if_constexpr<pocca>([&,this]{
|
1228
1367
|
if(al()!=x.al())reserve(0);
|
1229
1368
|
copy_assign_if<pocca>(al(),x.al());
|
1230
1369
|
});
|
1231
1370
|
/* noshrink: favor memory reuse over tightness */
|
1232
|
-
noshrink_reserve(x.size());
|
1233
|
-
x
|
1234
|
-
unchecked_insert(*p);
|
1235
|
-
});
|
1371
|
+
noshrink_reserve(x.size());
|
1372
|
+
copy_elements_from(x);
|
1236
1373
|
}
|
1237
1374
|
return *this;
|
1238
1375
|
}
|
@@ -1242,26 +1379,38 @@ public:
|
|
1242
1379
|
#pragma warning(disable:4127) /* conditional expression is constant */
|
1243
1380
|
#endif
|
1244
1381
|
|
1245
|
-
|
1382
|
+
table_core& operator=(table_core&& x)
|
1246
1383
|
noexcept(
|
1247
|
-
alloc_traits::
|
1248
|
-
|
1249
|
-
std::is_nothrow_move_assignable<Pred>::value)
|
1384
|
+
alloc_traits::propagate_on_container_move_assignment::value||
|
1385
|
+
alloc_traits::is_always_equal::value)
|
1250
1386
|
{
|
1387
|
+
BOOST_UNORDERED_STATIC_ASSERT_HASH_PRED(Hash, Pred)
|
1388
|
+
|
1251
1389
|
static constexpr auto pocma=
|
1252
1390
|
alloc_traits::propagate_on_container_move_assignment::value;
|
1253
1391
|
|
1254
1392
|
if(this!=std::addressof(x)){
|
1393
|
+
/* Given ambiguity in implementation strategies briefly discussed here:
|
1394
|
+
* https://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2227
|
1395
|
+
*
|
1396
|
+
* we opt into requiring nothrow swappability and eschew the move
|
1397
|
+
* operations associated with Hash, Pred.
|
1398
|
+
*
|
1399
|
+
* To this end, we ensure that the user never has to consider the
|
1400
|
+
* moved-from state of their Hash, Pred objects
|
1401
|
+
*/
|
1402
|
+
|
1403
|
+
using std::swap;
|
1404
|
+
|
1255
1405
|
clear();
|
1256
|
-
h()
|
1257
|
-
pred()
|
1406
|
+
swap(h(),x.h());
|
1407
|
+
swap(pred(),x.pred());
|
1408
|
+
|
1258
1409
|
if(pocma||al()==x.al()){
|
1259
|
-
using std::swap;
|
1260
1410
|
reserve(0);
|
1261
1411
|
move_assign_if<pocma>(al(),x.al());
|
1262
|
-
swap(size_,x.size_);
|
1263
1412
|
swap(arrays,x.arrays);
|
1264
|
-
swap(
|
1413
|
+
swap(size_ctrl,x.size_ctrl);
|
1265
1414
|
}
|
1266
1415
|
else{
|
1267
1416
|
/* noshrink: favor memory reuse over tightness */
|
@@ -1272,8 +1421,8 @@ public:
|
|
1272
1421
|
/* This works because subsequent x.clear() does not depend on the
|
1273
1422
|
* elements' values.
|
1274
1423
|
*/
|
1275
|
-
x.for_all_elements([this](
|
1276
|
-
unchecked_insert(type_policy::move(*p));
|
1424
|
+
x.for_all_elements([this](element_type* p){
|
1425
|
+
unchecked_insert(type_policy::move(type_policy::value_from(*p)));
|
1277
1426
|
});
|
1278
1427
|
}
|
1279
1428
|
}
|
@@ -1286,103 +1435,81 @@ public:
|
|
1286
1435
|
|
1287
1436
|
allocator_type get_allocator()const noexcept{return al();}
|
1288
1437
|
|
1289
|
-
iterator begin()noexcept
|
1290
|
-
{
|
1291
|
-
iterator it{arrays.groups,0,arrays.elements};
|
1292
|
-
if(!(arrays.groups[0].match_occupied()&0x1))++it;
|
1293
|
-
return it;
|
1294
|
-
}
|
1295
|
-
|
1296
|
-
const_iterator begin()const noexcept
|
1297
|
-
{return const_cast<table*>(this)->begin();}
|
1298
|
-
iterator end()noexcept{return {};}
|
1299
|
-
const_iterator end()const noexcept{return const_cast<table*>(this)->end();}
|
1300
|
-
const_iterator cbegin()const noexcept{return begin();}
|
1301
|
-
const_iterator cend()const noexcept{return end();}
|
1302
|
-
|
1303
1438
|
bool empty()const noexcept{return size()==0;}
|
1304
|
-
std::size_t size()const noexcept{return
|
1439
|
+
std::size_t size()const noexcept{return size_ctrl.size;}
|
1305
1440
|
std::size_t max_size()const noexcept{return SIZE_MAX;}
|
1306
1441
|
|
1307
|
-
|
1308
|
-
|
1442
|
+
BOOST_FORCEINLINE
|
1443
|
+
void erase(group_type* pg,unsigned int pos,element_type* p)noexcept
|
1309
1444
|
{
|
1310
|
-
|
1311
|
-
|
1312
|
-
init_type, Args...
|
1313
|
-
>::value,
|
1314
|
-
init_type,
|
1315
|
-
value_type
|
1316
|
-
>::type;
|
1317
|
-
return emplace_impl(emplace_type(std::forward<Args>(args)...));
|
1445
|
+
destroy_element(p);
|
1446
|
+
recover_slot(pg,pos);
|
1318
1447
|
}
|
1319
1448
|
|
1320
|
-
|
1321
|
-
|
1322
|
-
Key&& k,Args&&... args)
|
1449
|
+
BOOST_FORCEINLINE
|
1450
|
+
void erase(unsigned char* pc,element_type* p)noexcept
|
1323
1451
|
{
|
1324
|
-
|
1325
|
-
|
1326
|
-
std::forward_as_tuple(std::forward<Key>(k)),
|
1327
|
-
std::forward_as_tuple(std::forward<Args>(args)...));
|
1452
|
+
destroy_element(p);
|
1453
|
+
recover_slot(pc);
|
1328
1454
|
}
|
1329
1455
|
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
BOOST_FORCEINLINE std::pair<iterator,bool>
|
1334
|
-
insert(init_type&& x){return emplace_impl(std::move(x));}
|
1335
|
-
|
1336
|
-
/* template<typename=void> tilts call ambiguities in favor of init_type */
|
1337
|
-
|
1338
|
-
template<typename=void>
|
1339
|
-
BOOST_FORCEINLINE std::pair<iterator,bool>
|
1340
|
-
insert(const value_type& x){return emplace_impl(x);}
|
1341
|
-
|
1342
|
-
template<typename=void>
|
1343
|
-
BOOST_FORCEINLINE std::pair<iterator,bool>
|
1344
|
-
insert(value_type&& x){return emplace_impl(std::move(x));}
|
1345
|
-
|
1346
|
-
template<
|
1347
|
-
bool dependent_value=false,
|
1348
|
-
typename std::enable_if<
|
1349
|
-
has_mutable_iterator||dependent_value>::type* =nullptr
|
1350
|
-
>
|
1351
|
-
void erase(iterator pos)noexcept{return erase(const_iterator(pos));}
|
1352
|
-
|
1353
|
-
BOOST_FORCEINLINE
|
1354
|
-
void erase(const_iterator pos)noexcept
|
1456
|
+
template<typename Key>
|
1457
|
+
BOOST_FORCEINLINE locator find(const Key& x)const
|
1355
1458
|
{
|
1356
|
-
|
1357
|
-
|
1459
|
+
auto hash=hash_for(x);
|
1460
|
+
return find(x,position_for(hash),hash);
|
1358
1461
|
}
|
1359
1462
|
|
1463
|
+
#if defined(BOOST_MSVC)
|
1464
|
+
/* warning: forcing value to bool 'true' or 'false' in bool(pred()...) */
|
1465
|
+
#pragma warning(push)
|
1466
|
+
#pragma warning(disable:4800)
|
1467
|
+
#endif
|
1468
|
+
|
1360
1469
|
template<typename Key>
|
1361
|
-
BOOST_FORCEINLINE
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1470
|
+
BOOST_FORCEINLINE locator find(
|
1471
|
+
const Key& x,std::size_t pos0,std::size_t hash)const
|
1472
|
+
{
|
1473
|
+
prober pb(pos0);
|
1474
|
+
do{
|
1475
|
+
auto pos=pb.get();
|
1476
|
+
auto pg=arrays.groups+pos;
|
1477
|
+
auto mask=pg->match(hash);
|
1478
|
+
if(mask){
|
1479
|
+
BOOST_UNORDERED_ASSUME(arrays.elements!=nullptr);
|
1480
|
+
auto p=arrays.elements+pos*N;
|
1481
|
+
BOOST_UNORDERED_PREFETCH_ELEMENTS(p,N);
|
1482
|
+
do{
|
1483
|
+
auto n=unchecked_countr_zero(mask);
|
1484
|
+
if(BOOST_LIKELY(bool(pred()(x,key_from(p[n]))))){
|
1485
|
+
return {pg,n,p+n};
|
1486
|
+
}
|
1487
|
+
mask&=mask-1;
|
1488
|
+
}while(mask);
|
1489
|
+
}
|
1490
|
+
if(BOOST_LIKELY(pg->is_not_overflowed(hash))){
|
1491
|
+
return {};
|
1492
|
+
}
|
1370
1493
|
}
|
1371
|
-
|
1494
|
+
while(BOOST_LIKELY(pb.next(arrays.groups_size_mask)));
|
1495
|
+
return {};
|
1372
1496
|
}
|
1373
1497
|
|
1374
|
-
|
1498
|
+
#if defined(BOOST_MSVC)
|
1499
|
+
#pragma warning(pop) /* C4800 */
|
1500
|
+
#endif
|
1501
|
+
|
1502
|
+
void swap(table_core& x)
|
1375
1503
|
noexcept(
|
1376
|
-
alloc_traits::
|
1377
|
-
|
1378
|
-
boost::is_nothrow_swappable<Pred>::value)
|
1504
|
+
alloc_traits::propagate_on_container_swap::value||
|
1505
|
+
alloc_traits::is_always_equal::value)
|
1379
1506
|
{
|
1507
|
+
BOOST_UNORDERED_STATIC_ASSERT_HASH_PRED(Hash, Pred)
|
1508
|
+
|
1380
1509
|
static constexpr auto pocs=
|
1381
1510
|
alloc_traits::propagate_on_container_swap::value;
|
1382
1511
|
|
1383
1512
|
using std::swap;
|
1384
|
-
swap(h(),x.h());
|
1385
|
-
swap(pred(),x.pred());
|
1386
1513
|
if_constexpr<pocs>([&,this]{
|
1387
1514
|
swap_if<pocs>(al(),x.al());
|
1388
1515
|
},
|
@@ -1390,9 +1517,11 @@ public:
|
|
1390
1517
|
BOOST_ASSERT(al()==x.al());
|
1391
1518
|
(void)this; /* makes sure captured this is used */
|
1392
1519
|
});
|
1393
|
-
|
1520
|
+
|
1521
|
+
swap(h(),x.h());
|
1522
|
+
swap(pred(),x.pred());
|
1394
1523
|
swap(arrays,x.arrays);
|
1395
|
-
swap(
|
1524
|
+
swap(size_ctrl,x.size_ctrl);
|
1396
1525
|
}
|
1397
1526
|
|
1398
1527
|
void clear()noexcept
|
@@ -1401,7 +1530,7 @@ public:
|
|
1401
1530
|
if(p){
|
1402
1531
|
for(auto pg=arrays.groups,last=pg+arrays.groups_size_mask+1;
|
1403
1532
|
pg!=last;++pg,p+=N){
|
1404
|
-
auto mask=
|
1533
|
+
auto mask=match_really_occupied(pg,last);
|
1405
1534
|
while(mask){
|
1406
1535
|
destroy_element(p+unchecked_countr_zero(mask));
|
1407
1536
|
mask&=mask-1;
|
@@ -1410,41 +1539,14 @@ public:
|
|
1410
1539
|
pg->initialize();
|
1411
1540
|
}
|
1412
1541
|
arrays.groups[arrays.groups_size_mask].set_sentinel();
|
1413
|
-
|
1414
|
-
|
1542
|
+
size_ctrl.ml=initial_max_load();
|
1543
|
+
size_ctrl.size=0;
|
1415
1544
|
}
|
1416
1545
|
}
|
1417
1546
|
|
1418
|
-
// TODO: should we accept different allocator too?
|
1419
|
-
template<typename Hash2,typename Pred2>
|
1420
|
-
void merge(table<TypePolicy,Hash2,Pred2,Allocator>& x)
|
1421
|
-
{
|
1422
|
-
x.for_all_elements([&,this](group_type* pg,unsigned int n,value_type* p){
|
1423
|
-
if(emplace_impl(type_policy::move(*p)).second){
|
1424
|
-
x.erase(iterator{pg,n,p});
|
1425
|
-
}
|
1426
|
-
});
|
1427
|
-
}
|
1428
|
-
|
1429
|
-
template<typename Hash2,typename Pred2>
|
1430
|
-
void merge(table<TypePolicy,Hash2,Pred2,Allocator>&& x){merge(x);}
|
1431
|
-
|
1432
1547
|
hasher hash_function()const{return h();}
|
1433
1548
|
key_equal key_eq()const{return pred();}
|
1434
1549
|
|
1435
|
-
template<typename Key>
|
1436
|
-
BOOST_FORCEINLINE iterator find(const Key& x)
|
1437
|
-
{
|
1438
|
-
auto hash=hash_for(x);
|
1439
|
-
return find_impl(x,position_for(hash),hash);
|
1440
|
-
}
|
1441
|
-
|
1442
|
-
template<typename Key>
|
1443
|
-
BOOST_FORCEINLINE const_iterator find(const Key& x)const
|
1444
|
-
{
|
1445
|
-
return const_cast<table*>(this)->find(x);
|
1446
|
-
}
|
1447
|
-
|
1448
1550
|
std::size_t capacity()const noexcept
|
1449
1551
|
{
|
1450
1552
|
return arrays.elements?(arrays.groups_size_mask+1)*N-1:0;
|
@@ -1452,13 +1554,13 @@ public:
|
|
1452
1554
|
|
1453
1555
|
float load_factor()const noexcept
|
1454
1556
|
{
|
1455
|
-
if
|
1456
|
-
return float(size())/float(capacity());
|
1557
|
+
if(capacity()==0)return 0;
|
1558
|
+
else return float(size())/float(capacity());
|
1457
1559
|
}
|
1458
1560
|
|
1459
1561
|
float max_load_factor()const noexcept{return mlf;}
|
1460
1562
|
|
1461
|
-
std::size_t max_load()const noexcept{return ml;}
|
1563
|
+
std::size_t max_load()const noexcept{return size_ctrl.ml;}
|
1462
1564
|
|
1463
1565
|
void rehash(std::size_t n)
|
1464
1566
|
{
|
@@ -1474,20 +1576,27 @@ public:
|
|
1474
1576
|
rehash(std::size_t(std::ceil(float(n)/mlf)));
|
1475
1577
|
}
|
1476
1578
|
|
1477
|
-
|
1478
|
-
friend std::size_t erase_if(table& x,Predicate pr)
|
1579
|
+
friend bool operator==(const table_core& x,const table_core& y)
|
1479
1580
|
{
|
1480
|
-
return
|
1581
|
+
return
|
1582
|
+
x.size()==y.size()&&
|
1583
|
+
x.for_all_elements_while([&](element_type* p){
|
1584
|
+
auto loc=y.find(key_from(*p));
|
1585
|
+
return loc&&
|
1586
|
+
const_cast<const value_type&>(type_policy::value_from(*p))==
|
1587
|
+
const_cast<const value_type&>(type_policy::value_from(*loc.p));
|
1588
|
+
});
|
1481
1589
|
}
|
1482
1590
|
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1591
|
+
friend bool operator!=(const table_core& x,const table_core& y)
|
1592
|
+
{
|
1593
|
+
return !(x==y);
|
1594
|
+
}
|
1486
1595
|
|
1487
1596
|
struct clear_on_exit
|
1488
1597
|
{
|
1489
1598
|
~clear_on_exit(){x.clear();}
|
1490
|
-
|
1599
|
+
table_core& x;
|
1491
1600
|
};
|
1492
1601
|
|
1493
1602
|
Hash& h(){return hash_base::get();}
|
@@ -1497,63 +1606,33 @@ private:
|
|
1497
1606
|
Allocator& al(){return allocator_base::get();}
|
1498
1607
|
const Allocator& al()const{return allocator_base::get();}
|
1499
1608
|
|
1500
|
-
|
1501
|
-
|
1502
|
-
return arrays_type::new_(al(),n);
|
1503
|
-
}
|
1504
|
-
|
1505
|
-
void delete_arrays(arrays_type& arrays_)noexcept
|
1609
|
+
template<typename... Args>
|
1610
|
+
void construct_element(element_type* p,Args&&... args)
|
1506
1611
|
{
|
1507
|
-
|
1612
|
+
type_policy::construct(al(),p,std::forward<Args>(args)...);
|
1508
1613
|
}
|
1509
1614
|
|
1510
1615
|
template<typename... Args>
|
1511
|
-
void construct_element(
|
1616
|
+
void construct_element(element_type* p,try_emplace_args_t,Args&&... args)
|
1512
1617
|
{
|
1513
|
-
|
1618
|
+
construct_element_from_try_emplace_args(
|
1619
|
+
p,
|
1620
|
+
std::integral_constant<bool,std::is_same<key_type,value_type>::value>{},
|
1621
|
+
std::forward<Args>(args)...);
|
1514
1622
|
}
|
1515
1623
|
|
1516
|
-
void destroy_element(
|
1624
|
+
void destroy_element(element_type* p)noexcept
|
1517
1625
|
{
|
1518
|
-
|
1626
|
+
type_policy::destroy(al(),p);
|
1519
1627
|
}
|
1520
1628
|
|
1521
1629
|
struct destroy_element_on_exit
|
1522
1630
|
{
|
1523
1631
|
~destroy_element_on_exit(){this_->destroy_element(p);}
|
1524
|
-
|
1525
|
-
|
1632
|
+
table_core *this_;
|
1633
|
+
element_type *p;
|
1526
1634
|
};
|
1527
1635
|
|
1528
|
-
void recover_slot(unsigned char* pc)
|
1529
|
-
{
|
1530
|
-
/* If this slot potentially caused overflow, we decrease the maximum load so
|
1531
|
-
* that average probe length won't increase unboundedly in repeated
|
1532
|
-
* insert/erase cycles (drift).
|
1533
|
-
*/
|
1534
|
-
ml-=group_type::maybe_caused_overflow(pc);
|
1535
|
-
group_type::reset(pc);
|
1536
|
-
--size_;
|
1537
|
-
}
|
1538
|
-
|
1539
|
-
void recover_slot(group_type* pg,std::size_t pos)
|
1540
|
-
{
|
1541
|
-
recover_slot(reinterpret_cast<unsigned char*>(pg)+pos);
|
1542
|
-
}
|
1543
|
-
|
1544
|
-
std::size_t initial_max_load()const
|
1545
|
-
{
|
1546
|
-
static constexpr std::size_t small_capacity=2*N-1;
|
1547
|
-
|
1548
|
-
auto capacity_=capacity();
|
1549
|
-
if(capacity_<=small_capacity){
|
1550
|
-
return capacity_; /* we allow 100% usage */
|
1551
|
-
}
|
1552
|
-
else{
|
1553
|
-
return (std::size_t)(mlf*(float)(capacity_));
|
1554
|
-
}
|
1555
|
-
}
|
1556
|
-
|
1557
1636
|
template<typename T>
|
1558
1637
|
static inline auto key_from(const T& x)
|
1559
1638
|
->decltype(type_policy::extract(x))
|
@@ -1561,12 +1640,11 @@ private:
|
|
1561
1640
|
return type_policy::extract(x);
|
1562
1641
|
}
|
1563
1642
|
|
1564
|
-
template<typename
|
1565
|
-
static inline
|
1566
|
-
|
1567
|
-
->decltype(std::get<0>(k))
|
1643
|
+
template<typename Key,typename... Args>
|
1644
|
+
static inline const Key& key_from(
|
1645
|
+
try_emplace_args_t,const Key& x,const Args&...)
|
1568
1646
|
{
|
1569
|
-
return
|
1647
|
+
return x;
|
1570
1648
|
}
|
1571
1649
|
|
1572
1650
|
template<typename Key>
|
@@ -1586,129 +1664,332 @@ private:
|
|
1586
1664
|
return size_policy::position(hash,arrays_.groups_size_index);
|
1587
1665
|
}
|
1588
1666
|
|
1589
|
-
static inline
|
1667
|
+
static inline int match_really_occupied(group_type* pg,group_type* last)
|
1590
1668
|
{
|
1591
|
-
/*
|
1592
|
-
|
1593
|
-
|
1594
|
-
* Please report back if you find better tunings for some particular
|
1595
|
-
* architectures.
|
1596
|
-
*/
|
1669
|
+
/* excluding the sentinel */
|
1670
|
+
return pg->match_occupied()&~(int(pg==last-1)<<(N-1));
|
1671
|
+
}
|
1597
1672
|
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
#else
|
1607
|
-
prefetch(p);
|
1608
|
-
#endif
|
1673
|
+
template<typename... Args>
|
1674
|
+
locator unchecked_emplace_at(
|
1675
|
+
std::size_t pos0,std::size_t hash,Args&&... args)
|
1676
|
+
{
|
1677
|
+
auto res=nosize_unchecked_emplace_at(
|
1678
|
+
arrays,pos0,hash,std::forward<Args>(args)...);
|
1679
|
+
++size_ctrl.size;
|
1680
|
+
return res;
|
1609
1681
|
}
|
1610
1682
|
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1683
|
+
BOOST_NOINLINE void unchecked_rehash_for_growth()
|
1684
|
+
{
|
1685
|
+
auto new_arrays_=new_arrays_for_growth();
|
1686
|
+
unchecked_rehash(new_arrays_);
|
1687
|
+
}
|
1616
1688
|
|
1617
|
-
template<typename
|
1618
|
-
|
1619
|
-
|
1620
|
-
{
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1689
|
+
template<typename... Args>
|
1690
|
+
BOOST_NOINLINE locator
|
1691
|
+
unchecked_emplace_with_rehash(std::size_t hash,Args&&... args)
|
1692
|
+
{
|
1693
|
+
auto new_arrays_=new_arrays_for_growth();
|
1694
|
+
locator it;
|
1695
|
+
BOOST_TRY{
|
1696
|
+
/* strong exception guarantee -> try insertion before rehash */
|
1697
|
+
it=nosize_unchecked_emplace_at(
|
1698
|
+
new_arrays_,position_for(hash,new_arrays_),
|
1699
|
+
hash,std::forward<Args>(args)...);
|
1700
|
+
}
|
1701
|
+
BOOST_CATCH(...){
|
1702
|
+
delete_arrays(new_arrays_);
|
1703
|
+
BOOST_RETHROW
|
1704
|
+
}
|
1705
|
+
BOOST_CATCH_END
|
1706
|
+
|
1707
|
+
/* new_arrays_ lifetime taken care of by unchecked_rehash */
|
1708
|
+
unchecked_rehash(new_arrays_);
|
1709
|
+
++size_ctrl.size;
|
1710
|
+
return it;
|
1711
|
+
}
|
1712
|
+
|
1713
|
+
void noshrink_reserve(std::size_t n)
|
1714
|
+
{
|
1715
|
+
/* used only on assignment after element clearance */
|
1716
|
+
BOOST_ASSERT(empty());
|
1717
|
+
|
1718
|
+
if(n){
|
1719
|
+
n=std::size_t(std::ceil(float(n)/mlf)); /* elements -> slots */
|
1720
|
+
n=capacity_for(n); /* exact resulting capacity */
|
1721
|
+
|
1722
|
+
if(n>capacity()){
|
1723
|
+
auto new_arrays_=new_arrays(n);
|
1724
|
+
delete_arrays(arrays);
|
1725
|
+
arrays=new_arrays_;
|
1726
|
+
size_ctrl.ml=initial_max_load();
|
1727
|
+
}
|
1728
|
+
}
|
1729
|
+
}
|
1730
|
+
|
1731
|
+
template<typename F>
|
1732
|
+
void for_all_elements(F f)const
|
1733
|
+
{
|
1734
|
+
for_all_elements(arrays,f);
|
1735
|
+
}
|
1736
|
+
|
1737
|
+
template<typename F>
|
1738
|
+
static auto for_all_elements(const arrays_type& arrays_,F f)
|
1739
|
+
->decltype(f(nullptr),void())
|
1740
|
+
{
|
1741
|
+
for_all_elements_while(arrays_,[&](element_type* p){f(p);return true;});
|
1742
|
+
}
|
1743
|
+
|
1744
|
+
template<typename F>
|
1745
|
+
static auto for_all_elements(const arrays_type& arrays_,F f)
|
1746
|
+
->decltype(f(nullptr,0,nullptr),void())
|
1747
|
+
{
|
1748
|
+
for_all_elements_while(
|
1749
|
+
arrays_,[&](group_type* pg,unsigned int n,element_type* p)
|
1750
|
+
{f(pg,n,p);return true;});
|
1751
|
+
}
|
1752
|
+
|
1753
|
+
template<typename F>
|
1754
|
+
bool for_all_elements_while(F f)const
|
1755
|
+
{
|
1756
|
+
return for_all_elements_while(arrays,f);
|
1757
|
+
}
|
1758
|
+
|
1759
|
+
template<typename F>
|
1760
|
+
static auto for_all_elements_while(const arrays_type& arrays_,F f)
|
1761
|
+
->decltype(f(nullptr),bool())
|
1762
|
+
{
|
1763
|
+
return for_all_elements_while(
|
1764
|
+
arrays_,[&](group_type*,unsigned int,element_type* p){return f(p);});
|
1765
|
+
}
|
1766
|
+
|
1767
|
+
template<typename F>
|
1768
|
+
static auto for_all_elements_while(const arrays_type& arrays_,F f)
|
1769
|
+
->decltype(f(nullptr,0,nullptr),bool())
|
1770
|
+
{
|
1771
|
+
auto p=arrays_.elements;
|
1772
|
+
if(p){
|
1773
|
+
for(auto pg=arrays_.groups,last=pg+arrays_.groups_size_mask+1;
|
1774
|
+
pg!=last;++pg,p+=N){
|
1775
|
+
auto mask=match_really_occupied(pg,last);
|
1776
|
+
while(mask){
|
1630
1777
|
auto n=unchecked_countr_zero(mask);
|
1631
|
-
if(
|
1632
|
-
return {pg,n,p+n};
|
1633
|
-
}
|
1778
|
+
if(!f(pg,n,p+n))return false;
|
1634
1779
|
mask&=mask-1;
|
1635
|
-
}
|
1636
|
-
}
|
1637
|
-
if(BOOST_LIKELY(pg->is_not_overflowed(hash))){
|
1638
|
-
return {}; /* end() */
|
1780
|
+
}
|
1639
1781
|
}
|
1640
1782
|
}
|
1641
|
-
|
1642
|
-
return {}; /* end() */
|
1783
|
+
return true;
|
1643
1784
|
}
|
1644
1785
|
|
1645
|
-
|
1646
|
-
|
1647
|
-
#endif
|
1786
|
+
arrays_type arrays;
|
1787
|
+
size_ctrl_type size_ctrl;
|
1648
1788
|
|
1649
|
-
|
1650
|
-
|
1789
|
+
private:
|
1790
|
+
template<
|
1791
|
+
typename,typename,template<typename...> class,
|
1792
|
+
typename,typename,typename,typename
|
1793
|
+
>
|
1794
|
+
friend class table_core;
|
1795
|
+
|
1796
|
+
using hash_base=empty_value<Hash,0>;
|
1797
|
+
using pred_base=empty_value<Pred,1>;
|
1798
|
+
using allocator_base=empty_value<Allocator,2>;
|
1799
|
+
|
1800
|
+
/* used by allocator-extended move ctor */
|
1801
|
+
|
1802
|
+
table_core(Hash&& h_,Pred&& pred_,const Allocator& al_):
|
1803
|
+
hash_base{empty_init,std::move(h_)},
|
1804
|
+
pred_base{empty_init,std::move(pred_)},
|
1805
|
+
allocator_base{empty_init,al_},arrays(new_arrays(0)),
|
1806
|
+
size_ctrl{initial_max_load(),0}
|
1807
|
+
{}
|
1808
|
+
|
1809
|
+
arrays_type new_arrays(std::size_t n)
|
1651
1810
|
{
|
1652
|
-
|
1653
|
-
|
1654
|
-
auto pos0=position_for(hash);
|
1655
|
-
auto it=find_impl(k,pos0,hash);
|
1811
|
+
return arrays_type::new_(al(),n);
|
1812
|
+
}
|
1656
1813
|
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1814
|
+
arrays_type new_arrays_for_growth()
|
1815
|
+
{
|
1816
|
+
/* Due to the anti-drift mechanism (see recover_slot), the new arrays may
|
1817
|
+
* be of the same size as the old arrays; in the limit, erasing one
|
1818
|
+
* element at full load and then inserting could bring us back to the same
|
1819
|
+
* capacity after a costly rehash. To avoid this, we jump to the next
|
1820
|
+
* capacity level when the number of erased elements is <= 10% of total
|
1821
|
+
* elements at full load, which is implemented by requesting additional
|
1822
|
+
* F*size elements, with F = P * 10% / (1 - P * 10%), where P is the
|
1823
|
+
* probability of an element having caused overflow; P has been measured as
|
1824
|
+
* ~0.162 under ideal conditions, yielding F ~ 0.0165 ~ 1/61.
|
1825
|
+
*/
|
1826
|
+
return new_arrays(std::size_t(
|
1827
|
+
std::ceil(static_cast<float>(size()+size()/61+1)/mlf)));
|
1828
|
+
}
|
1829
|
+
|
1830
|
+
void delete_arrays(arrays_type& arrays_)noexcept
|
1831
|
+
{
|
1832
|
+
arrays_type::delete_(al(),arrays_);
|
1833
|
+
}
|
1834
|
+
|
1835
|
+
template<typename Key,typename... Args>
|
1836
|
+
void construct_element_from_try_emplace_args(
|
1837
|
+
element_type* p,std::false_type,Key&& x,Args&&... args)
|
1838
|
+
{
|
1839
|
+
type_policy::construct(
|
1840
|
+
this->al(),p,
|
1841
|
+
std::piecewise_construct,
|
1842
|
+
std::forward_as_tuple(std::forward<Key>(x)),
|
1843
|
+
std::forward_as_tuple(std::forward<Args>(args)...));
|
1844
|
+
}
|
1845
|
+
|
1846
|
+
/* This overload allows boost::unordered_flat_set to internally use
|
1847
|
+
* try_emplace to implement heterogeneous insert (P2363).
|
1848
|
+
*/
|
1849
|
+
|
1850
|
+
template<typename Key>
|
1851
|
+
void construct_element_from_try_emplace_args(
|
1852
|
+
element_type* p,std::true_type,Key&& x)
|
1853
|
+
{
|
1854
|
+
type_policy::construct(this->al(),p,std::forward<Key>(x));
|
1855
|
+
}
|
1856
|
+
|
1857
|
+
void copy_elements_from(const table_core& x)
|
1858
|
+
{
|
1859
|
+
BOOST_ASSERT(empty());
|
1860
|
+
BOOST_ASSERT(this!=std::addressof(x));
|
1861
|
+
if(arrays.groups_size_mask==x.arrays.groups_size_mask){
|
1862
|
+
fast_copy_elements_from(x);
|
1665
1863
|
}
|
1666
1864
|
else{
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
};
|
1865
|
+
x.for_all_elements([this](const element_type* p){
|
1866
|
+
unchecked_insert(*p);
|
1867
|
+
});
|
1671
1868
|
}
|
1672
1869
|
}
|
1673
1870
|
|
1674
|
-
|
1871
|
+
void fast_copy_elements_from(const table_core& x)
|
1675
1872
|
{
|
1676
|
-
|
1873
|
+
if(arrays.elements){
|
1874
|
+
copy_elements_array_from(x);
|
1875
|
+
copy_groups_array_from(x);
|
1876
|
+
size_ctrl.size=std::size_t(x.size_ctrl.size);
|
1877
|
+
}
|
1677
1878
|
}
|
1678
1879
|
|
1679
|
-
|
1680
|
-
BOOST_NOINLINE iterator
|
1681
|
-
unchecked_emplace_with_rehash(std::size_t hash,Args&&... args)
|
1880
|
+
void copy_elements_array_from(const table_core& x)
|
1682
1881
|
{
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1882
|
+
copy_elements_array_from(
|
1883
|
+
x,
|
1884
|
+
std::integral_constant<
|
1885
|
+
bool,
|
1886
|
+
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION,<50000)
|
1887
|
+
/* std::is_trivially_copy_constructible not provided */
|
1888
|
+
boost::has_trivial_copy<element_type>::value
|
1889
|
+
#else
|
1890
|
+
std::is_trivially_copy_constructible<element_type>::value
|
1891
|
+
#endif
|
1892
|
+
&&(
|
1893
|
+
is_std_allocator<Allocator>::value||
|
1894
|
+
!alloc_has_construct<Allocator,value_type*,const value_type&>::value)
|
1895
|
+
>{}
|
1896
|
+
);
|
1897
|
+
}
|
1898
|
+
|
1899
|
+
void copy_elements_array_from(
|
1900
|
+
const table_core& x,std::true_type /* -> memcpy */)
|
1901
|
+
{
|
1902
|
+
/* reinterpret_cast: GCC may complain about value_type not being trivially
|
1903
|
+
* copy-assignable when we're relying on trivial copy constructibility.
|
1692
1904
|
*/
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1905
|
+
std::memcpy(
|
1906
|
+
reinterpret_cast<unsigned char*>(arrays.elements),
|
1907
|
+
reinterpret_cast<unsigned char*>(x.arrays.elements),
|
1908
|
+
x.capacity()*sizeof(value_type));
|
1909
|
+
}
|
1910
|
+
|
1911
|
+
void copy_elements_array_from(
|
1912
|
+
const table_core& x,std::false_type /* -> manual */)
|
1913
|
+
{
|
1914
|
+
std::size_t num_constructed=0;
|
1696
1915
|
BOOST_TRY{
|
1697
|
-
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1916
|
+
x.for_all_elements([&,this](const element_type* p){
|
1917
|
+
construct_element(arrays.elements+(p-x.arrays.elements),*p);
|
1918
|
+
++num_constructed;
|
1919
|
+
});
|
1701
1920
|
}
|
1702
1921
|
BOOST_CATCH(...){
|
1703
|
-
|
1922
|
+
if(num_constructed){
|
1923
|
+
x.for_all_elements_while([&,this](const element_type* p){
|
1924
|
+
destroy_element(arrays.elements+(p-x.arrays.elements));
|
1925
|
+
return --num_constructed!=0;
|
1926
|
+
});
|
1927
|
+
}
|
1704
1928
|
BOOST_RETHROW
|
1705
1929
|
}
|
1706
1930
|
BOOST_CATCH_END
|
1931
|
+
}
|
1707
1932
|
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1933
|
+
void copy_groups_array_from(const table_core& x) {
|
1934
|
+
copy_groups_array_from(x, std::integral_constant<bool,
|
1935
|
+
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION,<50000)
|
1936
|
+
/* std::is_trivially_copy_assignable not provided */
|
1937
|
+
boost::has_trivial_assign<group_type>::value
|
1938
|
+
#else
|
1939
|
+
std::is_trivially_copy_assignable<group_type>::value
|
1940
|
+
#endif
|
1941
|
+
>{}
|
1942
|
+
);
|
1943
|
+
}
|
1944
|
+
|
1945
|
+
void copy_groups_array_from(
|
1946
|
+
const table_core& x, std::true_type /* -> memcpy */)
|
1947
|
+
{
|
1948
|
+
std::memcpy(
|
1949
|
+
arrays.groups,x.arrays.groups,
|
1950
|
+
(arrays.groups_size_mask+1)*sizeof(group_type));
|
1951
|
+
}
|
1952
|
+
|
1953
|
+
void copy_groups_array_from(
|
1954
|
+
const table_core& x, std::false_type /* -> manual */)
|
1955
|
+
{
|
1956
|
+
for(std::size_t i=0;i<arrays.groups_size_mask+1;++i){
|
1957
|
+
arrays.groups[i]=x.arrays.groups[i];
|
1958
|
+
}
|
1959
|
+
}
|
1960
|
+
|
1961
|
+
void recover_slot(unsigned char* pc)
|
1962
|
+
{
|
1963
|
+
/* If this slot potentially caused overflow, we decrease the maximum load so
|
1964
|
+
* that average probe length won't increase unboundedly in repeated
|
1965
|
+
* insert/erase cycles (drift).
|
1966
|
+
*/
|
1967
|
+
size_ctrl.ml-=group_type::maybe_caused_overflow(pc);
|
1968
|
+
group_type::reset(pc);
|
1969
|
+
--size_ctrl.size;
|
1970
|
+
}
|
1971
|
+
|
1972
|
+
void recover_slot(group_type* pg,std::size_t pos)
|
1973
|
+
{
|
1974
|
+
recover_slot(reinterpret_cast<unsigned char*>(pg)+pos);
|
1975
|
+
}
|
1976
|
+
|
1977
|
+
std::size_t initial_max_load()const
|
1978
|
+
{
|
1979
|
+
static constexpr std::size_t small_capacity=2*N-1;
|
1980
|
+
|
1981
|
+
auto capacity_=capacity();
|
1982
|
+
if(capacity_<=small_capacity){
|
1983
|
+
return capacity_; /* we allow 100% usage */
|
1984
|
+
}
|
1985
|
+
else{
|
1986
|
+
return (std::size_t)(mlf*(float)(capacity_));
|
1987
|
+
}
|
1988
|
+
}
|
1989
|
+
|
1990
|
+
static std::size_t capacity_for(std::size_t n)
|
1991
|
+
{
|
1992
|
+
return size_policy::size(size_index_for<group_type,size_policy>(n))*N-1;
|
1712
1993
|
}
|
1713
1994
|
|
1714
1995
|
BOOST_NOINLINE void unchecked_rehash(std::size_t n)
|
@@ -1721,24 +2002,20 @@ private:
|
|
1721
2002
|
{
|
1722
2003
|
std::size_t num_destroyed=0;
|
1723
2004
|
BOOST_TRY{
|
1724
|
-
for_all_elements([&,this](
|
2005
|
+
for_all_elements([&,this](element_type* p){
|
1725
2006
|
nosize_transfer_element(p,new_arrays_,num_destroyed);
|
1726
2007
|
});
|
1727
2008
|
}
|
1728
2009
|
BOOST_CATCH(...){
|
1729
2010
|
if(num_destroyed){
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
recover_slot(pg,nz);
|
1735
|
-
if(!(--num_destroyed))goto continue_;
|
1736
|
-
mask&=mask-1;
|
2011
|
+
for_all_elements_while(
|
2012
|
+
[&,this](group_type* pg,unsigned int n,element_type*){
|
2013
|
+
recover_slot(pg,n);
|
2014
|
+
return --num_destroyed!=0;
|
1737
2015
|
}
|
1738
|
-
|
2016
|
+
);
|
1739
2017
|
}
|
1740
|
-
|
1741
|
-
for_all_elements(new_arrays_,[this](value_type* p){
|
2018
|
+
for_all_elements(new_arrays_,[this](element_type* p){
|
1742
2019
|
destroy_element(p);
|
1743
2020
|
});
|
1744
2021
|
delete_arrays(new_arrays_);
|
@@ -1749,31 +2026,13 @@ private:
|
|
1749
2026
|
/* either all moved and destroyed or all copied */
|
1750
2027
|
BOOST_ASSERT(num_destroyed==size()||num_destroyed==0);
|
1751
2028
|
if(num_destroyed!=size()){
|
1752
|
-
for_all_elements([this](
|
2029
|
+
for_all_elements([this](element_type* p){
|
1753
2030
|
destroy_element(p);
|
1754
2031
|
});
|
1755
2032
|
}
|
1756
2033
|
delete_arrays(arrays);
|
1757
2034
|
arrays=new_arrays_;
|
1758
|
-
ml=initial_max_load();
|
1759
|
-
}
|
1760
|
-
|
1761
|
-
void noshrink_reserve(std::size_t n)
|
1762
|
-
{
|
1763
|
-
/* used only on assignment after element clearance */
|
1764
|
-
BOOST_ASSERT(empty());
|
1765
|
-
|
1766
|
-
if(n){
|
1767
|
-
n=std::size_t(std::ceil(float(n)/mlf)); /* elements -> slots */
|
1768
|
-
n=capacity_for(n); /* exact resulting capacity */
|
1769
|
-
|
1770
|
-
if(n>capacity()){
|
1771
|
-
auto new_arrays_=new_arrays(n);
|
1772
|
-
delete_arrays(arrays);
|
1773
|
-
arrays=new_arrays_;
|
1774
|
-
ml=initial_max_load();
|
1775
|
-
}
|
1776
|
-
}
|
2035
|
+
size_ctrl.ml=initial_max_load();
|
1777
2036
|
}
|
1778
2037
|
|
1779
2038
|
template<typename Value>
|
@@ -1784,18 +2043,19 @@ private:
|
|
1784
2043
|
}
|
1785
2044
|
|
1786
2045
|
void nosize_transfer_element(
|
1787
|
-
|
2046
|
+
element_type* p,const arrays_type& arrays_,std::size_t& num_destroyed)
|
1788
2047
|
{
|
1789
2048
|
nosize_transfer_element(
|
1790
2049
|
p,hash_for(key_from(*p)),arrays_,num_destroyed,
|
1791
2050
|
std::integral_constant< /* std::move_if_noexcept semantics */
|
1792
2051
|
bool,
|
1793
2052
|
std::is_nothrow_move_constructible<init_type>::value||
|
1794
|
-
!std::
|
2053
|
+
!std::is_same<element_type,value_type>::value||
|
2054
|
+
!std::is_copy_constructible<element_type>::value>{});
|
1795
2055
|
}
|
1796
2056
|
|
1797
2057
|
void nosize_transfer_element(
|
1798
|
-
|
2058
|
+
element_type* p,std::size_t hash,const arrays_type& arrays_,
|
1799
2059
|
std::size_t& num_destroyed,std::true_type /* ->move */)
|
1800
2060
|
{
|
1801
2061
|
/* Destroy p even if an an exception is thrown in the middle of move
|
@@ -1809,26 +2069,16 @@ private:
|
|
1809
2069
|
}
|
1810
2070
|
|
1811
2071
|
void nosize_transfer_element(
|
1812
|
-
|
2072
|
+
element_type* p,std::size_t hash,const arrays_type& arrays_,
|
1813
2073
|
std::size_t& /*num_destroyed*/,std::false_type /* ->copy */)
|
1814
2074
|
{
|
1815
2075
|
nosize_unchecked_emplace_at(
|
1816
2076
|
arrays_,position_for(hash,arrays_),hash,
|
1817
|
-
const_cast<const
|
1818
|
-
}
|
1819
|
-
|
1820
|
-
template<typename... Args>
|
1821
|
-
iterator unchecked_emplace_at(
|
1822
|
-
std::size_t pos0,std::size_t hash,Args&&... args)
|
1823
|
-
{
|
1824
|
-
auto res=nosize_unchecked_emplace_at(
|
1825
|
-
arrays,pos0,hash,std::forward<Args>(args)...);
|
1826
|
-
++size_;
|
1827
|
-
return res;
|
2077
|
+
const_cast<const element_type&>(*p));
|
1828
2078
|
}
|
1829
2079
|
|
1830
2080
|
template<typename... Args>
|
1831
|
-
|
2081
|
+
locator nosize_unchecked_emplace_at(
|
1832
2082
|
const arrays_type& arrays_,std::size_t pos0,std::size_t hash,
|
1833
2083
|
Args&&... args)
|
1834
2084
|
{
|
@@ -1846,51 +2096,6 @@ private:
|
|
1846
2096
|
else pg->mark_overflow(hash);
|
1847
2097
|
}
|
1848
2098
|
}
|
1849
|
-
|
1850
|
-
template<typename Predicate>
|
1851
|
-
std::size_t erase_if_impl(Predicate pr)
|
1852
|
-
{
|
1853
|
-
std::size_t s=size();
|
1854
|
-
for_all_elements([&,this](group_type* pg,unsigned int n,value_type* p){
|
1855
|
-
if(pr(*p)) erase(iterator{pg,n,p});
|
1856
|
-
});
|
1857
|
-
return std::size_t(s-size());
|
1858
|
-
}
|
1859
|
-
|
1860
|
-
template<typename F>
|
1861
|
-
void for_all_elements(F f)const
|
1862
|
-
{
|
1863
|
-
for_all_elements(arrays,f);
|
1864
|
-
}
|
1865
|
-
|
1866
|
-
template<typename F>
|
1867
|
-
static auto for_all_elements(const arrays_type& arrays_,F f)
|
1868
|
-
->decltype(f(nullptr),void())
|
1869
|
-
{
|
1870
|
-
for_all_elements(
|
1871
|
-
arrays_,[&](group_type*,unsigned int,value_type* p){return f(p);});
|
1872
|
-
}
|
1873
|
-
|
1874
|
-
template<typename F>
|
1875
|
-
static auto for_all_elements(const arrays_type& arrays_,F f)
|
1876
|
-
->decltype(f(nullptr,0,nullptr),void())
|
1877
|
-
{
|
1878
|
-
auto p=arrays_.elements;
|
1879
|
-
if(!p){return;}
|
1880
|
-
for(auto pg=arrays_.groups,last=pg+arrays_.groups_size_mask+1;
|
1881
|
-
pg!=last;++pg,p+=N){
|
1882
|
-
auto mask=pg->match_really_occupied();
|
1883
|
-
while(mask){
|
1884
|
-
auto n=unchecked_countr_zero(mask);
|
1885
|
-
f(pg,n,p+n);
|
1886
|
-
mask&=mask-1;
|
1887
|
-
}
|
1888
|
-
}
|
1889
|
-
}
|
1890
|
-
|
1891
|
-
std::size_t size_;
|
1892
|
-
arrays_type arrays;
|
1893
|
-
std::size_t ml;
|
1894
2099
|
};
|
1895
2100
|
|
1896
2101
|
#if BOOST_WORKAROUND(BOOST_MSVC,<=1900)
|
@@ -1901,21 +2106,14 @@ private:
|
|
1901
2106
|
#pragma warning(pop) /* C4714 */
|
1902
2107
|
#endif
|
1903
2108
|
|
1904
|
-
#
|
1905
|
-
#pragma GCC diagnostic pop /* ignored "-Wshadow" */
|
1906
|
-
#endif
|
2109
|
+
#include <boost/unordered/detail/foa/restore_wshadow.hpp>
|
1907
2110
|
|
1908
2111
|
} /* namespace foa */
|
1909
2112
|
} /* namespace detail */
|
1910
2113
|
} /* namespace unordered */
|
1911
2114
|
} /* namespace boost */
|
1912
2115
|
|
1913
|
-
#undef
|
2116
|
+
#undef BOOST_UNORDERED_STATIC_ASSERT_HASH_PRED
|
2117
|
+
#undef BOOST_UNORDERED_HAS_FEATURE
|
1914
2118
|
#undef BOOST_UNORDERED_HAS_BUILTIN
|
1915
|
-
#ifdef BOOST_UNORDERED_LITTLE_ENDIAN_NEON
|
1916
|
-
#undef BOOST_UNORDERED_LITTLE_ENDIAN_NEON
|
1917
|
-
#endif
|
1918
|
-
#ifdef BOOST_UNORDERED_SSE2
|
1919
|
-
#undef BOOST_UNORDERED_SSE2
|
1920
|
-
#endif
|
1921
2119
|
#endif
|