passenger 6.0.16 → 6.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +46 -2
  3. data/CONTRIBUTORS +2 -0
  4. data/build/integration_tests.rb +6 -6
  5. data/build/ruby_tests.rb +1 -1
  6. data/build/test_basics.rb +0 -1
  7. data/src/agent/Core/Config.h +1 -1
  8. data/src/agent/Core/Controller/Config.h +1 -1
  9. data/src/agent/Core/SpawningKit/PipeWatcher.h +18 -3
  10. data/src/agent/Watchdog/Config.h +1 -1
  11. data/src/cxx_supportlib/Constants.h +1 -1
  12. data/src/cxx_supportlib/vendor-modified/boost/align/aligned_alloc.hpp +1 -1
  13. data/src/cxx_supportlib/vendor-modified/boost/array.hpp +1 -1
  14. data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_executor.hpp +344 -0
  15. data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_handler.hpp +686 -0
  16. data/src/cxx_supportlib/vendor-modified/boost/asio/any_io_executor.hpp +56 -0
  17. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_allocator.hpp +81 -25
  18. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_cancellation_slot.hpp +68 -8
  19. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_executor.hpp +46 -11
  20. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +4 -4
  21. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +2 -2
  22. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_file.hpp +1 -1
  23. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_random_access_file.hpp +2 -2
  24. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +4 -4
  25. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_readable_pipe.hpp +2 -2
  26. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +2 -2
  27. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +3 -3
  28. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +2 -2
  29. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +3 -3
  30. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +4 -4
  31. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_file.hpp +2 -2
  32. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +2 -2
  33. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +2 -2
  34. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_writable_pipe.hpp +2 -2
  35. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_allocator.hpp +13 -3
  36. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_cancellation_slot.hpp +14 -3
  37. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +13 -3
  38. data/src/cxx_supportlib/vendor-modified/boost/asio/compose.hpp +30 -305
  39. data/src/cxx_supportlib/vendor-modified/boost/asio/consign.hpp +90 -0
  40. data/src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp +17 -18
  41. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +98 -24
  42. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/composed_work.hpp +330 -0
  43. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +81 -15
  44. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +4 -4
  45. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_work.hpp +19 -11
  46. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +37 -0
  47. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +3 -1
  48. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +1 -1
  49. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +10 -2
  50. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.hpp +14 -1
  51. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +18 -0
  52. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/utility.hpp +1 -2
  53. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/work_dispatcher.hpp +7 -3
  54. data/src/cxx_supportlib/vendor-modified/boost/asio/dispatch.hpp +4 -14
  55. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/allocator.hpp +22 -3
  56. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/any_executor.hpp +447 -142
  57. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking.hpp +57 -8
  58. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking_adaptation.hpp +51 -6
  59. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_execute.hpp +5 -0
  60. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_guarantee.hpp +41 -4
  61. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/connect.hpp +5 -0
  62. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context.hpp +13 -2
  63. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context_as.hpp +13 -2
  64. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_operation.hpp +4 -0
  65. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/execute.hpp +9 -2
  66. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/executor.hpp +11 -1
  67. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/mapping.hpp +52 -8
  68. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/occupancy.hpp +13 -2
  69. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/operation_state.hpp +5 -0
  70. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/outstanding_work.hpp +39 -6
  71. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver.hpp +5 -0
  72. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/relationship.hpp +39 -6
  73. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/schedule.hpp +5 -0
  74. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/scheduler.hpp +5 -0
  75. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/sender.hpp +5 -0
  76. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_done.hpp +5 -0
  77. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_error.hpp +5 -0
  78. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_value.hpp +5 -0
  79. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/start.hpp +5 -0
  80. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/submit.hpp +5 -0
  81. data/src/cxx_supportlib/vendor-modified/boost/asio/executor_work_guard.hpp +6 -9
  82. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_channel.hpp +3 -3
  83. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_concurrent_channel.hpp +3 -3
  84. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel_traits.hpp +70 -0
  85. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_composed.hpp +146 -0
  86. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/coro.hpp +35 -5
  87. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_handler.hpp +13 -3
  88. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_operation.hpp +7 -0
  89. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_service.hpp +180 -0
  90. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_completion_handler.hpp +171 -0
  91. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_promise_allocator.hpp +89 -66
  92. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/partial_promise.hpp +66 -45
  93. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/as_single.hpp +13 -3
  94. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/co_composed.hpp +1134 -0
  95. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/coro.hpp +130 -106
  96. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/parallel_group.hpp +377 -3
  97. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/promise.hpp +168 -29
  98. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_coro.hpp +149 -203
  99. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_promise.hpp +68 -0
  100. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/parallel_group.hpp +256 -0
  101. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/promise.hpp +76 -80
  102. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_coro.hpp +40 -14
  103. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_promise.hpp +113 -0
  104. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_completion_executor.ipp +132 -0
  105. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_io_executor.ipp +12 -0
  106. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/append.hpp +12 -3
  107. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/as_tuple.hpp +12 -3
  108. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +25 -6
  109. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +25 -6
  110. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/co_spawn.hpp +34 -45
  111. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +28 -6
  112. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/consign.hpp +204 -0
  113. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/defer.hpp +33 -1
  114. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/deferred.hpp +13 -3
  115. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/dispatch.hpp +21 -9
  116. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +1 -1
  117. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/post.hpp +33 -1
  118. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/prepend.hpp +12 -3
  119. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +40 -9
  120. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +27 -6
  121. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +104 -24
  122. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/redirect_error.hpp +12 -3
  123. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +70 -15
  124. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +1 -0
  125. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +25 -0
  126. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +38 -30
  127. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +27 -6
  128. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context.hpp +0 -13
  129. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.ipp +3 -1
  130. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.ipp +3 -1
  131. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +2 -2
  132. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +2 -2
  133. data/src/cxx_supportlib/vendor-modified/boost/asio/post.hpp +17 -18
  134. data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +3 -1
  135. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +13 -3
  136. data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +11 -7
  137. data/src/cxx_supportlib/vendor-modified/boost/asio/system_executor.hpp +0 -13
  138. data/src/cxx_supportlib/vendor-modified/boost/asio/thread_pool.hpp +23 -18
  139. data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +1 -1
  140. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +2 -2
  141. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_overlapped_handle.hpp +1 -1
  142. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +2 -2
  143. data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +2 -2
  144. data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +4 -0
  145. data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +1 -1
  146. data/src/cxx_supportlib/vendor-modified/boost/chrono/config.hpp +1 -0
  147. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/chrono.hpp +4 -4
  148. data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/scan_keyword.hpp +4 -2
  149. data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +2 -2
  150. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_io.hpp +3 -3
  151. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_put.hpp +5 -5
  152. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_units.hpp +2 -2
  153. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_io.hpp +2 -2
  154. data/src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/ios_base_state_ptr.hpp +7 -7
  155. data/src/cxx_supportlib/vendor-modified/boost/chrono/time_point.hpp +1 -1
  156. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/details.hpp +5 -1
  157. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +10 -3
  158. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang_version.hpp +9 -3
  159. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +9 -3
  160. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +6 -0
  161. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +8 -0
  162. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +4 -0
  163. data/src/cxx_supportlib/vendor-modified/boost/config/detail/suffix.hpp +33 -0
  164. data/src/cxx_supportlib/vendor-modified/boost/config/header_deprecated.hpp +1 -1
  165. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +9 -0
  166. data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +4 -2
  167. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +1 -1
  168. data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +29 -0
  169. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +13 -13
  170. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +80 -95
  171. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +10 -0
  172. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_end.hpp +3 -0
  173. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +738 -34
  174. data/src/cxx_supportlib/vendor-modified/boost/container/detail/destroyers.hpp +38 -10
  175. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +1 -0
  176. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterator.hpp +2 -0
  177. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +3 -4
  178. data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +1150 -1213
  179. data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +1 -1
  180. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +104 -12
  181. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +1 -0
  182. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +11 -1
  183. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +31 -331
  184. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_mix.hpp +113 -0
  185. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_range.hpp +173 -0
  186. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_tuple.hpp +133 -0
  187. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +461 -566
  188. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash_fwd.hpp +24 -24
  189. data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_contiguous_range.hpp +91 -0
  190. data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_described_class.hpp +38 -0
  191. data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_range.hpp +73 -0
  192. data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_unordered_range.hpp +39 -0
  193. data/src/cxx_supportlib/vendor-modified/boost/core/bit.hpp +32 -4
  194. data/src/cxx_supportlib/vendor-modified/boost/core/detail/string_view.hpp +16 -0
  195. data/src/cxx_supportlib/vendor-modified/boost/core/empty_value.hpp +16 -16
  196. data/src/cxx_supportlib/vendor-modified/boost/core/fclose_deleter.hpp +46 -0
  197. data/src/cxx_supportlib/vendor-modified/boost/date_time/date.hpp +1 -1
  198. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/formatters.hpp +3 -3
  199. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/formatters_limited.hpp +3 -3
  200. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_date.hpp +12 -13
  201. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/parsers.hpp +2 -2
  202. data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.ipp +2 -2
  203. data/src/cxx_supportlib/vendor-modified/boost/date_time/iso_format.hpp +13 -13
  204. data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_date_time.hpp +2 -2
  205. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_formatters.hpp +4 -4
  206. data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_formatters_limited.hpp +2 -2
  207. data/src/cxx_supportlib/vendor-modified/boost/date_time/special_values_parser.hpp +1 -1
  208. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_facet.hpp +1 -1
  209. data/src/cxx_supportlib/vendor-modified/boost/date_time/time_parsing.hpp +2 -2
  210. data/src/cxx_supportlib/vendor-modified/boost/describe/bases.hpp +50 -0
  211. data/src/cxx_supportlib/vendor-modified/boost/describe/detail/config.hpp +40 -0
  212. data/src/cxx_supportlib/vendor-modified/boost/describe/detail/cx_streq.hpp +30 -0
  213. data/src/cxx_supportlib/vendor-modified/boost/describe/detail/void_t.hpp +32 -0
  214. data/src/cxx_supportlib/vendor-modified/boost/describe/members.hpp +159 -0
  215. data/src/cxx_supportlib/vendor-modified/boost/describe/modifiers.hpp +33 -0
  216. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree_algorithms.hpp +9 -9
  217. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree_algorithms.hpp +45 -45
  218. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/any_node_and_algorithms.hpp +8 -8
  219. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/bstree_algorithms_base.hpp +37 -38
  220. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +16 -0
  221. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +1 -1
  222. data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +145 -90
  223. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pack_options.hpp +2 -0
  224. data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +7 -7
  225. data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree_algorithms.hpp +5 -5
  226. data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree_algorithms.hpp +11 -9
  227. data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +7 -7
  228. data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_facade.hpp +106 -25
  229. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +1 -1
  230. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +8 -5
  231. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +1 -1
  232. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +4 -2
  233. data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/pdqsort.hpp +2 -1
  234. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +8 -4
  235. data/src/cxx_supportlib/vendor-modified/boost/mp11/bind.hpp +111 -0
  236. data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
  237. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/int_float_mixture.hpp +5 -5
  238. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/sign_mixture.hpp +5 -5
  239. data/src/cxx_supportlib/vendor-modified/boost/numeric/conversion/detail/udt_builtin_mixture.hpp +5 -5
  240. data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/has_opt.hpp +6 -2
  241. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp +11 -2
  242. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +1 -1
  243. data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +7 -1
  244. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category.hpp +2 -2
  245. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category_impl.hpp +10 -1
  246. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_code.hpp +38 -43
  247. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_condition.hpp +52 -0
  248. data/src/cxx_supportlib/vendor-modified/boost/throw_exception.hpp +1 -1
  249. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_ptr_helper.hpp +27 -27
  250. data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp +27 -27
  251. data/src/cxx_supportlib/vendor-modified/boost/type_traits/intrinsics.hpp +22 -8
  252. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fca.hpp +37 -7
  253. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa.hpp +1921 -0
  254. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +66 -82
  255. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/prime_fmod.hpp +6 -0
  256. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/type_traits.hpp +109 -0
  257. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/xmx.hpp +75 -0
  258. data/src/cxx_supportlib/vendor-modified/boost/unordered/hash_traits.hpp +45 -0
  259. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +732 -0
  260. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map_fwd.hpp +49 -0
  261. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +586 -0
  262. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set_fwd.hpp +49 -0
  263. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +166 -66
  264. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +145 -28
  265. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  266. data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/common/md5.hpp +1 -1
  267. data/src/ruby_native_extension/extconf.rb +1 -1
  268. data/src/ruby_supportlib/phusion_passenger/native_support.rb +4 -2
  269. data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +1 -1
  270. data/src/ruby_supportlib/phusion_passenger/public_api.rb +3 -0
  271. data/src/ruby_supportlib/phusion_passenger/utils.rb +1 -0
  272. data/src/ruby_supportlib/phusion_passenger.rb +5 -5
  273. metadata +36 -19
  274. data/src/cxx_supportlib/vendor-modified/boost/align/align.hpp +0 -19
  275. data/src/cxx_supportlib/vendor-modified/boost/align/alignment_of.hpp +0 -54
  276. data/src/cxx_supportlib/vendor-modified/boost/align/alignment_of_forward.hpp +0 -20
  277. data/src/cxx_supportlib/vendor-modified/boost/align/detail/align_cxx11.hpp +0 -21
  278. data/src/cxx_supportlib/vendor-modified/boost/align/detail/aligned_alloc.hpp +0 -52
  279. data/src/cxx_supportlib/vendor-modified/boost/align/detail/alignment_of.hpp +0 -31
  280. data/src/cxx_supportlib/vendor-modified/boost/align/detail/alignment_of_cxx11.hpp +0 -23
  281. data/src/cxx_supportlib/vendor-modified/boost/align/detail/element_type.hpp +0 -91
  282. data/src/cxx_supportlib/vendor-modified/boost/align/detail/integral_constant.hpp +0 -53
  283. data/src/cxx_supportlib/vendor-modified/boost/align/detail/min_size.hpp +0 -26
  284. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/completion_handler_erasure.hpp +0 -196
  285. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/compose.hpp +0 -709
  286. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/float_functions.hpp +0 -336
  287. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_float.hpp +0 -271
  288. data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/limits.hpp +0 -62
  289. data/src/cxx_supportlib/vendor-modified/boost/container_hash/extensions.hpp +0 -361
  290. data/src/cxx_supportlib/vendor-modified/boost/detail/container_fwd.hpp +0 -157
@@ -32,6 +32,7 @@
32
32
  #include <boost/move/adl_move_swap.hpp>
33
33
  #include <boost/move/iterator.hpp>
34
34
  #include <boost/move/utility_core.hpp>
35
+ #include <boost/move/traits.hpp>
35
36
  // other
36
37
  #include <boost/core/no_exceptions_support.hpp>
37
38
  // std
@@ -112,6 +113,7 @@ struct are_elements_contiguous<boost::container::vec_iterator<Pointer, IsConst>
112
113
  static const bool value = true;
113
114
  };
114
115
 
116
+
115
117
  /////////////////////////
116
118
  // offset_ptr
117
119
  /////////////////////////
@@ -169,6 +171,46 @@ struct disable_if_memtransfer_copy_assignable
169
171
  : disable_if<dtl::is_memtransfer_copy_assignable<I, O>, R>
170
172
  {};
171
173
 
174
+ template <class T>
175
+ struct has_single_value
176
+ {
177
+ private:
178
+ struct two { char array_[2]; };
179
+ template<bool Arg> struct wrapper;
180
+ template <class U> static two test(int, ...);
181
+ template <class U> static char test(int, const wrapper<U::single_value>*);
182
+ public:
183
+ static const bool value = sizeof(test<T>(0, 0)) == 1;
184
+ void dummy() {}
185
+ };
186
+
187
+ template<class InsertionProxy, bool = has_single_value<InsertionProxy>::value>
188
+ struct is_single_value_proxy_impl
189
+ {
190
+ static const bool value = InsertionProxy::single_value;
191
+ };
192
+
193
+ template<class InsertionProxy>
194
+ struct is_single_value_proxy_impl<InsertionProxy, false>
195
+ {
196
+ static const bool value = false;
197
+ };
198
+
199
+ template<class InsertionProxy>
200
+ struct is_single_value_proxy
201
+ : is_single_value_proxy_impl<InsertionProxy>
202
+ {};
203
+
204
+ template <typename P, typename R = void>
205
+ struct enable_if_single_value_proxy
206
+ : enable_if<is_single_value_proxy<P>, R>
207
+ {};
208
+
209
+ template <typename P, typename R = void>
210
+ struct disable_if_single_value_proxy
211
+ : disable_if<is_single_value_proxy<P>, R>
212
+ {};
213
+
172
214
  template
173
215
  <typename I, // I models InputIterator
174
216
  typename F> // F models ForwardIterator
@@ -978,6 +1020,19 @@ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_assignable<
978
1020
  move_n_source(I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW
979
1021
  { return dtl::memmove_n_source(f, n, r); }
980
1022
 
1023
+ template<typename F> // F models ForwardIterator
1024
+ BOOST_CONTAINER_FORCEINLINE F move_forward_overlapping(F f, F l, F r)
1025
+ {
1026
+ return (f != r) ? (move)(f, l, r) : l;
1027
+ }
1028
+
1029
+ template<typename B> // B models BidirIterator
1030
+ BOOST_CONTAINER_FORCEINLINE B move_backward_overlapping(B f, B l, B rl)
1031
+ {
1032
+ return (l != rl) ? (move_backward)(f, l, rl) : f;
1033
+ }
1034
+
1035
+
981
1036
  //////////////////////////////////////////////////////////////////////////////
982
1037
  //
983
1038
  // destroy_alloc_n
@@ -1006,6 +1061,31 @@ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_trivially_destructible<I, vo
1006
1061
  destroy_alloc_n(Allocator &, I, U)
1007
1062
  {}
1008
1063
 
1064
+ //////////////////////////////////////////////////////////////////////////////
1065
+ //
1066
+ // destroy_alloc
1067
+ //
1068
+ //////////////////////////////////////////////////////////////////////////////
1069
+
1070
+ template
1071
+ <typename Allocator
1072
+ ,typename I> // I models InputIterator
1073
+ inline typename dtl::disable_if_trivially_destructible<I, void>::type
1074
+ destroy_alloc(Allocator &a, I f, I l)
1075
+ {
1076
+ while(f != l){
1077
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(f));
1078
+ ++f;
1079
+ }
1080
+ }
1081
+
1082
+ template
1083
+ <typename Allocator
1084
+ ,typename I > // I models InputIterator
1085
+ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_trivially_destructible<I, void>::type
1086
+ destroy_alloc(Allocator &, I, I)
1087
+ {}
1088
+
1009
1089
  //////////////////////////////////////////////////////////////////////////////
1010
1090
  //
1011
1091
  // deep_swap_alloc_n
@@ -1088,7 +1168,7 @@ inline typename dtl::enable_if_c
1088
1168
  //Loop unrolling using Duff's device, as it seems it helps on some architectures
1089
1169
  const std::size_t Unroll = 4;
1090
1170
  std::size_t n = (szt_times + (Unroll-1))/Unroll;
1091
- const std::size_t branch_number = (!szt_times)*Unroll + (szt_times % Unroll);
1171
+ const std::size_t branch_number = (szt_times == 0)*Unroll + (szt_times % Unroll);
1092
1172
  switch(branch_number){
1093
1173
  case 4:
1094
1174
  break;
@@ -1177,10 +1257,10 @@ void move_assign_range_alloc_n( Allocator &a, I inp_start, std::size_t n_i, O ou
1177
1257
  }
1178
1258
  }
1179
1259
 
1180
- template<class Allocator, class Iterator>
1260
+ template<class Allocator>
1181
1261
  struct array_destructor
1182
1262
  {
1183
- typedef typename ::boost::container::iterator_traits<Iterator>::value_type value_type;
1263
+ typedef typename ::boost::container::allocator_traits<Allocator>::value_type value_type;
1184
1264
  typedef typename dtl::if_c
1185
1265
  <dtl::is_trivially_destructible<value_type>::value
1186
1266
  ,dtl::null_scoped_destructor_range<Allocator>
@@ -1188,6 +1268,17 @@ struct array_destructor
1188
1268
  >::type type;
1189
1269
  };
1190
1270
 
1271
+ template<class Allocator>
1272
+ struct value_destructor
1273
+ {
1274
+ typedef typename ::boost::container::allocator_traits<Allocator>::value_type value_type;
1275
+ typedef typename dtl::if_c
1276
+ <dtl::is_trivially_destructible<value_type>::value
1277
+ , dtl::null_scoped_destructor<Allocator>
1278
+ , dtl::scoped_destructor<Allocator>
1279
+ >::type type;
1280
+ };
1281
+
1191
1282
  template
1192
1283
  <typename Allocator
1193
1284
  ,typename F // F models ForwardIterator
@@ -1201,9 +1292,9 @@ void uninitialized_move_and_insert_alloc
1201
1292
  , F last
1202
1293
  , O d_first
1203
1294
  , std::size_t n
1204
- , InsertionProxy insert_range_proxy)
1295
+ , InsertionProxy insertion_proxy)
1205
1296
  {
1206
- typedef typename array_destructor<Allocator, F>::type array_destructor_t;
1297
+ typedef typename array_destructor<Allocator>::type array_destructor_t;
1207
1298
 
1208
1299
  //Anti-exception rollbacks
1209
1300
  array_destructor_t new_values_destroyer(d_first, d_first, a);
@@ -1213,7 +1304,7 @@ void uninitialized_move_and_insert_alloc
1213
1304
  O d_last = ::boost::container::uninitialized_move_alloc(a, first, pos, d_first);
1214
1305
  new_values_destroyer.set_end(d_last);
1215
1306
  //Initialize new objects, starting from previous point
1216
- insert_range_proxy.uninitialized_copy_n_and_update(a, d_last, n);
1307
+ insertion_proxy.uninitialized_copy_n_and_update(a, d_last, n);
1217
1308
  d_last += n;
1218
1309
  new_values_destroyer.set_end(d_last);
1219
1310
  //Initialize from the rest of the old buffer,
@@ -1223,53 +1314,666 @@ void uninitialized_move_and_insert_alloc
1223
1314
  new_values_destroyer.release();
1224
1315
  }
1225
1316
 
1317
+
1318
+
1319
+
1320
+ template
1321
+ <typename Allocator
1322
+ ,typename F // F models ForwardIterator
1323
+ ,typename InsertionProxy
1324
+ >
1325
+ typename dtl::enable_if_c<dtl::is_single_value_proxy<InsertionProxy>::value, void>::type
1326
+ expand_backward_and_insert_nonempty_middle_alloc
1327
+ ( Allocator &a
1328
+ , F const first
1329
+ , F const pos
1330
+ , std::size_t const
1331
+ , InsertionProxy insertion_proxy)
1332
+ {
1333
+ BOOST_ASSERT(first != pos);
1334
+
1335
+ typedef typename value_destructor<Allocator>::type value_destructor_t;
1336
+ F aux = first; --aux;
1337
+ allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(aux), boost::move(*first));
1338
+ value_destructor_t on_exception(a, boost::movelib::iterator_to_raw_pointer(aux));
1339
+ //Copy previous to last objects to the initialized end
1340
+ aux = first; ++aux;
1341
+ aux = boost::container::move(aux, pos, first);
1342
+ //Insert new objects in the pos
1343
+ insertion_proxy.copy_n_and_update(a, aux, 1u);
1344
+ on_exception.release();
1345
+ }
1346
+
1226
1347
  template
1227
1348
  <typename Allocator
1228
1349
  ,typename F // F models ForwardIterator
1229
1350
  ,typename InsertionProxy
1230
1351
  >
1231
- void expand_forward_and_insert_alloc
1352
+ typename dtl::disable_if_c<dtl::is_single_value_proxy<InsertionProxy>::value, void>::type
1353
+ expand_backward_and_insert_nonempty_middle_alloc
1354
+ ( Allocator &a
1355
+ , F first
1356
+ , F pos
1357
+ , std::size_t const n
1358
+ , InsertionProxy insertion_proxy)
1359
+ {
1360
+ BOOST_ASSERT(first != pos);
1361
+ BOOST_ASSERT(n != 0);
1362
+
1363
+ typedef typename array_destructor<Allocator>::type array_destructor_t;
1364
+ const std::size_t elems_before = iterator_udistance(first, pos);
1365
+ if(elems_before >= n){
1366
+ //New elements can be just copied.
1367
+ //Move to uninitialized memory last objects
1368
+ F const first_less_n = first - n;
1369
+ F nxt = ::boost::container::uninitialized_move_alloc_n_source(a, first, n, first_less_n);
1370
+ array_destructor_t on_exception(first_less_n, first, a);
1371
+ //Copy previous to last objects to the initialized end
1372
+ nxt = boost::container::move(nxt, pos, first);
1373
+ //Insert new objects in the pos
1374
+ insertion_proxy.copy_n_and_update(a, nxt, n);
1375
+ on_exception.release();
1376
+ }
1377
+ else {
1378
+ //The new elements don't fit in the [pos, end()) range.
1379
+ //Copy old [pos, end()) elements to the uninitialized memory (a gap is created)
1380
+ F aux = ::boost::container::uninitialized_move_alloc(a, first, pos, first - n);
1381
+ array_destructor_t on_exception(first -n, aux, a);
1382
+ //Copy to the beginning of the unallocated zone the last new elements (the gap is closed).
1383
+ insertion_proxy.uninitialized_copy_n_and_update(a, aux, std::size_t(n - elems_before));
1384
+ insertion_proxy.copy_n_and_update(a, first, elems_before);
1385
+ on_exception.release();
1386
+ }
1387
+ }
1388
+
1389
+
1390
+ template
1391
+ <typename Allocator
1392
+ ,typename F // F models ForwardIterator
1393
+ ,typename InsertionProxy
1394
+ >
1395
+ typename dtl::enable_if_c<dtl::is_single_value_proxy<InsertionProxy>::value, void>::type
1396
+ expand_forward_and_insert_nonempty_middle_alloc
1232
1397
  ( Allocator &a
1233
1398
  , F pos
1234
1399
  , F last
1235
- , std::size_t n
1236
- , InsertionProxy insert_range_proxy)
1400
+ , std::size_t const
1401
+ , InsertionProxy insertion_proxy)
1402
+ {
1403
+ BOOST_ASSERT(last != pos);
1404
+
1405
+ typedef typename value_destructor<Allocator>::type value_destructor_t;
1406
+ F last_m_n = last; --last_m_n;
1407
+ allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(last), boost::move(*last_m_n));
1408
+ value_destructor_t on_exception(a, boost::movelib::iterator_to_raw_pointer(last));
1409
+ //Copy previous to last objects to the initialized end
1410
+ boost::container::move_backward(pos, last_m_n, last);
1411
+ //Insert new objects in the pos
1412
+ insertion_proxy.copy_n_and_update(a, pos, 1);
1413
+ on_exception.release();
1414
+ }
1415
+
1416
+ template
1417
+ <typename Allocator
1418
+ ,typename F // F models ForwardIterator
1419
+ ,typename InsertionProxy
1420
+ >
1421
+ typename dtl::disable_if_c<dtl::is_single_value_proxy<InsertionProxy>::value, void>::type
1422
+ expand_forward_and_insert_nonempty_middle_alloc
1423
+ ( Allocator &a
1424
+ , F pos
1425
+ , F last
1426
+ , std::size_t const n
1427
+ , InsertionProxy insertion_proxy)
1428
+ {
1429
+ BOOST_ASSERT(last != pos);
1430
+ BOOST_ASSERT(n != 0);
1431
+
1432
+ typedef typename array_destructor<Allocator>::type array_destructor_t;
1433
+ const std::size_t elems_after = iterator_udistance(pos, last);
1434
+ if(elems_after >= n){
1435
+ //New elements can be just copied.
1436
+ //Move to uninitialized memory last objects
1437
+ F const last_m_n = last - n;
1438
+ F const nxt = ::boost::container::uninitialized_move_alloc_n(a, last_m_n, n, last);
1439
+ array_destructor_t on_exception(last, nxt, a);
1440
+ //Copy previous to last objects to the initialized end
1441
+ boost::container::move_backward(pos, last_m_n, last);
1442
+ //Insert new objects in the pos
1443
+ insertion_proxy.copy_n_and_update(a, pos, n);
1444
+ on_exception.release();
1445
+ }
1446
+ else {
1447
+ //The new elements don't fit in the [pos, end()) range.
1448
+ //Copy old [pos, end()) elements to the uninitialized memory (a gap is created)
1449
+ F new_last = ::boost::container::uninitialized_move_alloc(a, pos, last, pos + n);
1450
+ array_destructor_t on_exception(pos + n, new_last, a);
1451
+ //Copy first new elements in pos (gap is still there)
1452
+ insertion_proxy.copy_n_and_update(a, pos, elems_after);
1453
+ //Copy to the beginning of the unallocated zone the last new elements (the gap is closed).
1454
+ insertion_proxy.uninitialized_copy_n_and_update(a, last, std::size_t(n - elems_after));
1455
+ on_exception.release();
1456
+ }
1457
+ }
1458
+
1459
+ template
1460
+ <typename Allocator
1461
+ , typename F // F models ForwardIterator
1462
+ , typename InsertionProxy
1463
+ >
1464
+ BOOST_CONTAINER_FORCEINLINE void expand_forward_and_insert_alloc
1465
+ ( Allocator& a
1466
+ , F pos
1467
+ , F last
1468
+ , std::size_t const n
1469
+ , InsertionProxy insertion_proxy)
1470
+ {
1471
+ if (last == pos) {
1472
+ insertion_proxy.uninitialized_copy_n_and_update(a, last, n);
1473
+ }
1474
+ else{
1475
+ const bool single_value = dtl::is_single_value_proxy<InsertionProxy>::value;
1476
+ BOOST_IF_CONSTEXPR(!single_value){
1477
+ if (BOOST_UNLIKELY(!n)) {
1478
+ return;
1479
+ }
1480
+ }
1481
+ expand_forward_and_insert_nonempty_middle_alloc(a, pos, last, n, insertion_proxy);
1482
+ }
1483
+ }
1484
+
1485
+ template <class B, class InsertionProxy, class Allocator>
1486
+ void expand_backward_forward_and_insert_alloc_move_backward
1487
+ ( B const old_start
1488
+ , std::size_t const old_size
1489
+ , B const new_start
1490
+ , B const pos
1491
+ , std::size_t const n
1492
+ , InsertionProxy insertion_proxy
1493
+ , Allocator& a)
1237
1494
  {
1238
- typedef typename array_destructor<Allocator, F>::type array_destructor_t;
1495
+ typedef std::size_t size_type;
1496
+ typedef typename allocator_traits<Allocator>::value_type value_type;
1497
+ static const bool trivial_dctr_after_move = has_trivial_destructor_after_move<value_type>::value;
1498
+ static const bool trivial_dctr = dtl::is_trivially_destructible<value_type>::value;
1499
+
1500
+ typedef typename dtl::if_c
1501
+ <trivial_dctr
1502
+ , dtl::null_scoped_destructor_n<Allocator, B>
1503
+ , dtl::scoped_destructor_n<Allocator, B>
1504
+ >::type array_destructor_t;
1505
+
1506
+ //n can be zero to just expand capacity
1507
+ B old_finish = make_iterator_uadvance(old_start, old_size);
1508
+
1509
+ //We can have 8 possibilities:
1510
+ const size_type elemsbefore = static_cast<size_type>(iterator_udistance(old_start, pos));
1511
+ const size_type raw_before = static_cast<size_type>(iterator_udistance(new_start, old_start));
1512
+ const size_type before_plus_new = size_type(elemsbefore + n);
1513
+
1514
+ //Check if raw_before is big enough to hold the beginning of old data + new data
1515
+ if (raw_before >= before_plus_new) {
1516
+ //If anything goes wrong, this object will destroy
1517
+ //all the old objects to fulfill previous vector state
1518
+ array_destructor_t old_values_destroyer(old_start, a, old_size);
1519
+ // _________________________________________________________
1520
+ //| raw_mem | old_begin | old_end | //Old situation
1521
+ //| __________________________________|___________|_________|
1522
+ // _________________________________________________________
1523
+ //| old_begin | new | raw_mem | old_begin | old_end | //First step
1524
+ //|___________|__________|____________|___________|_________|
1525
+
1526
+ //Copy first old values before pos, after that the new objects
1527
+ B const new_elem_pos = ::boost::container::uninitialized_move_alloc(a, old_start, pos, new_start);
1528
+ array_destructor_t new_values_destroyer(new_start, a, elemsbefore);
1529
+ insertion_proxy.uninitialized_copy_n_and_update(a, new_elem_pos, n);
1530
+ new_values_destroyer.set_size(before_plus_new);
1531
+ const size_type new_size = size_type(old_size + n);
1532
+ //Check if raw_before is so big that even copying the old data + new data
1533
+ //there is a gap between the new data and the old data
1534
+ if (raw_before >= new_size) {
1535
+ // _______________________________________________________
1536
+ //| raw_mem | old_begin | old_end | //Old situation
1537
+ //|_________________________________|___________|_________|
1538
+ // _______________________________________________________
1539
+ //| old_begin | new | raw_mem | old_begin | old_end | //First step
1540
+ //|___________|________|____________|___________|_________|
1541
+ // _______________________________________________________
1542
+ //| old_begin | new | old_end | raw_mem | //New situation
1543
+ //|___________|________|_________|________________________|
1544
+ //
1545
+ //Now initialize the rest of memory with the last old values
1546
+ if (before_plus_new != new_size) { //Special case to avoid operations in back insertion
1547
+ B new_start_end(make_iterator_uadvance(new_start, before_plus_new));
1548
+ ::boost::container::uninitialized_move_alloc(a, pos, old_finish, new_start_end);
1549
+ }
1550
+ //All new elements correctly constructed, avoid new element destruction
1551
+ new_values_destroyer.release();
1552
+ //Old values destroyed automatically with "old_values_destroyer"
1553
+ //when "old_values_destroyer" goes out of scope unless the have trivial
1554
+ //destructor after move.
1555
+ if(trivial_dctr_after_move)
1556
+ old_values_destroyer.release();
1557
+ }
1558
+ //raw_before is so big that divides old_end
1559
+ else {
1560
+ // _________________________________________________
1561
+ //| raw | old_beg | old_end | //Old situation
1562
+ //|_____________________________|_________|_________|
1563
+ // _________________________________________________
1564
+ //| old_begin | new | raw | old_beg | old_end | //First step
1565
+ //|___________|__________|______|_________|_________|
1566
+ // _________________________________________________
1567
+ //| old_begin | new | old_end | raw_mem | //New situation
1568
+ //|___________|__________|_________|________________|
1569
+
1570
+ //Now initialize the rest of memory with the last old values
1571
+ //All new elements correctly constructed, avoid new element destruction
1572
+ BOOST_IF_CONSTEXPR(!trivial_dctr) {
1573
+ //Now initialize the rest of raw_before memory with the
1574
+ //first of elements after new values
1575
+ const size_type raw_gap = raw_before - before_plus_new;
1576
+ B new_start_plus(make_iterator_uadvance(new_start, before_plus_new));
1577
+ ::boost::container::uninitialized_move_alloc_n(a, pos, raw_gap, new_start_plus);
1578
+ new_values_destroyer.release();
1579
+ old_values_destroyer.increment_size_backwards(raw_before);
1580
+ //Now move remaining last objects in the old buffer begin
1581
+ B remaining_pos(make_iterator_uadvance(pos, raw_gap));
1582
+ remaining_pos = ::boost::container::move_forward_overlapping(remaining_pos, old_finish, old_start);
1583
+ (void)remaining_pos;
1584
+ //Once moved, avoid calling the destructors if trivial after move
1585
+ if(!trivial_dctr_after_move) {
1586
+ boost::container::destroy_alloc(a, remaining_pos, old_finish);
1587
+ }
1588
+ }
1589
+ else { //If trivial destructor, we can uninitialized copy + copy in a single uninitialized copy
1590
+ ::boost::container::uninitialized_move_alloc_n
1591
+ (a, pos, static_cast<size_type>(old_finish - pos), make_iterator_uadvance(new_start, before_plus_new));
1592
+ }
1593
+ old_values_destroyer.release();
1594
+ }
1595
+ }
1596
+ else {
1597
+ //If anything goes wrong, this object will destroy
1598
+ //all the old objects to fulfill previous vector state
1599
+ array_destructor_t old_values_destroyer(old_start, a, old_size);
1600
+
1601
+ //Check if we have to do the insertion in two phases
1602
+ //since maybe raw_before is not big enough and
1603
+ //the buffer was expanded both sides
1604
+ // _________________________________________________
1605
+ //| raw_mem | old_begin + old_end | raw_mem | //Old situation
1606
+ //|_________|_____________________|_________________|
1607
+ // _________________________________________________
1608
+ //| old_begin + new + old_end | raw_mem | //New situation with do_after
1609
+ //|___________________________________|_____________|
1610
+ // _________________________________________________
1611
+ //| old_begin + new + old_end | raw_mem | //New without do_after
1612
+ //|____________________________|____________________|
1613
+ //
1614
+ const bool do_after = n > raw_before;
1615
+
1616
+ //Now we can have two situations: the raw_mem of the
1617
+ //beginning divides the old_begin, or the new elements:
1618
+ if (raw_before <= elemsbefore) {
1619
+ //The raw memory divides the old_begin group:
1620
+ //
1621
+ //If we need two phase construction (do_after)
1622
+ //new group is divided in new = new_beg + new_end groups
1623
+ //In this phase only new_beg will be inserted
1624
+ //
1625
+ // _________________________________________________
1626
+ //| raw_mem | old_begin | old_end | raw_mem | //Old situation
1627
+ //|_________|___________|_________|_________________|
1628
+ // _________________________________________________
1629
+ //| old_begin | new_beg | old_end | raw_mem | //New situation with do_after(1),
1630
+ //|___________|_________|_________|_________________| //not definitive, pending operations
1631
+ // _________________________________________________
1632
+ //| old_begin | new | old_end | raw_mem | //New situation without do_after,
1633
+ //|___________|_____|_________|_____________________| //definitive.
1634
+ //
1635
+ //Copy the first part of old_begin to raw_mem
1636
+ ::boost::container::uninitialized_move_alloc_n(a, old_start, raw_before, new_start);
1637
+ //The buffer is all constructed until old_end,
1638
+ //so program trailing destruction and assign final size
1639
+ //if !do_after, raw_before+n otherwise.
1640
+ size_type new_1st_range;
1641
+ old_values_destroyer.increment_size_backwards(raw_before);
1642
+ new_1st_range = do_after ? raw_before : n;
1643
+
1644
+ //Now copy the second part of old_begin overwriting itself
1645
+ B const old_next(make_iterator_uadvance(old_start, raw_before));
1646
+ B const next = ::boost::container::move(old_next, pos, old_start);
1647
+ //Now copy the new_beg elements
1648
+ insertion_proxy.copy_n_and_update(a, next, new_1st_range);
1649
+
1650
+ //If there is no after work and the last old part needs to be moved to front, do it
1651
+ if (!do_after) {
1652
+ //Now displace old_end elements and destroy trailing
1653
+ B const new_first(make_iterator_uadvance(next, new_1st_range));
1654
+ B const p = ::boost::container::move_forward_overlapping(pos, old_finish, new_first);
1655
+ (void)p;
1656
+ if(!trivial_dctr_after_move)
1657
+ boost::container::destroy_alloc(a, p, old_finish);
1658
+ }
1659
+ }
1660
+ else {
1661
+ //If we have to expand both sides,
1662
+ //we will play if the first new values so
1663
+ //calculate the upper bound of new values
1664
+
1665
+ //The raw memory divides the new elements
1666
+ //
1667
+ //If we need two phase construction (do_after)
1668
+ //new group is divided in new = new_beg + new_end groups
1669
+ //In this phase only new_beg will be inserted
1670
+ //
1671
+ // ____________________________________________________
1672
+ //| raw_mem | old_begin | old_end | raw_mem | //Old situation
1673
+ //|_______________|___________|_________|______________|
1674
+ // ____________________________________________________
1675
+ //| old_begin | new_beg | old_end | raw_mem | //New situation with do_after(),
1676
+ //|___________|_______________|_________|______________| //not definitive, pending operations
1677
+ // ____________________________________________________
1678
+ //| old_begin | new | old_end | raw_mem | //New situation without do_after,
1679
+ //|___________|_____|_________|________________________| //definitive
1680
+ //
1681
+ //First copy whole old_begin and part of new to raw_mem
1682
+ B const new_pos = ::boost::container::uninitialized_move_alloc(a, old_start, pos, new_start);
1683
+ array_destructor_t new_values_destroyer(new_start, a, elemsbefore);
1684
+ const size_type mid_n = size_type(raw_before - elemsbefore);
1685
+ insertion_proxy.uninitialized_copy_n_and_update(a, new_pos, mid_n);
1686
+ new_values_destroyer.release();
1687
+ //The buffer is all constructed until old_end
1688
+ old_values_destroyer.increment_size_backwards(raw_before);
1689
+
1690
+ if (do_after) {
1691
+ //Copy new_beg part
1692
+ insertion_proxy.copy_n_and_update(a, old_start, elemsbefore);
1693
+ }
1694
+ else {
1695
+ //Copy all new elements
1696
+ const size_type rest_new = size_type(n - mid_n);
1697
+ insertion_proxy.copy_n_and_update(a, old_start, rest_new);
1698
+
1699
+ B move_start(make_iterator_uadvance(old_start, rest_new));
1700
+
1701
+ //Displace old_end, but make sure data has to be moved
1702
+ B const move_end = ::boost::container::move_forward_overlapping(pos, old_finish, move_start);
1703
+ (void)move_end; //To avoid warnings of unused initialization for move_end in case
1704
+ //trivial_dctr_after_move is true
1705
+ //Destroy remaining moved elements from old_end except if they
1706
+ //have trivial destructor after being moved
1707
+ if(!trivial_dctr_after_move) {
1708
+ boost::container::destroy_alloc(a, move_end, old_finish);
1709
+ }
1710
+ }
1711
+ }
1239
1712
 
1240
- if (BOOST_UNLIKELY(!n)){
1241
- return;
1713
+ //This is only executed if two phase construction is needed
1714
+ if (do_after) {
1715
+ //The raw memory divides the new elements
1716
+ // ______________________________________________________
1717
+ //| raw_mem | old_begin | old_end | raw_mem | //Old situation
1718
+ //|______________|___________|____________|______________|
1719
+ // _______________________________________________________
1720
+ //| old_begin + new_beg | new_end |old_end | rawmem | //New situation with do_after(1)
1721
+ //|__________________________|_________|________|________|
1722
+ // ______________________________________________________
1723
+ //| old_begin + new | old_end |raw | //New situation with do_after(2)
1724
+ //|_______________________________________|_________|____|
1725
+ const size_type n_after = size_type(n - raw_before);
1726
+ const size_type elemsafter = size_type(old_size - elemsbefore);
1727
+
1728
+ //We can have two situations:
1729
+ if (elemsafter >= n_after) {
1730
+ //The raw_mem from end will divide displaced old_end
1731
+ //
1732
+ //Old situation:
1733
+ // ______________________________________________________
1734
+ //| raw_mem | old_begin | old_end | raw_mem |
1735
+ //|______________|___________|____________|______________|
1736
+ //
1737
+ //New situation with do_after(1):
1738
+ // _______________________________________________________
1739
+ //| old_begin + new_beg | new_end |old_end | raw_mem |
1740
+ //|__________________________|_________|________|_________|
1741
+ //
1742
+ //First copy the part of old_end raw_mem
1743
+ B finish_n = make_iterator_advance(old_finish, -std::ptrdiff_t(n_after));
1744
+ ::boost::container::uninitialized_move_alloc(a, finish_n, old_finish, old_finish);
1745
+ old_values_destroyer.increment_size(n_after);
1746
+ //Displace the rest of old_end to the new position
1747
+ boost::container::move_backward_overlapping(pos, finish_n, old_finish);
1748
+ //Now overwrite with new_end
1749
+ //The new_end part is [first + (n - n_after), last)
1750
+ insertion_proxy.copy_n_and_update(a, pos, n_after);
1751
+ }
1752
+ else {
1753
+ //The raw_mem from end will divide new_end part
1754
+ // _____________________________________________________________
1755
+ //| raw_mem | old_begin | old_end | raw_mem | //Old situation
1756
+ //|______________|___________|____________|_____________________|
1757
+ // _____________________________________________________________
1758
+ //| old_begin + new_beg | new_end |old_end | raw_mem | //New situation with do_after(2)
1759
+ //|__________________________|_______________|________|_________|
1760
+
1761
+ //First initialize data in raw memory
1762
+ const size_type mid_last_dist = size_type(n_after - elemsafter);
1763
+
1764
+ //Copy to the old_end part to the uninitialized zone leaving a gap.
1765
+ B const mid_last(make_iterator_uadvance(old_finish, mid_last_dist));
1766
+ ::boost::container::uninitialized_move_alloc(a, pos, old_finish, mid_last);
1767
+
1768
+ array_destructor_t old_end_destroyer(mid_last, a, iterator_udistance(pos, old_finish));
1769
+
1770
+ //Copy the first part to the already constructed old_end zone
1771
+ insertion_proxy.copy_n_and_update(a, pos, elemsafter);
1772
+ //Copy the rest to the uninitialized zone filling the gap
1773
+ insertion_proxy.uninitialized_copy_n_and_update(a, old_finish, mid_last_dist);
1774
+ old_end_destroyer.release();
1775
+ }
1776
+ }
1777
+ old_values_destroyer.release();
1242
1778
  }
1243
- else if (last == pos){
1244
- insert_range_proxy.uninitialized_copy_n_and_update(a, last, n);
1779
+ }
1780
+
1781
+ template
1782
+ <typename Allocator
1783
+ , typename B // B models BidirIterator
1784
+ , typename InsertionProxy
1785
+ >
1786
+ BOOST_CONTAINER_FORCEINLINE void expand_backward_forward_and_insert_alloc_move_forward
1787
+ ( B const old_start
1788
+ , std::size_t const old_size
1789
+ , B const new_start
1790
+ , B const pos
1791
+ , std::size_t const n
1792
+ , InsertionProxy insertion_proxy
1793
+ , Allocator& a)
1794
+ {
1795
+ typedef std::size_t size_type;
1796
+ typedef typename allocator_traits<Allocator>::value_type value_type;
1797
+ static const bool trivial_dctr_after_move = has_trivial_destructor_after_move<value_type>::value;
1798
+ static const bool trivial_dctr = dtl::is_trivially_destructible<value_type>::value;
1799
+
1800
+ typedef typename dtl::if_c
1801
+ <trivial_dctr
1802
+ , dtl::null_scoped_destructor_n<Allocator, B>
1803
+ , dtl::scoped_destructor_n<Allocator, B>
1804
+ >::type array_destructor_t;
1805
+
1806
+ //n can be zero to just expand capacity
1807
+
1808
+ B const old_finish = make_iterator_uadvance(old_start, old_size);
1809
+ const size_type new_size = size_type(old_size + n);
1810
+ B const new_finish = make_iterator_uadvance(new_start, new_size);
1811
+
1812
+ //We can have 8 possibilities:
1813
+
1814
+ const size_type elemsafter = static_cast<size_type>(iterator_udistance(pos, old_finish));
1815
+ const size_type raw_after = static_cast<size_type>(iterator_udistance(old_finish, new_finish));
1816
+
1817
+ const size_type after_plus_new = size_type(elemsafter + n);
1818
+
1819
+ //Check if raw_before is big enough to hold the new data + the end of old data
1820
+ if (raw_after >= after_plus_new) {
1821
+ //If anything goes wrong, this object will destroy
1822
+ //all the old objects to fulfill previous vector state
1823
+ array_destructor_t old_values_destroyer(old_start, a, old_size);
1824
+ //______________________ __________________________________
1825
+ //| old_begin | old_end | raw_mem //Old situation
1826
+ //|___________|_________|__________________________________
1827
+ // _____________________ _________________________________
1828
+ //| old_begin | old_end | raw_mem | new | old_end | //First step
1829
+ //|___________|_________|__________|__________|___________|
1830
+
1831
+ //Copy first new objects, after that old values after pos
1832
+ B new_elem_pos = new_finish - after_plus_new;
1833
+ insertion_proxy.uninitialized_copy_n_and_update(a, new_elem_pos, n);
1834
+ array_destructor_t new_values_destroyer(new_elem_pos, a, n);
1835
+ ::boost::container::uninitialized_move_alloc(a, pos, old_finish, new_elem_pos+n);
1836
+ new_values_destroyer.set_size(after_plus_new);
1837
+
1838
+ //Check if raw_before is so big that even copying the old data + new data
1839
+ //there is a gap between the new data and the old data
1840
+ if (raw_after >= new_size) {
1841
+ //______________________ __________________________________
1842
+ //| old_begin | old_end | raw_mem //Old situation
1843
+ //|___________|_________|__________________________________
1844
+ // _____________________ _________________________________
1845
+ //| old_begin | old_end | raw_mem | new | old_end | //First step
1846
+ //|___________|_________|______________|________|_________|
1847
+ // _____________________V_________________________________
1848
+ //| raw_mem | old_begin | new | old_end | //New situation
1849
+ //|________________________|___________|________|_________|
1850
+ //
1851
+ //Now initialize the rest of memory with the last old values
1852
+ ::boost::container::uninitialized_move_alloc(a, old_start, pos, new_start);
1853
+ //All new elements correctly constructed, avoid new element destruction
1854
+ new_values_destroyer.release();
1855
+ //Old values destroyed automatically with "old_values_destroyer"
1856
+ //when "old_values_destroyer" goes out of scope unless the have trivial
1857
+ //destructor after move.
1858
+ if(trivial_dctr_after_move)
1859
+ old_values_destroyer.release();
1860
+ }
1861
+ //raw_before is so big that divides old_end
1862
+ else {
1863
+ //______________________ ____________________________
1864
+ //| old_begin | old_end | raw_mem //Old situation
1865
+ //|___________|_________|____________________________
1866
+ // _____________________ ____________________________
1867
+ //| old_begin | old_end | raw_mem | new | old_end | //First step
1868
+ //|___________|_________|_________|________|_________|
1869
+ // _________________________________________________
1870
+ //| raw_mem | old_begin | new | old_end | //New situation
1871
+ //|___________________|___________|________|_________|
1872
+
1873
+ //Now initialize the rest of raw_before memory with the
1874
+ //last elements before new values
1875
+ const size_type raw_gap = raw_after - after_plus_new;
1876
+ B const pre_pos_raw = pos - raw_gap;
1877
+ ::boost::container::uninitialized_move_alloc_n(a, pre_pos_raw, raw_gap, old_finish);
1878
+ new_values_destroyer.release();
1879
+ old_values_destroyer.increment_size(raw_after);
1880
+ //Now move remaining last objects in the old buffer begin
1881
+ BOOST_ASSERT(old_start != old_finish);
1882
+ boost::container::move_backward_overlapping(old_start, pre_pos_raw, old_finish);
1883
+ old_values_destroyer.release();
1884
+ if (!trivial_dctr_after_move) {
1885
+ boost::container::destroy_alloc(a, old_start, new_start);
1886
+ }
1887
+ }
1245
1888
  }
1246
1889
  else{
1247
- const std::size_t elems_after = static_cast<std::size_t>(last - pos);
1248
- if(elems_after >= n){
1249
- //New elements can be just copied.
1250
- //Move to uninitialized memory last objects
1251
- ::boost::container::uninitialized_move_alloc_n(a, last - n, n, last);
1252
- array_destructor_t on_exception(last, last, a);
1253
- //Copy previous to last objects to the initialized end
1254
- boost::container::move_backward(pos, last - n, last);
1255
- //Insert new objects in the pos
1256
- insert_range_proxy.copy_n_and_update(a, pos, n);
1257
- on_exception.release();
1890
+ //If anything goes wrong, this object will destroy
1891
+ //all the old objects to fulfill previous vector state
1892
+ array_destructor_t old_values_destroyer(old_start, a, old_size);
1893
+
1894
+ //Now we can have two situations: the raw_mem of the
1895
+ //end divides the new elements or the old_end
1896
+ if (raw_after > elemsafter) {
1897
+ //The raw memory divides the new elements
1898
+ //__________________________________
1899
+ //| old_begin | old_end | raw | //Old situation
1900
+ //|___________|_________|___________|
1901
+ // _____ ___________________________
1902
+ //| raw | old_begin | new | old_end | //New situation
1903
+ //|_____|___________|_____|_________|
1904
+
1905
+ //First copy whole old_end and part of new to raw_mem
1906
+ B p = new_finish - elemsafter;
1907
+ ::boost::container::uninitialized_move_alloc(a, pos, old_finish, p);
1908
+ array_destructor_t new_values_destroyer(p, a, elemsafter);
1909
+ //Copy all new elements
1910
+ const size_type mid_n = size_type(raw_after - elemsafter);
1911
+ const size_type rest_new = size_type(n - mid_n);
1912
+ B new_rng_start = old_finish - rest_new;
1913
+ insertion_proxy.copy_n_and_update(a, new_rng_start, rest_new);
1914
+ insertion_proxy.uninitialized_copy_n_and_update(a, old_finish, mid_n);
1915
+ new_values_destroyer.release();
1916
+ old_values_destroyer.increment_size_backwards(raw_after);
1917
+ //Displace old_end, but make sure data has to be moved
1918
+ p = ::boost::container::move_backward_overlapping(old_start, pos, new_rng_start);
1919
+
1920
+ //Destroy remaining moved elements from old_begin except if they
1921
+ //have trivial destructor after being moved
1922
+ old_values_destroyer.release();
1923
+ if (!trivial_dctr_after_move) {
1924
+ boost::container::destroy_alloc(a, old_start, p);
1925
+ }
1258
1926
  }
1259
1927
  else {
1260
- //The new elements don't fit in the [pos, end()) range.
1261
- //Copy old [pos, end()) elements to the uninitialized memory (a gap is created)
1262
- F new_last = ::boost::container::uninitialized_move_alloc(a, pos, last, pos + n);
1263
- array_destructor_t on_exception(pos + n, new_last, a);
1264
- //Copy first new elements in pos (gap is still there)
1265
- insert_range_proxy.copy_n_and_update(a, pos, elems_after);
1266
- //Copy to the beginning of the unallocated zone the last new elements (the gap is closed).
1267
- insert_range_proxy.uninitialized_copy_n_and_update(a, last, std::size_t(n - elems_after));
1268
- on_exception.release();
1928
+ //The raw memory divides the old_end group:
1929
+ //________________________________________
1930
+ //| old_begin | old_end | raw | //Old situation
1931
+ //|___________|_______________|___________|
1932
+ // _____ __________________________________
1933
+ //| raw | old_begin | new | old_end | //New situation
1934
+ //|_____|___________|_____|_______________|
1935
+ //
1936
+ //Copy the last part of old_end to raw_mem
1937
+ const B old_end_pivot = old_finish - raw_after;
1938
+ ::boost::container::uninitialized_move_alloc_n(a, old_end_pivot, raw_after, old_finish);
1939
+ //The buffer is all constructed
1940
+ old_values_destroyer.increment_size_backwards(raw_after);
1941
+
1942
+ //Now copy the first part of old_end overwriting itself
1943
+ B const new_end_pos = ::boost::container::move_backward_overlapping(pos, old_end_pivot, old_finish);
1944
+ B const new_beg_pos = new_end_pos - n;
1945
+
1946
+ //Now copy the new_beg elements
1947
+ insertion_proxy.copy_n_and_update(a, new_beg_pos, n);
1948
+ B const p = ::boost::container::move_backward_overlapping(old_start, pos, new_beg_pos);
1949
+ old_values_destroyer.release();
1950
+
1951
+ if (!trivial_dctr_after_move) {
1952
+ (void)p;
1953
+ boost::container::destroy_alloc(a, old_start, p);
1954
+ }
1269
1955
  }
1270
1956
  }
1271
1957
  }
1272
1958
 
1959
+ template <class R, class InsertionProxy, class Allocator>
1960
+ void expand_backward_forward_and_insert_alloc
1961
+ ( R const old_start
1962
+ , std::size_t const old_size
1963
+ , R const new_start
1964
+ , R const pos
1965
+ , std::size_t const n
1966
+ , InsertionProxy insertion_proxy
1967
+ , Allocator& a)
1968
+ {
1969
+ if(new_start < old_start){
1970
+ expand_backward_forward_and_insert_alloc_move_backward(old_start, old_size, new_start, pos, n, insertion_proxy, a);
1971
+ }
1972
+ else{
1973
+ expand_backward_forward_and_insert_alloc_move_forward(old_start, old_size, new_start, pos, n, insertion_proxy, a);
1974
+ }
1975
+ }
1976
+
1273
1977
  } //namespace container {
1274
1978
  } //namespace boost {
1275
1979