passenger 5.3.3 → 5.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -28,7 +28,7 @@
28
28
 
29
29
  namespace boost {
30
30
  namespace container {
31
- namespace container_detail {
31
+ namespace dtl {
32
32
 
33
33
  using ::boost::move_detail::enable_if;
34
34
  using ::boost::move_detail::enable_if_and;
@@ -63,7 +63,7 @@ using ::boost::move_detail::aligned_storage;
63
63
  using ::boost::move_detail::nat;
64
64
  using ::boost::move_detail::max_align_t;
65
65
 
66
- } //namespace container_detail {
66
+ } //namespace dtl {
67
67
  } //namespace container {
68
68
  } //namespace boost {
69
69
 
@@ -0,0 +1,36 @@
1
+ #ifndef BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP
2
+ #define BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP
3
+ ///////////////////////////////////////////////////////////////////////////////
4
+ //
5
+ // (C) Copyright Ion Gaztanaga 2017-2017. Distributed under the Boost
6
+ // Software License, Version 1.0. (See accompanying file
7
+ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
+ //
9
+ // See http://www.boost.org/libs/container for documentation.
10
+ //
11
+ ///////////////////////////////////////////////////////////////////////////////
12
+
13
+ #ifndef BOOST_CONFIG_HPP
14
+ # include <boost/config.hpp>
15
+ #endif
16
+
17
+ #if defined(BOOST_HAS_PRAGMA_ONCE)
18
+ # pragma once
19
+ #endif
20
+
21
+ //Functors for member algorithm defaults
22
+ template<class ValueType>
23
+ struct value_less
24
+ {
25
+ bool operator()(const ValueType &a, const ValueType &b) const
26
+ { return a < b; }
27
+ };
28
+
29
+ template<class ValueType>
30
+ struct value_equal
31
+ {
32
+ bool operator()(const ValueType &a, const ValueType &b) const
33
+ { return a == b; }
34
+ };
35
+
36
+ #endif //BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP
@@ -26,7 +26,7 @@
26
26
 
27
27
  namespace boost {
28
28
  namespace container {
29
- namespace container_detail {
29
+ namespace dtl {
30
30
 
31
31
  template<class T>
32
32
  struct value_init
@@ -42,7 +42,7 @@ struct value_init
42
42
  T m_t;
43
43
  };
44
44
 
45
- } //namespace container_detail {
45
+ } //namespace dtl {
46
46
  } //namespace container {
47
47
  } //namespace boost {
48
48
 
@@ -28,7 +28,7 @@
28
28
 
29
29
  namespace boost {
30
30
  namespace container {
31
- namespace container_detail {
31
+ namespace dtl {
32
32
 
33
33
  template<typename... Values>
34
34
  class tuple;
@@ -156,7 +156,7 @@ struct build_number_seq
156
156
  template<> struct build_number_seq<0> : index_tuple<>{};
157
157
  template<> struct build_number_seq<1> : index_tuple<0>{};
158
158
 
159
- }}} //namespace boost { namespace container { namespace container_detail {
159
+ }}} //namespace boost { namespace container { namespace dtl {
160
160
 
161
161
  #include <boost/container/detail/config_end.hpp>
162
162
 
@@ -32,11 +32,11 @@
32
32
 
33
33
  namespace boost{
34
34
  namespace container {
35
- namespace container_detail {
35
+ namespace dtl {
36
36
 
37
37
  template <class T, unsigned V>
38
38
  struct version_type
39
- : public container_detail::integral_constant<unsigned, V>
39
+ : public dtl::integral_constant<unsigned, V>
40
40
  {
41
41
  typedef T type;
42
42
 
@@ -46,7 +46,7 @@ struct version_type
46
46
  namespace impl{
47
47
 
48
48
  template <class T,
49
- bool = container_detail::is_convertible<version_type<T, 0>, typename T::version>::value>
49
+ bool = dtl::is_convertible<version_type<T, 0>, typename T::version>::value>
50
50
  struct extract_version
51
51
  {
52
52
  static const unsigned value = 1;
@@ -86,7 +86,7 @@ struct version<T, true>
86
86
 
87
87
  template <class T>
88
88
  struct version
89
- : public container_detail::integral_constant<unsigned, impl::version<T>::value>
89
+ : public dtl::integral_constant<unsigned, impl::version<T>::value>
90
90
  {};
91
91
 
92
92
  template<class T, unsigned N>
@@ -96,11 +96,11 @@ struct is_version
96
96
  is_same< typename version<T>::type, integral_constant<unsigned, N> >::value;
97
97
  };
98
98
 
99
- } //namespace container_detail {
99
+ } //namespace dtl {
100
100
 
101
- typedef container_detail::integral_constant<unsigned, 0> version_0;
102
- typedef container_detail::integral_constant<unsigned, 1> version_1;
103
- typedef container_detail::integral_constant<unsigned, 2> version_2;
101
+ typedef dtl::integral_constant<unsigned, 0> version_0;
102
+ typedef dtl::integral_constant<unsigned, 1> version_1;
103
+ typedef dtl::integral_constant<unsigned, 2> version_2;
104
104
 
105
105
  } //namespace container {
106
106
  } //namespace boost{
@@ -43,12 +43,6 @@
43
43
  # endif
44
44
  #endif
45
45
 
46
- #if !defined(BOOST_FALLTHOUGH)
47
- #define BOOST_CONTAINER_FALLTHOUGH
48
- #else
49
- #define BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHOUGH;
50
- #endif
51
-
52
46
  #if defined(BOOST_MSVC) && (_MSC_VER < 1400)
53
47
  #define BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN
54
48
  #endif
@@ -30,6 +30,7 @@
30
30
  #include <boost/container/detail/type_traits.hpp>
31
31
  #include <boost/container/detail/mpl.hpp>
32
32
  #include <boost/container/detail/algorithm.hpp> //equal()
33
+ #include <boost/container/detail/container_or_allocator_rebind.hpp>
33
34
  // move
34
35
  #include <boost/move/utility_core.hpp>
35
36
  #include <boost/move/traits.hpp>
@@ -53,59 +54,60 @@ namespace container {
53
54
 
54
55
  #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
55
56
 
56
- template <class Key, class T, class Compare, class Allocator>
57
+ template <class Key, class T, class Compare, class AllocatorOrContainer>
57
58
  class flat_multimap;
58
59
 
59
- namespace container_detail{
60
+ namespace dtl{
60
61
 
61
62
  template<class D, class S>
62
- BOOST_CONTAINER_FORCEINLINE static D &force(const S &s)
63
- { return *const_cast<D*>((reinterpret_cast<const D*>(&s))); }
63
+ BOOST_CONTAINER_FORCEINLINE static D &force(S &s)
64
+ { return *reinterpret_cast<D*>(&s); }
64
65
 
65
66
  template<class D, class S>
66
- BOOST_CONTAINER_FORCEINLINE static D force_copy(S s)
67
+ BOOST_CONTAINER_FORCEINLINE static D force_copy(const S &s)
67
68
  {
68
- D *vp = reinterpret_cast<D *>(&s);
69
- return D(*vp);
69
+ const D *const vp = reinterpret_cast<const D *>(&s);
70
+ D ret_val(*vp);
71
+ return ret_val;
70
72
  }
71
73
 
72
- } //namespace container_detail{
74
+ } //namespace dtl{
73
75
 
74
76
  #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
75
77
 
76
78
  //! A flat_map is a kind of associative container that supports unique keys (contains at
77
79
  //! most one of each key value) and provides for fast retrieval of values of another
78
- //! type T based on the keys. The flat_map class supports random-access iterators.
80
+ //! type T based on the keys.
79
81
  //!
80
- //! A flat_map satisfies all of the requirements of a container and of a reversible
81
- //! container and of an associative container. A flat_map also provides
82
+ //! A flat_map satisfies all of the requirements of a container, a reversible
83
+ //! container and an associative container. A flat_map also provides
82
84
  //! most operations described for unique keys. For a
83
85
  //! flat_map<Key,T> the key_type is Key and the value_type is std::pair<Key,T>
84
86
  //! (unlike std::map<Key, T> which value_type is std::pair<<b>const</b> Key, T>).
85
87
  //!
86
- //! Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
88
+ //! flat_map is similar to std::map but it's implemented by as an ordered sequence container.
89
+ //! The underlying sequence container is by default <i>vector</i> but it can also work
90
+ //! user-provided vector-like SequenceContainers (like <i>static_vector</i> or <i>small_vector</i>).
87
91
  //!
88
- //! Allocator is the allocator to allocate the value_types
89
- //! (e.g. <i>allocator< std::pair<Key, T> ></i>).
90
- //!
91
- //! flat_map is similar to std::map but it's implemented like an ordered vector.
92
- //! This means that inserting a new element into a flat_map invalidates
93
- //! previous iterators and references
94
- //!
95
- //! Erasing an element invalidates iterators and references
96
- //! pointing to elements that come after (their keys are bigger) the erased element.
92
+ //! Using vector-like sequence containers means that inserting a new element into a flat_map might invalidate
93
+ //! previous iterators and references (unless that sequence container is <i>stable_vector</i> or a similar
94
+ //! container that offers stable pointers and references). Similarly, erasing an element might invalidate
95
+ //! iterators and references pointing to elements that come after (their keys are bigger) the erased element.
97
96
  //!
98
97
  //! This container provides random-access iterators.
99
98
  //!
100
99
  //! \tparam Key is the key_type of the map
101
100
  //! \tparam Value is the <code>mapped_type</code>
102
101
  //! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
103
- //! \tparam Allocator is the allocator to allocate the <code>value_type</code>s
104
- //! (e.g. <i>allocator< std::pair<Key, T> > </i>).
102
+ //! \tparam AllocatorOrContainer is either:
103
+ //! - The allocator to allocate <code>value_type</code>s (e.g. <i>allocator< std::pair<Key, T> > </i>).
104
+ //! (in this case <i>sequence_type</i> will be vector<value_type, AllocatorOrContainer>)
105
+ //! - The SequenceContainer to be used as the underlying <i>sequence_type</i>. It must be a vector-like
106
+ //! sequence container with random-access iterators..
105
107
  #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
106
- template <class Key, class T, class Compare = std::less<Key>, class Allocator = new_allocator< std::pair< Key, T> > >
108
+ template <class Key, class T, class Compare = std::less<Key>, class AllocatorOrContainer = new_allocator< std::pair< Key, T> > >
107
109
  #else
108
- template <class Key, class T, class Compare, class Allocator>
110
+ template <class Key, class T, class Compare, class AllocatorOrContainer>
109
111
  #endif
110
112
  class flat_map
111
113
  {
@@ -113,47 +115,54 @@ class flat_map
113
115
  private:
114
116
  BOOST_COPYABLE_AND_MOVABLE(flat_map)
115
117
  //This is the tree that we should store if pair was movable
116
- typedef container_detail::flat_tree<
118
+ typedef dtl::flat_tree<
117
119
  std::pair<Key, T>,
118
- container_detail::select1st<Key>,
120
+ dtl::select1st<Key>,
119
121
  Compare,
120
- Allocator> tree_t;
122
+ AllocatorOrContainer> tree_t;
121
123
 
122
124
  //This is the real tree stored here. It's based on a movable pair
123
- typedef container_detail::flat_tree<
124
- container_detail::pair<Key, T>,
125
- container_detail::select1st<Key>,
125
+ typedef dtl::flat_tree<
126
+ dtl::pair<Key, T>,
127
+ dtl::select1st<Key>,
126
128
  Compare,
127
- typename allocator_traits<Allocator>::template portable_rebind_alloc
128
- <container_detail::pair<Key, T> >::type> impl_tree_t;
129
+ typename dtl::container_or_allocator_rebind<AllocatorOrContainer, dtl::pair<Key, T> >::type
130
+ > impl_tree_t;
129
131
  impl_tree_t m_flat_tree; // flat tree representing flat_map
130
132
 
131
133
  typedef typename impl_tree_t::value_type impl_value_type;
132
134
  typedef typename impl_tree_t::const_iterator impl_const_iterator;
133
135
  typedef typename impl_tree_t::iterator impl_iterator;
134
136
  typedef typename impl_tree_t::allocator_type impl_allocator_type;
135
- typedef container_detail::flat_tree_value_compare
137
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
138
+ typedef std::initializer_list<impl_value_type> impl_initializer_list;
139
+ #endif
140
+
141
+ typedef dtl::flat_tree_value_compare
136
142
  < Compare
137
- , container_detail::select1st<Key>
138
- , std::pair<Key, T> > value_compare_impl;
139
- typedef typename container_detail::get_flat_tree_iterators
140
- <typename allocator_traits<Allocator>::pointer>::iterator iterator_impl;
141
- typedef typename container_detail::get_flat_tree_iterators
142
- <typename allocator_traits<Allocator>::pointer>::const_iterator const_iterator_impl;
143
- typedef typename container_detail::get_flat_tree_iterators
144
- <typename allocator_traits<Allocator>::pointer>::reverse_iterator reverse_iterator_impl;
145
- typedef typename container_detail::get_flat_tree_iterators
146
- <typename allocator_traits<Allocator>::pointer>::const_reverse_iterator const_reverse_iterator_impl;
143
+ , dtl::select1st<Key>
144
+ , std::pair<Key, T> > value_compare_t;
145
+ typedef typename tree_t::iterator iterator_t;
146
+ typedef typename tree_t::const_iterator const_iterator_t;
147
+ typedef typename tree_t::reverse_iterator reverse_iterator_t;
148
+ typedef typename tree_t::const_reverse_iterator const_reverse_iterator_t;
149
+
147
150
  public:
148
151
  typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type;
152
+ typedef typename impl_tree_t::sequence_type impl_sequence_type;
149
153
 
150
- impl_tree_t &tree()
154
+ BOOST_CONTAINER_FORCEINLINE impl_tree_t &tree()
151
155
  { return m_flat_tree; }
152
156
 
153
- const impl_tree_t &tree() const
157
+ BOOST_CONTAINER_FORCEINLINE const impl_tree_t &tree() const
154
158
  { return m_flat_tree; }
155
159
 
156
160
  private:
161
+ typedef typename tree_t::get_stored_allocator_const_return_t get_stored_allocator_const_return_t;
162
+ typedef typename tree_t::get_stored_allocator_noconst_return_t get_stored_allocator_noconst_return_t;
163
+ typedef typename impl_tree_t::get_stored_allocator_const_return_t impl_get_stored_allocator_const_return_t;
164
+ typedef typename impl_tree_t::get_stored_allocator_noconst_return_t impl_get_stored_allocator_noconst_return_t;
165
+
157
166
  #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
158
167
 
159
168
  public:
@@ -165,25 +174,29 @@ class flat_map
165
174
  //////////////////////////////////////////////
166
175
  typedef Key key_type;
167
176
  typedef T mapped_type;
168
- typedef std::pair<Key, T> value_type;
169
- typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
170
- typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
171
- typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
172
- typedef typename boost::container::allocator_traits<Allocator>::reference reference;
173
- typedef typename boost::container::allocator_traits<Allocator>::const_reference const_reference;
174
- typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
175
- typedef typename boost::container::allocator_traits<Allocator>::difference_type difference_type;
176
- typedef Allocator allocator_type;
177
- typedef BOOST_CONTAINER_IMPDEF(Allocator) stored_allocator_type;
178
- typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare;
179
177
  typedef Compare key_compare;
180
- typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
181
- typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
182
- typedef BOOST_CONTAINER_IMPDEF(reverse_iterator_impl) reverse_iterator;
183
- typedef BOOST_CONTAINER_IMPDEF(const_reverse_iterator_impl) const_reverse_iterator;
178
+ typedef std::pair<Key, T> value_type;
179
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type;
180
+ typedef typename sequence_type::allocator_type allocator_type;
181
+ typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
182
+ typedef typename sequence_type::pointer pointer;
183
+ typedef typename sequence_type::const_pointer const_pointer;
184
+ typedef typename sequence_type::reference reference;
185
+ typedef typename sequence_type::const_reference const_reference;
186
+ typedef typename sequence_type::size_type size_type;
187
+ typedef typename sequence_type::difference_type difference_type;
188
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::stored_allocator_type) stored_allocator_type;
189
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::value_compare) value_compare;
190
+
191
+ typedef typename sequence_type::iterator iterator;
192
+ typedef typename sequence_type::const_iterator const_iterator;
193
+ typedef typename sequence_type::reverse_iterator reverse_iterator;
194
+ typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
184
195
  typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type;
185
196
 
186
- public:
197
+ //AllocatorOrContainer::value_type must be std::pair<Key, T>
198
+ BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, typename allocator_type::value_type>::value));
199
+
187
200
  //////////////////////////////////////////////
188
201
  //
189
202
  // construct/copy/destroy
@@ -193,106 +206,200 @@ class flat_map
193
206
  //! <b>Effects</b>: Default constructs an empty flat_map.
194
207
  //!
195
208
  //! <b>Complexity</b>: Constant.
196
- flat_map() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
197
- container_detail::is_nothrow_default_constructible<Compare>::value)
209
+ BOOST_CONTAINER_FORCEINLINE flat_map() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
210
+ dtl::is_nothrow_default_constructible<Compare>::value)
198
211
  : m_flat_tree()
199
- {
200
- //value_type must be std::pair<Key, T>
201
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
202
- }
212
+ {}
213
+
214
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified allocator.
215
+ //!
216
+ //! <b>Complexity</b>: Constant.
217
+ BOOST_CONTAINER_FORCEINLINE explicit flat_map(const allocator_type& a)
218
+ : m_flat_tree(dtl::force<const impl_allocator_type>(a))
219
+ {}
203
220
 
204
221
  //! <b>Effects</b>: Constructs an empty flat_map using the specified
205
- //! comparison object and allocator.
222
+ //! comparison object.
206
223
  //!
207
224
  //! <b>Complexity</b>: Constant.
208
- explicit flat_map(const Compare& comp, const allocator_type& a = allocator_type())
209
- : m_flat_tree(comp, container_detail::force<impl_allocator_type>(a))
210
- {
211
- //value_type must be std::pair<Key, T>
212
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
213
- }
225
+ BOOST_CONTAINER_FORCEINLINE explicit flat_map(const Compare& comp)
226
+ : m_flat_tree(comp)
227
+ {}
214
228
 
215
- //! <b>Effects</b>: Constructs an empty flat_map using the specified allocator.
229
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified
230
+ //! comparison object and allocator.
216
231
  //!
217
232
  //! <b>Complexity</b>: Constant.
218
- explicit flat_map(const allocator_type& a)
219
- : m_flat_tree(container_detail::force<impl_allocator_type>(a))
220
- {
221
- //value_type must be std::pair<Key, T>
222
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
223
- }
233
+ BOOST_CONTAINER_FORCEINLINE flat_map(const Compare& comp, const allocator_type& a)
234
+ : m_flat_tree(comp, dtl::force<const impl_allocator_type>(a))
235
+ {}
224
236
 
225
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
226
- //! allocator, and inserts elements from the range [first ,last ).
237
+ //! <b>Effects</b>: Constructs an empty flat_map and
238
+ //! and inserts elements from the range [first ,last ).
227
239
  //!
228
240
  //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
229
- //! comp and otherwise N logN, where N is last - first.
241
+ //! the predicate and otherwise N logN, where N is last - first.
230
242
  template <class InputIterator>
231
- flat_map(InputIterator first, InputIterator last, const Compare& comp = Compare(),
232
- const allocator_type& a = allocator_type())
233
- : m_flat_tree(true, first, last, comp, container_detail::force<impl_allocator_type>(a))
234
- {
235
- //value_type must be std::pair<Key, T>
236
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
237
- }
243
+ BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last)
244
+ : m_flat_tree(true, first, last)
245
+ {}
238
246
 
239
247
  //! <b>Effects</b>: Constructs an empty flat_map using the specified
240
248
  //! allocator, and inserts elements from the range [first ,last ).
241
249
  //!
242
250
  //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
243
- //! comp and otherwise N logN, where N is last - first.
251
+ //! the predicate and otherwise N logN, where N is last - first.
244
252
  template <class InputIterator>
245
- flat_map(InputIterator first, InputIterator last, const allocator_type& a)
246
- : m_flat_tree(true, first, last, Compare(), container_detail::force<impl_allocator_type>(a))
247
- {
248
- //value_type must be std::pair<Key, T>
249
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
250
- }
253
+ BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const allocator_type& a)
254
+ : m_flat_tree(true, first, last, dtl::force<const impl_allocator_type>(a))
255
+ {}
256
+
257
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
258
+ //! and inserts elements from the range [first ,last ).
259
+ //!
260
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
261
+ //! the predicate and otherwise N logN, where N is last - first.
262
+ template <class InputIterator>
263
+ BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const Compare& comp)
264
+ : m_flat_tree(true, first, last, comp)
265
+ {}
251
266
 
252
267
  //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
253
- //! allocator, and inserts elements from the ordered unique range [first ,last). This function
268
+ //! allocator, and inserts elements from the range [first ,last ).
269
+ //!
270
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
271
+ //! the predicate and otherwise N logN, where N is last - first.
272
+ template <class InputIterator>
273
+ BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
274
+ : m_flat_tree(true, first, last, comp, dtl::force<const impl_allocator_type>(a))
275
+ {}
276
+
277
+ //! <b>Effects</b>: Constructs an empty flat_map
278
+ //! and inserts elements from the ordered range [first ,last). This function
254
279
  //! is more efficient than the normal range creation for ordered ranges.
255
280
  //!
256
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
257
- //! unique values.
281
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
258
282
  //!
259
283
  //! <b>Complexity</b>: Linear in N.
260
284
  //!
261
285
  //! <b>Note</b>: Non-standard extension.
262
286
  template <class InputIterator>
263
- flat_map( ordered_unique_range_t, InputIterator first, InputIterator last
264
- , const Compare& comp = Compare(), const allocator_type& a = allocator_type())
265
- : m_flat_tree(ordered_unique_range, first, last, comp, a)
266
- {
267
- //value_type must be std::pair<Key, T>
268
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
269
- }
287
+ BOOST_CONTAINER_FORCEINLINE
288
+ flat_map(ordered_unique_range_t, InputIterator first, InputIterator last)
289
+ : m_flat_tree(ordered_range, first, last)
290
+ {}
270
291
 
271
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
272
292
  //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
273
- //! allocator, and inserts elements from the range [il.begin() ,il.end()).
293
+ //! inserts elements from the ordered range [first ,last). This function
294
+ //! is more efficient than the normal range creation for ordered ranges.
295
+ //!
296
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
297
+ //!
298
+ //! <b>Complexity</b>: Linear in N.
299
+ //!
300
+ //! <b>Note</b>: Non-standard extension.
301
+ template <class InputIterator>
302
+ BOOST_CONTAINER_FORCEINLINE
303
+ flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
304
+ : m_flat_tree(ordered_range, first, last, comp)
305
+ {}
306
+
307
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
308
+ //! allocator, and inserts elements from the ordered range [first ,last). This function
309
+ //! is more efficient than the normal range creation for ordered ranges.
310
+ //!
311
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
312
+ //!
313
+ //! <b>Complexity</b>: Linear in N.
314
+ //!
315
+ //! <b>Note</b>: Non-standard extension.
316
+ template <class InputIterator>
317
+ BOOST_CONTAINER_FORCEINLINE
318
+ flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
319
+ : m_flat_tree(ordered_range, first, last, comp, dtl::force<const impl_allocator_type>(a))
320
+ {}
321
+
322
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
323
+ //! <b>Effects</b>: Constructs an empty flat_map and
324
+ //! inserts elements from the range [il.begin() ,il.end()).
274
325
  //!
275
326
  //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
276
- //! comp and otherwise N logN, where N is last - first.
277
- flat_map(std::initializer_list<value_type> il, const Compare& comp = Compare(),
278
- const allocator_type& a = allocator_type())
279
- : m_flat_tree(true, il.begin(), il.end(), comp, container_detail::force<impl_allocator_type>(a))
280
- {
281
- //value_type must be std::pair<Key, T>
282
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
283
- }
327
+ //! the predicate and otherwise N logN, where N is last - first.
328
+ BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il)
329
+ : m_flat_tree( true
330
+ , dtl::force<impl_initializer_list>(il).begin()
331
+ , dtl::force<impl_initializer_list>(il).end())
332
+ {}
284
333
 
285
334
  //! <b>Effects</b>: Constructs an empty flat_map using the specified
286
335
  //! allocator, and inserts elements from the range [il.begin() ,il.end()).
287
336
  //!
288
337
  //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
289
- //! comp and otherwise N logN, where N is last - first.
290
- flat_map(std::initializer_list<value_type> il, const allocator_type& a)
291
- : m_flat_tree(true, il.begin(), il.end(), Compare(), container_detail::force<impl_allocator_type>(a))
292
- {
293
- //value_type must be std::pair<Key, T>
294
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
295
- }
338
+ //! the predicate and otherwise N logN, where N is last - first.
339
+ BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il, const allocator_type& a)
340
+ : m_flat_tree( true
341
+ , dtl::force<impl_initializer_list>(il).begin()
342
+ , dtl::force<impl_initializer_list>(il).end()
343
+ , dtl::force<const impl_allocator_type>(a))
344
+ {}
345
+
346
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
347
+ //! inserts elements from the range [il.begin() ,il.end()).
348
+ //!
349
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
350
+ //! the predicate and otherwise N logN, where N is last - first.
351
+ BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il, const Compare& comp)
352
+ : m_flat_tree(true
353
+ , dtl::force<impl_initializer_list>(il).begin()
354
+ , dtl::force<impl_initializer_list>(il).end()
355
+ , comp)
356
+ {}
357
+
358
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
359
+ //! allocator, and inserts elements from the range [il.begin() ,il.end()).
360
+ //!
361
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
362
+ //! the predicate and otherwise N logN, where N is last - first.
363
+ BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
364
+ : m_flat_tree(true
365
+ , dtl::force<impl_initializer_list>(il).begin()
366
+ , dtl::force<impl_initializer_list>(il).end()
367
+ , comp
368
+ , dtl::force<const impl_allocator_type>(a))
369
+ {}
370
+
371
+ //! <b>Effects</b>: Constructs an empty flat_map using and
372
+ //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
373
+ //! is more efficient than the normal range creation for ordered ranges.
374
+ //!
375
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
376
+ //! unique values.
377
+ //!
378
+ //! <b>Complexity</b>: Linear in N.
379
+ //!
380
+ //! <b>Note</b>: Non-standard extension.
381
+ BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list<value_type> il)
382
+ : m_flat_tree(ordered_unique_range
383
+ , dtl::force<impl_initializer_list>(il).begin()
384
+ , dtl::force<impl_initializer_list>(il).end())
385
+ {}
386
+
387
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
388
+ //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
389
+ //! is more efficient than the normal range creation for ordered ranges.
390
+ //!
391
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
392
+ //! unique values.
393
+ //!
394
+ //! <b>Complexity</b>: Linear in N.
395
+ //!
396
+ //! <b>Note</b>: Non-standard extension.
397
+ BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
398
+ : m_flat_tree(ordered_unique_range
399
+ , dtl::force<impl_initializer_list>(il).begin()
400
+ , dtl::force<impl_initializer_list>(il).end()
401
+ , comp)
402
+ {}
296
403
 
297
404
  //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
298
405
  //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
@@ -304,24 +411,21 @@ class flat_map
304
411
  //! <b>Complexity</b>: Linear in N.
305
412
  //!
306
413
  //! <b>Note</b>: Non-standard extension.
307
- flat_map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp = Compare(),
308
- const allocator_type& a = allocator_type())
309
- : m_flat_tree(ordered_unique_range, il.begin(), il.end(), comp, a)
310
- {
311
- //value_type must be std::pair<Key, T>
312
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
313
- }
414
+ BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
415
+ : m_flat_tree( ordered_unique_range
416
+ , dtl::force<impl_initializer_list>(il).begin()
417
+ , dtl::force<impl_initializer_list>(il).end()
418
+ , comp
419
+ , dtl::force<const impl_allocator_type>(a))
420
+ {}
314
421
  #endif
315
422
 
316
423
  //! <b>Effects</b>: Copy constructs a flat_map.
317
424
  //!
318
425
  //! <b>Complexity</b>: Linear in x.size().
319
- flat_map(const flat_map& x)
426
+ BOOST_CONTAINER_FORCEINLINE flat_map(const flat_map& x)
320
427
  : m_flat_tree(x.m_flat_tree)
321
- {
322
- //value_type must be std::pair<Key, T>
323
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
324
- }
428
+ {}
325
429
 
326
430
  //! <b>Effects</b>: Move constructs a flat_map.
327
431
  //! Constructs *this using x's resources.
@@ -329,39 +433,30 @@ class flat_map
329
433
  //! <b>Complexity</b>: Constant.
330
434
  //!
331
435
  //! <b>Postcondition</b>: x is emptied.
332
- flat_map(BOOST_RV_REF(flat_map) x)
333
- BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
436
+ BOOST_CONTAINER_FORCEINLINE flat_map(BOOST_RV_REF(flat_map) x)
437
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
334
438
  : m_flat_tree(boost::move(x.m_flat_tree))
335
- {
336
- //value_type must be std::pair<Key, T>
337
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
338
- }
439
+ {}
339
440
 
340
441
  //! <b>Effects</b>: Copy constructs a flat_map using the specified allocator.
341
442
  //!
342
443
  //! <b>Complexity</b>: Linear in x.size().
343
- flat_map(const flat_map& x, const allocator_type &a)
344
- : m_flat_tree(x.m_flat_tree, a)
345
- {
346
- //value_type must be std::pair<Key, T>
347
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
348
- }
444
+ BOOST_CONTAINER_FORCEINLINE flat_map(const flat_map& x, const allocator_type &a)
445
+ : m_flat_tree(x.m_flat_tree, dtl::force<const impl_allocator_type>(a))
446
+ {}
349
447
 
350
448
  //! <b>Effects</b>: Move constructs a flat_map using the specified allocator.
351
449
  //! Constructs *this using x's resources.
352
450
  //!
353
451
  //! <b>Complexity</b>: Constant if x.get_allocator() == a, linear otherwise.
354
- flat_map(BOOST_RV_REF(flat_map) x, const allocator_type &a)
355
- : m_flat_tree(boost::move(x.m_flat_tree), a)
356
- {
357
- //value_type must be std::pair<Key, T>
358
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
359
- }
452
+ BOOST_CONTAINER_FORCEINLINE flat_map(BOOST_RV_REF(flat_map) x, const allocator_type &a)
453
+ : m_flat_tree(boost::move(x.m_flat_tree), dtl::force<const impl_allocator_type>(a))
454
+ {}
360
455
 
361
456
  //! <b>Effects</b>: Makes *this a copy of x.
362
457
  //!
363
458
  //! <b>Complexity</b>: Linear in x.size().
364
- flat_map& operator=(BOOST_COPY_ASSIGN_REF(flat_map) x)
459
+ BOOST_CONTAINER_FORCEINLINE flat_map& operator=(BOOST_COPY_ASSIGN_REF(flat_map) x)
365
460
  { m_flat_tree = x.m_flat_tree; return *this; }
366
461
 
367
462
  //! <b>Effects</b>: Move constructs a flat_map.
@@ -373,10 +468,10 @@ class flat_map
373
468
  //! <b>Complexity</b>: Constant if allocator_traits_type::
374
469
  //! propagate_on_container_move_assignment is true or
375
470
  //! this->get>allocator() == x.get_allocator(). Linear otherwise.
376
- flat_map& operator=(BOOST_RV_REF(flat_map) x)
471
+ BOOST_CONTAINER_FORCEINLINE flat_map& operator=(BOOST_RV_REF(flat_map) x)
377
472
  BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
378
473
  allocator_traits_type::is_always_equal::value) &&
379
- boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
474
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
380
475
  { m_flat_tree = boost::move(x.m_flat_tree); return *this; }
381
476
 
382
477
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -393,8 +488,8 @@ class flat_map
393
488
  //! was passed to the object's constructor.
394
489
  //!
395
490
  //! <b>Complexity</b>: Constant.
396
- allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
397
- { return container_detail::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
491
+ BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
492
+ { return dtl::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
398
493
 
399
494
  //! <b>Effects</b>: Returns a reference to the internal allocator.
400
495
  //!
@@ -403,8 +498,11 @@ class flat_map
403
498
  //! <b>Complexity</b>: Constant.
404
499
  //!
405
500
  //! <b>Note</b>: Non-standard extension.
406
- stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
407
- { return container_detail::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
501
+ BOOST_CONTAINER_FORCEINLINE get_stored_allocator_noconst_return_t get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
502
+ {
503
+ impl_get_stored_allocator_noconst_return_t r = m_flat_tree.get_stored_allocator();
504
+ return dtl::force<stored_allocator_type>(r);
505
+ }
408
506
 
409
507
  //! <b>Effects</b>: Returns a reference to the internal allocator.
410
508
  //!
@@ -413,8 +511,11 @@ class flat_map
413
511
  //! <b>Complexity</b>: Constant.
414
512
  //!
415
513
  //! <b>Note</b>: Non-standard extension.
416
- const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
417
- { return container_detail::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
514
+ BOOST_CONTAINER_FORCEINLINE get_stored_allocator_const_return_t get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
515
+ {
516
+ impl_get_stored_allocator_const_return_t r = m_flat_tree.get_stored_allocator();
517
+ return dtl::force<const stored_allocator_type>(r);
518
+ }
418
519
 
419
520
  //////////////////////////////////////////////
420
521
  //
@@ -427,32 +528,32 @@ class flat_map
427
528
  //! <b>Throws</b>: Nothing.
428
529
  //!
429
530
  //! <b>Complexity</b>: Constant.
430
- iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
431
- { return container_detail::force_copy<iterator>(m_flat_tree.begin()); }
531
+ BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
532
+ { return dtl::force_copy<iterator>(m_flat_tree.begin()); }
432
533
 
433
534
  //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
434
535
  //!
435
536
  //! <b>Throws</b>: Nothing.
436
537
  //!
437
538
  //! <b>Complexity</b>: Constant.
438
- const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
439
- { return container_detail::force_copy<const_iterator>(m_flat_tree.begin()); }
539
+ BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
540
+ { return dtl::force_copy<const_iterator>(m_flat_tree.begin()); }
440
541
 
441
542
  //! <b>Effects</b>: Returns an iterator to the end of the container.
442
543
  //!
443
544
  //! <b>Throws</b>: Nothing.
444
545
  //!
445
546
  //! <b>Complexity</b>: Constant.
446
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW
447
- { return container_detail::force_copy<iterator>(m_flat_tree.end()); }
547
+ BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
548
+ { return dtl::force_copy<iterator>(m_flat_tree.end()); }
448
549
 
449
550
  //! <b>Effects</b>: Returns a const_iterator to the end of the container.
450
551
  //!
451
552
  //! <b>Throws</b>: Nothing.
452
553
  //!
453
554
  //! <b>Complexity</b>: Constant.
454
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
455
- { return container_detail::force_copy<const_iterator>(m_flat_tree.end()); }
555
+ BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
556
+ { return dtl::force_copy<const_iterator>(m_flat_tree.end()); }
456
557
 
457
558
  //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
458
559
  //! of the reversed container.
@@ -460,8 +561,8 @@ class flat_map
460
561
  //! <b>Throws</b>: Nothing.
461
562
  //!
462
563
  //! <b>Complexity</b>: Constant.
463
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
464
- { return container_detail::force_copy<reverse_iterator>(m_flat_tree.rbegin()); }
564
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
565
+ { return dtl::force_copy<reverse_iterator>(m_flat_tree.rbegin()); }
465
566
 
466
567
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
467
568
  //! of the reversed container.
@@ -469,8 +570,8 @@ class flat_map
469
570
  //! <b>Throws</b>: Nothing.
470
571
  //!
471
572
  //! <b>Complexity</b>: Constant.
472
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
473
- { return container_detail::force_copy<const_reverse_iterator>(m_flat_tree.rbegin()); }
573
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
574
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rbegin()); }
474
575
 
475
576
  //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
476
577
  //! of the reversed container.
@@ -478,8 +579,8 @@ class flat_map
478
579
  //! <b>Throws</b>: Nothing.
479
580
  //!
480
581
  //! <b>Complexity</b>: Constant.
481
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
482
- { return container_detail::force_copy<reverse_iterator>(m_flat_tree.rend()); }
582
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
583
+ { return dtl::force_copy<reverse_iterator>(m_flat_tree.rend()); }
483
584
 
484
585
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
485
586
  //! of the reversed container.
@@ -487,24 +588,24 @@ class flat_map
487
588
  //! <b>Throws</b>: Nothing.
488
589
  //!
489
590
  //! <b>Complexity</b>: Constant.
490
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
491
- { return container_detail::force_copy<const_reverse_iterator>(m_flat_tree.rend()); }
591
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
592
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rend()); }
492
593
 
493
594
  //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
494
595
  //!
495
596
  //! <b>Throws</b>: Nothing.
496
597
  //!
497
598
  //! <b>Complexity</b>: Constant.
498
- const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
499
- { return container_detail::force_copy<const_iterator>(m_flat_tree.cbegin()); }
599
+ BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
600
+ { return dtl::force_copy<const_iterator>(m_flat_tree.cbegin()); }
500
601
 
501
602
  //! <b>Effects</b>: Returns a const_iterator to the end of the container.
502
603
  //!
503
604
  //! <b>Throws</b>: Nothing.
504
605
  //!
505
606
  //! <b>Complexity</b>: Constant.
506
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
507
- { return container_detail::force_copy<const_iterator>(m_flat_tree.cend()); }
607
+ BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
608
+ { return dtl::force_copy<const_iterator>(m_flat_tree.cend()); }
508
609
 
509
610
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
510
611
  //! of the reversed container.
@@ -512,8 +613,8 @@ class flat_map
512
613
  //! <b>Throws</b>: Nothing.
513
614
  //!
514
615
  //! <b>Complexity</b>: Constant.
515
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
516
- { return container_detail::force_copy<const_reverse_iterator>(m_flat_tree.crbegin()); }
616
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
617
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crbegin()); }
517
618
 
518
619
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
519
620
  //! of the reversed container.
@@ -521,8 +622,8 @@ class flat_map
521
622
  //! <b>Throws</b>: Nothing.
522
623
  //!
523
624
  //! <b>Complexity</b>: Constant.
524
- const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
525
- { return container_detail::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
625
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
626
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
526
627
 
527
628
  //////////////////////////////////////////////
528
629
  //
@@ -535,7 +636,7 @@ class flat_map
535
636
  //! <b>Throws</b>: Nothing.
536
637
  //!
537
638
  //! <b>Complexity</b>: Constant.
538
- bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
639
+ BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
539
640
  { return m_flat_tree.empty(); }
540
641
 
541
642
  //! <b>Effects</b>: Returns the number of the elements contained in the container.
@@ -543,7 +644,7 @@ class flat_map
543
644
  //! <b>Throws</b>: Nothing.
544
645
  //!
545
646
  //! <b>Complexity</b>: Constant.
546
- size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
647
+ BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
547
648
  { return m_flat_tree.size(); }
548
649
 
549
650
  //! <b>Effects</b>: Returns the largest possible size of the container.
@@ -551,7 +652,7 @@ class flat_map
551
652
  //! <b>Throws</b>: Nothing.
552
653
  //!
553
654
  //! <b>Complexity</b>: Constant.
554
- size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
655
+ BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
555
656
  { return m_flat_tree.max_size(); }
556
657
 
557
658
  //! <b>Effects</b>: Number of elements for which memory has been allocated.
@@ -560,10 +661,11 @@ class flat_map
560
661
  //! <b>Throws</b>: Nothing.
561
662
  //!
562
663
  //! <b>Complexity</b>: Constant.
563
- size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
664
+ BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
564
665
  { return m_flat_tree.capacity(); }
565
666
 
566
- //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
667
+ //! <b>Effects</b>: If n is less than or equal to capacity(), or the
668
+ //! underlying container has no `reserve` member, this call has no
567
669
  //! effect. Otherwise, it is a request for allocation of additional memory.
568
670
  //! If the request is successful, then capacity() is greater than or equal to
569
671
  //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
@@ -572,7 +674,7 @@ class flat_map
572
674
  //!
573
675
  //! <b>Note</b>: If capacity() is less than "cnt", iterators and references to
574
676
  //! to values might be invalidated.
575
- void reserve(size_type cnt)
677
+ BOOST_CONTAINER_FORCEINLINE void reserve(size_type cnt)
576
678
  { m_flat_tree.reserve(cnt); }
577
679
 
578
680
  //! <b>Effects</b>: Tries to deallocate the excess of memory created
@@ -581,7 +683,7 @@ class flat_map
581
683
  //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
582
684
  //!
583
685
  //! <b>Complexity</b>: Linear to size().
584
- void shrink_to_fit()
686
+ BOOST_CONTAINER_FORCEINLINE void shrink_to_fit()
585
687
  { m_flat_tree.shrink_to_fit(); }
586
688
 
587
689
  //////////////////////////////////////////////
@@ -608,8 +710,8 @@ class flat_map
608
710
  mapped_type &operator[](key_type &&k) ;
609
711
  #elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
610
712
  //in compilers like GCC 3.4, we can't catch temporaries
611
- mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
612
- mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); }
713
+ BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
714
+ BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); }
613
715
  #else
614
716
  BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript)
615
717
  #endif
@@ -629,7 +731,7 @@ class flat_map
629
731
  template <class M>
630
732
  BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
631
733
  {
632
- return container_detail::force_copy< std::pair<iterator, bool> >
734
+ return dtl::force_copy< std::pair<iterator, bool> >
633
735
  (this->m_flat_tree.insert_or_assign
634
736
  ( impl_const_iterator(), k, ::boost::forward<M>(obj))
635
737
  );
@@ -650,7 +752,7 @@ class flat_map
650
752
  template <class M>
651
753
  BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
652
754
  {
653
- return container_detail::force_copy< std::pair<iterator, bool> >
755
+ return dtl::force_copy< std::pair<iterator, bool> >
654
756
  (this->m_flat_tree.insert_or_assign
655
757
  ( impl_const_iterator(), ::boost::move(k), ::boost::forward<M>(obj))
656
758
  );
@@ -673,9 +775,9 @@ class flat_map
673
775
  template <class M>
674
776
  BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj)
675
777
  {
676
- return container_detail::force_copy< std::pair<iterator, bool> >
778
+ return dtl::force_copy< std::pair<iterator, bool> >
677
779
  (this->m_flat_tree.insert_or_assign
678
- ( container_detail::force_copy<impl_const_iterator>(hint)
780
+ ( dtl::force_copy<impl_const_iterator>(hint)
679
781
  , k, ::boost::forward<M>(obj))
680
782
  );
681
783
  }
@@ -697,28 +799,28 @@ class flat_map
697
799
  template <class M>
698
800
  BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
699
801
  {
700
- return container_detail::force_copy< std::pair<iterator, bool> >
802
+ return dtl::force_copy< std::pair<iterator, bool> >
701
803
  (this->m_flat_tree.insert_or_assign
702
- ( container_detail::force_copy<impl_const_iterator>(hint)
804
+ ( dtl::force_copy<impl_const_iterator>(hint)
703
805
  , ::boost::move(k), ::boost::forward<M>(obj))
704
806
  );
705
807
  }
706
808
 
707
809
  //! @copydoc ::boost::container::flat_set::nth(size_type)
708
- iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
709
- { return container_detail::force_copy<iterator>(m_flat_tree.nth(n)); }
810
+ BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
811
+ { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
710
812
 
711
813
  //! @copydoc ::boost::container::flat_set::nth(size_type) const
712
- const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
713
- { return container_detail::force_copy<iterator>(m_flat_tree.nth(n)); }
814
+ BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
815
+ { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
714
816
 
715
817
  //! @copydoc ::boost::container::flat_set::index_of(iterator)
716
- size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
717
- { return m_flat_tree.index_of(container_detail::force_copy<impl_iterator>(p)); }
818
+ BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
819
+ { return m_flat_tree.index_of(dtl::force_copy<impl_iterator>(p)); }
718
820
 
719
821
  //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const
720
- size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
721
- { return m_flat_tree.index_of(container_detail::force_copy<impl_const_iterator>(p)); }
822
+ BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
823
+ { return m_flat_tree.index_of(dtl::force_copy<impl_const_iterator>(p)); }
722
824
 
723
825
  //! Returns: A reference to the element whose key is equivalent to x.
724
826
  //!
@@ -769,8 +871,8 @@ class flat_map
769
871
  //!
770
872
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
771
873
  template <class... Args>
772
- std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
773
- { return container_detail::force_copy< std::pair<iterator, bool> >(m_flat_tree.emplace_unique(boost::forward<Args>(args)...)); }
874
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
875
+ { return dtl::force_copy< std::pair<iterator, bool> >(m_flat_tree.emplace_unique(boost::forward<Args>(args)...)); }
774
876
 
775
877
  //! <b>Effects</b>: Inserts an object of type T constructed with
776
878
  //! std::forward<Args>(args)... in the container if and only if there is
@@ -785,10 +887,10 @@ class flat_map
785
887
  //!
786
888
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
787
889
  template <class... Args>
788
- iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
890
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
789
891
  {
790
- return container_detail::force_copy<iterator>
791
- (m_flat_tree.emplace_hint_unique( container_detail::force_copy<impl_const_iterator>(hint)
892
+ return dtl::force_copy<iterator>
893
+ (m_flat_tree.emplace_hint_unique( dtl::force_copy<impl_const_iterator>(hint)
792
894
  , boost::forward<Args>(args)...));
793
895
  }
794
896
 
@@ -806,7 +908,7 @@ class flat_map
806
908
  template <class... Args>
807
909
  BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args)
808
910
  {
809
- return container_detail::force_copy< std::pair<iterator, bool> >(
911
+ return dtl::force_copy< std::pair<iterator, bool> >(
810
912
  m_flat_tree.try_emplace(impl_const_iterator(), k, boost::forward<Args>(args)...));
811
913
  }
812
914
 
@@ -824,8 +926,8 @@ class flat_map
824
926
  template <class... Args>
825
927
  BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args)
826
928
  {
827
- return container_detail::force_copy<iterator>(m_flat_tree.try_emplace
828
- (container_detail::force_copy<impl_const_iterator>(hint), k, boost::forward<Args>(args)...).first);
929
+ return dtl::force_copy<iterator>(m_flat_tree.try_emplace
930
+ (dtl::force_copy<impl_const_iterator>(hint), k, boost::forward<Args>(args)...).first);
829
931
  }
830
932
 
831
933
  //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
@@ -842,7 +944,7 @@ class flat_map
842
944
  template <class... Args>
843
945
  BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
844
946
  {
845
- return container_detail::force_copy< std::pair<iterator, bool> >
947
+ return dtl::force_copy< std::pair<iterator, bool> >
846
948
  (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k), boost::forward<Args>(args)...));
847
949
  }
848
950
 
@@ -860,8 +962,8 @@ class flat_map
860
962
  template <class... Args>
861
963
  BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
862
964
  {
863
- return container_detail::force_copy<iterator>
864
- (m_flat_tree.try_emplace(container_detail::force_copy
965
+ return dtl::force_copy<iterator>
966
+ (m_flat_tree.try_emplace(dtl::force_copy
865
967
  <impl_const_iterator>(hint), boost::move(k), boost::forward<Args>(args)...).first);
866
968
  }
867
969
 
@@ -869,41 +971,41 @@ class flat_map
869
971
 
870
972
  #define BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE(N) \
871
973
  BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
872
- std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
974
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
873
975
  {\
874
- return container_detail::force_copy< std::pair<iterator, bool> >\
976
+ return dtl::force_copy< std::pair<iterator, bool> >\
875
977
  (m_flat_tree.emplace_unique(BOOST_MOVE_FWD##N));\
876
978
  }\
877
979
  \
878
980
  BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
879
- iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
981
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
880
982
  {\
881
- return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_unique\
882
- (container_detail::force_copy<impl_const_iterator>(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
983
+ return dtl::force_copy<iterator>(m_flat_tree.emplace_hint_unique\
984
+ (dtl::force_copy<impl_const_iterator>(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
883
985
  }\
884
986
  BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
885
987
  BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
886
988
  {\
887
- return container_detail::force_copy< std::pair<iterator, bool> >\
989
+ return dtl::force_copy< std::pair<iterator, bool> >\
888
990
  (m_flat_tree.try_emplace(impl_const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
889
991
  }\
890
992
  \
891
993
  BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
892
994
  BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
893
- { return container_detail::force_copy<iterator>(m_flat_tree.try_emplace\
894
- (container_detail::force_copy<impl_const_iterator>(hint), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\
995
+ { return dtl::force_copy<iterator>(m_flat_tree.try_emplace\
996
+ (dtl::force_copy<impl_const_iterator>(hint), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\
895
997
  \
896
998
  BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
897
999
  BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
898
1000
  {\
899
- return container_detail::force_copy< std::pair<iterator, bool> >\
1001
+ return dtl::force_copy< std::pair<iterator, bool> >\
900
1002
  (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
901
1003
  }\
902
1004
  \
903
1005
  BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
904
1006
  BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
905
- { return container_detail::force_copy<iterator>(m_flat_tree.try_emplace\
906
- (container_detail::force_copy<impl_const_iterator>(hint), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\
1007
+ { return dtl::force_copy<iterator>(m_flat_tree.try_emplace\
1008
+ (dtl::force_copy<impl_const_iterator>(hint), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\
907
1009
  //
908
1010
  BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE)
909
1011
  #undef BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE
@@ -921,9 +1023,9 @@ class flat_map
921
1023
  //! to the elements with bigger keys than x.
922
1024
  //!
923
1025
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
924
- std::pair<iterator,bool> insert(const value_type& x)
925
- { return container_detail::force_copy<std::pair<iterator,bool> >(
926
- m_flat_tree.insert_unique(container_detail::force<impl_value_type>(x))); }
1026
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(const value_type& x)
1027
+ { return dtl::force_copy<std::pair<iterator,bool> >(
1028
+ m_flat_tree.insert_unique(dtl::force<const impl_value_type>(x))); }
927
1029
 
928
1030
  //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
929
1031
  //! only if there is no element in the container with key equivalent to the key of x.
@@ -936,9 +1038,9 @@ class flat_map
936
1038
  //! to the elements with bigger keys than x.
937
1039
  //!
938
1040
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
939
- std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
940
- { return container_detail::force_copy<std::pair<iterator,bool> >(
941
- m_flat_tree.insert_unique(boost::move(container_detail::force<impl_value_type>(x)))); }
1041
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
1042
+ { return dtl::force_copy<std::pair<iterator,bool> >(
1043
+ m_flat_tree.insert_unique(boost::move(dtl::force<impl_value_type>(x)))); }
942
1044
 
943
1045
  //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
944
1046
  //! only if there is no element in the container with key equivalent to the key of x.
@@ -951,9 +1053,9 @@ class flat_map
951
1053
  //! to the elements with bigger keys than x.
952
1054
  //!
953
1055
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
954
- std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
1056
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
955
1057
  {
956
- return container_detail::force_copy<std::pair<iterator,bool> >
1058
+ return dtl::force_copy<std::pair<iterator,bool> >
957
1059
  (m_flat_tree.insert_unique(boost::move(x)));
958
1060
  }
959
1061
 
@@ -968,11 +1070,11 @@ class flat_map
968
1070
  //! right before p) plus insertion linear to the elements with bigger keys than x.
969
1071
  //!
970
1072
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
971
- iterator insert(const_iterator p, const value_type& x)
1073
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
972
1074
  {
973
- return container_detail::force_copy<iterator>(
974
- m_flat_tree.insert_unique( container_detail::force_copy<impl_const_iterator>(p)
975
- , container_detail::force<impl_value_type>(x)));
1075
+ return dtl::force_copy<iterator>(
1076
+ m_flat_tree.insert_unique( dtl::force_copy<impl_const_iterator>(p)
1077
+ , dtl::force<const impl_value_type>(x)));
976
1078
  }
977
1079
 
978
1080
  //! <b>Effects</b>: Inserts an element move constructed from x in the container.
@@ -984,11 +1086,11 @@ class flat_map
984
1086
  //! right before p) plus insertion linear to the elements with bigger keys than x.
985
1087
  //!
986
1088
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
987
- iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
1089
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
988
1090
  {
989
- return container_detail::force_copy<iterator>
990
- (m_flat_tree.insert_unique( container_detail::force_copy<impl_const_iterator>(p)
991
- , boost::move(container_detail::force<impl_value_type>(x))));
1091
+ return dtl::force_copy<iterator>
1092
+ (m_flat_tree.insert_unique( dtl::force_copy<impl_const_iterator>(p)
1093
+ , boost::move(dtl::force<impl_value_type>(x))));
992
1094
  }
993
1095
 
994
1096
  //! <b>Effects</b>: Inserts an element move constructed from x in the container.
@@ -1000,10 +1102,10 @@ class flat_map
1000
1102
  //! right before p) plus insertion linear to the elements with bigger keys than x.
1001
1103
  //!
1002
1104
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1003
- iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
1105
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
1004
1106
  {
1005
- return container_detail::force_copy<iterator>(
1006
- m_flat_tree.insert_unique(container_detail::force_copy<impl_const_iterator>(p), boost::move(x)));
1107
+ return dtl::force_copy<iterator>(
1108
+ m_flat_tree.insert_unique(dtl::force_copy<impl_const_iterator>(p), boost::move(x)));
1007
1109
  }
1008
1110
 
1009
1111
  //! <b>Requires</b>: first, last are not iterators into *this.
@@ -1011,12 +1113,11 @@ class flat_map
1011
1113
  //! <b>Effects</b>: inserts each element from the range [first,last) if and only
1012
1114
  //! if there is no element with key equivalent to the key of that element.
1013
1115
  //!
1014
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
1015
- //! search time plus N*size() insertion time.
1116
+ //! <b>Complexity</b>: N log(size()+N).
1016
1117
  //!
1017
1118
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1018
1119
  template <class InputIterator>
1019
- void insert(InputIterator first, InputIterator last)
1120
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
1020
1121
  { m_flat_tree.insert_unique(first, last); }
1021
1122
 
1022
1123
  //! <b>Requires</b>: first, last are not iterators into *this.
@@ -1028,26 +1129,27 @@ class flat_map
1028
1129
  //! if there is no element with key equivalent to the key of that element. This
1029
1130
  //! function is more efficient than the normal range creation for ordered ranges.
1030
1131
  //!
1031
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
1032
- //! search time plus N*size() insertion time.
1132
+ //! <b>Complexity</b>: Linear.
1033
1133
  //!
1034
1134
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1035
1135
  //!
1036
1136
  //! <b>Note</b>: Non-standard extension.
1037
1137
  template <class InputIterator>
1038
- void insert(ordered_unique_range_t, InputIterator first, InputIterator last)
1138
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, InputIterator first, InputIterator last)
1039
1139
  { m_flat_tree.insert_unique(ordered_unique_range, first, last); }
1040
1140
 
1041
1141
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1042
1142
  //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
1043
1143
  //! if there is no element with key equivalent to the key of that element.
1044
1144
  //!
1045
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.first() to il.end())
1046
- //! search time plus N*size() insertion time.
1145
+ //! <b>Complexity</b>: N log(N).
1047
1146
  //!
1048
1147
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1049
- void insert(std::initializer_list<value_type> il)
1050
- { m_flat_tree.insert_unique(il.begin(), il.end()); }
1148
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
1149
+ {
1150
+ m_flat_tree.insert_unique( dtl::force<impl_initializer_list>(il).begin()
1151
+ , dtl::force<impl_initializer_list>(il).end());
1152
+ }
1051
1153
 
1052
1154
  //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
1053
1155
  //! unique values.
@@ -1056,14 +1158,17 @@ class flat_map
1056
1158
  //! if there is no element with key equivalent to the key of that element. This
1057
1159
  //! function is more efficient than the normal range creation for ordered ranges.
1058
1160
  //!
1059
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
1060
- //! search time plus N*size() insertion time.
1161
+ //! <b>Complexity</b>: Linear.
1061
1162
  //!
1062
1163
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1063
1164
  //!
1064
1165
  //! <b>Note</b>: Non-standard extension.
1065
- void insert(ordered_unique_range_t, std::initializer_list<value_type> il)
1066
- { m_flat_tree.insert_unique(ordered_unique_range, il.begin(), il.end()); }
1166
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, std::initializer_list<value_type> il)
1167
+ {
1168
+ m_flat_tree.insert_unique(ordered_unique_range
1169
+ , dtl::force<impl_initializer_list>(il).begin()
1170
+ , dtl::force<impl_initializer_list>(il).end());
1171
+ }
1067
1172
  #endif
1068
1173
 
1069
1174
  //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
@@ -1081,23 +1186,23 @@ class flat_map
1081
1186
  //!
1082
1187
  //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
1083
1188
  template<class C2>
1084
- BOOST_CONTAINER_FORCEINLINE void merge(flat_map<Key, T, C2, Allocator>& source)
1189
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_map<Key, T, C2, AllocatorOrContainer>& source)
1085
1190
  { m_flat_tree.merge_unique(source.tree()); }
1086
1191
 
1087
- //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, Allocator>&)
1192
+ //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
1088
1193
  template<class C2>
1089
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map<Key, T, C2, Allocator> BOOST_RV_REF_END source)
1090
- { return this->merge(static_cast<flat_map<Key, T, C2, Allocator>&>(source)); }
1194
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
1195
+ { return this->merge(static_cast<flat_map<Key, T, C2, AllocatorOrContainer>&>(source)); }
1091
1196
 
1092
- //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, Allocator>&)
1197
+ //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
1093
1198
  template<class C2>
1094
- BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap<Key, T, C2, Allocator>& source)
1199
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap<Key, T, C2, AllocatorOrContainer>& source)
1095
1200
  { m_flat_tree.merge_unique(source.tree()); }
1096
1201
 
1097
- //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, Allocator>&)
1202
+ //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
1098
1203
  template<class C2>
1099
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap<Key, T, C2, Allocator> BOOST_RV_REF_END source)
1100
- { return this->merge(static_cast<flat_multimap<Key, T, C2, Allocator>&>(source)); }
1204
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
1205
+ { return this->merge(static_cast<flat_multimap<Key, T, C2, AllocatorOrContainer>&>(source)); }
1101
1206
 
1102
1207
  //! <b>Effects</b>: Erases the element pointed to by p.
1103
1208
  //!
@@ -1109,10 +1214,10 @@ class flat_map
1109
1214
  //!
1110
1215
  //! <b>Note</b>: Invalidates elements with keys
1111
1216
  //! not less than the erased element.
1112
- iterator erase(const_iterator p)
1217
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p)
1113
1218
  {
1114
- return container_detail::force_copy<iterator>
1115
- (m_flat_tree.erase(container_detail::force_copy<impl_const_iterator>(p)));
1219
+ return dtl::force_copy<iterator>
1220
+ (m_flat_tree.erase(dtl::force_copy<impl_const_iterator>(p)));
1116
1221
  }
1117
1222
 
1118
1223
  //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
@@ -1121,7 +1226,7 @@ class flat_map
1121
1226
  //!
1122
1227
  //! <b>Complexity</b>: Logarithmic search time plus erasure time
1123
1228
  //! linear to the elements with bigger keys.
1124
- size_type erase(const key_type& x)
1229
+ BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x)
1125
1230
  { return m_flat_tree.erase(x); }
1126
1231
 
1127
1232
  //! <b>Effects</b>: Erases all the elements in the range [first, last).
@@ -1132,11 +1237,11 @@ class flat_map
1132
1237
  //!
1133
1238
  //! <b>Complexity</b>: Logarithmic search time plus erasure time
1134
1239
  //! linear to the elements with bigger keys.
1135
- iterator erase(const_iterator first, const_iterator last)
1240
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last)
1136
1241
  {
1137
- return container_detail::force_copy<iterator>(
1138
- m_flat_tree.erase( container_detail::force_copy<impl_const_iterator>(first)
1139
- , container_detail::force_copy<impl_const_iterator>(last)));
1242
+ return dtl::force_copy<iterator>(
1243
+ m_flat_tree.erase( dtl::force_copy<impl_const_iterator>(first)
1244
+ , dtl::force_copy<impl_const_iterator>(last)));
1140
1245
  }
1141
1246
 
1142
1247
  //! <b>Effects</b>: Swaps the contents of *this and x.
@@ -1144,9 +1249,9 @@ class flat_map
1144
1249
  //! <b>Throws</b>: Nothing.
1145
1250
  //!
1146
1251
  //! <b>Complexity</b>: Constant.
1147
- void swap(flat_map& x)
1252
+ BOOST_CONTAINER_FORCEINLINE void swap(flat_map& x)
1148
1253
  BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
1149
- && boost::container::container_detail::is_nothrow_swappable<Compare>::value )
1254
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value )
1150
1255
  { m_flat_tree.swap(x.m_flat_tree); }
1151
1256
 
1152
1257
  //! <b>Effects</b>: erase(a.begin(),a.end()).
@@ -1154,7 +1259,7 @@ class flat_map
1154
1259
  //! <b>Postcondition</b>: size() == 0.
1155
1260
  //!
1156
1261
  //! <b>Complexity</b>: linear in size().
1157
- void clear() BOOST_NOEXCEPT_OR_NOTHROW
1262
+ BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW
1158
1263
  { m_flat_tree.clear(); }
1159
1264
 
1160
1265
  //////////////////////////////////////////////
@@ -1167,15 +1272,15 @@ class flat_map
1167
1272
  //! of which a was constructed.
1168
1273
  //!
1169
1274
  //! <b>Complexity</b>: Constant.
1170
- key_compare key_comp() const
1171
- { return container_detail::force_copy<key_compare>(m_flat_tree.key_comp()); }
1275
+ BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
1276
+ { return dtl::force_copy<key_compare>(m_flat_tree.key_comp()); }
1172
1277
 
1173
1278
  //! <b>Effects</b>: Returns an object of value_compare constructed out
1174
1279
  //! of the comparison object.
1175
1280
  //!
1176
1281
  //! <b>Complexity</b>: Constant.
1177
- value_compare value_comp() const
1178
- { return value_compare(container_detail::force_copy<key_compare>(m_flat_tree.key_comp())); }
1282
+ BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
1283
+ { return value_compare(dtl::force_copy<key_compare>(m_flat_tree.key_comp())); }
1179
1284
 
1180
1285
  //////////////////////////////////////////////
1181
1286
  //
@@ -1187,102 +1292,135 @@ class flat_map
1187
1292
  //! equivalent to x, or end() if such an element is not found.
1188
1293
  //!
1189
1294
  //! <b>Complexity</b>: Logarithmic.
1190
- iterator find(const key_type& x)
1191
- { return container_detail::force_copy<iterator>(m_flat_tree.find(x)); }
1295
+ BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& x)
1296
+ { return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
1192
1297
 
1193
1298
  //! <b>Returns</b>: A const_iterator pointing to an element with the key
1194
1299
  //! equivalent to x, or end() if such an element is not found.
1195
1300
  //!
1196
1301
  //! <b>Complexity</b>: Logarithmic.
1197
- const_iterator find(const key_type& x) const
1198
- { return container_detail::force_copy<const_iterator>(m_flat_tree.find(x)); }
1302
+ BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& x) const
1303
+ { return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
1199
1304
 
1200
1305
  //! <b>Returns</b>: The number of elements with key equivalent to x.
1201
1306
  //!
1202
1307
  //! <b>Complexity</b>: log(size())+count(k)
1203
- size_type count(const key_type& x) const
1308
+ BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
1204
1309
  { return static_cast<size_type>(m_flat_tree.find(x) != m_flat_tree.end()); }
1205
1310
 
1206
1311
  //! <b>Returns</b>: An iterator pointing to the first element with key not less
1207
1312
  //! than k, or a.end() if such an element is not found.
1208
1313
  //!
1209
1314
  //! <b>Complexity</b>: Logarithmic.
1210
- iterator lower_bound(const key_type& x)
1211
- { return container_detail::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
1315
+ BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& x)
1316
+ { return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
1212
1317
 
1213
1318
  //! <b>Returns</b>: A const iterator pointing to the first element with key not
1214
1319
  //! less than k, or a.end() if such an element is not found.
1215
1320
  //!
1216
1321
  //! <b>Complexity</b>: Logarithmic.
1217
- const_iterator lower_bound(const key_type& x) const
1218
- { return container_detail::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
1322
+ BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& x) const
1323
+ { return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
1219
1324
 
1220
1325
  //! <b>Returns</b>: An iterator pointing to the first element with key not less
1221
1326
  //! than x, or end() if such an element is not found.
1222
1327
  //!
1223
1328
  //! <b>Complexity</b>: Logarithmic.
1224
- iterator upper_bound(const key_type& x)
1225
- { return container_detail::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
1329
+ BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& x)
1330
+ { return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
1226
1331
 
1227
1332
  //! <b>Returns</b>: A const iterator pointing to the first element with key not
1228
1333
  //! less than x, or end() if such an element is not found.
1229
1334
  //!
1230
1335
  //! <b>Complexity</b>: Logarithmic.
1231
- const_iterator upper_bound(const key_type& x) const
1232
- { return container_detail::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
1336
+ BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& x) const
1337
+ { return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
1233
1338
 
1234
1339
  //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
1235
1340
  //!
1236
1341
  //! <b>Complexity</b>: Logarithmic.
1237
- std::pair<iterator,iterator> equal_range(const key_type& x)
1238
- { return container_detail::force_copy<std::pair<iterator,iterator> >(m_flat_tree.lower_bound_range(x)); }
1342
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
1343
+ { return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.lower_bound_range(x)); }
1239
1344
 
1240
1345
  //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
1241
1346
  //!
1242
1347
  //! <b>Complexity</b>: Logarithmic.
1243
- std::pair<const_iterator,const_iterator> equal_range(const key_type& x) const
1244
- { return container_detail::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.lower_bound_range(x)); }
1348
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
1349
+ { return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.lower_bound_range(x)); }
1350
+
1351
+ //! <b>Effects</b>: Extracts the internal sequence container.
1352
+ //!
1353
+ //! <b>Complexity</b>: Same as the move constructor of sequence_type, usually constant.
1354
+ //!
1355
+ //! <b>Postcondition</b>: this->empty()
1356
+ //!
1357
+ //! <b>Throws</b>: If secuence_type's move constructor throws
1358
+ BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence()
1359
+ {
1360
+ return boost::move(dtl::force<sequence_type>(m_flat_tree.get_sequence_ref()));
1361
+ }
1362
+
1363
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
1364
+ //! one passed externally using the move assignment. Erases non-unique elements.
1365
+ //!
1366
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
1367
+ //!
1368
+ //! <b>Throws</b>: If the comparison or the move constructor throws
1369
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
1370
+ { this->m_flat_tree.adopt_sequence_unique(boost::move(dtl::force<impl_sequence_type>(seq))); }
1371
+
1372
+ //! <b>Requires</b>: seq shall be ordered according to this->compare()
1373
+ //! and shall contain unique elements.
1374
+ //!
1375
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
1376
+ //! one passed externally using the move assignment.
1377
+ //!
1378
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
1379
+ //!
1380
+ //! <b>Throws</b>: If the move assignment throws
1381
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq)
1382
+ { this->m_flat_tree.adopt_sequence_unique(ordered_unique_range_t(), boost::move(dtl::force<impl_sequence_type>(seq))); }
1245
1383
 
1246
1384
  //! <b>Effects</b>: Returns true if x and y are equal
1247
1385
  //!
1248
1386
  //! <b>Complexity</b>: Linear to the number of elements in the container.
1249
- friend bool operator==(const flat_map& x, const flat_map& y)
1387
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_map& x, const flat_map& y)
1250
1388
  { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
1251
1389
 
1252
1390
  //! <b>Effects</b>: Returns true if x and y are unequal
1253
1391
  //!
1254
1392
  //! <b>Complexity</b>: Linear to the number of elements in the container.
1255
- friend bool operator!=(const flat_map& x, const flat_map& y)
1393
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_map& x, const flat_map& y)
1256
1394
  { return !(x == y); }
1257
1395
 
1258
1396
  //! <b>Effects</b>: Returns true if x is less than y
1259
1397
  //!
1260
1398
  //! <b>Complexity</b>: Linear to the number of elements in the container.
1261
- friend bool operator<(const flat_map& x, const flat_map& y)
1399
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_map& x, const flat_map& y)
1262
1400
  { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
1263
1401
 
1264
1402
  //! <b>Effects</b>: Returns true if x is greater than y
1265
1403
  //!
1266
1404
  //! <b>Complexity</b>: Linear to the number of elements in the container.
1267
- friend bool operator>(const flat_map& x, const flat_map& y)
1405
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_map& x, const flat_map& y)
1268
1406
  { return y < x; }
1269
1407
 
1270
1408
  //! <b>Effects</b>: Returns true if x is equal or less than y
1271
1409
  //!
1272
1410
  //! <b>Complexity</b>: Linear to the number of elements in the container.
1273
- friend bool operator<=(const flat_map& x, const flat_map& y)
1411
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_map& x, const flat_map& y)
1274
1412
  { return !(y < x); }
1275
1413
 
1276
1414
  //! <b>Effects</b>: Returns true if x is equal or greater than y
1277
1415
  //!
1278
1416
  //! <b>Complexity</b>: Linear to the number of elements in the container.
1279
- friend bool operator>=(const flat_map& x, const flat_map& y)
1417
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_map& x, const flat_map& y)
1280
1418
  { return !(x < y); }
1281
1419
 
1282
1420
  //! <b>Effects</b>: x.swap(y)
1283
1421
  //!
1284
1422
  //! <b>Complexity</b>: Constant.
1285
- friend void swap(flat_map& x, flat_map& y)
1423
+ BOOST_CONTAINER_FORCEINLINE friend void swap(flat_map& x, flat_map& y)
1286
1424
  { x.swap(y); }
1287
1425
 
1288
1426
  #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
@@ -1292,7 +1430,7 @@ class flat_map
1292
1430
  iterator i = lower_bound(k);
1293
1431
  // i->first is greater than or equivalent to k.
1294
1432
  if (i == end() || key_comp()(k, (*i).first)){
1295
- container_detail::value_init<mapped_type> m;
1433
+ dtl::value_init<mapped_type> m;
1296
1434
  i = insert(i, impl_value_type(k, ::boost::move(m.m_t)));
1297
1435
  }
1298
1436
  return (*i).second;
@@ -1303,7 +1441,7 @@ class flat_map
1303
1441
  iterator i = lower_bound(k);
1304
1442
  // i->first is greater than or equivalent to k.
1305
1443
  if (i == end() || key_comp()(k, (*i).first)){
1306
- container_detail::value_init<mapped_type> m;
1444
+ dtl::value_init<mapped_type> m;
1307
1445
  i = insert(i, impl_value_type(boost::move(k), ::boost::move(m.m_t)));
1308
1446
  }
1309
1447
  return (*i).second;
@@ -1317,11 +1455,11 @@ class flat_map
1317
1455
 
1318
1456
  //!has_trivial_destructor_after_move<> == true_type
1319
1457
  //!specialization for optimizations
1320
- template <class Key, class T, class Compare, class Allocator>
1321
- struct has_trivial_destructor_after_move<boost::container::flat_map<Key, T, Compare, Allocator> >
1458
+ template <class Key, class T, class Compare, class AllocatorOrContainer>
1459
+ struct has_trivial_destructor_after_move<boost::container::flat_map<Key, T, Compare, AllocatorOrContainer> >
1322
1460
  {
1323
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
1324
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
1461
+ typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
1462
+ static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
1325
1463
  ::boost::has_trivial_destructor_after_move<pointer>::value &&
1326
1464
  ::boost::has_trivial_destructor_after_move<Compare>::value;
1327
1465
  };
@@ -1332,80 +1470,81 @@ namespace container {
1332
1470
 
1333
1471
  //! A flat_multimap is a kind of associative container that supports equivalent keys
1334
1472
  //! (possibly containing multiple copies of the same key value) and provides for
1335
- //! fast retrieval of values of another type T based on the keys. The flat_multimap
1336
- //! class supports random-access iterators.
1473
+ //! fast retrieval of values of another type T based on the keys.
1337
1474
  //!
1338
1475
  //! A flat_multimap satisfies all of the requirements of a container and of a reversible
1339
1476
  //! container and of an associative container. For a
1340
1477
  //! flat_multimap<Key,T> the key_type is Key and the value_type is std::pair<Key,T>
1341
1478
  //! (unlike std::multimap<Key, T> which value_type is std::pair<<b>const</b> Key, T>).
1342
1479
  //!
1343
- //! Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
1480
+ //! flat_multimap is similar to std::multimap but it's implemented by as an ordered sequence container.
1481
+ //! The underlying sequence container is by default <i>vector</i> but it can also work
1482
+ //! user-provided vector-like SequenceContainers (like <i>static_vector</i> or <i>small_vector</i>).
1344
1483
  //!
1345
- //! Allocator is the allocator to allocate the value_types
1346
- //! (e.g. <i>allocator< std::pair<Key, T> ></i>).
1347
- //!
1348
- //! flat_multimap is similar to std::multimap but it's implemented like an ordered vector.
1349
- //! This means that inserting a new element into a flat_map invalidates
1350
- //! previous iterators and references
1351
- //!
1352
- //! Erasing an element invalidates iterators and references
1353
- //! pointing to elements that come after (their keys are bigger) the erased element.
1484
+ //! Using vector-like sequence containers means that inserting a new element into a flat_multimap might invalidate
1485
+ //! previous iterators and references (unless that sequence container is <i>stable_vector</i> or a similar
1486
+ //! container that offers stable pointers and references). Similarly, erasing an element might invalidate
1487
+ //! iterators and references pointing to elements that come after (their keys are bigger) the erased element.
1354
1488
  //!
1355
1489
  //! This container provides random-access iterators.
1356
1490
  //!
1357
1491
  //! \tparam Key is the key_type of the map
1358
1492
  //! \tparam Value is the <code>mapped_type</code>
1359
1493
  //! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
1360
- //! \tparam Allocator is the allocator to allocate the <code>value_type</code>s
1361
- //! (e.g. <i>allocator< std::pair<Key, T> > </i>).
1494
+ //! \tparam AllocatorOrContainer is either:
1495
+ //! - The allocator to allocate <code>value_type</code>s (e.g. <i>allocator< std::pair<Key, T> > </i>).
1496
+ //! (in this case <i>sequence_type</i> will be vector<value_type, AllocatorOrContainer>)
1497
+ //! - The SequenceContainer to be used as the underlying <i>sequence_type</i>. It must be a vector-like
1498
+ //! sequence container with random-access iterators.
1362
1499
  #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
1363
- template <class Key, class T, class Compare = std::less<Key>, class Allocator = new_allocator< std::pair< Key, T> > >
1500
+ template <class Key, class T, class Compare = std::less<Key>, class AllocatorOrContainer = new_allocator< std::pair< Key, T> > >
1364
1501
  #else
1365
- template <class Key, class T, class Compare, class Allocator>
1502
+ template <class Key, class T, class Compare, class AllocatorOrContainer>
1366
1503
  #endif
1367
1504
  class flat_multimap
1368
1505
  {
1369
1506
  #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
1370
1507
  private:
1371
1508
  BOOST_COPYABLE_AND_MOVABLE(flat_multimap)
1372
- typedef container_detail::flat_tree<
1509
+ typedef dtl::flat_tree<
1373
1510
  std::pair<Key, T>,
1374
- container_detail::select1st<Key>,
1511
+ dtl::select1st<Key>,
1375
1512
  Compare,
1376
- Allocator> tree_t;
1513
+ AllocatorOrContainer> tree_t;
1377
1514
  //This is the real tree stored here. It's based on a movable pair
1378
- typedef container_detail::flat_tree<
1379
- container_detail::pair<Key, T>,
1380
- container_detail::select1st<Key>,
1515
+ typedef dtl::flat_tree<
1516
+ dtl::pair<Key, T>,
1517
+ dtl::select1st<Key>,
1381
1518
  Compare,
1382
- typename allocator_traits<Allocator>::template portable_rebind_alloc
1383
- <container_detail::pair<Key, T> >::type> impl_tree_t;
1519
+ typename dtl::container_or_allocator_rebind<AllocatorOrContainer, dtl::pair<Key, T> >::type
1520
+ > impl_tree_t;
1384
1521
  impl_tree_t m_flat_tree; // flat tree representing flat_map
1385
1522
 
1386
1523
  typedef typename impl_tree_t::value_type impl_value_type;
1387
1524
  typedef typename impl_tree_t::const_iterator impl_const_iterator;
1388
1525
  typedef typename impl_tree_t::iterator impl_iterator;
1389
1526
  typedef typename impl_tree_t::allocator_type impl_allocator_type;
1390
- typedef container_detail::flat_tree_value_compare
1527
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1528
+ typedef std::initializer_list<impl_value_type> impl_initializer_list;
1529
+ #endif
1530
+
1531
+ typedef dtl::flat_tree_value_compare
1391
1532
  < Compare
1392
- , container_detail::select1st<Key>
1393
- , std::pair<Key, T> > value_compare_impl;
1394
- typedef typename container_detail::get_flat_tree_iterators
1395
- <typename allocator_traits<Allocator>::pointer>::iterator iterator_impl;
1396
- typedef typename container_detail::get_flat_tree_iterators
1397
- <typename allocator_traits<Allocator>::pointer>::const_iterator const_iterator_impl;
1398
- typedef typename container_detail::get_flat_tree_iterators
1399
- <typename allocator_traits<Allocator>::pointer>::reverse_iterator reverse_iterator_impl;
1400
- typedef typename container_detail::get_flat_tree_iterators
1401
- <typename allocator_traits<Allocator>::pointer>::const_reverse_iterator const_reverse_iterator_impl;
1533
+ , dtl::select1st<Key>
1534
+ , std::pair<Key, T> > value_compare_t;
1535
+ typedef typename tree_t::iterator iterator_t;
1536
+ typedef typename tree_t::const_iterator const_iterator_t;
1537
+ typedef typename tree_t::reverse_iterator reverse_iterator_t;
1538
+ typedef typename tree_t::const_reverse_iterator const_reverse_iterator_t;
1539
+
1402
1540
  public:
1403
- typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type;
1541
+ typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type;
1542
+ typedef typename impl_tree_t::sequence_type impl_sequence_type;
1404
1543
 
1405
- impl_tree_t &tree()
1544
+ BOOST_CONTAINER_FORCEINLINE impl_tree_t &tree()
1406
1545
  { return m_flat_tree; }
1407
1546
 
1408
- const impl_tree_t &tree() const
1547
+ BOOST_CONTAINER_FORCEINLINE const impl_tree_t &tree() const
1409
1548
  { return m_flat_tree; }
1410
1549
 
1411
1550
  private:
@@ -1420,24 +1559,29 @@ class flat_multimap
1420
1559
  //////////////////////////////////////////////
1421
1560
  typedef Key key_type;
1422
1561
  typedef T mapped_type;
1423
- typedef std::pair<Key, T> value_type;
1424
- typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
1425
- typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
1426
- typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
1427
- typedef typename boost::container::allocator_traits<Allocator>::reference reference;
1428
- typedef typename boost::container::allocator_traits<Allocator>::const_reference const_reference;
1429
- typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
1430
- typedef typename boost::container::allocator_traits<Allocator>::difference_type difference_type;
1431
- typedef Allocator allocator_type;
1432
- typedef BOOST_CONTAINER_IMPDEF(Allocator) stored_allocator_type;
1433
- typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare;
1434
1562
  typedef Compare key_compare;
1435
- typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
1436
- typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
1437
- typedef BOOST_CONTAINER_IMPDEF(reverse_iterator_impl) reverse_iterator;
1438
- typedef BOOST_CONTAINER_IMPDEF(const_reverse_iterator_impl) const_reverse_iterator;
1563
+ typedef std::pair<Key, T> value_type;
1564
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type;
1565
+ typedef typename sequence_type::allocator_type allocator_type;
1566
+ typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
1567
+ typedef typename sequence_type::pointer pointer;
1568
+ typedef typename sequence_type::const_pointer const_pointer;
1569
+ typedef typename sequence_type::reference reference;
1570
+ typedef typename sequence_type::const_reference const_reference;
1571
+ typedef typename sequence_type::size_type size_type;
1572
+ typedef typename sequence_type::difference_type difference_type;
1573
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::stored_allocator_type) stored_allocator_type;
1574
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::value_compare) value_compare;
1575
+
1576
+ typedef typename sequence_type::iterator iterator;
1577
+ typedef typename sequence_type::const_iterator const_iterator;
1578
+ typedef typename sequence_type::reverse_iterator reverse_iterator;
1579
+ typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
1439
1580
  typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type;
1440
1581
 
1582
+ //AllocatorOrContainer::value_type must be std::pair<Key, T>
1583
+ BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, typename AllocatorOrContainer::value_type>::value));
1584
+
1441
1585
  //////////////////////////////////////////////
1442
1586
  //
1443
1587
  // construct/copy/destroy
@@ -1447,63 +1591,109 @@ class flat_multimap
1447
1591
  //! <b>Effects</b>: Default constructs an empty flat_map.
1448
1592
  //!
1449
1593
  //! <b>Complexity</b>: Constant.
1450
- flat_multimap() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
1451
- container_detail::is_nothrow_default_constructible<Compare>::value)
1594
+ BOOST_CONTAINER_FORCEINLINE flat_multimap()
1595
+ BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
1596
+ dtl::is_nothrow_default_constructible<Compare>::value)
1452
1597
  : m_flat_tree()
1453
- {
1454
- //value_type must be std::pair<Key, T>
1455
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1456
- }
1598
+ {}
1599
+
1600
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified allocator.
1601
+ //!
1602
+ //! <b>Complexity</b>: Constant.
1603
+ BOOST_CONTAINER_FORCEINLINE explicit flat_multimap(const allocator_type& a)
1604
+ : m_flat_tree(dtl::force<const impl_allocator_type>(a))
1605
+ {}
1457
1606
 
1458
1607
  //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison
1459
- //! object and allocator.
1608
+ //! object .
1460
1609
  //!
1461
1610
  //! <b>Complexity</b>: Constant.
1462
- explicit flat_multimap(const Compare& comp,
1463
- const allocator_type& a = allocator_type())
1464
- : m_flat_tree(comp, container_detail::force<impl_allocator_type>(a))
1465
- {
1466
- //value_type must be std::pair<Key, T>
1467
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1468
- }
1611
+ BOOST_CONTAINER_FORCEINLINE explicit flat_multimap(const Compare& comp)
1612
+ : m_flat_tree(comp)
1613
+ {}
1469
1614
 
1470
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified allocator.
1615
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison
1616
+ //! object and allocator.
1471
1617
  //!
1472
1618
  //! <b>Complexity</b>: Constant.
1473
- explicit flat_multimap(const allocator_type& a)
1474
- : m_flat_tree(container_detail::force<impl_allocator_type>(a))
1475
- {
1476
- //value_type must be std::pair<Key, T>
1477
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1478
- }
1619
+ BOOST_CONTAINER_FORCEINLINE
1620
+ flat_multimap(const Compare& comp, const allocator_type& a)
1621
+ : m_flat_tree(comp, dtl::force<const impl_allocator_type>(a))
1622
+ {}
1479
1623
 
1480
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object
1481
- //! and allocator, and inserts elements from the range [first ,last ).
1624
+ //! <b>Effects</b>: Constructs an empty flat_multimap
1625
+ //! and inserts elements from the range [first ,last ).
1482
1626
  //!
1483
1627
  //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
1484
- //! comp and otherwise N logN, where N is last - first.
1628
+ //! the predicate and otherwise N logN, where N is last - first.
1485
1629
  template <class InputIterator>
1486
- flat_multimap(InputIterator first, InputIterator last,
1487
- const Compare& comp = Compare(),
1488
- const allocator_type& a = allocator_type())
1489
- : m_flat_tree(false, first, last, comp, container_detail::force<impl_allocator_type>(a))
1490
- {
1491
- //value_type must be std::pair<Key, T>
1492
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1493
- }
1630
+ BOOST_CONTAINER_FORCEINLINE
1631
+ flat_multimap(InputIterator first, InputIterator last)
1632
+ : m_flat_tree(false, first, last)
1633
+ {}
1494
1634
 
1495
1635
  //! <b>Effects</b>: Constructs an empty flat_multimap using the specified
1496
1636
  //! allocator, and inserts elements from the range [first ,last ).
1497
1637
  //!
1498
1638
  //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
1499
- //! comp and otherwise N logN, where N is last - first.
1639
+ //! the predicate and otherwise N logN, where N is last - first.
1500
1640
  template <class InputIterator>
1641
+ BOOST_CONTAINER_FORCEINLINE
1501
1642
  flat_multimap(InputIterator first, InputIterator last, const allocator_type& a)
1502
- : m_flat_tree(false, first, last, Compare(), container_detail::force<impl_allocator_type>(a))
1503
- {
1504
- //value_type must be std::pair<Key, T>
1505
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1506
- }
1643
+ : m_flat_tree(false, first, last, dtl::force<const impl_allocator_type>(a))
1644
+ {}
1645
+
1646
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object
1647
+ //! and inserts elements from the range [first ,last ).
1648
+ //!
1649
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
1650
+ //! the predicate and otherwise N logN, where N is last - first.
1651
+ template <class InputIterator>
1652
+ BOOST_CONTAINER_FORCEINLINE
1653
+ flat_multimap(InputIterator first, InputIterator last, const Compare& comp)
1654
+ : m_flat_tree(false, first, last, comp)
1655
+ {}
1656
+
1657
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object
1658
+ //! and allocator, and inserts elements from the range [first ,last ).
1659
+ //!
1660
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
1661
+ //! the predicate and otherwise N logN, where N is last - first.
1662
+ template <class InputIterator>
1663
+ BOOST_CONTAINER_FORCEINLINE
1664
+ flat_multimap(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
1665
+ : m_flat_tree(false, first, last, comp, dtl::force<const impl_allocator_type>(a))
1666
+ {}
1667
+
1668
+ //! <b>Effects</b>: Constructs an empty flat_multimap
1669
+ //! and inserts elements from the ordered range [first ,last). This function
1670
+ //! is more efficient than the normal range creation for ordered ranges.
1671
+ //!
1672
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
1673
+ //!
1674
+ //! <b>Complexity</b>: Linear in N.
1675
+ //!
1676
+ //! <b>Note</b>: Non-standard extension.
1677
+ template <class InputIterator>
1678
+ BOOST_CONTAINER_FORCEINLINE
1679
+ flat_multimap(ordered_range_t, InputIterator first, InputIterator last)
1680
+ : m_flat_tree(ordered_range, first, last)
1681
+ {}
1682
+
1683
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
1684
+ //! inserts elements from the ordered range [first ,last). This function
1685
+ //! is more efficient than the normal range creation for ordered ranges.
1686
+ //!
1687
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
1688
+ //!
1689
+ //! <b>Complexity</b>: Linear in N.
1690
+ //!
1691
+ //! <b>Note</b>: Non-standard extension.
1692
+ template <class InputIterator>
1693
+ BOOST_CONTAINER_FORCEINLINE
1694
+ flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
1695
+ : m_flat_tree(ordered_range, first, last, comp)
1696
+ {}
1507
1697
 
1508
1698
  //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
1509
1699
  //! allocator, and inserts elements from the ordered range [first ,last). This function
@@ -1515,39 +1705,93 @@ class flat_multimap
1515
1705
  //!
1516
1706
  //! <b>Note</b>: Non-standard extension.
1517
1707
  template <class InputIterator>
1518
- flat_multimap(ordered_range_t, InputIterator first, InputIterator last,
1519
- const Compare& comp = Compare(),
1520
- const allocator_type& a = allocator_type())
1708
+ BOOST_CONTAINER_FORCEINLINE
1709
+ flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
1521
1710
  : m_flat_tree(ordered_range, first, last, comp, a)
1522
- {
1523
- //value_type must be std::pair<Key, T>
1524
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1525
- }
1711
+ {}
1526
1712
 
1527
1713
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1528
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
1529
- //! allocator, and inserts elements from the range [il.begin(), il.end()).
1714
+ //! <b>Effects</b>: Constructs an empty flat_map and
1715
+ //! inserts elements from the range [il.begin(), il.end()).
1530
1716
  //!
1531
1717
  //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
1532
- //! comp and otherwise N logN, where N is last - first.
1533
- flat_multimap(std::initializer_list<value_type> il, const Compare& comp = Compare(), const allocator_type& a = allocator_type())
1534
- : m_flat_tree(false, il.begin(), il.end(), comp, container_detail::force<impl_allocator_type>(a))
1535
- {
1536
- //value_type must be std::pair<Key, T>
1537
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1538
- }
1718
+ //! the predicate and otherwise N logN, where N is last - first.
1719
+ BOOST_CONTAINER_FORCEINLINE
1720
+ flat_multimap(std::initializer_list<value_type> il)
1721
+ : m_flat_tree( false
1722
+ , dtl::force<impl_initializer_list>(il).begin()
1723
+ , dtl::force<impl_initializer_list>(il).end())
1724
+ {}
1539
1725
 
1540
1726
  //! <b>Effects</b>: Constructs an empty flat_map using the specified
1541
1727
  //! allocator, and inserts elements from the range [il.begin(), il.end()).
1542
1728
  //!
1543
1729
  //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
1544
- //! comp and otherwise N logN, where N is last - first.
1730
+ //! the predicate and otherwise N logN, where N is last - first.
1731
+ BOOST_CONTAINER_FORCEINLINE
1545
1732
  flat_multimap(std::initializer_list<value_type> il, const allocator_type& a)
1546
- : m_flat_tree(false, il.begin(), il.end(), Compare(), container_detail::force<impl_allocator_type>(a))
1547
- {
1548
- //value_type must be std::pair<Key, T>
1549
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1550
- }
1733
+ : m_flat_tree(false
1734
+ , dtl::force<impl_initializer_list>(il).begin()
1735
+ , dtl::force<impl_initializer_list>(il).end()
1736
+ , dtl::force<const impl_allocator_type>(a))
1737
+ {}
1738
+
1739
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
1740
+ //! inserts elements from the range [il.begin(), il.end()).
1741
+ //!
1742
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
1743
+ //! the predicate and otherwise N logN, where N is last - first.
1744
+ BOOST_CONTAINER_FORCEINLINE
1745
+ flat_multimap(std::initializer_list<value_type> il, const Compare& comp)
1746
+ : m_flat_tree(false
1747
+ , dtl::force<impl_initializer_list>(il).begin()
1748
+ , dtl::force<impl_initializer_list>(il).end(), comp)
1749
+ {}
1750
+
1751
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
1752
+ //! allocator, and inserts elements from the range [il.begin(), il.end()).
1753
+ //!
1754
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
1755
+ //! the predicate and otherwise N logN, where N is last - first.
1756
+ BOOST_CONTAINER_FORCEINLINE
1757
+ flat_multimap(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
1758
+ : m_flat_tree( false
1759
+ , dtl::force<impl_initializer_list>(il).begin()
1760
+ , dtl::force<impl_initializer_list>(il).end()
1761
+ , comp, dtl::force<const impl_allocator_type>(a))
1762
+ {}
1763
+
1764
+ //! <b>Effects</b>: Constructs an empty flat_multimap and
1765
+ //! inserts elements from the ordered range [il.begin(), il.end()). This function
1766
+ //! is more efficient than the normal range creation for ordered ranges.
1767
+ //!
1768
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
1769
+ //!
1770
+ //! <b>Complexity</b>: Linear in N.
1771
+ //!
1772
+ //! <b>Note</b>: Non-standard extension.
1773
+ BOOST_CONTAINER_FORCEINLINE
1774
+ flat_multimap(ordered_range_t, std::initializer_list<value_type> il)
1775
+ : m_flat_tree( ordered_range
1776
+ , dtl::force<impl_initializer_list>(il).begin()
1777
+ , dtl::force<impl_initializer_list>(il).end())
1778
+ {}
1779
+
1780
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
1781
+ //! inserts elements from the ordered range [il.begin(), il.end()). This function
1782
+ //! is more efficient than the normal range creation for ordered ranges.
1783
+ //!
1784
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
1785
+ //!
1786
+ //! <b>Complexity</b>: Linear in N.
1787
+ //!
1788
+ //! <b>Note</b>: Non-standard extension.
1789
+ BOOST_CONTAINER_FORCEINLINE
1790
+ flat_multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
1791
+ : m_flat_tree( ordered_range
1792
+ , dtl::force<impl_initializer_list>(il).begin()
1793
+ , dtl::force<impl_initializer_list>(il).end(), comp)
1794
+ {}
1551
1795
 
1552
1796
  //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
1553
1797
  //! allocator, and inserts elements from the ordered range [il.begin(), il.end()). This function
@@ -1558,78 +1802,73 @@ class flat_multimap
1558
1802
  //! <b>Complexity</b>: Linear in N.
1559
1803
  //!
1560
1804
  //! <b>Note</b>: Non-standard extension.
1561
- flat_multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp = Compare(),
1562
- const allocator_type& a = allocator_type())
1563
- : m_flat_tree(ordered_range, il.begin(), il.end(), comp, a)
1564
- {
1565
- //value_type must be std::pair<Key, T>
1566
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1567
- }
1805
+ BOOST_CONTAINER_FORCEINLINE
1806
+ flat_multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
1807
+ : m_flat_tree( ordered_range
1808
+ , dtl::force<impl_initializer_list>(il).begin()
1809
+ , dtl::force<impl_initializer_list>(il).end()
1810
+ , comp, dtl::force<const impl_allocator_type>(a))
1811
+ {}
1568
1812
  #endif
1569
1813
 
1570
1814
  //! <b>Effects</b>: Copy constructs a flat_multimap.
1571
1815
  //!
1572
1816
  //! <b>Complexity</b>: Linear in x.size().
1817
+ BOOST_CONTAINER_FORCEINLINE
1573
1818
  flat_multimap(const flat_multimap& x)
1574
1819
  : m_flat_tree(x.m_flat_tree)
1575
- {
1576
- //value_type must be std::pair<Key, T>
1577
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1578
- }
1820
+ {}
1579
1821
 
1580
1822
  //! <b>Effects</b>: Move constructs a flat_multimap. Constructs *this using x's resources.
1581
1823
  //!
1582
1824
  //! <b>Complexity</b>: Constant.
1583
1825
  //!
1584
1826
  //! <b>Postcondition</b>: x is emptied.
1827
+ BOOST_CONTAINER_FORCEINLINE
1585
1828
  flat_multimap(BOOST_RV_REF(flat_multimap) x)
1586
- BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
1829
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
1587
1830
  : m_flat_tree(boost::move(x.m_flat_tree))
1588
- {
1589
- //value_type must be std::pair<Key, T>
1590
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1591
- }
1831
+ {}
1592
1832
 
1593
1833
  //! <b>Effects</b>: Copy constructs a flat_multimap using the specified allocator.
1594
1834
  //!
1595
1835
  //! <b>Complexity</b>: Linear in x.size().
1836
+ BOOST_CONTAINER_FORCEINLINE
1596
1837
  flat_multimap(const flat_multimap& x, const allocator_type &a)
1597
- : m_flat_tree(x.m_flat_tree, a)
1598
- {
1599
- //value_type must be std::pair<Key, T>
1600
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1601
- }
1838
+ : m_flat_tree(x.m_flat_tree, dtl::force<const impl_allocator_type>(a))
1839
+ {}
1602
1840
 
1603
1841
  //! <b>Effects</b>: Move constructs a flat_multimap using the specified allocator.
1604
1842
  //! Constructs *this using x's resources.
1605
1843
  //!
1606
1844
  //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
1845
+ BOOST_CONTAINER_FORCEINLINE
1607
1846
  flat_multimap(BOOST_RV_REF(flat_multimap) x, const allocator_type &a)
1608
- : m_flat_tree(boost::move(x.m_flat_tree), a)
1609
- {
1610
- //value_type must be std::pair<Key, T>
1611
- BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
1612
- }
1847
+ : m_flat_tree(boost::move(x.m_flat_tree), dtl::force<const impl_allocator_type>(a))
1848
+ {}
1613
1849
 
1614
1850
  //! <b>Effects</b>: Makes *this a copy of x.
1615
1851
  //!
1616
1852
  //! <b>Complexity</b>: Linear in x.size().
1853
+ BOOST_CONTAINER_FORCEINLINE
1617
1854
  flat_multimap& operator=(BOOST_COPY_ASSIGN_REF(flat_multimap) x)
1618
1855
  { m_flat_tree = x.m_flat_tree; return *this; }
1619
1856
 
1620
1857
  //! <b>Effects</b>: this->swap(x.get()).
1621
1858
  //!
1622
1859
  //! <b>Complexity</b>: Constant.
1860
+ BOOST_CONTAINER_FORCEINLINE
1623
1861
  flat_multimap& operator=(BOOST_RV_REF(flat_multimap) x)
1624
1862
  BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
1625
1863
  allocator_traits_type::is_always_equal::value) &&
1626
- boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
1864
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
1627
1865
  { m_flat_tree = boost::move(x.m_flat_tree); return *this; }
1628
1866
 
1629
1867
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
1630
1868
  //! <b>Effects</b>: Assign content of il to *this
1631
1869
  //!
1632
1870
  //! <b>Complexity</b>: Linear in il.size().
1871
+ BOOST_CONTAINER_FORCEINLINE
1633
1872
  flat_multimap& operator=(std::initializer_list<value_type> il)
1634
1873
  {
1635
1874
  this->clear();
@@ -1642,8 +1881,9 @@ class flat_multimap
1642
1881
  //! was passed to the object's constructor.
1643
1882
  //!
1644
1883
  //! <b>Complexity</b>: Constant.
1884
+ BOOST_CONTAINER_FORCEINLINE
1645
1885
  allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
1646
- { return container_detail::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
1886
+ { return dtl::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
1647
1887
 
1648
1888
  //! <b>Effects</b>: Returns a reference to the internal allocator.
1649
1889
  //!
@@ -1652,8 +1892,9 @@ class flat_multimap
1652
1892
  //! <b>Complexity</b>: Constant.
1653
1893
  //!
1654
1894
  //! <b>Note</b>: Non-standard extension.
1895
+ BOOST_CONTAINER_FORCEINLINE
1655
1896
  stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
1656
- { return container_detail::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
1897
+ { return dtl::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
1657
1898
 
1658
1899
  //! <b>Effects</b>: Returns a reference to the internal allocator.
1659
1900
  //!
@@ -1662,8 +1903,9 @@ class flat_multimap
1662
1903
  //! <b>Complexity</b>: Constant.
1663
1904
  //!
1664
1905
  //! <b>Note</b>: Non-standard extension.
1906
+ BOOST_CONTAINER_FORCEINLINE
1665
1907
  const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
1666
- { return container_detail::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
1908
+ { return dtl::force<const stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
1667
1909
 
1668
1910
  //////////////////////////////////////////////
1669
1911
  //
@@ -1676,32 +1918,36 @@ class flat_multimap
1676
1918
  //! <b>Throws</b>: Nothing.
1677
1919
  //!
1678
1920
  //! <b>Complexity</b>: Constant.
1921
+ BOOST_CONTAINER_FORCEINLINE
1679
1922
  iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
1680
- { return container_detail::force_copy<iterator>(m_flat_tree.begin()); }
1923
+ { return dtl::force_copy<iterator>(m_flat_tree.begin()); }
1681
1924
 
1682
1925
  //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
1683
1926
  //!
1684
1927
  //! <b>Throws</b>: Nothing.
1685
1928
  //!
1686
1929
  //! <b>Complexity</b>: Constant.
1930
+ BOOST_CONTAINER_FORCEINLINE
1687
1931
  const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
1688
- { return container_detail::force_copy<const_iterator>(m_flat_tree.begin()); }
1932
+ { return dtl::force_copy<const_iterator>(m_flat_tree.begin()); }
1689
1933
 
1690
1934
  //! <b>Effects</b>: Returns an iterator to the end of the container.
1691
1935
  //!
1692
1936
  //! <b>Throws</b>: Nothing.
1693
1937
  //!
1694
1938
  //! <b>Complexity</b>: Constant.
1939
+ BOOST_CONTAINER_FORCEINLINE
1695
1940
  iterator end() BOOST_NOEXCEPT_OR_NOTHROW
1696
- { return container_detail::force_copy<iterator>(m_flat_tree.end()); }
1941
+ { return dtl::force_copy<iterator>(m_flat_tree.end()); }
1697
1942
 
1698
1943
  //! <b>Effects</b>: Returns a const_iterator to the end of the container.
1699
1944
  //!
1700
1945
  //! <b>Throws</b>: Nothing.
1701
1946
  //!
1702
1947
  //! <b>Complexity</b>: Constant.
1948
+ BOOST_CONTAINER_FORCEINLINE
1703
1949
  const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
1704
- { return container_detail::force_copy<const_iterator>(m_flat_tree.end()); }
1950
+ { return dtl::force_copy<const_iterator>(m_flat_tree.end()); }
1705
1951
 
1706
1952
  //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
1707
1953
  //! of the reversed container.
@@ -1709,8 +1955,9 @@ class flat_multimap
1709
1955
  //! <b>Throws</b>: Nothing.
1710
1956
  //!
1711
1957
  //! <b>Complexity</b>: Constant.
1958
+ BOOST_CONTAINER_FORCEINLINE
1712
1959
  reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
1713
- { return container_detail::force_copy<reverse_iterator>(m_flat_tree.rbegin()); }
1960
+ { return dtl::force_copy<reverse_iterator>(m_flat_tree.rbegin()); }
1714
1961
 
1715
1962
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
1716
1963
  //! of the reversed container.
@@ -1718,8 +1965,9 @@ class flat_multimap
1718
1965
  //! <b>Throws</b>: Nothing.
1719
1966
  //!
1720
1967
  //! <b>Complexity</b>: Constant.
1968
+ BOOST_CONTAINER_FORCEINLINE
1721
1969
  const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
1722
- { return container_detail::force_copy<const_reverse_iterator>(m_flat_tree.rbegin()); }
1970
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rbegin()); }
1723
1971
 
1724
1972
  //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
1725
1973
  //! of the reversed container.
@@ -1727,8 +1975,9 @@ class flat_multimap
1727
1975
  //! <b>Throws</b>: Nothing.
1728
1976
  //!
1729
1977
  //! <b>Complexity</b>: Constant.
1978
+ BOOST_CONTAINER_FORCEINLINE
1730
1979
  reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
1731
- { return container_detail::force_copy<reverse_iterator>(m_flat_tree.rend()); }
1980
+ { return dtl::force_copy<reverse_iterator>(m_flat_tree.rend()); }
1732
1981
 
1733
1982
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
1734
1983
  //! of the reversed container.
@@ -1736,24 +1985,27 @@ class flat_multimap
1736
1985
  //! <b>Throws</b>: Nothing.
1737
1986
  //!
1738
1987
  //! <b>Complexity</b>: Constant.
1988
+ BOOST_CONTAINER_FORCEINLINE
1739
1989
  const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
1740
- { return container_detail::force_copy<const_reverse_iterator>(m_flat_tree.rend()); }
1990
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rend()); }
1741
1991
 
1742
1992
  //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
1743
1993
  //!
1744
1994
  //! <b>Throws</b>: Nothing.
1745
1995
  //!
1746
1996
  //! <b>Complexity</b>: Constant.
1997
+ BOOST_CONTAINER_FORCEINLINE
1747
1998
  const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
1748
- { return container_detail::force_copy<const_iterator>(m_flat_tree.cbegin()); }
1999
+ { return dtl::force_copy<const_iterator>(m_flat_tree.cbegin()); }
1749
2000
 
1750
2001
  //! <b>Effects</b>: Returns a const_iterator to the end of the container.
1751
2002
  //!
1752
2003
  //! <b>Throws</b>: Nothing.
1753
2004
  //!
1754
2005
  //! <b>Complexity</b>: Constant.
2006
+ BOOST_CONTAINER_FORCEINLINE
1755
2007
  const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
1756
- { return container_detail::force_copy<const_iterator>(m_flat_tree.cend()); }
2008
+ { return dtl::force_copy<const_iterator>(m_flat_tree.cend()); }
1757
2009
 
1758
2010
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
1759
2011
  //! of the reversed container.
@@ -1761,8 +2013,9 @@ class flat_multimap
1761
2013
  //! <b>Throws</b>: Nothing.
1762
2014
  //!
1763
2015
  //! <b>Complexity</b>: Constant.
2016
+ BOOST_CONTAINER_FORCEINLINE
1764
2017
  const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
1765
- { return container_detail::force_copy<const_reverse_iterator>(m_flat_tree.crbegin()); }
2018
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crbegin()); }
1766
2019
 
1767
2020
  //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
1768
2021
  //! of the reversed container.
@@ -1770,8 +2023,9 @@ class flat_multimap
1770
2023
  //! <b>Throws</b>: Nothing.
1771
2024
  //!
1772
2025
  //! <b>Complexity</b>: Constant.
2026
+ BOOST_CONTAINER_FORCEINLINE
1773
2027
  const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
1774
- { return container_detail::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
2028
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
1775
2029
 
1776
2030
  //////////////////////////////////////////////
1777
2031
  //
@@ -1784,6 +2038,7 @@ class flat_multimap
1784
2038
  //! <b>Throws</b>: Nothing.
1785
2039
  //!
1786
2040
  //! <b>Complexity</b>: Constant.
2041
+ BOOST_CONTAINER_FORCEINLINE
1787
2042
  bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
1788
2043
  { return m_flat_tree.empty(); }
1789
2044
 
@@ -1792,6 +2047,7 @@ class flat_multimap
1792
2047
  //! <b>Throws</b>: Nothing.
1793
2048
  //!
1794
2049
  //! <b>Complexity</b>: Constant.
2050
+ BOOST_CONTAINER_FORCEINLINE
1795
2051
  size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
1796
2052
  { return m_flat_tree.size(); }
1797
2053
 
@@ -1800,6 +2056,7 @@ class flat_multimap
1800
2056
  //! <b>Throws</b>: Nothing.
1801
2057
  //!
1802
2058
  //! <b>Complexity</b>: Constant.
2059
+ BOOST_CONTAINER_FORCEINLINE
1803
2060
  size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
1804
2061
  { return m_flat_tree.max_size(); }
1805
2062
 
@@ -1809,10 +2066,12 @@ class flat_multimap
1809
2066
  //! <b>Throws</b>: Nothing.
1810
2067
  //!
1811
2068
  //! <b>Complexity</b>: Constant.
2069
+ BOOST_CONTAINER_FORCEINLINE
1812
2070
  size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
1813
2071
  { return m_flat_tree.capacity(); }
1814
2072
 
1815
- //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
2073
+ //! <b>Effects</b>: If n is less than or equal to capacity(), or the
2074
+ //! underlying container has no `reserve` member, this call has no
1816
2075
  //! effect. Otherwise, it is a request for allocation of additional memory.
1817
2076
  //! If the request is successful, then capacity() is greater than or equal to
1818
2077
  //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
@@ -1821,6 +2080,7 @@ class flat_multimap
1821
2080
  //!
1822
2081
  //! <b>Note</b>: If capacity() is less than "cnt", iterators and references to
1823
2082
  //! to values might be invalidated.
2083
+ BOOST_CONTAINER_FORCEINLINE
1824
2084
  void reserve(size_type cnt)
1825
2085
  { m_flat_tree.reserve(cnt); }
1826
2086
 
@@ -1830,24 +2090,29 @@ class flat_multimap
1830
2090
  //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
1831
2091
  //!
1832
2092
  //! <b>Complexity</b>: Linear to size().
2093
+ BOOST_CONTAINER_FORCEINLINE
1833
2094
  void shrink_to_fit()
1834
2095
  { m_flat_tree.shrink_to_fit(); }
1835
2096
 
1836
2097
  //! @copydoc ::boost::container::flat_set::nth(size_type)
2098
+ BOOST_CONTAINER_FORCEINLINE
1837
2099
  iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
1838
- { return container_detail::force_copy<iterator>(m_flat_tree.nth(n)); }
2100
+ { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
1839
2101
 
1840
2102
  //! @copydoc ::boost::container::flat_set::nth(size_type) const
2103
+ BOOST_CONTAINER_FORCEINLINE
1841
2104
  const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
1842
- { return container_detail::force_copy<iterator>(m_flat_tree.nth(n)); }
2105
+ { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
1843
2106
 
1844
2107
  //! @copydoc ::boost::container::flat_set::index_of(iterator)
2108
+ BOOST_CONTAINER_FORCEINLINE
1845
2109
  size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
1846
- { return m_flat_tree.index_of(container_detail::force_copy<impl_iterator>(p)); }
2110
+ { return m_flat_tree.index_of(dtl::force_copy<impl_iterator>(p)); }
1847
2111
 
1848
2112
  //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const
2113
+ BOOST_CONTAINER_FORCEINLINE
1849
2114
  size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
1850
- { return m_flat_tree.index_of(container_detail::force_copy<impl_const_iterator>(p)); }
2115
+ { return m_flat_tree.index_of(dtl::force_copy<impl_const_iterator>(p)); }
1851
2116
 
1852
2117
  #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
1853
2118
 
@@ -1860,8 +2125,9 @@ class flat_multimap
1860
2125
  //!
1861
2126
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1862
2127
  template <class... Args>
2128
+ BOOST_CONTAINER_FORCEINLINE
1863
2129
  iterator emplace(BOOST_FWD_REF(Args)... args)
1864
- { return container_detail::force_copy<iterator>(m_flat_tree.emplace_equal(boost::forward<Args>(args)...)); }
2130
+ { return dtl::force_copy<iterator>(m_flat_tree.emplace_equal(boost::forward<Args>(args)...)); }
1865
2131
 
1866
2132
  //! <b>Effects</b>: Inserts an object of type T constructed with
1867
2133
  //! std::forward<Args>(args)... in the container.
@@ -1876,24 +2142,25 @@ class flat_multimap
1876
2142
  //!
1877
2143
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1878
2144
  template <class... Args>
2145
+ BOOST_CONTAINER_FORCEINLINE
1879
2146
  iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
1880
2147
  {
1881
- return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_equal
1882
- (container_detail::force_copy<impl_const_iterator>(hint), boost::forward<Args>(args)...));
2148
+ return dtl::force_copy<iterator>(m_flat_tree.emplace_hint_equal
2149
+ (dtl::force_copy<impl_const_iterator>(hint), boost::forward<Args>(args)...));
1883
2150
  }
1884
2151
 
1885
2152
  #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
1886
2153
 
1887
2154
  #define BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE(N) \
1888
2155
  BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
1889
- iterator emplace(BOOST_MOVE_UREF##N)\
1890
- { return container_detail::force_copy<iterator>(m_flat_tree.emplace_equal(BOOST_MOVE_FWD##N)); }\
2156
+ BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
2157
+ { return dtl::force_copy<iterator>(m_flat_tree.emplace_equal(BOOST_MOVE_FWD##N)); }\
1891
2158
  \
1892
2159
  BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
1893
- iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
2160
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
1894
2161
  {\
1895
- return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_equal\
1896
- (container_detail::force_copy<impl_const_iterator>(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
2162
+ return dtl::force_copy<iterator>(m_flat_tree.emplace_hint_equal\
2163
+ (dtl::force_copy<impl_const_iterator>(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
1897
2164
  }\
1898
2165
  //
1899
2166
  BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE)
@@ -1908,10 +2175,10 @@ class flat_multimap
1908
2175
  //! to the elements with bigger keys than x.
1909
2176
  //!
1910
2177
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1911
- iterator insert(const value_type& x)
2178
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const value_type& x)
1912
2179
  {
1913
- return container_detail::force_copy<iterator>(
1914
- m_flat_tree.insert_equal(container_detail::force<impl_value_type>(x)));
2180
+ return dtl::force_copy<iterator>(
2181
+ m_flat_tree.insert_equal(dtl::force<const impl_value_type>(x)));
1915
2182
  }
1916
2183
 
1917
2184
  //! <b>Effects</b>: Inserts a new value move-constructed from x and returns
@@ -1921,8 +2188,8 @@ class flat_multimap
1921
2188
  //! to the elements with bigger keys than x.
1922
2189
  //!
1923
2190
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1924
- iterator insert(BOOST_RV_REF(value_type) x)
1925
- { return container_detail::force_copy<iterator>(m_flat_tree.insert_equal(boost::move(x))); }
2191
+ BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(value_type) x)
2192
+ { return dtl::force_copy<iterator>(m_flat_tree.insert_equal(boost::move(x))); }
1926
2193
 
1927
2194
  //! <b>Effects</b>: Inserts a new value move-constructed from x and returns
1928
2195
  //! the iterator pointing to the newly inserted element.
@@ -1931,8 +2198,8 @@ class flat_multimap
1931
2198
  //! to the elements with bigger keys than x.
1932
2199
  //!
1933
2200
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1934
- iterator insert(BOOST_RV_REF(impl_value_type) x)
1935
- { return container_detail::force_copy<iterator>(m_flat_tree.insert_equal(boost::move(x))); }
2201
+ BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(impl_value_type) x)
2202
+ { return dtl::force_copy<iterator>(m_flat_tree.insert_equal(boost::move(x))); }
1936
2203
 
1937
2204
  //! <b>Effects</b>: Inserts a copy of x in the container.
1938
2205
  //! p is a hint pointing to where the insert should start to search.
@@ -1945,11 +2212,11 @@ class flat_multimap
1945
2212
  //! to the elements with bigger keys than x.
1946
2213
  //!
1947
2214
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1948
- iterator insert(const_iterator p, const value_type& x)
2215
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
1949
2216
  {
1950
- return container_detail::force_copy<iterator>
1951
- (m_flat_tree.insert_equal( container_detail::force_copy<impl_const_iterator>(p)
1952
- , container_detail::force<impl_value_type>(x)));
2217
+ return dtl::force_copy<iterator>
2218
+ (m_flat_tree.insert_equal( dtl::force_copy<impl_const_iterator>(p)
2219
+ , dtl::force<const impl_value_type>(x)));
1953
2220
  }
1954
2221
 
1955
2222
  //! <b>Effects</b>: Inserts a value move constructed from x in the container.
@@ -1963,10 +2230,10 @@ class flat_multimap
1963
2230
  //! to the elements with bigger keys than x.
1964
2231
  //!
1965
2232
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1966
- iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
2233
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
1967
2234
  {
1968
- return container_detail::force_copy<iterator>
1969
- (m_flat_tree.insert_equal(container_detail::force_copy<impl_const_iterator>(p)
2235
+ return dtl::force_copy<iterator>
2236
+ (m_flat_tree.insert_equal(dtl::force_copy<impl_const_iterator>(p)
1970
2237
  , boost::move(x)));
1971
2238
  }
1972
2239
 
@@ -1981,22 +2248,21 @@ class flat_multimap
1981
2248
  //! to the elements with bigger keys than x.
1982
2249
  //!
1983
2250
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1984
- iterator insert(const_iterator p, BOOST_RV_REF(impl_value_type) x)
2251
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(impl_value_type) x)
1985
2252
  {
1986
- return container_detail::force_copy<iterator>(
1987
- m_flat_tree.insert_equal(container_detail::force_copy<impl_const_iterator>(p), boost::move(x)));
2253
+ return dtl::force_copy<iterator>(
2254
+ m_flat_tree.insert_equal(dtl::force_copy<impl_const_iterator>(p), boost::move(x)));
1988
2255
  }
1989
2256
 
1990
2257
  //! <b>Requires</b>: first, last are not iterators into *this.
1991
2258
  //!
1992
2259
  //! <b>Effects</b>: inserts each element from the range [first,last) .
1993
2260
  //!
1994
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
1995
- //! search time plus N*size() insertion time.
2261
+ //! <b>Complexity</b>: N log(N).
1996
2262
  //!
1997
2263
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
1998
2264
  template <class InputIterator>
1999
- void insert(InputIterator first, InputIterator last)
2265
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
2000
2266
  { m_flat_tree.insert_equal(first, last); }
2001
2267
 
2002
2268
  //! <b>Requires</b>: first, last are not iterators into *this.
@@ -2007,25 +2273,26 @@ class flat_multimap
2007
2273
  //! if there is no element with key equivalent to the key of that element. This
2008
2274
  //! function is more efficient than the normal range creation for ordered ranges.
2009
2275
  //!
2010
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
2011
- //! search time plus N*size() insertion time.
2276
+ //! <b>Complexity</b>: Linear.
2012
2277
  //!
2013
2278
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
2014
2279
  //!
2015
2280
  //! <b>Note</b>: Non-standard extension.
2016
2281
  template <class InputIterator>
2017
- void insert(ordered_range_t, InputIterator first, InputIterator last)
2282
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, InputIterator first, InputIterator last)
2018
2283
  { m_flat_tree.insert_equal(ordered_range, first, last); }
2019
2284
 
2020
2285
  #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
2021
2286
  //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) .
2022
2287
  //!
2023
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
2024
- //! search time plus N*size() insertion time.
2288
+ //! <b>Complexity</b>: N log(N).
2025
2289
  //!
2026
2290
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
2027
- void insert(std::initializer_list<value_type> il)
2028
- { m_flat_tree.insert_equal(il.begin(), il.end()); }
2291
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
2292
+ {
2293
+ m_flat_tree.insert_equal( dtl::force<impl_initializer_list>(il).begin()
2294
+ , dtl::force<impl_initializer_list>(il).end());
2295
+ }
2029
2296
 
2030
2297
  //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
2031
2298
  //!
@@ -2033,14 +2300,17 @@ class flat_multimap
2033
2300
  //! if there is no element with key equivalent to the key of that element. This
2034
2301
  //! function is more efficient than the normal range creation for ordered ranges.
2035
2302
  //!
2036
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
2037
- //! search time plus N*size() insertion time.
2303
+ //! <b>Complexity</b>: Linear.
2038
2304
  //!
2039
2305
  //! <b>Note</b>: If an element is inserted it might invalidate elements.
2040
2306
  //!
2041
2307
  //! <b>Note</b>: Non-standard extension.
2042
- void insert(ordered_range_t, std::initializer_list<value_type> il)
2043
- { m_flat_tree.insert_equal(ordered_range, il.begin(), il.end()); }
2308
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, std::initializer_list<value_type> il)
2309
+ {
2310
+ m_flat_tree.insert_equal( ordered_range
2311
+ , dtl::force<impl_initializer_list>(il).begin()
2312
+ , dtl::force<impl_initializer_list>(il).end());
2313
+ }
2044
2314
  #endif
2045
2315
 
2046
2316
  //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
@@ -2057,23 +2327,23 @@ class flat_multimap
2057
2327
  //!
2058
2328
  //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
2059
2329
  template<class C2>
2060
- void merge(flat_multimap<Key, T, C2, Allocator>& source)
2330
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap<Key, T, C2, AllocatorOrContainer>& source)
2061
2331
  { m_flat_tree.merge_equal(source.tree()); }
2062
2332
 
2063
- //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, Allocator>&)
2333
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
2064
2334
  template<class C2>
2065
- void merge(BOOST_RV_REF_BEG flat_multimap<Key, T, C2, Allocator> BOOST_RV_REF_END source)
2066
- { return this->merge(static_cast<flat_multimap<Key, T, C2, Allocator>&>(source)); }
2335
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
2336
+ { return this->merge(static_cast<flat_multimap<Key, T, C2, AllocatorOrContainer>&>(source)); }
2067
2337
 
2068
- //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, Allocator>&)
2338
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
2069
2339
  template<class C2>
2070
- void merge(flat_map<Key, T, C2, Allocator>& source)
2340
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_map<Key, T, C2, AllocatorOrContainer>& source)
2071
2341
  { m_flat_tree.merge_equal(source.tree()); }
2072
2342
 
2073
- //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, Allocator>&)
2343
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
2074
2344
  template<class C2>
2075
- void merge(BOOST_RV_REF_BEG flat_map<Key, T, C2, Allocator> BOOST_RV_REF_END source)
2076
- { return this->merge(static_cast<flat_map<Key, T, C2, Allocator>&>(source)); }
2345
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
2346
+ { return this->merge(static_cast<flat_map<Key, T, C2, AllocatorOrContainer>&>(source)); }
2077
2347
 
2078
2348
  //! <b>Effects</b>: Erases the element pointed to by p.
2079
2349
  //!
@@ -2085,10 +2355,10 @@ class flat_multimap
2085
2355
  //!
2086
2356
  //! <b>Note</b>: Invalidates elements with keys
2087
2357
  //! not less than the erased element.
2088
- iterator erase(const_iterator p)
2358
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p)
2089
2359
  {
2090
- return container_detail::force_copy<iterator>(
2091
- m_flat_tree.erase(container_detail::force_copy<impl_const_iterator>(p)));
2360
+ return dtl::force_copy<iterator>(
2361
+ m_flat_tree.erase(dtl::force_copy<impl_const_iterator>(p)));
2092
2362
  }
2093
2363
 
2094
2364
  //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
@@ -2097,7 +2367,7 @@ class flat_multimap
2097
2367
  //!
2098
2368
  //! <b>Complexity</b>: Logarithmic search time plus erasure time
2099
2369
  //! linear to the elements with bigger keys.
2100
- size_type erase(const key_type& x)
2370
+ BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x)
2101
2371
  { return m_flat_tree.erase(x); }
2102
2372
 
2103
2373
  //! <b>Effects</b>: Erases all the elements in the range [first, last).
@@ -2108,11 +2378,11 @@ class flat_multimap
2108
2378
  //!
2109
2379
  //! <b>Complexity</b>: Logarithmic search time plus erasure time
2110
2380
  //! linear to the elements with bigger keys.
2111
- iterator erase(const_iterator first, const_iterator last)
2381
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last)
2112
2382
  {
2113
- return container_detail::force_copy<iterator>
2114
- (m_flat_tree.erase( container_detail::force_copy<impl_const_iterator>(first)
2115
- , container_detail::force_copy<impl_const_iterator>(last)));
2383
+ return dtl::force_copy<iterator>
2384
+ (m_flat_tree.erase( dtl::force_copy<impl_const_iterator>(first)
2385
+ , dtl::force_copy<impl_const_iterator>(last)));
2116
2386
  }
2117
2387
 
2118
2388
  //! <b>Effects</b>: Swaps the contents of *this and x.
@@ -2120,9 +2390,9 @@ class flat_multimap
2120
2390
  //! <b>Throws</b>: Nothing.
2121
2391
  //!
2122
2392
  //! <b>Complexity</b>: Constant.
2123
- void swap(flat_multimap& x)
2393
+ BOOST_CONTAINER_FORCEINLINE void swap(flat_multimap& x)
2124
2394
  BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
2125
- && boost::container::container_detail::is_nothrow_swappable<Compare>::value )
2395
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value )
2126
2396
  { m_flat_tree.swap(x.m_flat_tree); }
2127
2397
 
2128
2398
  //! <b>Effects</b>: erase(a.begin(),a.end()).
@@ -2130,7 +2400,7 @@ class flat_multimap
2130
2400
  //! <b>Postcondition</b>: size() == 0.
2131
2401
  //!
2132
2402
  //! <b>Complexity</b>: linear in size().
2133
- void clear() BOOST_NOEXCEPT_OR_NOTHROW
2403
+ BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW
2134
2404
  { m_flat_tree.clear(); }
2135
2405
 
2136
2406
  //////////////////////////////////////////////
@@ -2143,15 +2413,15 @@ class flat_multimap
2143
2413
  //! of which a was constructed.
2144
2414
  //!
2145
2415
  //! <b>Complexity</b>: Constant.
2146
- key_compare key_comp() const
2147
- { return container_detail::force_copy<key_compare>(m_flat_tree.key_comp()); }
2416
+ BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
2417
+ { return dtl::force_copy<key_compare>(m_flat_tree.key_comp()); }
2148
2418
 
2149
2419
  //! <b>Effects</b>: Returns an object of value_compare constructed out
2150
2420
  //! of the comparison object.
2151
2421
  //!
2152
2422
  //! <b>Complexity</b>: Constant.
2153
- value_compare value_comp() const
2154
- { return value_compare(container_detail::force_copy<key_compare>(m_flat_tree.key_comp())); }
2423
+ BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
2424
+ { return value_compare(dtl::force_copy<key_compare>(m_flat_tree.key_comp())); }
2155
2425
 
2156
2426
  //////////////////////////////////////////////
2157
2427
  //
@@ -2163,102 +2433,134 @@ class flat_multimap
2163
2433
  //! equivalent to x, or end() if such an element is not found.
2164
2434
  //!
2165
2435
  //! <b>Complexity</b>: Logarithmic.
2166
- iterator find(const key_type& x)
2167
- { return container_detail::force_copy<iterator>(m_flat_tree.find(x)); }
2436
+ BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& x)
2437
+ { return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
2168
2438
 
2169
2439
  //! <b>Returns</b>: An const_iterator pointing to an element with the key
2170
2440
  //! equivalent to x, or end() if such an element is not found.
2171
2441
  //!
2172
2442
  //! <b>Complexity</b>: Logarithmic.
2173
- const_iterator find(const key_type& x) const
2174
- { return container_detail::force_copy<const_iterator>(m_flat_tree.find(x)); }
2443
+ BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& x) const
2444
+ { return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
2175
2445
 
2176
2446
  //! <b>Returns</b>: The number of elements with key equivalent to x.
2177
2447
  //!
2178
2448
  //! <b>Complexity</b>: log(size())+count(k)
2179
- size_type count(const key_type& x) const
2449
+ BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
2180
2450
  { return m_flat_tree.count(x); }
2181
2451
 
2182
2452
  //! <b>Returns</b>: An iterator pointing to the first element with key not less
2183
2453
  //! than k, or a.end() if such an element is not found.
2184
2454
  //!
2185
2455
  //! <b>Complexity</b>: Logarithmic
2186
- iterator lower_bound(const key_type& x)
2187
- { return container_detail::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
2456
+ BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& x)
2457
+ { return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
2188
2458
 
2189
2459
  //! <b>Returns</b>: A const iterator pointing to the first element with key
2190
2460
  //! not less than k, or a.end() if such an element is not found.
2191
2461
  //!
2192
2462
  //! <b>Complexity</b>: Logarithmic
2193
- const_iterator lower_bound(const key_type& x) const
2194
- { return container_detail::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
2463
+ BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& x) const
2464
+ { return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
2195
2465
 
2196
2466
  //! <b>Returns</b>: An iterator pointing to the first element with key not less
2197
2467
  //! than x, or end() if such an element is not found.
2198
2468
  //!
2199
2469
  //! <b>Complexity</b>: Logarithmic
2200
- iterator upper_bound(const key_type& x)
2201
- {return container_detail::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
2470
+ BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& x)
2471
+ {return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
2202
2472
 
2203
2473
  //! <b>Returns</b>: A const iterator pointing to the first element with key
2204
2474
  //! not less than x, or end() if such an element is not found.
2205
2475
  //!
2206
2476
  //! <b>Complexity</b>: Logarithmic
2207
- const_iterator upper_bound(const key_type& x) const
2208
- { return container_detail::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
2477
+ BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& x) const
2478
+ { return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
2209
2479
 
2210
2480
  //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
2211
2481
  //!
2212
2482
  //! <b>Complexity</b>: Logarithmic
2213
- std::pair<iterator,iterator> equal_range(const key_type& x)
2214
- { return container_detail::force_copy<std::pair<iterator,iterator> >(m_flat_tree.equal_range(x)); }
2483
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
2484
+ { return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.equal_range(x)); }
2215
2485
 
2216
2486
  //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
2217
2487
  //!
2218
2488
  //! <b>Complexity</b>: Logarithmic
2219
- std::pair<const_iterator,const_iterator> equal_range(const key_type& x) const
2220
- { return container_detail::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
2489
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
2490
+ { return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
2491
+
2492
+ //! <b>Effects</b>: Extracts the internal sequence container.
2493
+ //!
2494
+ //! <b>Complexity</b>: Same as the move constructor of sequence_type, usually constant.
2495
+ //!
2496
+ //! <b>Postcondition</b>: this->empty()
2497
+ //!
2498
+ //! <b>Throws</b>: If secuence_type's move constructor throws
2499
+ BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence()
2500
+ {
2501
+ return boost::move(dtl::force<sequence_type>(m_flat_tree.get_sequence_ref()));
2502
+ }
2503
+
2504
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
2505
+ //! one passed externally using the move assignment.
2506
+ //!
2507
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
2508
+ //!
2509
+ //! <b>Throws</b>: If the comparison or the move constructor throws
2510
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
2511
+ { this->m_flat_tree.adopt_sequence_equal(boost::move(dtl::force<impl_sequence_type>(seq))); }
2512
+
2513
+ //! <b>Requires</b>: seq shall be ordered according to this->compare().
2514
+ //!
2515
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
2516
+ //! one passed externally using the move assignment.
2517
+ //!
2518
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
2519
+ //!
2520
+ //! <b>Throws</b>: If the move assignment throws
2521
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq)
2522
+ { this->m_flat_tree.adopt_sequence_equal(ordered_range_t(), boost::move(dtl::force<impl_sequence_type>(seq))); }
2221
2523
 
2222
2524
  //! <b>Effects</b>: Returns true if x and y are equal
2223
2525
  //!
2224
2526
  //! <b>Complexity</b>: Linear to the number of elements in the container.
2225
- friend bool operator==(const flat_multimap& x, const flat_multimap& y)
2527
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_multimap& x, const flat_multimap& y)
2226
2528
  { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
2227
2529
 
2228
2530
  //! <b>Effects</b>: Returns true if x and y are unequal
2229
2531
  //!
2230
2532
  //! <b>Complexity</b>: Linear to the number of elements in the container.
2231
- friend bool operator!=(const flat_multimap& x, const flat_multimap& y)
2533
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_multimap& x, const flat_multimap& y)
2232
2534
  { return !(x == y); }
2233
2535
 
2234
2536
  //! <b>Effects</b>: Returns true if x is less than y
2235
2537
  //!
2236
2538
  //! <b>Complexity</b>: Linear to the number of elements in the container.
2237
- friend bool operator<(const flat_multimap& x, const flat_multimap& y)
2539
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_multimap& x, const flat_multimap& y)
2238
2540
  { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
2239
2541
 
2240
2542
  //! <b>Effects</b>: Returns true if x is greater than y
2241
2543
  //!
2242
2544
  //! <b>Complexity</b>: Linear to the number of elements in the container.
2243
- friend bool operator>(const flat_multimap& x, const flat_multimap& y)
2545
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_multimap& x, const flat_multimap& y)
2244
2546
  { return y < x; }
2245
2547
 
2246
2548
  //! <b>Effects</b>: Returns true if x is equal or less than y
2247
2549
  //!
2248
2550
  //! <b>Complexity</b>: Linear to the number of elements in the container.
2249
- friend bool operator<=(const flat_multimap& x, const flat_multimap& y)
2551
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_multimap& x, const flat_multimap& y)
2250
2552
  { return !(y < x); }
2251
2553
 
2252
2554
  //! <b>Effects</b>: Returns true if x is equal or greater than y
2253
2555
  //!
2254
2556
  //! <b>Complexity</b>: Linear to the number of elements in the container.
2255
- friend bool operator>=(const flat_multimap& x, const flat_multimap& y)
2557
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_multimap& x, const flat_multimap& y)
2256
2558
  { return !(x < y); }
2257
2559
 
2258
2560
  //! <b>Effects</b>: x.swap(y)
2259
2561
  //!
2260
2562
  //! <b>Complexity</b>: Constant.
2261
- friend void swap(flat_multimap& x, flat_multimap& y)
2563
+ BOOST_CONTAINER_FORCEINLINE friend void swap(flat_multimap& x, flat_multimap& y)
2262
2564
  { x.swap(y); }
2263
2565
  };
2264
2566
 
@@ -2270,11 +2572,11 @@ namespace boost {
2270
2572
 
2271
2573
  //!has_trivial_destructor_after_move<> == true_type
2272
2574
  //!specialization for optimizations
2273
- template <class Key, class T, class Compare, class Allocator>
2274
- struct has_trivial_destructor_after_move< boost::container::flat_multimap<Key, T, Compare, Allocator> >
2575
+ template <class Key, class T, class Compare, class AllocatorOrContainer>
2576
+ struct has_trivial_destructor_after_move< boost::container::flat_multimap<Key, T, Compare, AllocatorOrContainer> >
2275
2577
  {
2276
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
2277
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
2578
+ typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
2579
+ static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
2278
2580
  ::boost::has_trivial_destructor_after_move<pointer>::value &&
2279
2581
  ::boost::has_trivial_destructor_after_move<Compare>::value;
2280
2582
  };