passenger 6.2.1 → 6.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +37 -15
  3. data/build/cxx_tests.rb +2 -0
  4. data/build/support/cxx_dependency_map.rb +3 -63
  5. data/src/agent/Core/Config.h +1 -1
  6. data/src/agent/Core/Controller/Config.h +1 -1
  7. data/src/agent/Shared/ApiServerUtils.h +1 -1
  8. data/src/agent/Watchdog/Config.h +1 -1
  9. data/src/apache2_module/Hooks.cpp +13 -0
  10. data/src/apache2_module/Utils.h +14 -0
  11. data/src/cxx_supportlib/Constants.h +1 -1
  12. data/src/cxx_supportlib/FileTools/FileManip.cpp +27 -3
  13. data/src/cxx_supportlib/InstanceDirectory.h +30 -3
  14. data/src/cxx_supportlib/ServerKit/Errors.h +1 -1
  15. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +1 -1
  16. data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +1 -1
  17. data/src/cxx_supportlib/ServerKit/HttpRequest.h +1 -1
  18. data/src/cxx_supportlib/ServerKit/llerrors.h +3 -3
  19. data/src/cxx_supportlib/ServerKit/llversion.h +1 -1
  20. data/src/cxx_supportlib/{ServerKit/llhttp_api.c → vendor-copy/llhttp/api.c} +30 -23
  21. data/src/cxx_supportlib/{ServerKit → vendor-copy/llhttp}/llhttp.c +1756 -1645
  22. data/src/cxx_supportlib/{ServerKit → vendor-copy/llhttp}/llhttp.h +35 -13
  23. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/classification.hpp +19 -0
  24. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/formatter.hpp +1 -1
  25. data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/trim_all.hpp +0 -2
  26. data/src/cxx_supportlib/vendor-modified/boost/assert.hpp +20 -13
  27. data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_x86.hpp +2 -2
  28. data/src/cxx_supportlib/vendor-modified/boost/atomic/thread_pause.hpp +4 -0
  29. data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn.hpp +1 -1
  30. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/debug.hpp +4 -0
  31. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx03.hpp +1 -1
  32. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx11.hpp +1 -1
  33. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx14.hpp +1 -1
  34. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx17.hpp +1 -1
  35. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx20.hpp +1 -1
  36. data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx23.hpp +1 -1
  37. data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +6 -1
  38. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang_version.hpp +10 -1
  39. data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +5 -3
  40. data/src/cxx_supportlib/vendor-modified/boost/config/detail/cxx_composite.hpp +1 -1
  41. data/src/cxx_supportlib/vendor-modified/boost/config/workaround.hpp +5 -0
  42. data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +57 -53
  43. data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +10 -10
  44. data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +34 -2
  45. data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +14 -2
  46. data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +176 -2287
  47. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool.hpp +13 -9
  48. data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +186 -70
  49. data/src/cxx_supportlib/vendor-modified/boost/container/detail/algorithm.hpp +2 -2
  50. data/src/cxx_supportlib/vendor-modified/boost/container/detail/aligned_allocation.hpp +149 -0
  51. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_helpers.hpp +35 -0
  52. data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_lib.h +1 -0
  53. data/src/cxx_supportlib/vendor-modified/boost/container/detail/bit_utilities.hpp +133 -0
  54. data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +18 -3
  55. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +5 -0
  56. data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_end.hpp +4 -0
  57. data/src/cxx_supportlib/vendor-modified/boost/container/detail/container_rebind.hpp +1 -1
  58. data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +20 -10
  59. data/src/cxx_supportlib/vendor-modified/boost/container/detail/deque_impl.hpp +2744 -0
  60. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +202 -104
  61. data/src/cxx_supportlib/vendor-modified/boost/container/detail/dlmalloc.hpp +5 -4
  62. data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +161 -85
  63. data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_constructible.hpp +180 -0
  64. data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +3 -2
  65. data/src/cxx_supportlib/vendor-modified/boost/container/detail/math_functions.hpp +12 -0
  66. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +16 -0
  67. data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +1 -1
  68. data/src/cxx_supportlib/vendor-modified/boost/container/detail/next_capacity.hpp +9 -1
  69. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool.hpp +18 -14
  70. data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool_impl.hpp +256 -41
  71. data/src/cxx_supportlib/vendor-modified/boost/container/detail/operator_new_helpers.hpp +75 -24
  72. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +1 -56
  73. data/src/cxx_supportlib/vendor-modified/boost/container/detail/placement_new.hpp +16 -3
  74. data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common_alloc.hpp +1 -7
  75. data/src/cxx_supportlib/vendor-modified/boost/container/detail/range_utils.hpp +196 -0
  76. data/src/cxx_supportlib/vendor-modified/boost/container/detail/std_fwd.hpp +33 -1
  77. data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +124 -69
  78. data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +109 -7
  79. data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +168 -162
  80. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/nest.hpp +2978 -0
  81. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/pmr/nest.hpp +45 -0
  82. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_all_of.hpp +43 -0
  83. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_any_of.hpp +42 -0
  84. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_copy.hpp +229 -0
  85. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_copy_if.hpp +270 -0
  86. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_copy_n.hpp +308 -0
  87. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_count.hpp +101 -0
  88. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_count_if.hpp +100 -0
  89. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_equal.hpp +268 -0
  90. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_fill.hpp +101 -0
  91. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_fill_n.hpp +171 -0
  92. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find.hpp +110 -0
  93. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_if.hpp +110 -0
  94. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_if_not.hpp +43 -0
  95. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_last.hpp +179 -0
  96. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_last_if.hpp +179 -0
  97. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_last_if_not.hpp +43 -0
  98. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_for_each.hpp +92 -0
  99. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_generate.hpp +90 -0
  100. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_generate_n.hpp +162 -0
  101. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_is_partitioned.hpp +46 -0
  102. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_is_sorted.hpp +49 -0
  103. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_is_sorted_until.hpp +169 -0
  104. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_iterator_traits.hpp +382 -0
  105. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_merge.hpp +428 -0
  106. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_mismatch.hpp +350 -0
  107. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_none_of.hpp +98 -0
  108. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_partition.hpp +296 -0
  109. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_partition_copy.hpp +105 -0
  110. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_partition_point.hpp +116 -0
  111. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove.hpp +57 -0
  112. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove_copy.hpp +207 -0
  113. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove_copy_if.hpp +223 -0
  114. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove_if.hpp +57 -0
  115. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_replace.hpp +90 -0
  116. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_replace_if.hpp +90 -0
  117. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_reverse.hpp +245 -0
  118. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_reverse_copy.hpp +229 -0
  119. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_search.hpp +211 -0
  120. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_search_n.hpp +476 -0
  121. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_difference.hpp +300 -0
  122. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_intersection.hpp +287 -0
  123. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_symmetric_difference.hpp +306 -0
  124. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_union.hpp +294 -0
  125. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_stable_partition.hpp +153 -0
  126. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_swap_ranges.hpp +92 -0
  127. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_transform.hpp +93 -0
  128. data/src/cxx_supportlib/vendor-modified/boost/container/experimental/wrapped_iterator.hpp +142 -0
  129. data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +642 -417
  130. data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +141 -30
  131. data/src/cxx_supportlib/vendor-modified/boost/container/hub.hpp +2426 -0
  132. data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +65 -57
  133. data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +247 -68
  134. data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +7 -0
  135. data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +39 -33
  136. data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +156 -23
  137. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/global_resource.hpp +3 -3
  138. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/hub.hpp +43 -0
  139. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +5 -3
  140. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/monotonic_buffer_resource.hpp +1 -0
  141. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/polymorphic_allocator.hpp +1 -1
  142. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/resource_adaptor.hpp +4 -0
  143. data/src/cxx_supportlib/vendor-modified/boost/container/pmr/segtor.hpp +45 -0
  144. data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +5 -4
  145. data/src/cxx_supportlib/vendor-modified/boost/container/segtor.hpp +905 -0
  146. data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +148 -35
  147. data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +59 -52
  148. data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +632 -5
  149. data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +66 -60
  150. data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +46 -1
  151. data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +612 -317
  152. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator.hpp +54 -111
  153. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_construction.hpp +100 -0
  154. data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_fwd.hpp +1 -3
  155. data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +233 -116
  156. data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +5 -1
  157. data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +17 -10
  158. data/src/cxx_supportlib/vendor-modified/boost/date_time/period.hpp +1 -3
  159. data/src/cxx_supportlib/vendor-modified/boost/describe/detail/config.hpp +16 -0
  160. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/encoder.hpp +114 -0
  161. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/error_info_impl.hpp +4 -0
  162. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/requires_cxx11.hpp +1 -1
  163. data/src/cxx_supportlib/vendor-modified/boost/exception/detail/type_info.hpp +211 -1
  164. data/src/cxx_supportlib/vendor-modified/boost/exception/diagnostic_information.hpp +59 -0
  165. data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +6 -0
  166. data/src/cxx_supportlib/vendor-modified/boost/exception/info.hpp +34 -0
  167. data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +0 -1
  168. data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +12 -3
  169. data/src/cxx_supportlib/vendor-modified/boost/intrusive/derivation_value_traits.hpp +1 -1
  170. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +29 -174
  171. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/generic_hook.hpp +18 -2
  172. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/key_nodeptr_comp.hpp +0 -1
  173. data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +4 -5
  174. data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +20 -11
  175. data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +42 -14
  176. data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +58 -22
  177. data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set.hpp +3 -1
  178. data/src/cxx_supportlib/vendor-modified/boost/iterator/advance.hpp +5 -1
  179. data/src/cxx_supportlib/vendor-modified/boost/iterator/distance.hpp +8 -2
  180. data/src/cxx_supportlib/vendor-modified/boost/iterator/is_iterator.hpp +9 -0
  181. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +11 -1
  182. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/buffer_view.hpp +9 -1
  183. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/config.hpp +22 -0
  184. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +15 -7
  185. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +23 -11
  186. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +11 -1
  187. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +9 -1
  188. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +11 -2
  189. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_basic_unlockedbuf.hpp +10 -1
  190. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +8 -1
  191. data/src/cxx_supportlib/vendor-modified/boost/{detail → lexical_cast/detail}/lcast_precision.hpp +13 -1
  192. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +11 -1
  193. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +10 -2
  194. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +15 -2
  195. data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +11 -1
  196. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once_atomic.cpp +1 -1
  197. data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +48 -46
  198. data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +23 -0
  199. data/src/cxx_supportlib/vendor-modified/boost/move/detail/move_helpers.hpp +24 -24
  200. data/src/cxx_supportlib/vendor-modified/boost/move/detail/nsec_clock.hpp +12 -4
  201. data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +76 -0
  202. data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +1 -1
  203. data/src/cxx_supportlib/vendor-modified/boost/move/traits.hpp +11 -0
  204. data/src/cxx_supportlib/vendor-modified/boost/mp11/algorithm.hpp +58 -37
  205. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_copy_if.hpp +1 -2
  206. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_map_find.hpp +17 -9
  207. data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_remove_if.hpp +1 -2
  208. data/src/cxx_supportlib/vendor-modified/boost/mp11/integer_sequence.hpp +6 -0
  209. data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
  210. data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +6 -1
  211. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_common_defs.hpp +188 -0
  212. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_factory_support.hpp +0 -6
  213. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_hash.hpp +1 -1
  214. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_nonmember_interface.hpp +117 -0
  215. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +108 -83
  216. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +39 -39
  217. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_select_implementation.hpp +37 -0
  218. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_swap.hpp +1 -1
  219. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_trivially_copyable_base.hpp +8 -8
  220. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/union_optional.hpp +724 -0
  221. data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +93 -220
  222. data/src/cxx_supportlib/vendor-modified/boost/optional/optional_fwd.hpp +14 -4
  223. data/src/cxx_supportlib/vendor-modified/boost/optional/optional_io.hpp +1 -1
  224. data/src/cxx_supportlib/vendor-modified/boost/random/binomial_distribution.hpp +1 -1
  225. data/src/cxx_supportlib/vendor-modified/boost/random/uniform_int_distribution.hpp +1 -1
  226. data/src/cxx_supportlib/vendor-modified/boost/rational.hpp +1 -1
  227. data/src/cxx_supportlib/vendor-modified/boost/static_assert.hpp +4 -6
  228. data/src/cxx_supportlib/vendor-modified/boost/system/api_config.hpp +1 -1
  229. data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +16 -0
  230. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category.hpp +13 -13
  231. data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category_impl.hpp +5 -5
  232. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_deque_base.hpp +3 -2
  233. data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_queue_base.hpp +3 -2
  234. data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +2 -1
  235. data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v2/task_region.hpp +1 -1
  236. data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +30 -28
  237. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once.hpp +6 -3
  238. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once_atomic.hpp +5 -1
  239. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/pthread_helpers.hpp +1 -0
  240. data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/shared_mutex.hpp +16 -16
  241. data/src/cxx_supportlib/vendor-modified/boost/thread/v2/shared_mutex.hpp +26 -26
  242. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map.hpp +196 -6
  243. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_set.hpp +191 -6
  244. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_node_map.hpp +196 -5
  245. data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_node_set.hpp +192 -5
  246. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/concurrent_table.hpp +3 -3
  247. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/core.hpp +2 -2
  248. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/table.hpp +3 -3
  249. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +52 -16
  250. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/ranges_support.hpp +104 -0
  251. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/type_traits.hpp +1 -14
  252. data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/unordered_printers.hpp +10 -4
  253. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +121 -3
  254. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +118 -3
  255. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +338 -1
  256. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map.hpp +121 -3
  257. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set.hpp +118 -3
  258. data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +333 -1
  259. data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
  260. data/src/cxx_supportlib/vendor-modified/jsoncpp/json-forwards.h +276 -143
  261. data/src/cxx_supportlib/vendor-modified/jsoncpp/json.h +1262 -771
  262. data/src/cxx_supportlib/vendor-modified/jsoncpp/jsoncpp.cpp +1704 -1586
  263. data/src/nginx_module/ContentHandler.c +35 -0
  264. data/src/ruby_supportlib/phusion_passenger/common_library.rb +6 -6
  265. data/src/ruby_supportlib/phusion_passenger/utils/json.rb +25 -2
  266. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +12 -1
  267. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  268. metadata +73 -8
  269. data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_utility.hpp +0 -41
  270. /data/src/cxx_supportlib/{ServerKit/llhttp_http.c → vendor-copy/llhttp/http.c} +0 -0
@@ -137,28 +137,29 @@ class node_allocator
137
137
 
138
138
  //!Returns the number of elements that could be allocated.
139
139
  //!Never throws
140
- size_type max_size() const
141
- { return size_type(-1)/sizeof(T); }
140
+ BOOST_CONTAINER_NODISCARD
141
+ size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
142
+ { return size_type(-1)/(2u*sizeof(T)); }
142
143
 
143
144
  //!Allocate memory for an array of count elements.
144
145
  //!Throws bad_alloc if there is no enough memory
145
- pointer allocate(size_type count, const void * = 0)
146
+ BOOST_CONTAINER_NODISCARD
147
+ pointer allocate(size_type count)
146
148
  {
147
149
  if(BOOST_UNLIKELY(count > this->max_size()))
148
150
  boost::container::throw_bad_alloc();
149
151
 
150
- if(Version == 1 && count == 1){
152
+ BOOST_IF_CONSTEXPR(Version == 1)
153
+ if(count == 1){
151
154
  typedef dtl::shared_node_pool
152
- <sizeof(T), NodesPerBlock> shared_pool_t;
155
+ <sizeof(T), NodesPerBlock, dtl::alignment_of<T>::value> shared_pool_t;
153
156
  typedef dtl::singleton_default<shared_pool_t> singleton_t;
154
157
  return pointer(static_cast<T*>(singleton_t::instance().allocate_node()));
155
158
  }
156
- else{
157
- void *ret = dlmalloc_malloc(count*sizeof(T));
158
- if(BOOST_UNLIKELY(!ret))
159
- boost::container::throw_bad_alloc();
160
- return static_cast<pointer>(ret);
161
- }
159
+ void *ret = dlmalloc_memalign(count*sizeof(T), dtl::alignment_of<T>::value);
160
+ if(BOOST_UNLIKELY(!ret))
161
+ boost::container::throw_bad_alloc();
162
+ return static_cast<pointer>(ret);
162
163
  }
163
164
 
164
165
  //!Deallocate allocated memory.
@@ -166,26 +167,27 @@ class node_allocator
166
167
  void deallocate(const pointer &ptr, size_type count) BOOST_NOEXCEPT_OR_NOTHROW
167
168
  {
168
169
  (void)count;
169
- if(Version == 1 && count == 1){
170
+ BOOST_IF_CONSTEXPR(Version == 1)
171
+ if(count == 1){
170
172
  typedef dtl::shared_node_pool
171
- <sizeof(T), NodesPerBlock> shared_pool_t;
173
+ <sizeof(T), NodesPerBlock, dtl::alignment_of<T>::value> shared_pool_t;
172
174
  typedef dtl::singleton_default<shared_pool_t> singleton_t;
173
175
  singleton_t::instance().deallocate_node(ptr);
176
+ return;
174
177
  }
175
- else{
176
- dlmalloc_free(ptr);
177
- }
178
+ dlmalloc_free(ptr);
178
179
  }
179
180
 
180
181
  //!Deallocates all free blocks of the pool
181
182
  static void deallocate_free_blocks() BOOST_NOEXCEPT_OR_NOTHROW
182
183
  {
183
184
  typedef dtl::shared_node_pool
184
- <sizeof(T), NodesPerBlock> shared_pool_t;
185
+ <sizeof(T), NodesPerBlock, dtl::alignment_of<T>::value> shared_pool_t;
185
186
  typedef dtl::singleton_default<shared_pool_t> singleton_t;
186
187
  singleton_t::instance().deallocate_free_blocks();
187
188
  }
188
189
 
190
+ BOOST_CONTAINER_NODISCARD
189
191
  pointer allocation_command
190
192
  (allocation_type command, size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse)
191
193
  {
@@ -198,6 +200,7 @@ class node_allocator
198
200
 
199
201
  //!Returns maximum the number of objects the previously allocated memory
200
202
  //!pointed by p can hold.
203
+ BOOST_CONTAINER_NODISCARD
201
204
  size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW
202
205
  {
203
206
  BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 ));
@@ -207,11 +210,12 @@ class node_allocator
207
210
  //!Allocates just one object. Memory allocated with this function
208
211
  //!must be deallocated only with deallocate_one().
209
212
  //!Throws bad_alloc if there is no enough memory
213
+ BOOST_CONTAINER_NODISCARD
210
214
  pointer allocate_one()
211
215
  {
212
216
  BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 ));
213
217
  typedef dtl::shared_node_pool
214
- <sizeof(T), NodesPerBlock> shared_pool_t;
218
+ <sizeof(T), NodesPerBlock, dtl::alignment_of<T>::value> shared_pool_t;
215
219
  typedef dtl::singleton_default<shared_pool_t> singleton_t;
216
220
  return (pointer)singleton_t::instance().allocate_node();
217
221
  }
@@ -222,13 +226,13 @@ class node_allocator
222
226
  {
223
227
  BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 ));
224
228
  typedef dtl::shared_node_pool
225
- <sizeof(T), NodesPerBlock> shared_pool_t;
229
+ <sizeof(T), NodesPerBlock, dtl::alignment_of<T>::value> shared_pool_t;
226
230
  typedef dtl::singleton_default<shared_pool_t> singleton_t;
227
231
  typename shared_pool_t::multiallocation_chain ch;
228
232
  singleton_t::instance().allocate_nodes(num_elements, ch);
229
233
  chain.incorporate_after(chain.before_begin()
230
- , (T*)boost::movelib::iterator_to_raw_pointer(ch.begin())
231
- , (T*)boost::movelib::iterator_to_raw_pointer(ch.last())
234
+ , (T*)static_cast<void*>(boost::movelib::iterator_to_raw_pointer(ch.begin()))
235
+ , (T*)static_cast<void*>(boost::movelib::iterator_to_raw_pointer(ch.last()))
232
236
  , ch.size());
233
237
  }
234
238
 
@@ -239,7 +243,7 @@ class node_allocator
239
243
  {
240
244
  BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 ));
241
245
  typedef dtl::shared_node_pool
242
- <sizeof(T), NodesPerBlock> shared_pool_t;
246
+ <sizeof(T), NodesPerBlock, dtl::alignment_of<T>::value> shared_pool_t;
243
247
  typedef dtl::singleton_default<shared_pool_t> singleton_t;
244
248
  singleton_t::instance().deallocate_node(p);
245
249
  }
@@ -248,7 +252,7 @@ class node_allocator
248
252
  {
249
253
  BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 ));
250
254
  typedef dtl::shared_node_pool
251
- <sizeof(T), NodesPerBlock> shared_pool_t;
255
+ <sizeof(T), NodesPerBlock, dtl::alignment_of<T>::value> shared_pool_t;
252
256
  typedef dtl::singleton_default<shared_pool_t> singleton_t;
253
257
  typename shared_pool_t::multiallocation_chain ch
254
258
  ( boost::movelib::iterator_to_raw_pointer(chain.begin())
@@ -268,8 +272,8 @@ class node_allocator
268
272
  boost::container::throw_bad_alloc();
269
273
  }
270
274
  chain.incorporate_after( chain.before_begin()
271
- , (T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch)
272
- , (T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch)
275
+ , (T*)static_cast<void*>(BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch))
276
+ , (T*)static_cast<void*>(BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch))
273
277
  , BOOST_CONTAINER_MEMCHAIN_SIZE(&ch));
274
278
  }
275
279
 
@@ -284,8 +288,8 @@ class node_allocator
284
288
  boost::container::throw_bad_alloc();
285
289
  }
286
290
  chain.incorporate_after( chain.before_begin()
287
- , (T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch)
288
- , (T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch)
291
+ , (T*)static_cast<void*>(BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch))
292
+ , (T*)static_cast<void*>(BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch))
289
293
  , BOOST_CONTAINER_MEMCHAIN_SIZE(&ch));
290
294
  }
291
295
 
@@ -307,32 +311,34 @@ class node_allocator
307
311
 
308
312
  //!An allocator always compares to true, as memory allocated with one
309
313
  //!instance can be deallocated by another instance
314
+ BOOST_CONTAINER_NODISCARD
310
315
  friend bool operator==(const node_allocator &, const node_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
311
316
  { return true; }
312
317
 
313
318
  //!An allocator always compares to false, as memory allocated with one
314
319
  //!instance can be deallocated by another instance
320
+ BOOST_CONTAINER_NODISCARD
315
321
  friend bool operator!=(const node_allocator &, const node_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
316
322
  { return false; }
317
323
 
318
324
  private:
319
325
  pointer priv_allocation_command
320
326
  (allocation_type command, std::size_t limit_size
321
- ,size_type &prefer_in_recvd_out_size
322
- ,pointer &reuse)
327
+ ,size_type &prefer_in_recvd_out_size, pointer &reuse_ptr)
323
328
  {
324
329
  std::size_t const preferred_size = prefer_in_recvd_out_size;
325
330
  dlmalloc_command_ret_t ret = {0 , 0};
326
- if((limit_size > this->max_size()) || (preferred_size > this->max_size())){
331
+ if(BOOST_UNLIKELY(limit_size > this->max_size() || preferred_size > this->max_size())){
327
332
  return pointer();
328
333
  }
329
334
  std::size_t l_size = limit_size*sizeof(T);
330
335
  std::size_t p_size = preferred_size*sizeof(T);
331
336
  std::size_t r_size;
332
337
  {
333
- void* reuse_ptr_void = reuse;
334
- ret = dlmalloc_allocation_command(command, sizeof(T), l_size, p_size, &r_size, reuse_ptr_void);
335
- reuse = static_cast<T*>(reuse_ptr_void);
338
+ void* reuse_ptr_void = reuse_ptr;
339
+ ret = dlmalloc_allocation_command( command, sizeof(T), dtl::alignment_of<T>::value
340
+ , l_size, p_size, &r_size, reuse_ptr_void);
341
+ reuse_ptr = ret.second ? static_cast<T*>(reuse_ptr_void) : 0;
336
342
  }
337
343
  prefer_in_recvd_out_size = r_size/sizeof(T);
338
344
  return (pointer)ret.first;
@@ -58,7 +58,7 @@ struct tree_opt
58
58
 
59
59
  typedef tree_opt<red_black_tree, true> tree_assoc_defaults;
60
60
 
61
- #endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
61
+ #endif // !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
62
62
 
63
63
  //!This option setter specifies the underlying tree type
64
64
  //!(red-black, AVL, Scapegoat or Splay) for ordered associative containers
@@ -176,7 +176,7 @@ using hash_assoc_options_t = typename boost::container::hash_assoc_options<Optio
176
176
 
177
177
  #endif
178
178
 
179
- #endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
179
+ #endif // !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
180
180
 
181
181
  ////////////////////////////////////////////////////////////////
182
182
  //
@@ -212,7 +212,7 @@ struct default_if_zero<0u, DefaultN>
212
212
  BOOST_STATIC_CONSTEXPR std::size_t value = DefaultN;
213
213
  };
214
214
 
215
- #endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
215
+ #endif // !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
216
216
 
217
217
  #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
218
218
 
@@ -244,6 +244,27 @@ class default_next_capacity;
244
244
 
245
245
  typedef vector_opt<void, void> vector_null_opt;
246
246
 
247
+ template<class GrowthType, class StoredSizeType, std::size_t InlineChars>
248
+ struct string_opt
249
+ {
250
+ typedef GrowthType growth_factor_type;
251
+ typedef StoredSizeType stored_size_type;
252
+ static const std::size_t inline_chars = InlineChars;
253
+
254
+ template<class AllocTraits>
255
+ struct get_stored_size_type
256
+ : get_stored_size_type_with_alloctraits<AllocTraits, StoredSizeType>
257
+ {};
258
+ };
259
+
260
+ typedef string_opt<void, void, 0u> string_null_opt;
261
+
262
+ struct growth_factor_50;
263
+
264
+ struct growth_factor_60;
265
+
266
+ struct growth_factor_100;
267
+
247
268
  #else
248
269
 
249
270
  //!This growth factor argument specifies that the container should increase its
@@ -258,7 +279,7 @@ struct growth_factor_60{};
258
279
  //!capacity a 100% (doubling its capacity) when existing capacity is exhausted.
259
280
  struct growth_factor_100{};
260
281
 
261
- #endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
282
+ #endif // !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
262
283
 
263
284
  //!This option setter specifies the growth factor strategy of the
264
285
  //!underlying vector.
@@ -307,7 +328,8 @@ BOOST_INTRUSIVE_OPTION_TYPE(growth_factor, GrowthFactor, GrowthFactor, growth_fa
307
328
  //!a 32 bit alignment is required for vector and the size will be rounded to 8 bytes. In a 64-bit
308
329
  //!machine a 16 bit size type does not usually save memory when comparing to a 32-bit size type.
309
330
  //!Measure the size of the resulting container and do not assume a smaller \c stored_size
310
- //!will always lead to a smaller sizeof(container).
331
+ //!will always lead to a smaller sizeof(container). You might end up not obtaining any `sizeof`
332
+ //!reduction while severily limiting the maximum size of the container.
311
333
  //!
312
334
  //!If a user tries to insert more elements than representable by \c stored_size, the container
313
335
  //!will throw a length_error.
@@ -377,7 +399,7 @@ struct small_vector_opt
377
399
 
378
400
  typedef small_vector_opt<void, 0u, void> small_vector_null_opt;
379
401
 
380
- #endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
402
+ #endif // !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
381
403
 
382
404
  //! Helper metafunction to combine options into a single type to be used
383
405
  //! by \c boost::container::small_vector.
@@ -448,7 +470,7 @@ struct static_vector_opt
448
470
 
449
471
  typedef static_vector_opt<true, 0u, void> static_vector_null_opt;
450
472
 
451
- #endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
473
+ #endif // !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
452
474
 
453
475
  //! Helper metafunction to combine options into a single type to be used
454
476
  //! by \c boost::container::static_vector.
@@ -496,7 +518,7 @@ using static_vector_options_t = typename boost::container::static_vector_options
496
518
  //
497
519
  ////////////////////////////////////////////////////////////////
498
520
 
499
- //!Thse options specify the relocation strategy of devector.
521
+ //!These options specify the relocation strategy of devector.
500
522
  //!
501
523
  //!Predefined relocation limits that can be passed as arguments to this option are:
502
524
  //!\c boost::container::relocate_on_66
@@ -510,11 +532,10 @@ using static_vector_options_t = typename boost::container::static_vector_options
510
532
  //!Note: Repeated insertions at only one end (only back insertions or only front insertions) usually will
511
533
  //!lead to a single relocation when `relocate_on_66` is used and two relocations when `relocate_on_90`
512
534
  //!is used.
535
+ BOOST_INTRUSIVE_OPTION_CONSTANT(relocate_on, std::size_t, Fraction, free_fraction)
513
536
 
514
537
  #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
515
538
 
516
- BOOST_INTRUSIVE_OPTION_CONSTANT(relocate_on, std::size_t, Fraction, free_fraction)
517
-
518
539
  struct relocate_on_66 : public relocate_on<3U>{};
519
540
 
520
541
  struct relocate_on_75 : public relocate_on<4U> {};
@@ -539,32 +560,32 @@ typedef devector_opt<void, void, 0u> devector_null_opt;
539
560
  //!This relocation condition option specifies that the container will never relocate
540
561
  //!elements when there is no space at the side the insertion should
541
562
  //!take place
542
- struct relocate_never;
563
+ struct relocate_never{};
543
564
 
544
565
  //!This relocation condition option specifies that the container will relocate
545
566
  //!all elements when there is no space at the side the insertion should
546
567
  //!take place and memory usage is below 66% (2/3)
547
- struct relocate_on_66;
568
+ struct relocate_on_66{};
548
569
 
549
570
  //!This relocation condition option specifies that the container will relocate
550
571
  //!all elements when there is no space at the side the insertion should
551
572
  //!take place and memory usage is below 75% (3/4)
552
- struct relocate_on_75;
573
+ struct relocate_on_75{};
553
574
 
554
575
  //!This relocation condition option specifies that the container will relocate
555
576
  //!all elements when there is no space at the side the insertion should
556
577
  //!take place and memory usage is below 80% (4/5)
557
- struct relocate_on_80;
578
+ struct relocate_on_80{};
558
579
 
559
580
  //!This relocation condition option specifies that the container will relocate
560
581
  //!all elements when there is no space at the side the insertion should
561
582
  //!take place and memory usage is below 85% (6/7)
562
- struct relocate_on_85;
583
+ struct relocate_on_85{};
563
584
 
564
585
  //!This relocation condition option specifies that the container will relocate
565
586
  //!all elements when there is no space at the side the insertion should
566
587
  //!take place and memory usage is below 90% (9/10)
567
- struct relocate_on_90;
588
+ struct relocate_on_90{};
568
589
 
569
590
  #endif
570
591
 
@@ -638,8 +659,9 @@ typedef deque_opt<0u, 0u, void, false> deque_null_opt;
638
659
 
639
660
  //! Helper metafunction to combine options into a single type to be used
640
661
  //! by \c boost::container::deque.
641
- //! Supported options are: \c boost::container::block_bytes, \c boost::container::block_size,
642
- //! \c boost::container::stored_size and \c boost::container::reservable
662
+ //! Supported options are: \c boost::container::block_bytes / \c boost::container::segment_bytes,
663
+ //! \c boost::container::block_size / \c boost::container::segment_size,
664
+ //! \c boost::container::stored_size
643
665
  #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) || defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
644
666
  template<class ...Options>
645
667
  #else
@@ -674,30 +696,141 @@ using deque_options_t = typename boost::container::deque_options<Options...>::ty
674
696
 
675
697
  #endif
676
698
 
699
+ ////////////////////////////////////////////////////////////////
700
+ //
701
+ //
702
+ // OPTIONS FOR SEGTOR CONTAINERS
703
+ //
704
+ //
705
+ ////////////////////////////////////////////////////////////////
706
+
707
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
708
+
709
+ template<std::size_t BlockBytes, std::size_t BlockSize, class StoredSizeType, bool Reservable>
710
+ struct segtor_opt : public deque_opt<BlockBytes, BlockSize, StoredSizeType, Reservable>
711
+ {};
712
+
713
+ typedef segtor_opt<0u, 0u, void, false> segtor_null_opt;
714
+
715
+ #endif
716
+
717
+ //! Helper metafunction to combine options into a single type to be used
718
+ //! by \c boost::container::segtor.
719
+ //! Supported options are: \c boost::container::block_bytes / \c boost::container::segment_bytes,
720
+ //! \c boost::container::block_size / \c boost::container::segment_size,
721
+ //! \c boost::container::stored_size
722
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) || defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
723
+ template<class ...Options>
724
+ struct segtor_options
725
+ : deque_options<Options...>
726
+ #else
727
+ template<class O1 = void, class O2 = void, class O3 = void, class O4 = void>
728
+ struct segtor_options
729
+ : deque_options<O1, O2, O3, O4>
730
+ #endif
731
+ {};
732
+
733
+ #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
734
+
735
+ //! Helper alias metafunction to combine options into a single type to be used
736
+ //! by \c boost::container::segtor.
737
+ template<class ...Options>
738
+ using segtor_options_t = typename boost::container::segtor_options<Options...>::type;
739
+
740
+ #endif
741
+
742
+ ////////////////////////////////////////////////////////////////
743
+ //
744
+ //
745
+ // OPTIONS FOR STRING CONTAINER
746
+ //
747
+ //
748
+ ////////////////////////////////////////////////////////////////
749
+
750
+ //! This option specifies the desired number of characters to be hold inline
751
+ //! in the container.
752
+ //!
753
+ //! A value zero represents the default value
754
+ //! (typically 10 chars in 32-bit systems and 22 chars in 64-bit systems).
755
+ //!
756
+ //!\tparam InlineChars An unsigned integer value. Values greater than 127 are not supported
757
+ //! duet to the internal data structure design.
758
+ BOOST_INTRUSIVE_OPTION_CONSTANT(inline_chars, std::size_t, InlineChars, inline_chars)
759
+
760
+ //! Helper metafunction to combine options into a single type to be used
761
+ //! by \c boost::container::string.
762
+ //! Supported options are: \c boost::container::growth_factor and \c boost::container::stored_size
763
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) || defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
764
+ template<class ...Options>
765
+ #else
766
+ template<class O1 = void, class O2 = void, class O3 = void, class O4 = void>
767
+ #endif
768
+ struct string_options
769
+ {
770
+ /// @cond
771
+ typedef typename ::boost::intrusive::pack_options
772
+ < string_null_opt,
773
+ #if !defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
774
+ O1, O2, O3, O4
775
+ #else
776
+ Options...
777
+ #endif
778
+ >::type packed_options;
779
+ typedef string_opt< typename packed_options::growth_factor_type
780
+ , typename packed_options::stored_size_type
781
+ , packed_options::inline_chars
782
+ > implementation_defined;
783
+ /// @endcond
784
+ typedef implementation_defined type;
785
+ };
786
+
787
+ #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
788
+
789
+ //! Helper alias metafunction to combine options into a single type to be used
790
+ //! by \c boost::container::string.
791
+ template<class ...Options>
792
+ using string_options_t = typename boost::container::string_options<Options...>::type;
793
+
794
+ #endif
795
+
677
796
  //!This option specifies the maximum size of a block in bytes: this delimites the number of contiguous elements
678
- //!that will be allocated by some containers as min(1u, BlockBytes/sizeof(value_type))
797
+ //!that will be allocated by some segmented containers as min(1u, BlockBytes/sizeof(value_type))
679
798
  //!A value zero represents the default value.
680
799
  //!
681
800
  //!\tparam BlockBytes An unsigned integer value.
682
801
  BOOST_INTRUSIVE_OPTION_CONSTANT(block_bytes, std::size_t, BlockBytes, block_bytes)
683
802
 
684
- //!This option specifies the size of a block, delimites the number of contiguous elements
685
- //!that will be allocated by some containersas BlockSize.
686
- //!For some containers (like deque), a power of two value can improve performance.
803
+ //!An alias for `block_bytes`
804
+ //!
805
+ //!\tparam SegmentBytes An unsigned integer value.
806
+ BOOST_INTRUSIVE_OPTION_CONSTANT(segment_bytes, std::size_t, SegmentBytes, block_bytes)
807
+
808
+ //!This option specifies the size of a block, delimites the number of contiguous elements (BlockSize)
809
+ //!that will be allocated by segmented containers.
810
+ //!For some containers (like deque/segtor), a power of two value can improve performance.
687
811
  //!A value zero represents the default value.
688
812
  //!
689
813
  //!\tparam BlockBytes An unsigned integer value.
690
814
  BOOST_INTRUSIVE_OPTION_CONSTANT(block_size, std::size_t, BlockSize, block_size)
691
815
 
816
+ //!An alias for `block_size`
817
+ //!
818
+ //!\tparam SegmentSize An unsigned integer value.
819
+ BOOST_INTRUSIVE_OPTION_CONSTANT(segment_size, std::size_t, SegmentSize, block_size)
820
+
821
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
822
+
692
823
  //!This option specifies if the container has reserve/capacity-like features
693
824
  //!
694
- //!For some containers (like deque) this option might change the internal representation or
825
+ //!For some containers (like deque/segtor) this option might change the internal representation or
695
826
  //!behavior so that memory for elements can be allocated in advance in
696
827
  //!order to improve performance.
697
828
  //!
698
829
  //!\tparam Reservable An boolean value.
699
830
  BOOST_INTRUSIVE_OPTION_CONSTANT(reservable, bool, Reservable, reservable)
700
831
 
832
+ #endif // !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
833
+
701
834
  } //namespace container {
702
835
  } //namespace boost {
703
836
 
@@ -30,13 +30,13 @@ namespace pmr {
30
30
  //! memory_resource that can serve as a resource for allocating memory using
31
31
  //! global `operator new` and global `operator delete`. The same value is returned every time this function
32
32
  //! is called. For return value p and memory resource r, p->is_equal(r) returns &r == p.
33
- BOOST_CONTAINER_DECL memory_resource* new_delete_resource() BOOST_NOEXCEPT;
33
+ BOOST_CONTAINER_NODISCARD BOOST_CONTAINER_DECL memory_resource* new_delete_resource() BOOST_NOEXCEPT;
34
34
 
35
35
  //! <b>Returns</b>: A pointer to a static-duration object of a type derived from
36
36
  //! memory_resource for which allocate() always throws bad_alloc and for which
37
37
  //! deallocate() has no effect. The same value is returned every time this function
38
38
  //! is called. For return value p and memory resource r, p->is_equal(r) returns &r == p.
39
- BOOST_CONTAINER_DECL memory_resource* null_memory_resource() BOOST_NOEXCEPT;
39
+ BOOST_CONTAINER_NODISCARD BOOST_CONTAINER_DECL memory_resource* null_memory_resource() BOOST_NOEXCEPT;
40
40
 
41
41
  //! <b>Effects</b>: If r is non-null, sets the value of the default memory resource
42
42
  //! pointer to r, otherwise sets the default memory resource pointer to new_delete_resource().
@@ -52,7 +52,7 @@ BOOST_CONTAINER_DECL memory_resource* set_default_resource(memory_resource* r) B
52
52
 
53
53
  //! <b>Returns</b>: The current value of the default
54
54
  //! memory resource pointer.
55
- BOOST_CONTAINER_DECL memory_resource* get_default_resource() BOOST_NOEXCEPT;
55
+ BOOST_CONTAINER_NODISCARD BOOST_CONTAINER_DECL memory_resource* get_default_resource() BOOST_NOEXCEPT;
56
56
 
57
57
  } //namespace pmr {
58
58
  } //namespace container {
@@ -0,0 +1,43 @@
1
+ /* Hub container.
2
+ *
3
+ * Copyright 2025-2026 Joaquin M Lopez Munoz.
4
+ * Distributed under the Boost Software License, Version 1.0.
5
+ * (See accompanying file LICENSE_1_0.txt or copy at
6
+ * http://www.boost.org/LICENSE_1_0.txt)
7
+ */
8
+
9
+ #ifndef BOOST_CONTAINER_PMR_HUB_HPP
10
+ #define BOOST_CONTAINER_PMR_HUB_HPP
11
+
12
+ #if defined (_MSC_VER)
13
+ # pragma once
14
+ #endif
15
+
16
+ #include <boost/container/hub.hpp>
17
+ #include <boost/container/pmr/polymorphic_allocator.hpp>
18
+
19
+ namespace boost {
20
+ namespace container {
21
+ namespace pmr {
22
+
23
+ #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
24
+
25
+ template <class T>
26
+ using hub = boost::container::hub<T, polymorphic_allocator<T> >;
27
+
28
+ #endif
29
+
30
+ //! A portable metafunction to obtain a hub
31
+ //! that uses a polymorphic allocator.
32
+ template<class T>
33
+ struct hub_of
34
+ {
35
+ typedef boost::container::hub
36
+ < T, polymorphic_allocator<T> > type;
37
+ };
38
+
39
+ } //namespace pmr {
40
+ } //namespace container {
41
+ } //namespace boost {
42
+
43
+ #endif //BOOST_CONTAINER_PMR_HUB_HPP
@@ -28,7 +28,7 @@ namespace pmr {
28
28
 
29
29
  //! The memory_resource class is an abstract interface to an
30
30
  //! unbounded set of classes encapsulating memory resources.
31
- class memory_resource
31
+ class BOOST_CONTAINER_NOVTABLE memory_resource
32
32
  {
33
33
  public:
34
34
  // For exposition only
@@ -41,11 +41,11 @@ class memory_resource
41
41
 
42
42
  //! <b>Effects</b>: Equivalent to
43
43
  //! `return do_allocate(bytes, alignment);`
44
- void* allocate(std::size_t bytes, std::size_t alignment = max_align)
44
+ BOOST_CONTAINER_NODISCARD void* allocate(std::size_t bytes, std::size_t alignment = max_align)
45
45
  {
46
46
  //Obtain a pointer to enough storage and initialize the lifetime
47
47
  //of an array object of the given size in the address
48
- return ::operator new(bytes, this->do_allocate(bytes, alignment), boost_container_new_t());
48
+ return ::operator new(bytes, this->do_allocate(bytes, alignment), boost_container_init_life_t());
49
49
  }
50
50
 
51
51
  //! <b>Effects</b>: Equivalent to
@@ -62,11 +62,13 @@ class memory_resource
62
62
 
63
63
  //! <b>Returns</b>:
64
64
  //! `&a == &b || a.is_equal(b)`.
65
+ BOOST_CONTAINER_NODISCARD
65
66
  friend bool operator==(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
66
67
  { return &a == &b || a.is_equal(b); }
67
68
 
68
69
  //! <b>Returns</b>:
69
70
  //! !(a == b).
71
+ BOOST_CONTAINER_NODISCARD
70
72
  friend bool operator!=(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
71
73
  { return !(a == b); }
72
74
 
@@ -112,6 +112,7 @@ class BOOST_CONTAINER_DECL monotonic_buffer_resource
112
112
  ~monotonic_buffer_resource() BOOST_OVERRIDE;
113
113
 
114
114
  //! <b>Effects</b>: `upstream_resource()->deallocate()` as necessary to release all allocated memory.
115
+ //! Resets *this to its initial state at construction.
115
116
  //! [Note: memory is released back to `upstream_resource()` even if some blocks that were allocated
116
117
  //! from this have not been deallocated from this. - end note]
117
118
  void release() BOOST_NOEXCEPT;
@@ -78,7 +78,7 @@ class polymorphic_allocator
78
78
 
79
79
  //! <b>Returns</b>: Equivalent to
80
80
  //! `static_cast<T*>(m_resource->allocate(n * sizeof(T), alignof(T)))`.
81
- T* allocate(size_t n)
81
+ BOOST_CONTAINER_NODISCARD T* allocate(size_t n)
82
82
  { return static_cast<T*>(m_resource->allocate(n*sizeof(T), ::boost::move_detail::alignment_of<T>::value)); }
83
83
 
84
84
  //! <b>Requires</b>: p was allocated from a memory resource, x, equal to *m_resource,
@@ -31,6 +31,8 @@
31
31
  namespace boost {
32
32
  namespace container {
33
33
 
34
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
35
+
34
36
  namespace pmr_dtl {
35
37
 
36
38
  template<class T>
@@ -53,6 +55,8 @@ struct max_allocator_alignment< std::allocator<T> >
53
55
 
54
56
  } //namespace pmr_dtl
55
57
 
58
+ #endif //BOOST_CONTAINER_DOXYGEN_INVOKED
59
+
56
60
  namespace pmr {
57
61
 
58
62
  //! An instance of resource_adaptor<Allocator> is an adaptor that wraps a memory_resource interface