passenger 6.0.15 → 6.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +46 -2
  3. data/build/integration_tests.rb +6 -6
  4. data/build/ruby_tests.rb +1 -1
  5. data/build/test_basics.rb +0 -1
  6. data/src/agent/Core/Config.h +1 -1
  7. data/src/agent/Core/Controller/Config.h +1 -1
  8. data/src/agent/Core/SpawningKit/PipeWatcher.h +18 -3
  9. data/src/agent/Watchdog/Config.h +1 -1
  10. data/src/cxx_supportlib/Constants.h +1 -1
  11. data/src/cxx_supportlib/vendor-modified/boost/align/aligned_alloc.hpp +1 -1
  12. data/src/cxx_supportlib/vendor-modified/boost/array.hpp +1 -1
  13. data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_executor.hpp +344 -0
  14. data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_handler.hpp +686 -0
  15. data/src/cxx_supportlib/vendor-modified/boost/asio/any_io_executor.hpp +56 -0
  16. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_allocator.hpp +81 -25
  17. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_cancellation_slot.hpp +68 -8
  18. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_executor.hpp +46 -11
  19. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +4 -4
  20. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +2 -2
  21. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_file.hpp +1 -1
  22. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_random_access_file.hpp +2 -2
  23. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +4 -4
  24. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_readable_pipe.hpp +2 -2
  25. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +2 -2
  26. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +3 -3
  27. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +2 -2
  28. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +3 -3
  29. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +4 -4
  30. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_file.hpp +2 -2
  31. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +2 -2
  32. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +2 -2
  33. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_writable_pipe.hpp +2 -2
  34. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_allocator.hpp +13 -3
  35. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_cancellation_slot.hpp +14 -3
  36. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +13 -3
  37. data/src/cxx_supportlib/vendor-modified/boost/asio/compose.hpp +30 -305
  38. data/src/cxx_supportlib/vendor-modified/boost/asio/consign.hpp +90 -0
  39. data/src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp +17 -18
  40. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +98 -24
  41. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/composed_work.hpp +330 -0
  42. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +81 -15
  43. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +4 -4
  44. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_work.hpp +19 -11
  45. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +37 -0
  46. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +3 -1
  47. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +1 -1
  48. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +10 -2
  49. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.hpp +14 -1
  50. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +18 -0
  51. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/utility.hpp +1 -2
  52. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/work_dispatcher.hpp +7 -3
  53. data/src/cxx_supportlib/vendor-modified/boost/asio/dispatch.hpp +4 -14
  54. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/allocator.hpp +22 -3
  55. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/any_executor.hpp +447 -142
  56. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking.hpp +57 -8
  57. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking_adaptation.hpp +51 -6
  58. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_execute.hpp +5 -0
  59. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_guarantee.hpp +41 -4
  60. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/connect.hpp +5 -0
  61. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context.hpp +13 -2
  62. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context_as.hpp +13 -2
  63. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_operation.hpp +4 -0
  64. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/execute.hpp +9 -2
  65. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/executor.hpp +11 -1
  66. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/mapping.hpp +52 -8
  67. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/occupancy.hpp +13 -2
  68. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/operation_state.hpp +5 -0
  69. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/outstanding_work.hpp +39 -6
  70. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver.hpp +5 -0
  71. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/relationship.hpp +39 -6
  72. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/schedule.hpp +5 -0
  73. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/scheduler.hpp +5 -0
  74. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/sender.hpp +5 -0
  75. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_done.hpp +5 -0
  76. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_error.hpp +5 -0
  77. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_value.hpp +5 -0
  78. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/start.hpp +5 -0
  79. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/submit.hpp +5 -0
  80. data/src/cxx_supportlib/vendor-modified/boost/asio/executor_work_guard.hpp +6 -9
  81. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_channel.hpp +3 -3
  82. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_concurrent_channel.hpp +3 -3
  83. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel_traits.hpp +70 -0
  84. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_composed.hpp +146 -0
  85. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/coro.hpp +35 -5
  86. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_handler.hpp +13 -3
  87. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_operation.hpp +7 -0
  88. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_service.hpp +180 -0
  89. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_completion_handler.hpp +171 -0
  90. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_promise_allocator.hpp +89 -66
  91. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/partial_promise.hpp +66 -45
  92. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/as_single.hpp +13 -3
  93. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/co_composed.hpp +1134 -0
  94. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/coro.hpp +130 -106
  95. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/parallel_group.hpp +377 -3
  96. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/promise.hpp +168 -29
  97. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_coro.hpp +149 -203
  98. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_promise.hpp +68 -0
  99. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/parallel_group.hpp +256 -0
  100. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/promise.hpp +76 -80
  101. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_coro.hpp +40 -14
  102. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_promise.hpp +113 -0
  103. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_completion_executor.ipp +132 -0
  104. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_io_executor.ipp +12 -0
  105. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/append.hpp +12 -3
  106. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/as_tuple.hpp +12 -3
  107. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +25 -6
  108. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +25 -6
  109. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/co_spawn.hpp +34 -45
  110. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +28 -6
  111. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/consign.hpp +204 -0
  112. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/defer.hpp +33 -1
  113. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/deferred.hpp +13 -3
  114. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/dispatch.hpp +21 -9
  115. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +1 -1
  116. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/post.hpp +33 -1
  117. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/prepend.hpp +12 -3
  118. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +40 -9
  119. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +27 -6
  120. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +104 -24
  121. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/redirect_error.hpp +12 -3
  122. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +70 -15
  123. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +1 -0
  124. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +25 -0
  125. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +38 -30
  126. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +27 -6
  127. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context.hpp +0 -13
  128. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.ipp +3 -1
  129. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.ipp +3 -1
  130. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +2 -2
  131. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +2 -2
  132. data/src/cxx_supportlib/vendor-modified/boost/asio/post.hpp +17 -18
  133. data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +3 -1
  134. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +13 -3
  135. data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +11 -7
  136. data/src/cxx_supportlib/vendor-modified/boost/asio/system_executor.hpp +0 -13
  137. data/src/cxx_supportlib/vendor-modified/boost/asio/thread_pool.hpp +23 -18
  138. data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +1 -1
  139. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +2 -2
  140. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_overlapped_handle.hpp +1 -1
  141. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +2 -2
  142. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +2 -2
  143. data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +4 -0
  144. data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +1 -1
  145. data/src/cxx_supportlib/vendor-modified/boost/chrono/config.hpp +1 -0
  146. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/chrono.hpp +4 -4
  147. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/scan_keyword.hpp +4 -2
  148. data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +2 -2
  149. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_io.hpp +3 -3
  150. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_put.hpp +5 -5
  151. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_units.hpp +2 -2
  152. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_io.hpp +2 -2
  153. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/ios_base_state_ptr.hpp +7 -7
  154. data/src/cxx_supportlib/vendor-modified/boost/chrono/time_point.hpp +1 -1
  155. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/details.hpp +5 -1
  156. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +10 -3
  157. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang_version.hpp +9 -3
  158. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +9 -3
  159. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +6 -0
  160. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +8 -0
  161. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +4 -0
  162. data/src/cxx_supportlib/vendor-modified/boost/config/detail/suffix.hpp +33 -0
  163. data/src/cxx_supportlib/vendor-modified/boost/config/header_deprecated.hpp +1 -1
  164. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +9 -0
  165. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +4 -2
  166. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +1 -1
  167. data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +29 -0
  168. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +13 -13
  169. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +80 -95
  170. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +10 -0
  171. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_end.hpp +3 -0
  172. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +738 -34
  173. data/src/cxx_supportlib/vendor-modified/boost/container/detail/destroyers.hpp +38 -10
  174. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +1 -0
  175. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterator.hpp +2 -0
  176. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +3 -4
  177. data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +1150 -1213
  178. data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +1 -1
  179. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +104 -12
  180. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +1 -0
  181. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +11 -1
  182. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +31 -331
  183. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_mix.hpp +113 -0
  184. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_range.hpp +173 -0
  185. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_tuple.hpp +133 -0
  186. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +461 -566
  187. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash_fwd.hpp +24 -24
  188. data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_contiguous_range.hpp +91 -0
  189. data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_described_class.hpp +38 -0
  190. data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_range.hpp +73 -0
  191. data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_unordered_range.hpp +39 -0
  192. data/src/cxx_supportlib/vendor-modified/boost/core/bit.hpp +32 -4
  193. data/src/cxx_supportlib/vendor-modified/boost/core/detail/string_view.hpp +16 -0
  194. data/src/cxx_supportlib/vendor-modified/boost/core/empty_value.hpp +16 -16
  195. data/src/cxx_supportlib/vendor-modified/boost/core/fclose_deleter.hpp +46 -0
  196. data/src/cxx_supportlib/vendor-modified/boost/date_time/date.hpp +1 -1
  197. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/formatters.hpp +3 -3
  198. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/formatters_limited.hpp +3 -3
  199. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_date.hpp +12 -13
  200. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/parsers.hpp +2 -2
  201. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.ipp +2 -2
  202. data/src/cxx_supportlib/vendor-modified/boost/date_time/iso_format.hpp +13 -13
  203. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_date_time.hpp +2 -2
  204. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_formatters.hpp +4 -4
  205. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_formatters_limited.hpp +2 -2
  206. data/src/cxx_supportlib/vendor-modified/boost/date_time/special_values_parser.hpp +1 -1
  207. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_facet.hpp +1 -1
  208. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_parsing.hpp +2 -2
  209. data/src/cxx_supportlib/vendor-modified/boost/describe/bases.hpp +50 -0
  210. data/src/cxx_supportlib/vendor-modified/boost/describe/detail/config.hpp +40 -0
  211. data/src/cxx_supportlib/vendor-modified/boost/describe/detail/cx_streq.hpp +30 -0
  212. data/src/cxx_supportlib/vendor-modified/boost/describe/detail/void_t.hpp +32 -0
  213. data/src/cxx_supportlib/vendor-modified/boost/describe/members.hpp +159 -0
  214. data/src/cxx_supportlib/vendor-modified/boost/describe/modifiers.hpp +33 -0
  215. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree_algorithms.hpp +9 -9
  216. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree_algorithms.hpp +45 -45
  217. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/any_node_and_algorithms.hpp +8 -8
  218. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/bstree_algorithms_base.hpp +37 -38
  219. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +16 -0
  220. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +1 -1
  221. data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +145 -90
  222. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pack_options.hpp +2 -0
  223. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +7 -7
  224. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree_algorithms.hpp +5 -5
  225. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree_algorithms.hpp +11 -9
  226. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +7 -7
  227. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_facade.hpp +106 -25
  228. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +1 -1
  229. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +8 -5
  230. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +1 -1
  231. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +4 -2
  232. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/pdqsort.hpp +2 -1
  233. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +8 -4
  234. data/src/cxx_supportlib/vendor-modified/boost/mp11/bind.hpp +111 -0
  235. data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
  236. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/int_float_mixture.hpp +5 -5
  237. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/sign_mixture.hpp +5 -5
  238. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/udt_builtin_mixture.hpp +5 -5
  239. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/has_opt.hpp +6 -2
  240. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp +11 -2
  241. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +1 -1
  242. data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +7 -1
  243. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category.hpp +2 -2
  244. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category_impl.hpp +10 -1
  245. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_code.hpp +38 -43
  246. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_condition.hpp +52 -0
  247. data/src/cxx_supportlib/vendor-modified/boost/throw_exception.hpp +1 -1
  248. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_ptr_helper.hpp +27 -27
  249. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp +27 -27
  250. data/src/cxx_supportlib/vendor-modified/boost/type_traits/intrinsics.hpp +22 -8
  251. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fca.hpp +37 -7
  252. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa.hpp +1921 -0
  253. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +66 -82
  254. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/prime_fmod.hpp +6 -0
  255. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/type_traits.hpp +109 -0
  256. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/xmx.hpp +75 -0
  257. data/src/cxx_supportlib/vendor-modified/boost/unordered/hash_traits.hpp +45 -0
  258. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +732 -0
  259. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map_fwd.hpp +49 -0
  260. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +586 -0
  261. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set_fwd.hpp +49 -0
  262. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +166 -66
  263. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +145 -28
  264. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  265. data/src/cxx_supportlib/vendor-modified/jsoncpp/json-forwards.h +143 -261
  266. data/src/cxx_supportlib/vendor-modified/jsoncpp/json.h +763 -947
  267. data/src/cxx_supportlib/vendor-modified/jsoncpp/jsoncpp.cpp +1477 -1487
  268. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/md5.hpp +1 -1
  269. data/src/ruby_native_extension/extconf.rb +1 -1
  270. data/src/ruby_supportlib/phusion_passenger/packaging.rb +1 -0
  271. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +3 -2
  272. data/src/ruby_supportlib/phusion_passenger/platform_info/binary_compatibility.rb +1 -1
  273. data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +5 -5
  274. data/src/ruby_supportlib/phusion_passenger.rb +5 -5
  275. metadata +36 -19
  276. data/src/cxx_supportlib/vendor-modified/boost/align/align.hpp +0 -19
  277. data/src/cxx_supportlib/vendor-modified/boost/align/alignment_of.hpp +0 -54
  278. data/src/cxx_supportlib/vendor-modified/boost/align/alignment_of_forward.hpp +0 -20
  279. data/src/cxx_supportlib/vendor-modified/boost/align/detail/align_cxx11.hpp +0 -21
  280. data/src/cxx_supportlib/vendor-modified/boost/align/detail/aligned_alloc.hpp +0 -52
  281. data/src/cxx_supportlib/vendor-modified/boost/align/detail/alignment_of.hpp +0 -31
  282. data/src/cxx_supportlib/vendor-modified/boost/align/detail/alignment_of_cxx11.hpp +0 -23
  283. data/src/cxx_supportlib/vendor-modified/boost/align/detail/element_type.hpp +0 -91
  284. data/src/cxx_supportlib/vendor-modified/boost/align/detail/integral_constant.hpp +0 -53
  285. data/src/cxx_supportlib/vendor-modified/boost/align/detail/min_size.hpp +0 -26
  286. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/completion_handler_erasure.hpp +0 -196
  287. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/compose.hpp +0 -709
  288. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/float_functions.hpp +0 -336
  289. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_float.hpp +0 -271
  290. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp +0 -62
  291. data/src/cxx_supportlib/vendor-modified/boost/container_hash/extensions.hpp +0 -361
  292. data/src/cxx_supportlib/vendor-modified/boost/detail/container_fwd.hpp +0 -157
@@ -353,7 +353,7 @@ struct vector_alloc_holder
353
353
  , m_size(static_cast<stored_size_type>(initial_size))
354
354
  , m_capacity()
355
355
  {
356
- if (initial_size > size_type(-1)){
356
+ if (BOOST_UNLIKELY(initial_size > size_type(-1))){
357
357
  boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
358
358
  }
359
359
  else if(initial_size){
@@ -373,7 +373,7 @@ struct vector_alloc_holder
373
373
  , m_size(static_cast<stored_size_type>(initial_size))
374
374
  , m_capacity()
375
375
  {
376
- if (initial_size > size_type(-1)){
376
+ if (BOOST_UNLIKELY(initial_size > size_type(-1))){
377
377
  boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
378
378
  }
379
379
  else if(initial_size){
@@ -437,11 +437,11 @@ struct vector_alloc_holder
437
437
  return this->priv_allocation_command(alloc_version(), command, limit_size, prefer_in_recvd_out_size, reuse);
438
438
  }
439
439
 
440
- pointer allocate(size_type n)
440
+ BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type n)
441
441
  {
442
442
  const size_type max_alloc = allocator_traits_type::max_size(this->alloc());
443
443
  const size_type max = max_alloc <= stored_size_type(-1) ? max_alloc : stored_size_type(-1);
444
- if ( max < n )
444
+ if (BOOST_UNLIKELY(max < n) )
445
445
  boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
446
446
 
447
447
  return allocator_traits_type::allocate(this->alloc(), n);
@@ -544,7 +544,7 @@ struct vector_alloc_holder
544
544
  BOOST_ASSERT( (command & allocate_new));
545
545
  BOOST_ASSERT(!(command & nothrow_allocation));
546
546
  //First detect overflow on smaller stored_size_types
547
- if (limit_size > stored_size_type(-1)){
547
+ if (BOOST_UNLIKELY(limit_size > stored_size_type(-1))){
548
548
  boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
549
549
  }
550
550
  (clamp_by_stored_size_type<size_type>)(prefer_in_recvd_out_size, stored_size_type());
@@ -559,7 +559,7 @@ struct vector_alloc_holder
559
559
  pointer &reuse)
560
560
  {
561
561
  //First detect overflow on smaller stored_size_types
562
- if (limit_size > stored_size_type(-1)){
562
+ if (BOOST_UNLIKELY(limit_size > stored_size_type(-1))){
563
563
  boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
564
564
  }
565
565
  (clamp_by_stored_size_type<size_type>)(prefer_in_recvd_out_size, stored_size_type());
@@ -724,6 +724,7 @@ struct vector_alloc_holder<Allocator, StoredSizeType, version_0>
724
724
  };
725
725
 
726
726
  struct growth_factor_60;
727
+ struct growth_factor_100;
727
728
 
728
729
  template<class Options, class AllocatorSizeType>
729
730
  struct get_vector_opt
@@ -1296,7 +1297,7 @@ private:
1296
1297
  //For Fwd iterators the standard only requires EmplaceConstructible and assignable from *first
1297
1298
  //so we can't do any backwards allocation
1298
1299
  const it_size_type sz = boost::container::iterator_udistance(first, last);
1299
- if (sz > size_type(-1)){
1300
+ if (BOOST_UNLIKELY(sz > size_type(-1))){
1300
1301
  boost::container::throw_length_error("vector::assign, FwdIt's max length reached");
1301
1302
  }
1302
1303
 
@@ -1819,7 +1820,7 @@ private:
1819
1820
  return *p;
1820
1821
  }
1821
1822
  else{
1822
- typedef dtl::insert_emplace_proxy<allocator_type, T*, Args...> proxy_t;
1823
+ typedef dtl::insert_emplace_proxy<allocator_type, Args...> proxy_t;
1823
1824
  return *this->priv_insert_forward_range_no_capacity
1824
1825
  (p, 1, proxy_t(::boost::forward<Args>(args)...), alloc_version());
1825
1826
  }
@@ -1860,7 +1861,7 @@ private:
1860
1861
  {
1861
1862
  BOOST_ASSERT(this->priv_in_range_or_end(position));
1862
1863
  //Just call more general insert(pos, size, value) and return iterator
1863
- typedef dtl::insert_emplace_proxy<allocator_type, T*, Args...> proxy_t;
1864
+ typedef dtl::insert_emplace_proxy<allocator_type, Args...> proxy_t;
1864
1865
  return this->priv_insert_forward_range( vector_iterator_get_ptr(position), 1
1865
1866
  , proxy_t(::boost::forward<Args>(args)...));
1866
1867
  }
@@ -1879,7 +1880,7 @@ private:
1879
1880
  return *p;\
1880
1881
  }\
1881
1882
  else{\
1882
- typedef dtl::insert_emplace_proxy_arg##N<allocator_type, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> proxy_t;\
1883
+ typedef dtl::insert_emplace_proxy_arg##N<allocator_type BOOST_MOVE_I##N BOOST_MOVE_TARG##N> proxy_t;\
1883
1884
  return *this->priv_insert_forward_range_no_capacity\
1884
1885
  ( p, 1, proxy_t(BOOST_MOVE_FWD##N), alloc_version());\
1885
1886
  }\
@@ -1901,7 +1902,7 @@ private:
1901
1902
  BOOST_CONTAINER_FORCEINLINE iterator emplace(const_iterator pos BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
1902
1903
  {\
1903
1904
  BOOST_ASSERT(this->priv_in_range_or_end(pos));\
1904
- typedef dtl::insert_emplace_proxy_arg##N<allocator_type, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> proxy_t;\
1905
+ typedef dtl::insert_emplace_proxy_arg##N<allocator_type BOOST_MOVE_I##N BOOST_MOVE_TARG##N> proxy_t;\
1905
1906
  return this->priv_insert_forward_range(vector_iterator_get_ptr(pos), 1, proxy_t(BOOST_MOVE_FWD##N));\
1906
1907
  }\
1907
1908
  //
@@ -1967,7 +1968,7 @@ private:
1967
1968
  BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, size_type n, const T& x)
1968
1969
  {
1969
1970
  BOOST_ASSERT(this->priv_in_range_or_end(p));
1970
- dtl::insert_n_copies_proxy<allocator_type, T*> proxy(x);
1971
+ dtl::insert_n_copies_proxy<allocator_type> proxy(x);
1971
1972
  return this->priv_insert_forward_range(vector_iterator_get_ptr(p), n, proxy);
1972
1973
  }
1973
1974
 
@@ -2015,11 +2016,11 @@ private:
2015
2016
  typedef typename iter_size<FwdIt>::type it_size_type;
2016
2017
  BOOST_ASSERT(this->priv_in_range_or_end(pos));
2017
2018
  const it_size_type sz = boost::container::iterator_udistance(first, last);
2018
- if (sz > size_type(-1)){
2019
+ if (BOOST_UNLIKELY(sz > size_type(-1))){
2019
2020
  boost::container::throw_length_error("vector::insert, FwdIt's max length reached");
2020
2021
  }
2021
2022
 
2022
- dtl::insert_range_proxy<allocator_type, FwdIt, T*> proxy(first);
2023
+ dtl::insert_range_proxy<allocator_type, FwdIt> proxy(first);
2023
2024
  return this->priv_insert_forward_range(vector_iterator_get_ptr(pos), static_cast<size_type>(sz), proxy);
2024
2025
  }
2025
2026
  #endif
@@ -2047,7 +2048,7 @@ private:
2047
2048
  BOOST_ASSERT(dtl::is_input_iterator<InIt>::value ||
2048
2049
  num == boost::container::iterator_udistance(first, last));
2049
2050
  (void)last;
2050
- dtl::insert_range_proxy<allocator_type, InIt, T*> proxy(first);
2051
+ dtl::insert_range_proxy<allocator_type, InIt> proxy(first);
2051
2052
  return this->priv_insert_forward_range(vector_iterator_get_ptr(pos), num, proxy);
2052
2053
  }
2053
2054
  #endif
@@ -2591,9 +2592,9 @@ private:
2591
2592
  BOOST_CONTAINER_FORCEINLINE void priv_move_to_new_buffer(size_type, version_0)
2592
2593
  { alloc_holder_t::on_capacity_overflow(); }
2593
2594
 
2594
- BOOST_CONTAINER_FORCEINLINE dtl::insert_range_proxy<allocator_type, boost::move_iterator<T*>, T*> priv_dummy_empty_proxy()
2595
+ BOOST_CONTAINER_FORCEINLINE dtl::insert_range_proxy<allocator_type, boost::move_iterator<T*> > priv_dummy_empty_proxy()
2595
2596
  {
2596
- return dtl::insert_range_proxy<allocator_type, boost::move_iterator<T*>, T*>
2597
+ return dtl::insert_range_proxy<allocator_type, boost::move_iterator<T*> >
2597
2598
  (::boost::make_move_iterator((T *)0));
2598
2599
  }
2599
2600
 
@@ -2688,14 +2689,14 @@ private:
2688
2689
  BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator, ::boost::move_detail::nat)
2689
2690
  { return iterator(); }
2690
2691
 
2691
- BOOST_CONTAINER_FORCEINLINE dtl::insert_n_copies_proxy<allocator_type, T*> priv_resize_proxy(const T &x)
2692
- { return dtl::insert_n_copies_proxy<allocator_type, T*>(x); }
2692
+ BOOST_CONTAINER_FORCEINLINE dtl::insert_n_copies_proxy<allocator_type> priv_resize_proxy(const T &x)
2693
+ { return dtl::insert_n_copies_proxy<allocator_type>(x); }
2693
2694
 
2694
- BOOST_CONTAINER_FORCEINLINE dtl::insert_default_initialized_n_proxy<allocator_type, T*> priv_resize_proxy(default_init_t)
2695
- { return dtl::insert_default_initialized_n_proxy<allocator_type, T*>(); }
2695
+ BOOST_CONTAINER_FORCEINLINE dtl::insert_default_initialized_n_proxy<allocator_type> priv_resize_proxy(default_init_t)
2696
+ { return dtl::insert_default_initialized_n_proxy<allocator_type>(); }
2696
2697
 
2697
- BOOST_CONTAINER_FORCEINLINE dtl::insert_value_initialized_n_proxy<allocator_type, T*> priv_resize_proxy(value_init_t)
2698
- { return dtl::insert_value_initialized_n_proxy<allocator_type, T*>(); }
2698
+ BOOST_CONTAINER_FORCEINLINE dtl::insert_value_initialized_n_proxy<allocator_type> priv_resize_proxy(value_init_t)
2699
+ { return dtl::insert_value_initialized_n_proxy<allocator_type>(); }
2699
2700
 
2700
2701
  BOOST_CONTAINER_FORCEINLINE void priv_shrink_to_fit(version_0) BOOST_NOEXCEPT_OR_NOTHROW
2701
2702
  {}
@@ -2986,7 +2987,8 @@ private:
2986
2987
  }
2987
2988
 
2988
2989
  template <class InsertionProxy>
2989
- BOOST_CONTAINER_FORCEINLINE void priv_insert_forward_range_expand_forward(T* const raw_pos, const size_type n, InsertionProxy insert_range_proxy, dtl::false_type)
2990
+ BOOST_CONTAINER_FORCEINLINE void priv_insert_forward_range_expand_forward
2991
+ (T* const raw_pos, const size_type n, InsertionProxy insert_range_proxy, dtl::false_type)
2990
2992
  {
2991
2993
  //There is enough memory
2992
2994
  boost::container::expand_forward_and_insert_alloc
@@ -3024,321 +3026,19 @@ private:
3024
3026
  (T* const new_start, const size_type new_capacity,
3025
3027
  T* const pos, const size_type n, InsertionProxy insert_range_proxy)
3026
3028
  {
3027
- //n can be zero to just expand capacity
3028
- //Backup old data
3029
- T* const old_start = this->priv_raw_begin();
3029
+ T* const old_start = this->priv_raw_begin();
3030
3030
  const size_type old_size = this->m_holder.m_size;
3031
- T* const old_finish = old_start + old_size;
3032
- allocator_type &a = this->m_holder.alloc();
3031
+ allocator_type& a = this->m_holder.alloc();
3033
3032
 
3034
3033
  //Update the vector buffer information to a safe state
3035
3034
  this->m_holder.start(new_start);
3036
3035
  this->m_holder.capacity(new_capacity);
3037
3036
  this->m_holder.m_size = 0;
3038
3037
 
3039
- //We can have 8 possibilities:
3040
- const size_type elemsbefore = static_cast<size_type>(pos - old_start);
3041
- const size_type s_before = static_cast<size_type>(old_start - new_start);
3042
- const size_type before_plus_new = size_type(elemsbefore + n);
3043
-
3044
- typedef typename value_traits::ArrayDestructor array_destructor_t;
3045
-
3046
- //If anything goes wrong, this object will destroy
3047
- //all the old objects to fulfill previous vector state
3048
- array_destructor_t old_values_destroyer(old_start, a, old_size);
3049
- //Check if s_before is big enough to hold the beginning of old data + new data
3050
- if(s_before >= before_plus_new){
3051
- //Copy first old values before pos, after that the new objects
3052
- T *const new_elem_pos =
3053
- ::boost::container::uninitialized_move_alloc(a, old_start, pos, new_start);
3054
- this->m_holder.set_stored_size(elemsbefore);
3055
- insert_range_proxy.uninitialized_copy_n_and_update(a, new_elem_pos, n);
3056
- this->m_holder.set_stored_size(before_plus_new);
3057
- const size_type new_size = size_type(old_size + n);
3058
- //Check if s_before is so big that even copying the old data + new data
3059
- //there is a gap between the new data and the old data
3060
- if(s_before >= new_size){
3061
- //Old situation:
3062
- // _________________________________________________________
3063
- //| raw_mem | old_begin | old_end |
3064
- //| __________________________________|___________|_________|
3065
- //
3066
- //New situation:
3067
- // _________________________________________________________
3068
- //| old_begin | new | old_end | raw_mem |
3069
- //|___________|__________|_________|________________________|
3070
- //
3071
- //Now initialize the rest of memory with the last old values
3072
- if(before_plus_new != new_size){ //Special case to avoid operations in back insertion
3073
- ::boost::container::uninitialized_move_alloc(a, pos, old_finish, new_start + before_plus_new);
3074
- //All new elements correctly constructed, avoid new element destruction
3075
- this->m_holder.set_stored_size(new_size);
3076
- }
3077
- //Old values destroyed automatically with "old_values_destroyer"
3078
- //when "old_values_destroyer" goes out of scope unless the have trivial
3079
- //destructor after move.
3080
- BOOST_IF_CONSTEXPR(value_traits::trivial_dctr_after_move)
3081
- old_values_destroyer.release();
3082
- }
3083
- //s_before is so big that divides old_end
3084
- else{
3085
- //Old situation:
3086
- // __________________________________________________
3087
- //| raw_mem | old_begin | old_end |
3088
- //| ___________________________|___________|_________|
3089
- //
3090
- //New situation:
3091
- // __________________________________________________
3092
- //| old_begin | new | old_end | raw_mem |
3093
- //|___________|__________|_________|_________________|
3094
- //
3095
- //Now initialize the rest of memory with the last old values
3096
- //All new elements correctly constructed, avoid new element destruction
3097
- BOOST_IF_CONSTEXPR(!value_traits::trivial_dctr){
3098
- const size_type raw_gap = s_before - before_plus_new;
3099
- //Now initialize the rest of s_before memory with the
3100
- //first of elements after new values
3101
- ::boost::container::uninitialized_move_alloc_n(a, pos, raw_gap, new_start + before_plus_new);
3102
- //Now we have a contiguous buffer so program trailing element destruction
3103
- //and update size to the final size.
3104
- old_values_destroyer.shrink_forward(new_size-s_before);
3105
- this->m_holder.set_stored_size(new_size);
3106
- //Now move remaining last objects in the old buffer begin
3107
- T * const remaining_pos = pos + raw_gap;
3108
- if(remaining_pos != old_start){ //Make sure data has to be moved
3109
- ::boost::container::move(remaining_pos, old_finish, old_start);
3110
- }
3111
- //Once moved, avoid calling the destructors if trivial after move
3112
- BOOST_IF_CONSTEXPR(value_traits::trivial_dctr_after_move){
3113
- old_values_destroyer.release();
3114
- }
3115
- }
3116
- else{ //If trivial destructor, we can uninitialized copy + copy in a single uninitialized copy
3117
- ::boost::container::uninitialized_move_alloc_n
3118
- (a, pos, static_cast<size_type>(old_finish - pos), new_start + before_plus_new);
3119
- this->m_holder.set_stored_size(new_size);
3120
- old_values_destroyer.release();
3121
- }
3122
- }
3123
- }
3124
- else{
3125
- //Check if we have to do the insertion in two phases
3126
- //since maybe s_before is not big enough and
3127
- //the buffer was expanded both sides
3128
- //
3129
- //Old situation:
3130
- // _________________________________________________
3131
- //| raw_mem | old_begin + old_end | raw_mem |
3132
- //|_________|_____________________|_________________|
3133
- //
3134
- //New situation with do_after:
3135
- // _________________________________________________
3136
- //| old_begin + new + old_end | raw_mem |
3137
- //|___________________________________|_____________|
3138
- //
3139
- //New without do_after:
3140
- // _________________________________________________
3141
- //| old_begin + new + old_end | raw_mem |
3142
- //|____________________________|____________________|
3143
- //
3144
- const bool do_after = n > s_before;
3145
-
3146
- //Now we can have two situations: the raw_mem of the
3147
- //beginning divides the old_begin, or the new elements:
3148
- if (s_before <= elemsbefore) {
3149
- //The raw memory divides the old_begin group:
3150
- //
3151
- //If we need two phase construction (do_after)
3152
- //new group is divided in new = new_beg + new_end groups
3153
- //In this phase only new_beg will be inserted
3154
- //
3155
- //Old situation:
3156
- // _________________________________________________
3157
- //| raw_mem | old_begin | old_end | raw_mem |
3158
- //|_________|___________|_________|_________________|
3159
- //
3160
- //New situation with do_after(1):
3161
- //This is not definitive situation, the second phase
3162
- //will include
3163
- // _________________________________________________
3164
- //| old_begin | new_beg | old_end | raw_mem |
3165
- //|___________|_________|_________|_________________|
3166
- //
3167
- //New situation without do_after:
3168
- // _________________________________________________
3169
- //| old_begin | new | old_end | raw_mem |
3170
- //|___________|_____|_________|_____________________|
3171
- //
3172
- //Copy the first part of old_begin to raw_mem
3173
- ::boost::container::uninitialized_move_alloc_n(a, old_start, s_before, new_start);
3174
- //The buffer is all constructed until old_end,
3175
- //so program trailing destruction and assign final size
3176
- //if !do_after, s_before+n otherwise.
3177
- size_type new_1st_range;
3178
- if(do_after){
3179
- new_1st_range = s_before;
3180
- //release destroyer and update size
3181
- old_values_destroyer.release();
3182
- }
3183
- else{
3184
- new_1st_range = n;
3185
- BOOST_IF_CONSTEXPR(value_traits::trivial_dctr_after_move){
3186
- old_values_destroyer.release();
3187
- }
3188
- else{
3189
- old_values_destroyer.shrink_forward(old_size - (s_before - n));
3190
- }
3191
- }
3192
- this->m_holder.set_stored_size(size_type(old_size + new_1st_range));
3193
- //Now copy the second part of old_begin overwriting itself
3194
- T *const next = ::boost::container::move(old_start + s_before, pos, old_start);
3195
- //Now copy the new_beg elements
3196
- insert_range_proxy.copy_n_and_update(a, next, new_1st_range);
3197
-
3198
- //If there is no after work and the last old part needs to be moved to front, do it
3199
- if(!do_after && (n != s_before)){
3200
- //Now displace old_end elements
3201
- ::boost::container::move(pos, old_finish, next + new_1st_range);
3202
- }
3203
- }
3204
- else {
3205
- //If we have to expand both sides,
3206
- //we will play if the first new values so
3207
- //calculate the upper bound of new values
3208
-
3209
- //The raw memory divides the new elements
3210
- //
3211
- //If we need two phase construction (do_after)
3212
- //new group is divided in new = new_beg + new_end groups
3213
- //In this phase only new_beg will be inserted
3214
- //
3215
- //Old situation:
3216
- // _______________________________________________________
3217
- //| raw_mem | old_begin | old_end | raw_mem |
3218
- //|_______________|___________|_________|_________________|
3219
- //
3220
- //New situation with do_after():
3221
- // ____________________________________________________
3222
- //| old_begin | new_beg | old_end | raw_mem |
3223
- //|___________|_______________|_________|______________|
3224
- //
3225
- //New situation without do_after:
3226
- // ______________________________________________________
3227
- //| old_begin | new | old_end | raw_mem |
3228
- //|___________|_____|_________|__________________________|
3229
- //
3230
- //First copy whole old_begin and part of new to raw_mem
3231
- T * const new_pos = ::boost::container::uninitialized_move_alloc
3232
- (a, old_start, pos, new_start);
3233
- this->m_holder.set_stored_size(elemsbefore);
3234
- const size_type mid_n = size_type(s_before - elemsbefore);
3235
- insert_range_proxy.uninitialized_copy_n_and_update(a, new_pos, mid_n);
3236
- //The buffer is all constructed until old_end,
3237
- //release destroyer
3238
- this->m_holder.set_stored_size(size_type(old_size + s_before));
3239
- old_values_destroyer.release();
3240
-
3241
- if(do_after){
3242
- //Copy new_beg part
3243
- insert_range_proxy.copy_n_and_update(a, old_start, elemsbefore);
3244
- }
3245
- else{
3246
- //Copy all new elements
3247
- const size_type rest_new = size_type(n - mid_n);
3248
- insert_range_proxy.copy_n_and_update(a, old_start, rest_new);
3249
-
3250
- T* const move_start = old_start + rest_new;
3251
- //Displace old_end, but make sure data has to be moved
3252
- T* const move_end = move_start != pos ? ::boost::container::move(pos, old_finish, move_start)
3253
- : old_finish;
3254
- (void)move_end; //To avoid warnings of unused initialization for move_end in case
3255
- //trivial_dctr_after_move is true
3256
- //Destroy remaining moved elements from old_end except if they
3257
- //have trivial destructor after being moved
3258
- const size_type n_destroy = size_type(s_before - n);
3259
- BOOST_IF_CONSTEXPR(!value_traits::trivial_dctr_after_move){
3260
- boost::container::destroy_alloc_n(a, move_end, n_destroy);
3261
- }
3262
- this->m_holder.dec_stored_size(n_destroy);
3263
- }
3264
- }
3038
+ expand_backward_forward_and_insert_alloc(old_start, old_size, new_start, pos, n, insert_range_proxy, a);
3265
3039
 
3266
- //This is only executed if two phase construction is needed
3267
- if(do_after){
3268
- //The raw memory divides the new elements
3269
- //
3270
- //Old situation:
3271
- // ______________________________________________________
3272
- //| raw_mem | old_begin | old_end | raw_mem |
3273
- //|______________|___________|____________|______________|
3274
- //
3275
- //New situation with do_after(1):
3276
- // _______________________________________________________
3277
- //| old_begin + new_beg | new_end |old_end | raw_mem |
3278
- //|__________________________|_________|________|_________|
3279
- //
3280
- //New situation with do_after(2):
3281
- // ______________________________________________________
3282
- //| old_begin + new | old_end |raw |
3283
- //|_______________________________________|_________|____|
3284
- //
3285
- const size_type n_after = size_type(n - s_before);
3286
- const size_type elemsafter = size_type(old_size - elemsbefore);
3287
-
3288
- //We can have two situations:
3289
- if (elemsafter >= n_after){
3290
- //The raw_mem from end will divide displaced old_end
3291
- //
3292
- //Old situation:
3293
- // ______________________________________________________
3294
- //| raw_mem | old_begin | old_end | raw_mem |
3295
- //|______________|___________|____________|______________|
3296
- //
3297
- //New situation with do_after(1):
3298
- // _______________________________________________________
3299
- //| old_begin + new_beg | new_end |old_end | raw_mem |
3300
- //|__________________________|_________|________|_________|
3301
- //
3302
- //First copy the part of old_end raw_mem
3303
- T* finish_n = old_finish - n_after;
3304
- ::boost::container::uninitialized_move_alloc(a, finish_n, old_finish, old_finish);
3305
- this->m_holder.inc_stored_size(n_after);
3306
- //Displace the rest of old_end to the new position
3307
- boost::container::move_backward(pos, finish_n, old_finish);
3308
- //Now overwrite with new_end
3309
- //The new_end part is [first + (n - n_after), last)
3310
- insert_range_proxy.copy_n_and_update(a, pos, n_after);
3311
- }
3312
- else {
3313
- //The raw_mem from end will divide new_end part
3314
- //
3315
- //Old situation:
3316
- // _____________________________________________________________
3317
- //| raw_mem | old_begin | old_end | raw_mem |
3318
- //|______________|___________|____________|_____________________|
3319
- //
3320
- //New situation with do_after(2):
3321
- // _____________________________________________________________
3322
- //| old_begin + new_beg | new_end |old_end | raw_mem |
3323
- //|__________________________|_______________|________|_________|
3324
-
3325
- //First initialize data in raw memory
3326
- const size_type mid_last_dist = size_type(n_after - elemsafter);
3327
-
3328
- //Copy to the old_end part to the uninitialized zone leaving a gap.
3329
- ::boost::container::uninitialized_move_alloc(a, pos, old_finish, old_finish + mid_last_dist);
3330
-
3331
- array_destructor_t old_end_destroyer(old_finish + mid_last_dist, a, static_cast<size_type>(old_finish - pos));
3332
-
3333
- //Copy the first part to the already constructed old_end zone
3334
- insert_range_proxy.copy_n_and_update(a, pos, elemsafter);
3335
- //Copy the rest to the uninitialized zone filling the gap
3336
- insert_range_proxy.uninitialized_copy_n_and_update(a, old_finish, mid_last_dist);
3337
- this->m_holder.inc_stored_size(n_after);
3338
- old_end_destroyer.release();
3339
- }
3340
- }
3341
- }
3040
+ //Update the vector buffer information to a safe state
3041
+ this->m_holder.m_size = stored_size_type(old_size + n);
3342
3042
  }
3343
3043
 
3344
3044
  void priv_throw_if_out_of_range(size_type n) const
@@ -0,0 +1,113 @@
1
+ // Copyright 2022 Peter Dimov
2
+ // Distributed under the Boost Software License, Version 1.0.
3
+ // https://www.boost.org/LICENSE_1_0.txt
4
+
5
+ #ifndef BOOST_HASH_DETAIL_HASH_MIX_HPP
6
+ #define BOOST_HASH_DETAIL_HASH_MIX_HPP
7
+
8
+ #include <boost/cstdint.hpp>
9
+ #include <cstddef>
10
+ #include <climits>
11
+
12
+ namespace boost
13
+ {
14
+ namespace hash_detail
15
+ {
16
+
17
+ template<std::size_t Bits> struct hash_mix_impl;
18
+
19
+ // hash_mix for 64 bit size_t
20
+ //
21
+ // The general "xmxmx" form of state of the art 64 bit mixers originates
22
+ // from Murmur3 by Austin Appleby, which uses the following function as
23
+ // its "final mix":
24
+ //
25
+ // k ^= k >> 33;
26
+ // k *= 0xff51afd7ed558ccd;
27
+ // k ^= k >> 33;
28
+ // k *= 0xc4ceb9fe1a85ec53;
29
+ // k ^= k >> 33;
30
+ //
31
+ // (https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp)
32
+ //
33
+ // It has subsequently been improved multiple times by different authors
34
+ // by changing the constants. The most well known improvement is the
35
+ // so-called "variant 13" function by David Stafford:
36
+ //
37
+ // k ^= k >> 30;
38
+ // k *= 0xbf58476d1ce4e5b9;
39
+ // k ^= k >> 27;
40
+ // k *= 0x94d049bb133111eb;
41
+ // k ^= k >> 31;
42
+ //
43
+ // (https://zimbry.blogspot.com/2011/09/better-bit-mixing-improving-on.html)
44
+ //
45
+ // This mixing function is used in the splitmix64 RNG:
46
+ // http://xorshift.di.unimi.it/splitmix64.c
47
+ //
48
+ // We use Jon Maiga's implementation from
49
+ // http://jonkagstrom.com/mx3/mx3_rev2.html
50
+ //
51
+ // x ^= x >> 32;
52
+ // x *= 0xe9846af9b1a615d;
53
+ // x ^= x >> 32;
54
+ // x *= 0xe9846af9b1a615d;
55
+ // x ^= x >> 28;
56
+ //
57
+ // An equally good alternative is Pelle Evensen's Moremur:
58
+ //
59
+ // x ^= x >> 27;
60
+ // x *= 0x3C79AC492BA7B653;
61
+ // x ^= x >> 33;
62
+ // x *= 0x1C69B3F74AC4AE35;
63
+ // x ^= x >> 27;
64
+ //
65
+ // (https://mostlymangling.blogspot.com/2019/12/stronger-better-morer-moremur-better.html)
66
+
67
+ template<> struct hash_mix_impl<64>
68
+ {
69
+ inline static boost::uint64_t fn( boost::uint64_t x )
70
+ {
71
+ boost::uint64_t const m = (boost::uint64_t(0xe9846af) << 32) + 0x9b1a615d;
72
+
73
+ x ^= x >> 32;
74
+ x *= m;
75
+ x ^= x >> 32;
76
+ x *= m;
77
+ x ^= x >> 28;
78
+
79
+ return x;
80
+ }
81
+ };
82
+
83
+ // hash_mix for 32 bit size_t
84
+ //
85
+ // We use the "best xmxmx" implementation from
86
+ // https://github.com/skeeto/hash-prospector/issues/19
87
+
88
+ template<> struct hash_mix_impl<32>
89
+ {
90
+ inline static boost::uint32_t fn( boost::uint32_t x )
91
+ {
92
+ boost::uint32_t const m1 = 0x21f0aaad;
93
+ boost::uint32_t const m2 = 0x735a2d97;
94
+
95
+ x ^= x >> 16;
96
+ x *= m1;
97
+ x ^= x >> 15;
98
+ x *= m2;
99
+ x ^= x >> 15;
100
+
101
+ return x;
102
+ }
103
+ };
104
+
105
+ inline std::size_t hash_mix( std::size_t v )
106
+ {
107
+ return hash_mix_impl<sizeof(std::size_t) * CHAR_BIT>::fn( v );
108
+ }
109
+
110
+ } // namespace hash_detail
111
+ } // namespace boost
112
+
113
+ #endif // #ifndef BOOST_HASH_DETAIL_HASH_MIX_HPP