passenger 6.0.23 → 6.0.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (305) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +26 -1
  3. data/Rakefile +7 -3
  4. data/bin/passenger-install-apache2-module +5 -0
  5. data/bin/passenger-install-nginx-module +17 -2
  6. data/build/apache2.rb +1 -1
  7. data/build/basics.rb +10 -4
  8. data/build/cxx_tests.rb +18 -7
  9. data/build/support/cxx_dependency_map.rb +40 -6
  10. data/build/test_basics.rb +4 -12
  11. data/package.json +1 -1
  12. data/passenger.gemspec +1 -1
  13. data/src/agent/Core/ApplicationPool/Group/InitializationAndShutdown.cpp +8 -0
  14. data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +10 -2
  15. data/src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp +8 -0
  16. data/src/agent/Core/ApplicationPool/Group/Miscellaneous.cpp +9 -0
  17. data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +9 -0
  18. data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +63 -50
  19. data/src/agent/Core/ApplicationPool/Group/SessionManagement.cpp +19 -9
  20. data/src/agent/Core/ApplicationPool/Group/SpawningAndRestarting.cpp +8 -0
  21. data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +8 -0
  22. data/src/agent/Core/ApplicationPool/Group/Verification.cpp +8 -0
  23. data/src/agent/Core/ApplicationPool/Group.h +15 -5
  24. data/src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp +5 -0
  25. data/src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp +5 -0
  26. data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +5 -0
  27. data/src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp +5 -0
  28. data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +5 -0
  29. data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +5 -0
  30. data/src/agent/Core/ApplicationPool/Pool/ProcessUtils.cpp +5 -0
  31. data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +11 -1
  32. data/src/agent/Core/ApplicationPool/Pool.h +0 -2
  33. data/src/agent/Core/ApplicationPool/Process.h +22 -6
  34. data/src/agent/Core/ApplicationPool/Session.h +6 -1
  35. data/src/agent/Core/Config.h +7 -3
  36. data/src/agent/Core/Controller/Config.h +1 -1
  37. data/src/agent/Core/CoreMain.cpp +10 -17
  38. data/src/agent/Core/SpawningKit/Handshake/Prepare.h +1 -53
  39. data/src/agent/Core/SpawningKit/Handshake/Session.h +3 -0
  40. data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +5 -2
  41. data/src/agent/Core/SpawningKit/SmartSpawner.h +6 -2
  42. data/src/agent/Core/SpawningKit/Spawner.h +4 -0
  43. data/src/agent/Shared/Fundamentals/AbortHandler.cpp +88 -9
  44. data/src/agent/Shared/Fundamentals/AbortHandler.h +2 -0
  45. data/src/agent/Shared/Fundamentals/Initialization.cpp +9 -3
  46. data/src/agent/Shared/Fundamentals/Initialization.h +3 -3
  47. data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +6 -7
  48. data/src/agent/Watchdog/Config.h +1 -1
  49. data/src/agent/Watchdog/WatchdogMain.cpp +4 -7
  50. data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +5 -3
  51. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +3 -0
  52. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +3 -0
  53. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +2 -1
  54. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder +2 -1
  55. data/src/cxx_supportlib/Constants.h +1 -1
  56. data/src/cxx_supportlib/DataStructures/StringMap.h +0 -1
  57. data/src/cxx_supportlib/FileTools/PathManip.cpp +1 -1
  58. data/src/cxx_supportlib/SafeLibev.h +1 -3
  59. data/src/cxx_supportlib/ServerKit/Hooks.h +2 -2
  60. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +0 -1
  61. data/src/cxx_supportlib/ServerKit/HttpServer.h +15 -10
  62. data/src/cxx_supportlib/ServerKit/Server.h +0 -6
  63. data/src/cxx_supportlib/Utils/AsyncSignalSafeUtils.h +2 -0
  64. data/src/cxx_supportlib/Utils/SpeedMeter.h +0 -3
  65. data/src/cxx_supportlib/oxt/implementation.cpp +11 -0
  66. data/src/cxx_supportlib/oxt/system_calls.cpp +10 -3
  67. data/src/cxx_supportlib/oxt/thread.hpp +1 -1
  68. data/src/cxx_supportlib/vendor-modified/boost/asio/as_tuple.hpp +35 -9
  69. data/src/cxx_supportlib/vendor-modified/boost/asio/associated_immediate_executor.hpp +3 -2
  70. data/src/cxx_supportlib/vendor-modified/boost/asio/associator.hpp +1 -1
  71. data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +74 -68
  72. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +11 -11
  73. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +2 -2
  74. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_random_access_file.hpp +2 -2
  75. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +10 -10
  76. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_readable_pipe.hpp +1 -1
  77. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +3 -3
  78. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +2 -2
  79. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +1 -1
  80. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +2 -2
  81. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +9 -9
  82. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_file.hpp +2 -2
  83. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +6 -6
  84. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +2 -2
  85. data/src/cxx_supportlib/vendor-modified/boost/asio/basic_writable_pipe.hpp +1 -1
  86. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_allocator.hpp +88 -22
  87. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_cancellation_slot.hpp +91 -22
  88. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +105 -23
  89. data/src/cxx_supportlib/vendor-modified/boost/asio/bind_immediate_executor.hpp +90 -23
  90. data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +2 -2
  91. data/src/cxx_supportlib/vendor-modified/boost/asio/buffer_registration.hpp +1 -1
  92. data/src/cxx_supportlib/vendor-modified/boost/asio/cancel_after.hpp +303 -0
  93. data/src/cxx_supportlib/vendor-modified/boost/asio/cancel_at.hpp +296 -0
  94. data/src/cxx_supportlib/vendor-modified/boost/asio/{experimental/impl/co_composed.hpp → co_composed.hpp} +208 -61
  95. data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +49 -0
  96. data/src/cxx_supportlib/vendor-modified/boost/asio/compose.hpp +10 -201
  97. data/src/cxx_supportlib/vendor-modified/boost/asio/composed.hpp +415 -0
  98. data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +214 -48
  99. data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +3 -4
  100. data/src/cxx_supportlib/vendor-modified/boost/asio/default_completion_token.hpp +91 -0
  101. data/src/cxx_supportlib/vendor-modified/boost/asio/deferred.hpp +9 -5
  102. data/src/cxx_supportlib/vendor-modified/boost/asio/detached.hpp +2 -2
  103. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +1 -1
  104. data/src/cxx_supportlib/vendor-modified/boost/asio/{experimental/detail/channel_message.hpp → detail/completion_message.hpp} +14 -16
  105. data/src/cxx_supportlib/vendor-modified/boost/asio/{experimental/detail/channel_payload.hpp → detail/completion_payload.hpp} +30 -32
  106. data/src/cxx_supportlib/vendor-modified/boost/asio/{experimental/detail/channel_handler.hpp → detail/completion_payload_handler.hpp} +15 -13
  107. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +26 -32
  108. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +5 -1
  109. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +14 -118
  110. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +36 -33
  111. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +1 -1
  112. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +7 -5
  113. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +6 -4
  114. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +44 -35
  115. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +1 -1
  116. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/initiation_base.hpp +64 -0
  117. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +0 -11
  118. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +20 -16
  119. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +0 -1
  120. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +4 -4
  121. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +23 -18
  122. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/recycling_allocator.hpp +9 -0
  123. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +1 -1
  124. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_query_op.hpp +1 -1
  125. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +11 -1
  126. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timed_cancel_op.hpp +363 -0
  127. data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +29 -51
  128. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/allocator.hpp +1 -1
  129. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking.hpp +1 -1
  130. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking_adaptation.hpp +1 -1
  131. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context.hpp +1 -1
  132. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/mapping.hpp +1 -1
  133. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/occupancy.hpp +1 -1
  134. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/outstanding_work.hpp +1 -1
  135. data/src/cxx_supportlib/vendor-modified/boost/asio/execution/relationship.hpp +1 -1
  136. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_channel.hpp +2 -1
  137. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_concurrent_channel.hpp +2 -1
  138. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_composed.hpp +2 -114
  139. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_receive_op.hpp +2 -3
  140. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_functions.hpp +27 -19
  141. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_op.hpp +0 -1
  142. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_service.hpp +17 -15
  143. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_promise_allocator.hpp +2 -3
  144. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/impl/channel_service.hpp +4 -2
  145. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/partial_promise.hpp +3 -5
  146. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/as_single.hpp +12 -7
  147. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/coro.hpp +1 -1
  148. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/parallel_group.hpp +38 -40
  149. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/promise.hpp +3 -3
  150. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_coro.hpp +5 -5
  151. data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_promise.hpp +1 -1
  152. data/src/cxx_supportlib/vendor-modified/boost/asio/immediate.hpp +144 -0
  153. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/append.hpp +14 -7
  154. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/as_tuple.hpp +45 -14
  155. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/awaitable.hpp +3 -3
  156. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/cancel_after.hpp +270 -0
  157. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/cancel_at.hpp +270 -0
  158. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/co_spawn.hpp +8 -0
  159. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +60 -166
  160. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/consign.hpp +14 -7
  161. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/detached.hpp +2 -2
  162. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/prepend.hpp +14 -7
  163. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +26 -177
  164. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +16 -82
  165. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +13 -286
  166. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/redirect_error.hpp +55 -18
  167. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +1 -1
  168. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +26 -185
  169. data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +16 -87
  170. data/src/cxx_supportlib/vendor-modified/boost/asio/io_context_strand.hpp +5 -5
  171. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +6 -6
  172. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +1 -1
  173. data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +1 -1
  174. data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +12 -6
  175. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +1 -1
  176. data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +2 -2
  177. data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +127 -28
  178. data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +70 -20
  179. data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +114 -36
  180. data/src/cxx_supportlib/vendor-modified/boost/asio/redirect_error.hpp +43 -3
  181. data/src/cxx_supportlib/vendor-modified/boost/asio/registered_buffer.hpp +2 -2
  182. data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +0 -1
  183. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +2 -2
  184. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +10 -7
  185. data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +5 -5
  186. data/src/cxx_supportlib/vendor-modified/boost/asio/this_coro.hpp +2 -2
  187. data/src/cxx_supportlib/vendor-modified/boost/asio/use_awaitable.hpp +2 -2
  188. data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +1 -1
  189. data/src/cxx_supportlib/vendor-modified/boost/asio/uses_executor.hpp +1 -1
  190. data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +1 -1
  191. data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +147 -35
  192. data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +74 -22
  193. data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +6 -0
  194. data/src/cxx_supportlib/vendor-modified/boost/assert/source_location.hpp +4 -1
  195. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/futex.hpp +42 -11
  196. data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +15 -37
  197. data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +8 -8
  198. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +1 -1
  199. data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +151 -10
  200. data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +11 -9
  201. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +611 -102
  202. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool.hpp +1 -1
  203. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +47 -47
  204. data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +25 -24
  205. data/src/cxx_supportlib/vendor-modified/boost/container/detail/allocation_type.hpp +7 -7
  206. data/src/cxx_supportlib/vendor-modified/boost/container/detail/block_list.hpp +2 -2
  207. data/src/cxx_supportlib/vendor-modified/boost/container/detail/block_slist.hpp +2 -2
  208. data/src/cxx_supportlib/vendor-modified/boost/container/detail/construct_in_place.hpp +35 -1
  209. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +14 -14
  210. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +1 -1
  211. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +55 -23
  212. data/src/cxx_supportlib/vendor-modified/boost/container/detail/function_detector.hpp +1 -1
  213. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_container.hpp +2 -2
  214. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_contiguous_container.hpp +1 -1
  215. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_pair.hpp +4 -4
  216. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +8 -8
  217. data/src/cxx_supportlib/vendor-modified/boost/container/detail/math_functions.hpp +9 -9
  218. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +4 -4
  219. data/src/cxx_supportlib/vendor-modified/boost/container/detail/multiallocation_chain.hpp +96 -10
  220. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +19 -4
  221. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool.hpp +1 -1
  222. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +17 -17
  223. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common.hpp +1 -1
  224. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common_alloc.hpp +2 -2
  225. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_resource.hpp +4 -4
  226. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +86 -52
  227. data/src/cxx_supportlib/vendor-modified/boost/container/detail/version_type.hpp +4 -4
  228. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +12 -0
  229. data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +145 -65
  230. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +105 -22
  231. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +2 -2
  232. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +30 -22
  233. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +19 -2
  234. data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +1 -1
  235. data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +15 -8
  236. data/src/cxx_supportlib/vendor-modified/boost/container/node_handle.hpp +6 -5
  237. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +15 -15
  238. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +1 -1
  239. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/monotonic_buffer_resource.hpp +1 -1
  240. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/resource_adaptor.hpp +3 -3
  241. data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +1 -1
  242. data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +2 -2
  243. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +31 -24
  244. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +45 -43
  245. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +45 -33
  246. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +5 -7
  247. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +55 -47
  248. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator.hpp +3 -3
  249. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +222 -73
  250. data/src/cxx_supportlib/vendor-modified/boost/core/detail/minstd_rand.hpp +58 -0
  251. data/src/cxx_supportlib/vendor-modified/boost/core/detail/string_view.hpp +13 -13
  252. data/src/cxx_supportlib/vendor-modified/boost/core/empty_value.hpp +53 -5
  253. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +1 -0
  254. data/src/cxx_supportlib/vendor-modified/boost/core/pointer_in_range.hpp +49 -0
  255. data/src/cxx_supportlib/vendor-modified/boost/core/span.hpp +2 -0
  256. data/src/cxx_supportlib/vendor-modified/boost/core/type_name.hpp +7 -2
  257. data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +22 -34
  258. data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +141 -38
  259. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/algorithm.hpp +8 -8
  260. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hash.hpp +1 -1
  261. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +8 -6
  262. data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_traits.hpp +18 -18
  263. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +22 -17
  264. data/src/cxx_supportlib/vendor-modified/boost/libs/random/src/random_device.cpp +3 -1
  265. data/src/cxx_supportlib/vendor-modified/boost/move/detail/config_begin.hpp +0 -1
  266. data/src/cxx_supportlib/vendor-modified/boost/move/detail/launder.hpp +53 -0
  267. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +9 -1
  268. data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +6 -1
  269. data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
  270. data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/integral_wrapper.hpp +2 -1
  271. data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +1 -1
  272. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/requires_cxx11.hpp +1 -1
  273. data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp +4 -1
  274. data/src/cxx_supportlib/vendor-modified/boost/system/detail/generic_category_message.hpp +13 -1
  275. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map.hpp +13 -1
  276. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map_fwd.hpp +15 -0
  277. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_set.hpp +13 -1
  278. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_set_fwd.hpp +15 -0
  279. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fca.hpp +22 -6
  280. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/concurrent_table.hpp +38 -10
  281. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/core.hpp +111 -2
  282. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/cumulative_stats.hpp +177 -0
  283. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/table.hpp +11 -1
  284. data/src/cxx_supportlib/vendor-modified/boost/unordered/hash_traits.hpp +33 -7
  285. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +12 -0
  286. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map_fwd.hpp +15 -0
  287. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +12 -0
  288. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set_fwd.hpp +14 -0
  289. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +19 -0
  290. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map.hpp +12 -0
  291. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map_fwd.hpp +15 -0
  292. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set.hpp +12 -0
  293. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set_fwd.hpp +14 -0
  294. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +17 -0
  295. data/src/cxx_supportlib/vendor-modified/boost/utility/detail/minstd_rand.hpp +1 -43
  296. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  297. data/src/ruby_supportlib/phusion_passenger/config/compile_nginx_engine_command.rb +6 -2
  298. data/src/ruby_supportlib/phusion_passenger/config/install_standalone_runtime_command.rb +10 -0
  299. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +12 -4
  300. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +32 -5
  301. data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +0 -4
  302. data/src/ruby_supportlib/phusion_passenger/utils/json.rb +5 -1
  303. data/src/ruby_supportlib/phusion_passenger/utils.rb +5 -15
  304. data/src/ruby_supportlib/phusion_passenger.rb +5 -5
  305. metadata +21 -8
@@ -23,7 +23,7 @@
23
23
  #pragma once
24
24
  #endif
25
25
 
26
- #if defined(__linux__) || defined(__OpenBSD__) || defined(__NETBSD__) || defined(__NetBSD__)
26
+ #if defined(__linux__) || defined(__NETBSD__) || defined(__NetBSD__)
27
27
 
28
28
  #include <sys/syscall.h>
29
29
 
@@ -45,7 +45,21 @@
45
45
  #define BOOST_ATOMIC_DETAIL_NETBSD_FUTEX
46
46
  #endif
47
47
 
48
- #if defined(BOOST_ATOMIC_DETAIL_SYS_FUTEX)
48
+ #elif defined(__OpenBSD__)
49
+
50
+ // OpenBSD provides futex(2) function wrapper since OpenBSD 6.2 (https://man.openbsd.org/OpenBSD-6.2/futex.2).
51
+ // It has also removed syscall(2) interface:
52
+ // https://github.com/openbsd/src/commit/cafeb892b121ee89c39c2b940e8ccd6950f50009
53
+
54
+ #include <sys/param.h>
55
+
56
+ #if OpenBSD >= 201711
57
+ #define BOOST_ATOMIC_DETAIL_OPENBSD_FUTEX
58
+ #endif
59
+
60
+ #endif
61
+
62
+ #if defined(BOOST_ATOMIC_DETAIL_SYS_FUTEX) || defined(BOOST_ATOMIC_DETAIL_OPENBSD_FUTEX)
49
63
 
50
64
  #include <cstddef>
51
65
  #if defined(__linux__)
@@ -53,6 +67,7 @@
53
67
  #else
54
68
  #include <sys/futex.h>
55
69
  #endif
70
+ #include <boost/cstdint.hpp>
56
71
  #include <boost/atomic/detail/intptr.hpp>
57
72
  #include <boost/atomic/detail/header.hpp>
58
73
 
@@ -74,22 +89,40 @@ namespace detail {
74
89
  //! Invokes an operation on the futex
75
90
  BOOST_FORCEINLINE int futex_invoke(void* addr1, int op, unsigned int val1, const void* timeout = NULL, void* addr2 = NULL, unsigned int val3 = 0) BOOST_NOEXCEPT
76
91
  {
77
- #if !defined(BOOST_ATOMIC_DETAIL_NETBSD_FUTEX)
78
- return ::syscall(BOOST_ATOMIC_DETAIL_SYS_FUTEX, addr1, op, val1, timeout, addr2, val3);
79
- #else
92
+ #if defined(BOOST_ATOMIC_DETAIL_OPENBSD_FUTEX)
93
+ return ::futex
94
+ (
95
+ static_cast< volatile uint32_t* >(addr1),
96
+ op,
97
+ static_cast< int >(val1),
98
+ static_cast< const struct timespec* >(timeout),
99
+ static_cast< volatile uint32_t* >(addr2)
100
+ );
101
+ #elif defined(BOOST_ATOMIC_DETAIL_NETBSD_FUTEX)
80
102
  // Pass 0 in val2.
81
103
  return ::syscall(BOOST_ATOMIC_DETAIL_SYS_FUTEX, addr1, op, val1, timeout, addr2, 0u, val3);
104
+ #else
105
+ return ::syscall(BOOST_ATOMIC_DETAIL_SYS_FUTEX, addr1, op, val1, timeout, addr2, val3);
82
106
  #endif
83
107
  }
84
108
 
85
109
  //! Invokes an operation on the futex
86
110
  BOOST_FORCEINLINE int futex_invoke(void* addr1, int op, unsigned int val1, unsigned int val2, void* addr2 = NULL, unsigned int val3 = 0) BOOST_NOEXCEPT
87
111
  {
88
- #if !defined(BOOST_ATOMIC_DETAIL_NETBSD_FUTEX)
89
- return ::syscall(BOOST_ATOMIC_DETAIL_SYS_FUTEX, addr1, op, val1, static_cast< atomics::detail::uintptr_t >(val2), addr2, val3);
90
- #else
112
+ #if defined(BOOST_ATOMIC_DETAIL_OPENBSD_FUTEX)
113
+ return ::futex
114
+ (
115
+ static_cast< volatile uint32_t* >(addr1),
116
+ op,
117
+ static_cast< int >(val1),
118
+ reinterpret_cast< const struct timespec* >(static_cast< atomics::detail::uintptr_t >(val2)),
119
+ static_cast< volatile uint32_t* >(addr2)
120
+ );
121
+ #elif defined(BOOST_ATOMIC_DETAIL_NETBSD_FUTEX)
91
122
  // Pass NULL in timeout.
92
123
  return ::syscall(BOOST_ATOMIC_DETAIL_SYS_FUTEX, addr1, op, val1, static_cast< void* >(NULL), addr2, val2, val3);
124
+ #else
125
+ return ::syscall(BOOST_ATOMIC_DETAIL_SYS_FUTEX, addr1, op, val1, static_cast< atomics::detail::uintptr_t >(val2), addr2, val3);
93
126
  #endif
94
127
  }
95
128
 
@@ -147,8 +180,6 @@ BOOST_FORCEINLINE int futex_requeue_private(void* pval1, void* pval2, unsigned i
147
180
 
148
181
  #include <boost/atomic/detail/footer.hpp>
149
182
 
150
- #endif // defined(BOOST_ATOMIC_DETAIL_SYS_FUTEX)
151
-
152
- #endif // defined(__linux__) || defined(__OpenBSD__) || defined(__NETBSD__) || defined(__NetBSD__)
183
+ #endif // defined(BOOST_ATOMIC_DETAIL_SYS_FUTEX) || defined(BOOST_ATOMIC_DETAIL_OPENBSD_FUTEX)
153
184
 
154
185
  #endif // BOOST_ATOMIC_DETAIL_FUTEX_HPP_INCLUDED_
@@ -737,44 +737,18 @@ template<class F, class... A>
737
737
  namespace _bi
738
738
  {
739
739
 
740
- template< class Pm, int I > struct add_cref;
740
+ template<class M, int I> struct add_cref;
741
741
 
742
- template< class M, class T > struct add_cref< M T::*, 0 >
742
+ template<class M> struct add_cref<M, 0>
743
743
  {
744
744
  typedef M type;
745
745
  };
746
746
 
747
- template< class M, class T > struct add_cref< M T::*, 1 >
747
+ template<class M> struct add_cref<M, 1>
748
748
  {
749
- #ifdef BOOST_MSVC
750
- #pragma warning(push)
751
- #pragma warning(disable:4180)
752
- #endif
753
- typedef M const & type;
754
- #ifdef BOOST_MSVC
755
- #pragma warning(pop)
756
- #endif
757
- };
758
-
759
- template< class R, class T > struct add_cref< R (T::*) (), 1 >
760
- {
761
- typedef void type;
762
- };
763
-
764
- template< class R, class T > struct add_cref< R (T::*) () const, 1 >
765
- {
766
- typedef void type;
767
- };
768
-
769
- #if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED )
770
-
771
- template< class R, class T > struct add_cref< R (T::*) () const noexcept, 1 >
772
- {
773
- typedef void type;
749
+ typedef M const& type;
774
750
  };
775
751
 
776
- #endif // __cpp_noexcept_function_type
777
-
778
752
  template<class R> struct isref
779
753
  {
780
754
  enum value_type { value = 0 };
@@ -790,30 +764,34 @@ template<class R> struct isref< R* >
790
764
  enum value_type { value = 1 };
791
765
  };
792
766
 
793
- template<class Pm, class A1> struct dm_result
767
+ template<class M, class A1, bool fn = std::is_function<M>::value> struct dm_result
768
+ {
769
+ };
770
+
771
+ template<class M, class A1> struct dm_result<M, A1, false>
794
772
  {
795
- typedef typename add_cref< Pm, 1 >::type type;
773
+ typedef typename add_cref< M, 1 >::type type;
796
774
  };
797
775
 
798
- template<class Pm, class R, class F, class L> struct dm_result< Pm, bind_t<R, F, L> >
776
+ template<class M, class R, class F, class L> struct dm_result<M, bind_t<R, F, L>, false>
799
777
  {
800
778
  typedef typename bind_t<R, F, L>::result_type result_type;
801
- typedef typename add_cref< Pm, isref< result_type >::value >::type type;
779
+ typedef typename add_cref< M, isref< result_type >::value >::type type;
802
780
  };
803
781
 
804
782
  } // namespace _bi
805
783
 
806
- template< class A1, class M, class T >
784
+ template<class A1, class M, class T>
807
785
 
808
786
  _bi::bind_t<
809
- typename _bi::dm_result< M T::*, A1 >::type,
787
+ typename _bi::dm_result<M, A1>::type,
810
788
  _mfi::dm<M, T>,
811
789
  typename _bi::list_av<A1>::type
812
790
  >
813
791
 
814
792
  BOOST_BIND( M T::*f, A1 a1 )
815
793
  {
816
- typedef typename _bi::dm_result< M T::*, A1 >::type result_type;
794
+ typedef typename _bi::dm_result<M, A1>::type result_type;
817
795
  typedef _mfi::dm<M, T> F;
818
796
  typedef typename _bi::list_av<A1>::type list_type;
819
797
  return _bi::bind_t< result_type, F, list_type >( F( f ), list_type( a1 ) );
@@ -71,10 +71,10 @@ class adaptive_pool
71
71
  BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)
72
72
  > self_t;
73
73
 
74
- static const std::size_t nodes_per_block = NodesPerBlock;
75
- static const std::size_t max_free_blocks = MaxFreeBlocks;
76
- static const std::size_t overhead_percent = OverheadPercent;
77
- static const std::size_t real_nodes_per_block = NodesPerBlock;
74
+ BOOST_STATIC_CONSTEXPR std::size_t nodes_per_block = NodesPerBlock;
75
+ BOOST_STATIC_CONSTEXPR std::size_t max_free_blocks = MaxFreeBlocks;
76
+ BOOST_STATIC_CONSTEXPR std::size_t overhead_percent = OverheadPercent;
77
+ BOOST_STATIC_CONSTEXPR std::size_t real_nodes_per_block = NodesPerBlock;
78
78
 
79
79
  BOOST_CONTAINER_DOCIGN(BOOST_CONTAINER_STATIC_ASSERT((Version <=2)));
80
80
 
@@ -384,10 +384,10 @@ class private_adaptive_pool
384
384
  BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)
385
385
  > self_t;
386
386
 
387
- static const std::size_t nodes_per_block = NodesPerBlock;
388
- static const std::size_t max_free_blocks = MaxFreeBlocks;
389
- static const std::size_t overhead_percent = OverheadPercent;
390
- static const std::size_t real_nodes_per_block = NodesPerBlock;
387
+ BOOST_STATIC_CONSTEXPR std::size_t nodes_per_block = NodesPerBlock;
388
+ BOOST_STATIC_CONSTEXPR std::size_t max_free_blocks = MaxFreeBlocks;
389
+ BOOST_STATIC_CONSTEXPR std::size_t overhead_percent = OverheadPercent;
390
+ BOOST_STATIC_CONSTEXPR std::size_t real_nodes_per_block = NodesPerBlock;
391
391
 
392
392
  BOOST_CONTAINER_DOCIGN(BOOST_CONTAINER_STATIC_ASSERT((Version <=2)));
393
393
 
@@ -115,7 +115,7 @@ class allocator
115
115
  template<class T2, unsigned int Version2, unsigned int AllocationDisableMask2>
116
116
  allocator& operator=(const allocator<T2, Version2, AllocationDisableMask2>&);
117
117
 
118
- static const unsigned int ForbiddenMask =
118
+ BOOST_STATIC_CONSTEXPR unsigned int ForbiddenMask =
119
119
  BOOST_CONTAINER_ALLOCATE_NEW | BOOST_CONTAINER_EXPAND_BWD | BOOST_CONTAINER_EXPAND_FWD ;
120
120
 
121
121
  //The mask can't disable all the allocation types
@@ -32,6 +32,8 @@
32
32
  #include <boost/container/detail/mpl.hpp>
33
33
  #include <boost/container/detail/type_traits.hpp> //is_empty
34
34
  #include <boost/container/detail/placement_new.hpp>
35
+ #include <boost/container/detail/is_pair.hpp>
36
+ #include <boost/container/detail/addressof.hpp>
35
37
  #ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
36
38
  #include <boost/container/detail/std_fwd.hpp>
37
39
  #endif
@@ -47,9 +49,10 @@
47
49
 
48
50
  #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
49
51
 
50
- #if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
52
+ #if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
51
53
  #pragma GCC diagnostic push
52
54
  #pragma GCC diagnostic ignored "-Wunused-result"
55
+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
53
56
  #endif
54
57
 
55
58
  #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
@@ -73,7 +76,7 @@
73
76
  #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9
74
77
  #include <boost/intrusive/detail/has_member_function_callable_with.hpp>
75
78
 
76
- #if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
79
+ #if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
77
80
  #pragma GCC diagnostic pop
78
81
  #endif
79
82
 
@@ -81,6 +84,144 @@
81
84
 
82
85
  namespace boost {
83
86
  namespace container {
87
+ namespace dtl {
88
+
89
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
90
+
91
+ template<class T, class ...Args>
92
+ BOOST_CONTAINER_FORCEINLINE void construct_type(T *p, BOOST_FWD_REF(Args) ...args)
93
+ {
94
+ ::new((void*)p, boost_container_new_t()) T(::boost::forward<Args>(args)...);
95
+ }
96
+
97
+ template < class Pair, class KeyType, class ... Args>
98
+ typename dtl::enable_if< dtl::is_pair<Pair>, void >::type
99
+ construct_type
100
+ (Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k, BOOST_FWD_REF(Args) ...args)
101
+ {
102
+ construct_type(dtl::addressof(p->first), ::boost::forward<KeyType>(k));
103
+ BOOST_CONTAINER_TRY{
104
+ construct_type(dtl::addressof(p->second), ::boost::forward<Args>(args)...);
105
+ }
106
+ BOOST_CONTAINER_CATCH(...) {
107
+ typedef typename Pair::first_type first_type;
108
+ dtl::addressof(p->first)->~first_type();
109
+ BOOST_CONTAINER_RETHROW
110
+ }
111
+ BOOST_CONTAINER_CATCH_END
112
+ }
113
+
114
+ #else
115
+
116
+ #define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ(N) \
117
+ template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\
118
+ BOOST_CONTAINER_FORCEINLINE \
119
+ typename dtl::disable_if_c<dtl::is_pair<T>::value, void >::type \
120
+ construct_type(T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
121
+ {\
122
+ ::new((void*)p, boost_container_new_t()) T( BOOST_MOVE_FWD##N );\
123
+ }\
124
+ //
125
+ BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ)
126
+ #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ
127
+
128
+ #define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE(N) \
129
+ template < class Pair, class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\
130
+ typename dtl::enable_if< dtl::is_pair<Pair>, void >::type construct_type\
131
+ (Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
132
+ {\
133
+ construct_type(dtl::addressof(p->first), ::boost::forward<KeyType>(k));\
134
+ BOOST_CONTAINER_TRY{\
135
+ construct_type(dtl::addressof(p->second) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
136
+ }\
137
+ BOOST_CONTAINER_CATCH(...) {\
138
+ typedef typename Pair::first_type first_type;\
139
+ dtl::addressof(p->first)->~first_type();\
140
+ BOOST_CONTAINER_RETHROW\
141
+ }\
142
+ BOOST_CONTAINER_CATCH_END\
143
+ }\
144
+ //
145
+ BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE)
146
+ #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE
147
+
148
+ #endif
149
+
150
+ template<class T>
151
+ inline
152
+ typename dtl::enable_if<dtl::is_pair<T>, void >::type
153
+ construct_type(T* p)
154
+ {
155
+ dtl::construct_type(dtl::addressof(p->first));
156
+ BOOST_CONTAINER_TRY{
157
+ dtl::construct_type(dtl::addressof(p->second));
158
+ }
159
+ BOOST_CONTAINER_CATCH(...) {
160
+ typedef typename T::first_type first_type;
161
+ dtl::addressof(p->first)->~first_type();
162
+ BOOST_CONTAINER_RETHROW
163
+ }
164
+ BOOST_CONTAINER_CATCH_END
165
+ }
166
+
167
+
168
+ template<class T, class U>
169
+ inline
170
+ typename dtl::enable_if_c
171
+ < dtl::is_pair<T>::value
172
+ , void >::type
173
+ construct_type(T* p, U &u)
174
+ {
175
+ dtl::construct_type(dtl::addressof(p->first), u.first);
176
+ BOOST_CONTAINER_TRY{
177
+ dtl::construct_type(dtl::addressof(p->second), u.second);
178
+ }
179
+ BOOST_CONTAINER_CATCH(...) {
180
+ typedef typename T::first_type first_type;
181
+ dtl::addressof(p->first)->~first_type();
182
+ BOOST_CONTAINER_RETHROW
183
+ }
184
+ BOOST_CONTAINER_CATCH_END
185
+ }
186
+
187
+ template<class T, class U>
188
+ inline
189
+ typename dtl::enable_if_c
190
+ < dtl::is_pair<typename dtl::remove_reference<T>::type>::value &&
191
+ !boost::move_detail::is_reference<U>::value //This is needed for MSVC10 and ambiguous overloads
192
+ , void >::type
193
+ construct_type(T* p, BOOST_RV_REF(U) u)
194
+ {
195
+ dtl::construct_type(dtl::addressof(p->first), ::boost::move(u.first));
196
+ BOOST_CONTAINER_TRY{
197
+ dtl::construct_type(dtl::addressof(p->second), ::boost::move(u.second));
198
+ }
199
+ BOOST_CONTAINER_CATCH(...) {
200
+ typedef typename T::first_type first_type;
201
+ dtl::addressof(p->first)->~first_type();
202
+ BOOST_CONTAINER_RETHROW
203
+ }
204
+ BOOST_CONTAINER_CATCH_END
205
+ }
206
+
207
+ template<class T, class U, class V>
208
+ inline
209
+ typename dtl::enable_if<dtl::is_pair<T>, void >::type
210
+ construct_type(T* p, BOOST_FWD_REF(U) x, BOOST_FWD_REF(V) y)
211
+ {
212
+ dtl::construct_type(dtl::addressof(p->first), ::boost::forward<U>(x));
213
+ BOOST_CONTAINER_TRY{
214
+ dtl::construct_type(dtl::addressof(p->second), ::boost::forward<V>(y));
215
+ }
216
+ BOOST_CONTAINER_CATCH(...) {
217
+ typedef typename T::first_type first_type;
218
+ dtl::addressof(p->first)->~first_type();
219
+ BOOST_CONTAINER_RETHROW
220
+ }
221
+ BOOST_CONTAINER_CATCH_END
222
+ }
223
+
224
+ } //namespace dtl
84
225
 
85
226
  #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
86
227
 
@@ -100,19 +241,19 @@ namespace dtl {
100
241
  //supporting rvalue references
101
242
  template<class Allocator>
102
243
  struct is_std_allocator
103
- { static const bool value = false; };
244
+ { BOOST_STATIC_CONSTEXPR bool value = false; };
104
245
 
105
246
  template<class T>
106
247
  struct is_std_allocator< std::allocator<T> >
107
- { static const bool value = true; };
248
+ { BOOST_STATIC_CONSTEXPR bool value = true; };
108
249
 
109
250
  template<class T, class Options>
110
251
  struct is_std_allocator< small_vector_allocator<T, std::allocator<T>, Options > >
111
- { static const bool value = true; };
252
+ { BOOST_STATIC_CONSTEXPR bool value = true; };
112
253
 
113
254
  template<class Allocator>
114
255
  struct is_not_std_allocator
115
- { static const bool value = !is_std_allocator<Allocator>::value; };
256
+ { BOOST_STATIC_CONSTEXPR bool value = !is_std_allocator<Allocator>::value; };
116
257
 
117
258
  BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer)
118
259
  BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(const_pointer)
@@ -358,7 +499,7 @@ struct allocator_traits
358
499
  template <class T, class ...Args>
359
500
  inline static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args)
360
501
  {
361
- static const bool value = ::boost::move_detail::and_
502
+ BOOST_STATIC_CONSTEXPR bool value = ::boost::move_detail::and_
362
503
  < dtl::is_not_std_allocator<Allocator>
363
504
  , boost::container::dtl::has_member_function_callable_with_construct
364
505
  < Allocator, T*, Args... >
@@ -419,7 +560,7 @@ struct allocator_traits
419
560
 
420
561
  template<class T, class ...Args>
421
562
  inline static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args)
422
- { ::new((void*)p, boost_container_new_t()) T(::boost::forward<Args>(args)...); }
563
+ { dtl::construct_type(p, ::boost::forward<Args>(args)...); }
423
564
  #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
424
565
  public:
425
566
 
@@ -427,7 +568,7 @@ struct allocator_traits
427
568
  template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
428
569
  inline static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
429
570
  {\
430
- static const bool value = ::boost::move_detail::and_ \
571
+ BOOST_STATIC_CONSTEXPR bool value = ::boost::move_detail::and_ \
431
572
  < dtl::is_not_std_allocator<Allocator> \
432
573
  , boost::container::dtl::has_member_function_callable_with_construct \
433
574
  < Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_FWD_T##N > \
@@ -450,7 +591,7 @@ struct allocator_traits
450
591
  \
451
592
  template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
452
593
  inline static void priv_construct(dtl::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
453
- { ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\
594
+ { dtl::construct_type(p BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
454
595
  //
455
596
  BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL)
456
597
  #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL
@@ -15,6 +15,8 @@
15
15
  # include <boost/config.hpp>
16
16
  #endif
17
17
 
18
+ #include <boost/container/detail/workaround.hpp>
19
+
18
20
  #if defined(BOOST_HAS_PRAGMA_ONCE)
19
21
  # pragma once
20
22
  #endif
@@ -277,10 +279,10 @@ class basic_string;
277
279
  typedef basic_string <char> string;
278
280
  typedef basic_string<wchar_t> wstring;
279
281
 
280
- static const std::size_t ADP_nodes_per_block = 256u;
281
- static const std::size_t ADP_max_free_blocks = 2u;
282
- static const std::size_t ADP_overhead_percent = 1u;
283
- static const std::size_t ADP_only_alignment = 0u;
282
+ BOOST_STATIC_CONSTEXPR std::size_t ADP_nodes_per_block = 256u;
283
+ BOOST_STATIC_CONSTEXPR std::size_t ADP_max_free_blocks = 2u;
284
+ BOOST_STATIC_CONSTEXPR std::size_t ADP_overhead_percent = 1u;
285
+ BOOST_STATIC_CONSTEXPR std::size_t ADP_only_alignment = 0u;
284
286
 
285
287
  template < class T
286
288
  , std::size_t NodesPerBlock = ADP_nodes_per_block
@@ -295,7 +297,7 @@ template < class T
295
297
  , unsigned int AllocationDisableMask = 0>
296
298
  class allocator;
297
299
 
298
- static const std::size_t NodeAlloc_nodes_per_block = 256u;
300
+ BOOST_STATIC_CONSTEXPR std::size_t NodeAlloc_nodes_per_block = 256u;
299
301
 
300
302
  template
301
303
  < class T
@@ -332,7 +334,7 @@ struct ordered_range_t
332
334
 
333
335
  //! Value used to tag that the input range is
334
336
  //! guaranteed to be ordered
335
- static const ordered_range_t ordered_range = ordered_range_t();
337
+ BOOST_CONTAINER_CONSTANT_VAR ordered_range_t ordered_range = ordered_range_t();
336
338
 
337
339
  //! Type used to tag that the input range is
338
340
  //! guaranteed to be ordered and unique
@@ -342,7 +344,7 @@ struct ordered_unique_range_t
342
344
 
343
345
  //! Value used to tag that the input range is
344
346
  //! guaranteed to be ordered and unique
345
- static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
347
+ BOOST_CONTAINER_CONSTANT_VAR ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
346
348
 
347
349
  //! Type used to tag that the inserted values
348
350
  //! should be default initialized
@@ -351,7 +353,7 @@ struct default_init_t
351
353
 
352
354
  //! Value used to tag that the inserted values
353
355
  //! should be default initialized
354
- static const default_init_t default_init = default_init_t();
356
+ BOOST_CONTAINER_CONSTANT_VAR default_init_t default_init = default_init_t();
355
357
  #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
356
358
 
357
359
  //! Type used to tag that the inserted values
@@ -361,7 +363,7 @@ struct value_init_t
361
363
 
362
364
  //! Value used to tag that the inserted values
363
365
  //! should be value initialized
364
- static const value_init_t value_init = value_init_t();
366
+ BOOST_CONTAINER_CONSTANT_VAR value_init_t value_init = value_init_t();
365
367
 
366
368
  namespace container_detail_really_deep_namespace {
367
369