passenger 5.3.3 → 5.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1070) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +8 -0
  3. data/build/support/cxx_dependency_map.rb +151 -83
  4. data/dev/configkit-schemas/index.json +3 -3
  5. data/src/agent/Core/AdminPanelConnector.h +5 -3
  6. data/src/agent/Core/ApplicationPool/Common.h +1 -2
  7. data/src/agent/Core/ApplicationPool/Context.h +1 -2
  8. data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +2 -2
  9. data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +2 -2
  10. data/src/agent/Core/Config.h +1 -1
  11. data/src/agent/Core/Controller.h +2 -1
  12. data/src/agent/Core/Controller/Config.h +6 -5
  13. data/src/agent/Core/Controller/Hooks.cpp +11 -0
  14. data/src/agent/Core/Controller/SendRequest.cpp +7 -7
  15. data/src/agent/Core/CoreMain.cpp +0 -2
  16. data/src/agent/Core/SpawningKit/Context.h +1 -3
  17. data/src/agent/Core/SpawningKit/Handshake/BackgroundIOCapturer.h +2 -2
  18. data/src/agent/Core/SpawningKit/Handshake/Perform.h +2 -2
  19. data/src/agent/Core/SpawningKit/Handshake/Prepare.h +17 -38
  20. data/src/agent/Core/SpawningKit/PipeWatcher.h +5 -3
  21. data/src/agent/Core/SpawningKit/UserSwitchingRules.h +13 -5
  22. data/src/agent/Shared/ApiServerUtils.h +2 -2
  23. data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +33 -18
  24. data/src/agent/Watchdog/Config.h +1 -1
  25. data/src/agent/Watchdog/WatchdogMain.cpp +20 -20
  26. data/src/apache2_module/Config.cpp +7 -6
  27. data/src/cxx_supportlib/ConfigKit/Store.h +2 -2
  28. data/src/cxx_supportlib/Constants.h +1 -1
  29. data/src/cxx_supportlib/Exceptions.h +0 -1
  30. data/src/cxx_supportlib/FileTools/PathSecurityCheck.cpp +3 -2
  31. data/src/cxx_supportlib/ResourceLocator.h +3 -21
  32. data/src/cxx_supportlib/SafeLibev.h +6 -6
  33. data/src/cxx_supportlib/ServerKit/Channel.h +2 -2
  34. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +3 -3
  35. data/src/cxx_supportlib/ServerKit/FileBufferedFdSinkChannel.h +2 -2
  36. data/src/cxx_supportlib/ServerKit/HttpServer.h +27 -15
  37. data/src/cxx_supportlib/ServerKit/Server.h +2 -2
  38. data/src/cxx_supportlib/SystemTools/README.md +1 -0
  39. data/src/cxx_supportlib/SystemTools/UserDatabase.cpp +222 -0
  40. data/src/cxx_supportlib/SystemTools/UserDatabase.h +151 -0
  41. data/src/cxx_supportlib/Utils.cpp +1 -113
  42. data/src/cxx_supportlib/Utils.h +1 -29
  43. data/src/cxx_supportlib/Utils/MessagePassing.h +3 -3
  44. data/src/cxx_supportlib/WatchdogLauncher.h +1 -2
  45. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/case_conv.hpp +6 -2
  46. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/find_iterator.hpp +1 -1
  47. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/util.hpp +3 -2
  48. data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +31 -1
  49. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_allocator.hpp +133 -0
  50. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_executor.hpp +151 -0
  51. data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +149 -22
  52. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +140 -49
  53. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +145 -35
  54. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_io_object.hpp +75 -41
  55. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +139 -49
  56. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +98 -45
  57. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +42 -49
  58. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +45 -38
  59. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +349 -109
  60. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +959 -108
  61. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_iostream.hpp +198 -54
  62. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_streambuf.hpp +424 -284
  63. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +116 -47
  64. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf.hpp +99 -16
  65. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf_fwd.hpp +4 -1
  66. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +235 -49
  67. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +613 -0
  68. data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +1139 -1216
  69. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream.hpp +27 -14
  70. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream_fwd.hpp +1 -1
  71. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream.hpp +26 -6
  72. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream_fwd.hpp +1 -1
  73. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream.hpp +27 -14
  74. data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream_fwd.hpp +1 -1
  75. data/src/cxx_supportlib/vendor-modified/boost/asio/buffers_iterator.hpp +61 -21
  76. data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +1 -1
  77. data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +462 -226
  78. data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +7 -7
  79. data/src/cxx_supportlib/vendor-modified/boost/asio/datagram_socket_service.hpp +94 -64
  80. data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer.hpp +1 -1
  81. data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer_service.hpp +20 -18
  82. data/src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp +109 -0
  83. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array.hpp +1 -1
  84. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array_fwd.hpp +1 -1
  85. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/assert.hpp +1 -1
  86. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/atomic_count.hpp +1 -1
  87. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_completion_cond.hpp +1 -1
  88. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +404 -77
  89. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_resize_guard.hpp +1 -1
  90. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_sequence_adapter.hpp +212 -51
  91. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +1 -1
  92. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/call_stack.hpp +2 -2
  93. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono.hpp +68 -0
  94. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono_time_traits.hpp +1 -1
  95. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_handler.hpp +8 -6
  96. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/concurrency_hint.hpp +94 -0
  97. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_event.hpp +114 -0
  98. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_mutex.hpp +151 -0
  99. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +398 -13
  100. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/consuming_buffers.hpp +287 -165
  101. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstddef.hpp +33 -0
  102. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstdint.hpp +15 -1
  103. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/date_time_fwd.hpp +1 -1
  104. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +65 -14
  105. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dependent_type.hpp +1 -1
  106. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_ops.hpp +5 -1
  107. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_read_op.hpp +17 -8
  108. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_write_op.hpp +17 -8
  109. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dev_poll_reactor.hpp +27 -15
  110. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/epoll_reactor.hpp +41 -17
  111. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/event.hpp +1 -1
  112. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/eventfd_select_interrupter.hpp +1 -1
  113. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_op.hpp +86 -0
  114. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fd_set_adapter.hpp +1 -1
  115. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fenced_block.hpp +1 -1
  116. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/{function.hpp → functional.hpp} +10 -10
  117. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_arm_fenced_block.hpp +3 -1
  118. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_hppa_fenced_block.hpp +3 -1
  119. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_sync_fenced_block.hpp +3 -1
  120. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_x86_fenced_block.hpp +3 -1
  121. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/global.hpp +54 -0
  122. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +158 -3
  123. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_cont_helpers.hpp +2 -2
  124. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_invoke_helpers.hpp +2 -2
  125. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_tracking.hpp +90 -9
  126. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_type_requirements.hpp +117 -39
  127. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_work.hpp +97 -0
  128. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/hash_map.hpp +1 -1
  129. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/buffer_sequence_adapter.ipp +6 -6
  130. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +24 -1
  131. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.hpp +17 -4
  132. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +34 -18
  133. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.hpp +17 -4
  134. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.ipp +152 -51
  135. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/eventfd_select_interrupter.ipp +1 -1
  136. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +80 -27
  137. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.hpp +19 -6
  138. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.ipp +93 -23
  139. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/null_event.ipp +76 -0
  140. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/pipe_select_interrupter.ipp +1 -1
  141. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_event.ipp +13 -1
  142. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_mutex.ipp +1 -1
  143. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_thread.ipp +11 -1
  144. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_tss_ptr.ipp +1 -1
  145. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +27 -13
  146. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_serial_port_service.ipp +7 -6
  147. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +43 -10
  148. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/resolver_service_base.ipp +54 -30
  149. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/{task_io_service.ipp → scheduler.ipp} +167 -70
  150. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.hpp +17 -4
  151. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +46 -26
  152. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.hpp +36 -30
  153. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.ipp +39 -30
  154. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/signal_set_service.ipp +43 -21
  155. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +129 -26
  156. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +1 -1
  157. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.hpp +181 -0
  158. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.ipp +136 -0
  159. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.hpp +13 -13
  160. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.ipp +15 -14
  161. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/throw_error.ipp +1 -1
  162. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_ptime.ipp +12 -5
  163. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_set.ipp +1 -1
  164. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_control.hpp +1 -51
  165. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_buffer_sequence.hpp +241 -0
  166. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_executor.hpp +128 -0
  167. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/keyword_tss_ptr.hpp +1 -1
  168. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/kqueue_reactor.hpp +36 -14
  169. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/local_free_on_block_exit.hpp +1 -1
  170. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/macos_fenced_block.hpp +2 -1
  171. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +42 -1
  172. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/mutex.hpp +1 -1
  173. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/noncopyable.hpp +1 -1
  174. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_event.hpp +17 -5
  175. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_fenced_block.hpp +3 -1
  176. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_global.hpp +61 -0
  177. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_mutex.hpp +1 -1
  178. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_reactor.hpp +10 -9
  179. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_signal_blocker.hpp +1 -1
  180. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_socket_service.hpp +29 -19
  181. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_static_mutex.hpp +1 -1
  182. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_thread.hpp +7 -1
  183. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_tss_ptr.hpp +1 -1
  184. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/object_pool.hpp +26 -1
  185. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/old_win_sdk_compat.hpp +1 -1
  186. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/op_queue.hpp +7 -1
  187. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/operation.hpp +3 -3
  188. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pipe_select_interrupter.hpp +1 -1
  189. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pop_options.hpp +5 -1
  190. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_event.hpp +37 -1
  191. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_fd_set_adapter.hpp +1 -1
  192. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_global.hpp +82 -0
  193. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_mutex.hpp +1 -1
  194. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_signal_blocker.hpp +1 -1
  195. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_static_mutex.hpp +1 -1
  196. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_thread.hpp +5 -1
  197. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_tss_ptr.hpp +1 -1
  198. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/push_options.hpp +10 -1
  199. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +86 -20
  200. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_null_buffers_op.hpp +9 -7
  201. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_serial_port_service.hpp +10 -8
  202. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_accept_op.hpp +101 -20
  203. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_connect_op.hpp +14 -7
  204. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recv_op.hpp +20 -8
  205. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvfrom_op.hpp +13 -8
  206. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvmsg_op.hpp +15 -8
  207. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +25 -11
  208. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_sendto_op.hpp +15 -8
  209. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +99 -31
  210. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +96 -35
  211. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_wait_op.hpp +92 -0
  212. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor.hpp +2 -2
  213. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_fwd.hpp +2 -2
  214. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op.hpp +7 -3
  215. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op_queue.hpp +1 -1
  216. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/recycling_allocator.hpp +106 -0
  217. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/regex_fwd.hpp +1 -1
  218. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +25 -24
  219. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_op.hpp +6 -92
  220. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_query_op.hpp +136 -0
  221. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service.hpp +38 -22
  222. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service_base.hpp +30 -19
  223. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/{task_io_service.hpp → scheduler.hpp} +57 -45
  224. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/{task_io_service_operation.hpp → scheduler_operation.hpp} +19 -17
  225. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/{task_io_service_thread_info.hpp → scheduler_thread_info.hpp} +10 -10
  226. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_lock.hpp +1 -1
  227. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_ptr.hpp +9 -1
  228. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_interrupter.hpp +1 -1
  229. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_reactor.hpp +37 -18
  230. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/service_registry.hpp +54 -34
  231. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_blocker.hpp +1 -1
  232. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_handler.hpp +9 -5
  233. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_init.hpp +1 -1
  234. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_op.hpp +1 -1
  235. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_set_service.hpp +14 -13
  236. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_holder.hpp +1 -1
  237. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_ops.hpp +9 -6
  238. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_option.hpp +1 -1
  239. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_select_interrupter.hpp +1 -1
  240. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_types.hpp +10 -2
  241. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/solaris_fenced_block.hpp +2 -1
  242. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/static_mutex.hpp +1 -1
  243. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_event.hpp +1 -1
  244. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_fenced_block.hpp +1 -1
  245. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_global.hpp +72 -0
  246. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_mutex.hpp +1 -1
  247. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_static_mutex.hpp +1 -1
  248. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_thread.hpp +7 -1
  249. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_executor_service.hpp +144 -0
  250. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_service.hpp +10 -10
  251. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/string_view.hpp +49 -0
  252. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread.hpp +9 -5
  253. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_context.hpp +44 -0
  254. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_group.hpp +91 -0
  255. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +45 -15
  256. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_error.hpp +1 -1
  257. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_exception.hpp +1 -1
  258. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue.hpp +29 -2
  259. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_base.hpp +1 -1
  260. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_ptime.hpp +11 -5
  261. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_set.hpp +1 -1
  262. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler.hpp +2 -2
  263. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler_fwd.hpp +2 -2
  264. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/tss_ptr.hpp +1 -1
  265. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/type_traits.hpp +29 -1
  266. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/variadic_templates.hpp +74 -18
  267. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_handler.hpp +8 -6
  268. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_op.hpp +1 -1
  269. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/winsock_init.hpp +1 -1
  270. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/work_dispatcher.hpp +74 -0
  271. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +1 -1
  272. data/src/cxx_supportlib/vendor-modified/boost/asio/dispatch.hpp +110 -0
  273. data/src/cxx_supportlib/vendor-modified/boost/asio/error.hpp +17 -1
  274. data/src/cxx_supportlib/vendor-modified/boost/asio/execution_context.hpp +413 -0
  275. data/src/cxx_supportlib/vendor-modified/boost/asio/executor.hpp +343 -0
  276. data/src/cxx_supportlib/vendor-modified/boost/asio/executor_work_guard.hpp +172 -0
  277. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental.hpp +22 -0
  278. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_spawn.hpp +228 -0
  279. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detached.hpp +67 -0
  280. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/co_spawn.hpp +878 -0
  281. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/detached.hpp +93 -0
  282. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/redirect_error.hpp +296 -0
  283. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/redirect_error.hpp +69 -0
  284. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/basic_endpoint.hpp +1 -1
  285. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/datagram_protocol.hpp +1 -1
  286. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/endpoint.hpp +1 -1
  287. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/impl/endpoint.ipp +3 -2
  288. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/raw_protocol.hpp +1 -1
  289. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/seq_packet_protocol.hpp +1 -1
  290. data/src/cxx_supportlib/vendor-modified/boost/asio/generic/stream_protocol.hpp +1 -1
  291. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_alloc_hook.hpp +1 -1
  292. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_continuation_hook.hpp +1 -1
  293. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_invoke_hook.hpp +4 -4
  294. data/src/cxx_supportlib/vendor-modified/boost/asio/handler_type.hpp +11 -73
  295. data/src/cxx_supportlib/vendor-modified/boost/asio/high_resolution_timer.hpp +4 -23
  296. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +86 -15
  297. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +92 -19
  298. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +549 -119
  299. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/defer.hpp +79 -0
  300. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/dispatch.hpp +80 -0
  301. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/error.ipp +1 -1
  302. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.hpp +109 -0
  303. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.ipp +84 -0
  304. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.hpp +388 -0
  305. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.ipp +40 -0
  306. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +7 -32
  307. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.hpp +347 -0
  308. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.ipp +176 -0
  309. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/post.hpp +79 -0
  310. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +341 -379
  311. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +173 -343
  312. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +559 -206
  313. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.hpp +1 -1
  314. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.ipp +30 -30
  315. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +254 -72
  316. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.cpp +1 -1
  317. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +12 -4
  318. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.hpp +36 -0
  319. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.ipp +75 -0
  320. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_executor.hpp +87 -0
  321. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.hpp +129 -0
  322. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.ipp +78 -0
  323. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +855 -94
  324. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +358 -449
  325. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +165 -418
  326. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context.hpp +878 -0
  327. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context_strand.hpp +386 -0
  328. data/src/cxx_supportlib/vendor-modified/boost/asio/io_service.hpp +6 -743
  329. data/src/cxx_supportlib/vendor-modified/boost/asio/io_service_strand.hpp +20 -0
  330. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address.hpp +79 -19
  331. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4.hpp +111 -23
  332. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_iterator.hpp +164 -0
  333. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_range.hpp +136 -0
  334. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6.hpp +104 -14
  335. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_iterator.hpp +185 -0
  336. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_range.hpp +131 -0
  337. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/bad_address_cast.hpp +50 -0
  338. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_endpoint.hpp +5 -5
  339. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +821 -71
  340. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_entry.hpp +23 -4
  341. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_iterator.hpp +31 -99
  342. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_query.hpp +1 -1
  343. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_results.hpp +313 -0
  344. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/endpoint.hpp +2 -2
  345. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/impl/endpoint.ipp +5 -10
  346. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +16 -19
  347. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/host_name.hpp +1 -1
  348. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/icmp.hpp +1 -1
  349. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.hpp +28 -14
  350. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.ipp +55 -47
  351. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.hpp +28 -14
  352. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.ipp +76 -44
  353. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.hpp +28 -14
  354. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +85 -33
  355. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/basic_endpoint.hpp +2 -14
  356. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/host_name.ipp +1 -1
  357. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.hpp +56 -0
  358. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.ipp +218 -0
  359. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.hpp +55 -0
  360. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.ipp +187 -0
  361. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/multicast.hpp +8 -8
  362. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v4.hpp +263 -0
  363. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v6.hpp +237 -0
  364. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_base.hpp +131 -0
  365. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_query_base.hpp +3 -90
  366. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_service.hpp +48 -24
  367. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/tcp.hpp +3 -3
  368. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/udp.hpp +1 -1
  369. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/unicast.hpp +3 -3
  370. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/v6_only.hpp +3 -3
  371. data/src/cxx_supportlib/vendor-modified/boost/asio/is_executor.hpp +48 -0
  372. data/src/cxx_supportlib/vendor-modified/boost/asio/is_read_buffered.hpp +1 -1
  373. data/src/cxx_supportlib/vendor-modified/boost/asio/is_write_buffered.hpp +1 -1
  374. data/src/cxx_supportlib/vendor-modified/boost/asio/local/basic_endpoint.hpp +1 -1
  375. data/src/cxx_supportlib/vendor-modified/boost/asio/local/connect_pair.hpp +23 -21
  376. data/src/cxx_supportlib/vendor-modified/boost/asio/local/datagram_protocol.hpp +1 -1
  377. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/endpoint.hpp +1 -1
  378. data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/impl/endpoint.ipp +3 -2
  379. data/src/cxx_supportlib/vendor-modified/boost/asio/local/stream_protocol.hpp +1 -1
  380. data/src/cxx_supportlib/vendor-modified/boost/asio/packaged_task.hpp +128 -0
  381. data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +30 -2
  382. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +138 -46
  383. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +15 -15
  384. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor.hpp +646 -0
  385. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor_base.hpp +17 -24
  386. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor.hpp +326 -3
  387. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor_service.hpp +63 -44
  388. data/src/cxx_supportlib/vendor-modified/boost/asio/post.hpp +109 -0
  389. data/src/cxx_supportlib/vendor-modified/boost/asio/raw_socket_service.hpp +94 -64
  390. data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +328 -12
  391. data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +13 -6
  392. data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +1148 -247
  393. data/src/cxx_supportlib/vendor-modified/boost/asio/seq_packet_socket_service.hpp +88 -56
  394. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port.hpp +736 -3
  395. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_base.hpp +11 -11
  396. data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_service.hpp +41 -45
  397. data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set.hpp +422 -3
  398. data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set_service.hpp +32 -24
  399. data/src/cxx_supportlib/vendor-modified/boost/asio/socket_acceptor_service.hpp +114 -48
  400. data/src/cxx_supportlib/vendor-modified/boost/asio/socket_base.hpp +85 -46
  401. data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +89 -18
  402. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl.hpp +1 -4
  403. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context.hpp +33 -62
  404. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_base.hpp +1 -1
  405. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/buffered_handshake_op.hpp +27 -23
  406. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/engine.hpp +10 -14
  407. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/handshake_op.hpp +2 -8
  408. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/engine.ipp +22 -25
  409. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +5 -4
  410. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +40 -17
  411. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_init.hpp +2 -2
  412. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_types.hpp +1 -1
  413. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/password_callback.hpp +4 -10
  414. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/read_op.hpp +3 -9
  415. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/shutdown_op.hpp +2 -8
  416. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/stream_core.hpp +27 -19
  417. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/verify_callback.hpp +2 -8
  418. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/write_op.hpp +3 -9
  419. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/error.hpp +1 -1
  420. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.hpp +8 -12
  421. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +86 -102
  422. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/error.ipp +1 -1
  423. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/rfc2818_verification.ipp +7 -13
  424. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/src.hpp +1 -1
  425. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/rfc2818_verification.hpp +7 -13
  426. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +90 -85
  427. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_base.hpp +1 -1
  428. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_context.hpp +3 -9
  429. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_mode.hpp +1 -1
  430. data/src/cxx_supportlib/vendor-modified/boost/asio/steady_timer.hpp +4 -23
  431. data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +209 -175
  432. data/src/cxx_supportlib/vendor-modified/boost/asio/stream_socket_service.hpp +88 -56
  433. data/src/cxx_supportlib/vendor-modified/boost/asio/streambuf.hpp +1 -1
  434. data/src/cxx_supportlib/vendor-modified/boost/asio/system_context.hpp +80 -0
  435. data/src/cxx_supportlib/vendor-modified/boost/asio/system_executor.hpp +131 -0
  436. data/src/cxx_supportlib/vendor-modified/boost/asio/system_timer.hpp +4 -19
  437. data/src/cxx_supportlib/vendor-modified/boost/asio/thread_pool.hpp +234 -0
  438. data/src/cxx_supportlib/vendor-modified/boost/asio/time_traits.hpp +1 -1
  439. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/buffer.hpp +24 -0
  440. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/executor.hpp +35 -0
  441. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/internet.hpp +40 -0
  442. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/io_context.hpp +20 -0
  443. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/net.hpp +26 -0
  444. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/netfwd.hpp +199 -0
  445. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/socket.hpp +27 -0
  446. data/src/cxx_supportlib/vendor-modified/boost/asio/ts/timer.hpp +26 -0
  447. data/src/cxx_supportlib/vendor-modified/boost/asio/unyield.hpp +1 -1
  448. data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +70 -3
  449. data/src/cxx_supportlib/vendor-modified/boost/asio/uses_executor.hpp +73 -0
  450. data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +2 -2
  451. data/src/cxx_supportlib/vendor-modified/boost/asio/wait_traits.hpp +17 -2
  452. data/src/cxx_supportlib/vendor-modified/boost/asio/waitable_timer_service.hpp +62 -20
  453. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_handle.hpp +22 -30
  454. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +14 -10
  455. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +15 -15
  456. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +15 -15
  457. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle.hpp +346 -3
  458. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle_service.hpp +26 -20
  459. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_handle.hpp +333 -0
  460. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_ptr.hpp +6 -6
  461. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle.hpp +344 -3
  462. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle_service.hpp +31 -37
  463. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle.hpp +328 -3
  464. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle_service.hpp +29 -37
  465. data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +321 -12
  466. data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +13 -6
  467. data/src/cxx_supportlib/vendor-modified/boost/asio/yield.hpp +1 -1
  468. data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic.hpp +11 -0
  469. data/src/cxx_supportlib/vendor-modified/boost/atomic/capabilities.hpp +50 -1
  470. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/addressof.hpp +58 -0
  471. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_flag.hpp +1 -0
  472. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_template.hpp +688 -220
  473. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +25 -21
  474. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_fp_cast.hpp +86 -0
  475. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_arm.hpp +1 -18
  476. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_atomic.hpp +9 -10
  477. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_ppc.hpp +2 -1
  478. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_sync.hpp +7 -8
  479. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_x86.hpp +1 -36
  480. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +108 -34
  481. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_operations.hpp +28 -0
  482. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_operations_fwd.hpp +35 -0
  483. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_ops_emulated.hpp +107 -0
  484. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_ops_generic.hpp +189 -0
  485. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_operations.hpp +28 -0
  486. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_operations_fwd.hpp +35 -0
  487. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_emulated.hpp +238 -0
  488. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_arm.hpp +1111 -0
  489. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_ppc.hpp +840 -0
  490. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_gcc_x86.hpp +1656 -0
  491. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_generic.hpp +402 -0
  492. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_msvc_arm.hpp +106 -0
  493. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_msvc_x86.hpp +1301 -0
  494. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/float_sizes.hpp +142 -0
  495. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_operations.hpp +28 -0
  496. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_operations_fwd.hpp +35 -0
  497. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_ops_emulated.hpp +72 -0
  498. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_ops_generic.hpp +83 -0
  499. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/hwcaps_gcc_arm.hpp +67 -0
  500. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/hwcaps_gcc_ppc.hpp +42 -0
  501. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/hwcaps_gcc_x86.hpp +58 -0
  502. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/int_sizes.hpp +3 -3
  503. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/integral_extend.hpp +105 -0
  504. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/interlocked.hpp +35 -1
  505. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/operations_lockfree.hpp +1 -1
  506. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_cas_based.hpp +2 -0
  507. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_emulated.hpp +8 -9
  508. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_extending_cas_based.hpp +8 -7
  509. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_alpha.hpp +14 -16
  510. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_arm.hpp +548 -126
  511. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_arm_common.hpp +134 -0
  512. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_atomic.hpp +36 -44
  513. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_ppc.hpp +524 -96
  514. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_ppc_common.hpp +70 -0
  515. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sparc.hpp +14 -16
  516. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sync.hpp +27 -59
  517. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86.hpp +104 -57
  518. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86_dcas.hpp +268 -340
  519. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_linux_arm.hpp +9 -9
  520. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_arm.hpp +22 -24
  521. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_x86.hpp +55 -80
  522. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/platform.hpp +88 -46
  523. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/storage_type.hpp +30 -103
  524. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/string_ops.hpp +61 -0
  525. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/conditional.hpp +42 -0
  526. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/integral_constant.hpp +46 -0
  527. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_floating_point.hpp +42 -0
  528. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_function.hpp +42 -0
  529. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_iec559.hpp +47 -0
  530. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_integral.hpp +43 -0
  531. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_signed.hpp +43 -0
  532. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp +46 -0
  533. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/make_signed.hpp +43 -0
  534. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/make_unsigned.hpp +43 -0
  535. data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +37 -0
  536. data/src/cxx_supportlib/vendor-modified/boost/bind/bind_cc.hpp +30 -30
  537. data/src/cxx_supportlib/vendor-modified/boost/bind/bind_mf_cc.hpp +36 -36
  538. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/system.hpp +0 -10
  539. data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +28 -30
  540. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_get.hpp +2 -4
  541. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_io.hpp +1 -1
  542. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_io.hpp +14 -8
  543. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_units.hpp +1 -1
  544. data/src/cxx_supportlib/vendor-modified/boost/chrono/io_v1/chrono_io.hpp +2 -4
  545. data/src/cxx_supportlib/vendor-modified/boost/chrono/process_cpu_clocks.hpp +2 -2
  546. data/src/cxx_supportlib/vendor-modified/boost/chrono/time_point.hpp +0 -1
  547. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/base.hpp +9 -9
  548. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/details.hpp +7 -6
  549. data/src/cxx_supportlib/vendor-modified/boost/config.hpp +4 -4
  550. data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +26 -4
  551. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +12 -0
  552. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +30 -2
  553. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +13 -0
  554. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +11 -0
  555. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +32 -2
  556. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/diab.hpp +26 -0
  557. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +11 -0
  558. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +33 -6
  559. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +11 -0
  560. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +8 -1
  561. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +11 -0
  562. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +11 -0
  563. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/nvcc.hpp +28 -2
  564. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +17 -1
  565. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pgi.hpp +8 -142
  566. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +14 -3
  567. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +16 -0
  568. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +37 -9
  569. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +19 -0
  570. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp_zos.hpp +169 -0
  571. data/src/cxx_supportlib/vendor-modified/boost/config/{posix_features.hpp → detail/posix_features.hpp} +0 -0
  572. data/src/cxx_supportlib/vendor-modified/boost/config/{select_compiler_config.hpp → detail/select_compiler_config.hpp} +15 -5
  573. data/src/cxx_supportlib/vendor-modified/boost/config/{select_platform_config.hpp → detail/select_platform_config.hpp} +8 -3
  574. data/src/cxx_supportlib/vendor-modified/boost/config/{select_stdlib_config.hpp → detail/select_stdlib_config.hpp} +5 -0
  575. data/src/cxx_supportlib/vendor-modified/boost/config/{suffix.hpp → detail/suffix.hpp} +27 -27
  576. data/src/cxx_supportlib/vendor-modified/boost/config/header_deprecated.hpp +26 -0
  577. data/src/cxx_supportlib/vendor-modified/boost/config/helper_macros.hpp +37 -0
  578. data/src/cxx_supportlib/vendor-modified/boost/config/platform/aix.hpp +1 -1
  579. data/src/cxx_supportlib/vendor-modified/boost/config/platform/beos.hpp +1 -1
  580. data/src/cxx_supportlib/vendor-modified/boost/config/platform/bsd.hpp +1 -1
  581. data/src/cxx_supportlib/vendor-modified/boost/config/platform/cray.hpp +1 -1
  582. data/src/cxx_supportlib/vendor-modified/boost/config/platform/cygwin.hpp +12 -1
  583. data/src/cxx_supportlib/vendor-modified/boost/config/platform/haiku.hpp +1 -1
  584. data/src/cxx_supportlib/vendor-modified/boost/config/platform/hpux.hpp +1 -1
  585. data/src/cxx_supportlib/vendor-modified/boost/config/platform/irix.hpp +1 -1
  586. data/src/cxx_supportlib/vendor-modified/boost/config/platform/linux.hpp +4 -3
  587. data/src/cxx_supportlib/vendor-modified/boost/config/platform/macos.hpp +1 -1
  588. data/src/cxx_supportlib/vendor-modified/boost/config/platform/qnxnto.hpp +1 -1
  589. data/src/cxx_supportlib/vendor-modified/boost/config/platform/solaris.hpp +1 -1
  590. data/src/cxx_supportlib/vendor-modified/boost/config/platform/symbian.hpp +1 -1
  591. data/src/cxx_supportlib/vendor-modified/boost/config/platform/vxworks.hpp +155 -91
  592. data/src/cxx_supportlib/vendor-modified/boost/config/platform/zos.hpp +32 -0
  593. data/src/cxx_supportlib/vendor-modified/boost/config/pragma_message.hpp +31 -0
  594. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +21 -2
  595. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcomo.hpp +2 -0
  596. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +20 -0
  597. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +35 -0
  598. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/modena.hpp +2 -0
  599. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/msl.hpp +3 -1
  600. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/roguewave.hpp +2 -0
  601. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/sgi.hpp +2 -0
  602. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/stlport.hpp +2 -0
  603. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/vacpp.hpp +2 -0
  604. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/xlcpp_zos.hpp +60 -0
  605. data/src/cxx_supportlib/vendor-modified/boost/config/workaround.hpp +279 -0
  606. data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +19 -19
  607. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +5 -5
  608. data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +58 -58
  609. data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +7 -28
  610. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +57 -57
  611. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool.hpp +3 -3
  612. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +10 -10
  613. data/src/cxx_supportlib/vendor-modified/boost/container/detail/addressof.hpp +2 -2
  614. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +18 -18
  615. data/src/cxx_supportlib/vendor-modified/boost/container/detail/algorithm.hpp +122 -0
  616. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_helpers.hpp +8 -8
  617. data/src/cxx_supportlib/vendor-modified/boost/container/detail/allocator_version_traits.hpp +7 -7
  618. data/src/cxx_supportlib/vendor-modified/boost/container/detail/construct_in_place.hpp +1 -1
  619. data/src/cxx_supportlib/vendor-modified/boost/container/detail/container_or_allocator_rebind.hpp +49 -0
  620. data/src/cxx_supportlib/vendor-modified/boost/container/detail/container_rebind.hpp +258 -0
  621. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +119 -134
  622. data/src/cxx_supportlib/vendor-modified/boost/container/detail/destroyers.hpp +15 -15
  623. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +55 -55
  624. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +714 -282
  625. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_container.hpp +55 -0
  626. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_contiguous_container.hpp +47 -0
  627. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_sorted.hpp +2 -2
  628. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterator.hpp +30 -0
  629. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterator_to_raw_pointer.hpp +4 -29
  630. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +9 -9
  631. data/src/cxx_supportlib/vendor-modified/boost/container/detail/math_functions.hpp +2 -2
  632. data/src/cxx_supportlib/vendor-modified/boost/container/detail/min_max.hpp +2 -2
  633. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +2 -2
  634. data/src/cxx_supportlib/vendor-modified/boost/container/detail/multiallocation_chain.hpp +8 -8
  635. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +2 -2
  636. data/src/cxx_supportlib/vendor-modified/boost/container/detail/next_capacity.hpp +37 -35
  637. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +41 -41
  638. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool.hpp +4 -4
  639. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool_impl.hpp +4 -4
  640. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +69 -16
  641. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair_key_mapped_of_value.hpp +55 -0
  642. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common.hpp +2 -2
  643. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common_alloc.hpp +7 -7
  644. data/src/cxx_supportlib/vendor-modified/boost/container/detail/singleton.hpp +2 -2
  645. data/src/cxx_supportlib/vendor-modified/boost/container/detail/transform_iterator.hpp +1 -1
  646. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +180 -116
  647. data/src/cxx_supportlib/vendor-modified/boost/container/detail/type_traits.hpp +2 -2
  648. data/src/cxx_supportlib/vendor-modified/boost/container/detail/value_functors.hpp +36 -0
  649. data/src/cxx_supportlib/vendor-modified/boost/container/detail/value_init.hpp +2 -2
  650. data/src/cxx_supportlib/vendor-modified/boost/container/detail/variadic_templates_tools.hpp +2 -2
  651. data/src/cxx_supportlib/vendor-modified/boost/container/detail/version_type.hpp +8 -8
  652. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +0 -6
  653. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +874 -572
  654. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +497 -248
  655. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +33 -42
  656. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +326 -246
  657. data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +19 -19
  658. data/src/cxx_supportlib/vendor-modified/boost/container/node_handle.hpp +122 -78
  659. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +165 -0
  660. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_map.hpp +4 -8
  661. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_set.hpp +4 -8
  662. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/map.hpp +4 -4
  663. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/polymorphic_allocator.hpp +6 -6
  664. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/resource_adaptor.hpp +1 -1
  665. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/set.hpp +4 -4
  666. data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +19 -19
  667. data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +285 -110
  668. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +35 -53
  669. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +18 -19
  670. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +25 -25
  671. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +24 -9
  672. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +194 -142
  673. data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +15 -5
  674. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator.hpp +5 -5
  675. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +395 -421
  676. data/src/cxx_supportlib/vendor-modified/boost/{functional/hash → container_hash}/detail/float_functions.hpp +0 -0
  677. data/src/cxx_supportlib/vendor-modified/boost/{functional/hash → container_hash}/detail/hash_float.hpp +4 -4
  678. data/src/cxx_supportlib/vendor-modified/boost/{functional/hash → container_hash}/detail/limits.hpp +0 -0
  679. data/src/cxx_supportlib/vendor-modified/boost/{functional/hash → container_hash}/extensions.hpp +112 -16
  680. data/src/cxx_supportlib/vendor-modified/boost/{functional/hash → container_hash}/hash.hpp +195 -7
  681. data/src/cxx_supportlib/vendor-modified/boost/{functional/hash → container_hash}/hash_fwd.hpp +3 -3
  682. data/src/cxx_supportlib/vendor-modified/boost/core/addressof.hpp +53 -44
  683. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +80 -2
  684. data/src/cxx_supportlib/vendor-modified/boost/core/no_exceptions_support.hpp +1 -1
  685. data/src/cxx_supportlib/vendor-modified/boost/core/pointer_traits.hpp +233 -0
  686. data/src/cxx_supportlib/vendor-modified/boost/core/ref.hpp +2 -2
  687. data/src/cxx_supportlib/vendor-modified/boost/cstdint.hpp +26 -16
  688. data/src/cxx_supportlib/vendor-modified/boost/date_time/adjust_functors.hpp +20 -34
  689. data/src/cxx_supportlib/vendor-modified/boost/date_time/c_local_time_adjustor.hpp +8 -5
  690. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration.hpp +4 -0
  691. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_formatting.hpp +2 -0
  692. data/src/cxx_supportlib/vendor-modified/boost/date_time/date_formatting_locales.hpp +7 -6
  693. data/src/cxx_supportlib/vendor-modified/boost/date_time/dst_rules.hpp +6 -6
  694. data/src/cxx_supportlib/vendor-modified/boost/date_time/filetime_functions.hpp +8 -94
  695. data/src/cxx_supportlib/vendor-modified/boost/date_time/format_date_parser.hpp +1 -8
  696. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day.hpp +3 -3
  697. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_facet.hpp +6 -4
  698. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_month.hpp +3 -3
  699. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_weekday.hpp +2 -2
  700. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_year.hpp +6 -6
  701. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/gregorian_io.hpp +52 -52
  702. data/src/cxx_supportlib/vendor-modified/boost/date_time/int_adapter.hpp +14 -27
  703. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/custom_time_zone.hpp +0 -1
  704. data/src/cxx_supportlib/vendor-modified/boost/date_time/locale_config.hpp +3 -1
  705. data/src/cxx_supportlib/vendor-modified/boost/date_time/microsec_time_clock.hpp +36 -5
  706. data/src/cxx_supportlib/vendor-modified/boost/date_time/period_formatter.hpp +10 -9
  707. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/conversion.hpp +10 -12
  708. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_duration.hpp +18 -10
  709. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_io.hpp +12 -12
  710. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_serialize.hpp +65 -20
  711. data/src/cxx_supportlib/vendor-modified/boost/date_time/special_values_parser.hpp +32 -23
  712. data/src/cxx_supportlib/vendor-modified/boost/date_time/string_parse_tree.hpp +6 -5
  713. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_duration.hpp +10 -7
  714. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_facet.hpp +8 -3
  715. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_parsing.hpp +20 -0
  716. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_resolution_traits.hpp +31 -8
  717. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_system_split.hpp +10 -4
  718. data/src/cxx_supportlib/vendor-modified/boost/date_time/tz_db_base.hpp +3 -1
  719. data/src/cxx_supportlib/vendor-modified/boost/detail/workaround.hpp +2 -264
  720. data/src/cxx_supportlib/vendor-modified/boost/enable_shared_from_this.hpp +1 -1
  721. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/error_info_impl.hpp +38 -21
  722. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/exception_ptr.hpp +10 -9
  723. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/is_output_streamable.hpp +3 -2
  724. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/object_hex_dump.hpp +7 -6
  725. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/type_info.hpp +7 -6
  726. data/src/cxx_supportlib/vendor-modified/boost/exception/diagnostic_information.hpp +10 -7
  727. data/src/cxx_supportlib/vendor-modified/boost/exception/get_error_info.hpp +8 -6
  728. data/src/cxx_supportlib/vendor-modified/boost/exception/info.hpp +13 -47
  729. data/src/cxx_supportlib/vendor-modified/boost/exception/to_string.hpp +5 -4
  730. data/src/cxx_supportlib/vendor-modified/boost/exception/to_string_stub.hpp +5 -4
  731. data/src/cxx_supportlib/vendor-modified/boost/function.hpp +12 -4
  732. data/src/cxx_supportlib/vendor-modified/boost/function/detail/gen_maybe_include.pl +2 -0
  733. data/src/cxx_supportlib/vendor-modified/boost/function/detail/maybe_include.hpp +102 -0
  734. data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +20 -0
  735. data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +9 -0
  736. data/src/cxx_supportlib/vendor-modified/boost/functional/hash.hpp +1 -2
  737. data/src/cxx_supportlib/vendor-modified/boost/functional/hash_fwd.hpp +1 -6
  738. data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_rt.hpp +508 -390
  739. data/src/cxx_supportlib/vendor-modified/boost/integer/integer_mask.hpp +9 -1
  740. data/src/cxx_supportlib/vendor-modified/boost/integer_fwd.hpp +3 -0
  741. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +11 -3
  742. data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_list_algorithms.hpp +1 -1
  743. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/config_begin.hpp +7 -20
  744. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/default_header_holder.hpp +2 -2
  745. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +1 -1
  746. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hashtable_node.hpp +1 -1
  747. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +5 -5
  748. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +108 -2
  749. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/mpl.hpp +15 -5
  750. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/node_to_value.hpp +1 -1
  751. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_value_compare.hpp +8 -4
  752. data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +147 -64
  753. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +9 -2
  754. data/src/cxx_supportlib/vendor-modified/boost/intrusive/member_value_traits.hpp +3 -3
  755. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_plus_bits.hpp +15 -0
  756. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_traits.hpp +2 -2
  757. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +9 -2
  758. data/src/cxx_supportlib/vendor-modified/boost/intrusive_ptr.hpp +1 -1
  759. data/src/cxx_supportlib/vendor-modified/boost/iterator/advance.hpp +84 -0
  760. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_adaptor.hpp +0 -2
  761. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_categories.hpp +3 -2
  762. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_concepts.hpp +8 -10
  763. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_facade.hpp +2 -1
  764. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_traits.hpp +7 -6
  765. data/src/cxx_supportlib/vendor-modified/boost/iterator/reverse_iterator.hpp +7 -4
  766. data/src/cxx_supportlib/vendor-modified/boost/iterator/transform_iterator.hpp +6 -2
  767. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +7 -7
  768. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once_atomic.cpp +1 -1
  769. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +36 -92
  770. data/src/cxx_supportlib/vendor-modified/boost/make_shared.hpp +1 -2
  771. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/detail/fp_traits.hpp +2 -1
  772. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/math_fwd.hpp +57 -3
  773. data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/sign.hpp +1 -1
  774. data/src/cxx_supportlib/vendor-modified/boost/math/tools/config.hpp +12 -1
  775. data/src/cxx_supportlib/vendor-modified/boost/memory_order.hpp +40 -9
  776. data/src/cxx_supportlib/vendor-modified/boost/move/adl_move_swap.hpp +6 -0
  777. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_merge.hpp +253 -0
  778. data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_sort.hpp +563 -4
  779. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +324 -1071
  780. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/basic_op.hpp +10 -10
  781. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/heap_sort.hpp +111 -0
  782. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/insertion_sort.hpp +12 -11
  783. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/is_sorted.hpp +55 -0
  784. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp +59 -143
  785. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge_sort.hpp +6 -6
  786. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/pdqsort.hpp +334 -0
  787. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/set_difference.hpp +207 -0
  788. data/src/cxx_supportlib/vendor-modified/boost/move/algo/move.hpp +2 -1
  789. data/src/cxx_supportlib/vendor-modified/boost/move/algo/predicate.hpp +86 -0
  790. data/src/cxx_supportlib/vendor-modified/boost/move/algo/unique.hpp +55 -0
  791. data/src/cxx_supportlib/vendor-modified/boost/move/core.hpp +1 -9
  792. data/src/cxx_supportlib/vendor-modified/boost/move/detail/destruct_n.hpp +3 -4
  793. data/src/cxx_supportlib/vendor-modified/boost/move/detail/fwd_macros.hpp +25 -0
  794. data/src/cxx_supportlib/vendor-modified/boost/move/detail/iterator_to_raw_pointer.hpp +59 -0
  795. data/src/cxx_supportlib/vendor-modified/boost/{intrusive → move}/detail/pointer_element.hpp +12 -12
  796. data/src/cxx_supportlib/vendor-modified/boost/move/detail/to_raw_pointer.hpp +45 -0
  797. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +19 -5
  798. data/src/cxx_supportlib/vendor-modified/boost/move/detail/unique_ptr_meta_utils.hpp +1 -1
  799. data/src/cxx_supportlib/vendor-modified/boost/mpl/assert.hpp +1 -1
  800. data/src/cxx_supportlib/vendor-modified/boost/mpl/get_tag.hpp +26 -0
  801. data/src/cxx_supportlib/vendor-modified/boost/next_prior.hpp +85 -55
  802. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/cast.hpp +1 -1
  803. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/conversion_traits.hpp +0 -7
  804. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/converter.hpp +4 -13
  805. data/src/cxx_supportlib/vendor-modified/boost/operators.hpp +26 -7
  806. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/experimental_traits.hpp +98 -0
  807. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp +10 -10
  808. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_aligned_storage.hpp +17 -21
  809. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_config.hpp +25 -6
  810. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +15 -15
  811. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +1 -1
  812. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_trivially_copyable_base.hpp +499 -0
  813. data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +126 -21
  814. data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/arg_list.hpp +1 -0
  815. data/src/cxx_supportlib/vendor-modified/boost/pointer_cast.hpp +10 -9
  816. data/src/cxx_supportlib/vendor-modified/boost/pointer_to_other.hpp +1 -1
  817. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/arm.h +6 -1
  818. data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/parisc.h +1 -1
  819. data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/intel.h +8 -1
  820. data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/arm.h +3 -1
  821. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c.h +1 -0
  822. data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/cloudabi.h +53 -0
  823. data/src/cxx_supportlib/vendor-modified/boost/predef/make.h +4 -0
  824. data/src/cxx_supportlib/vendor-modified/boost/predef/os/android.h +2 -2
  825. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/free.h +10 -3
  826. data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/open.h +80 -0
  827. data/src/cxx_supportlib/vendor-modified/boost/predef/other/workaround.h +87 -0
  828. data/src/cxx_supportlib/vendor-modified/boost/predef/platform.h +9 -2
  829. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/cloudabi.h +43 -0
  830. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/ios.h +58 -0
  831. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/mingw.h +4 -4
  832. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/mingw32.h +63 -0
  833. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/mingw64.h +63 -0
  834. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_desktop.h +9 -3
  835. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_phone.h +7 -2
  836. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_runtime.h +13 -5
  837. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_server.h +47 -0
  838. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_store.h +11 -4
  839. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_system.h +47 -0
  840. data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_uwp.h +60 -0
  841. data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +1 -1
  842. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/config/config.hpp +11 -9
  843. data/src/cxx_supportlib/vendor-modified/boost/random/binomial_distribution.hpp +27 -27
  844. data/src/cxx_supportlib/vendor-modified/boost/random/detail/vector_io.hpp +3 -0
  845. data/src/cxx_supportlib/vendor-modified/boost/random/discrete_distribution.hpp +2 -2
  846. data/src/cxx_supportlib/vendor-modified/boost/random/hyperexponential_distribution.hpp +0 -11
  847. data/src/cxx_supportlib/vendor-modified/boost/random/independent_bits.hpp +12 -0
  848. data/src/cxx_supportlib/vendor-modified/boost/random/linear_congruential.hpp +5 -1
  849. data/src/cxx_supportlib/vendor-modified/boost/random/poisson_distribution.hpp +17 -17
  850. data/src/cxx_supportlib/vendor-modified/boost/random/seed_seq.hpp +1 -1
  851. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_on_sphere.hpp +6 -2
  852. data/src/cxx_supportlib/vendor-modified/boost/range/concepts.hpp +6 -4
  853. data/src/cxx_supportlib/vendor-modified/boost/range/iterator_range_core.hpp +1 -0
  854. data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +1 -1
  855. data/src/cxx_supportlib/vendor-modified/boost/regex/pending/object_cache.hpp +2 -2
  856. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +2 -2
  857. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +56 -11
  858. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp +10 -10
  859. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +7 -2
  860. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +6 -1
  861. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +37 -13
  862. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_recursive.hpp +4 -4
  863. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +9 -6
  864. data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +1 -1
  865. data/src/cxx_supportlib/vendor-modified/boost/scoped_array.hpp +1 -2
  866. data/src/cxx_supportlib/vendor-modified/boost/scoped_ptr.hpp +1 -2
  867. data/src/cxx_supportlib/vendor-modified/boost/shared_array.hpp +1 -1
  868. data/src/cxx_supportlib/vendor-modified/boost/shared_ptr.hpp +1 -1
  869. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +333 -656
  870. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/bad_weak_ptr.hpp +4 -2
  871. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_gcc.hpp +1 -1
  872. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/local_counted_base.hpp +148 -0
  873. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/local_sp_deleter.hpp +91 -0
  874. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/operator_bool.hpp +6 -6
  875. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/shared_count.hpp +15 -3
  876. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp +1 -0
  877. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_aix.hpp +1 -0
  878. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_clang.hpp +3 -2
  879. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp +1 -0
  880. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp +1 -0
  881. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp +1 -0
  882. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +7 -0
  883. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp +1 -0
  884. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp +1 -0
  885. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp +1 -0
  886. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_nt.hpp +1 -0
  887. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_pt.hpp +1 -0
  888. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp +1 -0
  889. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_solaris.hpp +1 -0
  890. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_spin.hpp +1 -0
  891. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp +3 -2
  892. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_sync.hpp +1 -0
  893. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp +1 -0
  894. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +29 -0
  895. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_noexcept.hpp +21 -3
  896. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/yield_k.hpp +1 -1
  897. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/enable_shared_from_this.hpp +6 -6
  898. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +26 -26
  899. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ref_counter.hpp +17 -16
  900. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared.hpp +1 -2
  901. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +19 -19
  902. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +11 -12
  903. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +15 -16
  904. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +22 -22
  905. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +135 -90
  906. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/weak_ptr.hpp +23 -23
  907. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_code.ipp +140 -111
  908. data/src/cxx_supportlib/vendor-modified/boost/system/error_code.hpp +297 -49
  909. data/src/cxx_supportlib/vendor-modified/boost/system/system_error.hpp +4 -4
  910. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_deque_base.hpp +30 -30
  911. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_queue_base.hpp +30 -30
  912. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_bounded_queue.hpp +4 -2
  913. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_deque.hpp +5 -7
  914. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_priority_queue.hpp +19 -19
  915. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_queue.hpp +5 -15
  916. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_timed_queue.hpp +118 -183
  917. data/src/cxx_supportlib/vendor-modified/boost/{detail → thread/detail}/atomic_redef_macros.hpp +0 -0
  918. data/src/cxx_supportlib/vendor-modified/boost/{detail → thread/detail}/atomic_undef_macros.hpp +0 -0
  919. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/config.hpp +62 -11
  920. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/log.hpp +15 -0
  921. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/move.hpp +0 -2
  922. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/platform.hpp +2 -0
  923. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/platform_time.hpp +478 -0
  924. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +51 -85
  925. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/basic_thread_pool.hpp +11 -3
  926. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/detail/priority_executor_base.hpp +10 -4
  927. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduled_thread_pool.hpp +1 -0
  928. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduler.hpp +10 -0
  929. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduling_adaptor.hpp +15 -4
  930. data/src/cxx_supportlib/vendor-modified/boost/thread/executors/serial_executor.hpp +9 -0
  931. data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +320 -92
  932. data/src/cxx_supportlib/vendor-modified/boost/thread/once.hpp +10 -0
  933. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable.hpp +187 -112
  934. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable_fwd.hpp +137 -164
  935. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/mutex.hpp +67 -37
  936. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/pthread_helpers.hpp +42 -0
  937. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/pthread_mutex_scoped_lock.hpp +15 -9
  938. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/recursive_mutex.hpp +65 -33
  939. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/shared_mutex.hpp +84 -158
  940. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/thread_data.hpp +143 -35
  941. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/thread_heap_alloc.hpp +32 -2
  942. data/src/cxx_supportlib/vendor-modified/boost/thread/shared_mutex.hpp +8 -1
  943. data/src/cxx_supportlib/vendor-modified/boost/thread/thread_only.hpp +1 -1
  944. data/src/cxx_supportlib/vendor-modified/boost/thread/v2/shared_mutex.hpp +579 -589
  945. data/src/cxx_supportlib/vendor-modified/boost/token_functions.hpp +2 -1
  946. data/src/cxx_supportlib/vendor-modified/boost/token_iterator.hpp +5 -2
  947. data/src/cxx_supportlib/vendor-modified/boost/tuple/detail/tuple_basic.hpp +7 -9
  948. data/src/cxx_supportlib/vendor-modified/boost/tuple/tuple.hpp +8 -8
  949. data/src/cxx_supportlib/vendor-modified/boost/type_index.hpp +1 -1
  950. data/src/cxx_supportlib/vendor-modified/boost/type_index/stl_type_index.hpp +6 -2
  951. data/src/cxx_supportlib/vendor-modified/boost/type_index/type_index_facade.hpp +5 -8
  952. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_const.hpp +6 -0
  953. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_cv.hpp +6 -0
  954. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_lvalue_reference.hpp +6 -0
  955. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_pointer.hpp +6 -0
  956. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_reference.hpp +7 -0
  957. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_rvalue_reference.hpp +6 -0
  958. data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_volatile.hpp +6 -0
  959. data/src/cxx_supportlib/vendor-modified/boost/type_traits/common_type.hpp +7 -0
  960. data/src/cxx_supportlib/vendor-modified/boost/type_traits/conditional.hpp +8 -0
  961. data/src/cxx_supportlib/vendor-modified/boost/type_traits/copy_cv.hpp +6 -0
  962. data/src/cxx_supportlib/vendor-modified/boost/type_traits/decay.hpp +6 -0
  963. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/config.hpp +12 -1
  964. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/detector.hpp +37 -0
  965. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_binary_operator.hpp +71 -14
  966. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_postfix_operator.hpp +1 -1
  967. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_prefix_operator.hpp +4 -1
  968. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_ptr_helper.hpp +370 -102
  969. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_likely_lambda.hpp +94 -0
  970. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp +1177 -572
  971. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp +2 -2
  972. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detected.hpp +24 -0
  973. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detected_or.hpp +25 -0
  974. data/src/cxx_supportlib/vendor-modified/boost/type_traits/floating_point_promotion.hpp +8 -0
  975. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_equal_to.hpp +3 -0
  976. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_greater.hpp +3 -0
  977. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_greater_equal.hpp +3 -0
  978. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_less.hpp +3 -0
  979. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_less_equal.hpp +3 -0
  980. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_minus.hpp +93 -0
  981. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_minus_assign.hpp +95 -2
  982. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_not_equal_to.hpp +3 -0
  983. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_destructor.hpp +11 -2
  984. data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_plus_assign.hpp +90 -0
  985. data/src/cxx_supportlib/vendor-modified/boost/type_traits/integral_constant.hpp +2 -1
  986. data/src/cxx_supportlib/vendor-modified/boost/type_traits/integral_promotion.hpp +6 -0
  987. data/src/cxx_supportlib/vendor-modified/boost/type_traits/intrinsics.hpp +2 -1
  988. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_assignable.hpp +10 -2
  989. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_complete.hpp +90 -0
  990. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_complex.hpp +1 -0
  991. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_constructible.hpp +12 -2
  992. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_convertible.hpp +20 -2
  993. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_default_constructible.hpp +16 -2
  994. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_destructible.hpp +10 -2
  995. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_detected.hpp +29 -0
  996. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_detected_convertible.hpp +29 -0
  997. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_detected_exact.hpp +29 -0
  998. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_list_constructible.hpp +48 -0
  999. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_assignable.hpp +14 -3
  1000. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_constructible.hpp +14 -4
  1001. data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_swappable.hpp +67 -0
  1002. data/src/cxx_supportlib/vendor-modified/boost/type_traits/make_signed.hpp +6 -0
  1003. data/src/cxx_supportlib/vendor-modified/boost/type_traits/make_unsigned.hpp +6 -0
  1004. data/src/cxx_supportlib/vendor-modified/boost/type_traits/nonesuch.hpp +35 -0
  1005. data/src/cxx_supportlib/vendor-modified/boost/type_traits/promote.hpp +6 -0
  1006. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_all_extents.hpp +6 -0
  1007. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_bounds.hpp +7 -0
  1008. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_const.hpp +6 -0
  1009. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_cv.hpp +5 -0
  1010. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_cv_ref.hpp +30 -0
  1011. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_extent.hpp +6 -0
  1012. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_pointer.hpp +7 -0
  1013. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_reference.hpp +5 -0
  1014. data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_volatile.hpp +5 -0
  1015. data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_identity.hpp +9 -0
  1016. data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_with_alignment.hpp +2 -3
  1017. data/src/cxx_supportlib/vendor-modified/boost/typeof/decltype.hpp +34 -0
  1018. data/src/cxx_supportlib/vendor-modified/boost/typeof/msvc/typeof_impl.hpp +5 -85
  1019. data/src/cxx_supportlib/vendor-modified/boost/typeof/register_fundamental.hpp +1 -2
  1020. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/functional.hpp +6 -0
  1021. data/src/cxx_supportlib/vendor-modified/boost/typeof/std/memory.hpp +2 -0
  1022. data/src/cxx_supportlib/vendor-modified/boost/typeof/typeof.hpp +24 -14
  1023. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fwd.hpp +18 -12
  1024. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +4018 -4052
  1025. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/map.hpp +57 -97
  1026. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/set.hpp +56 -95
  1027. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +2150 -1777
  1028. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +41 -38
  1029. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +1630 -1420
  1030. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +40 -37
  1031. data/src/cxx_supportlib/vendor-modified/boost/utility.hpp +6 -3
  1032. data/src/cxx_supportlib/vendor-modified/boost/utility/detail/minstd_rand.hpp +55 -0
  1033. data/src/cxx_supportlib/vendor-modified/boost/utility/detail/result_of_iterate.hpp +14 -17
  1034. data/src/cxx_supportlib/vendor-modified/boost/utility/result_of.hpp +44 -20
  1035. data/src/cxx_supportlib/vendor-modified/boost/utility/string_view.hpp +30 -30
  1036. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  1037. data/src/cxx_supportlib/vendor-modified/boost/weak_ptr.hpp +1 -1
  1038. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  1039. data/src/ruby_supportlib/phusion_passenger/common_library.rb +3 -0
  1040. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +8 -1
  1041. data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +7 -1
  1042. data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +2 -2
  1043. data/src/ruby_supportlib/phusion_passenger/utils/tee_input.rb +4 -4
  1044. metadata +201 -47
  1045. data/src/cxx_supportlib/ConfigKit/VariantMapUtils.h +0 -96
  1046. data/src/cxx_supportlib/MessageClient.h +0 -309
  1047. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/addressof.hpp +0 -40
  1048. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/task_io_service.hpp +0 -80
  1049. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/shared_ptr.hpp +0 -40
  1050. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/weak_ptr.hpp +0 -40
  1051. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/win_iocp_serial_port_service.hpp +0 -230
  1052. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_service.hpp +0 -156
  1053. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_service.ipp +0 -157
  1054. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/basic_context.hpp +0 -42
  1055. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_service.hpp +0 -42
  1056. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/basic_context.hpp +0 -436
  1057. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/context_service.hpp +0 -176
  1058. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_context_service.hpp +0 -396
  1059. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_operation.hpp +0 -526
  1060. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/detail/openssl_stream_service.hpp +0 -573
  1061. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/stream.hpp +0 -503
  1062. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/old/stream_service.hpp +0 -186
  1063. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_service.hpp +0 -42
  1064. data/src/cxx_supportlib/vendor-modified/boost/container/detail/to_raw_pointer.hpp +0 -33
  1065. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/to_raw_pointer.hpp +0 -47
  1066. data/src/cxx_supportlib/vendor-modified/boost/iterator.hpp +0 -20
  1067. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/shared_mutex_assert.hpp +0 -724
  1068. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/timespec.hpp +0 -149
  1069. data/src/cxx_supportlib/vendor-modified/boost/thread/v2/thread.hpp +0 -155
  1070. data/src/cxx_supportlib/vendor-modified/boost/utility/empty_deleter.hpp +0 -43
@@ -7,101 +7,61 @@
7
7
  #include <boost/unordered/unordered_map_fwd.hpp>
8
8
 
9
9
  namespace boost {
10
- namespace unordered {
11
- namespace detail {
12
- template <typename A, typename K, typename M, typename H, typename P> struct map
13
- {
14
- typedef boost::unordered::detail::map<A, K, M, H, P> types;
15
-
16
- typedef std::pair<K const, M> value_type;
17
- typedef H hasher;
18
- typedef P key_equal;
19
- typedef K const const_key_type;
20
-
21
- typedef typename ::boost::unordered::detail::rebind_wrap<A,
22
- value_type>::type value_allocator;
23
- typedef boost::unordered::detail::allocator_traits<value_allocator>
24
- value_allocator_traits;
25
-
26
- typedef boost::unordered::detail::pick_node<A, value_type> pick;
27
- typedef typename pick::node node;
28
- typedef typename pick::bucket bucket;
29
- typedef typename pick::link_pointer link_pointer;
30
- typedef typename pick::node_algo node_algo;
31
-
32
- typedef boost::unordered::detail::table_impl<types> table;
33
- typedef boost::unordered::detail::map_extractor<value_type> extractor;
34
-
35
- typedef typename boost::unordered::detail::pick_policy<K>::type policy;
36
-
37
- typedef boost::unordered::iterator_detail::iterator<node> iterator;
38
- typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
39
- typedef boost::unordered::iterator_detail::l_iterator<node, policy>
40
- l_iterator;
41
- typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
42
- cl_iterator;
43
-
44
- typedef boost::unordered::node_handle_map<node, K, M, A> node_type;
45
- typedef boost::unordered::insert_return_type_map<node, K, M, A>
46
- insert_return_type;
47
- };
48
-
49
- template <typename A, typename K, typename M, typename H, typename P>
50
- struct multimap
51
- {
52
- typedef boost::unordered::detail::multimap<A, K, M, H, P> types;
53
-
54
- typedef std::pair<K const, M> value_type;
55
- typedef H hasher;
56
- typedef P key_equal;
57
- typedef K const const_key_type;
58
-
59
- typedef typename ::boost::unordered::detail::rebind_wrap<A,
60
- value_type>::type value_allocator;
61
- typedef boost::unordered::detail::allocator_traits<value_allocator>
62
- value_allocator_traits;
63
-
64
- #if BOOST_UNORDERED_INTEROPERABLE_NODES
65
- typedef boost::unordered::detail::pick_node<A, value_type> pick;
66
- #else
67
- typedef boost::unordered::detail::pick_grouped_node<A, value_type> pick;
68
- #endif
69
- typedef typename pick::node node;
70
- typedef typename pick::bucket bucket;
71
- typedef typename pick::link_pointer link_pointer;
72
- typedef typename pick::node_algo node_algo;
73
-
74
- typedef boost::unordered::detail::grouped_table_impl<types> table;
75
- typedef boost::unordered::detail::map_extractor<value_type> extractor;
76
-
77
- typedef typename boost::unordered::detail::pick_policy<K>::type policy;
78
-
79
- typedef boost::unordered::iterator_detail::iterator<node> iterator;
80
- typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
81
- typedef boost::unordered::iterator_detail::l_iterator<node, policy>
82
- l_iterator;
83
- typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
84
- cl_iterator;
85
-
86
- typedef boost::unordered::node_handle_map<node, K, M, A> node_type;
87
- };
88
-
89
- template <typename K, typename M, typename H, typename P, typename A>
90
- class instantiate_map
91
- {
92
- typedef boost::unordered_map<K, M, H, P, A> container;
93
- container x;
94
- typename container::node_type node_type;
95
- typename container::insert_return_type insert_return_type;
96
- };
97
-
98
- template <typename K, typename M, typename H, typename P, typename A>
99
- class instantiate_multimap
100
- {
101
- typedef boost::unordered_multimap<K, M, H, P, A> container;
102
- container x;
103
- typename container::node_type node_type;
104
- };
105
- }
106
- }
10
+ namespace unordered {
11
+ namespace detail {
12
+ template <typename A, typename K, typename M, typename H, typename P>
13
+ struct map
14
+ {
15
+ typedef boost::unordered::detail::map<A, K, M, H, P> types;
16
+
17
+ typedef std::pair<K const, M> value_type;
18
+ typedef H hasher;
19
+ typedef P key_equal;
20
+ typedef K const const_key_type;
21
+
22
+ typedef
23
+ typename ::boost::unordered::detail::rebind_wrap<A, value_type>::type
24
+ value_allocator;
25
+ typedef boost::unordered::detail::allocator_traits<value_allocator>
26
+ value_allocator_traits;
27
+
28
+ typedef boost::unordered::detail::pick_node<A, value_type> pick;
29
+ typedef typename pick::node node;
30
+ typedef typename pick::bucket bucket;
31
+ typedef typename pick::link_pointer link_pointer;
32
+
33
+ typedef boost::unordered::detail::table<types> table;
34
+ typedef boost::unordered::detail::map_extractor<value_type> extractor;
35
+
36
+ typedef typename boost::unordered::detail::pick_policy<K>::type policy;
37
+
38
+ typedef boost::unordered::iterator_detail::iterator<node> iterator;
39
+ typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
40
+ typedef boost::unordered::iterator_detail::l_iterator<node> l_iterator;
41
+ typedef boost::unordered::iterator_detail::cl_iterator<node>
42
+ cl_iterator;
43
+
44
+ typedef boost::unordered::node_handle_map<node, K, M, A> node_type;
45
+ typedef boost::unordered::insert_return_type_map<node, K, M, A>
46
+ insert_return_type;
47
+ };
48
+
49
+ template <typename K, typename M, typename H, typename P, typename A>
50
+ class instantiate_map
51
+ {
52
+ typedef boost::unordered_map<K, M, H, P, A> container;
53
+ container x;
54
+ typename container::node_type node_type;
55
+ typename container::insert_return_type insert_return_type;
56
+ };
57
+
58
+ template <typename K, typename M, typename H, typename P, typename A>
59
+ class instantiate_multimap
60
+ {
61
+ typedef boost::unordered_multimap<K, M, H, P, A> container;
62
+ container x;
63
+ typename container::node_type node_type;
64
+ };
65
+ }
66
+ }
107
67
  }
@@ -7,99 +7,60 @@
7
7
  #include <boost/unordered/unordered_set_fwd.hpp>
8
8
 
9
9
  namespace boost {
10
- namespace unordered {
11
- namespace detail {
12
- template <typename A, typename T, typename H, typename P> struct set
13
- {
14
- typedef boost::unordered::detail::set<A, T, H, P> types;
15
-
16
- typedef T value_type;
17
- typedef H hasher;
18
- typedef P key_equal;
19
- typedef T const const_key_type;
20
-
21
- typedef typename ::boost::unordered::detail::rebind_wrap<A,
22
- value_type>::type value_allocator;
23
- typedef boost::unordered::detail::allocator_traits<value_allocator>
24
- value_allocator_traits;
25
-
26
- typedef boost::unordered::detail::pick_node<A, value_type> pick;
27
- typedef typename pick::node node;
28
- typedef typename pick::bucket bucket;
29
- typedef typename pick::link_pointer link_pointer;
30
- typedef typename pick::node_algo node_algo;
31
-
32
- typedef boost::unordered::detail::table_impl<types> table;
33
- typedef boost::unordered::detail::set_extractor<value_type> extractor;
34
-
35
- typedef typename boost::unordered::detail::pick_policy<T>::type policy;
36
-
37
- typedef boost::unordered::iterator_detail::c_iterator<node> iterator;
38
- typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
39
- typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
40
- l_iterator;
41
- typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
42
- cl_iterator;
43
-
44
- typedef boost::unordered::node_handle_set<node, T, A> node_type;
45
- typedef boost::unordered::insert_return_type_set<node, T, A>
46
- insert_return_type;
47
- };
48
-
49
- template <typename A, typename T, typename H, typename P> struct multiset
50
- {
51
- typedef boost::unordered::detail::multiset<A, T, H, P> types;
52
-
53
- typedef T value_type;
54
- typedef H hasher;
55
- typedef P key_equal;
56
- typedef T const const_key_type;
57
-
58
- typedef typename ::boost::unordered::detail::rebind_wrap<A,
59
- value_type>::type value_allocator;
60
- typedef boost::unordered::detail::allocator_traits<value_allocator>
61
- value_allocator_traits;
62
-
63
- #if BOOST_UNORDERED_INTEROPERABLE_NODES
64
- typedef boost::unordered::detail::pick_node<A, value_type> pick;
65
- #else
66
- typedef boost::unordered::detail::pick_grouped_node<A, value_type> pick;
67
- #endif
68
- typedef typename pick::node node;
69
- typedef typename pick::bucket bucket;
70
- typedef typename pick::link_pointer link_pointer;
71
- typedef typename pick::node_algo node_algo;
72
-
73
- typedef boost::unordered::detail::grouped_table_impl<types> table;
74
- typedef boost::unordered::detail::set_extractor<value_type> extractor;
75
-
76
- typedef typename boost::unordered::detail::pick_policy<T>::type policy;
77
-
78
- typedef boost::unordered::iterator_detail::c_iterator<node> iterator;
79
- typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
80
- typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
81
- l_iterator;
82
- typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
83
- cl_iterator;
84
-
85
- typedef boost::unordered::node_handle_set<node, T, A> node_type;
86
- };
87
-
88
- template <typename T, typename H, typename P, typename A> class instantiate_set
89
- {
90
- typedef boost::unordered_set<T, H, P, A> container;
91
- container x;
92
- typename container::node_type node_type;
93
- typename container::insert_return_type insert_return_type;
94
- };
95
-
96
- template <typename T, typename H, typename P, typename A>
97
- class instantiate_multiset
98
- {
99
- typedef boost::unordered_multiset<T, H, P, A> container;
100
- container x;
101
- typename container::node_type node_type;
102
- };
103
- }
104
- }
10
+ namespace unordered {
11
+ namespace detail {
12
+ template <typename A, typename T, typename H, typename P> struct set
13
+ {
14
+ typedef boost::unordered::detail::set<A, T, H, P> types;
15
+
16
+ typedef T value_type;
17
+ typedef H hasher;
18
+ typedef P key_equal;
19
+ typedef T const const_key_type;
20
+
21
+ typedef
22
+ typename ::boost::unordered::detail::rebind_wrap<A, value_type>::type
23
+ value_allocator;
24
+ typedef boost::unordered::detail::allocator_traits<value_allocator>
25
+ value_allocator_traits;
26
+
27
+ typedef boost::unordered::detail::pick_node<A, value_type> pick;
28
+ typedef typename pick::node node;
29
+ typedef typename pick::bucket bucket;
30
+ typedef typename pick::link_pointer link_pointer;
31
+
32
+ typedef boost::unordered::detail::table<types> table;
33
+ typedef boost::unordered::detail::set_extractor<value_type> extractor;
34
+
35
+ typedef typename boost::unordered::detail::pick_policy<T>::type policy;
36
+
37
+ typedef boost::unordered::iterator_detail::c_iterator<node> iterator;
38
+ typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
39
+ typedef boost::unordered::iterator_detail::cl_iterator<node> l_iterator;
40
+ typedef boost::unordered::iterator_detail::cl_iterator<node>
41
+ cl_iterator;
42
+
43
+ typedef boost::unordered::node_handle_set<node, T, A> node_type;
44
+ typedef boost::unordered::insert_return_type_set<node, T, A>
45
+ insert_return_type;
46
+ };
47
+
48
+ template <typename T, typename H, typename P, typename A>
49
+ class instantiate_set
50
+ {
51
+ typedef boost::unordered_set<T, H, P, A> container;
52
+ container x;
53
+ typename container::node_type node_type;
54
+ typename container::insert_return_type insert_return_type;
55
+ };
56
+
57
+ template <typename T, typename H, typename P, typename A>
58
+ class instantiate_multiset
59
+ {
60
+ typedef boost::unordered_multiset<T, H, P, A> container;
61
+ container x;
62
+ typename container::node_type node_type;
63
+ };
64
+ }
65
+ }
105
66
  }
@@ -17,6 +17,7 @@
17
17
  #include <boost/core/explicit_operator_bool.hpp>
18
18
  #include <boost/functional/hash.hpp>
19
19
  #include <boost/move/move.hpp>
20
+ #include <boost/type_traits/is_constructible.hpp>
20
21
  #include <boost/unordered/detail/map.hpp>
21
22
 
22
23
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -25,2188 +26,2560 @@
25
26
 
26
27
  #if defined(BOOST_MSVC)
27
28
  #pragma warning(push)
29
+ // conditional expression is constant
30
+ #pragma warning(disable : 4127)
28
31
  #if BOOST_MSVC >= 1400
29
- #pragma warning(disable : 4396) // the inline specifier cannot be used when a
30
- // friend declaration refers to a specialization
31
- // of a function template
32
+ // the inline specifier cannot be used when a friend declaration refers to a
33
+ // specialization of a function template
34
+ #pragma warning(disable : 4396)
32
35
  #endif
33
36
  #endif
34
37
 
35
38
  namespace boost {
36
- namespace unordered {
37
- template <class K, class T, class H, class P, class A> class unordered_map
38
- {
39
+ namespace unordered {
40
+ template <class K, class T, class H, class P, class A> class unordered_map
41
+ {
39
42
  #if defined(BOOST_UNORDERED_USE_MOVE)
40
- BOOST_COPYABLE_AND_MOVABLE(unordered_map)
43
+ BOOST_COPYABLE_AND_MOVABLE(unordered_map)
41
44
  #endif
42
- template <typename, typename, typename, typename, typename>
43
- friend class unordered_multimap;
45
+ template <typename, typename, typename, typename, typename>
46
+ friend class unordered_multimap;
47
+
48
+ public:
49
+ typedef K key_type;
50
+ typedef T mapped_type;
51
+ typedef std::pair<const K, T> value_type;
52
+ typedef H hasher;
53
+ typedef P key_equal;
54
+ typedef A allocator_type;
55
+
56
+ private:
57
+ typedef boost::unordered::detail::map<A, K, T, H, P> types;
58
+ typedef typename types::value_allocator_traits value_allocator_traits;
59
+ typedef typename types::table table;
60
+ typedef typename table::node_pointer node_pointer;
61
+ typedef typename table::link_pointer link_pointer;
62
+
63
+ public:
64
+ typedef typename value_allocator_traits::pointer pointer;
65
+ typedef typename value_allocator_traits::const_pointer const_pointer;
66
+
67
+ typedef value_type& reference;
68
+ typedef value_type const& const_reference;
69
+
70
+ typedef std::size_t size_type;
71
+ typedef std::ptrdiff_t difference_type;
72
+
73
+ typedef typename table::iterator iterator;
74
+ typedef typename table::c_iterator const_iterator;
75
+ typedef typename table::l_iterator local_iterator;
76
+ typedef typename table::cl_iterator const_local_iterator;
77
+ typedef typename types::node_type node_type;
78
+ typedef typename types::insert_return_type insert_return_type;
79
+
80
+ private:
81
+ table table_;
82
+
83
+ public:
84
+ // constructors
85
+
86
+ unordered_map();
87
+
88
+ explicit unordered_map(size_type, const hasher& = hasher(),
89
+ const key_equal& = key_equal(),
90
+ const allocator_type& = allocator_type());
44
91
 
45
- public:
46
- typedef K key_type;
47
- typedef std::pair<const K, T> value_type;
48
- typedef T mapped_type;
49
- typedef H hasher;
50
- typedef P key_equal;
51
- typedef A allocator_type;
92
+ template <class InputIt>
93
+ unordered_map(InputIt, InputIt,
94
+ size_type = boost::unordered::detail::default_bucket_count,
95
+ const hasher& = hasher(), const key_equal& = key_equal(),
96
+ const allocator_type& = allocator_type());
52
97
 
53
- private:
54
- typedef boost::unordered::detail::map<A, K, T, H, P> types;
55
- typedef typename types::value_allocator_traits value_allocator_traits;
56
- typedef typename types::table table;
98
+ unordered_map(unordered_map const&);
57
99
 
58
- public:
59
- typedef typename value_allocator_traits::pointer pointer;
60
- typedef typename value_allocator_traits::const_pointer const_pointer;
100
+ #if defined(BOOST_UNORDERED_USE_MOVE) || \
101
+ !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
102
+ unordered_map(BOOST_RV_REF(unordered_map) other)
103
+ BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
104
+ : table_(other.table_, boost::unordered::detail::move_tag())
105
+ {
106
+ // The move is done in table_
107
+ }
108
+ #endif
61
109
 
62
- typedef value_type& reference;
63
- typedef value_type const& const_reference;
110
+ explicit unordered_map(allocator_type const&);
64
111
 
65
- typedef std::size_t size_type;
66
- typedef std::ptrdiff_t difference_type;
112
+ unordered_map(unordered_map const&, allocator_type const&);
67
113
 
68
- typedef typename table::cl_iterator const_local_iterator;
69
- typedef typename table::l_iterator local_iterator;
70
- typedef typename table::c_iterator const_iterator;
71
- typedef typename table::iterator iterator;
72
- typedef typename types::node_type node_type;
73
- typedef typename types::insert_return_type insert_return_type;
114
+ unordered_map(BOOST_RV_REF(unordered_map), allocator_type const&);
74
115
 
75
- private:
76
- table table_;
116
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
117
+ unordered_map(std::initializer_list<value_type>,
118
+ size_type = boost::unordered::detail::default_bucket_count,
119
+ const hasher& = hasher(), const key_equal& l = key_equal(),
120
+ const allocator_type& = allocator_type());
121
+ #endif
77
122
 
78
- public:
79
- // constructors
123
+ explicit unordered_map(size_type, const allocator_type&);
80
124
 
81
- unordered_map();
125
+ explicit unordered_map(size_type, const hasher&, const allocator_type&);
82
126
 
83
- explicit unordered_map(size_type, const hasher& = hasher(),
84
- const key_equal& = key_equal(),
85
- const allocator_type& = allocator_type());
127
+ template <class InputIt>
128
+ unordered_map(InputIt, InputIt, size_type, const allocator_type&);
86
129
 
87
- explicit unordered_map(size_type, const allocator_type&);
130
+ template <class InputIt>
131
+ unordered_map(
132
+ InputIt, InputIt, size_type, const hasher&, const allocator_type&);
88
133
 
89
- explicit unordered_map(size_type, const hasher&, const allocator_type&);
134
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
135
+ unordered_map(
136
+ std::initializer_list<value_type>, size_type, const allocator_type&);
90
137
 
91
- explicit unordered_map(allocator_type const&);
138
+ unordered_map(std::initializer_list<value_type>, size_type, const hasher&,
139
+ const allocator_type&);
140
+ #endif
92
141
 
93
- template <class InputIt> unordered_map(InputIt, InputIt);
142
+ // Destructor
94
143
 
95
- template <class InputIt>
96
- unordered_map(InputIt, InputIt, size_type, const hasher& = hasher(),
97
- const key_equal& = key_equal());
144
+ ~unordered_map() BOOST_NOEXCEPT;
98
145
 
99
- template <class InputIt>
100
- unordered_map(InputIt, InputIt, size_type, const hasher&, const key_equal&,
101
- const allocator_type&);
146
+ // Assign
102
147
 
103
- template <class InputIt>
104
- unordered_map(
105
- InputIt, InputIt, size_type, const hasher&, const allocator_type&);
148
+ #if defined(BOOST_UNORDERED_USE_MOVE)
149
+ unordered_map& operator=(BOOST_COPY_ASSIGN_REF(unordered_map) x)
150
+ {
151
+ table_.assign(x.table_, boost::unordered::detail::true_type());
152
+ return *this;
153
+ }
154
+
155
+ unordered_map& operator=(BOOST_RV_REF(unordered_map) x)
156
+ BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
157
+ boost::is_nothrow_move_assignable<H>::value&&
158
+ boost::is_nothrow_move_assignable<P>::value)
159
+ {
160
+ table_.move_assign(x.table_, boost::unordered::detail::true_type());
161
+ return *this;
162
+ }
163
+ #else
164
+ unordered_map& operator=(unordered_map const& x)
165
+ {
166
+ table_.assign(x.table_, boost::unordered::detail::true_type());
167
+ return *this;
168
+ }
106
169
 
107
- template <class InputIt>
108
- unordered_map(InputIt, InputIt, size_type, const allocator_type&);
170
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
171
+ unordered_map& operator=(unordered_map&& x)
172
+ BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
173
+ boost::is_nothrow_move_assignable<H>::value&&
174
+ boost::is_nothrow_move_assignable<P>::value)
175
+ {
176
+ table_.move_assign(x.table_, boost::unordered::detail::true_type());
177
+ return *this;
178
+ }
179
+ #endif
180
+ #endif
109
181
 
110
- // copy/move constructors
182
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
183
+ unordered_map& operator=(std::initializer_list<value_type>);
184
+ #endif
185
+
186
+ allocator_type get_allocator() const BOOST_NOEXCEPT
187
+ {
188
+ return table_.node_alloc();
189
+ }
111
190
 
112
- unordered_map(unordered_map const&);
191
+ // iterators
113
192
 
114
- unordered_map(unordered_map const&, allocator_type const&);
115
- unordered_map(BOOST_RV_REF(unordered_map), allocator_type const&);
193
+ iterator begin() BOOST_NOEXCEPT { return iterator(table_.begin()); }
116
194
 
117
- #if defined(BOOST_UNORDERED_USE_MOVE)
118
- unordered_map(BOOST_RV_REF(unordered_map) other)
119
- BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
120
- : table_(other.table_, boost::unordered::detail::move_tag())
195
+ const_iterator begin() const BOOST_NOEXCEPT
196
+ {
197
+ return const_iterator(table_.begin());
198
+ }
199
+
200
+ iterator end() BOOST_NOEXCEPT { return iterator(); }
201
+
202
+ const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); }
203
+
204
+ const_iterator cbegin() const BOOST_NOEXCEPT
205
+ {
206
+ return const_iterator(table_.begin());
207
+ }
208
+
209
+ const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); }
210
+
211
+ // size and capacity
212
+
213
+ bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
214
+
215
+ size_type size() const BOOST_NOEXCEPT { return table_.size_; }
216
+
217
+ size_type max_size() const BOOST_NOEXCEPT;
218
+
219
+ // emplace
220
+
221
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
222
+
223
+ template <class... Args>
224
+ std::pair<iterator, bool> emplace(BOOST_FWD_REF(Args)... args)
225
+ {
226
+ return table_.emplace_unique(
227
+ table::extractor::extract(boost::forward<Args>(args)...),
228
+ boost::forward<Args>(args)...);
229
+ }
230
+
231
+ #else
232
+
233
+ #if !BOOST_UNORDERED_SUN_WORKAROUNDS1
234
+
235
+ // 0 argument emplace requires special treatment in case
236
+ // the container is instantiated with a value type that
237
+ // doesn't have a default constructor.
238
+
239
+ std::pair<iterator, bool> emplace(
240
+ boost::unordered::detail::empty_emplace =
241
+ boost::unordered::detail::empty_emplace(),
242
+ value_type v = value_type())
243
+ {
244
+ return this->emplace(boost::move(v));
245
+ }
246
+
247
+ #endif
248
+
249
+ template <typename A0>
250
+ std::pair<iterator, bool> emplace(BOOST_FWD_REF(A0) a0)
251
+ {
252
+ return table_.emplace_unique(
253
+ table::extractor::extract(boost::forward<A0>(a0)),
254
+ boost::unordered::detail::create_emplace_args(
255
+ boost::forward<A0>(a0)));
256
+ }
257
+
258
+ template <typename A0, typename A1>
259
+ std::pair<iterator, bool> emplace(
260
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
261
+ {
262
+ return table_.emplace_unique(
263
+ table::extractor::extract(
264
+ boost::forward<A0>(a0), boost::forward<A1>(a1)),
265
+ boost::unordered::detail::create_emplace_args(
266
+ boost::forward<A0>(a0), boost::forward<A1>(a1)));
267
+ }
268
+
269
+ template <typename A0, typename A1, typename A2>
270
+ std::pair<iterator, bool> emplace(
271
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
272
+ {
273
+ return table_.emplace_unique(
274
+ table::extractor::extract(
275
+ boost::forward<A0>(a0), boost::forward<A1>(a1)),
276
+ boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
277
+ boost::forward<A1>(a1), boost::forward<A2>(a2)));
278
+ }
279
+
280
+ #endif
281
+
282
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
283
+
284
+ template <class... Args>
285
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
286
+ {
287
+ return table_.emplace_hint_unique(hint,
288
+ table::extractor::extract(boost::forward<Args>(args)...),
289
+ boost::forward<Args>(args)...);
290
+ }
291
+
292
+ #else
293
+
294
+ #if !BOOST_UNORDERED_SUN_WORKAROUNDS1
295
+
296
+ iterator emplace_hint(const_iterator hint,
297
+ boost::unordered::detail::empty_emplace =
298
+ boost::unordered::detail::empty_emplace(),
299
+ value_type v = value_type())
300
+ {
301
+ return this->emplace_hint(hint, boost::move(v));
302
+ }
303
+
304
+ #endif
305
+
306
+ template <typename A0>
307
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
308
+ {
309
+ return table_.emplace_hint_unique(hint,
310
+ table::extractor::extract(boost::forward<A0>(a0)),
311
+ boost::unordered::detail::create_emplace_args(
312
+ boost::forward<A0>(a0)));
313
+ }
314
+
315
+ template <typename A0, typename A1>
316
+ iterator emplace_hint(
317
+ const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
318
+ {
319
+ return table_.emplace_hint_unique(hint,
320
+ table::extractor::extract(
321
+ boost::forward<A0>(a0), boost::forward<A1>(a1)),
322
+ boost::unordered::detail::create_emplace_args(
323
+ boost::forward<A0>(a0), boost::forward<A1>(a1)));
324
+ }
325
+
326
+ template <typename A0, typename A1, typename A2>
327
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
328
+ BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
329
+ {
330
+ return table_.emplace_hint_unique(hint,
331
+ table::extractor::extract(
332
+ boost::forward<A0>(a0), boost::forward<A1>(a1)),
333
+ boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
334
+ boost::forward<A1>(a1), boost::forward<A2>(a2)));
335
+ }
336
+
337
+ #endif
338
+
339
+ #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
340
+
341
+ #define BOOST_UNORDERED_EMPLACE(z, n, _) \
342
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
343
+ std::pair<iterator, bool> emplace( \
344
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
345
+ { \
346
+ return table_.emplace_unique( \
347
+ table::extractor::extract( \
348
+ boost::forward<A0>(a0), boost::forward<A1>(a1)), \
349
+ boost::unordered::detail::create_emplace_args( \
350
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
351
+ } \
352
+ \
353
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
354
+ iterator emplace_hint( \
355
+ const_iterator hint, BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
356
+ { \
357
+ return table_.emplace_hint_unique(hint, \
358
+ table::extractor::extract( \
359
+ boost::forward<A0>(a0), boost::forward<A1>(a1)), \
360
+ boost::unordered::detail::create_emplace_args( \
361
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
362
+ }
363
+
364
+ BOOST_UNORDERED_EMPLACE(1, 4, _)
365
+ BOOST_UNORDERED_EMPLACE(1, 5, _)
366
+ BOOST_UNORDERED_EMPLACE(1, 6, _)
367
+ BOOST_UNORDERED_EMPLACE(1, 7, _)
368
+ BOOST_UNORDERED_EMPLACE(1, 8, _)
369
+ BOOST_UNORDERED_EMPLACE(1, 9, _)
370
+ BOOST_PP_REPEAT_FROM_TO(10, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT),
371
+ BOOST_UNORDERED_EMPLACE, _)
372
+
373
+ #undef BOOST_UNORDERED_EMPLACE
374
+
375
+ #endif
376
+
377
+ std::pair<iterator, bool> insert(value_type const& x)
378
+ {
379
+ return this->emplace(x);
380
+ }
381
+
382
+ std::pair<iterator, bool> insert(BOOST_RV_REF(value_type) x)
383
+ {
384
+ return this->emplace(boost::move(x));
385
+ }
386
+
387
+ template <class P2>
388
+ std::pair<iterator, bool> insert(BOOST_RV_REF(P2) obj,
389
+ typename boost::enable_if_c<
390
+ boost::is_constructible<value_type, BOOST_RV_REF(P2)>::value,
391
+ void*>::type = 0)
392
+ {
393
+ return this->emplace(boost::forward<P2>(obj));
394
+ }
395
+
396
+ iterator insert(const_iterator hint, value_type const& x)
397
+ {
398
+ return this->emplace_hint(hint, x);
399
+ }
400
+
401
+ iterator insert(const_iterator hint, BOOST_RV_REF(value_type) x)
402
+ {
403
+ return this->emplace_hint(hint, boost::move(x));
404
+ }
405
+
406
+ template <class P2>
407
+ iterator insert(const_iterator hint, BOOST_RV_REF(P2) obj,
408
+ typename boost::enable_if_c<
409
+ boost::is_constructible<value_type, BOOST_RV_REF(P2)>::value,
410
+ void*>::type = 0)
411
+ {
412
+ return this->emplace_hint(hint, boost::forward<P2>(obj));
413
+ }
414
+
415
+ template <class InputIt> void insert(InputIt, InputIt);
416
+
417
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
418
+ void insert(std::initializer_list<value_type>);
419
+ #endif
420
+
421
+ // extract
422
+
423
+ node_type extract(const_iterator position)
424
+ {
425
+ return node_type(
426
+ table_.extract_by_iterator_unique(position), table_.node_alloc());
427
+ }
428
+
429
+ node_type extract(const key_type& k)
430
+ {
431
+ return node_type(table_.extract_by_key(k), table_.node_alloc());
432
+ }
433
+
434
+ insert_return_type insert(BOOST_RV_REF(node_type) np)
435
+ {
436
+ insert_return_type result;
437
+ table_.move_insert_node_type_unique(np, result);
438
+ return boost::move(result);
439
+ }
440
+
441
+ iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
442
+ {
443
+ return table_.move_insert_node_type_with_hint_unique(hint, np);
444
+ }
445
+
446
+ #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
447
+ (BOOST_COMP_GNUC && BOOST_COMP_GNUC < BOOST_VERSION_NUMBER(4, 6, 0))
448
+ private:
449
+ // Note: Use r-value node_type to insert.
450
+ insert_return_type insert(node_type&);
451
+ iterator insert(const_iterator, node_type& np);
452
+
453
+ public:
454
+ #endif
455
+
456
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
457
+
458
+ template <class... Args>
459
+ std::pair<iterator, bool> try_emplace(
460
+ key_type const& k, BOOST_FWD_REF(Args)... args)
461
+ {
462
+ return table_.try_emplace_unique(k, boost::forward<Args>(args)...);
463
+ }
464
+
465
+ template <class... Args>
466
+ std::pair<iterator, bool> try_emplace(
467
+ BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
468
+ {
469
+ return table_.try_emplace_unique(
470
+ boost::move(k), boost::forward<Args>(args)...);
471
+ }
472
+
473
+ template <class... Args>
474
+ iterator try_emplace(
475
+ const_iterator hint, key_type const& k, BOOST_FWD_REF(Args)... args)
476
+ {
477
+ return table_.try_emplace_hint_unique(
478
+ hint, k, boost::forward<Args>(args)...);
479
+ }
480
+
481
+ template <class... Args>
482
+ iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
483
+ BOOST_FWD_REF(Args)... args)
484
+ {
485
+ return table_.try_emplace_hint_unique(
486
+ hint, boost::move(k), boost::forward<Args>(args)...);
487
+ }
488
+
489
+ #else
490
+
491
+ // In order to make this a template, this handles both:
492
+ // try_emplace(key const&)
493
+ // try_emplace(key&&)
494
+
495
+ template <typename Key>
496
+ std::pair<iterator, bool> try_emplace(BOOST_FWD_REF(Key) k)
497
+ {
498
+ return table_.try_emplace_unique(boost::forward<Key>(k));
499
+ }
500
+
501
+ // In order to make this a template, this handles both:
502
+ // try_emplace(const_iterator hint, key const&)
503
+ // try_emplace(const_iterator hint, key&&)
504
+
505
+ template <typename Key>
506
+ iterator try_emplace(const_iterator hint, BOOST_FWD_REF(Key) k)
507
+ {
508
+ return table_.try_emplace_hint_unique(hint, boost::forward<Key>(k));
509
+ }
510
+
511
+ // try_emplace(key const&, Args&&...)
512
+
513
+ template <typename A0>
514
+ std::pair<iterator, bool> try_emplace(
515
+ key_type const& k, BOOST_FWD_REF(A0) a0)
516
+ {
517
+ return table_.try_emplace_unique(
518
+ k, boost::unordered::detail::create_emplace_args(
519
+ boost::forward<A0>(a0)));
520
+ }
521
+
522
+ template <typename A0, typename A1>
523
+ std::pair<iterator, bool> try_emplace(
524
+ key_type const& k, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
525
+ {
526
+ return table_.try_emplace_unique(
527
+ k, boost::unordered::detail::create_emplace_args(
528
+ boost::forward<A0>(a0), boost::forward<A1>(a1)));
529
+ }
530
+
531
+ template <typename A0, typename A1, typename A2>
532
+ std::pair<iterator, bool> try_emplace(key_type const& k,
533
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
534
+ {
535
+ return table_.try_emplace_unique(k,
536
+ boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
537
+ boost::forward<A1>(a1), boost::forward<A2>(a2)));
538
+ }
539
+
540
+ // try_emplace(key&&, Args&&...)
541
+
542
+ template <typename A0>
543
+ std::pair<iterator, bool> try_emplace(
544
+ BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0)
545
+ {
546
+ return table_.try_emplace_unique(
547
+ boost::move(k), boost::unordered::detail::create_emplace_args(
548
+ boost::forward<A0>(a0)));
549
+ }
550
+
551
+ template <typename A0, typename A1>
552
+ std::pair<iterator, bool> try_emplace(
553
+ BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
554
+ {
555
+ return table_.try_emplace_unique(
556
+ boost::move(k), boost::unordered::detail::create_emplace_args(
557
+ boost::forward<A0>(a0), boost::forward<A1>(a1)));
558
+ }
559
+
560
+ template <typename A0, typename A1, typename A2>
561
+ std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k,
562
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
563
+ {
564
+ return table_.try_emplace_unique(boost::move(k),
565
+ boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
566
+ boost::forward<A1>(a1), boost::forward<A2>(a2)));
567
+ }
568
+
569
+ // try_emplace(const_iterator hint, key const&, Args&&...)
570
+
571
+ template <typename A0>
572
+ iterator try_emplace(
573
+ const_iterator hint, key_type const& k, BOOST_FWD_REF(A0) a0)
574
+ {
575
+ return table_.try_emplace_hint_unique(
576
+ hint, k, boost::unordered::detail::create_emplace_args(
577
+ boost::forward<A0>(a0)));
578
+ }
579
+
580
+ template <typename A0, typename A1>
581
+ iterator try_emplace(const_iterator hint, key_type const& k,
582
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
583
+ {
584
+ return table_.try_emplace_hint_unique(
585
+ hint, k, boost::unordered::detail::create_emplace_args(
586
+ boost::forward<A0>(a0), boost::forward<A1>(a1)));
587
+ }
588
+
589
+ template <typename A0, typename A1, typename A2>
590
+ iterator try_emplace(const_iterator hint, key_type const& k,
591
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
592
+ {
593
+ return table_.try_emplace_hint_unique(hint, k,
594
+ boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
595
+ boost::forward<A1>(a1), boost::forward<A2>(a2)));
596
+ }
597
+
598
+ // try_emplace(const_iterator hint, key&&, Args&&...)
599
+
600
+ template <typename A0>
601
+ iterator try_emplace(
602
+ const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0)
603
+ {
604
+ return table_.try_emplace_hint_unique(
605
+ hint, boost::move(k), boost::unordered::detail::create_emplace_args(
606
+ boost::forward<A0>(a0)));
607
+ }
608
+
609
+ template <typename A0, typename A1>
610
+ iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
611
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
612
+ {
613
+ return table_.try_emplace_hint_unique(hint, boost::move(k),
614
+ boost::unordered::detail::create_emplace_args(
615
+ boost::forward<A0>(a0), boost::forward<A1>(a1)));
616
+ }
617
+
618
+ template <typename A0, typename A1, typename A2>
619
+ iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
620
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
621
+ {
622
+ return table_.try_emplace_hint_unique(hint, boost::move(k),
623
+ boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
624
+ boost::forward<A1>(a1), boost::forward<A2>(a2)));
625
+ }
626
+
627
+ #define BOOST_UNORDERED_TRY_EMPLACE(z, n, _) \
628
+ \
629
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
630
+ std::pair<iterator, bool> try_emplace( \
631
+ key_type const& k, BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
632
+ { \
633
+ return table_.try_emplace_unique( \
634
+ k, boost::unordered::detail::create_emplace_args( \
635
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
636
+ } \
637
+ \
638
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
639
+ std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, \
640
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
641
+ { \
642
+ return table_.try_emplace_unique(boost::move(k), \
643
+ boost::unordered::detail::create_emplace_args( \
644
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
645
+ } \
646
+ \
647
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
648
+ iterator try_emplace(const_iterator hint, key_type const& k, \
649
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
650
+ { \
651
+ return table_.try_emplace_hint_unique( \
652
+ hint, k, boost::unordered::detail::create_emplace_args( \
653
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
654
+ } \
655
+ \
656
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
657
+ iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, \
658
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
659
+ { \
660
+ return table_.try_emplace_hint_unique(hint, boost::move(k), \
661
+ boost::unordered::detail::create_emplace_args( \
662
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
663
+ }
664
+
665
+ BOOST_UNORDERED_TRY_EMPLACE(1, 4, _)
666
+ BOOST_UNORDERED_TRY_EMPLACE(1, 5, _)
667
+ BOOST_UNORDERED_TRY_EMPLACE(1, 6, _)
668
+ BOOST_UNORDERED_TRY_EMPLACE(1, 7, _)
669
+ BOOST_UNORDERED_TRY_EMPLACE(1, 8, _)
670
+ BOOST_UNORDERED_TRY_EMPLACE(1, 9, _)
671
+ BOOST_PP_REPEAT_FROM_TO(10, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT),
672
+ BOOST_UNORDERED_TRY_EMPLACE, _)
673
+
674
+ #undef BOOST_UNORDERED_TRY_EMPLACE
675
+
676
+ #endif
677
+
678
+ template <class M>
679
+ std::pair<iterator, bool> insert_or_assign(
680
+ key_type const& k, BOOST_FWD_REF(M) obj)
681
+ {
682
+ return table_.insert_or_assign_unique(k, boost::forward<M>(obj));
683
+ }
684
+
685
+ template <class M>
686
+ std::pair<iterator, bool> insert_or_assign(
687
+ BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
688
+ {
689
+ return table_.insert_or_assign_unique(
690
+ boost::move(k), boost::forward<M>(obj));
691
+ }
692
+
693
+ template <class M>
694
+ iterator insert_or_assign(
695
+ const_iterator, key_type const& k, BOOST_FWD_REF(M) obj)
696
+ {
697
+ return table_.insert_or_assign_unique(k, boost::forward<M>(obj)).first;
698
+ }
699
+
700
+ template <class M>
701
+ iterator insert_or_assign(
702
+ const_iterator, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
703
+ {
704
+ return table_
705
+ .insert_or_assign_unique(boost::move(k), boost::forward<M>(obj))
706
+ .first;
707
+ }
708
+
709
+ iterator erase(iterator);
710
+ iterator erase(const_iterator);
711
+ size_type erase(const key_type&);
712
+ iterator erase(const_iterator, const_iterator);
713
+ BOOST_UNORDERED_DEPRECATED("Use erase instead")
714
+ void quick_erase(const_iterator it) { erase(it); }
715
+ BOOST_UNORDERED_DEPRECATED("Use erase instead")
716
+ void erase_return_void(const_iterator it) { erase(it); }
717
+
718
+ void swap(unordered_map&)
719
+ BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
720
+ boost::is_nothrow_swappable<H>::value&&
721
+ boost::is_nothrow_swappable<P>::value);
722
+ void clear() BOOST_NOEXCEPT { table_.clear_impl(); }
723
+
724
+ template <typename H2, typename P2>
725
+ void merge(boost::unordered_map<K, T, H2, P2, A>& source);
726
+
727
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
728
+ template <typename H2, typename P2>
729
+ void merge(boost::unordered_map<K, T, H2, P2, A>&& source);
730
+ #endif
731
+
732
+ template <typename H2, typename P2>
733
+ void merge(boost::unordered_multimap<K, T, H2, P2, A>& source);
734
+
735
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
736
+ template <typename H2, typename P2>
737
+ void merge(boost::unordered_multimap<K, T, H2, P2, A>&& source);
738
+ #endif
739
+
740
+ // observers
741
+
742
+ hasher hash_function() const;
743
+ key_equal key_eq() const;
744
+
745
+ // lookup
746
+
747
+ iterator find(const key_type&);
748
+ const_iterator find(const key_type&) const;
749
+
750
+ template <class CompatibleKey, class CompatibleHash,
751
+ class CompatiblePredicate>
752
+ iterator find(CompatibleKey const&, CompatibleHash const&,
753
+ CompatiblePredicate const&);
754
+
755
+ template <class CompatibleKey, class CompatibleHash,
756
+ class CompatiblePredicate>
757
+ const_iterator find(CompatibleKey const&, CompatibleHash const&,
758
+ CompatiblePredicate const&) const;
759
+
760
+ size_type count(const key_type&) const;
761
+
762
+ std::pair<iterator, iterator> equal_range(const key_type&);
763
+ std::pair<const_iterator, const_iterator> equal_range(
764
+ const key_type&) const;
765
+
766
+ mapped_type& operator[](const key_type&);
767
+ mapped_type& operator[](BOOST_RV_REF(key_type));
768
+ mapped_type& at(const key_type&);
769
+ mapped_type const& at(const key_type&) const;
770
+
771
+ // bucket interface
772
+
773
+ size_type bucket_count() const BOOST_NOEXCEPT
774
+ {
775
+ return table_.bucket_count_;
776
+ }
777
+
778
+ size_type max_bucket_count() const BOOST_NOEXCEPT
779
+ {
780
+ return table_.max_bucket_count();
781
+ }
782
+
783
+ size_type bucket_size(size_type) const;
784
+
785
+ size_type bucket(const key_type& k) const
786
+ {
787
+ return table_.hash_to_bucket(table_.hash(k));
788
+ }
789
+
790
+ local_iterator begin(size_type n)
791
+ {
792
+ return local_iterator(table_.begin(n), n, table_.bucket_count_);
793
+ }
794
+
795
+ const_local_iterator begin(size_type n) const
796
+ {
797
+ return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
798
+ }
799
+
800
+ local_iterator end(size_type) { return local_iterator(); }
801
+
802
+ const_local_iterator end(size_type) const
803
+ {
804
+ return const_local_iterator();
805
+ }
806
+
807
+ const_local_iterator cbegin(size_type n) const
808
+ {
809
+ return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
810
+ }
811
+
812
+ const_local_iterator cend(size_type) const
813
+ {
814
+ return const_local_iterator();
815
+ }
816
+
817
+ // hash policy
818
+
819
+ float load_factor() const BOOST_NOEXCEPT;
820
+ float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; }
821
+ void max_load_factor(float) BOOST_NOEXCEPT;
822
+ void rehash(size_type);
823
+ void reserve(size_type);
824
+
825
+ #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
826
+ friend bool operator==
827
+ <K, T, H, P, A>(unordered_map const&, unordered_map const&);
828
+ friend bool operator!=
829
+ <K, T, H, P, A>(unordered_map const&, unordered_map const&);
830
+ #endif
831
+ }; // class template unordered_map
832
+
833
+ #if BOOST_UNORDERED_TEMPLATE_DEDUCTION_GUIDES
834
+
835
+ namespace detail {
836
+ template <typename T>
837
+ using iter_key_t =
838
+ typename std::iterator_traits<T>::value_type::first_type;
839
+ template <typename T>
840
+ using iter_val_t =
841
+ typename std::iterator_traits<T>::value_type::second_type;
842
+ template <typename T>
843
+ using iter_to_alloc_t =
844
+ typename std::pair<iter_key_t<T> const, iter_val_t<T> >;
845
+ }
846
+
847
+ template <class InputIterator,
848
+ class Hash =
849
+ boost::hash<boost::unordered::detail::iter_key_t<InputIterator> >,
850
+ class Pred =
851
+ std::equal_to<boost::unordered::detail::iter_key_t<InputIterator> >,
852
+ class Allocator = std::allocator<
853
+ boost::unordered::detail::iter_to_alloc_t<InputIterator> > >
854
+ unordered_map(InputIterator, InputIterator,
855
+ std::size_t = boost::unordered::detail::default_bucket_count,
856
+ Hash = Hash(), Pred = Pred(), Allocator = Allocator())
857
+ ->unordered_map<boost::unordered::detail::iter_key_t<InputIterator>,
858
+ boost::unordered::detail::iter_val_t<InputIterator>, Hash, Pred,
859
+ Allocator>;
860
+
861
+ template <class Key, class T, class Hash = boost::hash<Key>,
862
+ class Pred = std::equal_to<Key>,
863
+ class Allocator = std::allocator<std::pair<const Key, T> > >
864
+ unordered_map(std::initializer_list<std::pair<const Key, T> >,
865
+ std::size_t = boost::unordered::detail::default_bucket_count,
866
+ Hash = Hash(), Pred = Pred(), Allocator = Allocator())
867
+ ->unordered_map<Key, T, Hash, Pred, Allocator>;
868
+
869
+ template <class InputIterator, class Allocator>
870
+ unordered_map(InputIterator, InputIterator, std::size_t, Allocator)
871
+ ->unordered_map<boost::unordered::detail::iter_key_t<InputIterator>,
872
+ boost::unordered::detail::iter_val_t<InputIterator>,
873
+ boost::hash<boost::unordered::detail::iter_key_t<InputIterator> >,
874
+ std::equal_to<boost::unordered::detail::iter_key_t<InputIterator> >,
875
+ Allocator>;
876
+
877
+ template <class InputIterator, class Allocator>
878
+ unordered_map(InputIterator, InputIterator, Allocator)
879
+ ->unordered_map<boost::unordered::detail::iter_key_t<InputIterator>,
880
+ boost::unordered::detail::iter_val_t<InputIterator>,
881
+ boost::hash<boost::unordered::detail::iter_key_t<InputIterator> >,
882
+ std::equal_to<boost::unordered::detail::iter_key_t<InputIterator> >,
883
+ Allocator>;
884
+
885
+ template <class InputIterator, class Hash, class Allocator>
886
+ unordered_map(InputIterator, InputIterator, std::size_t, Hash, Allocator)
887
+ ->unordered_map<boost::unordered::detail::iter_key_t<InputIterator>,
888
+ boost::unordered::detail::iter_val_t<InputIterator>, Hash,
889
+ std::equal_to<boost::unordered::detail::iter_key_t<InputIterator> >,
890
+ Allocator>;
891
+
892
+ template <class Key, class T, typename Allocator>
893
+ unordered_map(
894
+ std::initializer_list<std::pair<const Key, T> >, std::size_t, Allocator)
895
+ ->unordered_map<Key, T, boost::hash<Key>, std::equal_to<Key>, Allocator>;
896
+
897
+ template <class Key, class T, typename Allocator>
898
+ unordered_map(std::initializer_list<std::pair<const Key, T> >, Allocator)
899
+ ->unordered_map<Key, T, boost::hash<Key>, std::equal_to<Key>, Allocator>;
900
+
901
+ template <class Key, class T, class Hash, class Allocator>
902
+ unordered_map(std::initializer_list<std::pair<const Key, T> >, std::size_t,
903
+ Hash, Allocator)
904
+ ->unordered_map<Key, T, Hash, std::equal_to<Key>, Allocator>;
905
+
906
+ #endif
907
+
908
+ template <class K, class T, class H, class P, class A>
909
+ class unordered_multimap
121
910
  {
122
- }
123
- #elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
124
- unordered_map(unordered_map&& other)
911
+ #if defined(BOOST_UNORDERED_USE_MOVE)
912
+ BOOST_COPYABLE_AND_MOVABLE(unordered_multimap)
913
+ #endif
914
+ template <typename, typename, typename, typename, typename>
915
+ friend class unordered_map;
916
+
917
+ public:
918
+ typedef K key_type;
919
+ typedef T mapped_type;
920
+ typedef std::pair<const K, T> value_type;
921
+ typedef H hasher;
922
+ typedef P key_equal;
923
+ typedef A allocator_type;
924
+
925
+ private:
926
+ typedef boost::unordered::detail::map<A, K, T, H, P> types;
927
+ typedef typename types::value_allocator_traits value_allocator_traits;
928
+ typedef typename types::table table;
929
+ typedef typename table::node_pointer node_pointer;
930
+ typedef typename table::link_pointer link_pointer;
931
+
932
+ public:
933
+ typedef typename value_allocator_traits::pointer pointer;
934
+ typedef typename value_allocator_traits::const_pointer const_pointer;
935
+
936
+ typedef value_type& reference;
937
+ typedef value_type const& const_reference;
938
+
939
+ typedef std::size_t size_type;
940
+ typedef std::ptrdiff_t difference_type;
941
+
942
+ typedef typename table::iterator iterator;
943
+ typedef typename table::c_iterator const_iterator;
944
+ typedef typename table::l_iterator local_iterator;
945
+ typedef typename table::cl_iterator const_local_iterator;
946
+ typedef typename types::node_type node_type;
947
+
948
+ private:
949
+ table table_;
950
+
951
+ public:
952
+ // constructors
953
+
954
+ unordered_multimap();
955
+
956
+ explicit unordered_multimap(size_type, const hasher& = hasher(),
957
+ const key_equal& = key_equal(),
958
+ const allocator_type& = allocator_type());
959
+
960
+ template <class InputIt>
961
+ unordered_multimap(InputIt, InputIt,
962
+ size_type = boost::unordered::detail::default_bucket_count,
963
+ const hasher& = hasher(), const key_equal& = key_equal(),
964
+ const allocator_type& = allocator_type());
965
+
966
+ unordered_multimap(unordered_multimap const&);
967
+
968
+ #if defined(BOOST_UNORDERED_USE_MOVE) || \
969
+ !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
970
+ unordered_multimap(BOOST_RV_REF(unordered_multimap) other)
125
971
  BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
126
- : table_(other.table_, boost::unordered::detail::move_tag())
127
- {
128
- }
972
+ : table_(other.table_, boost::unordered::detail::move_tag())
973
+ {
974
+ // The move is done in table_
975
+ }
129
976
  #endif
130
977
 
978
+ explicit unordered_multimap(allocator_type const&);
979
+
980
+ unordered_multimap(unordered_multimap const&, allocator_type const&);
981
+
982
+ unordered_multimap(
983
+ BOOST_RV_REF(unordered_multimap), allocator_type const&);
984
+
131
985
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
132
- unordered_map(std::initializer_list<value_type>,
986
+ unordered_multimap(std::initializer_list<value_type>,
133
987
  size_type = boost::unordered::detail::default_bucket_count,
134
988
  const hasher& = hasher(), const key_equal& l = key_equal(),
135
989
  const allocator_type& = allocator_type());
136
- unordered_map(std::initializer_list<value_type>, size_type, const hasher&,
137
- const allocator_type&);
138
- unordered_map(
990
+ #endif
991
+
992
+ explicit unordered_multimap(size_type, const allocator_type&);
993
+
994
+ explicit unordered_multimap(
995
+ size_type, const hasher&, const allocator_type&);
996
+
997
+ template <class InputIt>
998
+ unordered_multimap(InputIt, InputIt, size_type, const allocator_type&);
999
+
1000
+ template <class InputIt>
1001
+ unordered_multimap(
1002
+ InputIt, InputIt, size_type, const hasher&, const allocator_type&);
1003
+
1004
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1005
+ unordered_multimap(
139
1006
  std::initializer_list<value_type>, size_type, const allocator_type&);
1007
+
1008
+ unordered_multimap(std::initializer_list<value_type>, size_type,
1009
+ const hasher&, const allocator_type&);
140
1010
  #endif
141
1011
 
142
- // Destructor
1012
+ // Destructor
143
1013
 
144
- ~unordered_map() BOOST_NOEXCEPT;
1014
+ ~unordered_multimap() BOOST_NOEXCEPT;
145
1015
 
146
1016
  // Assign
147
1017
 
148
1018
  #if defined(BOOST_UNORDERED_USE_MOVE)
149
- unordered_map& operator=(BOOST_COPY_ASSIGN_REF(unordered_map) x)
150
- {
151
- table_.assign(x.table_);
1019
+ unordered_multimap& operator=(BOOST_COPY_ASSIGN_REF(unordered_multimap) x)
1020
+ {
1021
+ table_.assign(x.table_, boost::unordered::detail::false_type());
152
1022
  return *this;
153
- }
154
-
155
- unordered_map& operator=(BOOST_RV_REF(unordered_map) x)
156
- {
157
- table_.move_assign(x.table_);
1023
+ }
1024
+
1025
+ unordered_multimap& operator=(BOOST_RV_REF(unordered_multimap) x)
1026
+ BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
1027
+ boost::is_nothrow_move_assignable<H>::value&&
1028
+ boost::is_nothrow_move_assignable<P>::value)
1029
+ {
1030
+ table_.move_assign(x.table_, boost::unordered::detail::false_type());
158
1031
  return *this;
159
- }
1032
+ }
160
1033
  #else
161
- unordered_map& operator=(unordered_map const& x)
162
- {
163
- table_.assign(x.table_);
1034
+ unordered_multimap& operator=(unordered_multimap const& x)
1035
+ {
1036
+ table_.assign(x.table_, boost::unordered::detail::false_type());
164
1037
  return *this;
165
- }
1038
+ }
166
1039
 
167
1040
  #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
168
- unordered_map& operator=(unordered_map&& x)
169
- {
170
- table_.move_assign(x.table_);
1041
+ unordered_multimap& operator=(unordered_multimap&& x)
1042
+ BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
1043
+ boost::is_nothrow_move_assignable<H>::value&&
1044
+ boost::is_nothrow_move_assignable<P>::value)
1045
+ {
1046
+ table_.move_assign(x.table_, boost::unordered::detail::false_type());
171
1047
  return *this;
172
- }
1048
+ }
173
1049
  #endif
174
1050
  #endif
175
1051
 
176
1052
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
177
- unordered_map& operator=(std::initializer_list<value_type>);
1053
+ unordered_multimap& operator=(std::initializer_list<value_type>);
178
1054
  #endif
179
1055
 
180
- allocator_type get_allocator() const BOOST_NOEXCEPT
181
- {
1056
+ allocator_type get_allocator() const BOOST_NOEXCEPT
1057
+ {
182
1058
  return table_.node_alloc();
183
- }
1059
+ }
1060
+
1061
+ // iterators
1062
+
1063
+ iterator begin() BOOST_NOEXCEPT { return iterator(table_.begin()); }
1064
+
1065
+ const_iterator begin() const BOOST_NOEXCEPT
1066
+ {
1067
+ return const_iterator(table_.begin());
1068
+ }
1069
+
1070
+ iterator end() BOOST_NOEXCEPT { return iterator(); }
1071
+
1072
+ const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); }
1073
+
1074
+ const_iterator cbegin() const BOOST_NOEXCEPT
1075
+ {
1076
+ return const_iterator(table_.begin());
1077
+ }
1078
+
1079
+ const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); }
1080
+
1081
+ // size and capacity
1082
+
1083
+ bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
1084
+
1085
+ size_type size() const BOOST_NOEXCEPT { return table_.size_; }
1086
+
1087
+ size_type max_size() const BOOST_NOEXCEPT;
1088
+
1089
+ // emplace
1090
+
1091
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
1092
+
1093
+ template <class... Args> iterator emplace(BOOST_FWD_REF(Args)... args)
1094
+ {
1095
+ return iterator(table_.emplace_equiv(
1096
+ boost::unordered::detail::func::construct_node_from_args(
1097
+ table_.node_alloc(), boost::forward<Args>(args)...)));
1098
+ }
1099
+
1100
+ #else
1101
+
1102
+ #if !BOOST_UNORDERED_SUN_WORKAROUNDS1
1103
+
1104
+ // 0 argument emplace requires special treatment in case
1105
+ // the container is instantiated with a value type that
1106
+ // doesn't have a default constructor.
1107
+
1108
+ iterator emplace(boost::unordered::detail::empty_emplace =
1109
+ boost::unordered::detail::empty_emplace(),
1110
+ value_type v = value_type())
1111
+ {
1112
+ return this->emplace(boost::move(v));
1113
+ }
1114
+
1115
+ #endif
1116
+
1117
+ template <typename A0> iterator emplace(BOOST_FWD_REF(A0) a0)
1118
+ {
1119
+ return iterator(table_.emplace_equiv(
1120
+ boost::unordered::detail::func::construct_node_from_args(
1121
+ table_.node_alloc(), boost::unordered::detail::create_emplace_args(
1122
+ boost::forward<A0>(a0)))));
1123
+ }
1124
+
1125
+ template <typename A0, typename A1>
1126
+ iterator emplace(BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
1127
+ {
1128
+ return iterator(table_.emplace_equiv(
1129
+ boost::unordered::detail::func::construct_node_from_args(
1130
+ table_.node_alloc(),
1131
+ boost::unordered::detail::create_emplace_args(
1132
+ boost::forward<A0>(a0), boost::forward<A1>(a1)))));
1133
+ }
1134
+
1135
+ template <typename A0, typename A1, typename A2>
1136
+ iterator emplace(
1137
+ BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
1138
+ {
1139
+ return iterator(table_.emplace_equiv(
1140
+ boost::unordered::detail::func::construct_node_from_args(
1141
+ table_.node_alloc(),
1142
+ boost::unordered::detail::create_emplace_args(
1143
+ boost::forward<A0>(a0), boost::forward<A1>(a1),
1144
+ boost::forward<A2>(a2)))));
1145
+ }
1146
+
1147
+ #endif
1148
+
1149
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
1150
+
1151
+ template <class... Args>
1152
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
1153
+ {
1154
+ return iterator(table_.emplace_hint_equiv(
1155
+ hint, boost::unordered::detail::func::construct_node_from_args(
1156
+ table_.node_alloc(), boost::forward<Args>(args)...)));
1157
+ }
1158
+
1159
+ #else
1160
+
1161
+ #if !BOOST_UNORDERED_SUN_WORKAROUNDS1
1162
+
1163
+ iterator emplace_hint(const_iterator hint,
1164
+ boost::unordered::detail::empty_emplace =
1165
+ boost::unordered::detail::empty_emplace(),
1166
+ value_type v = value_type())
1167
+ {
1168
+ return this->emplace_hint(hint, boost::move(v));
1169
+ }
1170
+
1171
+ #endif
1172
+
1173
+ template <typename A0>
1174
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
1175
+ {
1176
+ return iterator(table_.emplace_hint_equiv(hint,
1177
+ boost::unordered::detail::func::construct_node_from_args(
1178
+ table_.node_alloc(), boost::unordered::detail::create_emplace_args(
1179
+ boost::forward<A0>(a0)))));
1180
+ }
1181
+
1182
+ template <typename A0, typename A1>
1183
+ iterator emplace_hint(
1184
+ const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
1185
+ {
1186
+ return iterator(table_.emplace_hint_equiv(
1187
+ hint, boost::unordered::detail::func::construct_node_from_args(
1188
+ table_.node_alloc(),
1189
+ boost::unordered::detail::create_emplace_args(
1190
+ boost::forward<A0>(a0), boost::forward<A1>(a1)))));
1191
+ }
1192
+
1193
+ template <typename A0, typename A1, typename A2>
1194
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
1195
+ BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
1196
+ {
1197
+ return iterator(table_.emplace_hint_equiv(
1198
+ hint, boost::unordered::detail::func::construct_node_from_args(
1199
+ table_.node_alloc(),
1200
+ boost::unordered::detail::create_emplace_args(
1201
+ boost::forward<A0>(a0), boost::forward<A1>(a1),
1202
+ boost::forward<A2>(a2)))));
1203
+ }
1204
+
1205
+ #endif
1206
+
1207
+ #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
1208
+
1209
+ #define BOOST_UNORDERED_EMPLACE(z, n, _) \
1210
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
1211
+ iterator emplace(BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
1212
+ { \
1213
+ return iterator(table_.emplace_equiv( \
1214
+ boost::unordered::detail::func::construct_node_from_args( \
1215
+ table_.node_alloc(), \
1216
+ boost::unordered::detail::create_emplace_args( \
1217
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))))); \
1218
+ } \
1219
+ \
1220
+ template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
1221
+ iterator emplace_hint( \
1222
+ const_iterator hint, BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
1223
+ { \
1224
+ return iterator(table_.emplace_hint_equiv( \
1225
+ hint, boost::unordered::detail::func::construct_node_from_args( \
1226
+ table_.node_alloc(), \
1227
+ boost::unordered::detail::create_emplace_args( \
1228
+ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))))); \
1229
+ }
1230
+
1231
+ BOOST_UNORDERED_EMPLACE(1, 4, _)
1232
+ BOOST_UNORDERED_EMPLACE(1, 5, _)
1233
+ BOOST_UNORDERED_EMPLACE(1, 6, _)
1234
+ BOOST_UNORDERED_EMPLACE(1, 7, _)
1235
+ BOOST_UNORDERED_EMPLACE(1, 8, _)
1236
+ BOOST_UNORDERED_EMPLACE(1, 9, _)
1237
+ BOOST_PP_REPEAT_FROM_TO(10, BOOST_PP_INC(BOOST_UNORDERED_EMPLACE_LIMIT),
1238
+ BOOST_UNORDERED_EMPLACE, _)
1239
+
1240
+ #undef BOOST_UNORDERED_EMPLACE
1241
+
1242
+ #endif
1243
+
1244
+ iterator insert(value_type const& x) { return this->emplace(x); }
1245
+
1246
+ iterator insert(BOOST_RV_REF(value_type) x)
1247
+ {
1248
+ return this->emplace(boost::move(x));
1249
+ }
1250
+
1251
+ template <class P2>
1252
+ iterator insert(BOOST_RV_REF(P2) obj,
1253
+ typename boost::enable_if_c<
1254
+ boost::is_constructible<value_type, BOOST_RV_REF(P2)>::value,
1255
+ void*>::type = 0)
1256
+ {
1257
+ return this->emplace(boost::forward<P2>(obj));
1258
+ }
1259
+
1260
+ iterator insert(const_iterator hint, value_type const& x)
1261
+ {
1262
+ return this->emplace_hint(hint, x);
1263
+ }
1264
+
1265
+ iterator insert(const_iterator hint, BOOST_RV_REF(value_type) x)
1266
+ {
1267
+ return this->emplace_hint(hint, boost::move(x));
1268
+ }
1269
+
1270
+ template <class P2>
1271
+ iterator insert(const_iterator hint, BOOST_RV_REF(P2) obj,
1272
+ typename boost::enable_if_c<
1273
+ boost::is_constructible<value_type, BOOST_RV_REF(P2)>::value,
1274
+ void*>::type = 0)
1275
+ {
1276
+ return this->emplace_hint(hint, boost::forward<P2>(obj));
1277
+ }
1278
+
1279
+ template <class InputIt> void insert(InputIt, InputIt);
1280
+
1281
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1282
+ void insert(std::initializer_list<value_type>);
1283
+ #endif
1284
+
1285
+ // extract
1286
+
1287
+ node_type extract(const_iterator position)
1288
+ {
1289
+ return node_type(
1290
+ table_.extract_by_iterator_equiv(position), table_.node_alloc());
1291
+ }
1292
+
1293
+ node_type extract(const key_type& k)
1294
+ {
1295
+ return node_type(table_.extract_by_key(k), table_.node_alloc());
1296
+ }
1297
+
1298
+ iterator insert(BOOST_RV_REF(node_type) np)
1299
+ {
1300
+ return table_.move_insert_node_type_equiv(np);
1301
+ }
1302
+
1303
+ iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
1304
+ {
1305
+ return table_.move_insert_node_type_with_hint_equiv(hint, np);
1306
+ }
1307
+
1308
+ #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
1309
+ (BOOST_COMP_GNUC && BOOST_COMP_GNUC < BOOST_VERSION_NUMBER(4, 6, 0))
1310
+ private:
1311
+ // Note: Use r-value node_type to insert.
1312
+ iterator insert(node_type&);
1313
+ iterator insert(const_iterator, node_type& np);
1314
+
1315
+ public:
1316
+ #endif
1317
+
1318
+ iterator erase(iterator);
1319
+ iterator erase(const_iterator);
1320
+ size_type erase(const key_type&);
1321
+ iterator erase(const_iterator, const_iterator);
1322
+ BOOST_UNORDERED_DEPRECATED("Use erase instead")
1323
+ void quick_erase(const_iterator it) { erase(it); }
1324
+ BOOST_UNORDERED_DEPRECATED("Use erase instead")
1325
+ void erase_return_void(const_iterator it) { erase(it); }
1326
+
1327
+ void swap(unordered_multimap&)
1328
+ BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
1329
+ boost::is_nothrow_swappable<H>::value&&
1330
+ boost::is_nothrow_swappable<P>::value);
1331
+ void clear() BOOST_NOEXCEPT { table_.clear_impl(); }
1332
+
1333
+ template <typename H2, typename P2>
1334
+ void merge(boost::unordered_multimap<K, T, H2, P2, A>& source);
1335
+
1336
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1337
+ template <typename H2, typename P2>
1338
+ void merge(boost::unordered_multimap<K, T, H2, P2, A>&& source);
1339
+ #endif
1340
+
1341
+ template <typename H2, typename P2>
1342
+ void merge(boost::unordered_map<K, T, H2, P2, A>& source);
1343
+
1344
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1345
+ template <typename H2, typename P2>
1346
+ void merge(boost::unordered_map<K, T, H2, P2, A>&& source);
1347
+ #endif
184
1348
 
185
- // size and capacity
1349
+ // observers
186
1350
 
187
- bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
1351
+ hasher hash_function() const;
1352
+ key_equal key_eq() const;
188
1353
 
189
- size_type size() const BOOST_NOEXCEPT { return table_.size_; }
1354
+ // lookup
190
1355
 
191
- size_type max_size() const BOOST_NOEXCEPT;
1356
+ iterator find(const key_type&);
1357
+ const_iterator find(const key_type&) const;
192
1358
 
193
- // iterators
1359
+ template <class CompatibleKey, class CompatibleHash,
1360
+ class CompatiblePredicate>
1361
+ iterator find(CompatibleKey const&, CompatibleHash const&,
1362
+ CompatiblePredicate const&);
194
1363
 
195
- iterator begin() BOOST_NOEXCEPT { return iterator(table_.begin()); }
1364
+ template <class CompatibleKey, class CompatibleHash,
1365
+ class CompatiblePredicate>
1366
+ const_iterator find(CompatibleKey const&, CompatibleHash const&,
1367
+ CompatiblePredicate const&) const;
196
1368
 
197
- const_iterator begin() const BOOST_NOEXCEPT
198
- {
199
- return const_iterator(table_.begin());
200
- }
1369
+ size_type count(const key_type&) const;
201
1370
 
202
- iterator end() BOOST_NOEXCEPT { return iterator(); }
1371
+ std::pair<iterator, iterator> equal_range(const key_type&);
1372
+ std::pair<const_iterator, const_iterator> equal_range(
1373
+ const key_type&) const;
203
1374
 
204
- const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); }
1375
+ // bucket interface
205
1376
 
206
- const_iterator cbegin() const BOOST_NOEXCEPT
207
- {
208
- return const_iterator(table_.begin());
209
- }
1377
+ size_type bucket_count() const BOOST_NOEXCEPT
1378
+ {
1379
+ return table_.bucket_count_;
1380
+ }
210
1381
 
211
- const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); }
1382
+ size_type max_bucket_count() const BOOST_NOEXCEPT
1383
+ {
1384
+ return table_.max_bucket_count();
1385
+ }
212
1386
 
213
- // extract
1387
+ size_type bucket_size(size_type) const;
214
1388
 
215
- node_type extract(const_iterator position)
216
- {
217
- return node_type(
218
- table_.extract_by_iterator(position), table_.node_alloc());
219
- }
1389
+ size_type bucket(const key_type& k) const
1390
+ {
1391
+ return table_.hash_to_bucket(table_.hash(k));
1392
+ }
220
1393
 
221
- node_type extract(const key_type& k)
222
- {
223
- return node_type(table_.extract_by_key(k), table_.node_alloc());
224
- }
1394
+ local_iterator begin(size_type n)
1395
+ {
1396
+ return local_iterator(table_.begin(n), n, table_.bucket_count_);
1397
+ }
225
1398
 
226
- // emplace
1399
+ const_local_iterator begin(size_type n) const
1400
+ {
1401
+ return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
1402
+ }
227
1403
 
228
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
229
- template <class... Args>
230
- std::pair<iterator, bool> emplace(BOOST_FWD_REF(Args)... args)
231
- {
232
- return table_.emplace(boost::forward<Args>(args)...);
233
- }
1404
+ local_iterator end(size_type) { return local_iterator(); }
234
1405
 
235
- template <class... Args>
236
- iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
237
- {
238
- return table_.emplace_hint(hint, boost::forward<Args>(args)...);
239
- }
1406
+ const_local_iterator end(size_type) const
1407
+ {
1408
+ return const_local_iterator();
1409
+ }
240
1410
 
241
- template <class... Args>
242
- std::pair<iterator, bool> try_emplace(
243
- key_type const& k, BOOST_FWD_REF(Args)... args)
244
- {
245
- return table_.try_emplace_impl(k, boost::forward<Args>(args)...);
246
- }
1411
+ const_local_iterator cbegin(size_type n) const
1412
+ {
1413
+ return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
1414
+ }
247
1415
 
248
- template <class... Args>
249
- iterator try_emplace(
250
- const_iterator hint, key_type const& k, BOOST_FWD_REF(Args)... args)
251
- {
252
- return table_.try_emplace_hint_impl(
253
- hint, k, boost::forward<Args>(args)...);
254
- }
1416
+ const_local_iterator cend(size_type) const
1417
+ {
1418
+ return const_local_iterator();
1419
+ }
255
1420
 
256
- template <class... Args>
257
- std::pair<iterator, bool> try_emplace(
258
- BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
259
- {
260
- return table_.try_emplace_impl(
261
- boost::move(k), boost::forward<Args>(args)...);
262
- }
1421
+ // hash policy
263
1422
 
264
- template <class... Args>
265
- iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
266
- BOOST_FWD_REF(Args)... args)
267
- {
268
- return table_.try_emplace_hint_impl(
269
- hint, boost::move(k), boost::forward<Args>(args)...);
270
- }
271
- #else
1423
+ float load_factor() const BOOST_NOEXCEPT;
1424
+ float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; }
1425
+ void max_load_factor(float) BOOST_NOEXCEPT;
1426
+ void rehash(size_type);
1427
+ void reserve(size_type);
272
1428
 
273
- #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
1429
+ #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
1430
+ friend bool operator==
1431
+ <K, T, H, P, A>(unordered_multimap const&, unordered_multimap const&);
1432
+ friend bool operator!=
1433
+ <K, T, H, P, A>(unordered_multimap const&, unordered_multimap const&);
1434
+ #endif
1435
+ }; // class template unordered_multimap
1436
+
1437
+ #if BOOST_UNORDERED_TEMPLATE_DEDUCTION_GUIDES
1438
+
1439
+ template <class InputIterator,
1440
+ class Hash =
1441
+ boost::hash<boost::unordered::detail::iter_key_t<InputIterator> >,
1442
+ class Pred =
1443
+ std::equal_to<boost::unordered::detail::iter_key_t<InputIterator> >,
1444
+ class Allocator = std::allocator<
1445
+ boost::unordered::detail::iter_to_alloc_t<InputIterator> > >
1446
+ unordered_multimap(InputIterator, InputIterator,
1447
+ std::size_t = boost::unordered::detail::default_bucket_count,
1448
+ Hash = Hash(), Pred = Pred(), Allocator = Allocator())
1449
+ ->unordered_multimap<boost::unordered::detail::iter_key_t<InputIterator>,
1450
+ boost::unordered::detail::iter_val_t<InputIterator>, Hash, Pred,
1451
+ Allocator>;
1452
+
1453
+ template <class Key, class T, class Hash = boost::hash<Key>,
1454
+ class Pred = std::equal_to<Key>,
1455
+ class Allocator = std::allocator<std::pair<const Key, T> > >
1456
+ unordered_multimap(std::initializer_list<std::pair<const Key, T> >,
1457
+ std::size_t = boost::unordered::detail::default_bucket_count,
1458
+ Hash = Hash(), Pred = Pred(), Allocator = Allocator())
1459
+ ->unordered_multimap<Key, T, Hash, Pred, Allocator>;
1460
+
1461
+ template <class InputIterator, class Allocator>
1462
+ unordered_multimap(InputIterator, InputIterator, std::size_t, Allocator)
1463
+ ->unordered_multimap<boost::unordered::detail::iter_key_t<InputIterator>,
1464
+ boost::unordered::detail::iter_val_t<InputIterator>,
1465
+ boost::hash<boost::unordered::detail::iter_key_t<InputIterator> >,
1466
+ std::equal_to<boost::unordered::detail::iter_key_t<InputIterator> >,
1467
+ Allocator>;
1468
+
1469
+ template <class InputIterator, class Allocator>
1470
+ unordered_multimap(InputIterator, InputIterator, Allocator)
1471
+ ->unordered_multimap<boost::unordered::detail::iter_key_t<InputIterator>,
1472
+ boost::unordered::detail::iter_val_t<InputIterator>,
1473
+ boost::hash<boost::unordered::detail::iter_key_t<InputIterator> >,
1474
+ std::equal_to<boost::unordered::detail::iter_key_t<InputIterator> >,
1475
+ Allocator>;
1476
+
1477
+ template <class InputIterator, class Hash, class Allocator>
1478
+ unordered_multimap(
1479
+ InputIterator, InputIterator, std::size_t, Hash, Allocator)
1480
+ ->unordered_multimap<boost::unordered::detail::iter_key_t<InputIterator>,
1481
+ boost::unordered::detail::iter_val_t<InputIterator>, Hash,
1482
+ std::equal_to<boost::unordered::detail::iter_key_t<InputIterator> >,
1483
+ Allocator>;
274
1484
 
275
- // 0 argument emplace requires special treatment in case
276
- // the container is instantiated with a value type that
277
- // doesn't have a default constructor.
1485
+ template <class Key, class T, typename Allocator>
1486
+ unordered_multimap(
1487
+ std::initializer_list<std::pair<const Key, T> >, std::size_t, Allocator)
1488
+ ->unordered_multimap<Key, T, boost::hash<Key>, std::equal_to<Key>,
1489
+ Allocator>;
278
1490
 
279
- std::pair<iterator, bool> emplace(
280
- boost::unordered::detail::empty_emplace =
281
- boost::unordered::detail::empty_emplace(),
282
- value_type v = value_type())
283
- {
284
- return this->emplace(boost::move(v));
285
- }
1491
+ template <class Key, class T, typename Allocator>
1492
+ unordered_multimap(
1493
+ std::initializer_list<std::pair<const Key, T> >, Allocator)
1494
+ ->unordered_multimap<Key, T, boost::hash<Key>, std::equal_to<Key>,
1495
+ Allocator>;
286
1496
 
287
- iterator emplace_hint(const_iterator hint,
288
- boost::unordered::detail::empty_emplace =
289
- boost::unordered::detail::empty_emplace(),
290
- value_type v = value_type())
291
- {
292
- return this->emplace_hint(hint, boost::move(v));
293
- }
1497
+ template <class Key, class T, class Hash, class Allocator>
1498
+ unordered_multimap(std::initializer_list<std::pair<const Key, T> >,
1499
+ std::size_t, Hash, Allocator)
1500
+ ->unordered_multimap<Key, T, Hash, std::equal_to<Key>, Allocator>;
294
1501
 
295
1502
  #endif
296
1503
 
297
- template <typename Key>
298
- std::pair<iterator, bool> try_emplace(BOOST_FWD_REF(Key) k)
299
- {
300
- return table_.try_emplace_impl(boost::forward<Key>(k));
301
- }
1504
+ ////////////////////////////////////////////////////////////////////////////
302
1505
 
303
- template <typename Key>
304
- iterator try_emplace(const_iterator hint, BOOST_FWD_REF(Key) k)
1506
+ template <class K, class T, class H, class P, class A>
1507
+ unordered_map<K, T, H, P, A>::unordered_map()
1508
+ : table_(boost::unordered::detail::default_bucket_count, hasher(),
1509
+ key_equal(), allocator_type())
305
1510
  {
306
- return table_.try_emplace_hint_impl(hint, boost::forward<Key>(k));
307
1511
  }
308
1512
 
309
- template <typename A0>
310
- std::pair<iterator, bool> emplace(BOOST_FWD_REF(A0) a0)
1513
+ template <class K, class T, class H, class P, class A>
1514
+ unordered_map<K, T, H, P, A>::unordered_map(size_type n, const hasher& hf,
1515
+ const key_equal& eql, const allocator_type& a)
1516
+ : table_(n, hf, eql, a)
311
1517
  {
312
- return table_.emplace(boost::unordered::detail::create_emplace_args(
313
- boost::forward<A0>(a0)));
314
1518
  }
315
1519
 
316
- template <typename A0>
317
- iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
1520
+ template <class K, class T, class H, class P, class A>
1521
+ template <class InputIt>
1522
+ unordered_map<K, T, H, P, A>::unordered_map(InputIt f, InputIt l,
1523
+ size_type n, const hasher& hf, const key_equal& eql,
1524
+ const allocator_type& a)
1525
+ : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
318
1526
  {
319
- return table_.emplace_hint(
320
- hint, boost::unordered::detail::create_emplace_args(
321
- boost::forward<A0>(a0)));
1527
+ this->insert(f, l);
322
1528
  }
323
1529
 
324
- template <typename A0>
325
- std::pair<iterator, bool> try_emplace(
326
- key_type const& k, BOOST_FWD_REF(A0) a0)
1530
+ template <class K, class T, class H, class P, class A>
1531
+ unordered_map<K, T, H, P, A>::unordered_map(unordered_map const& other)
1532
+ : table_(other.table_,
1533
+ unordered_map::value_allocator_traits::
1534
+ select_on_container_copy_construction(other.get_allocator()))
327
1535
  {
328
- return table_.try_emplace_impl(
329
- k, boost::unordered::detail::create_emplace_args(
330
- boost::forward<A0>(a0)));
1536
+ if (other.table_.size_) {
1537
+ table_.copy_buckets(
1538
+ other.table_, boost::unordered::detail::true_type());
1539
+ }
331
1540
  }
332
1541
 
333
- template <typename A0>
334
- iterator try_emplace(
335
- const_iterator hint, key_type const& k, BOOST_FWD_REF(A0) a0)
1542
+ template <class K, class T, class H, class P, class A>
1543
+ unordered_map<K, T, H, P, A>::unordered_map(allocator_type const& a)
1544
+ : table_(boost::unordered::detail::default_bucket_count, hasher(),
1545
+ key_equal(), a)
336
1546
  {
337
- return table_.try_emplace_hint_impl(
338
- hint, k, boost::unordered::detail::create_emplace_args(
339
- boost::forward<A0>(a0)));
340
1547
  }
341
1548
 
342
- template <typename A0>
343
- std::pair<iterator, bool> try_emplace(
344
- BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0)
1549
+ template <class K, class T, class H, class P, class A>
1550
+ unordered_map<K, T, H, P, A>::unordered_map(
1551
+ unordered_map const& other, allocator_type const& a)
1552
+ : table_(other.table_, a)
345
1553
  {
346
- return table_.try_emplace_impl(
347
- boost::move(k), boost::unordered::detail::create_emplace_args(
348
- boost::forward<A0>(a0)));
1554
+ if (other.table_.size_) {
1555
+ table_.copy_buckets(
1556
+ other.table_, boost::unordered::detail::true_type());
1557
+ }
349
1558
  }
350
1559
 
351
- template <typename A0>
352
- iterator try_emplace(
353
- const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0)
1560
+ template <class K, class T, class H, class P, class A>
1561
+ unordered_map<K, T, H, P, A>::unordered_map(
1562
+ BOOST_RV_REF(unordered_map) other, allocator_type const& a)
1563
+ : table_(other.table_, a, boost::unordered::detail::move_tag())
354
1564
  {
355
- return table_.try_emplace_hint_impl(
356
- hint, boost::move(k), boost::unordered::detail::create_emplace_args(
357
- boost::forward<A0>(a0)));
1565
+ table_.move_construct_buckets(other.table_);
358
1566
  }
359
1567
 
360
- template <typename A0, typename A1>
361
- std::pair<iterator, bool> emplace(
362
- BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
363
- {
364
- return table_.emplace(boost::unordered::detail::create_emplace_args(
365
- boost::forward<A0>(a0), boost::forward<A1>(a1)));
366
- }
1568
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
367
1569
 
368
- template <typename A0, typename A1>
369
- iterator emplace_hint(
370
- const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
1570
+ template <class K, class T, class H, class P, class A>
1571
+ unordered_map<K, T, H, P, A>::unordered_map(
1572
+ std::initializer_list<value_type> list, size_type n, const hasher& hf,
1573
+ const key_equal& eql, const allocator_type& a)
1574
+ : table_(
1575
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1576
+ hf, eql, a)
371
1577
  {
372
- return table_.emplace_hint(
373
- hint, boost::unordered::detail::create_emplace_args(
374
- boost::forward<A0>(a0), boost::forward<A1>(a1)));
1578
+ this->insert(list.begin(), list.end());
375
1579
  }
376
1580
 
377
- template <typename A0, typename A1>
378
- std::pair<iterator, bool> try_emplace(
379
- key_type const& k, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
380
- {
381
- return table_.try_emplace_impl(
382
- k, boost::unordered::detail::create_emplace_args(
383
- boost::forward<A0>(a0), boost::forward<A1>(a1)));
384
- }
1581
+ #endif
385
1582
 
386
- template <typename A0, typename A1>
387
- iterator try_emplace(const_iterator hint, key_type const& k,
388
- BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
1583
+ template <class K, class T, class H, class P, class A>
1584
+ unordered_map<K, T, H, P, A>::unordered_map(
1585
+ size_type n, const allocator_type& a)
1586
+ : table_(n, hasher(), key_equal(), a)
389
1587
  {
390
- return table_.try_emplace_hint_impl(
391
- hint, k, boost::unordered::detail::create_emplace_args(
392
- boost::forward<A0>(a0), boost::forward<A1>(a1)));
393
1588
  }
394
1589
 
395
- template <typename A0, typename A1>
396
- std::pair<iterator, bool> try_emplace(
397
- BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
1590
+ template <class K, class T, class H, class P, class A>
1591
+ unordered_map<K, T, H, P, A>::unordered_map(
1592
+ size_type n, const hasher& hf, const allocator_type& a)
1593
+ : table_(n, hf, key_equal(), a)
398
1594
  {
399
- return table_.try_emplace_impl(
400
- boost::move(k),
401
- boost::unordered::detail::create_emplace_args(
402
- boost::forward<A0>(a0), boost::forward<A1>(a1)));
403
1595
  }
404
1596
 
405
- template <typename A0, typename A1>
406
- iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
407
- BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
1597
+ template <class K, class T, class H, class P, class A>
1598
+ template <class InputIt>
1599
+ unordered_map<K, T, H, P, A>::unordered_map(
1600
+ InputIt f, InputIt l, size_type n, const allocator_type& a)
1601
+ : table_(boost::unordered::detail::initial_size(f, l, n), hasher(),
1602
+ key_equal(), a)
408
1603
  {
409
- return table_.try_emplace_hint_impl(
410
- hint, boost::move(k),
411
- boost::unordered::detail::create_emplace_args(
412
- boost::forward<A0>(a0), boost::forward<A1>(a1)));
1604
+ this->insert(f, l);
413
1605
  }
414
1606
 
415
- template <typename A0, typename A1, typename A2>
416
- std::pair<iterator, bool> emplace(
417
- BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
1607
+ template <class K, class T, class H, class P, class A>
1608
+ template <class InputIt>
1609
+ unordered_map<K, T, H, P, A>::unordered_map(InputIt f, InputIt l,
1610
+ size_type n, const hasher& hf, const allocator_type& a)
1611
+ : table_(
1612
+ boost::unordered::detail::initial_size(f, l, n), hf, key_equal(), a)
418
1613
  {
419
- return table_.emplace(boost::unordered::detail::create_emplace_args(
420
- boost::forward<A0>(a0), boost::forward<A1>(a1),
421
- boost::forward<A2>(a2)));
1614
+ this->insert(f, l);
422
1615
  }
423
1616
 
424
- template <typename A0, typename A1, typename A2>
425
- iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
426
- BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
427
- {
428
- return table_.emplace_hint(
429
- hint, boost::unordered::detail::create_emplace_args(
430
- boost::forward<A0>(a0), boost::forward<A1>(a1),
431
- boost::forward<A2>(a2)));
432
- }
1617
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
433
1618
 
434
- template <typename A0, typename A1, typename A2>
435
- std::pair<iterator, bool> try_emplace(key_type const& k,
436
- BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
1619
+ template <class K, class T, class H, class P, class A>
1620
+ unordered_map<K, T, H, P, A>::unordered_map(
1621
+ std::initializer_list<value_type> list, size_type n,
1622
+ const allocator_type& a)
1623
+ : table_(
1624
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1625
+ hasher(), key_equal(), a)
437
1626
  {
438
- return table_.try_emplace_impl(
439
- k, boost::unordered::detail::create_emplace_args(
440
- boost::forward<A0>(a0), boost::forward<A1>(a1),
441
- boost::forward<A2>(a2)));
1627
+ this->insert(list.begin(), list.end());
442
1628
  }
443
1629
 
444
- template <typename A0, typename A1, typename A2>
445
- iterator try_emplace(const_iterator hint, key_type const& k,
446
- BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
1630
+ template <class K, class T, class H, class P, class A>
1631
+ unordered_map<K, T, H, P, A>::unordered_map(
1632
+ std::initializer_list<value_type> list, size_type n, const hasher& hf,
1633
+ const allocator_type& a)
1634
+ : table_(
1635
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1636
+ hf, key_equal(), a)
447
1637
  {
448
- return table_
449
- .try_emplace_impl_(
450
- hint, k, boost::unordered::detail::create_emplace_args(
451
- boost::forward<A0>(a0), boost::forward<A1>(a1),
452
- boost::forward<A2>(a2)))
453
- .first;
1638
+ this->insert(list.begin(), list.end());
454
1639
  }
455
1640
 
456
- template <typename A0, typename A1, typename A2>
457
- std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k,
458
- BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
459
- {
460
- return table_.try_emplace_impl(
461
- boost::move(k), boost::unordered::detail::create_emplace_args(
462
- boost::forward<A0>(a0), boost::forward<A1>(a1),
463
- boost::forward<A2>(a2)));
464
- }
1641
+ #endif
465
1642
 
466
- template <typename A0, typename A1, typename A2>
467
- iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
468
- BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
1643
+ template <class K, class T, class H, class P, class A>
1644
+ unordered_map<K, T, H, P, A>::~unordered_map() BOOST_NOEXCEPT
469
1645
  {
470
- return table_.try_emplace_hint_impl(
471
- hint, boost::move(k),
472
- boost::unordered::detail::create_emplace_args(
473
- boost::forward<A0>(a0), boost::forward<A1>(a1),
474
- boost::forward<A2>(a2)));
475
- }
476
-
477
- #define BOOST_UNORDERED_EMPLACE(z, n, _) \
478
- template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
479
- std::pair<iterator, bool> emplace( \
480
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
481
- { \
482
- return table_.emplace(boost::unordered::detail::create_emplace_args( \
483
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
484
- } \
485
- \
486
- template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
487
- iterator emplace_hint(const_iterator hint, \
488
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
489
- { \
490
- return table_.emplace_hint( \
491
- hint, boost::unordered::detail::create_emplace_args( \
492
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
493
- } \
494
- \
495
- template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
496
- std::pair<iterator, bool> try_emplace( \
497
- key_type const& k, BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
498
- { \
499
- return table_.try_emplace_impl( \
500
- k, boost::unordered::detail::create_emplace_args( \
501
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
502
- } \
503
- \
504
- template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
505
- iterator try_emplace(const_iterator hint, key_type const& k, \
506
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
507
- { \
508
- return table_.try_emplace_hint_impl(hint, k, \
509
- boost::unordered::detail::create_emplace_args(BOOST_PP_ENUM_##z( \
510
- n, BOOST_UNORDERED_CALL_FORWARD, a))); \
511
- } \
512
- \
513
- template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
514
- std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, \
515
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
516
- { \
517
- return table_.try_emplace_impl(boost::move(k), \
518
- boost::unordered::detail::create_emplace_args(BOOST_PP_ENUM_##z( \
519
- n, BOOST_UNORDERED_CALL_FORWARD, a))); \
520
- } \
521
- \
522
- template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
523
- iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, \
524
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
525
- { \
526
- return table_.try_emplace_hint_impl(hint, boost::move(k), \
527
- boost::unordered::detail::create_emplace_args(BOOST_PP_ENUM_##z( \
528
- n, BOOST_UNORDERED_CALL_FORWARD, a))); \
529
1646
  }
530
1647
 
531
- BOOST_PP_REPEAT_FROM_TO(
532
- 4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
533
-
534
- #undef BOOST_UNORDERED_EMPLACE
535
-
536
- #endif
1648
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
537
1649
 
538
- std::pair<iterator, bool> insert(value_type const& x)
1650
+ template <class K, class T, class H, class P, class A>
1651
+ unordered_map<K, T, H, P, A>& unordered_map<K, T, H, P, A>::operator=(
1652
+ std::initializer_list<value_type> list)
539
1653
  {
540
- return this->emplace(x);
1654
+ this->clear();
1655
+ this->insert(list.begin(), list.end());
1656
+ return *this;
541
1657
  }
542
1658
 
543
- std::pair<iterator, bool> insert(BOOST_RV_REF(value_type) x)
544
- {
545
- return this->emplace(boost::move(x));
546
- }
1659
+ #endif
547
1660
 
548
- iterator insert(const_iterator hint, value_type const& x)
549
- {
550
- return this->emplace_hint(hint, x);
551
- }
1661
+ // size and capacity
552
1662
 
553
- iterator insert(const_iterator hint, BOOST_RV_REF(value_type) x)
1663
+ template <class K, class T, class H, class P, class A>
1664
+ std::size_t unordered_map<K, T, H, P, A>::max_size() const BOOST_NOEXCEPT
554
1665
  {
555
- return this->emplace_hint(hint, boost::move(x));
556
- }
1666
+ using namespace std;
557
1667
 
558
- template <class M>
559
- std::pair<iterator, bool> insert_or_assign(
560
- key_type const& k, BOOST_FWD_REF(M) obj)
561
- {
562
- return table_.insert_or_assign_impl(k, boost::forward<M>(obj));
1668
+ // size <= mlf_ * count
1669
+ return boost::unordered::detail::double_to_size(
1670
+ ceil(static_cast<double>(table_.mlf_) *
1671
+ static_cast<double>(table_.max_bucket_count()))) -
1672
+ 1;
563
1673
  }
564
1674
 
565
- template <class M>
566
- iterator insert_or_assign(
567
- const_iterator, key_type const& k, BOOST_FWD_REF(M) obj)
568
- {
569
- return table_.insert_or_assign_impl(k, boost::forward<M>(obj)).first;
570
- }
1675
+ // modifiers
571
1676
 
572
- template <class M>
573
- std::pair<iterator, bool> insert_or_assign(
574
- BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
1677
+ template <class K, class T, class H, class P, class A>
1678
+ template <class InputIt>
1679
+ void unordered_map<K, T, H, P, A>::insert(InputIt first, InputIt last)
575
1680
  {
576
- return table_.insert_or_assign_impl(
577
- boost::move(k), boost::forward<M>(obj));
1681
+ if (first != last) {
1682
+ table_.insert_range_unique(
1683
+ table::extractor::extract(*first), first, last);
1684
+ }
578
1685
  }
579
1686
 
580
- template <class M>
581
- iterator insert_or_assign(
582
- const_iterator, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
1687
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1688
+ template <class K, class T, class H, class P, class A>
1689
+ void unordered_map<K, T, H, P, A>::insert(
1690
+ std::initializer_list<value_type> list)
583
1691
  {
584
- return table_
585
- .insert_or_assign_impl(boost::move(k), boost::forward<M>(obj))
586
- .first;
1692
+ this->insert(list.begin(), list.end());
587
1693
  }
588
-
589
- template <class InputIt> void insert(InputIt, InputIt);
590
-
591
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
592
- void insert(std::initializer_list<value_type>);
593
1694
  #endif
594
1695
 
595
- insert_return_type insert(BOOST_RV_REF(node_type) np)
1696
+ template <class K, class T, class H, class P, class A>
1697
+ typename unordered_map<K, T, H, P, A>::iterator
1698
+ unordered_map<K, T, H, P, A>::erase(iterator position)
596
1699
  {
597
- insert_return_type result;
598
- table_.move_insert_node_type(np, result);
599
- return boost::move(result);
1700
+ node_pointer node = table::get_node(position);
1701
+ BOOST_ASSERT(node);
1702
+ node_pointer next = table::next_node(node);
1703
+ table_.erase_nodes_unique(node, next);
1704
+ return iterator(next);
600
1705
  }
601
1706
 
602
- iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
1707
+ template <class K, class T, class H, class P, class A>
1708
+ typename unordered_map<K, T, H, P, A>::iterator
1709
+ unordered_map<K, T, H, P, A>::erase(const_iterator position)
603
1710
  {
604
- return table_.move_insert_node_type_with_hint(hint, np);
1711
+ node_pointer node = table::get_node(position);
1712
+ BOOST_ASSERT(node);
1713
+ node_pointer next = table::next_node(node);
1714
+ table_.erase_nodes_unique(node, next);
1715
+ return iterator(next);
605
1716
  }
606
1717
 
607
- #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
608
- private:
609
- // Note: Use r-value node_type to insert.
610
- insert_return_type insert(node_type&);
611
- iterator insert(const_iterator, node_type& np);
612
-
613
- public:
614
- #endif
615
-
616
- iterator erase(const_iterator);
617
- size_type erase(const key_type&);
618
- iterator erase(const_iterator, const_iterator);
619
- void quick_erase(const_iterator it) { erase(it); }
620
- void erase_return_void(const_iterator it) { erase(it); }
621
-
622
- void clear();
623
- void swap(unordered_map&);
624
-
625
- template <typename H2, typename P2>
626
- void merge(boost::unordered_map<K, T, H2, P2, A>& source);
627
-
628
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
629
- template <typename H2, typename P2>
630
- void merge(boost::unordered_map<K, T, H2, P2, A>&& source);
631
- #endif
632
-
633
- #if BOOST_UNORDERED_INTEROPERABLE_NODES
634
- template <typename H2, typename P2>
635
- void merge(boost::unordered_multimap<K, T, H2, P2, A>& source);
636
-
637
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
638
- template <typename H2, typename P2>
639
- void merge(boost::unordered_multimap<K, T, H2, P2, A>&& source);
640
- #endif
641
- #endif
642
-
643
- // observers
644
-
645
- hasher hash_function() const;
646
- key_equal key_eq() const;
647
-
648
- mapped_type& operator[](const key_type&);
649
- mapped_type& at(const key_type&);
650
- mapped_type const& at(const key_type&) const;
651
-
652
- // lookup
653
-
654
- iterator find(const key_type&);
655
- const_iterator find(const key_type&) const;
656
-
657
- template <class CompatibleKey, class CompatibleHash,
658
- class CompatiblePredicate>
659
- iterator find(CompatibleKey const&, CompatibleHash const&,
660
- CompatiblePredicate const&);
661
-
662
- template <class CompatibleKey, class CompatibleHash,
663
- class CompatiblePredicate>
664
- const_iterator find(CompatibleKey const&, CompatibleHash const&,
665
- CompatiblePredicate const&) const;
666
-
667
- size_type count(const key_type&) const;
668
-
669
- std::pair<iterator, iterator> equal_range(const key_type&);
670
- std::pair<const_iterator, const_iterator> equal_range(
671
- const key_type&) const;
672
-
673
- // bucket interface
674
-
675
- size_type bucket_count() const BOOST_NOEXCEPT
1718
+ template <class K, class T, class H, class P, class A>
1719
+ typename unordered_map<K, T, H, P, A>::size_type
1720
+ unordered_map<K, T, H, P, A>::erase(const key_type& k)
676
1721
  {
677
- return table_.bucket_count_;
1722
+ return table_.erase_key_unique(k);
678
1723
  }
679
1724
 
680
- size_type max_bucket_count() const BOOST_NOEXCEPT
1725
+ template <class K, class T, class H, class P, class A>
1726
+ typename unordered_map<K, T, H, P, A>::iterator
1727
+ unordered_map<K, T, H, P, A>::erase(
1728
+ const_iterator first, const_iterator last)
681
1729
  {
682
- return table_.max_bucket_count();
1730
+ node_pointer last_node = table::get_node(last);
1731
+ if (first == last)
1732
+ return iterator(last_node);
1733
+ table_.erase_nodes_unique(table::get_node(first), last_node);
1734
+ return iterator(last_node);
683
1735
  }
684
1736
 
685
- size_type bucket_size(size_type) const;
686
-
687
- size_type bucket(const key_type& k) const
1737
+ template <class K, class T, class H, class P, class A>
1738
+ void unordered_map<K, T, H, P, A>::swap(unordered_map& other)
1739
+ BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
1740
+ boost::is_nothrow_swappable<H>::value&&
1741
+ boost::is_nothrow_swappable<P>::value)
688
1742
  {
689
- return table_.hash_to_bucket(table_.hash(k));
1743
+ table_.swap(other.table_);
690
1744
  }
691
1745
 
692
- local_iterator begin(size_type n)
1746
+ template <class K, class T, class H, class P, class A>
1747
+ template <typename H2, typename P2>
1748
+ void unordered_map<K, T, H, P, A>::merge(
1749
+ boost::unordered_map<K, T, H2, P2, A>& source)
693
1750
  {
694
- return local_iterator(table_.begin(n), n, table_.bucket_count_);
1751
+ table_.merge_unique(source.table_);
695
1752
  }
696
1753
 
697
- const_local_iterator begin(size_type n) const
1754
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1755
+ template <class K, class T, class H, class P, class A>
1756
+ template <typename H2, typename P2>
1757
+ void unordered_map<K, T, H, P, A>::merge(
1758
+ boost::unordered_map<K, T, H2, P2, A>&& source)
698
1759
  {
699
- return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
1760
+ table_.merge_unique(source.table_);
700
1761
  }
1762
+ #endif
701
1763
 
702
- local_iterator end(size_type) { return local_iterator(); }
703
-
704
- const_local_iterator end(size_type) const { return const_local_iterator(); }
705
-
706
- const_local_iterator cbegin(size_type n) const
1764
+ template <class K, class T, class H, class P, class A>
1765
+ template <typename H2, typename P2>
1766
+ void unordered_map<K, T, H, P, A>::merge(
1767
+ boost::unordered_multimap<K, T, H2, P2, A>& source)
707
1768
  {
708
- return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
1769
+ table_.merge_unique(source.table_);
709
1770
  }
710
1771
 
711
- const_local_iterator cend(size_type) const
1772
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1773
+ template <class K, class T, class H, class P, class A>
1774
+ template <typename H2, typename P2>
1775
+ void unordered_map<K, T, H, P, A>::merge(
1776
+ boost::unordered_multimap<K, T, H2, P2, A>&& source)
712
1777
  {
713
- return const_local_iterator();
1778
+ table_.merge_unique(source.table_);
714
1779
  }
715
-
716
- // hash policy
717
-
718
- float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; }
719
-
720
- float load_factor() const BOOST_NOEXCEPT;
721
- void max_load_factor(float) BOOST_NOEXCEPT;
722
- void rehash(size_type);
723
- void reserve(size_type);
724
-
725
- #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
726
- friend bool operator==
727
- <K, T, H, P, A>(unordered_map const&, unordered_map const&);
728
- friend bool operator!=
729
- <K, T, H, P, A>(unordered_map const&, unordered_map const&);
730
- #endif
731
- }; // class template unordered_map
732
-
733
- template <class K, class T, class H, class P, class A> class unordered_multimap
734
- {
735
- #if defined(BOOST_UNORDERED_USE_MOVE)
736
- BOOST_COPYABLE_AND_MOVABLE(unordered_multimap)
737
1780
  #endif
738
- template <typename, typename, typename, typename, typename>
739
- friend class unordered_map;
740
-
741
- public:
742
- typedef K key_type;
743
- typedef std::pair<const K, T> value_type;
744
- typedef T mapped_type;
745
- typedef H hasher;
746
- typedef P key_equal;
747
- typedef A allocator_type;
748
-
749
- private:
750
- typedef boost::unordered::detail::multimap<A, K, T, H, P> types;
751
- typedef typename types::value_allocator_traits value_allocator_traits;
752
- typedef typename types::table table;
753
-
754
- public:
755
- typedef typename value_allocator_traits::pointer pointer;
756
- typedef typename value_allocator_traits::const_pointer const_pointer;
757
-
758
- typedef value_type& reference;
759
- typedef value_type const& const_reference;
760
-
761
- typedef std::size_t size_type;
762
- typedef std::ptrdiff_t difference_type;
763
-
764
- typedef typename table::cl_iterator const_local_iterator;
765
- typedef typename table::l_iterator local_iterator;
766
- typedef typename table::c_iterator const_iterator;
767
- typedef typename table::iterator iterator;
768
- typedef typename types::node_type node_type;
769
-
770
- private:
771
- table table_;
772
-
773
- public:
774
- // constructors
775
-
776
- unordered_multimap();
777
-
778
- explicit unordered_multimap(size_type, const hasher& = hasher(),
779
- const key_equal& = key_equal(),
780
- const allocator_type& = allocator_type());
781
-
782
- explicit unordered_multimap(size_type, const allocator_type&);
783
-
784
- explicit unordered_multimap(
785
- size_type, const hasher&, const allocator_type&);
786
-
787
- explicit unordered_multimap(allocator_type const&);
788
-
789
- template <class InputIt> unordered_multimap(InputIt, InputIt);
790
-
791
- template <class InputIt>
792
- unordered_multimap(InputIt, InputIt, size_type, const hasher& = hasher(),
793
- const key_equal& = key_equal());
794
-
795
- template <class InputIt>
796
- unordered_multimap(InputIt, InputIt, size_type, const hasher&,
797
- const key_equal&, const allocator_type&);
798
-
799
- template <class InputIt>
800
- unordered_multimap(
801
- InputIt, InputIt, size_type, const hasher&, const allocator_type&);
802
-
803
- template <class InputIt>
804
- unordered_multimap(InputIt, InputIt, size_type, const allocator_type&);
805
-
806
- // copy/move constructors
807
1781
 
808
- unordered_multimap(unordered_multimap const&);
809
-
810
- unordered_multimap(unordered_multimap const&, allocator_type const&);
811
- unordered_multimap(BOOST_RV_REF(unordered_multimap), allocator_type const&);
1782
+ // observers
812
1783
 
813
- #if defined(BOOST_UNORDERED_USE_MOVE)
814
- unordered_multimap(BOOST_RV_REF(unordered_multimap) other)
815
- BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
816
- : table_(other.table_, boost::unordered::detail::move_tag())
1784
+ template <class K, class T, class H, class P, class A>
1785
+ typename unordered_map<K, T, H, P, A>::hasher
1786
+ unordered_map<K, T, H, P, A>::hash_function() const
817
1787
  {
1788
+ return table_.hash_function();
818
1789
  }
819
- #elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
820
- unordered_multimap(unordered_multimap&& other)
821
- BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
822
- : table_(other.table_, boost::unordered::detail::move_tag())
1790
+
1791
+ template <class K, class T, class H, class P, class A>
1792
+ typename unordered_map<K, T, H, P, A>::key_equal
1793
+ unordered_map<K, T, H, P, A>::key_eq() const
823
1794
  {
1795
+ return table_.key_eq();
824
1796
  }
825
- #endif
826
-
827
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
828
- unordered_multimap(std::initializer_list<value_type>,
829
- size_type = boost::unordered::detail::default_bucket_count,
830
- const hasher& = hasher(), const key_equal& l = key_equal(),
831
- const allocator_type& = allocator_type());
832
- unordered_multimap(std::initializer_list<value_type>, size_type,
833
- const hasher&, const allocator_type&);
834
- unordered_multimap(
835
- std::initializer_list<value_type>, size_type, const allocator_type&);
836
- #endif
837
1797
 
838
- // Destructor
839
-
840
- ~unordered_multimap() BOOST_NOEXCEPT;
1798
+ // lookup
841
1799
 
842
- // Assign
1800
+ template <class K, class T, class H, class P, class A>
1801
+ typename unordered_map<K, T, H, P, A>::iterator
1802
+ unordered_map<K, T, H, P, A>::find(const key_type& k)
1803
+ {
1804
+ return iterator(table_.find_node(k));
1805
+ }
843
1806
 
844
- #if defined(BOOST_UNORDERED_USE_MOVE)
845
- unordered_multimap& operator=(BOOST_COPY_ASSIGN_REF(unordered_multimap) x)
1807
+ template <class K, class T, class H, class P, class A>
1808
+ typename unordered_map<K, T, H, P, A>::const_iterator
1809
+ unordered_map<K, T, H, P, A>::find(const key_type& k) const
846
1810
  {
847
- table_.assign(x.table_);
848
- return *this;
1811
+ return const_iterator(table_.find_node(k));
849
1812
  }
850
1813
 
851
- unordered_multimap& operator=(BOOST_RV_REF(unordered_multimap) x)
1814
+ template <class K, class T, class H, class P, class A>
1815
+ template <class CompatibleKey, class CompatibleHash,
1816
+ class CompatiblePredicate>
1817
+ typename unordered_map<K, T, H, P, A>::iterator
1818
+ unordered_map<K, T, H, P, A>::find(CompatibleKey const& k,
1819
+ CompatibleHash const& hash, CompatiblePredicate const& eq)
852
1820
  {
853
- table_.move_assign(x.table_);
854
- return *this;
1821
+ return iterator(
1822
+ table_.find_node_impl(table::policy::apply_hash(hash, k), k, eq));
855
1823
  }
856
- #else
857
- unordered_multimap& operator=(unordered_multimap const& x)
1824
+
1825
+ template <class K, class T, class H, class P, class A>
1826
+ template <class CompatibleKey, class CompatibleHash,
1827
+ class CompatiblePredicate>
1828
+ typename unordered_map<K, T, H, P, A>::const_iterator
1829
+ unordered_map<K, T, H, P, A>::find(CompatibleKey const& k,
1830
+ CompatibleHash const& hash, CompatiblePredicate const& eq) const
858
1831
  {
859
- table_.assign(x.table_);
860
- return *this;
1832
+ return const_iterator(
1833
+ table_.find_node_impl(table::policy::apply_hash(hash, k), k, eq));
861
1834
  }
862
1835
 
863
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
864
- unordered_multimap& operator=(unordered_multimap&& x)
1836
+ template <class K, class T, class H, class P, class A>
1837
+ typename unordered_map<K, T, H, P, A>::size_type
1838
+ unordered_map<K, T, H, P, A>::count(const key_type& k) const
865
1839
  {
866
- table_.move_assign(x.table_);
867
- return *this;
1840
+ return table_.find_node(k) ? 1 : 0;
868
1841
  }
869
- #endif
870
- #endif
871
1842
 
872
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
873
- unordered_multimap& operator=(std::initializer_list<value_type>);
874
- #endif
1843
+ template <class K, class T, class H, class P, class A>
1844
+ std::pair<typename unordered_map<K, T, H, P, A>::iterator,
1845
+ typename unordered_map<K, T, H, P, A>::iterator>
1846
+ unordered_map<K, T, H, P, A>::equal_range(const key_type& k)
1847
+ {
1848
+ node_pointer n = table_.find_node(k);
1849
+ return std::make_pair(iterator(n), iterator(n ? table::next_node(n) : n));
1850
+ }
875
1851
 
876
- allocator_type get_allocator() const BOOST_NOEXCEPT
1852
+ template <class K, class T, class H, class P, class A>
1853
+ std::pair<typename unordered_map<K, T, H, P, A>::const_iterator,
1854
+ typename unordered_map<K, T, H, P, A>::const_iterator>
1855
+ unordered_map<K, T, H, P, A>::equal_range(const key_type& k) const
877
1856
  {
878
- return table_.node_alloc();
1857
+ node_pointer n = table_.find_node(k);
1858
+ return std::make_pair(
1859
+ const_iterator(n), const_iterator(n ? table::next_node(n) : n));
879
1860
  }
880
1861
 
881
- // size and capacity
1862
+ template <class K, class T, class H, class P, class A>
1863
+ typename unordered_map<K, T, H, P, A>::mapped_type&
1864
+ unordered_map<K, T, H, P, A>::operator[](const key_type& k)
1865
+ {
1866
+ return table_.try_emplace_unique(k).first->second;
1867
+ }
882
1868
 
883
- bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
1869
+ template <class K, class T, class H, class P, class A>
1870
+ typename unordered_map<K, T, H, P, A>::mapped_type&
1871
+ unordered_map<K, T, H, P, A>::operator[](BOOST_RV_REF(key_type) k)
1872
+ {
1873
+ return table_.try_emplace_unique(boost::move(k)).first->second;
1874
+ }
884
1875
 
885
- size_type size() const BOOST_NOEXCEPT { return table_.size_; }
1876
+ template <class K, class T, class H, class P, class A>
1877
+ typename unordered_map<K, T, H, P, A>::mapped_type&
1878
+ unordered_map<K, T, H, P, A>::at(const key_type& k)
1879
+ {
1880
+ if (table_.size_) {
1881
+ node_pointer n = table_.find_node(k);
1882
+ if (n)
1883
+ return n->value().second;
1884
+ }
886
1885
 
887
- size_type max_size() const BOOST_NOEXCEPT;
1886
+ boost::throw_exception(
1887
+ std::out_of_range("Unable to find key in unordered_map."));
1888
+ }
888
1889
 
889
- // iterators
1890
+ template <class K, class T, class H, class P, class A>
1891
+ typename unordered_map<K, T, H, P, A>::mapped_type const&
1892
+ unordered_map<K, T, H, P, A>::at(const key_type& k) const
1893
+ {
1894
+ if (table_.size_) {
1895
+ node_pointer n = table_.find_node(k);
1896
+ if (n)
1897
+ return n->value().second;
1898
+ }
890
1899
 
891
- iterator begin() BOOST_NOEXCEPT { return iterator(table_.begin()); }
1900
+ boost::throw_exception(
1901
+ std::out_of_range("Unable to find key in unordered_map."));
1902
+ }
892
1903
 
893
- const_iterator begin() const BOOST_NOEXCEPT
1904
+ template <class K, class T, class H, class P, class A>
1905
+ typename unordered_map<K, T, H, P, A>::size_type
1906
+ unordered_map<K, T, H, P, A>::bucket_size(size_type n) const
894
1907
  {
895
- return const_iterator(table_.begin());
1908
+ return table_.bucket_size(n);
896
1909
  }
897
1910
 
898
- iterator end() BOOST_NOEXCEPT { return iterator(); }
899
-
900
- const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); }
1911
+ // hash policy
901
1912
 
902
- const_iterator cbegin() const BOOST_NOEXCEPT
1913
+ template <class K, class T, class H, class P, class A>
1914
+ float unordered_map<K, T, H, P, A>::load_factor() const BOOST_NOEXCEPT
903
1915
  {
904
- return const_iterator(table_.begin());
1916
+ BOOST_ASSERT(table_.bucket_count_ != 0);
1917
+ return static_cast<float>(table_.size_) /
1918
+ static_cast<float>(table_.bucket_count_);
905
1919
  }
906
1920
 
907
- const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); }
908
-
909
- // extract
910
-
911
- node_type extract(const_iterator position)
1921
+ template <class K, class T, class H, class P, class A>
1922
+ void unordered_map<K, T, H, P, A>::max_load_factor(float m) BOOST_NOEXCEPT
912
1923
  {
913
- return node_type(
914
- table_.extract_by_iterator(position), table_.node_alloc());
1924
+ table_.max_load_factor(m);
915
1925
  }
916
1926
 
917
- node_type extract(const key_type& k)
1927
+ template <class K, class T, class H, class P, class A>
1928
+ void unordered_map<K, T, H, P, A>::rehash(size_type n)
918
1929
  {
919
- return node_type(table_.extract_by_key(k), table_.node_alloc());
1930
+ table_.rehash(n);
920
1931
  }
921
1932
 
922
- // emplace
923
-
924
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
925
- template <class... Args> iterator emplace(BOOST_FWD_REF(Args)... args)
1933
+ template <class K, class T, class H, class P, class A>
1934
+ void unordered_map<K, T, H, P, A>::reserve(size_type n)
926
1935
  {
927
- return table_.emplace(boost::forward<Args>(args)...);
1936
+ table_.rehash(static_cast<std::size_t>(
1937
+ std::ceil(static_cast<double>(n) / table_.mlf_)));
928
1938
  }
929
1939
 
930
- template <class... Args>
931
- iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
1940
+ template <class K, class T, class H, class P, class A>
1941
+ inline bool operator==(unordered_map<K, T, H, P, A> const& m1,
1942
+ unordered_map<K, T, H, P, A> const& m2)
932
1943
  {
933
- return table_.emplace_hint(hint, boost::forward<Args>(args)...);
1944
+ #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1945
+ struct dummy
1946
+ {
1947
+ unordered_map<K, T, H, P, A> x;
1948
+ };
1949
+ #endif
1950
+ return m1.table_.equals_unique(m2.table_);
934
1951
  }
935
- #else
936
1952
 
937
- #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
938
-
939
- // 0 argument emplace requires special treatment in case
940
- // the container is instantiated with a value type that
941
- // doesn't have a default constructor.
942
-
943
- iterator emplace(boost::unordered::detail::empty_emplace =
944
- boost::unordered::detail::empty_emplace(),
945
- value_type v = value_type())
1953
+ template <class K, class T, class H, class P, class A>
1954
+ inline bool operator!=(unordered_map<K, T, H, P, A> const& m1,
1955
+ unordered_map<K, T, H, P, A> const& m2)
946
1956
  {
947
- return this->emplace(boost::move(v));
1957
+ #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1958
+ struct dummy
1959
+ {
1960
+ unordered_map<K, T, H, P, A> x;
1961
+ };
1962
+ #endif
1963
+ return !m1.table_.equals_unique(m2.table_);
948
1964
  }
949
1965
 
950
- iterator emplace_hint(const_iterator hint,
951
- boost::unordered::detail::empty_emplace =
952
- boost::unordered::detail::empty_emplace(),
953
- value_type v = value_type())
1966
+ template <class K, class T, class H, class P, class A>
1967
+ inline void swap(
1968
+ unordered_map<K, T, H, P, A>& m1, unordered_map<K, T, H, P, A>& m2)
1969
+ BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(m1.swap(m2)))
954
1970
  {
955
- return this->emplace_hint(hint, boost::move(v));
1971
+ #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1972
+ struct dummy
1973
+ {
1974
+ unordered_map<K, T, H, P, A> x;
1975
+ };
1976
+ #endif
1977
+ m1.swap(m2);
956
1978
  }
957
1979
 
958
- #endif
1980
+ ////////////////////////////////////////////////////////////////////////////
959
1981
 
960
- template <typename A0> iterator emplace(BOOST_FWD_REF(A0) a0)
1982
+ template <class K, class T, class H, class P, class A>
1983
+ unordered_multimap<K, T, H, P, A>::unordered_multimap()
1984
+ : table_(boost::unordered::detail::default_bucket_count, hasher(),
1985
+ key_equal(), allocator_type())
961
1986
  {
962
- return table_.emplace(boost::unordered::detail::create_emplace_args(
963
- boost::forward<A0>(a0)));
964
1987
  }
965
1988
 
966
- template <typename A0>
967
- iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
1989
+ template <class K, class T, class H, class P, class A>
1990
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(size_type n,
1991
+ const hasher& hf, const key_equal& eql, const allocator_type& a)
1992
+ : table_(n, hf, eql, a)
968
1993
  {
969
- return table_.emplace_hint(
970
- hint, boost::unordered::detail::create_emplace_args(
971
- boost::forward<A0>(a0)));
972
1994
  }
973
1995
 
974
- template <typename A0, typename A1>
975
- iterator emplace(BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
1996
+ template <class K, class T, class H, class P, class A>
1997
+ template <class InputIt>
1998
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(InputIt f, InputIt l,
1999
+ size_type n, const hasher& hf, const key_equal& eql,
2000
+ const allocator_type& a)
2001
+ : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
976
2002
  {
977
- return table_.emplace(boost::unordered::detail::create_emplace_args(
978
- boost::forward<A0>(a0), boost::forward<A1>(a1)));
2003
+ this->insert(f, l);
979
2004
  }
980
2005
 
981
- template <typename A0, typename A1>
982
- iterator emplace_hint(
983
- const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
2006
+ template <class K, class T, class H, class P, class A>
2007
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(
2008
+ unordered_multimap const& other)
2009
+ : table_(other.table_,
2010
+ unordered_multimap::value_allocator_traits::
2011
+ select_on_container_copy_construction(other.get_allocator()))
984
2012
  {
985
- return table_.emplace_hint(
986
- hint, boost::unordered::detail::create_emplace_args(
987
- boost::forward<A0>(a0), boost::forward<A1>(a1)));
2013
+ if (other.table_.size_) {
2014
+ table_.copy_buckets(
2015
+ other.table_, boost::unordered::detail::false_type());
2016
+ }
988
2017
  }
989
2018
 
990
- template <typename A0, typename A1, typename A2>
991
- iterator emplace(
992
- BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
2019
+ template <class K, class T, class H, class P, class A>
2020
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(
2021
+ allocator_type const& a)
2022
+ : table_(boost::unordered::detail::default_bucket_count, hasher(),
2023
+ key_equal(), a)
993
2024
  {
994
- return table_.emplace(boost::unordered::detail::create_emplace_args(
995
- boost::forward<A0>(a0), boost::forward<A1>(a1),
996
- boost::forward<A2>(a2)));
997
2025
  }
998
2026
 
999
- template <typename A0, typename A1, typename A2>
1000
- iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
1001
- BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
2027
+ template <class K, class T, class H, class P, class A>
2028
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(
2029
+ unordered_multimap const& other, allocator_type const& a)
2030
+ : table_(other.table_, a)
1002
2031
  {
1003
- return table_.emplace_hint(
1004
- hint, boost::unordered::detail::create_emplace_args(
1005
- boost::forward<A0>(a0), boost::forward<A1>(a1),
1006
- boost::forward<A2>(a2)));
2032
+ if (other.table_.size_) {
2033
+ table_.copy_buckets(
2034
+ other.table_, boost::unordered::detail::false_type());
2035
+ }
1007
2036
  }
1008
2037
 
1009
- #define BOOST_UNORDERED_EMPLACE(z, n, _) \
1010
- template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
1011
- iterator emplace(BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
1012
- { \
1013
- return table_.emplace(boost::unordered::detail::create_emplace_args( \
1014
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
1015
- } \
1016
- \
1017
- template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
1018
- iterator emplace_hint(const_iterator hint, \
1019
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
1020
- { \
1021
- return table_.emplace_hint( \
1022
- hint, boost::unordered::detail::create_emplace_args( \
1023
- BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
2038
+ template <class K, class T, class H, class P, class A>
2039
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(
2040
+ BOOST_RV_REF(unordered_multimap) other, allocator_type const& a)
2041
+ : table_(other.table_, a, boost::unordered::detail::move_tag())
2042
+ {
2043
+ table_.move_construct_buckets(other.table_);
1024
2044
  }
1025
2045
 
1026
- BOOST_PP_REPEAT_FROM_TO(
1027
- 4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
2046
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1028
2047
 
1029
- #undef BOOST_UNORDERED_EMPLACE
2048
+ template <class K, class T, class H, class P, class A>
2049
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(
2050
+ std::initializer_list<value_type> list, size_type n, const hasher& hf,
2051
+ const key_equal& eql, const allocator_type& a)
2052
+ : table_(
2053
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
2054
+ hf, eql, a)
2055
+ {
2056
+ this->insert(list.begin(), list.end());
2057
+ }
1030
2058
 
1031
2059
  #endif
1032
2060
 
1033
- iterator insert(value_type const& x) { return this->emplace(x); }
1034
-
1035
- iterator insert(BOOST_RV_REF(value_type) x)
2061
+ template <class K, class T, class H, class P, class A>
2062
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(
2063
+ size_type n, const allocator_type& a)
2064
+ : table_(n, hasher(), key_equal(), a)
1036
2065
  {
1037
- return this->emplace(boost::move(x));
1038
2066
  }
1039
2067
 
1040
- iterator insert(const_iterator hint, value_type const& x)
2068
+ template <class K, class T, class H, class P, class A>
2069
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(
2070
+ size_type n, const hasher& hf, const allocator_type& a)
2071
+ : table_(n, hf, key_equal(), a)
1041
2072
  {
1042
- return this->emplace_hint(hint, x);
1043
2073
  }
1044
2074
 
1045
- iterator insert(const_iterator hint, BOOST_RV_REF(value_type) x)
2075
+ template <class K, class T, class H, class P, class A>
2076
+ template <class InputIt>
2077
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(
2078
+ InputIt f, InputIt l, size_type n, const allocator_type& a)
2079
+ : table_(boost::unordered::detail::initial_size(f, l, n), hasher(),
2080
+ key_equal(), a)
1046
2081
  {
1047
- return this->emplace_hint(hint, boost::move(x));
2082
+ this->insert(f, l);
1048
2083
  }
1049
2084
 
1050
- template <class InputIt> void insert(InputIt, InputIt);
2085
+ template <class K, class T, class H, class P, class A>
2086
+ template <class InputIt>
2087
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(InputIt f, InputIt l,
2088
+ size_type n, const hasher& hf, const allocator_type& a)
2089
+ : table_(
2090
+ boost::unordered::detail::initial_size(f, l, n), hf, key_equal(), a)
2091
+ {
2092
+ this->insert(f, l);
2093
+ }
1051
2094
 
1052
2095
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1053
- void insert(std::initializer_list<value_type>);
1054
- #endif
1055
2096
 
1056
- iterator insert(BOOST_RV_REF(node_type) np)
2097
+ template <class K, class T, class H, class P, class A>
2098
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(
2099
+ std::initializer_list<value_type> list, size_type n,
2100
+ const allocator_type& a)
2101
+ : table_(
2102
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
2103
+ hasher(), key_equal(), a)
1057
2104
  {
1058
- return table_.move_insert_node_type(np);
2105
+ this->insert(list.begin(), list.end());
1059
2106
  }
1060
2107
 
1061
- iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
2108
+ template <class K, class T, class H, class P, class A>
2109
+ unordered_multimap<K, T, H, P, A>::unordered_multimap(
2110
+ std::initializer_list<value_type> list, size_type n, const hasher& hf,
2111
+ const allocator_type& a)
2112
+ : table_(
2113
+ boost::unordered::detail::initial_size(list.begin(), list.end(), n),
2114
+ hf, key_equal(), a)
1062
2115
  {
1063
- return table_.move_insert_node_type_with_hint(hint, np);
2116
+ this->insert(list.begin(), list.end());
1064
2117
  }
1065
2118
 
1066
- #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1067
- private:
1068
- // Note: Use r-value node_type to insert.
1069
- iterator insert(node_type&);
1070
- iterator insert(const_iterator, node_type& np);
1071
-
1072
- public:
1073
2119
  #endif
1074
2120
 
1075
- iterator erase(const_iterator);
1076
- size_type erase(const key_type&);
1077
- iterator erase(const_iterator, const_iterator);
1078
- void quick_erase(const_iterator it) { erase(it); }
1079
- void erase_return_void(const_iterator it) { erase(it); }
1080
-
1081
- void clear();
1082
- void swap(unordered_multimap&);
1083
-
1084
- template <typename H2, typename P2>
1085
- void merge(boost::unordered_multimap<K, T, H2, P2, A>& source);
2121
+ template <class K, class T, class H, class P, class A>
2122
+ unordered_multimap<K, T, H, P, A>::~unordered_multimap() BOOST_NOEXCEPT
2123
+ {
2124
+ }
1086
2125
 
1087
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1088
- template <typename H2, typename P2>
1089
- void merge(boost::unordered_multimap<K, T, H2, P2, A>&& source);
1090
- #endif
2126
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1091
2127
 
1092
- #if BOOST_UNORDERED_INTEROPERABLE_NODES
1093
- template <typename H2, typename P2>
1094
- void merge(boost::unordered_map<K, T, H2, P2, A>& source);
2128
+ template <class K, class T, class H, class P, class A>
2129
+ unordered_multimap<K, T, H, P, A>& unordered_multimap<K, T, H, P, A>::
2130
+ operator=(std::initializer_list<value_type> list)
2131
+ {
2132
+ this->clear();
2133
+ this->insert(list.begin(), list.end());
2134
+ return *this;
2135
+ }
1095
2136
 
1096
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1097
- template <typename H2, typename P2>
1098
- void merge(boost::unordered_map<K, T, H2, P2, A>&& source);
1099
2137
  #endif
1100
- #endif
1101
-
1102
- // observers
1103
-
1104
- hasher hash_function() const;
1105
- key_equal key_eq() const;
1106
2138
 
1107
- // lookup
1108
-
1109
- iterator find(const key_type&);
1110
- const_iterator find(const key_type&) const;
1111
-
1112
- template <class CompatibleKey, class CompatibleHash,
1113
- class CompatiblePredicate>
1114
- iterator find(CompatibleKey const&, CompatibleHash const&,
1115
- CompatiblePredicate const&);
1116
-
1117
- template <class CompatibleKey, class CompatibleHash,
1118
- class CompatiblePredicate>
1119
- const_iterator find(CompatibleKey const&, CompatibleHash const&,
1120
- CompatiblePredicate const&) const;
2139
+ // size and capacity
1121
2140
 
1122
- size_type count(const key_type&) const;
2141
+ template <class K, class T, class H, class P, class A>
2142
+ std::size_t
2143
+ unordered_multimap<K, T, H, P, A>::max_size() const BOOST_NOEXCEPT
2144
+ {
2145
+ using namespace std;
1123
2146
 
1124
- std::pair<iterator, iterator> equal_range(const key_type&);
1125
- std::pair<const_iterator, const_iterator> equal_range(
1126
- const key_type&) const;
2147
+ // size <= mlf_ * count
2148
+ return boost::unordered::detail::double_to_size(
2149
+ ceil(static_cast<double>(table_.mlf_) *
2150
+ static_cast<double>(table_.max_bucket_count()))) -
2151
+ 1;
2152
+ }
1127
2153
 
1128
- // bucket interface
2154
+ // modifiers
1129
2155
 
1130
- size_type bucket_count() const BOOST_NOEXCEPT
2156
+ template <class K, class T, class H, class P, class A>
2157
+ template <class InputIt>
2158
+ void unordered_multimap<K, T, H, P, A>::insert(InputIt first, InputIt last)
1131
2159
  {
1132
- return table_.bucket_count_;
2160
+ table_.insert_range_equiv(first, last);
1133
2161
  }
1134
2162
 
1135
- size_type max_bucket_count() const BOOST_NOEXCEPT
2163
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
2164
+ template <class K, class T, class H, class P, class A>
2165
+ void unordered_multimap<K, T, H, P, A>::insert(
2166
+ std::initializer_list<value_type> list)
1136
2167
  {
1137
- return table_.max_bucket_count();
2168
+ this->insert(list.begin(), list.end());
1138
2169
  }
2170
+ #endif
1139
2171
 
1140
- size_type bucket_size(size_type) const;
1141
-
1142
- size_type bucket(const key_type& k) const
2172
+ template <class K, class T, class H, class P, class A>
2173
+ typename unordered_multimap<K, T, H, P, A>::iterator
2174
+ unordered_multimap<K, T, H, P, A>::erase(iterator position)
1143
2175
  {
1144
- return table_.hash_to_bucket(table_.hash(k));
2176
+ node_pointer node = table::get_node(position);
2177
+ BOOST_ASSERT(node);
2178
+ node_pointer next = table::next_node(node);
2179
+ table_.erase_nodes_equiv(node, next);
2180
+ return iterator(next);
1145
2181
  }
1146
2182
 
1147
- local_iterator begin(size_type n)
2183
+ template <class K, class T, class H, class P, class A>
2184
+ typename unordered_multimap<K, T, H, P, A>::iterator
2185
+ unordered_multimap<K, T, H, P, A>::erase(const_iterator position)
1148
2186
  {
1149
- return local_iterator(table_.begin(n), n, table_.bucket_count_);
2187
+ node_pointer node = table::get_node(position);
2188
+ BOOST_ASSERT(node);
2189
+ node_pointer next = table::next_node(node);
2190
+ table_.erase_nodes_equiv(node, next);
2191
+ return iterator(next);
1150
2192
  }
1151
2193
 
1152
- const_local_iterator begin(size_type n) const
2194
+ template <class K, class T, class H, class P, class A>
2195
+ typename unordered_multimap<K, T, H, P, A>::size_type
2196
+ unordered_multimap<K, T, H, P, A>::erase(const key_type& k)
1153
2197
  {
1154
- return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
2198
+ return table_.erase_key_equiv(k);
1155
2199
  }
1156
2200
 
1157
- local_iterator end(size_type) { return local_iterator(); }
1158
-
1159
- const_local_iterator end(size_type) const { return const_local_iterator(); }
1160
-
1161
- const_local_iterator cbegin(size_type n) const
2201
+ template <class K, class T, class H, class P, class A>
2202
+ typename unordered_multimap<K, T, H, P, A>::iterator
2203
+ unordered_multimap<K, T, H, P, A>::erase(
2204
+ const_iterator first, const_iterator last)
1162
2205
  {
1163
- return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
2206
+ node_pointer last_node = table::get_node(last);
2207
+ if (first == last)
2208
+ return iterator(last_node);
2209
+ table_.erase_nodes_equiv(table::get_node(first), last_node);
2210
+ return iterator(last_node);
1164
2211
  }
1165
2212
 
1166
- const_local_iterator cend(size_type) const
2213
+ template <class K, class T, class H, class P, class A>
2214
+ void unordered_multimap<K, T, H, P, A>::swap(unordered_multimap& other)
2215
+ BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&
2216
+ boost::is_nothrow_swappable<H>::value&&
2217
+ boost::is_nothrow_swappable<P>::value)
1167
2218
  {
1168
- return const_local_iterator();
2219
+ table_.swap(other.table_);
1169
2220
  }
1170
2221
 
1171
- // hash policy
1172
-
1173
- float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; }
1174
-
1175
- float load_factor() const BOOST_NOEXCEPT;
1176
- void max_load_factor(float) BOOST_NOEXCEPT;
1177
- void rehash(size_type);
1178
- void reserve(size_type);
1179
-
1180
- #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
1181
- friend bool operator==
1182
- <K, T, H, P, A>(unordered_multimap const&, unordered_multimap const&);
1183
- friend bool operator!=
1184
- <K, T, H, P, A>(unordered_multimap const&, unordered_multimap const&);
1185
- #endif
1186
- }; // class template unordered_multimap
1187
-
1188
- ////////////////////////////////////////////////////////////////////////////////
1189
-
1190
- template <class K, class T, class H, class P, class A>
1191
- unordered_map<K, T, H, P, A>::unordered_map()
1192
- : table_(boost::unordered::detail::default_bucket_count, hasher(),
1193
- key_equal(), allocator_type())
1194
- {
1195
- }
1196
-
1197
- template <class K, class T, class H, class P, class A>
1198
- unordered_map<K, T, H, P, A>::unordered_map(size_type n, const hasher& hf,
1199
- const key_equal& eql, const allocator_type& a)
1200
- : table_(n, hf, eql, a)
1201
- {
1202
- }
1203
-
1204
- template <class K, class T, class H, class P, class A>
1205
- unordered_map<K, T, H, P, A>::unordered_map(
1206
- size_type n, const allocator_type& a)
1207
- : table_(n, hasher(), key_equal(), a)
1208
- {
1209
- }
1210
-
1211
- template <class K, class T, class H, class P, class A>
1212
- unordered_map<K, T, H, P, A>::unordered_map(
1213
- size_type n, const hasher& hf, const allocator_type& a)
1214
- : table_(n, hf, key_equal(), a)
1215
- {
1216
- }
1217
-
1218
- template <class K, class T, class H, class P, class A>
1219
- unordered_map<K, T, H, P, A>::unordered_map(allocator_type const& a)
1220
- : table_(boost::unordered::detail::default_bucket_count, hasher(),
1221
- key_equal(), a)
1222
- {
1223
- }
1224
-
1225
- template <class K, class T, class H, class P, class A>
1226
- unordered_map<K, T, H, P, A>::unordered_map(
1227
- unordered_map const& other, allocator_type const& a)
1228
- : table_(other.table_, a)
1229
- {
1230
- }
1231
-
1232
- template <class K, class T, class H, class P, class A>
1233
- template <class InputIt>
1234
- unordered_map<K, T, H, P, A>::unordered_map(InputIt f, InputIt l)
1235
- : table_(boost::unordered::detail::initial_size(f, l), hasher(),
1236
- key_equal(), allocator_type())
1237
- {
1238
- table_.insert_range(f, l);
1239
- }
1240
-
1241
- template <class K, class T, class H, class P, class A>
1242
- template <class InputIt>
1243
- unordered_map<K, T, H, P, A>::unordered_map(
1244
- InputIt f, InputIt l, size_type n, const hasher& hf, const key_equal& eql)
1245
- : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql,
1246
- allocator_type())
1247
- {
1248
- table_.insert_range(f, l);
1249
- }
1250
-
1251
- template <class K, class T, class H, class P, class A>
1252
- template <class InputIt>
1253
- unordered_map<K, T, H, P, A>::unordered_map(InputIt f, InputIt l, size_type n,
1254
- const hasher& hf, const key_equal& eql, const allocator_type& a)
1255
- : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
1256
- {
1257
- table_.insert_range(f, l);
1258
- }
1259
-
1260
- template <class K, class T, class H, class P, class A>
1261
- template <class InputIt>
1262
- unordered_map<K, T, H, P, A>::unordered_map(InputIt f, InputIt l, size_type n,
1263
- const hasher& hf, const allocator_type& a)
1264
- : table_(
1265
- boost::unordered::detail::initial_size(f, l, n), hf, key_equal(), a)
1266
- {
1267
- table_.insert_range(f, l);
1268
- }
1269
-
1270
- template <class K, class T, class H, class P, class A>
1271
- template <class InputIt>
1272
- unordered_map<K, T, H, P, A>::unordered_map(
1273
- InputIt f, InputIt l, size_type n, const allocator_type& a)
1274
- : table_(boost::unordered::detail::initial_size(f, l, n), hasher(),
1275
- key_equal(), a)
1276
- {
1277
- table_.insert_range(f, l);
1278
- }
1279
-
1280
- template <class K, class T, class H, class P, class A>
1281
- unordered_map<K, T, H, P, A>::~unordered_map() BOOST_NOEXCEPT
1282
- {
1283
- }
1284
-
1285
- template <class K, class T, class H, class P, class A>
1286
- unordered_map<K, T, H, P, A>::unordered_map(unordered_map const& other)
1287
- : table_(other.table_)
1288
- {
1289
- }
1290
-
1291
- template <class K, class T, class H, class P, class A>
1292
- unordered_map<K, T, H, P, A>::unordered_map(
1293
- BOOST_RV_REF(unordered_map) other, allocator_type const& a)
1294
- : table_(other.table_, a, boost::unordered::detail::move_tag())
1295
- {
1296
- }
1297
-
1298
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1299
-
1300
- template <class K, class T, class H, class P, class A>
1301
- unordered_map<K, T, H, P, A>::unordered_map(
1302
- std::initializer_list<value_type> list, size_type n, const hasher& hf,
1303
- const key_equal& eql, const allocator_type& a)
1304
- : table_(
1305
- boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1306
- hf, eql, a)
1307
- {
1308
- table_.insert_range(list.begin(), list.end());
1309
- }
1310
-
1311
- template <class K, class T, class H, class P, class A>
1312
- unordered_map<K, T, H, P, A>::unordered_map(
1313
- std::initializer_list<value_type> list, size_type n, const hasher& hf,
1314
- const allocator_type& a)
1315
- : table_(
1316
- boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1317
- hf, key_equal(), a)
1318
- {
1319
- table_.insert_range(list.begin(), list.end());
1320
- }
1321
-
1322
- template <class K, class T, class H, class P, class A>
1323
- unordered_map<K, T, H, P, A>::unordered_map(
1324
- std::initializer_list<value_type> list, size_type n,
1325
- const allocator_type& a)
1326
- : table_(
1327
- boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1328
- hasher(), key_equal(), a)
1329
- {
1330
- table_.insert_range(list.begin(), list.end());
1331
- }
1332
-
1333
- template <class K, class T, class H, class P, class A>
1334
- unordered_map<K, T, H, P, A>& unordered_map<K, T, H, P, A>::operator=(
1335
- std::initializer_list<value_type> list)
1336
- {
1337
- table_.clear();
1338
- table_.insert_range(list.begin(), list.end());
1339
- return *this;
1340
- }
1341
-
1342
- #endif
1343
-
1344
- // size and capacity
1345
-
1346
- template <class K, class T, class H, class P, class A>
1347
- std::size_t unordered_map<K, T, H, P, A>::max_size() const BOOST_NOEXCEPT
1348
- {
1349
- return table_.max_size();
1350
- }
1351
-
1352
- // modifiers
2222
+ // observers
1353
2223
 
1354
- template <class K, class T, class H, class P, class A>
1355
- template <class InputIt>
1356
- void unordered_map<K, T, H, P, A>::insert(InputIt first, InputIt last)
1357
- {
1358
- table_.insert_range(first, last);
1359
- }
2224
+ template <class K, class T, class H, class P, class A>
2225
+ typename unordered_multimap<K, T, H, P, A>::hasher
2226
+ unordered_multimap<K, T, H, P, A>::hash_function() const
2227
+ {
2228
+ return table_.hash_function();
2229
+ }
1360
2230
 
1361
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1362
- template <class K, class T, class H, class P, class A>
1363
- void unordered_map<K, T, H, P, A>::insert(
1364
- std::initializer_list<value_type> list)
1365
- {
1366
- table_.insert_range(list.begin(), list.end());
1367
- }
1368
- #endif
2231
+ template <class K, class T, class H, class P, class A>
2232
+ typename unordered_multimap<K, T, H, P, A>::key_equal
2233
+ unordered_multimap<K, T, H, P, A>::key_eq() const
2234
+ {
2235
+ return table_.key_eq();
2236
+ }
1369
2237
 
1370
- template <class K, class T, class H, class P, class A>
1371
- typename unordered_map<K, T, H, P, A>::iterator
1372
- unordered_map<K, T, H, P, A>::erase(const_iterator position)
1373
- {
1374
- return table_.erase(position);
1375
- }
1376
-
1377
- template <class K, class T, class H, class P, class A>
1378
- typename unordered_map<K, T, H, P, A>::size_type
1379
- unordered_map<K, T, H, P, A>::erase(const key_type& k)
1380
- {
1381
- return table_.erase_key(k);
1382
- }
1383
-
1384
- template <class K, class T, class H, class P, class A>
1385
- typename unordered_map<K, T, H, P, A>::iterator
1386
- unordered_map<K, T, H, P, A>::erase(const_iterator first, const_iterator last)
1387
- {
1388
- return table_.erase_range(first, last);
1389
- }
1390
-
1391
- template <class K, class T, class H, class P, class A>
1392
- void unordered_map<K, T, H, P, A>::clear()
1393
- {
1394
- table_.clear();
1395
- }
1396
-
1397
- template <class K, class T, class H, class P, class A>
1398
- void unordered_map<K, T, H, P, A>::swap(unordered_map& other)
1399
- {
1400
- table_.swap(other.table_);
1401
- }
1402
-
1403
- template <class K, class T, class H, class P, class A>
1404
- template <typename H2, typename P2>
1405
- void unordered_map<K, T, H, P, A>::merge(
1406
- boost::unordered_map<K, T, H2, P2, A>& source)
1407
- {
1408
- table_.merge_impl(source.table_);
1409
- }
2238
+ template <class K, class T, class H, class P, class A>
2239
+ template <typename H2, typename P2>
2240
+ void unordered_multimap<K, T, H, P, A>::merge(
2241
+ boost::unordered_multimap<K, T, H2, P2, A>& source)
2242
+ {
2243
+ while (!source.empty()) {
2244
+ insert(source.extract(source.begin()));
2245
+ }
2246
+ }
1410
2247
 
1411
2248
  #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1412
- template <class K, class T, class H, class P, class A>
1413
- template <typename H2, typename P2>
1414
- void unordered_map<K, T, H, P, A>::merge(
1415
- boost::unordered_map<K, T, H2, P2, A>&& source)
1416
- {
1417
- table_.merge_impl(source.table_);
1418
- }
2249
+ template <class K, class T, class H, class P, class A>
2250
+ template <typename H2, typename P2>
2251
+ void unordered_multimap<K, T, H, P, A>::merge(
2252
+ boost::unordered_multimap<K, T, H2, P2, A>&& source)
2253
+ {
2254
+ while (!source.empty()) {
2255
+ insert(source.extract(source.begin()));
2256
+ }
2257
+ }
1419
2258
  #endif
1420
2259
 
1421
- #if BOOST_UNORDERED_INTEROPERABLE_NODES
1422
- template <class K, class T, class H, class P, class A>
1423
- template <typename H2, typename P2>
1424
- void unordered_map<K, T, H, P, A>::merge(
1425
- boost::unordered_multimap<K, T, H2, P2, A>& source)
1426
- {
1427
- table_.merge_impl(source.table_);
1428
- }
2260
+ template <class K, class T, class H, class P, class A>
2261
+ template <typename H2, typename P2>
2262
+ void unordered_multimap<K, T, H, P, A>::merge(
2263
+ boost::unordered_map<K, T, H2, P2, A>& source)
2264
+ {
2265
+ while (!source.empty()) {
2266
+ insert(source.extract(source.begin()));
2267
+ }
2268
+ }
1429
2269
 
1430
2270
  #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1431
- template <class K, class T, class H, class P, class A>
1432
- template <typename H2, typename P2>
1433
- void unordered_map<K, T, H, P, A>::merge(
1434
- boost::unordered_multimap<K, T, H2, P2, A>&& source)
1435
- {
1436
- table_.merge_impl(source.table_);
1437
- }
1438
- #endif
1439
- #endif
1440
-
1441
- // observers
1442
-
1443
- template <class K, class T, class H, class P, class A>
1444
- typename unordered_map<K, T, H, P, A>::hasher
1445
- unordered_map<K, T, H, P, A>::hash_function() const
1446
- {
1447
- return table_.hash_function();
1448
- }
1449
-
1450
- template <class K, class T, class H, class P, class A>
1451
- typename unordered_map<K, T, H, P, A>::key_equal
1452
- unordered_map<K, T, H, P, A>::key_eq() const
1453
- {
1454
- return table_.key_eq();
1455
- }
1456
-
1457
- template <class K, class T, class H, class P, class A>
1458
- typename unordered_map<K, T, H, P, A>::mapped_type&
1459
- unordered_map<K, T, H, P, A>::operator[](const key_type& k)
1460
- {
1461
- return table_.try_emplace_impl(k).first->second;
1462
- }
1463
-
1464
- template <class K, class T, class H, class P, class A>
1465
- typename unordered_map<K, T, H, P, A>::mapped_type&
1466
- unordered_map<K, T, H, P, A>::at(const key_type& k)
1467
- {
1468
- return table_.at(k).second;
1469
- }
1470
-
1471
- template <class K, class T, class H, class P, class A>
1472
- typename unordered_map<K, T, H, P, A>::mapped_type const&
1473
- unordered_map<K, T, H, P, A>::at(const key_type& k) const
1474
- {
1475
- return table_.at(k).second;
1476
- }
1477
-
1478
- // lookup
1479
-
1480
- template <class K, class T, class H, class P, class A>
1481
- typename unordered_map<K, T, H, P, A>::iterator
1482
- unordered_map<K, T, H, P, A>::find(const key_type& k)
1483
- {
1484
- return iterator(table_.find_node(k));
1485
- }
1486
-
1487
- template <class K, class T, class H, class P, class A>
1488
- typename unordered_map<K, T, H, P, A>::const_iterator
1489
- unordered_map<K, T, H, P, A>::find(const key_type& k) const
1490
- {
1491
- return const_iterator(table_.find_node(k));
1492
- }
1493
-
1494
- template <class K, class T, class H, class P, class A>
1495
- template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
1496
- typename unordered_map<K, T, H, P, A>::iterator
1497
- unordered_map<K, T, H, P, A>::find(CompatibleKey const& k,
1498
- CompatibleHash const& hash, CompatiblePredicate const& eq)
1499
- {
1500
- return iterator(table_.generic_find_node(k, hash, eq));
1501
- }
1502
-
1503
- template <class K, class T, class H, class P, class A>
1504
- template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
1505
- typename unordered_map<K, T, H, P, A>::const_iterator
1506
- unordered_map<K, T, H, P, A>::find(CompatibleKey const& k,
1507
- CompatibleHash const& hash, CompatiblePredicate const& eq) const
1508
- {
1509
- return const_iterator(table_.generic_find_node(k, hash, eq));
1510
- }
1511
-
1512
- template <class K, class T, class H, class P, class A>
1513
- typename unordered_map<K, T, H, P, A>::size_type
1514
- unordered_map<K, T, H, P, A>::count(const key_type& k) const
1515
- {
1516
- return table_.count(k);
1517
- }
1518
-
1519
- template <class K, class T, class H, class P, class A>
1520
- std::pair<typename unordered_map<K, T, H, P, A>::iterator,
1521
- typename unordered_map<K, T, H, P, A>::iterator>
1522
- unordered_map<K, T, H, P, A>::equal_range(const key_type& k)
1523
- {
1524
- return table_.equal_range(k);
1525
- }
1526
-
1527
- template <class K, class T, class H, class P, class A>
1528
- std::pair<typename unordered_map<K, T, H, P, A>::const_iterator,
1529
- typename unordered_map<K, T, H, P, A>::const_iterator>
1530
- unordered_map<K, T, H, P, A>::equal_range(const key_type& k) const
1531
- {
1532
- return table_.equal_range(k);
1533
- }
1534
-
1535
- template <class K, class T, class H, class P, class A>
1536
- typename unordered_map<K, T, H, P, A>::size_type
1537
- unordered_map<K, T, H, P, A>::bucket_size(size_type n) const
1538
- {
1539
- return table_.bucket_size(n);
1540
- }
1541
-
1542
- // hash policy
1543
-
1544
- template <class K, class T, class H, class P, class A>
1545
- float unordered_map<K, T, H, P, A>::load_factor() const BOOST_NOEXCEPT
1546
- {
1547
- return table_.load_factor();
1548
- }
1549
-
1550
- template <class K, class T, class H, class P, class A>
1551
- void unordered_map<K, T, H, P, A>::max_load_factor(float m) BOOST_NOEXCEPT
1552
- {
1553
- table_.max_load_factor(m);
1554
- }
1555
-
1556
- template <class K, class T, class H, class P, class A>
1557
- void unordered_map<K, T, H, P, A>::rehash(size_type n)
1558
- {
1559
- table_.rehash(n);
1560
- }
1561
-
1562
- template <class K, class T, class H, class P, class A>
1563
- void unordered_map<K, T, H, P, A>::reserve(size_type n)
1564
- {
1565
- table_.reserve(n);
1566
- }
1567
-
1568
- template <class K, class T, class H, class P, class A>
1569
- inline bool operator==(unordered_map<K, T, H, P, A> const& m1,
1570
- unordered_map<K, T, H, P, A> const& m2)
1571
- {
1572
- #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1573
- struct dummy
2271
+ template <class K, class T, class H, class P, class A>
2272
+ template <typename H2, typename P2>
2273
+ void unordered_multimap<K, T, H, P, A>::merge(
2274
+ boost::unordered_map<K, T, H2, P2, A>&& source)
1574
2275
  {
1575
- unordered_map<K, T, H, P, A> x;
1576
- };
2276
+ while (!source.empty()) {
2277
+ insert(source.extract(source.begin()));
2278
+ }
2279
+ }
1577
2280
  #endif
1578
- return m1.table_.equals(m2.table_);
1579
- }
1580
2281
 
1581
- template <class K, class T, class H, class P, class A>
1582
- inline bool operator!=(unordered_map<K, T, H, P, A> const& m1,
1583
- unordered_map<K, T, H, P, A> const& m2)
1584
- {
1585
- #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1586
- struct dummy
1587
- {
1588
- unordered_map<K, T, H, P, A> x;
1589
- };
1590
- #endif
1591
- return !m1.table_.equals(m2.table_);
1592
- }
2282
+ // lookup
1593
2283
 
1594
- template <class K, class T, class H, class P, class A>
1595
- inline void swap(
1596
- unordered_map<K, T, H, P, A>& m1, unordered_map<K, T, H, P, A>& m2)
1597
- {
1598
- #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1599
- struct dummy
2284
+ template <class K, class T, class H, class P, class A>
2285
+ typename unordered_multimap<K, T, H, P, A>::iterator
2286
+ unordered_multimap<K, T, H, P, A>::find(const key_type& k)
1600
2287
  {
1601
- unordered_map<K, T, H, P, A> x;
1602
- };
1603
- #endif
1604
- m1.swap(m2);
1605
- }
1606
-
1607
- ////////////////////////////////////////////////////////////////////////////////
1608
-
1609
- template <class K, class T, class H, class P, class A>
1610
- unordered_multimap<K, T, H, P, A>::unordered_multimap()
1611
- : table_(boost::unordered::detail::default_bucket_count, hasher(),
1612
- key_equal(), allocator_type())
1613
- {
1614
- }
1615
-
1616
- template <class K, class T, class H, class P, class A>
1617
- unordered_multimap<K, T, H, P, A>::unordered_multimap(size_type n,
1618
- const hasher& hf, const key_equal& eql, const allocator_type& a)
1619
- : table_(n, hf, eql, a)
1620
- {
1621
- }
1622
-
1623
- template <class K, class T, class H, class P, class A>
1624
- unordered_multimap<K, T, H, P, A>::unordered_multimap(
1625
- size_type n, const allocator_type& a)
1626
- : table_(n, hasher(), key_equal(), a)
1627
- {
1628
- }
1629
-
1630
- template <class K, class T, class H, class P, class A>
1631
- unordered_multimap<K, T, H, P, A>::unordered_multimap(
1632
- size_type n, const hasher& hf, const allocator_type& a)
1633
- : table_(n, hf, key_equal(), a)
1634
- {
1635
- }
1636
-
1637
- template <class K, class T, class H, class P, class A>
1638
- unordered_multimap<K, T, H, P, A>::unordered_multimap(allocator_type const& a)
1639
- : table_(boost::unordered::detail::default_bucket_count, hasher(),
1640
- key_equal(), a)
1641
- {
1642
- }
1643
-
1644
- template <class K, class T, class H, class P, class A>
1645
- unordered_multimap<K, T, H, P, A>::unordered_multimap(
1646
- unordered_multimap const& other, allocator_type const& a)
1647
- : table_(other.table_, a)
1648
- {
1649
- }
1650
-
1651
- template <class K, class T, class H, class P, class A>
1652
- template <class InputIt>
1653
- unordered_multimap<K, T, H, P, A>::unordered_multimap(InputIt f, InputIt l)
1654
- : table_(boost::unordered::detail::initial_size(f, l), hasher(),
1655
- key_equal(), allocator_type())
1656
- {
1657
- table_.insert_range(f, l);
1658
- }
1659
-
1660
- template <class K, class T, class H, class P, class A>
1661
- template <class InputIt>
1662
- unordered_multimap<K, T, H, P, A>::unordered_multimap(
1663
- InputIt f, InputIt l, size_type n, const hasher& hf, const key_equal& eql)
1664
- : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql,
1665
- allocator_type())
1666
- {
1667
- table_.insert_range(f, l);
1668
- }
1669
-
1670
- template <class K, class T, class H, class P, class A>
1671
- template <class InputIt>
1672
- unordered_multimap<K, T, H, P, A>::unordered_multimap(InputIt f, InputIt l,
1673
- size_type n, const hasher& hf, const key_equal& eql,
1674
- const allocator_type& a)
1675
- : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
1676
- {
1677
- table_.insert_range(f, l);
1678
- }
1679
-
1680
- template <class K, class T, class H, class P, class A>
1681
- template <class InputIt>
1682
- unordered_multimap<K, T, H, P, A>::unordered_multimap(InputIt f, InputIt l,
1683
- size_type n, const hasher& hf, const allocator_type& a)
1684
- : table_(
1685
- boost::unordered::detail::initial_size(f, l, n), hf, key_equal(), a)
1686
- {
1687
- table_.insert_range(f, l);
1688
- }
1689
-
1690
- template <class K, class T, class H, class P, class A>
1691
- template <class InputIt>
1692
- unordered_multimap<K, T, H, P, A>::unordered_multimap(
1693
- InputIt f, InputIt l, size_type n, const allocator_type& a)
1694
- : table_(boost::unordered::detail::initial_size(f, l, n), hasher(),
1695
- key_equal(), a)
1696
- {
1697
- table_.insert_range(f, l);
1698
- }
1699
-
1700
- template <class K, class T, class H, class P, class A>
1701
- unordered_multimap<K, T, H, P, A>::~unordered_multimap() BOOST_NOEXCEPT
1702
- {
1703
- }
1704
-
1705
- template <class K, class T, class H, class P, class A>
1706
- unordered_multimap<K, T, H, P, A>::unordered_multimap(
1707
- unordered_multimap const& other)
1708
- : table_(other.table_)
1709
- {
1710
- }
1711
-
1712
- template <class K, class T, class H, class P, class A>
1713
- unordered_multimap<K, T, H, P, A>::unordered_multimap(
1714
- BOOST_RV_REF(unordered_multimap) other, allocator_type const& a)
1715
- : table_(other.table_, a, boost::unordered::detail::move_tag())
1716
- {
1717
- }
2288
+ return iterator(table_.find_node(k));
2289
+ }
1718
2290
 
1719
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
2291
+ template <class K, class T, class H, class P, class A>
2292
+ typename unordered_multimap<K, T, H, P, A>::const_iterator
2293
+ unordered_multimap<K, T, H, P, A>::find(const key_type& k) const
2294
+ {
2295
+ return const_iterator(table_.find_node(k));
2296
+ }
1720
2297
 
1721
- template <class K, class T, class H, class P, class A>
1722
- unordered_multimap<K, T, H, P, A>::unordered_multimap(
1723
- std::initializer_list<value_type> list, size_type n, const hasher& hf,
1724
- const key_equal& eql, const allocator_type& a)
1725
- : table_(
1726
- boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1727
- hf, eql, a)
1728
- {
1729
- table_.insert_range(list.begin(), list.end());
1730
- }
1731
-
1732
- template <class K, class T, class H, class P, class A>
1733
- unordered_multimap<K, T, H, P, A>::unordered_multimap(
1734
- std::initializer_list<value_type> list, size_type n, const hasher& hf,
1735
- const allocator_type& a)
1736
- : table_(
1737
- boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1738
- hf, key_equal(), a)
1739
- {
1740
- table_.insert_range(list.begin(), list.end());
1741
- }
1742
-
1743
- template <class K, class T, class H, class P, class A>
1744
- unordered_multimap<K, T, H, P, A>::unordered_multimap(
1745
- std::initializer_list<value_type> list, size_type n,
1746
- const allocator_type& a)
1747
- : table_(
1748
- boost::unordered::detail::initial_size(list.begin(), list.end(), n),
1749
- hasher(), key_equal(), a)
1750
- {
1751
- table_.insert_range(list.begin(), list.end());
1752
- }
1753
-
1754
- template <class K, class T, class H, class P, class A>
1755
- unordered_multimap<K, T, H, P, A>& unordered_multimap<K, T, H, P, A>::operator=(
1756
- std::initializer_list<value_type> list)
1757
- {
1758
- table_.clear();
1759
- table_.insert_range(list.begin(), list.end());
1760
- return *this;
1761
- }
2298
+ template <class K, class T, class H, class P, class A>
2299
+ template <class CompatibleKey, class CompatibleHash,
2300
+ class CompatiblePredicate>
2301
+ typename unordered_multimap<K, T, H, P, A>::iterator
2302
+ unordered_multimap<K, T, H, P, A>::find(CompatibleKey const& k,
2303
+ CompatibleHash const& hash, CompatiblePredicate const& eq)
2304
+ {
2305
+ return iterator(
2306
+ table_.find_node_impl(table::policy::apply_hash(hash, k), k, eq));
2307
+ }
1762
2308
 
1763
- #endif
2309
+ template <class K, class T, class H, class P, class A>
2310
+ template <class CompatibleKey, class CompatibleHash,
2311
+ class CompatiblePredicate>
2312
+ typename unordered_multimap<K, T, H, P, A>::const_iterator
2313
+ unordered_multimap<K, T, H, P, A>::find(CompatibleKey const& k,
2314
+ CompatibleHash const& hash, CompatiblePredicate const& eq) const
2315
+ {
2316
+ return const_iterator(
2317
+ table_.find_node_impl(table::policy::apply_hash(hash, k), k, eq));
2318
+ }
1764
2319
 
1765
- // size and capacity
2320
+ template <class K, class T, class H, class P, class A>
2321
+ typename unordered_multimap<K, T, H, P, A>::size_type
2322
+ unordered_multimap<K, T, H, P, A>::count(const key_type& k) const
2323
+ {
2324
+ node_pointer n = table_.find_node(k);
2325
+ return n ? table_.group_count(n) : 0;
2326
+ }
1766
2327
 
1767
- template <class K, class T, class H, class P, class A>
1768
- std::size_t unordered_multimap<K, T, H, P, A>::max_size() const BOOST_NOEXCEPT
1769
- {
1770
- return table_.max_size();
1771
- }
2328
+ template <class K, class T, class H, class P, class A>
2329
+ std::pair<typename unordered_multimap<K, T, H, P, A>::iterator,
2330
+ typename unordered_multimap<K, T, H, P, A>::iterator>
2331
+ unordered_multimap<K, T, H, P, A>::equal_range(const key_type& k)
2332
+ {
2333
+ node_pointer n = table_.find_node(k);
2334
+ return std::make_pair(
2335
+ iterator(n), iterator(n ? table_.next_group(n) : n));
2336
+ }
1772
2337
 
1773
- // modifiers
2338
+ template <class K, class T, class H, class P, class A>
2339
+ std::pair<typename unordered_multimap<K, T, H, P, A>::const_iterator,
2340
+ typename unordered_multimap<K, T, H, P, A>::const_iterator>
2341
+ unordered_multimap<K, T, H, P, A>::equal_range(const key_type& k) const
2342
+ {
2343
+ node_pointer n = table_.find_node(k);
2344
+ return std::make_pair(
2345
+ const_iterator(n), const_iterator(n ? table_.next_group(n) : n));
2346
+ }
1774
2347
 
1775
- template <class K, class T, class H, class P, class A>
1776
- template <class InputIt>
1777
- void unordered_multimap<K, T, H, P, A>::insert(InputIt first, InputIt last)
1778
- {
1779
- table_.insert_range(first, last);
1780
- }
2348
+ template <class K, class T, class H, class P, class A>
2349
+ typename unordered_multimap<K, T, H, P, A>::size_type
2350
+ unordered_multimap<K, T, H, P, A>::bucket_size(size_type n) const
2351
+ {
2352
+ return table_.bucket_size(n);
2353
+ }
1781
2354
 
1782
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1783
- template <class K, class T, class H, class P, class A>
1784
- void unordered_multimap<K, T, H, P, A>::insert(
1785
- std::initializer_list<value_type> list)
1786
- {
1787
- table_.insert_range(list.begin(), list.end());
1788
- }
1789
- #endif
2355
+ // hash policy
1790
2356
 
1791
- template <class K, class T, class H, class P, class A>
1792
- typename unordered_multimap<K, T, H, P, A>::iterator
1793
- unordered_multimap<K, T, H, P, A>::erase(const_iterator position)
1794
- {
1795
- return table_.erase(position);
1796
- }
1797
-
1798
- template <class K, class T, class H, class P, class A>
1799
- typename unordered_multimap<K, T, H, P, A>::size_type
1800
- unordered_multimap<K, T, H, P, A>::erase(const key_type& k)
1801
- {
1802
- return table_.erase_key(k);
1803
- }
1804
-
1805
- template <class K, class T, class H, class P, class A>
1806
- typename unordered_multimap<K, T, H, P, A>::iterator
1807
- unordered_multimap<K, T, H, P, A>::erase(
1808
- const_iterator first, const_iterator last)
1809
- {
1810
- return table_.erase_range(first, last);
1811
- }
1812
-
1813
- template <class K, class T, class H, class P, class A>
1814
- void unordered_multimap<K, T, H, P, A>::clear()
1815
- {
1816
- table_.clear();
1817
- }
1818
-
1819
- template <class K, class T, class H, class P, class A>
1820
- void unordered_multimap<K, T, H, P, A>::swap(unordered_multimap& other)
1821
- {
1822
- table_.swap(other.table_);
1823
- }
1824
-
1825
- // observers
1826
-
1827
- template <class K, class T, class H, class P, class A>
1828
- typename unordered_multimap<K, T, H, P, A>::hasher
1829
- unordered_multimap<K, T, H, P, A>::hash_function() const
1830
- {
1831
- return table_.hash_function();
1832
- }
1833
-
1834
- template <class K, class T, class H, class P, class A>
1835
- typename unordered_multimap<K, T, H, P, A>::key_equal
1836
- unordered_multimap<K, T, H, P, A>::key_eq() const
1837
- {
1838
- return table_.key_eq();
1839
- }
1840
-
1841
- template <class K, class T, class H, class P, class A>
1842
- template <typename H2, typename P2>
1843
- void unordered_multimap<K, T, H, P, A>::merge(
1844
- boost::unordered_multimap<K, T, H2, P2, A>& source)
1845
- {
1846
- while (!source.empty()) {
1847
- insert(source.extract(source.begin()));
2357
+ template <class K, class T, class H, class P, class A>
2358
+ float unordered_multimap<K, T, H, P, A>::load_factor() const BOOST_NOEXCEPT
2359
+ {
2360
+ BOOST_ASSERT(table_.bucket_count_ != 0);
2361
+ return static_cast<float>(table_.size_) /
2362
+ static_cast<float>(table_.bucket_count_);
1848
2363
  }
1849
- }
1850
2364
 
1851
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1852
- template <class K, class T, class H, class P, class A>
1853
- template <typename H2, typename P2>
1854
- void unordered_multimap<K, T, H, P, A>::merge(
1855
- boost::unordered_multimap<K, T, H2, P2, A>&& source)
1856
- {
1857
- while (!source.empty()) {
1858
- insert(source.extract(source.begin()));
2365
+ template <class K, class T, class H, class P, class A>
2366
+ void unordered_multimap<K, T, H, P, A>::max_load_factor(
2367
+ float m) BOOST_NOEXCEPT
2368
+ {
2369
+ table_.max_load_factor(m);
1859
2370
  }
1860
- }
1861
- #endif
1862
2371
 
1863
- #if BOOST_UNORDERED_INTEROPERABLE_NODES
1864
- template <class K, class T, class H, class P, class A>
1865
- template <typename H2, typename P2>
1866
- void unordered_multimap<K, T, H, P, A>::merge(
1867
- boost::unordered_map<K, T, H2, P2, A>& source)
1868
- {
1869
- while (!source.empty()) {
1870
- insert(source.extract(source.begin()));
2372
+ template <class K, class T, class H, class P, class A>
2373
+ void unordered_multimap<K, T, H, P, A>::rehash(size_type n)
2374
+ {
2375
+ table_.rehash(n);
1871
2376
  }
1872
- }
1873
2377
 
1874
- #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
1875
- template <class K, class T, class H, class P, class A>
1876
- template <typename H2, typename P2>
1877
- void unordered_multimap<K, T, H, P, A>::merge(
1878
- boost::unordered_map<K, T, H2, P2, A>&& source)
1879
- {
1880
- while (!source.empty()) {
1881
- insert(source.extract(source.begin()));
2378
+ template <class K, class T, class H, class P, class A>
2379
+ void unordered_multimap<K, T, H, P, A>::reserve(size_type n)
2380
+ {
2381
+ table_.rehash(static_cast<std::size_t>(
2382
+ std::ceil(static_cast<double>(n) / table_.mlf_)));
1882
2383
  }
1883
- }
1884
- #endif
1885
- #endif
1886
2384
 
1887
- // lookup
1888
-
1889
- template <class K, class T, class H, class P, class A>
1890
- typename unordered_multimap<K, T, H, P, A>::iterator
1891
- unordered_multimap<K, T, H, P, A>::find(const key_type& k)
1892
- {
1893
- return iterator(table_.find_node(k));
1894
- }
1895
-
1896
- template <class K, class T, class H, class P, class A>
1897
- typename unordered_multimap<K, T, H, P, A>::const_iterator
1898
- unordered_multimap<K, T, H, P, A>::find(const key_type& k) const
1899
- {
1900
- return const_iterator(table_.find_node(k));
1901
- }
1902
-
1903
- template <class K, class T, class H, class P, class A>
1904
- template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
1905
- typename unordered_multimap<K, T, H, P, A>::iterator
1906
- unordered_multimap<K, T, H, P, A>::find(CompatibleKey const& k,
1907
- CompatibleHash const& hash, CompatiblePredicate const& eq)
1908
- {
1909
- return iterator(table_.generic_find_node(k, hash, eq));
1910
- }
1911
-
1912
- template <class K, class T, class H, class P, class A>
1913
- template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
1914
- typename unordered_multimap<K, T, H, P, A>::const_iterator
1915
- unordered_multimap<K, T, H, P, A>::find(CompatibleKey const& k,
1916
- CompatibleHash const& hash, CompatiblePredicate const& eq) const
1917
- {
1918
- return const_iterator(table_.generic_find_node(k, hash, eq));
1919
- }
1920
-
1921
- template <class K, class T, class H, class P, class A>
1922
- typename unordered_multimap<K, T, H, P, A>::size_type
1923
- unordered_multimap<K, T, H, P, A>::count(const key_type& k) const
1924
- {
1925
- return table_.count(k);
1926
- }
1927
-
1928
- template <class K, class T, class H, class P, class A>
1929
- std::pair<typename unordered_multimap<K, T, H, P, A>::iterator,
1930
- typename unordered_multimap<K, T, H, P, A>::iterator>
1931
- unordered_multimap<K, T, H, P, A>::equal_range(const key_type& k)
1932
- {
1933
- return table_.equal_range(k);
1934
- }
1935
-
1936
- template <class K, class T, class H, class P, class A>
1937
- std::pair<typename unordered_multimap<K, T, H, P, A>::const_iterator,
1938
- typename unordered_multimap<K, T, H, P, A>::const_iterator>
1939
- unordered_multimap<K, T, H, P, A>::equal_range(const key_type& k) const
1940
- {
1941
- return table_.equal_range(k);
1942
- }
1943
-
1944
- template <class K, class T, class H, class P, class A>
1945
- typename unordered_multimap<K, T, H, P, A>::size_type
1946
- unordered_multimap<K, T, H, P, A>::bucket_size(size_type n) const
1947
- {
1948
- return table_.bucket_size(n);
1949
- }
1950
-
1951
- // hash policy
1952
-
1953
- template <class K, class T, class H, class P, class A>
1954
- float unordered_multimap<K, T, H, P, A>::load_factor() const BOOST_NOEXCEPT
1955
- {
1956
- return table_.load_factor();
1957
- }
1958
-
1959
- template <class K, class T, class H, class P, class A>
1960
- void unordered_multimap<K, T, H, P, A>::max_load_factor(float m) BOOST_NOEXCEPT
1961
- {
1962
- table_.max_load_factor(m);
1963
- }
1964
-
1965
- template <class K, class T, class H, class P, class A>
1966
- void unordered_multimap<K, T, H, P, A>::rehash(size_type n)
1967
- {
1968
- table_.rehash(n);
1969
- }
1970
-
1971
- template <class K, class T, class H, class P, class A>
1972
- void unordered_multimap<K, T, H, P, A>::reserve(size_type n)
1973
- {
1974
- table_.reserve(n);
1975
- }
1976
-
1977
- template <class K, class T, class H, class P, class A>
1978
- inline bool operator==(unordered_multimap<K, T, H, P, A> const& m1,
1979
- unordered_multimap<K, T, H, P, A> const& m2)
1980
- {
1981
- #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1982
- struct dummy
2385
+ template <class K, class T, class H, class P, class A>
2386
+ inline bool operator==(unordered_multimap<K, T, H, P, A> const& m1,
2387
+ unordered_multimap<K, T, H, P, A> const& m2)
1983
2388
  {
2389
+ #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
2390
+ struct dummy
2391
+ {
1984
2392
  unordered_multimap<K, T, H, P, A> x;
1985
- };
2393
+ };
1986
2394
  #endif
1987
- return m1.table_.equals(m2.table_);
1988
- }
2395
+ return m1.table_.equals_equiv(m2.table_);
2396
+ }
1989
2397
 
1990
- template <class K, class T, class H, class P, class A>
1991
- inline bool operator!=(unordered_multimap<K, T, H, P, A> const& m1,
1992
- unordered_multimap<K, T, H, P, A> const& m2)
1993
- {
1994
- #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
1995
- struct dummy
2398
+ template <class K, class T, class H, class P, class A>
2399
+ inline bool operator!=(unordered_multimap<K, T, H, P, A> const& m1,
2400
+ unordered_multimap<K, T, H, P, A> const& m2)
1996
2401
  {
2402
+ #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
2403
+ struct dummy
2404
+ {
1997
2405
  unordered_multimap<K, T, H, P, A> x;
1998
- };
2406
+ };
1999
2407
  #endif
2000
- return !m1.table_.equals(m2.table_);
2001
- }
2408
+ return !m1.table_.equals_equiv(m2.table_);
2409
+ }
2002
2410
 
2003
- template <class K, class T, class H, class P, class A>
2004
- inline void swap(unordered_multimap<K, T, H, P, A>& m1,
2005
- unordered_multimap<K, T, H, P, A>& m2)
2006
- {
2007
- #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
2008
- struct dummy
2411
+ template <class K, class T, class H, class P, class A>
2412
+ inline void swap(unordered_multimap<K, T, H, P, A>& m1,
2413
+ unordered_multimap<K, T, H, P, A>& m2)
2414
+ BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(m1.swap(m2)))
2009
2415
  {
2416
+ #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
2417
+ struct dummy
2418
+ {
2010
2419
  unordered_multimap<K, T, H, P, A> x;
2011
- };
2420
+ };
2012
2421
  #endif
2013
- m1.swap(m2);
2014
- }
2422
+ m1.swap(m2);
2423
+ }
2015
2424
 
2016
- template <typename N, class K, class T, class A> class node_handle_map
2017
- {
2018
- BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle_map)
2425
+ template <typename N, class K, class T, class A> class node_handle_map
2426
+ {
2427
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle_map)
2019
2428
 
2020
- template <typename Types>
2021
- friend struct ::boost::unordered::detail::table_impl;
2022
- template <typename Types>
2023
- friend struct ::boost::unordered::detail::grouped_table_impl;
2429
+ template <typename Types> friend struct ::boost::unordered::detail::table;
2430
+ template <class K2, class T2, class H2, class P2, class A2>
2431
+ friend class boost::unordered::unordered_map;
2432
+ template <class K2, class T2, class H2, class P2, class A2>
2433
+ friend class boost::unordered::unordered_multimap;
2024
2434
 
2025
- typedef typename boost::unordered::detail::rebind_wrap<A,
2435
+ typedef typename boost::unordered::detail::rebind_wrap<A,
2026
2436
  std::pair<K const, T> >::type value_allocator;
2027
- typedef boost::unordered::detail::allocator_traits<value_allocator>
2437
+ typedef boost::unordered::detail::allocator_traits<value_allocator>
2028
2438
  value_allocator_traits;
2029
- typedef N node;
2030
- typedef typename boost::unordered::detail::rebind_wrap<A, node>::type
2439
+ typedef N node;
2440
+ typedef typename boost::unordered::detail::rebind_wrap<A, node>::type
2031
2441
  node_allocator;
2032
- typedef boost::unordered::detail::allocator_traits<node_allocator>
2442
+ typedef boost::unordered::detail::allocator_traits<node_allocator>
2033
2443
  node_allocator_traits;
2034
- typedef typename node_allocator_traits::pointer node_pointer;
2444
+ typedef typename node_allocator_traits::pointer node_pointer;
2035
2445
 
2036
- public:
2037
- typedef K key_type;
2038
- typedef T mapped_type;
2039
- typedef A allocator_type;
2446
+ public:
2447
+ typedef K key_type;
2448
+ typedef T mapped_type;
2449
+ typedef A allocator_type;
2040
2450
 
2041
- private:
2042
- node_pointer ptr_;
2043
- bool has_alloc_;
2044
- boost::unordered::detail::value_base<value_allocator> alloc_;
2451
+ private:
2452
+ node_pointer ptr_;
2453
+ boost::unordered::detail::optional<value_allocator> alloc_;
2045
2454
 
2046
- public:
2047
- BOOST_CONSTEXPR node_handle_map() BOOST_NOEXCEPT : ptr_(), has_alloc_(false)
2048
- {
2049
- }
2455
+ node_handle_map(node_pointer ptr, allocator_type const& a)
2456
+ : ptr_(ptr), alloc_(a)
2457
+ {
2458
+ }
2050
2459
 
2051
- /*BOOST_CONSTEXPR */ node_handle_map(
2052
- node_pointer ptr, allocator_type const& a)
2053
- : ptr_(ptr), has_alloc_(false)
2054
- {
2055
- if (ptr_) {
2056
- new ((void*)&alloc_) value_allocator(a);
2057
- has_alloc_ = true;
2058
- }
2059
- }
2460
+ public:
2461
+ BOOST_CONSTEXPR node_handle_map() BOOST_NOEXCEPT : ptr_(), alloc_() {}
2060
2462
 
2061
- ~node_handle_map()
2062
- {
2063
- if (has_alloc_ && ptr_) {
2064
- node_allocator node_alloc(alloc_.value());
2065
- boost::unordered::detail::node_tmp<node_allocator> tmp(
2066
- ptr_, node_alloc);
2067
- }
2068
- if (has_alloc_) {
2069
- alloc_.value_ptr()->~value_allocator();
2463
+ ~node_handle_map()
2464
+ {
2465
+ if (ptr_) {
2466
+ node_allocator node_alloc(*alloc_);
2467
+ boost::unordered::detail::node_tmp<node_allocator> tmp(
2468
+ ptr_, node_alloc);
2070
2469
  }
2071
- }
2470
+ }
2072
2471
 
2073
- node_handle_map(BOOST_RV_REF(node_handle_map) n) BOOST_NOEXCEPT
2472
+ node_handle_map(BOOST_RV_REF(node_handle_map) n) BOOST_NOEXCEPT
2074
2473
  : ptr_(n.ptr_),
2075
- has_alloc_(false)
2076
- {
2077
- if (n.has_alloc_) {
2078
- new ((void*)&alloc_) value_allocator(boost::move(n.alloc_.value()));
2079
- has_alloc_ = true;
2080
- n.ptr_ = node_pointer();
2081
- n.alloc_.value_ptr()->~value_allocator();
2082
- n.has_alloc_ = false;
2083
- }
2084
- }
2474
+ alloc_(boost::move(n.alloc_))
2475
+ {
2476
+ n.ptr_ = node_pointer();
2477
+ }
2085
2478
 
2086
- node_handle_map& operator=(BOOST_RV_REF(node_handle_map) n)
2087
- {
2088
- BOOST_ASSERT(!has_alloc_ ||
2479
+ node_handle_map& operator=(BOOST_RV_REF(node_handle_map) n)
2480
+ {
2481
+ BOOST_ASSERT(!alloc_.has_value() ||
2089
2482
  value_allocator_traits::
2090
- propagate_on_container_move_assignment::value ||
2091
- (n.has_alloc_ && alloc_.value() == n.alloc_.value()));
2483
+ propagate_on_container_move_assignment::value ||
2484
+ (n.alloc_.has_value() && alloc_ == n.alloc_));
2092
2485
 
2093
2486
  if (ptr_) {
2094
- node_allocator node_alloc(alloc_.value());
2095
- boost::unordered::detail::node_tmp<node_allocator> tmp(
2096
- ptr_, node_alloc);
2097
- ptr_ = node_pointer();
2098
- }
2099
-
2100
- if (has_alloc_) {
2101
- alloc_.value_ptr()->~value_allocator();
2102
- has_alloc_ = false;
2487
+ node_allocator node_alloc(*alloc_);
2488
+ boost::unordered::detail::node_tmp<node_allocator> tmp(
2489
+ ptr_, node_alloc);
2490
+ ptr_ = node_pointer();
2103
2491
  }
2104
2492
 
2105
- if (!has_alloc_ && n.has_alloc_) {
2106
- move_allocator(n);
2493
+ if (!alloc_.has_value() ||
2494
+ value_allocator_traits::propagate_on_container_move_assignment::
2495
+ value) {
2496
+ alloc_ = boost::move(n.alloc_);
2107
2497
  }
2108
-
2109
2498
  ptr_ = n.ptr_;
2110
2499
  n.ptr_ = node_pointer();
2111
2500
 
2112
2501
  return *this;
2113
- }
2502
+ }
2114
2503
 
2115
- key_type& key() const { return const_cast<key_type&>(ptr_->value().first); }
2504
+ key_type& key() const
2505
+ {
2506
+ return const_cast<key_type&>(ptr_->value().first);
2507
+ }
2116
2508
 
2117
- mapped_type& mapped() const { return ptr_->value().second; }
2509
+ mapped_type& mapped() const { return ptr_->value().second; }
2118
2510
 
2119
- allocator_type get_allocator() const { return alloc_.value(); }
2511
+ allocator_type get_allocator() const { return *alloc_; }
2120
2512
 
2121
- BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
2513
+ BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
2122
2514
 
2123
- bool operator!() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
2515
+ bool operator!() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
2124
2516
 
2125
- bool empty() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
2517
+ bool empty() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
2126
2518
 
2127
- void swap(node_handle_map& n) BOOST_NOEXCEPT_IF(
2128
- value_allocator_traits::propagate_on_container_swap::value
2129
- /* || value_allocator_traits::is_always_equal::value */)
2130
- {
2131
- if (!has_alloc_) {
2132
- if (n.has_alloc_) {
2133
- move_allocator(n);
2134
- }
2135
- } else if (!n.has_alloc_) {
2136
- n.move_allocator(*this);
2137
- } else {
2138
- swap_impl(n, boost::unordered::detail::integral_constant<bool,
2139
- value_allocator_traits::
2140
- propagate_on_container_swap::value>());
2519
+ void swap(node_handle_map& n) BOOST_NOEXCEPT_IF(
2520
+ value_allocator_traits::propagate_on_container_swap::value ||
2521
+ value_allocator_traits::is_always_equal::value)
2522
+ {
2523
+ BOOST_ASSERT(
2524
+ !alloc_.has_value() || !n.alloc_.has_value() ||
2525
+ value_allocator_traits::propagate_on_container_swap::value ||
2526
+ alloc_ == n.alloc_);
2527
+ if (value_allocator_traits::propagate_on_container_swap::value ||
2528
+ !alloc_.has_value() || !n.alloc_.has_value()) {
2529
+ boost::swap(alloc_, n.alloc_);
2141
2530
  }
2142
2531
  boost::swap(ptr_, n.ptr_);
2143
- }
2532
+ }
2533
+ };
2144
2534
 
2145
- private:
2146
- void move_allocator(node_handle_map& n)
2535
+ template <class N, class K, class T, class A>
2536
+ void swap(node_handle_map<N, K, T, A>& x, node_handle_map<N, K, T, A>& y)
2537
+ BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(x.swap(y)))
2147
2538
  {
2148
- new ((void*)&alloc_) value_allocator(boost::move(n.alloc_.value()));
2149
- n.alloc_.value_ptr()->~value_allocator();
2150
- has_alloc_ = true;
2151
- n.has_alloc_ = false;
2539
+ x.swap(y);
2152
2540
  }
2153
2541
 
2154
- void swap_impl(node_handle_map&, boost::unordered::detail::false_type) {}
2155
-
2156
- void swap_impl(node_handle_map& n, boost::unordered::detail::true_type)
2542
+ template <class N, class K, class T, class A> struct insert_return_type_map
2157
2543
  {
2158
- boost::swap(alloc_, n.alloc_);
2159
- }
2160
- };
2544
+ private:
2545
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(insert_return_type_map)
2161
2546
 
2162
- template <class N, class K, class T, class A>
2163
- void swap(node_handle_map<N, K, T, A>& x, node_handle_map<N, K, T, A>& y)
2164
- BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(x.swap(y)))
2165
- {
2166
- x.swap(y);
2167
- }
2168
-
2169
- template <class N, class K, class T, class A> struct insert_return_type_map
2170
- {
2171
- private:
2172
- BOOST_MOVABLE_BUT_NOT_COPYABLE(insert_return_type_map)
2173
-
2174
- typedef typename boost::unordered::detail::rebind_wrap<A,
2547
+ typedef typename boost::unordered::detail::rebind_wrap<A,
2175
2548
  std::pair<K const, T> >::type value_allocator;
2176
- typedef N node_;
2549
+ typedef N node_;
2177
2550
 
2178
- public:
2179
- bool inserted;
2180
- boost::unordered::iterator_detail::iterator<node_> position;
2181
- boost::unordered::node_handle_map<N, K, T, A> node;
2551
+ public:
2552
+ bool inserted;
2553
+ boost::unordered::iterator_detail::iterator<node_> position;
2554
+ boost::unordered::node_handle_map<N, K, T, A> node;
2182
2555
 
2183
- insert_return_type_map() : inserted(false), position(), node() {}
2556
+ insert_return_type_map() : inserted(false), position(), node() {}
2184
2557
 
2185
- insert_return_type_map(BOOST_RV_REF(insert_return_type_map)
2186
- x) BOOST_NOEXCEPT : inserted(x.inserted),
2187
- position(x.position),
2188
- node(boost::move(x.node))
2189
- {
2190
- }
2558
+ insert_return_type_map(BOOST_RV_REF(insert_return_type_map)
2559
+ x) BOOST_NOEXCEPT : inserted(x.inserted),
2560
+ position(x.position),
2561
+ node(boost::move(x.node))
2562
+ {
2563
+ }
2191
2564
 
2192
- insert_return_type_map& operator=(BOOST_RV_REF(insert_return_type_map) x)
2193
- {
2565
+ insert_return_type_map& operator=(BOOST_RV_REF(insert_return_type_map) x)
2566
+ {
2194
2567
  inserted = x.inserted;
2195
2568
  position = x.position;
2196
2569
  node = boost::move(x.node);
2197
2570
  return *this;
2571
+ }
2572
+ };
2573
+
2574
+ template <class N, class K, class T, class A>
2575
+ void swap(insert_return_type_map<N, K, T, A>& x,
2576
+ insert_return_type_map<N, K, T, A>& y)
2577
+ {
2578
+ boost::swap(x.node, y.node);
2579
+ boost::swap(x.inserted, y.inserted);
2580
+ boost::swap(x.position, y.position);
2198
2581
  }
2199
- };
2200
-
2201
- template <class N, class K, class T, class A>
2202
- void swap(insert_return_type_map<N, K, T, A>& x,
2203
- insert_return_type_map<N, K, T, A>& y)
2204
- {
2205
- boost::swap(x.node, y.node);
2206
- boost::swap(x.inserted, y.inserted);
2207
- boost::swap(x.position, y.position);
2208
- }
2209
- } // namespace unordered
2582
+ } // namespace unordered
2210
2583
  } // namespace boost
2211
2584
 
2212
2585
  #if defined(BOOST_MSVC)