re2 1.23.0 → 1.23.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.
- package/README.md +2 -0
- package/binding.gyp +3 -2
- package/package.json +5 -5
- package/vendor/abseil-cpp/CMake/AbseilDll.cmake +25 -4
- package/vendor/abseil-cpp/CMake/AbseilHelpers.cmake +6 -1
- package/vendor/abseil-cpp/CMakeLists.txt +2 -2
- package/vendor/abseil-cpp/MODULE.bazel +2 -2
- package/vendor/abseil-cpp/absl/algorithm/BUILD.bazel +0 -1
- package/vendor/abseil-cpp/absl/algorithm/CMakeLists.txt +0 -2
- package/vendor/abseil-cpp/absl/algorithm/container.h +191 -140
- package/vendor/abseil-cpp/absl/algorithm/container_test.cc +818 -0
- package/vendor/abseil-cpp/absl/base/BUILD.bazel +44 -5
- package/vendor/abseil-cpp/absl/base/CMakeLists.txt +42 -3
- package/vendor/abseil-cpp/absl/base/attributes.h +5 -1
- package/vendor/abseil-cpp/absl/base/call_once_test.cc +10 -10
- package/vendor/abseil-cpp/absl/base/casts.cc +61 -0
- package/vendor/abseil-cpp/absl/base/casts.h +128 -2
- package/vendor/abseil-cpp/absl/base/casts_test.cc +151 -0
- package/vendor/abseil-cpp/absl/base/config.h +13 -37
- package/vendor/abseil-cpp/absl/base/internal/dynamic_annotations.h +1 -1
- package/vendor/abseil-cpp/absl/base/internal/iterator_traits.h +4 -0
- package/vendor/abseil-cpp/absl/base/internal/nullability_traits.h +71 -0
- package/vendor/abseil-cpp/absl/base/internal/nullability_traits_test.cc +98 -0
- package/vendor/abseil-cpp/absl/base/internal/raw_logging.cc +3 -4
- package/vendor/abseil-cpp/absl/base/internal/spinlock.cc +13 -7
- package/vendor/abseil-cpp/absl/base/internal/spinlock.h +16 -11
- package/vendor/abseil-cpp/absl/base/internal/strerror_test.cc +2 -1
- package/vendor/abseil-cpp/absl/base/internal/sysinfo.cc +0 -9
- package/vendor/abseil-cpp/absl/base/internal/sysinfo_test.cc +0 -6
- package/vendor/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +1 -1
- package/vendor/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h +1 -1
- package/vendor/abseil-cpp/absl/base/macros.h +40 -17
- package/vendor/abseil-cpp/absl/base/nullability.h +1 -1
- package/vendor/abseil-cpp/absl/base/optimization.h +1 -3
- package/vendor/abseil-cpp/absl/base/options.h +1 -27
- package/vendor/abseil-cpp/absl/base/spinlock_test_common.cc +5 -8
- package/vendor/abseil-cpp/absl/cleanup/cleanup.h +4 -0
- package/vendor/abseil-cpp/absl/container/BUILD.bazel +195 -2
- package/vendor/abseil-cpp/absl/container/CMakeLists.txt +136 -2
- package/vendor/abseil-cpp/absl/container/btree_map.h +56 -6
- package/vendor/abseil-cpp/absl/container/btree_set.h +52 -6
- package/vendor/abseil-cpp/absl/container/btree_test.cc +107 -1
- package/vendor/abseil-cpp/absl/container/chunked_queue.h +755 -0
- package/vendor/abseil-cpp/absl/container/chunked_queue_benchmark.cc +386 -0
- package/vendor/abseil-cpp/absl/container/chunked_queue_test.cc +768 -0
- package/vendor/abseil-cpp/absl/container/fixed_array.h +4 -6
- package/vendor/abseil-cpp/absl/container/flat_hash_map.h +16 -6
- package/vendor/abseil-cpp/absl/container/flat_hash_map_test.cc +1 -2
- package/vendor/abseil-cpp/absl/container/flat_hash_set.h +16 -6
- package/vendor/abseil-cpp/absl/container/flat_hash_set_test.cc +0 -2
- package/vendor/abseil-cpp/absl/container/inlined_vector.h +12 -4
- package/vendor/abseil-cpp/absl/container/inlined_vector_test.cc +21 -0
- package/vendor/abseil-cpp/absl/container/internal/btree_container.h +14 -5
- package/vendor/abseil-cpp/absl/container/internal/chunked_queue.h +173 -0
- package/vendor/abseil-cpp/absl/container/internal/common.h +51 -0
- package/vendor/abseil-cpp/absl/container/internal/container_memory.h +7 -1
- package/vendor/abseil-cpp/absl/container/internal/container_memory_test.cc +11 -0
- package/vendor/abseil-cpp/absl/container/internal/hash_generator_testing.cc +0 -2
- package/vendor/abseil-cpp/absl/container/internal/hash_generator_testing.h +1 -2
- package/vendor/abseil-cpp/absl/container/internal/hash_policy_testing.h +0 -14
- package/vendor/abseil-cpp/absl/container/internal/hashtable_control_bytes.h +11 -8
- package/vendor/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +3 -4
- package/vendor/abseil-cpp/absl/container/internal/hashtablez_sampler.h +23 -6
- package/vendor/abseil-cpp/absl/container/internal/hashtablez_sampler_test.cc +31 -15
- package/vendor/abseil-cpp/absl/container/internal/heterogeneous_lookup_testing.h +80 -0
- package/vendor/abseil-cpp/absl/container/internal/inlined_vector.h +4 -12
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_map.h +35 -10
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set.cc +149 -23
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set.h +120 -126
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set_allocator_test.cc +4 -0
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set_benchmark.cc +8 -0
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set_probe_benchmark.cc +14 -59
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set_test.cc +111 -22
- package/vendor/abseil-cpp/absl/container/internal/unordered_map_constructor_test.h +53 -112
- package/vendor/abseil-cpp/absl/container/internal/unordered_map_lookup_test.h +10 -15
- package/vendor/abseil-cpp/absl/container/internal/unordered_map_members_test.h +3 -3
- package/vendor/abseil-cpp/absl/container/internal/unordered_map_modifiers_test.h +45 -61
- package/vendor/abseil-cpp/absl/container/internal/unordered_set_constructor_test.h +53 -112
- package/vendor/abseil-cpp/absl/container/internal/unordered_set_lookup_test.h +6 -9
- package/vendor/abseil-cpp/absl/container/internal/unordered_set_members_test.h +3 -3
- package/vendor/abseil-cpp/absl/container/internal/unordered_set_modifiers_test.h +25 -31
- package/vendor/abseil-cpp/absl/container/linked_hash_map.h +666 -0
- package/vendor/abseil-cpp/absl/container/linked_hash_map_benchmark.cc +140 -0
- package/vendor/abseil-cpp/absl/container/linked_hash_map_test.cc +987 -0
- package/vendor/abseil-cpp/absl/container/linked_hash_set.h +527 -0
- package/vendor/abseil-cpp/absl/container/linked_hash_set_benchmark.cc +84 -0
- package/vendor/abseil-cpp/absl/container/linked_hash_set_test.cc +947 -0
- package/vendor/abseil-cpp/absl/container/node_hash_map.h +17 -6
- package/vendor/abseil-cpp/absl/container/node_hash_set.h +16 -5
- package/vendor/abseil-cpp/absl/container/node_hash_set_test.cc +1 -2
- package/vendor/abseil-cpp/absl/copts/GENERATED_AbseilCopts.cmake +79 -0
- package/vendor/abseil-cpp/absl/copts/GENERATED_copts.bzl +79 -0
- package/vendor/abseil-cpp/absl/copts/copts.py +17 -4
- package/vendor/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc +67 -13
- package/vendor/abseil-cpp/absl/crc/internal/non_temporal_arm_intrinsics.h +4 -2
- package/vendor/abseil-cpp/absl/debugging/BUILD.bazel +31 -0
- package/vendor/abseil-cpp/absl/debugging/CMakeLists.txt +34 -0
- package/vendor/abseil-cpp/absl/debugging/failure_signal_handler.cc +2 -2
- package/vendor/abseil-cpp/absl/debugging/internal/borrowed_fixup_buffer.cc +118 -0
- package/vendor/abseil-cpp/absl/debugging/internal/borrowed_fixup_buffer.h +71 -0
- package/vendor/abseil-cpp/absl/debugging/internal/borrowed_fixup_buffer_test.cc +97 -0
- package/vendor/abseil-cpp/absl/debugging/internal/demangle.cc +2 -2
- package/vendor/abseil-cpp/absl/debugging/internal/elf_mem_image.h +4 -4
- package/vendor/abseil-cpp/absl/debugging/internal/examine_stack.cc +4 -0
- package/vendor/abseil-cpp/absl/debugging/internal/examine_stack.h +7 -0
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +1 -1
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +0 -7
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +3 -2
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +2 -1
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +8 -3
- package/vendor/abseil-cpp/absl/debugging/internal/symbolize.h +2 -2
- package/vendor/abseil-cpp/absl/debugging/stacktrace.cc +35 -67
- package/vendor/abseil-cpp/absl/debugging/stacktrace.h +3 -0
- package/vendor/abseil-cpp/absl/debugging/stacktrace_benchmark.cc +24 -1
- package/vendor/abseil-cpp/absl/debugging/stacktrace_test.cc +39 -15
- package/vendor/abseil-cpp/absl/debugging/symbolize_emscripten.inc +4 -17
- package/vendor/abseil-cpp/absl/debugging/symbolize_test.cc +25 -40
- package/vendor/abseil-cpp/absl/debugging/symbolize_win32.inc +2 -4
- package/vendor/abseil-cpp/absl/flags/BUILD.bazel +1 -0
- package/vendor/abseil-cpp/absl/flags/declare.h +9 -0
- package/vendor/abseil-cpp/absl/flags/flag.h +2 -1
- package/vendor/abseil-cpp/absl/flags/internal/commandlineflag.h +1 -1
- package/vendor/abseil-cpp/absl/flags/internal/flag.cc +3 -2
- package/vendor/abseil-cpp/absl/flags/marshalling.cc +1 -16
- package/vendor/abseil-cpp/absl/flags/parse.cc +4 -2
- package/vendor/abseil-cpp/absl/flags/parse_test.cc +1 -1
- package/vendor/abseil-cpp/absl/flags/reflection.cc +4 -3
- package/vendor/abseil-cpp/absl/functional/BUILD.bazel +4 -0
- package/vendor/abseil-cpp/absl/functional/CMakeLists.txt +4 -0
- package/vendor/abseil-cpp/absl/functional/any_invocable.h +3 -1
- package/vendor/abseil-cpp/absl/functional/function_ref.h +125 -20
- package/vendor/abseil-cpp/absl/functional/function_ref_test.cc +122 -9
- package/vendor/abseil-cpp/absl/functional/internal/any_invocable.h +13 -2
- package/vendor/abseil-cpp/absl/functional/internal/function_ref.h +42 -4
- package/vendor/abseil-cpp/absl/hash/hash_benchmark.cc +11 -0
- package/vendor/abseil-cpp/absl/hash/hash_test.cc +5 -2
- package/vendor/abseil-cpp/absl/hash/internal/hash.cc +184 -53
- package/vendor/abseil-cpp/absl/hash/internal/hash.h +116 -10
- package/vendor/abseil-cpp/absl/hash/internal/low_level_hash_test.cc +43 -4
- package/vendor/abseil-cpp/absl/log/BUILD.bazel +2 -0
- package/vendor/abseil-cpp/absl/log/CMakeLists.txt +35 -1
- package/vendor/abseil-cpp/absl/log/check_test_impl.inc +59 -4
- package/vendor/abseil-cpp/absl/log/die_if_null.cc +3 -1
- package/vendor/abseil-cpp/absl/log/die_if_null.h +24 -3
- package/vendor/abseil-cpp/absl/log/internal/BUILD.bazel +31 -1
- package/vendor/abseil-cpp/absl/log/internal/check_impl.h +2 -1
- package/vendor/abseil-cpp/absl/log/internal/check_op.cc +3 -1
- package/vendor/abseil-cpp/absl/log/internal/check_op.h +44 -18
- package/vendor/abseil-cpp/absl/log/internal/conditions.h +38 -35
- package/vendor/abseil-cpp/absl/log/internal/container.h +312 -0
- package/vendor/abseil-cpp/absl/log/internal/container_test.cc +254 -0
- package/vendor/abseil-cpp/absl/log/internal/log_impl.h +108 -110
- package/vendor/abseil-cpp/absl/log/internal/log_message.cc +5 -2
- package/vendor/abseil-cpp/absl/log/internal/log_message.h +5 -1
- package/vendor/abseil-cpp/absl/log/internal/strip.h +30 -31
- package/vendor/abseil-cpp/absl/log/internal/vlog_config.cc +19 -19
- package/vendor/abseil-cpp/absl/log/internal/vlog_config.h +0 -1
- package/vendor/abseil-cpp/absl/log/log.h +2 -2
- package/vendor/abseil-cpp/absl/meta/BUILD.bazel +51 -0
- package/vendor/abseil-cpp/absl/meta/CMakeLists.txt +46 -0
- package/vendor/abseil-cpp/absl/meta/internal/constexpr_testing.h +73 -0
- package/vendor/abseil-cpp/absl/meta/internal/constexpr_testing_test.cc +40 -0
- package/vendor/abseil-cpp/absl/meta/internal/requires.h +67 -0
- package/vendor/abseil-cpp/absl/meta/internal/requires_test.cc +66 -0
- package/vendor/abseil-cpp/absl/meta/type_traits.h +42 -1
- package/vendor/abseil-cpp/absl/meta/type_traits_test.cc +14 -0
- package/vendor/abseil-cpp/absl/numeric/int128.h +41 -21
- package/vendor/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +16 -22
- package/vendor/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +5 -7
- package/vendor/abseil-cpp/absl/numeric/int128_test.cc +52 -5
- package/vendor/abseil-cpp/absl/profiling/BUILD.bazel +1 -0
- package/vendor/abseil-cpp/absl/profiling/CMakeLists.txt +1 -0
- package/vendor/abseil-cpp/absl/profiling/hashtable.cc +18 -7
- package/vendor/abseil-cpp/absl/profiling/internal/profile_builder.cc +1 -0
- package/vendor/abseil-cpp/absl/random/internal/fastmath_test.cc +3 -5
- package/vendor/abseil-cpp/absl/random/internal/platform.h +0 -13
- package/vendor/abseil-cpp/absl/random/internal/randen_engine_test.cc +0 -1
- package/vendor/abseil-cpp/absl/random/internal/seed_material.cc +1 -27
- package/vendor/abseil-cpp/absl/status/BUILD.bazel +17 -0
- package/vendor/abseil-cpp/absl/status/CMakeLists.txt +16 -0
- package/vendor/abseil-cpp/absl/status/internal/status_internal.h +4 -2
- package/vendor/abseil-cpp/absl/status/internal/status_matchers.h +2 -2
- package/vendor/abseil-cpp/absl/status/internal/statusor_internal.h +2 -1
- package/vendor/abseil-cpp/absl/status/status.cc +4 -0
- package/vendor/abseil-cpp/absl/status/status.h +5 -0
- package/vendor/abseil-cpp/absl/status/status_matchers.h +48 -0
- package/vendor/abseil-cpp/absl/status/status_matchers_test.cc +27 -0
- package/vendor/abseil-cpp/absl/status/status_test.cc +1 -0
- package/vendor/abseil-cpp/absl/status/statusor.h +1 -1
- package/vendor/abseil-cpp/absl/strings/BUILD.bazel +101 -21
- package/vendor/abseil-cpp/absl/strings/CMakeLists.txt +99 -5
- package/vendor/abseil-cpp/absl/strings/ascii.h +9 -4
- package/vendor/abseil-cpp/absl/strings/cord.cc +15 -10
- package/vendor/abseil-cpp/absl/strings/cord.h +1 -1
- package/vendor/abseil-cpp/absl/strings/escaping.cc +126 -94
- package/vendor/abseil-cpp/absl/strings/internal/append_and_overwrite.h +93 -0
- package/vendor/abseil-cpp/absl/strings/internal/append_and_overwrite_test.cc +95 -0
- package/vendor/abseil-cpp/absl/strings/internal/cord_internal.h +2 -0
- package/vendor/abseil-cpp/absl/strings/internal/cord_rep_btree_test.cc +8 -8
- package/vendor/abseil-cpp/absl/strings/internal/cordz_info.cc +24 -18
- package/vendor/abseil-cpp/absl/strings/internal/cordz_info.h +10 -16
- package/vendor/abseil-cpp/absl/strings/internal/escaping.h +9 -7
- package/vendor/abseil-cpp/absl/strings/internal/generic_printer.cc +107 -0
- package/vendor/abseil-cpp/absl/strings/internal/generic_printer.h +115 -0
- package/vendor/abseil-cpp/absl/strings/internal/generic_printer_internal.h +423 -0
- package/vendor/abseil-cpp/absl/strings/internal/generic_printer_test.cc +685 -0
- package/vendor/abseil-cpp/absl/strings/internal/resize_uninitialized.h +0 -12
- package/vendor/abseil-cpp/absl/strings/internal/str_format/checker.h +2 -4
- package/vendor/abseil-cpp/absl/strings/internal/str_format/convert_test.cc +21 -7
- package/vendor/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +495 -8
- package/vendor/abseil-cpp/absl/strings/internal/str_join_internal.h +18 -15
- package/vendor/abseil-cpp/absl/strings/numbers.cc +71 -8
- package/vendor/abseil-cpp/absl/strings/numbers.h +25 -12
- package/vendor/abseil-cpp/absl/strings/numbers_test.cc +70 -0
- package/vendor/abseil-cpp/absl/strings/resize_and_overwrite.h +194 -0
- package/vendor/abseil-cpp/absl/strings/resize_and_overwrite_test.cc +154 -0
- package/vendor/abseil-cpp/absl/strings/str_cat.cc +96 -91
- package/vendor/abseil-cpp/absl/strings/str_cat.h +17 -12
- package/vendor/abseil-cpp/absl/strings/str_format_test.cc +4 -4
- package/vendor/abseil-cpp/absl/strings/str_split.h +1 -1
- package/vendor/abseil-cpp/absl/strings/str_split_test.cc +1 -1
- package/vendor/abseil-cpp/absl/strings/string_view.h +8 -718
- package/vendor/abseil-cpp/absl/strings/string_view_test.cc +1 -1265
- package/vendor/abseil-cpp/absl/strings/substitute.cc +24 -24
- package/vendor/abseil-cpp/absl/synchronization/BUILD.bazel +2 -3
- package/vendor/abseil-cpp/absl/synchronization/CMakeLists.txt +1 -0
- package/vendor/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +2 -2
- package/vendor/abseil-cpp/absl/synchronization/internal/kernel_timeout_test.cc +15 -5
- package/vendor/abseil-cpp/absl/synchronization/mutex.cc +2 -1
- package/vendor/abseil-cpp/absl/synchronization/mutex.h +47 -23
- package/vendor/abseil-cpp/absl/synchronization/notification.h +1 -1
- package/vendor/abseil-cpp/absl/time/CMakeLists.txt +2 -0
- package/vendor/abseil-cpp/absl/time/civil_time_benchmark.cc +1 -2
- package/vendor/abseil-cpp/absl/time/civil_time_test.cc +58 -103
- package/vendor/abseil-cpp/absl/time/clock.cc +18 -16
- package/vendor/abseil-cpp/absl/time/clock_test.cc +2 -2
- package/vendor/abseil-cpp/absl/time/duration_benchmark.cc +144 -0
- package/vendor/abseil-cpp/absl/time/duration_test.cc +26 -29
- package/vendor/abseil-cpp/absl/time/internal/cctz/BUILD.bazel +7 -1
- package/vendor/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +4 -2
- package/vendor/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +6 -103
- package/vendor/abseil-cpp/absl/time/internal/cctz/src/time_zone_name_win.cc +186 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/src/time_zone_name_win.h +37 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/version +1 -1
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/America/Ensenada +0 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/America/Santa_Isabel +0 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/America/Tijuana +0 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/Mexico/BajaNorte +0 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/iso3166.tab +9 -9
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/zone1970.tab +12 -12
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/zonenow.tab +47 -47
- package/vendor/abseil-cpp/absl/time/time.cc +4 -4
- package/vendor/abseil-cpp/absl/time/time.h +10 -10
- package/vendor/abseil-cpp/absl/time/time_test.cc +1 -0
- package/vendor/abseil-cpp/absl/types/compare.h +62 -61
- package/vendor/abseil-cpp/absl/types/compare_test.cc +3 -3
- package/vendor/abseil-cpp/absl/types/internal/span.h +1 -0
- package/vendor/abseil-cpp/absl/types/optional.h +2 -2
- package/vendor/abseil-cpp/absl/types/span.h +10 -2
- package/vendor/abseil-cpp/absl/utility/utility.h +13 -0
- package/vendor/abseil-cpp/ci/absl_alternate_options.h +0 -1
- package/vendor/abseil-cpp/ci/cmake_common.sh +1 -1
- package/vendor/abseil-cpp/ci/cmake_install_test.sh +6 -0
- package/vendor/abseil-cpp/ci/linux_arm_clang-latest_libcxx_bazel.sh +1 -0
- package/vendor/abseil-cpp/ci/linux_clang-latest_libcxx_asan_bazel.sh +2 -0
- package/vendor/abseil-cpp/ci/linux_clang-latest_libcxx_bazel.sh +1 -0
- package/vendor/abseil-cpp/ci/linux_clang-latest_libcxx_tsan_bazel.sh +1 -0
- package/vendor/abseil-cpp/ci/linux_clang-latest_libstdcxx_bazel.sh +1 -0
- package/vendor/abseil-cpp/ci/linux_gcc-floor_libstdcxx_bazel.sh +1 -0
- package/vendor/abseil-cpp/ci/linux_gcc-latest_libstdcxx_bazel.sh +1 -0
- package/vendor/abseil-cpp/ci/linux_gcc-latest_libstdcxx_cmake.sh +6 -0
- package/vendor/abseil-cpp/ci/linux_gcc_alpine_cmake.sh +6 -0
- package/vendor/abseil-cpp/ci/macos_xcode_bazel.sh +3 -2
- package/vendor/abseil-cpp/ci/macos_xcode_cmake.sh +5 -0
- package/vendor/abseil-cpp/ci/windows_clangcl_bazel.bat +1 -0
- package/vendor/abseil-cpp/ci/windows_msvc_bazel.bat +1 -0
- package/vendor/abseil-cpp/ci/windows_msvc_cmake.bat +6 -1
- package/vendor/abseil-cpp/absl/base/internal/identity.h +0 -39
- package/vendor/abseil-cpp/absl/strings/string_view.cc +0 -257
- package/vendor/abseil-cpp/absl/strings/string_view_benchmark.cc +0 -380
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
#include "absl/algorithm/algorithm.h"
|
|
54
54
|
#include "absl/base/config.h"
|
|
55
55
|
#include "absl/base/macros.h"
|
|
56
|
-
#include "absl/base/nullability.h"
|
|
57
56
|
#include "absl/meta/type_traits.h"
|
|
58
57
|
|
|
59
58
|
namespace absl {
|
|
@@ -522,7 +521,8 @@ ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
|
522
521
|
// Container-based version of the <algorithm> `std::copy()` function to copy a
|
|
523
522
|
// container's elements into an iterator.
|
|
524
523
|
template <typename InputSequence, typename OutputIterator>
|
|
525
|
-
|
|
524
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
525
|
+
c_copy(const InputSequence& input, OutputIterator output) {
|
|
526
526
|
return std::copy(container_algorithm_internal::c_begin(input),
|
|
527
527
|
container_algorithm_internal::c_end(input), output);
|
|
528
528
|
}
|
|
@@ -532,7 +532,8 @@ OutputIterator c_copy(const InputSequence& input, OutputIterator output) {
|
|
|
532
532
|
// Container-based version of the <algorithm> `std::copy_n()` function to copy a
|
|
533
533
|
// container's first N elements into an iterator.
|
|
534
534
|
template <typename C, typename Size, typename OutputIterator>
|
|
535
|
-
|
|
535
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
536
|
+
c_copy_n(const C& input, Size n, OutputIterator output) {
|
|
536
537
|
return std::copy_n(container_algorithm_internal::c_begin(input), n, output);
|
|
537
538
|
}
|
|
538
539
|
|
|
@@ -541,8 +542,8 @@ OutputIterator c_copy_n(const C& input, Size n, OutputIterator output) {
|
|
|
541
542
|
// Container-based version of the <algorithm> `std::copy_if()` function to copy
|
|
542
543
|
// a container's elements satisfying some condition into an iterator.
|
|
543
544
|
template <typename InputSequence, typename OutputIterator, typename Pred>
|
|
544
|
-
|
|
545
|
-
|
|
545
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
546
|
+
c_copy_if(const InputSequence& input, OutputIterator output, Pred&& pred) {
|
|
546
547
|
return std::copy_if(container_algorithm_internal::c_begin(input),
|
|
547
548
|
container_algorithm_internal::c_end(input), output,
|
|
548
549
|
std::forward<Pred>(pred));
|
|
@@ -553,8 +554,8 @@ OutputIterator c_copy_if(const InputSequence& input, OutputIterator output,
|
|
|
553
554
|
// Container-based version of the <algorithm> `std::copy_backward()` function to
|
|
554
555
|
// copy a container's elements in reverse order into an iterator.
|
|
555
556
|
template <typename C, typename BidirectionalIterator>
|
|
556
|
-
BidirectionalIterator
|
|
557
|
-
|
|
557
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 BidirectionalIterator
|
|
558
|
+
c_copy_backward(const C& src, BidirectionalIterator dest) {
|
|
558
559
|
return std::copy_backward(container_algorithm_internal::c_begin(src),
|
|
559
560
|
container_algorithm_internal::c_end(src), dest);
|
|
560
561
|
}
|
|
@@ -564,7 +565,8 @@ BidirectionalIterator c_copy_backward(const C& src,
|
|
|
564
565
|
// Container-based version of the <algorithm> `std::move()` function to move
|
|
565
566
|
// a container's elements into an iterator.
|
|
566
567
|
template <typename C, typename OutputIterator>
|
|
567
|
-
OutputIterator c_move(C&& src,
|
|
568
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_move(C&& src,
|
|
569
|
+
OutputIterator dest) {
|
|
568
570
|
return std::move(container_algorithm_internal::c_begin(src),
|
|
569
571
|
container_algorithm_internal::c_end(src), dest);
|
|
570
572
|
}
|
|
@@ -574,7 +576,8 @@ OutputIterator c_move(C&& src, OutputIterator dest) {
|
|
|
574
576
|
// Container-based version of the <algorithm> `std::move_backward()` function to
|
|
575
577
|
// move a container's elements into an iterator in reverse order.
|
|
576
578
|
template <typename C, typename BidirectionalIterator>
|
|
577
|
-
|
|
579
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 BidirectionalIterator
|
|
580
|
+
c_move_backward(C&& src, BidirectionalIterator dest) {
|
|
578
581
|
return std::move_backward(container_algorithm_internal::c_begin(src),
|
|
579
582
|
container_algorithm_internal::c_end(src), dest);
|
|
580
583
|
}
|
|
@@ -585,7 +588,9 @@ BidirectionalIterator c_move_backward(C&& src, BidirectionalIterator dest) {
|
|
|
585
588
|
// swap a container's elements with another container's elements. Swaps the
|
|
586
589
|
// first N elements of `c1` and `c2`, where N = min(size(c1), size(c2)).
|
|
587
590
|
template <typename C1, typename C2>
|
|
588
|
-
|
|
591
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
592
|
+
container_algorithm_internal::ContainerIter<C2>
|
|
593
|
+
c_swap_ranges(C1& c1, C2& c2) {
|
|
589
594
|
auto first1 = container_algorithm_internal::c_begin(c1);
|
|
590
595
|
auto last1 = container_algorithm_internal::c_end(c1);
|
|
591
596
|
auto first2 = container_algorithm_internal::c_begin(c2);
|
|
@@ -605,8 +610,8 @@ container_algorithm_internal::ContainerIter<C2> c_swap_ranges(C1& c1, C2& c2) {
|
|
|
605
610
|
// result in an iterator pointing to the last transformed element in the output
|
|
606
611
|
// range.
|
|
607
612
|
template <typename InputSequence, typename OutputIterator, typename UnaryOp>
|
|
608
|
-
OutputIterator c_transform(
|
|
609
|
-
|
|
613
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_transform(
|
|
614
|
+
const InputSequence& input, OutputIterator output, UnaryOp&& unary_op) {
|
|
610
615
|
return std::transform(container_algorithm_internal::c_begin(input),
|
|
611
616
|
container_algorithm_internal::c_end(input), output,
|
|
612
617
|
std::forward<UnaryOp>(unary_op));
|
|
@@ -617,9 +622,9 @@ OutputIterator c_transform(const InputSequence& input, OutputIterator output,
|
|
|
617
622
|
// where N = min(size(c1), size(c2)).
|
|
618
623
|
template <typename InputSequence1, typename InputSequence2,
|
|
619
624
|
typename OutputIterator, typename BinaryOp>
|
|
620
|
-
OutputIterator
|
|
621
|
-
|
|
622
|
-
|
|
625
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
626
|
+
c_transform(const InputSequence1& input1, const InputSequence2& input2,
|
|
627
|
+
OutputIterator output, BinaryOp&& binary_op) {
|
|
623
628
|
auto first1 = container_algorithm_internal::c_begin(input1);
|
|
624
629
|
auto last1 = container_algorithm_internal::c_end(input1);
|
|
625
630
|
auto first2 = container_algorithm_internal::c_begin(input2);
|
|
@@ -638,7 +643,9 @@ OutputIterator c_transform(const InputSequence1& input1,
|
|
|
638
643
|
// replace a container's elements of some value with a new value. The container
|
|
639
644
|
// is modified in place.
|
|
640
645
|
template <typename Sequence, typename T>
|
|
641
|
-
void c_replace(Sequence& sequence,
|
|
646
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_replace(Sequence& sequence,
|
|
647
|
+
const T& old_value,
|
|
648
|
+
const T& new_value) {
|
|
642
649
|
std::replace(container_algorithm_internal::c_begin(sequence),
|
|
643
650
|
container_algorithm_internal::c_end(sequence), old_value,
|
|
644
651
|
new_value);
|
|
@@ -650,7 +657,8 @@ void c_replace(Sequence& sequence, const T& old_value, const T& new_value) {
|
|
|
650
657
|
// replace a container's elements of some value with a new value based on some
|
|
651
658
|
// condition. The container is modified in place.
|
|
652
659
|
template <typename C, typename Pred, typename T>
|
|
653
|
-
void c_replace_if(C& c, Pred&& pred,
|
|
660
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_replace_if(C& c, Pred&& pred,
|
|
661
|
+
T&& new_value) {
|
|
654
662
|
std::replace_if(container_algorithm_internal::c_begin(c),
|
|
655
663
|
container_algorithm_internal::c_end(c),
|
|
656
664
|
std::forward<Pred>(pred), std::forward<T>(new_value));
|
|
@@ -662,8 +670,8 @@ void c_replace_if(C& c, Pred&& pred, T&& new_value) {
|
|
|
662
670
|
// replace a container's elements of some value with a new value and return the
|
|
663
671
|
// results within an iterator.
|
|
664
672
|
template <typename C, typename OutputIterator, typename T>
|
|
665
|
-
OutputIterator c_replace_copy(
|
|
666
|
-
|
|
673
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_replace_copy(
|
|
674
|
+
const C& c, OutputIterator result, T&& old_value, T&& new_value) {
|
|
667
675
|
return std::replace_copy(container_algorithm_internal::c_begin(c),
|
|
668
676
|
container_algorithm_internal::c_end(c), result,
|
|
669
677
|
std::forward<T>(old_value),
|
|
@@ -676,8 +684,8 @@ OutputIterator c_replace_copy(const C& c, OutputIterator result, T&& old_value,
|
|
|
676
684
|
// to replace a container's elements of some value with a new value based on
|
|
677
685
|
// some condition, and return the results within an iterator.
|
|
678
686
|
template <typename C, typename OutputIterator, typename Pred, typename T>
|
|
679
|
-
OutputIterator c_replace_copy_if(
|
|
680
|
-
|
|
687
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_replace_copy_if(
|
|
688
|
+
const C& c, OutputIterator result, Pred&& pred, const T& new_value) {
|
|
681
689
|
return std::replace_copy_if(container_algorithm_internal::c_begin(c),
|
|
682
690
|
container_algorithm_internal::c_end(c), result,
|
|
683
691
|
std::forward<Pred>(pred), new_value);
|
|
@@ -688,7 +696,7 @@ OutputIterator c_replace_copy_if(const C& c, OutputIterator result, Pred&& pred,
|
|
|
688
696
|
// Container-based version of the <algorithm> `std::fill()` function to fill a
|
|
689
697
|
// container with some value.
|
|
690
698
|
template <typename C, typename T>
|
|
691
|
-
void c_fill(C& c, const T& value) {
|
|
699
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_fill(C& c, const T& value) {
|
|
692
700
|
std::fill(container_algorithm_internal::c_begin(c),
|
|
693
701
|
container_algorithm_internal::c_end(c), value);
|
|
694
702
|
}
|
|
@@ -698,7 +706,8 @@ void c_fill(C& c, const T& value) {
|
|
|
698
706
|
// Container-based version of the <algorithm> `std::fill_n()` function to fill
|
|
699
707
|
// the first N elements in a container with some value.
|
|
700
708
|
template <typename C, typename Size, typename T>
|
|
701
|
-
void c_fill_n(C& c, Size n,
|
|
709
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_fill_n(C& c, Size n,
|
|
710
|
+
const T& value) {
|
|
702
711
|
std::fill_n(container_algorithm_internal::c_begin(c), n, value);
|
|
703
712
|
}
|
|
704
713
|
|
|
@@ -707,7 +716,7 @@ void c_fill_n(C& c, Size n, const T& value) {
|
|
|
707
716
|
// Container-based version of the <algorithm> `std::generate()` function to
|
|
708
717
|
// assign a container's elements to the values provided by the given generator.
|
|
709
718
|
template <typename C, typename Generator>
|
|
710
|
-
void c_generate(C& c, Generator&& gen) {
|
|
719
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_generate(C& c, Generator&& gen) {
|
|
711
720
|
std::generate(container_algorithm_internal::c_begin(c),
|
|
712
721
|
container_algorithm_internal::c_end(c),
|
|
713
722
|
std::forward<Generator>(gen));
|
|
@@ -719,8 +728,9 @@ void c_generate(C& c, Generator&& gen) {
|
|
|
719
728
|
// assign a container's first N elements to the values provided by the given
|
|
720
729
|
// generator.
|
|
721
730
|
template <typename C, typename Size, typename Generator>
|
|
722
|
-
|
|
723
|
-
|
|
731
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
732
|
+
container_algorithm_internal::ContainerIter<C>
|
|
733
|
+
c_generate_n(C& c, Size n, Generator&& gen) {
|
|
724
734
|
return std::generate_n(container_algorithm_internal::c_begin(c), n,
|
|
725
735
|
std::forward<Generator>(gen));
|
|
726
736
|
}
|
|
@@ -736,8 +746,8 @@ container_algorithm_internal::ContainerIter<C> c_generate_n(C& c, Size n,
|
|
|
736
746
|
// copy a container's elements while removing any elements matching the given
|
|
737
747
|
// `value`.
|
|
738
748
|
template <typename C, typename OutputIterator, typename T>
|
|
739
|
-
|
|
740
|
-
|
|
749
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
750
|
+
c_remove_copy(const C& c, OutputIterator result, const T& value) {
|
|
741
751
|
return std::remove_copy(container_algorithm_internal::c_begin(c),
|
|
742
752
|
container_algorithm_internal::c_end(c), result,
|
|
743
753
|
value);
|
|
@@ -749,8 +759,8 @@ OutputIterator c_remove_copy(const C& c, OutputIterator result,
|
|
|
749
759
|
// to copy a container's elements while removing any elements matching the given
|
|
750
760
|
// condition.
|
|
751
761
|
template <typename C, typename OutputIterator, typename Pred>
|
|
752
|
-
|
|
753
|
-
|
|
762
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
763
|
+
c_remove_copy_if(const C& c, OutputIterator result, Pred&& pred) {
|
|
754
764
|
return std::remove_copy_if(container_algorithm_internal::c_begin(c),
|
|
755
765
|
container_algorithm_internal::c_end(c), result,
|
|
756
766
|
std::forward<Pred>(pred));
|
|
@@ -762,7 +772,8 @@ OutputIterator c_remove_copy_if(const C& c, OutputIterator result,
|
|
|
762
772
|
// copy a container's elements while removing any elements containing duplicate
|
|
763
773
|
// values.
|
|
764
774
|
template <typename C, typename OutputIterator>
|
|
765
|
-
|
|
775
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
776
|
+
c_unique_copy(const C& c, OutputIterator result) {
|
|
766
777
|
return std::unique_copy(container_algorithm_internal::c_begin(c),
|
|
767
778
|
container_algorithm_internal::c_end(c), result);
|
|
768
779
|
}
|
|
@@ -770,8 +781,8 @@ OutputIterator c_unique_copy(const C& c, OutputIterator result) {
|
|
|
770
781
|
// Overload of c_unique_copy() for using a predicate evaluation other than
|
|
771
782
|
// `==` for comparing uniqueness of the element values.
|
|
772
783
|
template <typename C, typename OutputIterator, typename BinaryPredicate>
|
|
773
|
-
|
|
774
|
-
|
|
784
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
785
|
+
c_unique_copy(const C& c, OutputIterator result, BinaryPredicate&& pred) {
|
|
775
786
|
return std::unique_copy(container_algorithm_internal::c_begin(c),
|
|
776
787
|
container_algorithm_internal::c_end(c), result,
|
|
777
788
|
std::forward<BinaryPredicate>(pred));
|
|
@@ -782,7 +793,7 @@ OutputIterator c_unique_copy(const C& c, OutputIterator result,
|
|
|
782
793
|
// Container-based version of the <algorithm> `std::reverse()` function to
|
|
783
794
|
// reverse a container's elements.
|
|
784
795
|
template <typename Sequence>
|
|
785
|
-
void c_reverse(Sequence& sequence) {
|
|
796
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_reverse(Sequence& sequence) {
|
|
786
797
|
std::reverse(container_algorithm_internal::c_begin(sequence),
|
|
787
798
|
container_algorithm_internal::c_end(sequence));
|
|
788
799
|
}
|
|
@@ -792,7 +803,8 @@ void c_reverse(Sequence& sequence) {
|
|
|
792
803
|
// Container-based version of the <algorithm> `std::reverse()` function to
|
|
793
804
|
// reverse a container's elements and write them to an iterator range.
|
|
794
805
|
template <typename C, typename OutputIterator>
|
|
795
|
-
|
|
806
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
807
|
+
c_reverse_copy(const C& sequence, OutputIterator result) {
|
|
796
808
|
return std::reverse_copy(container_algorithm_internal::c_begin(sequence),
|
|
797
809
|
container_algorithm_internal::c_end(sequence),
|
|
798
810
|
result);
|
|
@@ -805,7 +817,8 @@ OutputIterator c_reverse_copy(const C& sequence, OutputIterator result) {
|
|
|
805
817
|
// the first element in the container.
|
|
806
818
|
template <typename C,
|
|
807
819
|
typename Iterator = container_algorithm_internal::ContainerIter<C>>
|
|
808
|
-
Iterator c_rotate(C& sequence,
|
|
820
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 Iterator c_rotate(C& sequence,
|
|
821
|
+
Iterator middle) {
|
|
809
822
|
return absl::rotate(container_algorithm_internal::c_begin(sequence), middle,
|
|
810
823
|
container_algorithm_internal::c_end(sequence));
|
|
811
824
|
}
|
|
@@ -816,10 +829,10 @@ Iterator c_rotate(C& sequence, Iterator middle) {
|
|
|
816
829
|
// shift a container's elements leftward such that the `middle` element becomes
|
|
817
830
|
// the first element in a new iterator range.
|
|
818
831
|
template <typename C, typename OutputIterator>
|
|
819
|
-
OutputIterator
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
832
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
833
|
+
c_rotate_copy(const C& sequence,
|
|
834
|
+
container_algorithm_internal::ContainerIter<const C> middle,
|
|
835
|
+
OutputIterator result) {
|
|
823
836
|
return std::rotate_copy(container_algorithm_internal::c_begin(sequence),
|
|
824
837
|
middle, container_algorithm_internal::c_end(sequence),
|
|
825
838
|
result);
|
|
@@ -861,7 +874,8 @@ OutputIterator c_sample(const C& c, OutputIterator result, Distance n,
|
|
|
861
874
|
// to test whether all elements in the container for which `pred` returns `true`
|
|
862
875
|
// precede those for which `pred` is `false`.
|
|
863
876
|
template <typename C, typename Pred>
|
|
864
|
-
bool c_is_partitioned(const C& c,
|
|
877
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_partitioned(const C& c,
|
|
878
|
+
Pred&& pred) {
|
|
865
879
|
return std::is_partitioned(container_algorithm_internal::c_begin(c),
|
|
866
880
|
container_algorithm_internal::c_end(c),
|
|
867
881
|
std::forward<Pred>(pred));
|
|
@@ -874,7 +888,9 @@ bool c_is_partitioned(const C& c, Pred&& pred) {
|
|
|
874
888
|
// which `pred` returns `true` precede all those for which it returns `false`,
|
|
875
889
|
// returning an iterator to the first element of the second group.
|
|
876
890
|
template <typename C, typename Pred>
|
|
877
|
-
|
|
891
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
892
|
+
container_algorithm_internal::ContainerIter<C>
|
|
893
|
+
c_partition(C& c, Pred&& pred) {
|
|
878
894
|
return std::partition(container_algorithm_internal::c_begin(c),
|
|
879
895
|
container_algorithm_internal::c_end(c),
|
|
880
896
|
std::forward<Pred>(pred));
|
|
@@ -903,9 +919,9 @@ container_algorithm_internal::ContainerIter<C> c_stable_partition(C& c,
|
|
|
903
919
|
|
|
904
920
|
template <typename C, typename OutputIterator1, typename OutputIterator2,
|
|
905
921
|
typename Pred>
|
|
906
|
-
std::pair<OutputIterator1, OutputIterator2>
|
|
907
|
-
|
|
908
|
-
|
|
922
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 std::pair<OutputIterator1, OutputIterator2>
|
|
923
|
+
c_partition_copy(const C& c, OutputIterator1 out_true,
|
|
924
|
+
OutputIterator2 out_false, Pred&& pred) {
|
|
909
925
|
return std::partition_copy(container_algorithm_internal::c_begin(c),
|
|
910
926
|
container_algorithm_internal::c_end(c), out_true,
|
|
911
927
|
out_false, std::forward<Pred>(pred));
|
|
@@ -917,8 +933,9 @@ std::pair<OutputIterator1, OutputIterator2> c_partition_copy(
|
|
|
917
933
|
// to return the first element of an already partitioned container for which
|
|
918
934
|
// the given `pred` is not `true`.
|
|
919
935
|
template <typename C, typename Pred>
|
|
920
|
-
|
|
921
|
-
|
|
936
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
937
|
+
container_algorithm_internal::ContainerIter<C>
|
|
938
|
+
c_partition_point(C& c, Pred&& pred) {
|
|
922
939
|
return std::partition_point(container_algorithm_internal::c_begin(c),
|
|
923
940
|
container_algorithm_internal::c_end(c),
|
|
924
941
|
std::forward<Pred>(pred));
|
|
@@ -933,7 +950,7 @@ container_algorithm_internal::ContainerIter<C> c_partition_point(C& c,
|
|
|
933
950
|
// Container-based version of the <algorithm> `std::sort()` function
|
|
934
951
|
// to sort elements in ascending order of their values.
|
|
935
952
|
template <typename C>
|
|
936
|
-
void c_sort(C& c) {
|
|
953
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_sort(C& c) {
|
|
937
954
|
std::sort(container_algorithm_internal::c_begin(c),
|
|
938
955
|
container_algorithm_internal::c_end(c));
|
|
939
956
|
}
|
|
@@ -941,7 +958,7 @@ void c_sort(C& c) {
|
|
|
941
958
|
// Overload of c_sort() for performing a `comp` comparison other than the
|
|
942
959
|
// default `operator<`.
|
|
943
960
|
template <typename C, typename LessThan>
|
|
944
|
-
void c_sort(C& c, LessThan&& comp) {
|
|
961
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_sort(C& c, LessThan&& comp) {
|
|
945
962
|
std::sort(container_algorithm_internal::c_begin(c),
|
|
946
963
|
container_algorithm_internal::c_end(c),
|
|
947
964
|
std::forward<LessThan>(comp));
|
|
@@ -972,7 +989,7 @@ void c_stable_sort(C& c, LessThan&& comp) {
|
|
|
972
989
|
// Container-based version of the <algorithm> `std::is_sorted()` function
|
|
973
990
|
// to evaluate whether the given container is sorted in ascending order.
|
|
974
991
|
template <typename C>
|
|
975
|
-
bool c_is_sorted(const C& c) {
|
|
992
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_sorted(const C& c) {
|
|
976
993
|
return std::is_sorted(container_algorithm_internal::c_begin(c),
|
|
977
994
|
container_algorithm_internal::c_end(c));
|
|
978
995
|
}
|
|
@@ -980,7 +997,8 @@ bool c_is_sorted(const C& c) {
|
|
|
980
997
|
// c_is_sorted() overload for performing a `comp` comparison other than the
|
|
981
998
|
// default `operator<`.
|
|
982
999
|
template <typename C, typename LessThan>
|
|
983
|
-
bool c_is_sorted(const C& c,
|
|
1000
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_sorted(const C& c,
|
|
1001
|
+
LessThan&& comp) {
|
|
984
1002
|
return std::is_sorted(container_algorithm_internal::c_begin(c),
|
|
985
1003
|
container_algorithm_internal::c_end(c),
|
|
986
1004
|
std::forward<LessThan>(comp));
|
|
@@ -992,7 +1010,7 @@ bool c_is_sorted(const C& c, LessThan&& comp) {
|
|
|
992
1010
|
// to rearrange elements within a container such that elements before `middle`
|
|
993
1011
|
// are sorted in ascending order.
|
|
994
1012
|
template <typename RandomAccessContainer>
|
|
995
|
-
void c_partial_sort(
|
|
1013
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_partial_sort(
|
|
996
1014
|
RandomAccessContainer& sequence,
|
|
997
1015
|
container_algorithm_internal::ContainerIter<RandomAccessContainer> middle) {
|
|
998
1016
|
std::partial_sort(container_algorithm_internal::c_begin(sequence), middle,
|
|
@@ -1002,7 +1020,7 @@ void c_partial_sort(
|
|
|
1002
1020
|
// Overload of c_partial_sort() for performing a `comp` comparison other than
|
|
1003
1021
|
// the default `operator<`.
|
|
1004
1022
|
template <typename RandomAccessContainer, typename LessThan>
|
|
1005
|
-
void c_partial_sort(
|
|
1023
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_partial_sort(
|
|
1006
1024
|
RandomAccessContainer& sequence,
|
|
1007
1025
|
container_algorithm_internal::ContainerIter<RandomAccessContainer> middle,
|
|
1008
1026
|
LessThan&& comp) {
|
|
@@ -1019,8 +1037,9 @@ void c_partial_sort(
|
|
|
1019
1037
|
// At most min(result.last - result.first, sequence.last - sequence.first)
|
|
1020
1038
|
// elements from the sequence will be stored in the result.
|
|
1021
1039
|
template <typename C, typename RandomAccessContainer>
|
|
1022
|
-
|
|
1023
|
-
|
|
1040
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1041
|
+
container_algorithm_internal::ContainerIter<RandomAccessContainer>
|
|
1042
|
+
c_partial_sort_copy(const C& sequence, RandomAccessContainer& result) {
|
|
1024
1043
|
return std::partial_sort_copy(container_algorithm_internal::c_begin(sequence),
|
|
1025
1044
|
container_algorithm_internal::c_end(sequence),
|
|
1026
1045
|
container_algorithm_internal::c_begin(result),
|
|
@@ -1030,9 +1049,10 @@ c_partial_sort_copy(const C& sequence, RandomAccessContainer& result) {
|
|
|
1030
1049
|
// Overload of c_partial_sort_copy() for performing a `comp` comparison other
|
|
1031
1050
|
// than the default `operator<`.
|
|
1032
1051
|
template <typename C, typename RandomAccessContainer, typename LessThan>
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1052
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1053
|
+
container_algorithm_internal::ContainerIter<RandomAccessContainer>
|
|
1054
|
+
c_partial_sort_copy(const C& sequence, RandomAccessContainer& result,
|
|
1055
|
+
LessThan&& comp) {
|
|
1036
1056
|
return std::partial_sort_copy(container_algorithm_internal::c_begin(sequence),
|
|
1037
1057
|
container_algorithm_internal::c_end(sequence),
|
|
1038
1058
|
container_algorithm_internal::c_begin(result),
|
|
@@ -1046,7 +1066,9 @@ c_partial_sort_copy(const C& sequence, RandomAccessContainer& result,
|
|
|
1046
1066
|
// to return the first element within a container that is not sorted in
|
|
1047
1067
|
// ascending order as an iterator.
|
|
1048
1068
|
template <typename C>
|
|
1049
|
-
|
|
1069
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1070
|
+
container_algorithm_internal::ContainerIter<C>
|
|
1071
|
+
c_is_sorted_until(C& c) {
|
|
1050
1072
|
return std::is_sorted_until(container_algorithm_internal::c_begin(c),
|
|
1051
1073
|
container_algorithm_internal::c_end(c));
|
|
1052
1074
|
}
|
|
@@ -1054,8 +1076,9 @@ container_algorithm_internal::ContainerIter<C> c_is_sorted_until(C& c) {
|
|
|
1054
1076
|
// Overload of c_is_sorted_until() for performing a `comp` comparison other than
|
|
1055
1077
|
// the default `operator<`.
|
|
1056
1078
|
template <typename C, typename LessThan>
|
|
1057
|
-
|
|
1058
|
-
C
|
|
1079
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1080
|
+
container_algorithm_internal::ContainerIter<C>
|
|
1081
|
+
c_is_sorted_until(C& c, LessThan&& comp) {
|
|
1059
1082
|
return std::is_sorted_until(container_algorithm_internal::c_begin(c),
|
|
1060
1083
|
container_algorithm_internal::c_end(c),
|
|
1061
1084
|
std::forward<LessThan>(comp));
|
|
@@ -1069,7 +1092,7 @@ container_algorithm_internal::ContainerIter<C> c_is_sorted_until(
|
|
|
1069
1092
|
// any order, except that all preceding `nth` will be less than that element,
|
|
1070
1093
|
// and all following `nth` will be greater than that element.
|
|
1071
1094
|
template <typename RandomAccessContainer>
|
|
1072
|
-
void c_nth_element(
|
|
1095
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_nth_element(
|
|
1073
1096
|
RandomAccessContainer& sequence,
|
|
1074
1097
|
container_algorithm_internal::ContainerIter<RandomAccessContainer> nth) {
|
|
1075
1098
|
std::nth_element(container_algorithm_internal::c_begin(sequence), nth,
|
|
@@ -1079,7 +1102,7 @@ void c_nth_element(
|
|
|
1079
1102
|
// Overload of c_nth_element() for performing a `comp` comparison other than
|
|
1080
1103
|
// the default `operator<`.
|
|
1081
1104
|
template <typename RandomAccessContainer, typename LessThan>
|
|
1082
|
-
void c_nth_element(
|
|
1105
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_nth_element(
|
|
1083
1106
|
RandomAccessContainer& sequence,
|
|
1084
1107
|
container_algorithm_internal::ContainerIter<RandomAccessContainer> nth,
|
|
1085
1108
|
LessThan&& comp) {
|
|
@@ -1098,8 +1121,9 @@ void c_nth_element(
|
|
|
1098
1121
|
// to return an iterator pointing to the first element in a sorted container
|
|
1099
1122
|
// which does not compare less than `value`.
|
|
1100
1123
|
template <typename Sequence, typename T>
|
|
1101
|
-
|
|
1102
|
-
Sequence
|
|
1124
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1125
|
+
container_algorithm_internal::ContainerIter<Sequence>
|
|
1126
|
+
c_lower_bound(Sequence& sequence, const T& value) {
|
|
1103
1127
|
return std::lower_bound(container_algorithm_internal::c_begin(sequence),
|
|
1104
1128
|
container_algorithm_internal::c_end(sequence), value);
|
|
1105
1129
|
}
|
|
@@ -1107,8 +1131,9 @@ container_algorithm_internal::ContainerIter<Sequence> c_lower_bound(
|
|
|
1107
1131
|
// Overload of c_lower_bound() for performing a `comp` comparison other than
|
|
1108
1132
|
// the default `operator<`.
|
|
1109
1133
|
template <typename Sequence, typename T, typename LessThan>
|
|
1110
|
-
|
|
1111
|
-
Sequence
|
|
1134
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1135
|
+
container_algorithm_internal::ContainerIter<Sequence>
|
|
1136
|
+
c_lower_bound(Sequence& sequence, const T& value, LessThan&& comp) {
|
|
1112
1137
|
return std::lower_bound(container_algorithm_internal::c_begin(sequence),
|
|
1113
1138
|
container_algorithm_internal::c_end(sequence), value,
|
|
1114
1139
|
std::forward<LessThan>(comp));
|
|
@@ -1120,8 +1145,9 @@ container_algorithm_internal::ContainerIter<Sequence> c_lower_bound(
|
|
|
1120
1145
|
// to return an iterator pointing to the first element in a sorted container
|
|
1121
1146
|
// which is greater than `value`.
|
|
1122
1147
|
template <typename Sequence, typename T>
|
|
1123
|
-
|
|
1124
|
-
Sequence
|
|
1148
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1149
|
+
container_algorithm_internal::ContainerIter<Sequence>
|
|
1150
|
+
c_upper_bound(Sequence& sequence, const T& value) {
|
|
1125
1151
|
return std::upper_bound(container_algorithm_internal::c_begin(sequence),
|
|
1126
1152
|
container_algorithm_internal::c_end(sequence), value);
|
|
1127
1153
|
}
|
|
@@ -1129,8 +1155,9 @@ container_algorithm_internal::ContainerIter<Sequence> c_upper_bound(
|
|
|
1129
1155
|
// Overload of c_upper_bound() for performing a `comp` comparison other than
|
|
1130
1156
|
// the default `operator<`.
|
|
1131
1157
|
template <typename Sequence, typename T, typename LessThan>
|
|
1132
|
-
|
|
1133
|
-
Sequence
|
|
1158
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1159
|
+
container_algorithm_internal::ContainerIter<Sequence>
|
|
1160
|
+
c_upper_bound(Sequence& sequence, const T& value, LessThan&& comp) {
|
|
1134
1161
|
return std::upper_bound(container_algorithm_internal::c_begin(sequence),
|
|
1135
1162
|
container_algorithm_internal::c_end(sequence), value,
|
|
1136
1163
|
std::forward<LessThan>(comp));
|
|
@@ -1142,8 +1169,9 @@ container_algorithm_internal::ContainerIter<Sequence> c_upper_bound(
|
|
|
1142
1169
|
// to return an iterator pair pointing to the first and last elements in a
|
|
1143
1170
|
// sorted container which compare equal to `value`.
|
|
1144
1171
|
template <typename Sequence, typename T>
|
|
1145
|
-
|
|
1146
|
-
|
|
1172
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1173
|
+
container_algorithm_internal::ContainerIterPairType<Sequence, Sequence>
|
|
1174
|
+
c_equal_range(Sequence& sequence, const T& value) {
|
|
1147
1175
|
return std::equal_range(container_algorithm_internal::c_begin(sequence),
|
|
1148
1176
|
container_algorithm_internal::c_end(sequence), value);
|
|
1149
1177
|
}
|
|
@@ -1151,8 +1179,9 @@ c_equal_range(Sequence& sequence, const T& value) {
|
|
|
1151
1179
|
// Overload of c_equal_range() for performing a `comp` comparison other than
|
|
1152
1180
|
// the default `operator<`.
|
|
1153
1181
|
template <typename Sequence, typename T, typename LessThan>
|
|
1154
|
-
|
|
1155
|
-
|
|
1182
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1183
|
+
container_algorithm_internal::ContainerIterPairType<Sequence, Sequence>
|
|
1184
|
+
c_equal_range(Sequence& sequence, const T& value, LessThan&& comp) {
|
|
1156
1185
|
return std::equal_range(container_algorithm_internal::c_begin(sequence),
|
|
1157
1186
|
container_algorithm_internal::c_end(sequence), value,
|
|
1158
1187
|
std::forward<LessThan>(comp));
|
|
@@ -1164,7 +1193,8 @@ c_equal_range(Sequence& sequence, const T& value, LessThan&& comp) {
|
|
|
1164
1193
|
// to test if any element in the sorted container contains a value equivalent to
|
|
1165
1194
|
// 'value'.
|
|
1166
1195
|
template <typename Sequence, typename T>
|
|
1167
|
-
bool c_binary_search(
|
|
1196
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_binary_search(
|
|
1197
|
+
const Sequence& sequence, const T& value) {
|
|
1168
1198
|
return std::binary_search(container_algorithm_internal::c_begin(sequence),
|
|
1169
1199
|
container_algorithm_internal::c_end(sequence),
|
|
1170
1200
|
value);
|
|
@@ -1173,8 +1203,8 @@ bool c_binary_search(const Sequence& sequence, const T& value) {
|
|
|
1173
1203
|
// Overload of c_binary_search() for performing a `comp` comparison other than
|
|
1174
1204
|
// the default `operator<`.
|
|
1175
1205
|
template <typename Sequence, typename T, typename LessThan>
|
|
1176
|
-
bool c_binary_search(
|
|
1177
|
-
|
|
1206
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_binary_search(
|
|
1207
|
+
const Sequence& sequence, const T& value, LessThan&& comp) {
|
|
1178
1208
|
return std::binary_search(container_algorithm_internal::c_begin(sequence),
|
|
1179
1209
|
container_algorithm_internal::c_end(sequence),
|
|
1180
1210
|
value, std::forward<LessThan>(comp));
|
|
@@ -1189,7 +1219,8 @@ bool c_binary_search(const Sequence& sequence, const T& value,
|
|
|
1189
1219
|
// Container-based version of the <algorithm> `std::merge()` function
|
|
1190
1220
|
// to merge two sorted containers into a single sorted iterator.
|
|
1191
1221
|
template <typename C1, typename C2, typename OutputIterator>
|
|
1192
|
-
|
|
1222
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
1223
|
+
c_merge(const C1& c1, const C2& c2, OutputIterator result) {
|
|
1193
1224
|
return std::merge(container_algorithm_internal::c_begin(c1),
|
|
1194
1225
|
container_algorithm_internal::c_end(c1),
|
|
1195
1226
|
container_algorithm_internal::c_begin(c2),
|
|
@@ -1199,8 +1230,8 @@ OutputIterator c_merge(const C1& c1, const C2& c2, OutputIterator result) {
|
|
|
1199
1230
|
// Overload of c_merge() for performing a `comp` comparison other than
|
|
1200
1231
|
// the default `operator<`.
|
|
1201
1232
|
template <typename C1, typename C2, typename OutputIterator, typename LessThan>
|
|
1202
|
-
|
|
1203
|
-
|
|
1233
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
1234
|
+
c_merge(const C1& c1, const C2& c2, OutputIterator result, LessThan&& comp) {
|
|
1204
1235
|
return std::merge(container_algorithm_internal::c_begin(c1),
|
|
1205
1236
|
container_algorithm_internal::c_end(c1),
|
|
1206
1237
|
container_algorithm_internal::c_begin(c2),
|
|
@@ -1236,7 +1267,8 @@ void c_inplace_merge(C& c,
|
|
|
1236
1267
|
// to test whether a sorted container `c1` entirely contains another sorted
|
|
1237
1268
|
// container `c2`.
|
|
1238
1269
|
template <typename C1, typename C2>
|
|
1239
|
-
bool c_includes(const C1& c1,
|
|
1270
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_includes(const C1& c1,
|
|
1271
|
+
const C2& c2) {
|
|
1240
1272
|
return std::includes(container_algorithm_internal::c_begin(c1),
|
|
1241
1273
|
container_algorithm_internal::c_end(c1),
|
|
1242
1274
|
container_algorithm_internal::c_begin(c2),
|
|
@@ -1246,7 +1278,8 @@ bool c_includes(const C1& c1, const C2& c2) {
|
|
|
1246
1278
|
// Overload of c_includes() for performing a merge using a `comp` other than
|
|
1247
1279
|
// `operator<`.
|
|
1248
1280
|
template <typename C1, typename C2, typename LessThan>
|
|
1249
|
-
bool c_includes(const C1& c1, const C2& c2,
|
|
1281
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_includes(const C1& c1, const C2& c2,
|
|
1282
|
+
LessThan&& comp) {
|
|
1250
1283
|
return std::includes(container_algorithm_internal::c_begin(c1),
|
|
1251
1284
|
container_algorithm_internal::c_end(c1),
|
|
1252
1285
|
container_algorithm_internal::c_begin(c2),
|
|
@@ -1266,7 +1299,8 @@ template <typename C1, typename C2, typename OutputIterator,
|
|
|
1266
1299
|
typename = typename std::enable_if<
|
|
1267
1300
|
!container_algorithm_internal::IsUnorderedContainer<C2>::value,
|
|
1268
1301
|
void>::type>
|
|
1269
|
-
|
|
1302
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
1303
|
+
c_set_union(const C1& c1, const C2& c2, OutputIterator output) {
|
|
1270
1304
|
return std::set_union(container_algorithm_internal::c_begin(c1),
|
|
1271
1305
|
container_algorithm_internal::c_end(c1),
|
|
1272
1306
|
container_algorithm_internal::c_begin(c2),
|
|
@@ -1282,8 +1316,8 @@ template <typename C1, typename C2, typename OutputIterator, typename LessThan,
|
|
|
1282
1316
|
typename = typename std::enable_if<
|
|
1283
1317
|
!container_algorithm_internal::IsUnorderedContainer<C2>::value,
|
|
1284
1318
|
void>::type>
|
|
1285
|
-
OutputIterator c_set_union(
|
|
1286
|
-
|
|
1319
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_set_union(
|
|
1320
|
+
const C1& c1, const C2& c2, OutputIterator output, LessThan&& comp) {
|
|
1287
1321
|
return std::set_union(container_algorithm_internal::c_begin(c1),
|
|
1288
1322
|
container_algorithm_internal::c_end(c1),
|
|
1289
1323
|
container_algorithm_internal::c_begin(c2),
|
|
@@ -1302,13 +1336,13 @@ template <typename C1, typename C2, typename OutputIterator,
|
|
|
1302
1336
|
typename = typename std::enable_if<
|
|
1303
1337
|
!container_algorithm_internal::IsUnorderedContainer<C2>::value,
|
|
1304
1338
|
void>::type>
|
|
1305
|
-
OutputIterator
|
|
1306
|
-
|
|
1339
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
1340
|
+
c_set_intersection(const C1& c1, const C2& c2, OutputIterator output) {
|
|
1307
1341
|
// In debug builds, ensure that both containers are sorted with respect to the
|
|
1308
1342
|
// default comparator. std::set_intersection requires the containers be sorted
|
|
1309
1343
|
// using operator<.
|
|
1310
|
-
|
|
1311
|
-
|
|
1344
|
+
ABSL_ASSERT(absl::c_is_sorted(c1));
|
|
1345
|
+
ABSL_ASSERT(absl::c_is_sorted(c2));
|
|
1312
1346
|
return std::set_intersection(container_algorithm_internal::c_begin(c1),
|
|
1313
1347
|
container_algorithm_internal::c_end(c1),
|
|
1314
1348
|
container_algorithm_internal::c_begin(c2),
|
|
@@ -1324,13 +1358,13 @@ template <typename C1, typename C2, typename OutputIterator, typename LessThan,
|
|
|
1324
1358
|
typename = typename std::enable_if<
|
|
1325
1359
|
!container_algorithm_internal::IsUnorderedContainer<C2>::value,
|
|
1326
1360
|
void>::type>
|
|
1327
|
-
OutputIterator c_set_intersection(
|
|
1328
|
-
|
|
1361
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_set_intersection(
|
|
1362
|
+
const C1& c1, const C2& c2, OutputIterator output, LessThan&& comp) {
|
|
1329
1363
|
// In debug builds, ensure that both containers are sorted with respect to the
|
|
1330
1364
|
// default comparator. std::set_intersection requires the containers be sorted
|
|
1331
1365
|
// using the same comparator.
|
|
1332
|
-
|
|
1333
|
-
|
|
1366
|
+
ABSL_ASSERT(absl::c_is_sorted(c1, comp));
|
|
1367
|
+
ABSL_ASSERT(absl::c_is_sorted(c2, comp));
|
|
1334
1368
|
return std::set_intersection(container_algorithm_internal::c_begin(c1),
|
|
1335
1369
|
container_algorithm_internal::c_end(c1),
|
|
1336
1370
|
container_algorithm_internal::c_begin(c2),
|
|
@@ -1350,8 +1384,8 @@ template <typename C1, typename C2, typename OutputIterator,
|
|
|
1350
1384
|
typename = typename std::enable_if<
|
|
1351
1385
|
!container_algorithm_internal::IsUnorderedContainer<C2>::value,
|
|
1352
1386
|
void>::type>
|
|
1353
|
-
OutputIterator
|
|
1354
|
-
|
|
1387
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
1388
|
+
c_set_difference(const C1& c1, const C2& c2, OutputIterator output) {
|
|
1355
1389
|
return std::set_difference(container_algorithm_internal::c_begin(c1),
|
|
1356
1390
|
container_algorithm_internal::c_end(c1),
|
|
1357
1391
|
container_algorithm_internal::c_begin(c2),
|
|
@@ -1367,8 +1401,8 @@ template <typename C1, typename C2, typename OutputIterator, typename LessThan,
|
|
|
1367
1401
|
typename = typename std::enable_if<
|
|
1368
1402
|
!container_algorithm_internal::IsUnorderedContainer<C2>::value,
|
|
1369
1403
|
void>::type>
|
|
1370
|
-
OutputIterator c_set_difference(
|
|
1371
|
-
|
|
1404
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_set_difference(
|
|
1405
|
+
const C1& c1, const C2& c2, OutputIterator output, LessThan&& comp) {
|
|
1372
1406
|
return std::set_difference(container_algorithm_internal::c_begin(c1),
|
|
1373
1407
|
container_algorithm_internal::c_end(c1),
|
|
1374
1408
|
container_algorithm_internal::c_begin(c2),
|
|
@@ -1388,8 +1422,8 @@ template <typename C1, typename C2, typename OutputIterator,
|
|
|
1388
1422
|
typename = typename std::enable_if<
|
|
1389
1423
|
!container_algorithm_internal::IsUnorderedContainer<C2>::value,
|
|
1390
1424
|
void>::type>
|
|
1391
|
-
OutputIterator
|
|
1392
|
-
|
|
1425
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator
|
|
1426
|
+
c_set_symmetric_difference(const C1& c1, const C2& c2, OutputIterator output) {
|
|
1393
1427
|
return std::set_symmetric_difference(
|
|
1394
1428
|
container_algorithm_internal::c_begin(c1),
|
|
1395
1429
|
container_algorithm_internal::c_end(c1),
|
|
@@ -1406,9 +1440,8 @@ template <typename C1, typename C2, typename OutputIterator, typename LessThan,
|
|
|
1406
1440
|
typename = typename std::enable_if<
|
|
1407
1441
|
!container_algorithm_internal::IsUnorderedContainer<C2>::value,
|
|
1408
1442
|
void>::type>
|
|
1409
|
-
OutputIterator c_set_symmetric_difference(
|
|
1410
|
-
|
|
1411
|
-
LessThan&& comp) {
|
|
1443
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIterator c_set_symmetric_difference(
|
|
1444
|
+
const C1& c1, const C2& c2, OutputIterator output, LessThan&& comp) {
|
|
1412
1445
|
return std::set_symmetric_difference(
|
|
1413
1446
|
container_algorithm_internal::c_begin(c1),
|
|
1414
1447
|
container_algorithm_internal::c_end(c1),
|
|
@@ -1426,7 +1459,8 @@ OutputIterator c_set_symmetric_difference(const C1& c1, const C2& c2,
|
|
|
1426
1459
|
// Container-based version of the <algorithm> `std::push_heap()` function
|
|
1427
1460
|
// to push a value onto a container heap.
|
|
1428
1461
|
template <typename RandomAccessContainer>
|
|
1429
|
-
void c_push_heap(
|
|
1462
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_push_heap(
|
|
1463
|
+
RandomAccessContainer& sequence) {
|
|
1430
1464
|
std::push_heap(container_algorithm_internal::c_begin(sequence),
|
|
1431
1465
|
container_algorithm_internal::c_end(sequence));
|
|
1432
1466
|
}
|
|
@@ -1434,7 +1468,8 @@ void c_push_heap(RandomAccessContainer& sequence) {
|
|
|
1434
1468
|
// Overload of c_push_heap() for performing a push operation on a heap using a
|
|
1435
1469
|
// `comp` other than `operator<`.
|
|
1436
1470
|
template <typename RandomAccessContainer, typename LessThan>
|
|
1437
|
-
void c_push_heap(
|
|
1471
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_push_heap(
|
|
1472
|
+
RandomAccessContainer& sequence, LessThan&& comp) {
|
|
1438
1473
|
std::push_heap(container_algorithm_internal::c_begin(sequence),
|
|
1439
1474
|
container_algorithm_internal::c_end(sequence),
|
|
1440
1475
|
std::forward<LessThan>(comp));
|
|
@@ -1445,7 +1480,8 @@ void c_push_heap(RandomAccessContainer& sequence, LessThan&& comp) {
|
|
|
1445
1480
|
// Container-based version of the <algorithm> `std::pop_heap()` function
|
|
1446
1481
|
// to pop a value from a heap container.
|
|
1447
1482
|
template <typename RandomAccessContainer>
|
|
1448
|
-
void c_pop_heap(
|
|
1483
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_pop_heap(
|
|
1484
|
+
RandomAccessContainer& sequence) {
|
|
1449
1485
|
std::pop_heap(container_algorithm_internal::c_begin(sequence),
|
|
1450
1486
|
container_algorithm_internal::c_end(sequence));
|
|
1451
1487
|
}
|
|
@@ -1453,7 +1489,8 @@ void c_pop_heap(RandomAccessContainer& sequence) {
|
|
|
1453
1489
|
// Overload of c_pop_heap() for performing a pop operation on a heap using a
|
|
1454
1490
|
// `comp` other than `operator<`.
|
|
1455
1491
|
template <typename RandomAccessContainer, typename LessThan>
|
|
1456
|
-
void c_pop_heap(
|
|
1492
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_pop_heap(
|
|
1493
|
+
RandomAccessContainer& sequence, LessThan&& comp) {
|
|
1457
1494
|
std::pop_heap(container_algorithm_internal::c_begin(sequence),
|
|
1458
1495
|
container_algorithm_internal::c_end(sequence),
|
|
1459
1496
|
std::forward<LessThan>(comp));
|
|
@@ -1464,7 +1501,8 @@ void c_pop_heap(RandomAccessContainer& sequence, LessThan&& comp) {
|
|
|
1464
1501
|
// Container-based version of the <algorithm> `std::make_heap()` function
|
|
1465
1502
|
// to make a container a heap.
|
|
1466
1503
|
template <typename RandomAccessContainer>
|
|
1467
|
-
void c_make_heap(
|
|
1504
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_make_heap(
|
|
1505
|
+
RandomAccessContainer& sequence) {
|
|
1468
1506
|
std::make_heap(container_algorithm_internal::c_begin(sequence),
|
|
1469
1507
|
container_algorithm_internal::c_end(sequence));
|
|
1470
1508
|
}
|
|
@@ -1472,7 +1510,8 @@ void c_make_heap(RandomAccessContainer& sequence) {
|
|
|
1472
1510
|
// Overload of c_make_heap() for performing heap comparisons using a
|
|
1473
1511
|
// `comp` other than `operator<`
|
|
1474
1512
|
template <typename RandomAccessContainer, typename LessThan>
|
|
1475
|
-
void c_make_heap(
|
|
1513
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_make_heap(
|
|
1514
|
+
RandomAccessContainer& sequence, LessThan&& comp) {
|
|
1476
1515
|
std::make_heap(container_algorithm_internal::c_begin(sequence),
|
|
1477
1516
|
container_algorithm_internal::c_end(sequence),
|
|
1478
1517
|
std::forward<LessThan>(comp));
|
|
@@ -1483,7 +1522,8 @@ void c_make_heap(RandomAccessContainer& sequence, LessThan&& comp) {
|
|
|
1483
1522
|
// Container-based version of the <algorithm> `std::sort_heap()` function
|
|
1484
1523
|
// to sort a heap into ascending order (after which it is no longer a heap).
|
|
1485
1524
|
template <typename RandomAccessContainer>
|
|
1486
|
-
void c_sort_heap(
|
|
1525
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_sort_heap(
|
|
1526
|
+
RandomAccessContainer& sequence) {
|
|
1487
1527
|
std::sort_heap(container_algorithm_internal::c_begin(sequence),
|
|
1488
1528
|
container_algorithm_internal::c_end(sequence));
|
|
1489
1529
|
}
|
|
@@ -1491,7 +1531,8 @@ void c_sort_heap(RandomAccessContainer& sequence) {
|
|
|
1491
1531
|
// Overload of c_sort_heap() for performing heap comparisons using a
|
|
1492
1532
|
// `comp` other than `operator<`
|
|
1493
1533
|
template <typename RandomAccessContainer, typename LessThan>
|
|
1494
|
-
void c_sort_heap(
|
|
1534
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_sort_heap(
|
|
1535
|
+
RandomAccessContainer& sequence, LessThan&& comp) {
|
|
1495
1536
|
std::sort_heap(container_algorithm_internal::c_begin(sequence),
|
|
1496
1537
|
container_algorithm_internal::c_end(sequence),
|
|
1497
1538
|
std::forward<LessThan>(comp));
|
|
@@ -1502,7 +1543,8 @@ void c_sort_heap(RandomAccessContainer& sequence, LessThan&& comp) {
|
|
|
1502
1543
|
// Container-based version of the <algorithm> `std::is_heap()` function
|
|
1503
1544
|
// to check whether the given container is a heap.
|
|
1504
1545
|
template <typename RandomAccessContainer>
|
|
1505
|
-
bool c_is_heap(
|
|
1546
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_heap(
|
|
1547
|
+
const RandomAccessContainer& sequence) {
|
|
1506
1548
|
return std::is_heap(container_algorithm_internal::c_begin(sequence),
|
|
1507
1549
|
container_algorithm_internal::c_end(sequence));
|
|
1508
1550
|
}
|
|
@@ -1510,7 +1552,8 @@ bool c_is_heap(const RandomAccessContainer& sequence) {
|
|
|
1510
1552
|
// Overload of c_is_heap() for performing heap comparisons using a
|
|
1511
1553
|
// `comp` other than `operator<`
|
|
1512
1554
|
template <typename RandomAccessContainer, typename LessThan>
|
|
1513
|
-
bool c_is_heap(
|
|
1555
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_is_heap(
|
|
1556
|
+
const RandomAccessContainer& sequence, LessThan&& comp) {
|
|
1514
1557
|
return std::is_heap(container_algorithm_internal::c_begin(sequence),
|
|
1515
1558
|
container_algorithm_internal::c_end(sequence),
|
|
1516
1559
|
std::forward<LessThan>(comp));
|
|
@@ -1521,8 +1564,9 @@ bool c_is_heap(const RandomAccessContainer& sequence, LessThan&& comp) {
|
|
|
1521
1564
|
// Container-based version of the <algorithm> `std::is_heap_until()` function
|
|
1522
1565
|
// to find the first element in a given container which is not in heap order.
|
|
1523
1566
|
template <typename RandomAccessContainer>
|
|
1524
|
-
|
|
1525
|
-
|
|
1567
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1568
|
+
container_algorithm_internal::ContainerIter<RandomAccessContainer>
|
|
1569
|
+
c_is_heap_until(RandomAccessContainer& sequence) {
|
|
1526
1570
|
return std::is_heap_until(container_algorithm_internal::c_begin(sequence),
|
|
1527
1571
|
container_algorithm_internal::c_end(sequence));
|
|
1528
1572
|
}
|
|
@@ -1530,8 +1574,9 @@ c_is_heap_until(RandomAccessContainer& sequence) {
|
|
|
1530
1574
|
// Overload of c_is_heap_until() for performing heap comparisons using a
|
|
1531
1575
|
// `comp` other than `operator<`
|
|
1532
1576
|
template <typename RandomAccessContainer, typename LessThan>
|
|
1533
|
-
|
|
1534
|
-
|
|
1577
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20
|
|
1578
|
+
container_algorithm_internal::ContainerIter<RandomAccessContainer>
|
|
1579
|
+
c_is_heap_until(RandomAccessContainer& sequence, LessThan&& comp) {
|
|
1535
1580
|
return std::is_heap_until(container_algorithm_internal::c_begin(sequence),
|
|
1536
1581
|
container_algorithm_internal::c_end(sequence),
|
|
1537
1582
|
std::forward<LessThan>(comp));
|
|
@@ -1626,8 +1671,8 @@ ABSL_INTERNAL_CONSTEXPR_SINCE_CXX17
|
|
|
1626
1671
|
// that capital letters ("A-Z") have ASCII values less than lowercase letters
|
|
1627
1672
|
// ("a-z").
|
|
1628
1673
|
template <typename Sequence1, typename Sequence2>
|
|
1629
|
-
bool c_lexicographical_compare(
|
|
1630
|
-
|
|
1674
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_lexicographical_compare(
|
|
1675
|
+
const Sequence1& sequence1, const Sequence2& sequence2) {
|
|
1631
1676
|
return std::lexicographical_compare(
|
|
1632
1677
|
container_algorithm_internal::c_begin(sequence1),
|
|
1633
1678
|
container_algorithm_internal::c_end(sequence1),
|
|
@@ -1638,8 +1683,8 @@ bool c_lexicographical_compare(const Sequence1& sequence1,
|
|
|
1638
1683
|
// Overload of c_lexicographical_compare() for performing a lexicographical
|
|
1639
1684
|
// comparison using a `comp` operator instead of `operator<`.
|
|
1640
1685
|
template <typename Sequence1, typename Sequence2, typename LessThan>
|
|
1641
|
-
bool c_lexicographical_compare(
|
|
1642
|
-
|
|
1686
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_lexicographical_compare(
|
|
1687
|
+
const Sequence1& sequence1, const Sequence2& sequence2, LessThan&& comp) {
|
|
1643
1688
|
return std::lexicographical_compare(
|
|
1644
1689
|
container_algorithm_internal::c_begin(sequence1),
|
|
1645
1690
|
container_algorithm_internal::c_end(sequence1),
|
|
@@ -1654,7 +1699,7 @@ bool c_lexicographical_compare(const Sequence1& sequence1,
|
|
|
1654
1699
|
// to rearrange a container's elements into the next lexicographically greater
|
|
1655
1700
|
// permutation.
|
|
1656
1701
|
template <typename C>
|
|
1657
|
-
bool c_next_permutation(C& c) {
|
|
1702
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_next_permutation(C& c) {
|
|
1658
1703
|
return std::next_permutation(container_algorithm_internal::c_begin(c),
|
|
1659
1704
|
container_algorithm_internal::c_end(c));
|
|
1660
1705
|
}
|
|
@@ -1662,7 +1707,8 @@ bool c_next_permutation(C& c) {
|
|
|
1662
1707
|
// Overload of c_next_permutation() for performing a lexicographical
|
|
1663
1708
|
// comparison using a `comp` operator instead of `operator<`.
|
|
1664
1709
|
template <typename C, typename LessThan>
|
|
1665
|
-
bool c_next_permutation(C& c,
|
|
1710
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_next_permutation(C& c,
|
|
1711
|
+
LessThan&& comp) {
|
|
1666
1712
|
return std::next_permutation(container_algorithm_internal::c_begin(c),
|
|
1667
1713
|
container_algorithm_internal::c_end(c),
|
|
1668
1714
|
std::forward<LessThan>(comp));
|
|
@@ -1674,7 +1720,7 @@ bool c_next_permutation(C& c, LessThan&& comp) {
|
|
|
1674
1720
|
// to rearrange a container's elements into the next lexicographically lesser
|
|
1675
1721
|
// permutation.
|
|
1676
1722
|
template <typename C>
|
|
1677
|
-
bool c_prev_permutation(C& c) {
|
|
1723
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_prev_permutation(C& c) {
|
|
1678
1724
|
return std::prev_permutation(container_algorithm_internal::c_begin(c),
|
|
1679
1725
|
container_algorithm_internal::c_end(c));
|
|
1680
1726
|
}
|
|
@@ -1682,7 +1728,8 @@ bool c_prev_permutation(C& c) {
|
|
|
1682
1728
|
// Overload of c_prev_permutation() for performing a lexicographical
|
|
1683
1729
|
// comparison using a `comp` operator instead of `operator<`.
|
|
1684
1730
|
template <typename C, typename LessThan>
|
|
1685
|
-
bool c_prev_permutation(C& c,
|
|
1731
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 bool c_prev_permutation(C& c,
|
|
1732
|
+
LessThan&& comp) {
|
|
1686
1733
|
return std::prev_permutation(container_algorithm_internal::c_begin(c),
|
|
1687
1734
|
container_algorithm_internal::c_end(c),
|
|
1688
1735
|
std::forward<LessThan>(comp));
|
|
@@ -1698,7 +1745,8 @@ bool c_prev_permutation(C& c, LessThan&& comp) {
|
|
|
1698
1745
|
// to compute successive values of `value`, as if incremented with `++value`
|
|
1699
1746
|
// after each element is written, and write them to the container.
|
|
1700
1747
|
template <typename Sequence, typename T>
|
|
1701
|
-
void c_iota(Sequence& sequence,
|
|
1748
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 void c_iota(Sequence& sequence,
|
|
1749
|
+
const T& value) {
|
|
1702
1750
|
std::iota(container_algorithm_internal::c_begin(sequence),
|
|
1703
1751
|
container_algorithm_internal::c_end(sequence), value);
|
|
1704
1752
|
}
|
|
@@ -1713,7 +1761,8 @@ void c_iota(Sequence& sequence, const T& value) {
|
|
|
1713
1761
|
// absl::decay_t<T>. As a user of this function you can casually read
|
|
1714
1762
|
// this as "returns T by value" and assume it does the right thing.
|
|
1715
1763
|
template <typename Sequence, typename T>
|
|
1716
|
-
decay_t<T> c_accumulate(
|
|
1764
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 decay_t<T> c_accumulate(
|
|
1765
|
+
const Sequence& sequence, T&& init) {
|
|
1717
1766
|
return std::accumulate(container_algorithm_internal::c_begin(sequence),
|
|
1718
1767
|
container_algorithm_internal::c_end(sequence),
|
|
1719
1768
|
std::forward<T>(init));
|
|
@@ -1722,8 +1771,8 @@ decay_t<T> c_accumulate(const Sequence& sequence, T&& init) {
|
|
|
1722
1771
|
// Overload of c_accumulate() for using a binary operations other than
|
|
1723
1772
|
// addition for computing the accumulation.
|
|
1724
1773
|
template <typename Sequence, typename T, typename BinaryOp>
|
|
1725
|
-
decay_t<T> c_accumulate(
|
|
1726
|
-
|
|
1774
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 decay_t<T> c_accumulate(
|
|
1775
|
+
const Sequence& sequence, T&& init, BinaryOp&& binary_op) {
|
|
1727
1776
|
return std::accumulate(container_algorithm_internal::c_begin(sequence),
|
|
1728
1777
|
container_algorithm_internal::c_end(sequence),
|
|
1729
1778
|
std::forward<T>(init),
|
|
@@ -1739,8 +1788,8 @@ decay_t<T> c_accumulate(const Sequence& sequence, T&& init,
|
|
|
1739
1788
|
// absl::decay_t<T>. As a user of this function you can casually read
|
|
1740
1789
|
// this as "returns T by value" and assume it does the right thing.
|
|
1741
1790
|
template <typename Sequence1, typename Sequence2, typename T>
|
|
1742
|
-
decay_t<T> c_inner_product(
|
|
1743
|
-
|
|
1791
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 decay_t<T> c_inner_product(
|
|
1792
|
+
const Sequence1& factors1, const Sequence2& factors2, T&& sum) {
|
|
1744
1793
|
return std::inner_product(container_algorithm_internal::c_begin(factors1),
|
|
1745
1794
|
container_algorithm_internal::c_end(factors1),
|
|
1746
1795
|
container_algorithm_internal::c_begin(factors2),
|
|
@@ -1752,8 +1801,9 @@ decay_t<T> c_inner_product(const Sequence1& factors1, const Sequence2& factors2,
|
|
|
1752
1801
|
// the product between the two container's element pair).
|
|
1753
1802
|
template <typename Sequence1, typename Sequence2, typename T,
|
|
1754
1803
|
typename BinaryOp1, typename BinaryOp2>
|
|
1755
|
-
decay_t<T> c_inner_product(
|
|
1756
|
-
|
|
1804
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 decay_t<T> c_inner_product(
|
|
1805
|
+
const Sequence1& factors1, const Sequence2& factors2, T&& sum,
|
|
1806
|
+
BinaryOp1&& op1, BinaryOp2&& op2) {
|
|
1757
1807
|
return std::inner_product(container_algorithm_internal::c_begin(factors1),
|
|
1758
1808
|
container_algorithm_internal::c_end(factors1),
|
|
1759
1809
|
container_algorithm_internal::c_begin(factors2),
|
|
@@ -1767,8 +1817,8 @@ decay_t<T> c_inner_product(const Sequence1& factors1, const Sequence2& factors2,
|
|
|
1767
1817
|
// function to compute the difference between each element and the one preceding
|
|
1768
1818
|
// it and write it to an iterator.
|
|
1769
1819
|
template <typename InputSequence, typename OutputIt>
|
|
1770
|
-
OutputIt
|
|
1771
|
-
|
|
1820
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIt
|
|
1821
|
+
c_adjacent_difference(const InputSequence& input, OutputIt output_first) {
|
|
1772
1822
|
return std::adjacent_difference(container_algorithm_internal::c_begin(input),
|
|
1773
1823
|
container_algorithm_internal::c_end(input),
|
|
1774
1824
|
output_first);
|
|
@@ -1777,8 +1827,8 @@ OutputIt c_adjacent_difference(const InputSequence& input,
|
|
|
1777
1827
|
// Overload of c_adjacent_difference() for using a binary operation other than
|
|
1778
1828
|
// subtraction to compute the adjacent difference.
|
|
1779
1829
|
template <typename InputSequence, typename OutputIt, typename BinaryOp>
|
|
1780
|
-
OutputIt c_adjacent_difference(
|
|
1781
|
-
|
|
1830
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIt c_adjacent_difference(
|
|
1831
|
+
const InputSequence& input, OutputIt output_first, BinaryOp&& op) {
|
|
1782
1832
|
return std::adjacent_difference(container_algorithm_internal::c_begin(input),
|
|
1783
1833
|
container_algorithm_internal::c_end(input),
|
|
1784
1834
|
output_first, std::forward<BinaryOp>(op));
|
|
@@ -1791,7 +1841,8 @@ OutputIt c_adjacent_difference(const InputSequence& input,
|
|
|
1791
1841
|
// to an iterator. The partial sum is the sum of all element values so far in
|
|
1792
1842
|
// the sequence.
|
|
1793
1843
|
template <typename InputSequence, typename OutputIt>
|
|
1794
|
-
|
|
1844
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIt
|
|
1845
|
+
c_partial_sum(const InputSequence& input, OutputIt output_first) {
|
|
1795
1846
|
return std::partial_sum(container_algorithm_internal::c_begin(input),
|
|
1796
1847
|
container_algorithm_internal::c_end(input),
|
|
1797
1848
|
output_first);
|
|
@@ -1800,8 +1851,8 @@ OutputIt c_partial_sum(const InputSequence& input, OutputIt output_first) {
|
|
|
1800
1851
|
// Overload of c_partial_sum() for using a binary operation other than addition
|
|
1801
1852
|
// to compute the "partial sum".
|
|
1802
1853
|
template <typename InputSequence, typename OutputIt, typename BinaryOp>
|
|
1803
|
-
OutputIt c_partial_sum(
|
|
1804
|
-
|
|
1854
|
+
ABSL_INTERNAL_CONSTEXPR_SINCE_CXX20 OutputIt c_partial_sum(
|
|
1855
|
+
const InputSequence& input, OutputIt output_first, BinaryOp&& op) {
|
|
1805
1856
|
return std::partial_sum(container_algorithm_internal::c_begin(input),
|
|
1806
1857
|
container_algorithm_internal::c_end(input),
|
|
1807
1858
|
output_first, std::forward<BinaryOp>(op));
|