passenger 6.0.18 → 6.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (907) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG +48 -2
  3. data/CONTRIBUTORS +2 -0
  4. data/build/integration_tests.rb +2 -1
  5. data/build/test_basics.rb +6 -2
  6. data/dev/copy_boost_headers +77 -61
  7. data/package.json +15 -15
  8. data/src/agent/Core/Config.h +1 -1
  9. data/src/agent/Core/Controller/Config.h +1 -1
  10. data/src/agent/Core/SecurityUpdateChecker.h +4 -4
  11. data/src/agent/Watchdog/Config.h +1 -1
  12. data/src/cxx_supportlib/Constants.h +1 -1
  13. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +3 -0
  14. data/src/cxx_supportlib/ServerKit/http_parser.cpp +740 -430
  15. data/src/cxx_supportlib/ServerKit/http_parser.h +156 -34
  16. data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_executor.hpp +1 -1
  17. data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_handler.hpp +142 -3
  18. data/src/cxx_supportlib/vendor-modified/boost/asio/any_io_executor.hpp +1 -1
  19. data/src/cxx_supportlib/vendor-modified/boost/asio/append.hpp +1 -1
  20. data/src/cxx_supportlib/vendor-modified/boost/asio/as_tuple.hpp +1 -1
  21. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_allocator.hpp +1 -1
  22. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_cancellation_slot.hpp +2 -2
  23. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_executor.hpp +3 -7
  24. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_immediate_executor.hpp +299 -0
  25. data/src/cxx_supportlib/vendor-modified/boost/asio/associator.hpp +1 -1
  26. data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +49 -5
  27. data/src/cxx_supportlib/vendor-modified/boost/asio/awaitable.hpp +1 -1
  28. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +1 -1
  29. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +1 -1
  30. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_file.hpp +1 -1
  31. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_io_object.hpp +1 -1
  32. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_random_access_file.hpp +1 -1
  33. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +1 -1
  34. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_readable_pipe.hpp +1 -1
  35. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +1 -1
  36. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +1 -1
  37. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +55 -2
  38. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +1 -1
  39. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +9 -5
  40. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_iostream.hpp +1 -1
  41. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_streambuf.hpp +1 -1
  42. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_file.hpp +1 -1
  43. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +1 -1
  44. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf.hpp +1 -1
  45. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf_fwd.hpp +1 -1
  46. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +1 -1
  47. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_writable_pipe.hpp +1 -1
  48. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_allocator.hpp +32 -15
  49. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_cancellation_slot.hpp +32 -15
  50. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +7 -6
  51. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_immediate_executor.hpp +753 -0
  52. data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +234 -1
  53. data/src/cxx_supportlib/vendor-modified/boost/asio/buffer_registration.hpp +1 -1
  54. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream.hpp +6 -5
  55. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream_fwd.hpp +1 -1
  56. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream.hpp +6 -6
  57. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream_fwd.hpp +1 -1
  58. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream.hpp +6 -5
  59. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream_fwd.hpp +1 -1
  60. data/src/cxx_supportlib/vendor-modified/boost/asio/buffers_iterator.hpp +1 -1
  61. data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_signal.hpp +1 -1
  62. data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_state.hpp +1 -1
  63. data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_type.hpp +1 -1
  64. data/src/cxx_supportlib/vendor-modified/boost/asio/co_spawn.hpp +1 -1
  65. data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +1 -1
  66. data/src/cxx_supportlib/vendor-modified/boost/asio/compose.hpp +8 -1
  67. data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +1 -1
  68. data/src/cxx_supportlib/vendor-modified/boost/asio/connect_pipe.hpp +1 -1
  69. data/src/cxx_supportlib/vendor-modified/boost/asio/consign.hpp +1 -1
  70. data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +1 -1
  71. data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer.hpp +1 -1
  72. data/src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp +19 -12
  73. data/src/cxx_supportlib/vendor-modified/boost/asio/deferred.hpp +184 -57
  74. data/src/cxx_supportlib/vendor-modified/boost/asio/detached.hpp +1 -1
  75. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array.hpp +1 -1
  76. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array_fwd.hpp +1 -1
  77. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/assert.hpp +1 -1
  78. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/atomic_count.hpp +1 -1
  79. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_cancellation_state.hpp +1 -1
  80. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_completion_cond.hpp +1 -1
  81. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +1 -1
  82. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/blocking_executor_op.hpp +2 -1
  83. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_resize_guard.hpp +1 -1
  84. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_sequence_adapter.hpp +1 -1
  85. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +1 -1
  86. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bulk_executor_op.hpp +2 -1
  87. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/call_stack.hpp +1 -1
  88. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono.hpp +1 -1
  89. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono_time_traits.hpp +1 -1
  90. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_handler.hpp +1 -1
  91. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/composed_work.hpp +1 -1
  92. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/concurrency_hint.hpp +1 -1
  93. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_event.hpp +1 -1
  94. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_mutex.hpp +1 -1
  95. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +79 -3
  96. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/consuming_buffers.hpp +1 -1
  97. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstddef.hpp +1 -1
  98. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstdint.hpp +1 -1
  99. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/date_time_fwd.hpp +1 -1
  100. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +1 -1
  101. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dependent_type.hpp +1 -1
  102. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_ops.hpp +1 -1
  103. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_read_op.hpp +39 -1
  104. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_write_op.hpp +38 -1
  105. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dev_poll_reactor.hpp +20 -3
  106. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/epoll_reactor.hpp +20 -3
  107. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/event.hpp +1 -1
  108. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/eventfd_select_interrupter.hpp +1 -1
  109. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/exception.hpp +1 -1
  110. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_function.hpp +1 -1
  111. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_op.hpp +2 -1
  112. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fd_set_adapter.hpp +1 -1
  113. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fenced_block.hpp +1 -1
  114. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/functional.hpp +1 -1
  115. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/future.hpp +1 -1
  116. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_arm_fenced_block.hpp +1 -1
  117. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_hppa_fenced_block.hpp +1 -1
  118. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_sync_fenced_block.hpp +1 -1
  119. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_x86_fenced_block.hpp +1 -1
  120. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/global.hpp +1 -1
  121. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +1 -1
  122. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_cont_helpers.hpp +1 -1
  123. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_invoke_helpers.hpp +1 -1
  124. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_tracking.hpp +1 -1
  125. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_type_requirements.hpp +1 -1
  126. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_work.hpp +33 -1
  127. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/hash_map.hpp +1 -1
  128. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/buffer_sequence_adapter.ipp +1 -1
  129. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +3 -3
  130. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.hpp +2 -2
  131. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +13 -4
  132. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.hpp +2 -2
  133. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.ipp +17 -8
  134. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/eventfd_select_interrupter.ipp +1 -1
  135. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +1 -1
  136. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_descriptor_service.ipp +1 -1
  137. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_file_service.ipp +1 -1
  138. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_service.hpp +1 -1
  139. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_service.ipp +69 -35
  140. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_socket_service_base.ipp +1 -1
  141. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.hpp +2 -2
  142. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.ipp +15 -6
  143. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/null_event.ipp +1 -1
  144. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/pipe_select_interrupter.ipp +1 -1
  145. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_event.ipp +1 -1
  146. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_mutex.ipp +1 -1
  147. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_serial_port_service.ipp +1 -1
  148. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_thread.ipp +1 -1
  149. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_tss_ptr.ipp +1 -1
  150. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +8 -8
  151. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +25 -17
  152. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/resolver_service_base.ipp +1 -1
  153. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/scheduler.ipp +2 -1
  154. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.hpp +2 -2
  155. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +12 -4
  156. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.hpp +1 -1
  157. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.ipp +1 -1
  158. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/signal_set_service.ipp +57 -4
  159. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +1 -1
  160. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +1 -1
  161. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.hpp +1 -1
  162. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.ipp +1 -1
  163. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.hpp +1 -1
  164. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.ipp +1 -1
  165. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/thread_context.ipp +1 -1
  166. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/throw_error.ipp +1 -1
  167. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_ptime.ipp +1 -1
  168. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_set.ipp +1 -1
  169. data/src/cxx_supportlib/vendor-modified/boost/asio/{impl/defer.hpp → detail/initiate_defer.hpp} +6 -52
  170. data/src/cxx_supportlib/vendor-modified/boost/asio/{impl/dispatch.hpp → detail/initiate_dispatch.hpp} +6 -50
  171. data/src/cxx_supportlib/vendor-modified/boost/asio/{impl/post.hpp → detail/initiate_post.hpp} +6 -52
  172. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_control.hpp +1 -1
  173. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_object_impl.hpp +1 -1
  174. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_read_at_op.hpp +4 -1
  175. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_read_op.hpp +4 -1
  176. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_service.hpp +9 -1
  177. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_write_at_op.hpp +4 -1
  178. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_write_op.hpp +4 -1
  179. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_file_service.hpp +2 -3
  180. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_null_buffers_op.hpp +3 -1
  181. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_operation.hpp +1 -1
  182. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_service.hpp +4 -3
  183. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_accept_op.hpp +5 -1
  184. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_connect_op.hpp +3 -1
  185. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recv_op.hpp +4 -1
  186. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recvfrom_op.hpp +4 -1
  187. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recvmsg_op.hpp +4 -1
  188. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_send_op.hpp +4 -1
  189. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_sendto_op.hpp +4 -1
  190. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_service.hpp +1 -1
  191. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_service_base.hpp +1 -1
  192. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_wait_op.hpp +3 -1
  193. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_buffer_sequence.hpp +1 -1
  194. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_executor.hpp +1 -1
  195. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/keyword_tss_ptr.hpp +1 -1
  196. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/kqueue_reactor.hpp +20 -3
  197. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/local_free_on_block_exit.hpp +1 -1
  198. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/macos_fenced_block.hpp +1 -1
  199. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +3 -1
  200. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/mutex.hpp +1 -1
  201. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/non_const_lvalue.hpp +1 -1
  202. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/noncopyable.hpp +1 -1
  203. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_event.hpp +1 -1
  204. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_fenced_block.hpp +1 -1
  205. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_global.hpp +1 -1
  206. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_mutex.hpp +1 -1
  207. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_reactor.hpp +1 -1
  208. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_signal_blocker.hpp +1 -1
  209. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_socket_service.hpp +1 -1
  210. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_static_mutex.hpp +1 -1
  211. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_thread.hpp +1 -1
  212. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_tss_ptr.hpp +1 -1
  213. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/object_pool.hpp +1 -1
  214. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/old_win_sdk_compat.hpp +1 -1
  215. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/op_queue.hpp +1 -1
  216. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/operation.hpp +1 -1
  217. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pipe_select_interrupter.hpp +1 -1
  218. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pop_options.hpp +1 -1
  219. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_event.hpp +1 -1
  220. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_fd_set_adapter.hpp +1 -1
  221. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_global.hpp +1 -1
  222. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_mutex.hpp +1 -1
  223. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_serial_port_service.hpp +1 -1
  224. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_signal_blocker.hpp +1 -1
  225. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_static_mutex.hpp +1 -1
  226. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_thread.hpp +1 -1
  227. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_tss_ptr.hpp +1 -1
  228. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/push_options.hpp +1 -1
  229. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +55 -19
  230. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_null_buffers_op.hpp +35 -1
  231. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_accept_op.hpp +83 -1
  232. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_connect_op.hpp +39 -1
  233. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recv_op.hpp +38 -1
  234. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvfrom_op.hpp +39 -1
  235. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvmsg_op.hpp +39 -1
  236. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +39 -1
  237. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_sendto_op.hpp +38 -1
  238. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +10 -8
  239. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +127 -30
  240. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_wait_op.hpp +35 -1
  241. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor.hpp +1 -1
  242. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op.hpp +1 -1
  243. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op_queue.hpp +1 -1
  244. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/recycling_allocator.hpp +1 -1
  245. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/regex_fwd.hpp +1 -1
  246. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +2 -1
  247. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_op.hpp +1 -1
  248. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_query_op.hpp +2 -1
  249. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service.hpp +1 -1
  250. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service_base.hpp +1 -1
  251. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler.hpp +1 -1
  252. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_operation.hpp +1 -1
  253. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_task.hpp +1 -1
  254. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_thread_info.hpp +1 -1
  255. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_lock.hpp +1 -1
  256. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_ptr.hpp +1 -1
  257. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_interrupter.hpp +1 -1
  258. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_reactor.hpp +20 -3
  259. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/service_registry.hpp +1 -1
  260. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_blocker.hpp +1 -1
  261. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_handler.hpp +1 -1
  262. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_init.hpp +1 -1
  263. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_op.hpp +1 -1
  264. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_set_service.hpp +11 -2
  265. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_holder.hpp +1 -1
  266. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_ops.hpp +1 -1
  267. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_option.hpp +1 -1
  268. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_select_interrupter.hpp +1 -1
  269. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_types.hpp +11 -1
  270. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/solaris_fenced_block.hpp +1 -1
  271. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/source_location.hpp +1 -1
  272. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/static_mutex.hpp +1 -1
  273. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_event.hpp +1 -1
  274. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_fenced_block.hpp +1 -1
  275. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_global.hpp +1 -1
  276. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_mutex.hpp +1 -1
  277. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_static_mutex.hpp +1 -1
  278. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_thread.hpp +1 -1
  279. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_executor_service.hpp +1 -1
  280. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_service.hpp +1 -1
  281. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/string_view.hpp +1 -1
  282. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread.hpp +1 -1
  283. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_context.hpp +1 -1
  284. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_group.hpp +1 -1
  285. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +1 -1
  286. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_error.hpp +1 -1
  287. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_exception.hpp +1 -1
  288. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue.hpp +1 -1
  289. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_base.hpp +1 -1
  290. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_ptime.hpp +1 -1
  291. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_set.hpp +1 -1
  292. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler.hpp +1 -1
  293. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler_fwd.hpp +1 -1
  294. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/tss_ptr.hpp +1 -1
  295. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/type_traits.hpp +1 -1
  296. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/utility.hpp +1 -1
  297. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/variadic_templates.hpp +1 -1
  298. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_handler.hpp +1 -1
  299. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_op.hpp +1 -1
  300. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/winsock_init.hpp +1 -1
  301. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/work_dispatcher.hpp +1 -1
  302. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +1 -1
  303. data/src/cxx_supportlib/vendor-modified/boost/asio/dispatch.hpp +19 -12
  304. data/src/cxx_supportlib/vendor-modified/boost/asio/error.hpp +1 -1
  305. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/allocator.hpp +1 -1
  306. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/any_executor.hpp +73 -6
  307. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bad_executor.hpp +1 -1
  308. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking.hpp +1 -1
  309. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking_adaptation.hpp +1 -1
  310. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_execute.hpp +1 -1
  311. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_guarantee.hpp +1 -1
  312. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/connect.hpp +1 -1
  313. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context.hpp +1 -1
  314. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context_as.hpp +1 -1
  315. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_invocable.hpp +1 -1
  316. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_operation.hpp +1 -1
  317. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_receiver.hpp +1 -1
  318. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/bulk_sender.hpp +1 -1
  319. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/submit_receiver.hpp +1 -1
  320. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/void_receiver.hpp +1 -1
  321. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/execute.hpp +1 -1
  322. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/executor.hpp +1 -1
  323. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/impl/bad_executor.ipp +1 -1
  324. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/impl/receiver_invocation_error.ipp +1 -1
  325. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/invocable_archetype.hpp +1 -1
  326. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/mapping.hpp +1 -1
  327. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/occupancy.hpp +1 -1
  328. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/operation_state.hpp +1 -1
  329. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/outstanding_work.hpp +1 -1
  330. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/prefer_only.hpp +1 -1
  331. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver.hpp +1 -1
  332. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver_invocation_error.hpp +1 -1
  333. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/relationship.hpp +1 -1
  334. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/schedule.hpp +1 -1
  335. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/scheduler.hpp +1 -1
  336. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/sender.hpp +1 -1
  337. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_done.hpp +1 -1
  338. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_error.hpp +1 -1
  339. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_value.hpp +1 -1
  340. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/start.hpp +1 -1
  341. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/submit.hpp +1 -1
  342. data/src/cxx_supportlib/vendor-modified/boost/asio/execution.hpp +1 -1
  343. data/src/cxx_supportlib/vendor-modified/boost/asio/execution_context.hpp +1 -1
  344. data/src/cxx_supportlib/vendor-modified/boost/asio/executor.hpp +1 -1
  345. data/src/cxx_supportlib/vendor-modified/boost/asio/executor_work_guard.hpp +1 -1
  346. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/append.hpp +1 -1
  347. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/as_single.hpp +1 -1
  348. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/as_tuple.hpp +1 -1
  349. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/awaitable_operators.hpp +1 -1
  350. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_channel.hpp +2 -2
  351. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_concurrent_channel.hpp +2 -2
  352. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/cancellation_condition.hpp +1 -1
  353. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel.hpp +1 -1
  354. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel_error.hpp +1 -1
  355. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel_traits.hpp +1 -1
  356. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_composed.hpp +4 -3
  357. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_spawn.hpp +1 -1
  358. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/concurrent_channel.hpp +1 -1
  359. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/coro.hpp +1 -1
  360. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/coro_traits.hpp +1 -1
  361. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/deferred.hpp +1 -1
  362. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_handler.hpp +1 -1
  363. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_message.hpp +10 -3
  364. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_operation.hpp +87 -9
  365. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_payload.hpp +65 -19
  366. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_receive_op.hpp +11 -3
  367. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_functions.hpp +13 -1
  368. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_op.hpp +10 -2
  369. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_service.hpp +3 -3
  370. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_completion_handler.hpp +3 -3
  371. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_promise_allocator.hpp +1 -1
  372. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/has_signature.hpp +1 -1
  373. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/impl/channel_service.hpp +11 -8
  374. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/partial_promise.hpp +1 -1
  375. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/as_single.hpp +1 -1
  376. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/channel_error.ipp +1 -1
  377. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/co_composed.hpp +47 -4
  378. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/coro.hpp +34 -31
  379. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/parallel_group.hpp +1 -1
  380. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/promise.hpp +15 -2
  381. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_coro.hpp +5 -5
  382. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_promise.hpp +1 -1
  383. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/parallel_group.hpp +1 -1
  384. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/prepend.hpp +1 -1
  385. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/promise.hpp +1 -1
  386. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_coro.hpp +1 -1
  387. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_promise.hpp +2 -2
  388. data/src/cxx_supportlib/vendor-modified/boost/asio/file_base.hpp +1 -1
  389. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/basic_endpoint.hpp +1 -1
  390. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/datagram_protocol.hpp +1 -1
  391. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/endpoint.hpp +1 -1
  392. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/impl/endpoint.ipp +1 -1
  393. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/raw_protocol.hpp +1 -1
  394. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/seq_packet_protocol.hpp +1 -1
  395. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/stream_protocol.hpp +1 -1
  396. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_alloc_hook.hpp +1 -1
  397. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_continuation_hook.hpp +1 -1
  398. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_invoke_hook.hpp +1 -1
  399. data/src/cxx_supportlib/vendor-modified/boost/asio/high_resolution_timer.hpp +1 -1
  400. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_completion_executor.ipp +1 -1
  401. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_io_executor.ipp +1 -1
  402. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/append.hpp +1 -1
  403. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/as_tuple.hpp +78 -11
  404. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/awaitable.hpp +46 -6
  405. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +1 -1
  406. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +1 -1
  407. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/cancellation_signal.ipp +1 -1
  408. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/co_spawn.hpp +92 -50
  409. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +1 -1
  410. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect_pipe.hpp +1 -1
  411. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect_pipe.ipp +1 -1
  412. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/consign.hpp +1 -1
  413. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/deferred.hpp +58 -7
  414. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/detached.hpp +1 -1
  415. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/error.ipp +1 -1
  416. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.hpp +1 -1
  417. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.ipp +1 -1
  418. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.hpp +1 -1
  419. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.ipp +1 -1
  420. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +1 -1
  421. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.hpp +1 -1
  422. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.ipp +2 -1
  423. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/multiple_exceptions.ipp +1 -1
  424. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/prepend.hpp +1 -1
  425. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +1 -1
  426. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +1 -1
  427. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +1 -1
  428. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/redirect_error.hpp +47 -31
  429. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.hpp +1 -1
  430. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.ipp +1 -1
  431. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +3 -3
  432. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +1 -1
  433. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.hpp +1 -1
  434. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.ipp +1 -1
  435. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_executor.hpp +1 -1
  436. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.hpp +1 -1
  437. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.ipp +5 -4
  438. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_awaitable.hpp +1 -1
  439. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +3 -3
  440. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +1 -1
  441. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +1 -1
  442. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context.hpp +1 -1
  443. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context_strand.hpp +1 -1
  444. data/src/cxx_supportlib/vendor-modified/boost/asio/io_service.hpp +1 -1
  445. data/src/cxx_supportlib/vendor-modified/boost/asio/io_service_strand.hpp +1 -1
  446. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address.hpp +1 -1
  447. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4.hpp +4 -3
  448. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_iterator.hpp +1 -1
  449. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_range.hpp +1 -1
  450. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6.hpp +1 -1
  451. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_iterator.hpp +1 -1
  452. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_range.hpp +1 -1
  453. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/bad_address_cast.hpp +11 -1
  454. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_endpoint.hpp +1 -1
  455. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +1 -1
  456. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_entry.hpp +1 -1
  457. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_iterator.hpp +1 -1
  458. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_query.hpp +1 -1
  459. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_results.hpp +1 -1
  460. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/endpoint.hpp +1 -1
  461. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/impl/endpoint.ipp +1 -1
  462. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +1 -1
  463. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/host_name.hpp +1 -1
  464. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/icmp.hpp +1 -1
  465. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.hpp +1 -1
  466. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.ipp +1 -1
  467. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.hpp +1 -1
  468. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.ipp +1 -1
  469. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.hpp +1 -1
  470. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +1 -1
  471. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/basic_endpoint.hpp +1 -1
  472. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/host_name.ipp +1 -1
  473. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.hpp +1 -1
  474. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.ipp +1 -1
  475. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.hpp +1 -1
  476. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.ipp +1 -1
  477. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/multicast.hpp +1 -1
  478. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v4.hpp +1 -1
  479. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v6.hpp +1 -1
  480. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_base.hpp +1 -1
  481. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_query_base.hpp +1 -1
  482. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/tcp.hpp +1 -1
  483. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/udp.hpp +1 -1
  484. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/unicast.hpp +1 -1
  485. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/v6_only.hpp +1 -1
  486. data/src/cxx_supportlib/vendor-modified/boost/asio/is_applicable_property.hpp +1 -1
  487. data/src/cxx_supportlib/vendor-modified/boost/asio/is_contiguous_iterator.hpp +1 -1
  488. data/src/cxx_supportlib/vendor-modified/boost/asio/is_executor.hpp +1 -1
  489. data/src/cxx_supportlib/vendor-modified/boost/asio/is_read_buffered.hpp +1 -1
  490. data/src/cxx_supportlib/vendor-modified/boost/asio/is_write_buffered.hpp +1 -1
  491. data/src/cxx_supportlib/vendor-modified/boost/asio/local/basic_endpoint.hpp +1 -1
  492. data/src/cxx_supportlib/vendor-modified/boost/asio/local/connect_pair.hpp +1 -1
  493. data/src/cxx_supportlib/vendor-modified/boost/asio/local/datagram_protocol.hpp +1 -1
  494. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/endpoint.hpp +1 -1
  495. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/impl/endpoint.ipp +1 -1
  496. data/src/cxx_supportlib/vendor-modified/boost/asio/local/seq_packet_protocol.hpp +86 -0
  497. data/src/cxx_supportlib/vendor-modified/boost/asio/local/stream_protocol.hpp +1 -1
  498. data/src/cxx_supportlib/vendor-modified/boost/asio/multiple_exceptions.hpp +1 -1
  499. data/src/cxx_supportlib/vendor-modified/boost/asio/packaged_task.hpp +1 -1
  500. data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +1 -1
  501. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +1 -1
  502. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +1 -1
  503. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor.hpp +1 -1
  504. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor_base.hpp +1 -1
  505. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor.hpp +1 -1
  506. data/src/cxx_supportlib/vendor-modified/boost/asio/post.hpp +19 -12
  507. data/src/cxx_supportlib/vendor-modified/boost/asio/prefer.hpp +1 -1
  508. data/src/cxx_supportlib/vendor-modified/boost/asio/prepend.hpp +1 -1
  509. data/src/cxx_supportlib/vendor-modified/boost/asio/query.hpp +1 -1
  510. data/src/cxx_supportlib/vendor-modified/boost/asio/random_access_file.hpp +1 -1
  511. data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +1 -1
  512. data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +1 -1
  513. data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +1 -1
  514. data/src/cxx_supportlib/vendor-modified/boost/asio/readable_pipe.hpp +1 -1
  515. data/src/cxx_supportlib/vendor-modified/boost/asio/recycling_allocator.hpp +1 -1
  516. data/src/cxx_supportlib/vendor-modified/boost/asio/redirect_error.hpp +1 -1
  517. data/src/cxx_supportlib/vendor-modified/boost/asio/registered_buffer.hpp +1 -1
  518. data/src/cxx_supportlib/vendor-modified/boost/asio/require.hpp +1 -1
  519. data/src/cxx_supportlib/vendor-modified/boost/asio/require_concept.hpp +1 -1
  520. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port.hpp +1 -1
  521. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_base.hpp +1 -1
  522. data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set.hpp +1 -1
  523. data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set_base.hpp +184 -0
  524. data/src/cxx_supportlib/vendor-modified/boost/asio/socket_base.hpp +1 -1
  525. data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +1 -1
  526. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context.hpp +1 -1
  527. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_base.hpp +24 -24
  528. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/buffered_handshake_op.hpp +1 -1
  529. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/engine.hpp +1 -1
  530. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/handshake_op.hpp +1 -1
  531. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/engine.ipp +1 -1
  532. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +1 -1
  533. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +1 -1
  534. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_init.hpp +1 -1
  535. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_types.hpp +1 -1
  536. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/password_callback.hpp +1 -1
  537. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/read_op.hpp +1 -1
  538. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/shutdown_op.hpp +1 -1
  539. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/stream_core.hpp +1 -1
  540. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/verify_callback.hpp +1 -1
  541. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/write_op.hpp +1 -1
  542. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/error.hpp +1 -1
  543. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/host_name_verification.hpp +1 -1
  544. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.hpp +1 -1
  545. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +1 -1
  546. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/error.ipp +1 -1
  547. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/host_name_verification.ipp +1 -1
  548. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/rfc2818_verification.ipp +1 -1
  549. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/src.hpp +1 -1
  550. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/rfc2818_verification.hpp +1 -1
  551. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +1 -1
  552. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_base.hpp +1 -1
  553. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_context.hpp +1 -1
  554. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_mode.hpp +1 -1
  555. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl.hpp +1 -1
  556. data/src/cxx_supportlib/vendor-modified/boost/asio/static_thread_pool.hpp +1 -1
  557. data/src/cxx_supportlib/vendor-modified/boost/asio/steady_timer.hpp +1 -1
  558. data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +1 -1
  559. data/src/cxx_supportlib/vendor-modified/boost/asio/stream_file.hpp +1 -1
  560. data/src/cxx_supportlib/vendor-modified/boost/asio/streambuf.hpp +1 -1
  561. data/src/cxx_supportlib/vendor-modified/boost/asio/system_context.hpp +1 -1
  562. data/src/cxx_supportlib/vendor-modified/boost/asio/system_executor.hpp +1 -1
  563. data/src/cxx_supportlib/vendor-modified/boost/asio/system_timer.hpp +1 -1
  564. data/src/cxx_supportlib/vendor-modified/boost/asio/this_coro.hpp +3 -3
  565. data/src/cxx_supportlib/vendor-modified/boost/asio/thread_pool.hpp +1 -1
  566. data/src/cxx_supportlib/vendor-modified/boost/asio/time_traits.hpp +1 -1
  567. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/bulk_execute_free.hpp +1 -1
  568. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/bulk_execute_member.hpp +1 -1
  569. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/connect_free.hpp +1 -1
  570. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/connect_member.hpp +1 -1
  571. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/equality_comparable.hpp +1 -1
  572. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/execute_free.hpp +1 -1
  573. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/execute_member.hpp +1 -1
  574. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_free.hpp +1 -1
  575. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_member.hpp +1 -1
  576. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_free.hpp +1 -1
  577. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_member.hpp +1 -1
  578. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_static_constexpr_member.hpp +1 -1
  579. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_free.hpp +1 -1
  580. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_member.hpp +1 -1
  581. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_free.hpp +1 -1
  582. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_member.hpp +1 -1
  583. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/schedule_free.hpp +1 -1
  584. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/schedule_member.hpp +1 -1
  585. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_done_free.hpp +1 -1
  586. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_done_member.hpp +1 -1
  587. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_error_free.hpp +1 -1
  588. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_error_member.hpp +1 -1
  589. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_value_free.hpp +1 -1
  590. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_value_member.hpp +1 -1
  591. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/start_free.hpp +1 -1
  592. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/start_member.hpp +1 -1
  593. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_query.hpp +1 -1
  594. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require.hpp +1 -1
  595. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require_concept.hpp +1 -1
  596. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/submit_free.hpp +1 -1
  597. data/src/cxx_supportlib/vendor-modified/boost/asio/traits/submit_member.hpp +1 -1
  598. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/buffer.hpp +1 -1
  599. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/executor.hpp +1 -1
  600. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/internet.hpp +1 -1
  601. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/io_context.hpp +1 -1
  602. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/net.hpp +1 -1
  603. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/netfwd.hpp +1 -1
  604. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/socket.hpp +1 -1
  605. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/timer.hpp +1 -1
  606. data/src/cxx_supportlib/vendor-modified/boost/asio/unyield.hpp +1 -1
  607. data/src/cxx_supportlib/vendor-modified/boost/asio/use_awaitable.hpp +1 -1
  608. data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +1 -1
  609. data/src/cxx_supportlib/vendor-modified/boost/asio/uses_executor.hpp +1 -1
  610. data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +2 -2
  611. data/src/cxx_supportlib/vendor-modified/boost/asio/wait_traits.hpp +1 -1
  612. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +1 -1
  613. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_overlapped_handle.hpp +1 -1
  614. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +1 -1
  615. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +1 -1
  616. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle.hpp +1 -1
  617. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_handle.hpp +1 -1
  618. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_ptr.hpp +1 -1
  619. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle.hpp +1 -1
  620. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle.hpp +1 -1
  621. data/src/cxx_supportlib/vendor-modified/boost/asio/writable_pipe.hpp +1 -1
  622. data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +1 -1
  623. data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +1 -1
  624. data/src/cxx_supportlib/vendor-modified/boost/asio/yield.hpp +1 -1
  625. data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +6 -2
  626. data/src/cxx_supportlib/vendor-modified/boost/assert/source_location.hpp +4 -1
  627. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic.hpp +0 -13
  628. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_ref_impl.hpp +4 -2
  629. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +6 -4
  630. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +0 -49
  631. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_x86.hpp +107 -40
  632. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_msvc_x86.hpp +32 -5
  633. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/remove_cv.hpp +42 -0
  634. data/src/cxx_supportlib/vendor-modified/boost/bind/apply.hpp +1 -0
  635. data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +4 -3
  636. data/src/cxx_supportlib/vendor-modified/boost/bind/bind_mf_cc.hpp +18 -18
  637. data/src/cxx_supportlib/vendor-modified/boost/bind/detail/is_same.hpp +36 -0
  638. data/src/cxx_supportlib/vendor-modified/boost/bind/detail/requires_cxx11.hpp +22 -0
  639. data/src/cxx_supportlib/vendor-modified/boost/bind/detail/result_traits.hpp +1 -0
  640. data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn.hpp +3 -2
  641. data/src/cxx_supportlib/vendor-modified/boost/bind/protect.hpp +1 -0
  642. data/src/cxx_supportlib/vendor-modified/boost/bind/std_placeholders.hpp +1 -0
  643. data/src/cxx_supportlib/vendor-modified/boost/bind/storage.hpp +1 -0
  644. data/src/cxx_supportlib/vendor-modified/boost/chrono/config.hpp +1 -0
  645. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/requires_cxx11.hpp +23 -0
  646. data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +1 -1
  647. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_get.hpp +1 -1
  648. data/src/cxx_supportlib/vendor-modified/boost/chrono/io_v1/chrono_io.hpp +3 -3
  649. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +1 -0
  650. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +4 -0
  651. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +1 -0
  652. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +1 -0
  653. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +1 -0
  654. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +1 -0
  655. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +1 -0
  656. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +1 -0
  657. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/hp_acc.hpp +1 -0
  658. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +1 -0
  659. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +1 -0
  660. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +1 -0
  661. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +1 -0
  662. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +1 -0
  663. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +1 -0
  664. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +6 -3
  665. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +4 -0
  666. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp_zos.hpp +1 -0
  667. data/src/cxx_supportlib/vendor-modified/boost/config/detail/suffix.hpp +16 -0
  668. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +32 -0
  669. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +16 -1
  670. data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +0 -29
  671. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +32 -33
  672. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +4 -5
  673. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +8 -9
  674. data/src/cxx_supportlib/vendor-modified/boost/container/detail/allocator_version_traits.hpp +14 -15
  675. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +1 -0
  676. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +41 -44
  677. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +32 -34
  678. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +36 -24
  679. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +48 -12
  680. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +12 -14
  681. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool_impl.hpp +10 -11
  682. data/src/cxx_supportlib/vendor-modified/boost/container/detail/placement_new.hpp +0 -8
  683. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +6 -7
  684. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +33 -0
  685. data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +3 -7
  686. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +0 -2
  687. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +1 -1
  688. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +0 -1
  689. data/src/cxx_supportlib/vendor-modified/boost/container/node_handle.hpp +11 -9
  690. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +1 -1
  691. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/polymorphic_allocator.hpp +1 -0
  692. data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +0 -2
  693. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +0 -2
  694. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +35 -16
  695. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +8 -9
  696. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +23 -12
  697. data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +4 -5
  698. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +101 -37
  699. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_range.hpp +285 -48
  700. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_tuple_like.hpp +156 -0
  701. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/mulx.hpp +79 -0
  702. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/requires_cxx11.hpp +22 -0
  703. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +17 -2
  704. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash_fwd.hpp +1 -0
  705. data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_contiguous_range.hpp +1 -0
  706. data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_range.hpp +1 -0
  707. data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_tuple_like.hpp +42 -0
  708. data/src/cxx_supportlib/vendor-modified/boost/core/alignof.hpp +57 -0
  709. data/src/cxx_supportlib/vendor-modified/boost/core/allocator_access.hpp +4 -4
  710. data/src/cxx_supportlib/vendor-modified/boost/core/bit.hpp +344 -31
  711. data/src/cxx_supportlib/vendor-modified/boost/core/checked_delete.hpp +20 -3
  712. data/src/cxx_supportlib/vendor-modified/boost/core/data.hpp +46 -0
  713. data/src/cxx_supportlib/vendor-modified/boost/core/detail/is_same.hpp +39 -0
  714. data/src/cxx_supportlib/vendor-modified/boost/core/detail/lwt_unattended.hpp +66 -0
  715. data/src/cxx_supportlib/vendor-modified/boost/core/detail/sp_thread_pause.hpp +71 -0
  716. data/src/cxx_supportlib/vendor-modified/boost/{smart_ptr → core}/detail/sp_thread_sleep.hpp +39 -21
  717. data/src/cxx_supportlib/vendor-modified/boost/core/detail/sp_thread_yield.hpp +100 -0
  718. data/src/cxx_supportlib/vendor-modified/boost/core/detail/sp_win32_sleep.hpp +54 -0
  719. data/src/cxx_supportlib/vendor-modified/boost/core/detail/string_view.hpp +6 -6
  720. data/src/cxx_supportlib/vendor-modified/boost/core/identity.hpp +61 -0
  721. data/src/cxx_supportlib/vendor-modified/boost/core/is_same.hpp +10 -15
  722. data/src/cxx_supportlib/vendor-modified/boost/core/launder.hpp +55 -0
  723. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +33 -36
  724. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test_trait.hpp +3 -3
  725. data/src/cxx_supportlib/vendor-modified/boost/core/make_span.hpp +59 -0
  726. data/src/cxx_supportlib/vendor-modified/boost/core/max_align.hpp +82 -0
  727. data/src/cxx_supportlib/vendor-modified/boost/core/memory_resource.hpp +108 -0
  728. data/src/cxx_supportlib/vendor-modified/boost/core/ref.hpp +23 -16
  729. data/src/cxx_supportlib/vendor-modified/boost/core/serialization.hpp +131 -0
  730. data/src/cxx_supportlib/vendor-modified/boost/core/size.hpp +31 -0
  731. data/src/cxx_supportlib/vendor-modified/boost/core/snprintf.hpp +173 -0
  732. data/src/cxx_supportlib/vendor-modified/boost/core/span.hpp +17 -17
  733. data/src/cxx_supportlib/vendor-modified/boost/core/swap.hpp +27 -8
  734. data/src/cxx_supportlib/vendor-modified/boost/core/type_name.hpp +29 -5
  735. data/src/cxx_supportlib/vendor-modified/boost/core/yield_primitives.hpp +12 -0
  736. data/src/cxx_supportlib/vendor-modified/boost/describe/members.hpp +2 -0
  737. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/exception_ptr.hpp +20 -8
  738. data/src/cxx_supportlib/vendor-modified/boost/exception/diagnostic_information.hpp +3 -3
  739. data/src/cxx_supportlib/vendor-modified/boost/exception/to_string.hpp +1 -1
  740. data/src/cxx_supportlib/vendor-modified/boost/function/detail/epilogue.hpp +39 -0
  741. data/src/cxx_supportlib/vendor-modified/boost/function/detail/prologue.hpp +1 -0
  742. data/src/cxx_supportlib/vendor-modified/boost/function/detail/requires_cxx11.hpp +22 -0
  743. data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +28 -32
  744. data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +10 -2
  745. data/src/cxx_supportlib/vendor-modified/boost/function.hpp +2 -0
  746. data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_list_algorithms.hpp +5 -5
  747. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/array_initializer.hpp +5 -5
  748. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/common_slist_algorithms.hpp +5 -5
  749. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +1 -0
  750. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_iterator.hpp +1 -0
  751. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +26 -0
  752. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +1 -1
  753. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +1 -1
  754. data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/facade_iterator_category.hpp +10 -11
  755. data/src/cxx_supportlib/vendor-modified/boost/iterator/is_iterator.hpp +148 -0
  756. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_concepts.hpp +2 -2
  757. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +1 -1
  758. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +1 -1
  759. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +5 -16
  760. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +1 -1
  761. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +1 -1
  762. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +1 -1
  763. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +1 -1
  764. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +1 -1
  765. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +1 -1
  766. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +1 -1
  767. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +19 -1
  768. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/posix_api.cpp +10 -18
  769. data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wide_posix_api.cpp +13 -14
  770. data/src/cxx_supportlib/vendor-modified/boost/limits.hpp +12 -12
  771. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_merge.hpp +4 -3
  772. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_sort.hpp +19 -19
  773. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +36 -37
  774. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/basic_op.hpp +1 -0
  775. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/heap_sort.hpp +2 -1
  776. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp +17 -19
  777. data/src/cxx_supportlib/vendor-modified/boost/move/algo/move.hpp +4 -5
  778. data/src/cxx_supportlib/vendor-modified/boost/move/algo/predicate.hpp +1 -1
  779. data/src/cxx_supportlib/vendor-modified/boost/move/algorithm.hpp +0 -1
  780. data/src/cxx_supportlib/vendor-modified/boost/move/default_delete.hpp +5 -6
  781. data/src/cxx_supportlib/vendor-modified/boost/move/detail/nsec_clock.hpp +65 -24
  782. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +5 -6
  783. data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +77 -0
  784. data/src/cxx_supportlib/vendor-modified/boost/move/unique_ptr.hpp +17 -18
  785. data/src/cxx_supportlib/vendor-modified/boost/move/utility.hpp +2 -2
  786. data/src/cxx_supportlib/vendor-modified/boost/move/utility_core.hpp +8 -6
  787. data/src/cxx_supportlib/vendor-modified/boost/mp11/algorithm.hpp +38 -17
  788. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/config.hpp +11 -0
  789. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_append.hpp +140 -4
  790. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_defer.hpp +119 -0
  791. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_fold.hpp +105 -3
  792. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_front.hpp +13 -1
  793. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_is_value_list.hpp +41 -0
  794. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_list_v.hpp +27 -0
  795. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_map_find.hpp +1 -1
  796. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_plus.hpp +4 -1
  797. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_rename.hpp +18 -5
  798. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_value.hpp +25 -0
  799. data/src/cxx_supportlib/vendor-modified/boost/mp11/integral.hpp +1 -0
  800. data/src/cxx_supportlib/vendor-modified/boost/mp11/list.hpp +171 -3
  801. data/src/cxx_supportlib/vendor-modified/boost/mp11/utility.hpp +2 -96
  802. data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
  803. data/src/cxx_supportlib/vendor-modified/boost/mpl/assert.hpp +3 -3
  804. data/src/cxx_supportlib/vendor-modified/boost/next_prior.hpp +3 -44
  805. data/src/cxx_supportlib/vendor-modified/boost/nondet_random.hpp +22 -0
  806. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp +3 -3
  807. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_config.hpp +3 -3
  808. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +2 -2
  809. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +1 -1
  810. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_trivially_copyable_base.hpp +3 -3
  811. data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +2 -2
  812. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/tag_keyword_arg_ref.hpp +2 -2
  813. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/unmatched_argument.hpp +1 -1
  814. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/overloads.hpp +1 -1
  815. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/tag.hpp +4 -4
  816. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/unwrap_cv_reference.hpp +1 -1
  817. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/void.hpp +1 -1
  818. data/src/cxx_supportlib/vendor-modified/boost/parameter/binding.hpp +3 -3
  819. data/src/cxx_supportlib/vendor-modified/boost/parameter/match.hpp +1 -1
  820. data/src/cxx_supportlib/vendor-modified/boost/parameter/template_keyword.hpp +1 -1
  821. data/src/cxx_supportlib/vendor-modified/boost/parameter/value_type.hpp +3 -3
  822. data/src/cxx_supportlib/vendor-modified/boost/pool/simple_segregated_storage.hpp +13 -0
  823. data/src/cxx_supportlib/vendor-modified/boost/ratio/config.hpp +7 -2
  824. data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/requires_cxx11.hpp +22 -0
  825. data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/plus.hpp +1 -1
  826. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +7 -7
  827. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/icu.hpp +9 -9
  828. data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_workaround.hpp +7 -7
  829. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +1 -0
  830. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/requires_cxx11.hpp +23 -0
  831. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp +1 -1
  832. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/yield_k.hpp +4 -6
  833. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/enable_shared_from_this.hpp +1 -0
  834. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +2 -0
  835. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared.hpp +1 -0
  836. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_array.hpp +1 -0
  837. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +1 -0
  838. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +1 -0
  839. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +1 -0
  840. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +2 -0
  841. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +1 -0
  842. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/weak_ptr.hpp +1 -0
  843. data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +4 -1
  844. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category.hpp +10 -2
  845. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category_impl.hpp +11 -26
  846. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_code.hpp +13 -2
  847. data/src/cxx_supportlib/vendor-modified/boost/system/detail/mutex.hpp +121 -0
  848. data/src/cxx_supportlib/vendor-modified/boost/system/detail/requires_cxx11.hpp +21 -0
  849. data/src/cxx_supportlib/vendor-modified/boost/system/detail/std_category.hpp +13 -8
  850. data/src/cxx_supportlib/vendor-modified/boost/throw_exception.hpp +2 -2
  851. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_swappable_cxx_11.hpp +70 -0
  852. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_integral.hpp +3 -0
  853. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_swappable.hpp +4 -24
  854. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_swappable.hpp +92 -0
  855. data/src/cxx_supportlib/vendor-modified/boost/typeof/detail/requires_cxx11.hpp +18 -0
  856. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/functional.hpp +6 -1
  857. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/memory.hpp +6 -1
  858. data/src/cxx_supportlib/vendor-modified/boost/typeof/typeof.hpp +1 -0
  859. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map.hpp +818 -0
  860. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map_fwd.hpp +54 -0
  861. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/concurrent_table.hpp +1324 -0
  862. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/{foa.hpp → foa/core.hpp} +901 -703
  863. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/element_type.hpp +60 -0
  864. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/flat_map_types.hpp +73 -0
  865. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/flat_set_types.hpp +44 -0
  866. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/ignore_wshadow.hpp +35 -0
  867. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_handle.hpp +210 -0
  868. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_map_types.hpp +132 -0
  869. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_set_types.hpp +95 -0
  870. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/restore_wshadow.hpp +11 -0
  871. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/rw_spinlock.hpp +179 -0
  872. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/table.hpp +556 -0
  873. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/tuple_rotate_right.hpp +52 -0
  874. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fwd.hpp +86 -0
  875. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +24 -93
  876. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/mulx.hpp +129 -0
  877. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/narrow_cast.hpp +44 -0
  878. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/prime_fmod.hpp +2 -7
  879. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/requires_cxx11.hpp +21 -0
  880. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/type_traits.hpp +15 -2
  881. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +111 -62
  882. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map_fwd.hpp +0 -1
  883. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +29 -23
  884. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set_fwd.hpp +0 -1
  885. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +192 -12
  886. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +0 -1
  887. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map.hpp +884 -0
  888. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map_fwd.hpp +48 -0
  889. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set.hpp +688 -0
  890. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set_fwd.hpp +48 -0
  891. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +35 -0
  892. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +0 -1
  893. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  894. data/src/cxx_supportlib/vendor-modified/modp_b64_strict_aliasing.cpp +1 -1
  895. data/src/helper-scripts/wsgi-loader.py +34 -17
  896. data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +3 -1
  897. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +5 -3
  898. data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +3 -1
  899. data/src/ruby_supportlib/phusion_passenger/ruby_core_enhancements.rb +5 -0
  900. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  901. metadata +72 -15
  902. data/src/cxx_supportlib/vendor-modified/boost/container/detail/hash_table.hpp +0 -1278
  903. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_tuple.hpp +0 -133
  904. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp +0 -51
  905. data/src/cxx_supportlib/vendor-modified/boost/type_index/stl_type_index.hpp +0 -278
  906. data/src/cxx_supportlib/vendor-modified/boost/type_index/type_index_facade.hpp +0 -297
  907. data/src/cxx_supportlib/vendor-modified/boost/type_index.hpp +0 -265
@@ -1,6 +1,7 @@
1
- /* Fast open-addressing hash table.
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 BOOST_UNORDERED_DETAIL_FOA_HPP
12
- #define BOOST_UNORDERED_DETAIL_FOA_HPP
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/xmx.hpp>
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(__SSE2__)||\
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
- #include <emmintrin.h>
41
- #elif defined(__ARM_NEON)&&!defined(__ARM_BIG_ENDIAN)
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 const std::size_t default_bucket_count = 0;
147
+ static constexpr std::size_t default_bucket_count=0;
76
148
 
77
- /* foa::table is an open-addressing hash table serving as the foundational core
78
- * of boost::unordered_flat_[map|set]. Its main internal design aspects are:
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
- * group15 has no user-defined ctor so that it's a trivial type and can be
132
- * initialized via memset etc. Where needed, group15::initialize sets the
133
- * metadata to all zeros.
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 int N=15;
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(){m=_mm_setzero_si128();}
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(m,_mm_set1_epi32(match_word(hash))))&0x7FFF;
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(m,_mm_setzero_si128()))&0x7FFF;
293
+ _mm_cmpeq_epi8(load_metadata(),_mm_setzero_si128()))&0x7FFF;
210
294
  }
211
295
 
212
- inline int match_occupied()const
296
+ inline bool is_occupied(std::size_t pos)const
213
297
  {
214
- return (~match_available())&0x7FFF;
298
+ BOOST_ASSERT(pos<N);
299
+ return at(pos)!=available_;
215
300
  }
216
301
 
217
- inline int match_really_occupied()const /* excluding sentinel */
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 at(N-1)==sentinel_?match_occupied()&0x3FFF:match_occupied();
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
- #if defined(__MSVC_RUNTIME_CHECKS)
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
- #if defined(__MSVC_RUNTIME_CHECKS)
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 unsigned char& at(std::size_t pos)
382
+ inline slot_type& at(std::size_t pos)
281
383
  {
282
- return reinterpret_cast<unsigned char*>(&m)[pos];
384
+ return m[pos];
283
385
  }
284
386
 
285
- inline unsigned char at(std::size_t pos)const
387
+ inline const slot_type& at(std::size_t pos)const
286
388
  {
287
- return reinterpret_cast<const unsigned char*>(&m)[pos];
389
+ return m[pos];
288
390
  }
289
391
 
290
- inline unsigned char& overflow()
392
+ inline slot_type& overflow()
291
393
  {
292
394
  return at(N);
293
395
  }
294
396
 
295
- inline unsigned char overflow()const
397
+ inline const slot_type& overflow()const
296
398
  {
297
399
  return at(N);
298
400
  }
299
401
 
300
- alignas(16) __m128i m;
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 int N=15;
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(){m=vdupq_n_s8(0);}
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
- vceqq_s8(m,vdupq_n_s8(reduced_hash(hash))))&0x7FFF;
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(vceqq_s8(m,vdupq_n_s8(0)))&0x7FFF;
483
+ return simde_mm_movemask_epi8(vceqq_u8(
484
+ load_metadata(),vdupq_n_u8(0)))&0x7FFF;
372
485
  }
373
486
 
374
- inline int match_occupied()const
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 simde_mm_movemask_epi8(
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 match_really_occupied()const /* excluding sentinel */
498
+ inline int match_occupied()const
381
499
  {
382
- return at(N-1)==sentinel_?match_occupied()&0x3FFF:match_occupied();
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 unsigned char& at(std::size_t pos)
576
+ inline slot_type& at(std::size_t pos)
439
577
  {
440
- return reinterpret_cast<unsigned char*>(&m)[pos];
578
+ return m[pos];
441
579
  }
442
580
 
443
- inline unsigned char at(std::size_t pos)const
581
+ inline const slot_type& at(std::size_t pos)const
444
582
  {
445
- return reinterpret_cast<const unsigned char*>(&m)[pos];
583
+ return m[pos];
446
584
  }
447
585
 
448
- inline unsigned char& overflow()
586
+ inline slot_type& overflow()
449
587
  {
450
588
  return at(N);
451
589
  }
452
590
 
453
- inline unsigned char overflow()const
591
+ inline const slot_type& overflow()const
454
592
  {
455
593
  return at(N);
456
594
  }
457
595
 
458
- alignas(16) int8x16_t m;
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 int N=15;
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
- #if defined(__MSVC_RUNTIME_CHECKS)
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 int match_occupied()const
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
- #if defined(__MSVC_RUNTIME_CHECKS)
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 match_really_occupied()const /* excluding sentinel */
687
+ inline int match_occupied()const
557
688
  {
558
- return ~(match_impl(0)|match_impl(1))&0x7FFF;
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
- #if defined(__MSVC_RUNTIME_CHECKS)
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(boost::uint64_t& x,std::size_t pos,std::size_t n)
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) boost::uint64_t m[2];
779
+ alignas(16) word_type m[2];
647
780
  };
648
781
 
649
782
  #endif
650
783
 
651
- /* foa::table uses a size policy to obtain the permissible sizes of the group
652
- * array (and, by implication, the element array) and to do the hash->group
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 xmx_mix uses the
740
- * xmx function defined in <boost/unordered/detail/xmx.hpp>.
741
- * foa::table mixes hash results with xmx_mix unless the hash is marked as
742
- * avalanching, i.e. of good quality (see <boost/unordered/hash_traits.hpp>).
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 xmx_mix
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 xmx(h(x));
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 alloc_traits=boost::allocator_traits<Allocator>;
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
- arrays.elements=
934
- boost::to_address(alloc_traits::allocate(al,buffer_size(groups_size)));
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
- /* memset is faster/not slower than initializing groups individually.
946
- * This assumes all zeros is group_type's default layout.
947
- */
948
-
949
- std::memset(arrays.groups,0,sizeof(group_type)*groups_size);
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 alloc_traits=boost::allocator_traits<Allocator>;
959
- using pointer=typename alloc_traits::pointer;
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
- alloc_traits::deallocate(
964
- al,pointer_traits::pointer_to(*arrays.elements),
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
- inline void prefetch(const void* p)
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
- #if defined(BOOST_GCC)
1026
- /* GCC's -Wshadow triggers at scenarios like this:
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
- #pragma GCC diagnostic push
1044
- #pragma GCC diagnostic ignored "-Wshadow"
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
- #if defined(BOOST_MSVC)
1048
- #pragma warning(push)
1049
- #pragma warning(disable:4714) /* marked as __forceinline not inlined */
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
- #if BOOST_WORKAROUND(BOOST_MSVC,<=1900)
1053
- /* VS2015 marks as unreachable generic catch clauses around non-throwing
1054
- * code.
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
- #pragma warning(push)
1057
- #pragma warning(disable:4702)
1058
- #endif
1122
+ static constexpr float mlf=0.875f;
1059
1123
 
1060
- /* foa::table interface departs in a number of ways from that of C++ unordered
1061
- * associative containers because it's not for end-user consumption
1062
- * (boost::unordered_flat_[map|set] wrappers complete it as appropriate) and,
1063
- * more importantly, because of fundamental restrictions imposed by open
1064
- * addressing:
1065
- *
1066
- * - value_type must be moveable.
1067
- * - Pointer stability is not kept under rehashing.
1068
- * - begin() is not O(1).
1069
- * - No bucket API.
1070
- * - Load factor is fixed and can't be set by the user.
1071
- * - No extract API.
1072
- *
1073
- * The TypePolicy template parameter is used to generate instantiations
1074
- * suitable for either maps or sets, and introduces non-standard init_type:
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
- * - TypePolicy::move(value_type&) returns a temporary object for value
1085
- * transfer on rehashing, move copy/assignment, and merge. For maps, this
1086
- * object is a std::pair<Key&&,T&&>, which is generally cheaper to move
1087
- * than std::pair<const Key,T>&& because of the constness in Key.
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
- * try_emplace, erase and find support heterogenous lookup by default, that is,
1093
- * without checking for any ::is_transparent typedefs --the checking is done by
1094
- * boost::unordered_flat_[map|set].
1095
- *
1096
- * At the moment, we're not supporting allocators with fancy pointers.
1097
- * Allocator::pointer must be convertible to/from regular pointers.
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
- /* We pull this out so the tests don't have to rely on a magic constant or
1101
- * instantiate the table class template as it can be quite gory.
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
- constexpr static float const mlf = 0.875f;
1231
+ #pragma warning(push)
1232
+ #pragma warning(disable:4702)
1233
+ #endif
1104
1234
 
1105
- template<typename TypePolicy,typename Hash,typename Pred,typename Allocator>
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
- table:empty_value<Hash,0>,empty_value<Pred,1>,empty_value<Allocator,2>
1245
+ table_core:empty_value<Hash,0>,empty_value<Pred,1>,empty_value<Allocator,2>
1113
1246
  {
1114
- using hash_base=empty_value<Hash,0>;
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=group15;
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
- xmx_mix
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 const_iterator=table_iterator<value_type,group_type,true>;
1149
- using iterator=typename std::conditional<
1150
- has_mutable_iterator,
1151
- table_iterator<value_type,group_type,false>,
1152
- const_iterator>::type;
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_},size_{0},arrays(new_arrays(n)),
1159
- ml{initial_max_load()}
1281
+ allocator_base{empty_init,al_},arrays(new_arrays(n)),
1282
+ size_ctrl{initial_max_load(),0}
1160
1283
  {}
1161
1284
 
1162
- table(const table& x):
1163
- table{x,alloc_traits::select_on_container_copy_construction(x.al())}{}
1285
+ table_core(const table_core& x):
1286
+ table_core{x,alloc_traits::select_on_container_copy_construction(x.al())}{}
1164
1287
 
1165
- table(table&& x)
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
- size_{x.size_},arrays(x.arrays),ml{x.ml}
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
- table(const table& x,const Allocator& al_):
1181
- table{std::size_t(std::ceil(float(x.size())/mlf)),x.h(),x.pred(),al_}
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.for_all_elements([this](value_type* p){
1184
- unchecked_insert(*p);
1185
- });
1306
+ copy_elements_from(x);
1186
1307
  }
1187
1308
 
1188
- table(table&& x,const Allocator& al_):
1189
- table{0,std::move(x.h()),std::move(x.pred()),al_}
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(size_,x.size_);
1193
- std::swap(arrays,x.arrays);
1194
- std::swap(ml,x.ml);
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](value_type* p){
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
- ~table()noexcept
1331
+ ~table_core()noexcept
1211
1332
  {
1212
- for_all_elements([this](value_type* p){
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
- table& operator=(const table& x)
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
- h()=x.h();
1226
- pred()=x.pred();
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.for_all_elements([this](value_type* p){
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
- table& operator=(table&& x)
1382
+ table_core& operator=(table_core&& x)
1246
1383
  noexcept(
1247
- alloc_traits::is_always_equal::value&&
1248
- std::is_nothrow_move_assignable<Hash>::value&&
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()=std::move(x.h());
1257
- pred()=std::move(x.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(ml,x.ml);
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](value_type* p){
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 size_;}
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
- template<typename... Args>
1308
- BOOST_FORCEINLINE std::pair<iterator,bool> emplace(Args&&... args)
1442
+ BOOST_FORCEINLINE
1443
+ void erase(group_type* pg,unsigned int pos,element_type* p)noexcept
1309
1444
  {
1310
- using emplace_type = typename std::conditional<
1311
- std::is_constructible<
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
- template<typename Key,typename... Args>
1321
- BOOST_FORCEINLINE std::pair<iterator,bool> try_emplace(
1322
- Key&& k,Args&&... args)
1449
+ BOOST_FORCEINLINE
1450
+ void erase(unsigned char* pc,element_type* p)noexcept
1323
1451
  {
1324
- return emplace_impl(
1325
- std::piecewise_construct,
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
- BOOST_FORCEINLINE std::pair<iterator,bool>
1331
- insert(const init_type& x){return emplace_impl(x);}
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
- destroy_element(pos.p);
1357
- recover_slot(pos.pc);
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
- auto erase(Key&& x) -> typename std::enable_if<
1363
- !std::is_convertible<Key,iterator>::value&&
1364
- !std::is_convertible<Key,const_iterator>::value, std::size_t>::type
1365
- {
1366
- auto it=find(x);
1367
- if(it!=end()){
1368
- erase(it);
1369
- return 1;
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
- else return 0;
1494
+ while(BOOST_LIKELY(pb.next(arrays.groups_size_mask)));
1495
+ return {};
1372
1496
  }
1373
1497
 
1374
- void swap(table& x)
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::is_always_equal::value&&
1377
- boost::is_nothrow_swappable<Hash>::value&&
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
- swap(size_,x.size_);
1520
+
1521
+ swap(h(),x.h());
1522
+ swap(pred(),x.pred());
1394
1523
  swap(arrays,x.arrays);
1395
- swap(ml,x.ml);
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=pg->match_really_occupied();
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
- size_=0;
1414
- ml=initial_max_load();
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 (capacity() == 0) { return 0; }
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
- template<typename Predicate>
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 x.erase_if_impl(pr);
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
- private:
1484
- template<typename,typename,typename,typename> friend class table;
1485
- using arrays_type=table_arrays<value_type,group_type,size_policy>;
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
- table& x;
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
- arrays_type new_arrays(std::size_t n)
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
- arrays_type::delete_(al(),arrays_);
1612
+ type_policy::construct(al(),p,std::forward<Args>(args)...);
1508
1613
  }
1509
1614
 
1510
1615
  template<typename... Args>
1511
- void construct_element(value_type* p,Args&&... args)
1616
+ void construct_element(element_type* p,try_emplace_args_t,Args&&... args)
1512
1617
  {
1513
- alloc_traits::construct(al(),p,std::forward<Args>(args)...);
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(value_type* p)noexcept
1624
+ void destroy_element(element_type* p)noexcept
1517
1625
  {
1518
- alloc_traits::destroy(al(),p);
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
- table *this_;
1525
- value_type *p;
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 Arg1,typename Arg2>
1565
- static inline auto key_from(
1566
- std::piecewise_construct_t,const Arg1& k,const Arg2&)
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 std::get<0>(k);
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 void prefetch_elements(const value_type* p)
1667
+ static inline int match_really_occupied(group_type* pg,group_type* last)
1590
1668
  {
1591
- /* We have experimentally confirmed that ARM architectures get a higher
1592
- * speedup when around the first half of the element slots in a group are
1593
- * prefetched, whereas for Intel just the first cache line is best.
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
- #if BOOST_ARCH_ARM
1599
- /* Cache line size can't be known at compile time, so we settle on
1600
- * the very frequent value of 64B.
1601
- */
1602
- constexpr int cache_line=64;
1603
- const char *p0=reinterpret_cast<const char*>(p),
1604
- *p1=p0+sizeof(value_type)*N/2;
1605
- for(;p0<p1;p0+=cache_line)prefetch(p0);
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
- #if defined(BOOST_MSVC)
1612
- /* warning: forcing value to bool 'true' or 'false' in bool(pred()...) */
1613
- #pragma warning(push)
1614
- #pragma warning(disable:4800)
1615
- #endif
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 Key>
1618
- BOOST_FORCEINLINE iterator find_impl(
1619
- const Key& x,std::size_t pos0,std::size_t hash)const
1620
- {
1621
- prober pb(pos0);
1622
- do{
1623
- auto pos=pb.get();
1624
- auto pg=arrays.groups+pos;
1625
- auto mask=pg->match(hash);
1626
- if(mask){
1627
- auto p=arrays.elements+pos*N;
1628
- prefetch_elements(p);
1629
- do{
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(BOOST_LIKELY(bool(pred()(x,key_from(p[n]))))){
1632
- return {pg,n,p+n};
1633
- }
1778
+ if(!f(pg,n,p+n))return false;
1634
1779
  mask&=mask-1;
1635
- }while(mask);
1636
- }
1637
- if(BOOST_LIKELY(pg->is_not_overflowed(hash))){
1638
- return {}; /* end() */
1780
+ }
1639
1781
  }
1640
1782
  }
1641
- while(BOOST_LIKELY(pb.next(arrays.groups_size_mask)));
1642
- return {}; /* end() */
1783
+ return true;
1643
1784
  }
1644
1785
 
1645
- #if defined(BOOST_MSVC)
1646
- #pragma warning(pop) /* C4800 */
1647
- #endif
1786
+ arrays_type arrays;
1787
+ size_ctrl_type size_ctrl;
1648
1788
 
1649
- template<typename... Args>
1650
- BOOST_FORCEINLINE std::pair<iterator,bool> emplace_impl(Args&&... args)
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
- const auto &k=key_from(std::forward<Args>(args)...);
1653
- auto hash=hash_for(k);
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
- if(it!=end()){
1658
- return {it,false};
1659
- }
1660
- if(BOOST_LIKELY(size_<ml)){
1661
- return {
1662
- unchecked_emplace_at(pos0,hash,std::forward<Args>(args)...),
1663
- true
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
- return {
1668
- unchecked_emplace_with_rehash(hash,std::forward<Args>(args)...),
1669
- true
1670
- };
1865
+ x.for_all_elements([this](const element_type* p){
1866
+ unchecked_insert(*p);
1867
+ });
1671
1868
  }
1672
1869
  }
1673
1870
 
1674
- static std::size_t capacity_for(std::size_t n)
1871
+ void fast_copy_elements_from(const table_core& x)
1675
1872
  {
1676
- return size_policy::size(size_index_for<group_type,size_policy>(n))*N-1;
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
- template<typename... Args>
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
- /* Due to the anti-drift mechanism (see recover_slot), new_arrays_ may be
1684
- * of the same size as the old arrays; in the limit, erasing one element at
1685
- * full load and then inserting could bring us back to the same capacity
1686
- * after a costly rehash. To avoid this, we jump to the next capacity level
1687
- * when the number of erased elements is <= 10% of total elements at full
1688
- * load, which is implemented by requesting additional F*size elements,
1689
- * with F = P * 10% / (1 - P * 10%), where P is the probability of an
1690
- * element having caused overflow; P has been measured as ~0.162 under
1691
- * ideal conditions, yielding F ~ 0.0165 ~ 1/61.
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
- auto new_arrays_=new_arrays(std::size_t(
1694
- std::ceil(static_cast<float>(size_+size_/61+1)/mlf)));
1695
- iterator it;
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
- /* strong exception guarantee -> try insertion before rehash */
1698
- it=nosize_unchecked_emplace_at(
1699
- new_arrays_,position_for(hash,new_arrays_),
1700
- hash,std::forward<Args>(args)...);
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
- delete_arrays(new_arrays_);
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
- /* new_arrays_ lifetime taken care of by unchecked_rehash */
1709
- unchecked_rehash(new_arrays_);
1710
- ++size_;
1711
- return it;
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](value_type* p){
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
- for(auto pg=arrays.groups;;++pg){
1731
- auto mask=pg->match_occupied();
1732
- while(mask){
1733
- auto nz=unchecked_countr_zero(mask);
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
- continue_:
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](value_type* p){
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
- value_type* p,const arrays_type& arrays_,std::size_t& num_destroyed)
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::is_copy_constructible<init_type>::value>{});
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
- value_type* p,std::size_t hash,const arrays_type& arrays_,
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
- value_type* p,std::size_t hash,const arrays_type& arrays_,
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 value_type&>(*p));
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
- iterator nosize_unchecked_emplace_at(
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
- #if defined(BOOST_GCC)
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 BOOST_UNORDERED_ASSUME
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