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.
- checksums.yaml +4 -4
- data/CHANGELOG +37 -15
- data/build/cxx_tests.rb +2 -0
- data/build/support/cxx_dependency_map.rb +3 -63
- data/src/agent/Core/Config.h +1 -1
- data/src/agent/Core/Controller/Config.h +1 -1
- data/src/agent/Shared/ApiServerUtils.h +1 -1
- data/src/agent/Watchdog/Config.h +1 -1
- data/src/apache2_module/Hooks.cpp +13 -0
- data/src/apache2_module/Utils.h +14 -0
- data/src/cxx_supportlib/Constants.h +1 -1
- data/src/cxx_supportlib/FileTools/FileManip.cpp +27 -3
- data/src/cxx_supportlib/InstanceDirectory.h +30 -3
- data/src/cxx_supportlib/ServerKit/Errors.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpRequest.h +1 -1
- data/src/cxx_supportlib/ServerKit/llerrors.h +3 -3
- data/src/cxx_supportlib/ServerKit/llversion.h +1 -1
- data/src/cxx_supportlib/{ServerKit/llhttp_api.c → vendor-copy/llhttp/api.c} +30 -23
- data/src/cxx_supportlib/{ServerKit → vendor-copy/llhttp}/llhttp.c +1756 -1645
- data/src/cxx_supportlib/{ServerKit → vendor-copy/llhttp}/llhttp.h +35 -13
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/classification.hpp +19 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/formatter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/trim_all.hpp +0 -2
- data/src/cxx_supportlib/vendor-modified/boost/assert.hpp +20 -13
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_x86.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/atomic/thread_pause.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/debug.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx03.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx11.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx14.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx17.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx20.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx23.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +6 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang_version.hpp +10 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +5 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/detail/cxx_composite.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/workaround.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +57 -53
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +10 -10
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +34 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +14 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +176 -2287
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool.hpp +13 -9
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +186 -70
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/algorithm.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/aligned_allocation.hpp +149 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_helpers.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_lib.h +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/bit_utilities.hpp +133 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +18 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_end.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/container_rebind.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +20 -10
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/deque_impl.hpp +2744 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +202 -104
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/dlmalloc.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +161 -85
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_constructible.hpp +180 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/math_functions.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/next_capacity.hpp +9 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool.hpp +18 -14
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool_impl.hpp +256 -41
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/operator_new_helpers.hpp +75 -24
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +1 -56
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/placement_new.hpp +16 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common_alloc.hpp +1 -7
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/range_utils.hpp +196 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/std_fwd.hpp +33 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +124 -69
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +109 -7
- data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +168 -162
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/nest.hpp +2978 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/pmr/nest.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_all_of.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_any_of.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_copy.hpp +229 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_copy_if.hpp +270 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_copy_n.hpp +308 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_count.hpp +101 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_count_if.hpp +100 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_equal.hpp +268 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_fill.hpp +101 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_fill_n.hpp +171 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find.hpp +110 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_if.hpp +110 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_if_not.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_last.hpp +179 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_last_if.hpp +179 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_find_last_if_not.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_for_each.hpp +92 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_generate.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_generate_n.hpp +162 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_is_partitioned.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_is_sorted.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_is_sorted_until.hpp +169 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_iterator_traits.hpp +382 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_merge.hpp +428 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_mismatch.hpp +350 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_none_of.hpp +98 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_partition.hpp +296 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_partition_copy.hpp +105 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_partition_point.hpp +116 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove_copy.hpp +207 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove_copy_if.hpp +223 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_remove_if.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_replace.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_replace_if.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_reverse.hpp +245 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_reverse_copy.hpp +229 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_search.hpp +211 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_search_n.hpp +476 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_difference.hpp +300 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_intersection.hpp +287 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_symmetric_difference.hpp +306 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_set_union.hpp +294 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_stable_partition.hpp +153 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_swap_ranges.hpp +92 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_transform.hpp +93 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/experimental/wrapped_iterator.hpp +142 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +642 -417
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +141 -30
- data/src/cxx_supportlib/vendor-modified/boost/container/hub.hpp +2426 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +65 -57
- data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +247 -68
- data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +39 -33
- data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +156 -23
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/global_resource.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/hub.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +5 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/monotonic_buffer_resource.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/polymorphic_allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/resource_adaptor.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/segtor.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/segtor.hpp +905 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +148 -35
- data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +59 -52
- data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +632 -5
- data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +66 -60
- data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +46 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +612 -317
- data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator.hpp +54 -111
- data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_construction.hpp +100 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_fwd.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +233 -116
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +17 -10
- data/src/cxx_supportlib/vendor-modified/boost/date_time/period.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/describe/detail/config.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/encoder.hpp +114 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/error_info_impl.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/requires_cxx11.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/type_info.hpp +211 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/diagnostic_information.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +6 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/info.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +12 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/derivation_value_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +29 -174
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/generic_hook.hpp +18 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/key_nodeptr_comp.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +20 -11
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +42 -14
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +58 -22
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/iterator/advance.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/iterator/distance.hpp +8 -2
- data/src/cxx_supportlib/vendor-modified/boost/iterator/is_iterator.hpp +9 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/buffer_view.hpp +9 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/config.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +15 -7
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +23 -11
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +9 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +11 -2
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_basic_unlockedbuf.hpp +10 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +8 -1
- data/src/cxx_supportlib/vendor-modified/boost/{detail → lexical_cast/detail}/lcast_precision.hpp +13 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +10 -2
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +15 -2
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once_atomic.cpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +48 -46
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/move_helpers.hpp +24 -24
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/nsec_clock.hpp +12 -4
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +76 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/traits.hpp +11 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/algorithm.hpp +58 -37
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_copy_if.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_map_find.hpp +17 -9
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_remove_if.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/mp11/integer_sequence.hpp +6 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +6 -1
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_common_defs.hpp +188 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_factory_support.hpp +0 -6
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_hash.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_nonmember_interface.hpp +117 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +108 -83
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +39 -39
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_select_implementation.hpp +37 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_swap.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_trivially_copyable_base.hpp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/union_optional.hpp +724 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +93 -220
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional_fwd.hpp +14 -4
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional_io.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/random/binomial_distribution.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_int_distribution.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/rational.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/static_assert.hpp +4 -6
- data/src/cxx_supportlib/vendor-modified/boost/system/api_config.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category.hpp +13 -13
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category_impl.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_deque_base.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_queue_base.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v2/task_region.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +30 -28
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once_atomic.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/pthread_helpers.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/shared_mutex.hpp +16 -16
- data/src/cxx_supportlib/vendor-modified/boost/thread/v2/shared_mutex.hpp +26 -26
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map.hpp +196 -6
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_set.hpp +191 -6
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_node_map.hpp +196 -5
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_node_set.hpp +192 -5
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/concurrent_table.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/core.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/table.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +52 -16
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/ranges_support.hpp +104 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/type_traits.hpp +1 -14
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/unordered_printers.hpp +10 -4
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +121 -3
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +118 -3
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +338 -1
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map.hpp +121 -3
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set.hpp +118 -3
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +333 -1
- data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/jsoncpp/json-forwards.h +276 -143
- data/src/cxx_supportlib/vendor-modified/jsoncpp/json.h +1262 -771
- data/src/cxx_supportlib/vendor-modified/jsoncpp/jsoncpp.cpp +1704 -1586
- data/src/nginx_module/ContentHandler.c +35 -0
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +6 -6
- data/src/ruby_supportlib/phusion_passenger/utils/json.rb +25 -2
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +12 -1
- data/src/ruby_supportlib/phusion_passenger.rb +1 -1
- metadata +73 -8
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_utility.hpp +0 -41
- /data/src/cxx_supportlib/{ServerKit/llhttp_http.c → vendor-copy/llhttp/http.c} +0 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
//
|
|
3
|
+
// (C) Copyright Ion Gaztanaga 2025-2026. Distributed under the Boost
|
|
4
|
+
// Software License, Version 1.0. (See accompanying file
|
|
5
|
+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
6
|
+
//
|
|
7
|
+
// See http://www.boost.org/libs/container for documentation.
|
|
8
|
+
//
|
|
9
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
10
|
+
#ifndef BOOST_CONTAINER_EXPERIMENTAL_SEGMENTED_REVERSE_HPP
|
|
11
|
+
#define BOOST_CONTAINER_EXPERIMENTAL_SEGMENTED_REVERSE_HPP
|
|
12
|
+
|
|
13
|
+
#ifndef BOOST_CONFIG_HPP
|
|
14
|
+
# include <boost/config.hpp>
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
|
18
|
+
# pragma once
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
#include <boost/container/detail/config_begin.hpp>
|
|
22
|
+
#include <boost/container/detail/workaround.hpp>
|
|
23
|
+
#include <boost/container/experimental/segmented_iterator_traits.hpp>
|
|
24
|
+
#include <boost/move/adl_move_swap.hpp>
|
|
25
|
+
#include <boost/container/detail/iterator.hpp>
|
|
26
|
+
|
|
27
|
+
namespace boost {
|
|
28
|
+
namespace container {
|
|
29
|
+
|
|
30
|
+
namespace detail_algo {
|
|
31
|
+
|
|
32
|
+
//Same-segment reverse: simply a reverse loop with move-swaps. No segmentation
|
|
33
|
+
template <class BidirIt, class Cat>
|
|
34
|
+
BOOST_CONTAINER_FORCEINLINE
|
|
35
|
+
void segmented_reverse_dispatch(BidirIt first, BidirIt last, non_segmented_iterator_tag, const Cat &)
|
|
36
|
+
{
|
|
37
|
+
BOOST_CONTAINER_SEGMENTED_UNROLL(4)
|
|
38
|
+
while(first != last && first != --last) {
|
|
39
|
+
boost::adl_move_swap(*first, *last);
|
|
40
|
+
++first;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
template <class RAIter>
|
|
45
|
+
BOOST_CONTAINER_FORCEINLINE
|
|
46
|
+
void segmented_reverse_dispatch(RAIter first, RAIter last, non_segmented_iterator_tag, const std::random_access_iterator_tag &)
|
|
47
|
+
{
|
|
48
|
+
typedef typename iterator_traits<RAIter>::difference_type difference_type;
|
|
49
|
+
difference_type pairs = (last - first) / difference_type(2);
|
|
50
|
+
|
|
51
|
+
BOOST_CONTAINER_SEGMENTED_UNROLL(4)
|
|
52
|
+
for(; pairs; --pairs) {
|
|
53
|
+
--last;
|
|
54
|
+
boost::adl_move_swap(*first, *last);
|
|
55
|
+
++first;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
//////////////////////////////////////////////
|
|
60
|
+
// segmented_reverse_disjoint_ranges: swaps elements between
|
|
61
|
+
// [f, f_end) (forward) and [l_beg, l) (backward).
|
|
62
|
+
// Returns segduo with the final positions of f and l.
|
|
63
|
+
// At least one side is fully consumed on return.
|
|
64
|
+
//////////////////////////////////////////////
|
|
65
|
+
|
|
66
|
+
template <class It, class Cat>
|
|
67
|
+
BOOST_CONTAINER_FORCEINLINE
|
|
68
|
+
segduo<It, It> segmented_reverse_disjoint_ranges
|
|
69
|
+
(It f, It const f_end, It const l_beg, It l, non_segmented_iterator_tag, const Cat &)
|
|
70
|
+
{
|
|
71
|
+
BOOST_CONTAINER_SEGMENTED_UNROLL(4)
|
|
72
|
+
while (f != f_end && l != l_beg) {
|
|
73
|
+
--l;
|
|
74
|
+
boost::adl_move_swap(*f, *l);
|
|
75
|
+
++f;
|
|
76
|
+
}
|
|
77
|
+
return segduo<It, It>(f, l);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
template <class It>
|
|
81
|
+
BOOST_CONTAINER_FORCEINLINE
|
|
82
|
+
segduo<It, It> segmented_reverse_disjoint_ranges
|
|
83
|
+
(It f, It const f_end, It const l_beg, It l, non_segmented_iterator_tag, const std::random_access_iterator_tag &)
|
|
84
|
+
{
|
|
85
|
+
typedef typename iterator_traits<It>::difference_type difference_type;
|
|
86
|
+
|
|
87
|
+
difference_type n_f = f_end - f;
|
|
88
|
+
difference_type n_l = l - l_beg;
|
|
89
|
+
difference_type n = n_f < n_l ? n_f : n_l;
|
|
90
|
+
|
|
91
|
+
BOOST_CONTAINER_SEGMENTED_UNROLL(4)
|
|
92
|
+
for(; n; --n) {
|
|
93
|
+
--l;
|
|
94
|
+
boost::adl_move_swap(*f, *l);
|
|
95
|
+
++f;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return segduo<It, It>(f, l);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
template <class It, class Cat>
|
|
102
|
+
segduo<It, It> segmented_reverse_disjoint_ranges(It f, It f_end, It l_beg, It l, segmented_iterator_tag, const Cat&)
|
|
103
|
+
{
|
|
104
|
+
typedef segmented_iterator_traits<It> traits;
|
|
105
|
+
typedef typename traits::segment_iterator segment_iterator;
|
|
106
|
+
typedef typename traits::local_iterator local_iterator;
|
|
107
|
+
typedef typename segmented_iterator_traits
|
|
108
|
+
<local_iterator>::is_segmented_iterator is_local_seg_t;
|
|
109
|
+
typedef typename iterator_traits
|
|
110
|
+
<local_iterator>::iterator_category local_cat_t;
|
|
111
|
+
|
|
112
|
+
//Nothing to swap here if a range is empty
|
|
113
|
+
if (f == f_end || l == l_beg)
|
|
114
|
+
return segduo<It, It>(f, l);
|
|
115
|
+
|
|
116
|
+
segment_iterator fs = traits::segment(f);
|
|
117
|
+
const segment_iterator fs_end = traits::segment(f_end);
|
|
118
|
+
local_iterator fi = traits::local(f);
|
|
119
|
+
local_iterator fi_end = (fs == fs_end) ? traits::local(f_end) : traits::end(fs);
|
|
120
|
+
|
|
121
|
+
segment_iterator ls = traits::segment(l);
|
|
122
|
+
const segment_iterator ls_beg = traits::segment(l_beg);
|
|
123
|
+
local_iterator li = traits::local(l);
|
|
124
|
+
local_iterator li_beg = (ls == ls_beg) ? traits::local(l_beg) : traits::begin(ls);
|
|
125
|
+
|
|
126
|
+
//At least one of the two sides is guaranteed to be fully consumed after this loop
|
|
127
|
+
//since the ranges are guaranteed not to overlap
|
|
128
|
+
while (true) {
|
|
129
|
+
//Reverse the front and back segments recursively
|
|
130
|
+
segduo<local_iterator, local_iterator> r =
|
|
131
|
+
segmented_reverse_disjoint_ranges(fi, fi_end, li_beg, li, is_local_seg_t(), local_cat_t());
|
|
132
|
+
fi = r.first;
|
|
133
|
+
li = r.second;
|
|
134
|
+
|
|
135
|
+
//Independent advancement of forward and backward segments since ranges do not to overlap
|
|
136
|
+
|
|
137
|
+
//Check if the forward segment was fully consumed
|
|
138
|
+
if (fi == fi_end) {
|
|
139
|
+
//Check if there are no more segments to advance on the forward side, in which case we are done
|
|
140
|
+
if (fs == fs_end)
|
|
141
|
+
return segduo<It, It>(f_end, traits::compose(ls, li));
|
|
142
|
+
//Advance the forward segment
|
|
143
|
+
++fs;
|
|
144
|
+
fi = traits::begin(fs);
|
|
145
|
+
fi_end = (fs == fs_end) ? traits::local(f_end) : traits::end(fs);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
//Check if the backward segment was fully consumed
|
|
149
|
+
if (li == li_beg) {
|
|
150
|
+
//Check if there are no more segments to retreat on the backward side, in which case we are done
|
|
151
|
+
if (ls == ls_beg)
|
|
152
|
+
return segduo<It, It>(traits::compose(fs, fi), l_beg);
|
|
153
|
+
//Retreat the backward segment
|
|
154
|
+
--ls;
|
|
155
|
+
li = traits::end(ls);
|
|
156
|
+
li_beg = (ls == ls_beg) ? traits::local(l_beg) : traits::begin(ls);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
template <class SegIt, class Cat>
|
|
162
|
+
void segmented_reverse_dispatch(SegIt first, SegIt last, segmented_iterator_tag, const Cat &)
|
|
163
|
+
{
|
|
164
|
+
typedef segmented_iterator_traits<SegIt> traits;
|
|
165
|
+
typedef typename traits::segment_iterator segment_iterator;
|
|
166
|
+
typedef typename traits::local_iterator local_iterator;
|
|
167
|
+
typedef typename segmented_iterator_traits
|
|
168
|
+
<local_iterator>::is_segmented_iterator is_local_seg_t;
|
|
169
|
+
typedef typename iterator_traits
|
|
170
|
+
<local_iterator>::iterator_category local_cat_t;
|
|
171
|
+
|
|
172
|
+
segment_iterator sf = traits::segment(first);
|
|
173
|
+
segment_iterator sl = traits::segment(last);
|
|
174
|
+
local_iterator f_loc = traits::local(first);
|
|
175
|
+
local_iterator l_loc = traits::local(last);
|
|
176
|
+
|
|
177
|
+
if (sf != sl) {
|
|
178
|
+
local_iterator f_end = traits::end(sf);
|
|
179
|
+
local_iterator l_beg = traits::begin(sl);
|
|
180
|
+
|
|
181
|
+
while (true) {
|
|
182
|
+
segduo<local_iterator, local_iterator> r =
|
|
183
|
+
segmented_reverse_disjoint_ranges(f_loc, f_end, l_beg, l_loc, is_local_seg_t(), local_cat_t());
|
|
184
|
+
f_loc = r.first;
|
|
185
|
+
l_loc = r.second;
|
|
186
|
+
|
|
187
|
+
//Check if the backward side reached the end of its segment
|
|
188
|
+
if (l_loc == l_beg) {
|
|
189
|
+
//If both sides reached the end of their respective segments
|
|
190
|
+
//advance the forward segment and retreat the backward segment
|
|
191
|
+
if (f_loc == f_end) {
|
|
192
|
+
++sf;
|
|
193
|
+
//If both segments were adjacent and we exhausted both, we are done
|
|
194
|
+
if (sf == sl)
|
|
195
|
+
return;
|
|
196
|
+
|
|
197
|
+
f_loc = traits::begin(sf);
|
|
198
|
+
f_end = traits::end(sf);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
--sl;
|
|
202
|
+
if (sf == sl) {
|
|
203
|
+
l_loc = f_end;
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
l_beg = traits::begin(sl);
|
|
207
|
+
l_loc = traits::end(sl);
|
|
208
|
+
}
|
|
209
|
+
else { //The forward side reached the end of its segment
|
|
210
|
+
++sf;
|
|
211
|
+
if (sf == sl) {
|
|
212
|
+
f_loc = l_beg;
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
f_loc = traits::begin(sf);
|
|
216
|
+
f_end = traits::end(sf);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
//Final reverse loop within the final segment
|
|
221
|
+
segmented_reverse_dispatch(f_loc, l_loc, is_local_seg_t(), local_cat_t());
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
} // namespace detail_algo
|
|
225
|
+
|
|
226
|
+
//! Reverses the order of elements in [first, last).
|
|
227
|
+
//! When the iterator is segmented, exploits segmentation on both
|
|
228
|
+
//! the forward and backward sides to reduce per-element overhead.
|
|
229
|
+
template <class BidirIter>
|
|
230
|
+
BOOST_CONTAINER_FORCEINLINE
|
|
231
|
+
void segmented_reverse(BidirIter first, BidirIter last)
|
|
232
|
+
{
|
|
233
|
+
typedef segmented_iterator_traits<BidirIter> traits;
|
|
234
|
+
detail_algo::segmented_reverse_dispatch
|
|
235
|
+
( first, last
|
|
236
|
+
, typename traits::is_segmented_iterator()
|
|
237
|
+
, typename iterator_traits<BidirIter>::iterator_category());
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
} // namespace container
|
|
241
|
+
} // namespace boost
|
|
242
|
+
|
|
243
|
+
#include <boost/container/detail/config_end.hpp>
|
|
244
|
+
|
|
245
|
+
#endif // BOOST_CONTAINER_EXPERIMENTAL_SEGMENTED_REVERSE_HPP
|
data/src/cxx_supportlib/vendor-modified/boost/container/experimental/segmented_reverse_copy.hpp
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
//
|
|
3
|
+
// (C) Copyright Ion Gaztanaga 2025-2026. Distributed under the Boost
|
|
4
|
+
// Software License, Version 1.0. (See accompanying file
|
|
5
|
+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
6
|
+
//
|
|
7
|
+
// See http://www.boost.org/libs/container for documentation.
|
|
8
|
+
//
|
|
9
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
10
|
+
#ifndef BOOST_CONTAINER_EXPERIMENTAL_SEGMENTED_REVERSE_COPY_HPP
|
|
11
|
+
#define BOOST_CONTAINER_EXPERIMENTAL_SEGMENTED_REVERSE_COPY_HPP
|
|
12
|
+
|
|
13
|
+
#ifndef BOOST_CONFIG_HPP
|
|
14
|
+
# include <boost/config.hpp>
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
|
18
|
+
# pragma once
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
#include <boost/container/detail/config_begin.hpp>
|
|
22
|
+
#include <boost/container/detail/workaround.hpp>
|
|
23
|
+
#include <boost/container/experimental/segmented_iterator_traits.hpp>
|
|
24
|
+
#include <boost/container/detail/iterator.hpp>
|
|
25
|
+
|
|
26
|
+
namespace boost {
|
|
27
|
+
namespace container {
|
|
28
|
+
|
|
29
|
+
template <class BidirIter, class OutIter>
|
|
30
|
+
OutIter segmented_reverse_copy(BidirIter first, BidirIter last, OutIter result);
|
|
31
|
+
|
|
32
|
+
namespace detail_algo {
|
|
33
|
+
|
|
34
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
35
|
+
// Bounded destination helper: reverse-copies from [first, last) into
|
|
36
|
+
// [dst_first, dst_last), reading backward from last toward first,
|
|
37
|
+
// writing forward into dst.
|
|
38
|
+
// Returns segduo<BidirIter, DstIter> where .first is the updated source
|
|
39
|
+
// read position (last, moved backward) and .second is the updated dst.
|
|
40
|
+
// When dst_last is unreachable_sentinel_t the destination-full check
|
|
41
|
+
// is optimised away, giving the same code as an unbounded loop.
|
|
42
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
43
|
+
|
|
44
|
+
template <class BidirIter, class DstIter, class DstSent, class DstTag, class SrcCat>
|
|
45
|
+
BOOST_CONTAINER_FORCEINLINE typename algo_enable_if_c<!DstTag::value, segduo<BidirIter, DstIter> >::type
|
|
46
|
+
segmented_reverse_copy_dst_bounded
|
|
47
|
+
(BidirIter first, BidirIter last, DstIter dst_first, DstSent dst_last, DstTag, SrcCat)
|
|
48
|
+
{
|
|
49
|
+
BOOST_CONTAINER_SEGMENTED_UNROLL(4)
|
|
50
|
+
while(first != last) {
|
|
51
|
+
if(dst_first == dst_last)
|
|
52
|
+
goto out_path;
|
|
53
|
+
--last;
|
|
54
|
+
*dst_first = *last;
|
|
55
|
+
++dst_first;
|
|
56
|
+
}
|
|
57
|
+
out_path:
|
|
58
|
+
return segduo<BidirIter, DstIter>(last, dst_first);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
template <class RASrcIter, class RADstIter>
|
|
62
|
+
BOOST_CONTAINER_FORCEINLINE
|
|
63
|
+
typename iterator_enable_if_tag
|
|
64
|
+
<RADstIter, std::random_access_iterator_tag, segduo<RASrcIter, RADstIter> >::type
|
|
65
|
+
segmented_reverse_copy_dst_bounded
|
|
66
|
+
(RASrcIter first, RASrcIter last, RADstIter dst_first, RADstIter dst_last,
|
|
67
|
+
const non_segmented_iterator_tag &, const std::random_access_iterator_tag &src_tag)
|
|
68
|
+
{
|
|
69
|
+
typedef typename iterator_traits<RASrcIter>::difference_type difference_type;
|
|
70
|
+
const difference_type src_n = last - first;
|
|
71
|
+
const difference_type dst_n = difference_type(dst_last - dst_first);
|
|
72
|
+
const difference_type n = src_n < dst_n ? src_n : dst_n;
|
|
73
|
+
return (segmented_reverse_copy_dst_bounded)(last - n, last, dst_first, unreachable_sentinel_t(),
|
|
74
|
+
non_segmented_iterator_tag(), src_tag);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
template <class BidirIter, class SegDstIter, class SrcCat>
|
|
78
|
+
segduo<BidirIter, SegDstIter> segmented_reverse_copy_dst_bounded
|
|
79
|
+
(BidirIter first, BidirIter last, SegDstIter dst_first, SegDstIter dst_last,
|
|
80
|
+
segmented_iterator_tag, SrcCat)
|
|
81
|
+
{
|
|
82
|
+
typedef segmented_iterator_traits<SegDstIter> dst_traits;
|
|
83
|
+
typedef typename dst_traits::local_iterator dst_local_iterator;
|
|
84
|
+
typedef typename dst_traits::segment_iterator dst_segment_iterator;
|
|
85
|
+
typedef typename segmented_iterator_traits<dst_local_iterator>::is_segmented_iterator dst_is_local_seg_t;
|
|
86
|
+
|
|
87
|
+
dst_segment_iterator sfirst = dst_traits::segment(dst_first);
|
|
88
|
+
const dst_segment_iterator slast = dst_traits::segment(dst_last);
|
|
89
|
+
|
|
90
|
+
if(sfirst == slast) {
|
|
91
|
+
segduo<BidirIter, dst_local_iterator> r = (segmented_reverse_copy_dst_bounded)
|
|
92
|
+
(first, last, dst_traits::local(dst_first), dst_traits::local(dst_last), dst_is_local_seg_t(), SrcCat());
|
|
93
|
+
return segduo<BidirIter, SegDstIter>(r.first, dst_traits::compose(sfirst, r.second));
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
segduo<BidirIter, dst_local_iterator> r = (segmented_reverse_copy_dst_bounded)
|
|
97
|
+
(first, last, dst_traits::local(dst_first), dst_traits::end(sfirst), dst_is_local_seg_t(), SrcCat());
|
|
98
|
+
last = r.first;
|
|
99
|
+
if(first == last)
|
|
100
|
+
return segduo<BidirIter, SegDstIter>(last, dst_traits::compose(sfirst, r.second));
|
|
101
|
+
|
|
102
|
+
for(++sfirst; sfirst != slast; ++sfirst) {
|
|
103
|
+
r = (segmented_reverse_copy_dst_bounded)
|
|
104
|
+
(first, last, dst_traits::begin(sfirst), dst_traits::end(sfirst), dst_is_local_seg_t(), SrcCat());
|
|
105
|
+
last = r.first;
|
|
106
|
+
if(first == last)
|
|
107
|
+
return segduo<BidirIter, SegDstIter>(last, dst_traits::compose(sfirst, r.second));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
r = (segmented_reverse_copy_dst_bounded)
|
|
111
|
+
(first, last, dst_traits::begin(slast), dst_traits::local(dst_last), dst_is_local_seg_t(), SrcCat());
|
|
112
|
+
return segduo<BidirIter, SegDstIter>(r.first, dst_traits::compose(sfirst, r.second));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
117
|
+
// Destination dispatch: routes to bounded helper.
|
|
118
|
+
// Non-segmented destination: single unbounded call (unreachable_sentinel_t).
|
|
119
|
+
// Segmented destination: loop over destination segments, bounded per segment.
|
|
120
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
121
|
+
|
|
122
|
+
template <class BidirIter, class DstIter, class Cat>
|
|
123
|
+
BOOST_CONTAINER_FORCEINLINE DstIter segmented_reverse_copy_dst_dispatch
|
|
124
|
+
(BidirIter first, BidirIter last, DstIter result,
|
|
125
|
+
const non_segmented_iterator_tag &, Cat)
|
|
126
|
+
{
|
|
127
|
+
return (segmented_reverse_copy_dst_bounded)
|
|
128
|
+
(first, last, result, unreachable_sentinel_t(), non_segmented_iterator_tag(), Cat()).second;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
template <class BidirIter, class SegDstIter, class Cat>
|
|
132
|
+
SegDstIter segmented_reverse_copy_dst_dispatch
|
|
133
|
+
(BidirIter first, BidirIter last, SegDstIter result,
|
|
134
|
+
const segmented_iterator_tag &, Cat)
|
|
135
|
+
{
|
|
136
|
+
typedef segmented_iterator_traits<SegDstIter> dst_traits;
|
|
137
|
+
typedef typename dst_traits::local_iterator dst_local_iterator;
|
|
138
|
+
typedef typename dst_traits::segment_iterator dst_segment_iterator;
|
|
139
|
+
typedef typename segmented_iterator_traits<dst_local_iterator>::is_segmented_iterator dst_is_local_seg_t;
|
|
140
|
+
|
|
141
|
+
if(first == last)
|
|
142
|
+
return result;
|
|
143
|
+
|
|
144
|
+
dst_segment_iterator dst_seg = dst_traits::segment(result);
|
|
145
|
+
dst_local_iterator dst_local = dst_traits::local(result);
|
|
146
|
+
|
|
147
|
+
while(1) {
|
|
148
|
+
const dst_local_iterator dst_end = dst_traits::end(dst_seg);
|
|
149
|
+
const segduo<BidirIter, dst_local_iterator> r = (segmented_reverse_copy_dst_bounded)
|
|
150
|
+
(first, last, dst_local, dst_end, dst_is_local_seg_t(), Cat());
|
|
151
|
+
last = r.first;
|
|
152
|
+
if(first != last) {
|
|
153
|
+
++dst_seg;
|
|
154
|
+
dst_local = dst_traits::begin(dst_seg);
|
|
155
|
+
}
|
|
156
|
+
else
|
|
157
|
+
return dst_traits::compose(dst_seg, r.second);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
162
|
+
// Source dispatch: walks the source (read pointer) segments in reverse
|
|
163
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
164
|
+
|
|
165
|
+
template <class BidirIter, class OutIter, class Tag, class Cat>
|
|
166
|
+
BOOST_CONTAINER_FORCEINLINE
|
|
167
|
+
typename algo_enable_if_c<!Tag::value, OutIter>::type
|
|
168
|
+
segmented_reverse_copy_dispatch(BidirIter first, BidirIter last, OutIter result, Tag, Cat)
|
|
169
|
+
{
|
|
170
|
+
#if !defined(BOOST_CONTAINER_DISABLE_MULTI_SEGMENTED_ALGO)
|
|
171
|
+
typedef segmented_iterator_traits<OutIter> dst_traits;
|
|
172
|
+
return (segmented_reverse_copy_dst_dispatch)
|
|
173
|
+
(first, last, result, typename dst_traits::is_segmented_iterator(), Cat());
|
|
174
|
+
#else
|
|
175
|
+
return (segmented_reverse_copy_dst_dispatch)
|
|
176
|
+
(first, last, result, non_segmented_iterator_tag(), Cat());
|
|
177
|
+
#endif
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
template <class SegIter, class OutIter, class Cat>
|
|
181
|
+
OutIter segmented_reverse_copy_dispatch
|
|
182
|
+
(SegIter first, SegIter last, OutIter result, segmented_iterator_tag, Cat)
|
|
183
|
+
{
|
|
184
|
+
typedef segmented_iterator_traits<SegIter> traits;
|
|
185
|
+
typedef typename traits::local_iterator local_iterator;
|
|
186
|
+
typedef typename traits::segment_iterator segment_iterator;
|
|
187
|
+
typedef typename segmented_iterator_traits
|
|
188
|
+
<local_iterator>::is_segmented_iterator is_local_seg_t;
|
|
189
|
+
typedef typename iterator_traits<local_iterator>::iterator_category local_cat_t;
|
|
190
|
+
|
|
191
|
+
segment_iterator const sfirst = traits::segment(first);
|
|
192
|
+
segment_iterator slast = traits::segment(last);
|
|
193
|
+
|
|
194
|
+
if(sfirst == slast) {
|
|
195
|
+
return (segmented_reverse_copy_dispatch)(traits::local(first), traits::local(last), result, is_local_seg_t(), local_cat_t());
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
result = (segmented_reverse_copy_dispatch)(traits::begin(slast), traits::local(last), result, is_local_seg_t(), local_cat_t());
|
|
199
|
+
|
|
200
|
+
for (--slast; slast != sfirst; --slast)
|
|
201
|
+
result = (segmented_reverse_copy_dispatch)(traits::begin(slast), traits::end(slast), result, is_local_seg_t(), local_cat_t());
|
|
202
|
+
|
|
203
|
+
return (segmented_reverse_copy_dispatch)(traits::local(first), traits::end(sfirst), result, is_local_seg_t(), local_cat_t());
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
} // namespace detail_algo
|
|
208
|
+
|
|
209
|
+
//! Copies elements from [first, last) to the range beginning at \c result
|
|
210
|
+
//! in reverse order. When the source range uses segmented iterators,
|
|
211
|
+
//! exploits segmentation by walking segments in reverse order, processing
|
|
212
|
+
//! each local range without per-element segment-boundary overhead.
|
|
213
|
+
//! When the output range also uses segmented iterators, walks output
|
|
214
|
+
//! segments as well (dual-segmented / multi-segmented dispatch).
|
|
215
|
+
//! Returns the output iterator past the last element written.
|
|
216
|
+
template <class BidirIter, class OutIter>
|
|
217
|
+
BOOST_CONTAINER_FORCEINLINE OutIter segmented_reverse_copy(BidirIter first, BidirIter last, OutIter result)
|
|
218
|
+
{
|
|
219
|
+
typedef segmented_iterator_traits<BidirIter> traits;
|
|
220
|
+
return detail_algo::segmented_reverse_copy_dispatch
|
|
221
|
+
(first, last, result, typename traits::is_segmented_iterator(), typename iterator_traits<BidirIter>::iterator_category());
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
} // namespace container
|
|
225
|
+
} // namespace boost
|
|
226
|
+
|
|
227
|
+
#include <boost/container/detail/config_end.hpp>
|
|
228
|
+
|
|
229
|
+
#endif // BOOST_CONTAINER_EXPERIMENTAL_SEGMENTED_REVERSE_COPY_HPP
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
//
|
|
3
|
+
// (C) Copyright Ion Gaztanaga 2025-2026. Distributed under the Boost
|
|
4
|
+
// Software License, Version 1.0. (See accompanying file
|
|
5
|
+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
6
|
+
//
|
|
7
|
+
// See http://www.boost.org/libs/container for documentation.
|
|
8
|
+
//
|
|
9
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
10
|
+
#ifndef BOOST_CONTAINER_EXPERIMENTAL_SEGMENTED_SEARCH_HPP
|
|
11
|
+
#define BOOST_CONTAINER_EXPERIMENTAL_SEGMENTED_SEARCH_HPP
|
|
12
|
+
|
|
13
|
+
#ifndef BOOST_CONFIG_HPP
|
|
14
|
+
# include <boost/config.hpp>
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
|
18
|
+
# pragma once
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
#include <boost/container/detail/config_begin.hpp>
|
|
22
|
+
#include <boost/container/detail/workaround.hpp>
|
|
23
|
+
#include <boost/container/experimental/segmented_iterator_traits.hpp>
|
|
24
|
+
#include <boost/container/experimental/segmented_find_if.hpp>
|
|
25
|
+
#include <boost/container/experimental/segmented_mismatch.hpp>
|
|
26
|
+
|
|
27
|
+
namespace boost {
|
|
28
|
+
namespace container {
|
|
29
|
+
|
|
30
|
+
template <class FwdIt1, class Sent1, class FwdIt2, class Sent2>
|
|
31
|
+
FwdIt1 segmented_search
|
|
32
|
+
(FwdIt1 first, Sent1 last, FwdIt2 s_first, Sent2 s_last);
|
|
33
|
+
|
|
34
|
+
namespace detail_algo {
|
|
35
|
+
|
|
36
|
+
/* ---------------------------------------------------------------------------
|
|
37
|
+
Original (non-recursive) implementation. Kept here for reference.
|
|
38
|
+
It only exploits one level of segmentation on the [first, last) haystack
|
|
39
|
+
and no segmentation on the [s_first, s_last) needle. The verification
|
|
40
|
+
step (matches_at) walks the fully composed segmented iterator one element
|
|
41
|
+
at a time, which pays the segmented-increment cost on every step.
|
|
42
|
+
|
|
43
|
+
template <class FwdIt1, class Sent, class FwdIt2, class Sent2>
|
|
44
|
+
bool matches_at(FwdIt1 pos, Sent last, FwdIt2 s_first, Sent2 s_last)
|
|
45
|
+
{
|
|
46
|
+
for(; s_first != s_last; ++s_first, ++pos)
|
|
47
|
+
if(pos == last || !(*pos == *s_first))
|
|
48
|
+
return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Non-recursive: match verification (matches_at) must span across segment
|
|
53
|
+
// boundaries using the full segmented iterator.
|
|
54
|
+
template <class SegIter, class FwdIt2, class Sent2>
|
|
55
|
+
SegIter segmented_search_dispatch
|
|
56
|
+
(SegIter first, SegIter last, FwdIt2 s_first, Sent2 s_last, segmented_iterator_tag)
|
|
57
|
+
{
|
|
58
|
+
if(s_first == s_last) return first;
|
|
59
|
+
|
|
60
|
+
typedef segmented_iterator_traits<SegIter> traits;
|
|
61
|
+
typedef typename traits::local_iterator local_iterator;
|
|
62
|
+
typedef typename traits::segment_iterator segment_iterator;
|
|
63
|
+
|
|
64
|
+
segment_iterator scur = traits::segment(first);
|
|
65
|
+
segment_iterator slast = traits::segment(last);
|
|
66
|
+
local_iterator lcur = traits::local(first);
|
|
67
|
+
|
|
68
|
+
if(scur == slast) {
|
|
69
|
+
local_iterator lend = traits::local(last);
|
|
70
|
+
for(; lcur != lend; ++lcur) {
|
|
71
|
+
if(*lcur == *s_first) {
|
|
72
|
+
SegIter pos = traits::compose(scur, lcur);
|
|
73
|
+
if(matches_at(pos, last, s_first, s_last))
|
|
74
|
+
return pos;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
{
|
|
80
|
+
local_iterator lend = traits::end(scur);
|
|
81
|
+
for(; lcur != lend; ++lcur) {
|
|
82
|
+
if(*lcur == *s_first) {
|
|
83
|
+
SegIter pos = traits::compose(scur, lcur);
|
|
84
|
+
if(matches_at(pos, last, s_first, s_last))
|
|
85
|
+
return pos;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
for(++scur; scur != slast; ++scur) {
|
|
90
|
+
local_iterator lb = traits::begin(scur);
|
|
91
|
+
local_iterator le = traits::end(scur);
|
|
92
|
+
for(lcur = lb; lcur != le; ++lcur) {
|
|
93
|
+
if(*lcur == *s_first) {
|
|
94
|
+
SegIter pos = traits::compose(scur, lcur);
|
|
95
|
+
if(matches_at(pos, last, s_first, s_last))
|
|
96
|
+
return pos;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
{
|
|
101
|
+
local_iterator lb = traits::begin(scur);
|
|
102
|
+
local_iterator ll = traits::local(last);
|
|
103
|
+
for(lcur = lb; lcur != ll; ++lcur) {
|
|
104
|
+
if(*lcur == *s_first) {
|
|
105
|
+
SegIter pos = traits::compose(scur, lcur);
|
|
106
|
+
if(matches_at(pos, last, s_first, s_last))
|
|
107
|
+
return pos;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return last;
|
|
113
|
+
}
|
|
114
|
+
--------------------------------------------------------------------------- */
|
|
115
|
+
|
|
116
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
117
|
+
// Recursive segmented dispatch: find-then-verify.
|
|
118
|
+
//
|
|
119
|
+
// 1. segmented_find_if locates a candidate c where *c == *s_first, walking
|
|
120
|
+
// the source recursively (exploits every level of segmentation and uses
|
|
121
|
+
// the unrolled RA fast path at the leaves).
|
|
122
|
+
// 2. segmented_mismatch_bounded_dispatch verifies the match starting at
|
|
123
|
+
// (c, s_first), bounded on both sides, recursive on both sides.
|
|
124
|
+
//
|
|
125
|
+
// The equal_to_deref predicate keeps the search proxy-safe: *s_first is
|
|
126
|
+
// re-evaluated on every comparison, so a prvalue proxy never outlives the
|
|
127
|
+
// call that produced it.
|
|
128
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
129
|
+
template <class SegIter, class FwdIt2, class Sent2>
|
|
130
|
+
SegIter segmented_search_dispatch
|
|
131
|
+
(SegIter first, SegIter last, FwdIt2 s_first, Sent2 s_last, segmented_iterator_tag)
|
|
132
|
+
{
|
|
133
|
+
if (s_first == s_last)
|
|
134
|
+
return first;
|
|
135
|
+
|
|
136
|
+
typedef typename iterator_traits<SegIter>::iterator_category cat_t;
|
|
137
|
+
|
|
138
|
+
equal_to_deref<FwdIt2> eq(s_first);
|
|
139
|
+
|
|
140
|
+
while (first != last) {
|
|
141
|
+
//Search for the first element of the needle. This exploits segmentation
|
|
142
|
+
first = boost::container::segmented_find_if(first, last, eq);
|
|
143
|
+
if (first == last) // no match for the first needle element -> no match at all
|
|
144
|
+
return last;
|
|
145
|
+
|
|
146
|
+
//Verify the rest of the needle, bounded on both sides. This exploits segmentation
|
|
147
|
+
segduo<SegIter, FwdIt2> r = (segmented_mismatch_bounded_dispatch)
|
|
148
|
+
(first, last, s_first, s_last, mismatch_equal(), segmented_iterator_tag(), cat_t());
|
|
149
|
+
|
|
150
|
+
if (r.second == s_last)
|
|
151
|
+
return first; // full needle consumed -> match
|
|
152
|
+
if (r.first == last)
|
|
153
|
+
return last; // source exhausted before needle
|
|
154
|
+
++first;
|
|
155
|
+
}
|
|
156
|
+
return last;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
template <class FwdIt1, class Sent1, class FwdIt2, class Sent2, class Tag>
|
|
160
|
+
typename algo_enable_if_c<
|
|
161
|
+
!Tag::value || is_sentinel<Sent1, FwdIt1>::value, FwdIt1>::type
|
|
162
|
+
segmented_search_dispatch
|
|
163
|
+
(FwdIt1 first, Sent1 last, FwdIt2 s_first, Sent2 s_last, Tag)
|
|
164
|
+
{
|
|
165
|
+
if (s_first == s_last)
|
|
166
|
+
return first;
|
|
167
|
+
|
|
168
|
+
equal_to_deref<FwdIt2> eq(s_first);
|
|
169
|
+
|
|
170
|
+
while (first != last) {
|
|
171
|
+
first = boost::container::segmented_find_if(first, last, eq);
|
|
172
|
+
if (first == last)
|
|
173
|
+
return last;
|
|
174
|
+
|
|
175
|
+
FwdIt1 it = first;
|
|
176
|
+
FwdIt2 s_it = s_first;
|
|
177
|
+
for(;;) {
|
|
178
|
+
++it;
|
|
179
|
+
++s_it;
|
|
180
|
+
if(s_it == s_last)
|
|
181
|
+
return first;
|
|
182
|
+
if(it == last)
|
|
183
|
+
return last;
|
|
184
|
+
if(!(*it == *s_it))
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
++first;
|
|
188
|
+
}
|
|
189
|
+
return last;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
} // namespace detail_algo
|
|
193
|
+
|
|
194
|
+
//! Finds the first occurrence of the subsequence [s_first, s_last) in [first, last).
|
|
195
|
+
//! Returns an iterator to the beginning of the found subsequence, or \c last if not found.
|
|
196
|
+
//! Exploits segmentation recursively on both ranges.
|
|
197
|
+
template <class FwdIt1, class Sent1, class FwdIt2, class Sent2>
|
|
198
|
+
BOOST_CONTAINER_FORCEINLINE
|
|
199
|
+
FwdIt1 segmented_search(FwdIt1 first, Sent1 last, FwdIt2 s_first, Sent2 s_last)
|
|
200
|
+
{
|
|
201
|
+
typedef segmented_iterator_traits<FwdIt1> traits;
|
|
202
|
+
return detail_algo::segmented_search_dispatch
|
|
203
|
+
(first, last, s_first, s_last, typename traits::is_segmented_iterator());
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
} // namespace container
|
|
207
|
+
} // namespace boost
|
|
208
|
+
|
|
209
|
+
#include <boost/container/detail/config_end.hpp>
|
|
210
|
+
|
|
211
|
+
#endif // BOOST_CONTAINER_EXPERIMENTAL_SEGMENTED_SEARCH_HPP
|